From owner-svn-src-head@freebsd.org Sun Sep 10 00:32:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE981E14A37; Sun, 10 Sep 2017 00:32:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::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 B6B08834FE; Sun, 10 Sep 2017 00:32:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22f.google.com with SMTP id e199so9301179pfh.3; Sat, 09 Sep 2017 17:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=LXaqfvDaRXhkcqttnvvsxqMmv5yycPg9Rm6EDPk5GPg=; b=hc9Cwf9zgs4rVZ+ir9clI3Q5UwkWQ7XUKjy+vKVqnfbWI8rBnQex3tR8NgrUS5sPWT yYnPTjk7Iko0X3Lo7mFWT5mlo03r5ndG3rO3ZUlBhI83RExlcXLRNEgdES5zZnoN44jm N9KwbdtKmhF3NBiWUpQE3tJxCFhjrJi9SsieM3E1tJ+Z0/deY4JU81LEEU5xcwmlMEZe RwrGXE3YPz5oCD76yg2XOS253C6t6lFvzMIo0WAVoEjMECe4BefaWs9yUsUKakPc01KZ JmxY95h16pR9MB0qmCQcbz2bj2+KR7/R8xZBkg5YnfBuNGVN1QvcVyFAtXkn+kWjtL4x 2dEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=LXaqfvDaRXhkcqttnvvsxqMmv5yycPg9Rm6EDPk5GPg=; b=HoAXtHa7O/tJnTlwzALPKqUEzgRp3AQjhjy7+JfDFm/FF+T6tya7wYZsIY0VBU/sK2 Zr3KQ6DPVDUH+QSqAgD3yJ6p+cuvRlgXXQFKu0nPmjPL67FvsquC5g/q5fIMJ8ijRp8w +42zf7jaCX2P121A3naOzlGiasgtXoUUttauORMGHufmQ6LqJMhFBVIft6T7FZmEC44V wZ812lrJd6Tdow1nUiwqWXqJ7KWGphh0uJqFfv9IMECfEmkyX51x5jF2QG4RFSTOw0jn 7tojnH8lLiVPmtdM570xItfYdQ6JOZqjFW1SC0YMaWUTFOXcvy1Ue8ATEzk1UNc4aHaO hgZA== X-Gm-Message-State: AHPjjUjn8Uy0kluOqOA4V8P0vB2lNLs1/UFi3bJb70aivJGgPIgcIUgH dzNiCFh97oVZ/w== X-Google-Smtp-Source: ADKCNb4sB8DZ8oQlDCP2Kd47HqLfVEHR9G9Z3tkpHE7e09tldn5/NfNl8VRBmbVEgA6tSbWwCJ+9zA== X-Received: by 10.98.211.200 with SMTP id z69mr7324531pfk.112.1505003524222; Sat, 09 Sep 2017 17:32:04 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u186sm8257358pgb.35.2017.09.09.17.32.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 09 Sep 2017 17:32:03 -0700 (PDT) Subject: Re: svn commit: r323365 - in head: cddl/lib/libzpool gnu/usr.bin/binutils/libbfd usr.bin/svn/lib/libsvn_client Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2ED10681-3C76-492B-A201-F8692AEF6804"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170909215100.GX1700@kib.kiev.ua> Date: Sat, 9 Sep 2017 17:32:01 -0700 Cc: Jonathan Anderson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201709091318.v89DIXDj027788@repo.freebsd.org> <20170909183518.GV1700@kib.kiev.ua> <23674A3F-E627-4873-8BB6-4F5ADD7E3EA7@gmail.com> <20170909215100.GX1700@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 00:32:05 -0000 --Apple-Mail=_2ED10681-3C76-492B-A201-F8692AEF6804 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 9, 2017, at 14:51, Konstantin Belousov = wrote: =E2=80=A6 > Then, why peigen.c was left in the SRCS ? I=E2=80=99m not sure, but you might have thought peigen.c and pepigen.c = were the same file. If so, they=E2=80=99re not =E2=80=94 they have = slightly different spelling. HTH, -Ngie --Apple-Mail=_2ED10681-3C76-492B-A201-F8692AEF6804 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZtIgCAAoJEPWDqSZpMIYVHCwP/jg1V4SY7xFLW+II1G3pPEFy 7LwQ3+d43yGVNewENeRs6zgSD60gwKKtEnBRIIxEIsWrbKOGpMPXCeGz1S2vzoBO CHyWODs8QJCVozWoGlQdGWPw1YrOCuwIHalx3xxiJmuDT+XvQgLYam5J9JklmnSd qfXDl/MjB6ezZ40LspqO4un5w81DbgLU8bgmjwgqtTwaAVt+zGxUzyxuDJ0tuX8B JcbaTbXSc8NRPd6u58Y9QQ5o4chpp2siIndP5o4PgviPYcGvdkXervFxCLXD2ojE /MezQbemIv6NXzN+BVsD8BXyaMK1prWRaIWfRH5gzniNCNlSg1pB/CTMcGeu45U6 a/1NNKg6pz+jA9tZzg5G82lF4Ee7HHAgizwJ55iU8pWr+BkOXd+cyQsQ9fhzoZOp LAJIoNDLWTBO202MUXSWtpoEL62pDJFnoUToKtCTYQImGfx/yGZgTRgIxAZoNlR4 THf4WK3T1uXYVMO1XuKJOckBDmFyGxiZjzj2nBuA/3mwmZcA4te8mfvkKIZnlAyb huh4C6RC7SsaI2YMHLI93BBd4jUlJr3bT5uBhnwYLfq0LenKP3xJTzHmnybUgzdK /1B9UB5Ms4YZpPEVHUhvrCiVfWqG4Goe6C38BEKI+BDeawRVmPtGLEPlPVxHCJi2 79IRNTSplASzurdwYq7d =E7kF -----END PGP SIGNATURE----- --Apple-Mail=_2ED10681-3C76-492B-A201-F8692AEF6804-- From owner-svn-src-head@freebsd.org Sun Sep 10 01:25:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F766E17582; Sun, 10 Sep 2017 01:25:17 +0000 (UTC) (envelope-from marius@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 EF86DF68; Sun, 10 Sep 2017 01:25:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8A1PG1F025726; Sun, 10 Sep 2017 01:25:16 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8A1PG0x025724; Sun, 10 Sep 2017 01:25:16 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709100125.v8A1PG0x025724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 10 Sep 2017 01:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323382 - head/contrib/zlib X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/contrib/zlib X-SVN-Commit-Revision: 323382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 01:25:17 -0000 Author: marius Date: Sun Sep 10 01:25:15 2017 New Revision: 323382 URL: https://svnweb.freebsd.org/changeset/base/323382 Log: MFV: r323381 Permit a deflateParams() parameter change as soon as possible. This change fixes compression errors seen when the embedded Tomcat web server of a UniFi Controller zlib compresses responses. Given that Tomcat just uses Java/OpenJDK which in turn employs zlib for its compression/decompression support, this bug might very well affect other applications, too. PR: 222136 Modified: head/contrib/zlib/deflate.c head/contrib/zlib/zlib.h Directory Properties: head/contrib/zlib/ (props changed) Modified: head/contrib/zlib/deflate.c ============================================================================== --- head/contrib/zlib/deflate.c Sun Sep 10 00:56:28 2017 (r323381) +++ head/contrib/zlib/deflate.c Sun Sep 10 01:25:15 2017 (r323382) @@ -494,7 +494,7 @@ int ZEXPORT deflateResetKeep (strm) s->wrap == 2 ? crc32(0L, Z_NULL, 0) : #endif adler32(0L, Z_NULL, 0); - s->last_flush = Z_NO_FLUSH; + s->last_flush = -2; _tr_init(s); @@ -587,12 +587,12 @@ int ZEXPORT deflateParams(strm, level, strategy) func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && - s->high_water) { + s->last_flush != -2) { /* Flush the last buffer: */ int err = deflate(strm, Z_BLOCK); if (err == Z_STREAM_ERROR) return err; - if (strm->avail_out == 0) + if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead) return Z_BUF_ERROR; } if (s->level != level) { Modified: head/contrib/zlib/zlib.h ============================================================================== --- head/contrib/zlib/zlib.h Sun Sep 10 00:56:28 2017 (r323381) +++ head/contrib/zlib/zlib.h Sun Sep 10 01:25:15 2017 (r323382) @@ -712,11 +712,12 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, used to switch between compression and straight copy of the input data, or to switch to a different kind of input data requiring a different strategy. If the compression approach (which is a function of the level) or the - strategy is changed, and if any input has been consumed in a previous - deflate() call, then the input available so far is compressed with the old - level and strategy using deflate(strm, Z_BLOCK). There are three approaches - for the compression levels 0, 1..3, and 4..9 respectively. The new level - and strategy will take effect at the next call of deflate(). + strategy is changed, and if there have been any deflate() calls since the + state was initialized or reset, then the input available so far is + compressed with the old level and strategy using deflate(strm, Z_BLOCK). + There are three approaches for the compression levels 0, 1..3, and 4..9 + respectively. The new level and strategy will take effect at the next call + of deflate(). If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does not have enough output space to complete, then the parameter change will not From owner-svn-src-head@freebsd.org Sun Sep 10 04:09:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1E17E1F4AB; Sun, 10 Sep 2017 04:09:19 +0000 (UTC) (envelope-from scottl@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 CC2EE6471E; Sun, 10 Sep 2017 04:09:19 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8A49Jl8091371; Sun, 10 Sep 2017 04:09:19 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8A49ITh091369; Sun, 10 Sep 2017 04:09:18 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709100409.v8A49ITh091369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 10 Sep 2017 04:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323383 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323383 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 04:09:20 -0000 Author: scottl Date: Sun Sep 10 04:09:18 2017 New Revision: 323383 URL: https://svnweb.freebsd.org/changeset/base/323383 Log: More code refactoring in preparation for enabling multiqueue. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Sep 10 01:25:15 2017 (r323382) +++ head/sys/dev/mpr/mpr.c Sun Sep 10 04:09:18 2017 (r323383) @@ -89,6 +89,7 @@ static void mpr_iocfacts_free(struct mpr_softc *sc); static void mpr_startup(void *arg); static int mpr_send_iocinit(struct mpr_softc *sc); static int mpr_alloc_queues(struct mpr_softc *sc); +static int mpr_alloc_hw_queues(struct mpr_softc *sc); static int mpr_alloc_replies(struct mpr_softc *sc); static int mpr_alloc_requests(struct mpr_softc *sc); static int mpr_alloc_nvme_prp_pages(struct mpr_softc *sc); @@ -565,22 +566,24 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at * IOC Facts are different from the previous IOC Facts after a Diag * Reset. Targets have already been allocated above if needed. */ - if (attaching || reallocating) { - if (((error = mpr_alloc_queues(sc)) != 0) || - ((error = mpr_alloc_replies(sc)) != 0) || - ((error = mpr_alloc_requests(sc)) != 0)) { - if (attaching ) { - mpr_dprint(sc, MPR_INIT|MPR_ERROR, - "Failed to alloc queues with error %d\n", - error); - mpr_free(sc); - return (error); - } else { - panic("%s failed to alloc queues with error " - "%d\n", __func__, error); - } - } + error = 0; + while (attaching || reallocating) { + if ((error = mpr_alloc_hw_queues(sc)) != 0) + break; + if ((error = mpr_alloc_replies(sc)) != 0) + break; + if ((error = mpr_alloc_requests(sc)) != 0) + break; + if ((error = mpr_alloc_queues(sc)) != 0) + break; + break; } + if (error) { + mpr_dprint(sc, MPR_INIT|MPR_ERROR, + "Failed to alloc queues with error %d\n", error); + mpr_free(sc); + return (error); + } /* Always initialize the queues */ bzero(sc->free_queue, sc->fqdepth * 4); @@ -593,15 +596,10 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at */ error = mpr_transition_operational(sc); if (error != 0) { - if (attaching) { - mpr_dprint(sc, MPR_INIT|MPR_FAULT, "Failed to " - "transition to operational with error %d\n", error); - mpr_free(sc); - return (error); - } else { - panic("%s failed to transition to operational with " - "error %d\n", __func__, error); - } + mpr_dprint(sc, MPR_INIT|MPR_FAULT, "Failed to " + "transition to operational with error %d\n", error); + mpr_free(sc); + return (error); } /* @@ -620,26 +618,31 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at /* * Attach the subsystems so they can prepare their event masks. + * XXX Should be dynamic so that IM/IR and user modules can attach */ - /* XXX Should be dynamic so that IM/IR and user modules can attach */ - if (attaching) { + error = 0; + while (attaching) { mpr_dprint(sc, MPR_INIT, "Attaching subsystems\n"); - if (((error = mpr_attach_log(sc)) != 0) || - ((error = mpr_attach_sas(sc)) != 0) || - ((error = mpr_attach_user(sc)) != 0)) { - mpr_dprint(sc, MPR_INIT|MPR_ERROR, - "Failed to attach all subsystems: error %d\n", - error); - mpr_free(sc); - return (error); - } + if ((error = mpr_attach_log(sc)) != 0) + break; + if ((error = mpr_attach_sas(sc)) != 0) + break; + if ((error = mpr_attach_user(sc)) != 0) + break; + break; + } + if (error) { + mpr_dprint(sc, MPR_INIT|MPR_ERROR, + "Failed to attach all subsystems: error %d\n", error); + mpr_free(sc); + return (error); + } - if ((error = mpr_pci_setup_interrupts(sc)) != 0) { - mpr_dprint(sc, MPR_INIT|MPR_ERROR, - "Failed to setup interrupts\n"); - mpr_free(sc); - return (error); - } + if ((error = mpr_pci_setup_interrupts(sc)) != 0) { + mpr_dprint(sc, MPR_INIT|MPR_ERROR, + "Failed to setup interrupts\n"); + mpr_free(sc); + return (error); } return (error); @@ -1140,10 +1143,8 @@ mpr_memaddr_cb(void *arg, bus_dma_segment_t *segs, int static int mpr_alloc_queues(struct mpr_softc *sc) { - bus_addr_t queues_busaddr; struct mpr_queue *q; - uint8_t *queues; - int qsize, fqsize, pqsize, nq, i; + int nq, i; nq = MIN(sc->msi_msgs, mp_ncpus); sc->msi_msgs = nq; @@ -1159,6 +1160,15 @@ mpr_alloc_queues(struct mpr_softc *sc) q->sc = sc; q->qnum = i; } + return (0); +} + +static int +mpr_alloc_hw_queues(struct mpr_softc *sc) +{ + bus_addr_t queues_busaddr; + uint8_t *queues; + int qsize, fqsize, pqsize; /* * The reply free queue contains 4 byte entries in multiples of 16 and Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Sep 10 01:25:15 2017 (r323382) +++ head/sys/dev/mps/mps.c Sun Sep 10 04:09:18 2017 (r323383) @@ -87,6 +87,7 @@ static void mps_iocfacts_free(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); static int mps_alloc_queues(struct mps_softc *sc); +static int mps_alloc_hw_queues(struct mps_softc *sc); static int mps_alloc_replies(struct mps_softc *sc); static int mps_alloc_requests(struct mps_softc *sc); static int mps_attach_log(struct mps_softc *sc); @@ -552,22 +553,25 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at * IOC Facts are different from the previous IOC Facts after a Diag * Reset. Targets have already been allocated above if needed. */ - if (attaching || reallocating) { - if (((error = mps_alloc_queues(sc)) != 0) || - ((error = mps_alloc_replies(sc)) != 0) || - ((error = mps_alloc_requests(sc)) != 0)) { - if (attaching ) { - mps_dprint(sc, MPS_INIT|MPS_FAULT, - "Failed to alloc queues with error %d\n", - error); - mps_free(sc); - return (error); - } else { - panic("%s failed to alloc queues with error " - "%d\n", __func__, error); - } - } + error = 0; + while (attaching || reallocating) { + if ((error = mps_alloc_hw_queues(sc)) != 0) + break; + if ((error = mps_alloc_replies(sc)) != 0) + break; + if ((error = mps_alloc_requests(sc)) != 0) + break; + if ((error = mps_alloc_queues(sc)) != 0) + break; + + break; } + if (error) { + mps_dprint(sc, MPS_INIT|MPS_FAULT, + "Failed to alloc queues with error %d\n", error); + mps_free(sc); + return (error); + } /* Always initialize the queues */ bzero(sc->free_queue, sc->fqdepth * 4); @@ -580,15 +584,10 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at */ error = mps_transition_operational(sc); if (error != 0) { - if (attaching) { - mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to " - "transition to operational with error %d\n", error); - mps_free(sc); - return (error); - } else { - panic("%s failed to transition to operational with " - "error %d\n", __func__, error); - } + mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to " + "transition to operational with error %d\n", error); + mps_free(sc); + return (error); } /* @@ -607,25 +606,31 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at /* * Attach the subsystems so they can prepare their event masks. + * XXX Should be dynamic so that IM/IR and user modules can attach */ - /* XXX Should be dynamic so that IM/IR and user modules can attach */ - if (attaching) { + error = 0; + while (attaching) { mps_dprint(sc, MPS_INIT, "Attaching subsystems\n"); - if (((error = mps_attach_log(sc)) != 0) || - ((error = mps_attach_sas(sc)) != 0) || - ((error = mps_attach_user(sc)) != 0)) { - mps_dprint(sc, MPS_INIT|MPS_FAULT,"Failed to attach " - "all subsystems: error %d\n", error); - mps_free(sc); - return (error); - } + if ((error = mps_attach_log(sc)) != 0) + break; + if ((error = mps_attach_sas(sc)) != 0) + break; + if ((error = mps_attach_user(sc)) != 0) + break; + break; + } + if (error) { + mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to attach all " + "subsystems: error %d\n", error); + mps_free(sc); + return (error); + } - if ((error = mps_pci_setup_interrupts(sc)) != 0) { - mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to setup " - "interrupts\n"); - mps_free(sc); - return (error); - } + if ((error = mps_pci_setup_interrupts(sc)) != 0) { + mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to setup " + "interrupts\n"); + mps_free(sc); + return (error); } /* @@ -1113,10 +1118,8 @@ mps_memaddr_cb(void *arg, bus_dma_segment_t *segs, int static int mps_alloc_queues(struct mps_softc *sc) { - bus_addr_t queues_busaddr; struct mps_queue *q; - uint8_t *queues; - int qsize, fqsize, pqsize, nq, i; + int nq, i; nq = MIN(sc->msi_msgs, mp_ncpus); sc->msi_msgs = nq; @@ -1132,6 +1135,16 @@ mps_alloc_queues(struct mps_softc *sc) q->sc = sc; q->qnum = i; } + + return (0); +} + +static int +mps_alloc_hw_queues(struct mps_softc *sc) +{ + bus_addr_t queues_busaddr; + uint8_t *queues; + int qsize, fqsize, pqsize; /* * The reply free queue contains 4 byte entries in multiples of 16 and From owner-svn-src-head@freebsd.org Sun Sep 10 07:10:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ABE2E016BB; Sun, 10 Sep 2017 07:10:41 +0000 (UTC) (envelope-from scottl@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 5773F68580; Sun, 10 Sep 2017 07:10:41 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8A7AeXr064338; Sun, 10 Sep 2017 07:10:40 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8A7Ae8e064334; Sun, 10 Sep 2017 07:10:40 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709100710.v8A7Ae8e064334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 10 Sep 2017 07:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323384 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323384 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 07:10:41 -0000 Author: scottl Date: Sun Sep 10 07:10:40 2017 New Revision: 323384 URL: https://svnweb.freebsd.org/changeset/base/323384 Log: Fix intrhook release in MPR and MPS for EARLY_AP_STARTUP. Reported by: Limelight Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Sep 10 04:09:18 2017 (r323383) +++ head/sys/dev/mpr/mpr.c Sun Sep 10 07:10:40 2017 (r323384) @@ -1816,6 +1816,11 @@ mpr_startup(void *arg) mpr_mapping_initialize(sc); mprsas_startup(sc); mpr_unlock(sc); + + mpr_dprint(sc, MPR_INIT, "disestablish config intrhook\n"); + config_intrhook_disestablish(&sc->mpr_ich); + sc->mpr_ich.ich_arg = NULL; + mpr_dprint(sc, MPR_INIT, "%s exit\n", __func__); } Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Sun Sep 10 04:09:18 2017 (r323383) +++ head/sys/dev/mpr/mpr_sas.c Sun Sep 10 07:10:40 2017 (r323384) @@ -3829,12 +3829,6 @@ mprsas_portenable_complete(struct mpr_softc *sc, struc mpr_dprint(sc, MPR_FAULT, "Portenable failed\n"); mpr_free_command(sc, cm); - if (sc->mpr_ich.ich_arg != NULL) { - mpr_dprint(sc, MPR_XINFO, "disestablish config intrhook\n"); - config_intrhook_disestablish(&sc->mpr_ich); - sc->mpr_ich.ich_arg = NULL; - } - /* * Done waiting for port enable to complete. Decrement the refcount. * If refcount is 0, discovery is complete and a rescan of the bus can Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Sep 10 04:09:18 2017 (r323383) +++ head/sys/dev/mps/mps.c Sun Sep 10 07:10:40 2017 (r323384) @@ -1673,6 +1673,11 @@ mps_startup(void *arg) mps_mapping_initialize(sc); mpssas_startup(sc); mps_unlock(sc); + + mps_dprint(sc, MPS_INIT, "disestablish config intrhook\n"); + config_intrhook_disestablish(&sc->mps_ich); + sc->mps_ich.ich_arg = NULL; + mps_dprint(sc, MPS_INIT, "%s exit\n", __func__); } Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Sun Sep 10 04:09:18 2017 (r323383) +++ head/sys/dev/mps/mps_sas.c Sun Sep 10 07:10:40 2017 (r323384) @@ -3557,11 +3557,6 @@ mpssas_portenable_complete(struct mps_softc *sc, struc mps_dprint(sc, MPS_FAULT, "Portenable failed\n"); mps_free_command(sc, cm); - if (sc->mps_ich.ich_arg != NULL) { - mps_dprint(sc, MPS_XINFO, "disestablish config intrhook\n"); - config_intrhook_disestablish(&sc->mps_ich); - sc->mps_ich.ich_arg = NULL; - } /* * Get WarpDrive info after discovery is complete but before the scan From owner-svn-src-head@freebsd.org Sun Sep 10 11:17:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1C5E0AE45; Sun, 10 Sep 2017 11:17:33 +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 59BA06F2B2; Sun, 10 Sep 2017 11:17:33 +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 v8ABHW4P067214; Sun, 10 Sep 2017 11:17:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8ABHWDN067213; Sun, 10 Sep 2017 11:17:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201709101117.v8ABHWDN067213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 10 Sep 2017 11:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323385 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 11:17:33 -0000 Author: mjg Date: Sun Sep 10 11:17:32 2017 New Revision: 323385 URL: https://svnweb.freebsd.org/changeset/base/323385 Log: namecache: clean up struct namecache_ts handling namecache_ts differs from mere namecache by few fields placed mid struct. The access to the last element (the name) is thus special-cased. The standard solution is to put new fields at the very beginning anad embedd the original struct. The pointer shuffled around points to the embedded part. If needed, access to new fields can be gained through __containerof. MFC after: 1 week Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Sep 10 07:10:40 2017 (r323384) +++ head/sys/kern/vfs_cache.c Sun Sep 10 11:17:32 2017 (r323385) @@ -117,20 +117,10 @@ struct namecache { * parent. */ struct namecache_ts { - LIST_ENTRY(namecache) nc_hash; /* hash chain */ - LIST_ENTRY(namecache) nc_src; /* source vnode list */ - TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */ - struct vnode *nc_dvp; /* vnode of parent of name */ - union { - struct vnode *nu_vp; /* vnode the name refers to */ - u_int nu_neghits; /* negative entry hits */ - } n_un; - u_char nc_flag; /* flag bits */ - u_char nc_nlen; /* length of name */ struct timespec nc_time; /* timespec provided by fs */ struct timespec nc_dotdottime; /* dotdot timespec provided by fs */ int nc_ticks; /* ticks value when entry was added */ - char nc_name[0]; /* segment name + nul */ + struct namecache nc_nc; }; #define nc_vp n_un.nu_vp @@ -281,63 +271,64 @@ static uma_zone_t __read_mostly cache_zone_large_ts; static struct namecache * cache_alloc(int len, int ts) { + struct namecache_ts *ncp_ts; + struct namecache *ncp; - if (len > CACHE_PATH_CUTOFF) { - if (ts) - return (uma_zalloc(cache_zone_large_ts, M_WAITOK)); + if (__predict_false(ts)) { + if (len <= CACHE_PATH_CUTOFF) + ncp_ts = uma_zalloc(cache_zone_small_ts, M_WAITOK); else - return (uma_zalloc(cache_zone_large, M_WAITOK)); + ncp_ts = uma_zalloc(cache_zone_large_ts, M_WAITOK); + ncp = &ncp_ts->nc_nc; + } else { + if (len <= CACHE_PATH_CUTOFF) + ncp = uma_zalloc(cache_zone_small, M_WAITOK); + else + ncp = uma_zalloc(cache_zone_large, M_WAITOK); } - if (ts) - return (uma_zalloc(cache_zone_small_ts, M_WAITOK)); - else - return (uma_zalloc(cache_zone_small, M_WAITOK)); + return (ncp); } static void cache_free(struct namecache *ncp) { - int ts; + struct namecache_ts *ncp_ts; if (ncp == NULL) return; - ts = ncp->nc_flag & NCF_TS; if ((ncp->nc_flag & NCF_DVDROP) != 0) vdrop(ncp->nc_dvp); - if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) { - if (ts) - uma_zfree(cache_zone_small_ts, ncp); + if (__predict_false(ncp->nc_flag & NCF_TS)) { + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) + uma_zfree(cache_zone_small_ts, ncp_ts); else + uma_zfree(cache_zone_large_ts, ncp_ts); + } else { + if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) uma_zfree(cache_zone_small, ncp); - } else if (ts) - uma_zfree(cache_zone_large_ts, ncp); - else - uma_zfree(cache_zone_large, ncp); + else + uma_zfree(cache_zone_large, ncp); + } } -static char * -nc_get_name(struct namecache *ncp) -{ - struct namecache_ts *ncp_ts; - - if ((ncp->nc_flag & NCF_TS) == 0) - return (ncp->nc_name); - ncp_ts = (struct namecache_ts *)ncp; - return (ncp_ts->nc_name); -} - static void cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp) { + struct namecache_ts *ncp_ts; KASSERT((ncp->nc_flag & NCF_TS) != 0 || (tsp == NULL && ticksp == NULL), ("No NCF_TS")); + if (tsp == NULL && ticksp == NULL) + return; + + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); if (tsp != NULL) - *tsp = ((struct namecache_ts *)ncp)->nc_time; + *tsp = ncp_ts->nc_time; if (ticksp != NULL) - *ticksp = ((struct namecache_ts *)ncp)->nc_ticks; + *ticksp = ncp_ts->nc_ticks; } static int __read_mostly doingcache = 1; /* 1 => enable the cache */ @@ -437,7 +428,7 @@ NCP2BUCKETLOCK(struct namecache *ncp) { uint32_t hash; - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, ncp->nc_dvp); + hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp); return (HASH2BUCKETLOCK(hash)); } @@ -823,7 +814,7 @@ cache_negative_zap_one(void) goto out_unlock_all; } SDT_PROBE3(vfs, namecache, shrink_negative, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_neghits); + ncp->nc_name, ncp->nc_neghits); cache_zap_locked(ncp, true); out_unlock_all: @@ -854,10 +845,10 @@ cache_zap_locked(struct namecache *ncp, bool neg_locke (ncp->nc_flag & NCF_NEGATIVE) ? NULL : ncp->nc_vp); if (!(ncp->nc_flag & NCF_NEGATIVE)) { SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_vp); + ncp->nc_name, ncp->nc_vp); } else { SDT_PROBE3(vfs, namecache, zap_negative, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_neghits); + ncp->nc_name, ncp->nc_neghits); } LIST_REMOVE(ncp, nc_hash); if (!(ncp->nc_flag & NCF_NEGATIVE)) { @@ -1130,6 +1121,7 @@ int cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) { + struct namecache_ts *ncp_ts; struct namecache *ncp; struct rwlock *blp; struct mtx *dvlp, *dvlp2; @@ -1197,9 +1189,10 @@ retry_dotdot: *vpp); cache_out_ts(ncp, tsp, ticksp); if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == - NCF_DTS && tsp != NULL) - *tsp = ((struct namecache_ts *)ncp)-> - nc_dotdottime; + NCF_DTS && tsp != NULL) { + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + *tsp = ncp_ts->nc_dotdottime; + } goto success; } } @@ -1211,7 +1204,7 @@ retry_dotdot: LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { counter_u64_add(numchecks, 1); if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && - !bcmp(nc_get_name(ncp), cnp->cn_nameptr, ncp->nc_nlen)) + !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) break; } @@ -1240,7 +1233,7 @@ retry_dotdot: *vpp = ncp->nc_vp; CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, *vpp); cache_out_ts(ncp, tsp, ticksp); goto success; @@ -1258,7 +1251,7 @@ negative_success: if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, - nc_get_name(ncp)); + ncp->nc_name); cache_out_ts(ncp, tsp, ticksp); cache_lookup_unlock(blp, dvlp); return (ENOENT); @@ -1531,7 +1524,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, { struct celockstate cel; struct namecache *ncp, *n2, *ndd; - struct namecache_ts *n3; + struct namecache_ts *ncp_ts, *n2_ts; struct nchashhead *ncpp; struct neglist *neglist; uint32_t hash; @@ -1622,18 +1615,18 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, ncp->nc_flag |= NCF_NEGATIVE; ncp->nc_dvp = dvp; if (tsp != NULL) { - n3 = (struct namecache_ts *)ncp; - n3->nc_time = *tsp; - n3->nc_ticks = ticks; - n3->nc_flag |= NCF_TS; + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + ncp_ts->nc_time = *tsp; + ncp_ts->nc_ticks = ticks; + ncp_ts->nc_nc.nc_flag |= NCF_TS; if (dtsp != NULL) { - n3->nc_dotdottime = *dtsp; - n3->nc_flag |= NCF_DTS; + ncp_ts->nc_dotdottime = *dtsp; + ncp_ts->nc_nc.nc_flag |= NCF_DTS; } } len = ncp->nc_nlen = cnp->cn_namelen; hash = cache_get_hash(cnp->cn_nameptr, len, dvp); - strlcpy(nc_get_name(ncp), cnp->cn_nameptr, len + 1); + strlcpy(ncp->nc_name, cnp->cn_nameptr, len + 1); cache_enter_lock(&cel, dvp, vp, hash); /* @@ -1645,22 +1638,18 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, LIST_FOREACH(n2, ncpp, nc_hash) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && - !bcmp(nc_get_name(n2), cnp->cn_nameptr, n2->nc_nlen)) { + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { if (tsp != NULL) { KASSERT((n2->nc_flag & NCF_TS) != 0, ("no NCF_TS")); - n3 = (struct namecache_ts *)n2; - n3->nc_time = - ((struct namecache_ts *)ncp)->nc_time; - n3->nc_ticks = - ((struct namecache_ts *)ncp)->nc_ticks; + n2_ts = __containerof(n2, struct namecache_ts, nc_nc); + n2_ts->nc_time = ncp_ts->nc_time; + n2_ts->nc_ticks = ncp_ts->nc_ticks; if (dtsp != NULL) { - n3->nc_dotdottime = - ((struct namecache_ts *)ncp)-> - nc_dotdottime; + n2_ts->nc_dotdottime = ncp_ts->nc_dotdottime; if (ncp->nc_flag & NCF_NEGATIVE) mtx_lock(&ncneg_hot.nl_lock); - n3->nc_flag |= NCF_DTS; + n2_ts->nc_nc.nc_flag |= NCF_DTS; if (ncp->nc_flag & NCF_NEGATIVE) mtx_unlock(&ncneg_hot.nl_lock); } @@ -1724,14 +1713,14 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, */ if (vp != NULL) { TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); - SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp), + SDT_PROBE3(vfs, namecache, enter, done, dvp, ncp->nc_name, vp); } else { if (cnp->cn_flags & ISWHITEOUT) ncp->nc_flag |= NCF_WHITE; cache_negative_insert(ncp, false); SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, - nc_get_name(ncp)); + ncp->nc_name); } cache_enter_unlock(&cel); if (numneg * ncnegfactor > numcache) @@ -1853,7 +1842,7 @@ cache_changesize(int newmaxvnodes) nchash = new_nchash; for (i = 0; i <= old_nchash; i++) { while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, + hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp); LIST_REMOVE(ncp, nc_hash); LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); @@ -2180,9 +2169,9 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char return (error); } *buflen -= ncp->nc_nlen; - memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen); + memcpy(buf + *buflen, ncp->nc_name, ncp->nc_nlen); SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp, - nc_get_name(ncp), vp); + ncp->nc_name, vp); dvp = *vp; *vp = ncp->nc_dvp; vref(*vp); @@ -2364,7 +2353,7 @@ vn_commname(struct vnode *vp, char *buf, u_int buflen) return (ENOENT); } l = min(ncp->nc_nlen, buflen - 1); - memcpy(buf, nc_get_name(ncp), l); + memcpy(buf, ncp->nc_name, l); mtx_unlock(vlp); buf[l] = '\0'; return (0); From owner-svn-src-head@freebsd.org Sun Sep 10 11:57:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86189E0C80D; Sun, 10 Sep 2017 11:57:03 +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 5085270305; Sun, 10 Sep 2017 11:57:03 +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 v8ABv2Iw083868; Sun, 10 Sep 2017 11:57:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8ABv2B9083867; Sun, 10 Sep 2017 11:57:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709101157.v8ABv2B9083867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 Sep 2017 11:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323386 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 323386 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 11:57:03 -0000 Author: kib Date: Sun Sep 10 11:57:02 2017 New Revision: 323386 URL: https://svnweb.freebsd.org/changeset/base/323386 Log: Style: tab after #define. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Sun Sep 10 11:17:32 2017 (r323385) +++ head/sys/dev/ichwd/ichwd.h Sun Sep 10 11:57:02 2017 (r323386) @@ -29,7 +29,7 @@ */ #ifndef _ICHWD_H_ -#define _ICHWD_H_ +#define _ICHWD_H_ struct ichwd_device { uint16_t device; @@ -60,279 +60,279 @@ struct ichwd_softc { eventhandler_tag ev_tag; }; -#define VENDORID_INTEL 0x8086 -#define DEVICEID_BAYTRAIL 0x0f1c -#define DEVICEID_CPT0 0x1c40 -#define DEVICEID_CPT1 0x1c41 -#define DEVICEID_CPT2 0x1c42 -#define DEVICEID_CPT3 0x1c43 -#define DEVICEID_CPT4 0x1c44 -#define DEVICEID_CPT5 0x1c45 -#define DEVICEID_CPT6 0x1c46 -#define DEVICEID_CPT7 0x1c47 -#define DEVICEID_CPT8 0x1c48 -#define DEVICEID_CPT9 0x1c49 -#define DEVICEID_CPT10 0x1c4a -#define DEVICEID_CPT11 0x1c4b -#define DEVICEID_CPT12 0x1c4c -#define DEVICEID_CPT13 0x1c4d -#define DEVICEID_CPT14 0x1c4e -#define DEVICEID_CPT15 0x1c4f -#define DEVICEID_CPT16 0x1c50 -#define DEVICEID_CPT17 0x1c51 -#define DEVICEID_CPT18 0x1c52 -#define DEVICEID_CPT19 0x1c53 -#define DEVICEID_CPT20 0x1c54 -#define DEVICEID_CPT21 0x1c55 -#define DEVICEID_CPT22 0x1c56 -#define DEVICEID_CPT23 0x1c57 -#define DEVICEID_CPT24 0x1c58 -#define DEVICEID_CPT25 0x1c59 -#define DEVICEID_CPT26 0x1c5a -#define DEVICEID_CPT27 0x1c5b -#define DEVICEID_CPT28 0x1c5c -#define DEVICEID_CPT29 0x1c5d -#define DEVICEID_CPT30 0x1c5e -#define DEVICEID_CPT31 0x1c5f -#define DEVICEID_PATSBURG_LPC1 0x1d40 -#define DEVICEID_PATSBURG_LPC2 0x1d41 -#define DEVICEID_PPT0 0x1e40 -#define DEVICEID_PPT1 0x1e41 -#define DEVICEID_PPT2 0x1e42 -#define DEVICEID_PPT3 0x1e43 -#define DEVICEID_PPT4 0x1e44 -#define DEVICEID_PPT5 0x1e45 -#define DEVICEID_PPT6 0x1e46 -#define DEVICEID_PPT7 0x1e47 -#define DEVICEID_PPT8 0x1e48 -#define DEVICEID_PPT9 0x1e49 -#define DEVICEID_PPT10 0x1e4a -#define DEVICEID_PPT11 0x1e4b -#define DEVICEID_PPT12 0x1e4c -#define DEVICEID_PPT13 0x1e4d -#define DEVICEID_PPT14 0x1e4e -#define DEVICEID_PPT15 0x1e4f -#define DEVICEID_PPT16 0x1e50 -#define DEVICEID_PPT17 0x1e51 -#define DEVICEID_PPT18 0x1e52 -#define DEVICEID_PPT19 0x1e53 -#define DEVICEID_PPT20 0x1e54 -#define DEVICEID_PPT21 0x1e55 -#define DEVICEID_PPT22 0x1e56 -#define DEVICEID_PPT23 0x1e57 -#define DEVICEID_PPT24 0x1e58 -#define DEVICEID_PPT25 0x1e59 -#define DEVICEID_PPT26 0x1e5a -#define DEVICEID_PPT27 0x1e5b -#define DEVICEID_PPT28 0x1e5c -#define DEVICEID_PPT29 0x1e5d -#define DEVICEID_PPT30 0x1e5e -#define DEVICEID_PPT31 0x1e5f -#define DEVICEID_AVN0 0x1f38 -#define DEVICEID_AVN1 0x1f39 -#define DEVICEID_AVN2 0x1f3a -#define DEVICEID_AVN3 0x1f3b -#define DEVICEID_BRASWELL 0x229c -#define DEVICEID_DH89XXCC_LPC 0x2310 -#define DEVICEID_COLETOCRK_LPC 0x2390 -#define DEVICEID_82801AA 0x2410 -#define DEVICEID_82801AB 0x2420 -#define DEVICEID_82801BA 0x2440 -#define DEVICEID_82801BAM 0x244c -#define DEVICEID_82801CA 0x2480 -#define DEVICEID_82801CAM 0x248c -#define DEVICEID_82801DB 0x24c0 -#define DEVICEID_82801DBM 0x24cc -#define DEVICEID_82801E 0x2450 -#define DEVICEID_82801EB 0x24dc -#define DEVICEID_82801EBR 0x24d0 -#define DEVICEID_6300ESB 0x25a1 -#define DEVICEID_82801FBR 0x2640 -#define DEVICEID_ICH6M 0x2641 -#define DEVICEID_ICH6W 0x2642 -#define DEVICEID_63XXESB 0x2670 -#define DEVICEID_ICH7 0x27b8 -#define DEVICEID_ICH7DH 0x27b0 -#define DEVICEID_ICH7M 0x27b9 -#define DEVICEID_NM10 0x27bc -#define DEVICEID_ICH7MDH 0x27bd -#define DEVICEID_ICH8 0x2810 -#define DEVICEID_ICH8DH 0x2812 -#define DEVICEID_ICH8DO 0x2814 -#define DEVICEID_ICH8M 0x2815 -#define DEVICEID_ICH8ME 0x2811 -#define DEVICEID_ICH9 0x2918 -#define DEVICEID_ICH9DH 0x2912 -#define DEVICEID_ICH9DO 0x2914 -#define DEVICEID_ICH9M 0x2919 -#define DEVICEID_ICH9ME 0x2917 -#define DEVICEID_ICH9R 0x2916 -#define DEVICEID_ICH10 0x3a18 -#define DEVICEID_ICH10D 0x3a1a -#define DEVICEID_ICH10DO 0x3a14 -#define DEVICEID_ICH10R 0x3a16 -#define DEVICEID_PCH 0x3b00 -#define DEVICEID_PCHM 0x3b01 -#define DEVICEID_P55 0x3b02 -#define DEVICEID_PM55 0x3b03 -#define DEVICEID_H55 0x3b06 -#define DEVICEID_QM57 0x3b07 -#define DEVICEID_H57 0x3b08 -#define DEVICEID_HM55 0x3b09 -#define DEVICEID_Q57 0x3b0a -#define DEVICEID_HM57 0x3b0b -#define DEVICEID_PCHMSFF 0x3b0d -#define DEVICEID_QS57 0x3b0f -#define DEVICEID_3400 0x3b12 -#define DEVICEID_3420 0x3b14 -#define DEVICEID_3450 0x3b16 -#define DEVICEID_LPT0 0x8c40 -#define DEVICEID_LPT1 0x8c41 -#define DEVICEID_LPT2 0x8c42 -#define DEVICEID_LPT3 0x8c43 -#define DEVICEID_LPT4 0x8c44 -#define DEVICEID_LPT5 0x8c45 -#define DEVICEID_LPT6 0x8c46 -#define DEVICEID_LPT7 0x8c47 -#define DEVICEID_LPT8 0x8c48 -#define DEVICEID_LPT9 0x8c49 -#define DEVICEID_LPT10 0x8c4a -#define DEVICEID_LPT11 0x8c4b -#define DEVICEID_LPT12 0x8c4c -#define DEVICEID_LPT13 0x8c4d -#define DEVICEID_LPT14 0x8c4e -#define DEVICEID_LPT15 0x8c4f -#define DEVICEID_LPT16 0x8c50 -#define DEVICEID_LPT17 0x8c51 -#define DEVICEID_LPT18 0x8c52 -#define DEVICEID_LPT19 0x8c53 -#define DEVICEID_LPT20 0x8c54 -#define DEVICEID_LPT21 0x8c55 -#define DEVICEID_LPT22 0x8c56 -#define DEVICEID_LPT23 0x8c57 -#define DEVICEID_LPT24 0x8c58 -#define DEVICEID_LPT25 0x8c59 -#define DEVICEID_LPT26 0x8c5a -#define DEVICEID_LPT27 0x8c5b -#define DEVICEID_LPT28 0x8c5c -#define DEVICEID_LPT29 0x8c5d -#define DEVICEID_LPT30 0x8c5e -#define DEVICEID_LPT31 0x8c5f -#define DEVICEID_WCPT1 0x8cc1 -#define DEVICEID_WCPT2 0x8cc2 -#define DEVICEID_WCPT3 0x8cc3 -#define DEVICEID_WCPT4 0x8cc4 -#define DEVICEID_WCPT6 0x8cc6 -#define DEVICEID_WBG0 0x8d40 -#define DEVICEID_WBG1 0x8d41 -#define DEVICEID_WBG2 0x8d42 -#define DEVICEID_WBG3 0x8d43 -#define DEVICEID_WBG4 0x8d44 -#define DEVICEID_WBG5 0x8d45 -#define DEVICEID_WBG6 0x8d46 -#define DEVICEID_WBG7 0x8d47 -#define DEVICEID_WBG8 0x8d48 -#define DEVICEID_WBG9 0x8d49 -#define DEVICEID_WBG10 0x8d4a -#define DEVICEID_WBG11 0x8d4b -#define DEVICEID_WBG12 0x8d4c -#define DEVICEID_WBG13 0x8d4d -#define DEVICEID_WBG14 0x8d4e -#define DEVICEID_WBG15 0x8d4f -#define DEVICEID_WBG16 0x8d50 -#define DEVICEID_WBG17 0x8d51 -#define DEVICEID_WBG18 0x8d52 -#define DEVICEID_WBG19 0x8d53 -#define DEVICEID_WBG20 0x8d54 -#define DEVICEID_WBG21 0x8d55 -#define DEVICEID_WBG22 0x8d56 -#define DEVICEID_WBG23 0x8d57 -#define DEVICEID_WBG24 0x8d58 -#define DEVICEID_WBG25 0x8d59 -#define DEVICEID_WBG26 0x8d5a -#define DEVICEID_WBG27 0x8d5b -#define DEVICEID_WBG28 0x8d5c -#define DEVICEID_WBG29 0x8d5d -#define DEVICEID_WBG30 0x8d5e -#define DEVICEID_WBG31 0x8d5f -#define DEVICEID_LPT_LP0 0x9c40 -#define DEVICEID_LPT_LP1 0x9c41 -#define DEVICEID_LPT_LP2 0x9c42 -#define DEVICEID_LPT_LP3 0x9c43 -#define DEVICEID_LPT_LP4 0x9c44 -#define DEVICEID_LPT_LP5 0x9c45 -#define DEVICEID_LPT_LP6 0x9c46 -#define DEVICEID_LPT_LP7 0x9c47 -#define DEVICEID_WCPT_LP1 0x9cc1 -#define DEVICEID_WCPT_LP2 0x9cc2 -#define DEVICEID_WCPT_LP3 0x9cc3 -#define DEVICEID_WCPT_LP5 0x9cc5 -#define DEVICEID_WCPT_LP6 0x9cc6 -#define DEVICEID_WCPT_LP7 0x9cc7 -#define DEVICEID_WCPT_LP9 0x9cc9 +#define VENDORID_INTEL 0x8086 +#define DEVICEID_BAYTRAIL 0x0f1c +#define DEVICEID_CPT0 0x1c40 +#define DEVICEID_CPT1 0x1c41 +#define DEVICEID_CPT2 0x1c42 +#define DEVICEID_CPT3 0x1c43 +#define DEVICEID_CPT4 0x1c44 +#define DEVICEID_CPT5 0x1c45 +#define DEVICEID_CPT6 0x1c46 +#define DEVICEID_CPT7 0x1c47 +#define DEVICEID_CPT8 0x1c48 +#define DEVICEID_CPT9 0x1c49 +#define DEVICEID_CPT10 0x1c4a +#define DEVICEID_CPT11 0x1c4b +#define DEVICEID_CPT12 0x1c4c +#define DEVICEID_CPT13 0x1c4d +#define DEVICEID_CPT14 0x1c4e +#define DEVICEID_CPT15 0x1c4f +#define DEVICEID_CPT16 0x1c50 +#define DEVICEID_CPT17 0x1c51 +#define DEVICEID_CPT18 0x1c52 +#define DEVICEID_CPT19 0x1c53 +#define DEVICEID_CPT20 0x1c54 +#define DEVICEID_CPT21 0x1c55 +#define DEVICEID_CPT22 0x1c56 +#define DEVICEID_CPT23 0x1c57 +#define DEVICEID_CPT24 0x1c58 +#define DEVICEID_CPT25 0x1c59 +#define DEVICEID_CPT26 0x1c5a +#define DEVICEID_CPT27 0x1c5b +#define DEVICEID_CPT28 0x1c5c +#define DEVICEID_CPT29 0x1c5d +#define DEVICEID_CPT30 0x1c5e +#define DEVICEID_CPT31 0x1c5f +#define DEVICEID_PATSBURG_LPC1 0x1d40 +#define DEVICEID_PATSBURG_LPC2 0x1d41 +#define DEVICEID_PPT0 0x1e40 +#define DEVICEID_PPT1 0x1e41 +#define DEVICEID_PPT2 0x1e42 +#define DEVICEID_PPT3 0x1e43 +#define DEVICEID_PPT4 0x1e44 +#define DEVICEID_PPT5 0x1e45 +#define DEVICEID_PPT6 0x1e46 +#define DEVICEID_PPT7 0x1e47 +#define DEVICEID_PPT8 0x1e48 +#define DEVICEID_PPT9 0x1e49 +#define DEVICEID_PPT10 0x1e4a +#define DEVICEID_PPT11 0x1e4b +#define DEVICEID_PPT12 0x1e4c +#define DEVICEID_PPT13 0x1e4d +#define DEVICEID_PPT14 0x1e4e +#define DEVICEID_PPT15 0x1e4f +#define DEVICEID_PPT16 0x1e50 +#define DEVICEID_PPT17 0x1e51 +#define DEVICEID_PPT18 0x1e52 +#define DEVICEID_PPT19 0x1e53 +#define DEVICEID_PPT20 0x1e54 +#define DEVICEID_PPT21 0x1e55 +#define DEVICEID_PPT22 0x1e56 +#define DEVICEID_PPT23 0x1e57 +#define DEVICEID_PPT24 0x1e58 +#define DEVICEID_PPT25 0x1e59 +#define DEVICEID_PPT26 0x1e5a +#define DEVICEID_PPT27 0x1e5b +#define DEVICEID_PPT28 0x1e5c +#define DEVICEID_PPT29 0x1e5d +#define DEVICEID_PPT30 0x1e5e +#define DEVICEID_PPT31 0x1e5f +#define DEVICEID_AVN0 0x1f38 +#define DEVICEID_AVN1 0x1f39 +#define DEVICEID_AVN2 0x1f3a +#define DEVICEID_AVN3 0x1f3b +#define DEVICEID_BRASWELL 0x229c +#define DEVICEID_DH89XXCC_LPC 0x2310 +#define DEVICEID_COLETOCRK_LPC 0x2390 +#define DEVICEID_82801AA 0x2410 +#define DEVICEID_82801AB 0x2420 +#define DEVICEID_82801BA 0x2440 +#define DEVICEID_82801BAM 0x244c +#define DEVICEID_82801CA 0x2480 +#define DEVICEID_82801CAM 0x248c +#define DEVICEID_82801DB 0x24c0 +#define DEVICEID_82801DBM 0x24cc +#define DEVICEID_82801E 0x2450 +#define DEVICEID_82801EB 0x24dc +#define DEVICEID_82801EBR 0x24d0 +#define DEVICEID_6300ESB 0x25a1 +#define DEVICEID_82801FBR 0x2640 +#define DEVICEID_ICH6M 0x2641 +#define DEVICEID_ICH6W 0x2642 +#define DEVICEID_63XXESB 0x2670 +#define DEVICEID_ICH7 0x27b8 +#define DEVICEID_ICH7DH 0x27b0 +#define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc +#define DEVICEID_ICH7MDH 0x27bd +#define DEVICEID_ICH8 0x2810 +#define DEVICEID_ICH8DH 0x2812 +#define DEVICEID_ICH8DO 0x2814 +#define DEVICEID_ICH8M 0x2815 +#define DEVICEID_ICH8ME 0x2811 +#define DEVICEID_ICH9 0x2918 +#define DEVICEID_ICH9DH 0x2912 +#define DEVICEID_ICH9DO 0x2914 +#define DEVICEID_ICH9M 0x2919 +#define DEVICEID_ICH9ME 0x2917 +#define DEVICEID_ICH9R 0x2916 +#define DEVICEID_ICH10 0x3a18 +#define DEVICEID_ICH10D 0x3a1a +#define DEVICEID_ICH10DO 0x3a14 +#define DEVICEID_ICH10R 0x3a16 +#define DEVICEID_PCH 0x3b00 +#define DEVICEID_PCHM 0x3b01 +#define DEVICEID_P55 0x3b02 +#define DEVICEID_PM55 0x3b03 +#define DEVICEID_H55 0x3b06 +#define DEVICEID_QM57 0x3b07 +#define DEVICEID_H57 0x3b08 +#define DEVICEID_HM55 0x3b09 +#define DEVICEID_Q57 0x3b0a +#define DEVICEID_HM57 0x3b0b +#define DEVICEID_PCHMSFF 0x3b0d +#define DEVICEID_QS57 0x3b0f +#define DEVICEID_3400 0x3b12 +#define DEVICEID_3420 0x3b14 +#define DEVICEID_3450 0x3b16 +#define DEVICEID_LPT0 0x8c40 +#define DEVICEID_LPT1 0x8c41 +#define DEVICEID_LPT2 0x8c42 +#define DEVICEID_LPT3 0x8c43 +#define DEVICEID_LPT4 0x8c44 +#define DEVICEID_LPT5 0x8c45 +#define DEVICEID_LPT6 0x8c46 +#define DEVICEID_LPT7 0x8c47 +#define DEVICEID_LPT8 0x8c48 +#define DEVICEID_LPT9 0x8c49 +#define DEVICEID_LPT10 0x8c4a +#define DEVICEID_LPT11 0x8c4b +#define DEVICEID_LPT12 0x8c4c +#define DEVICEID_LPT13 0x8c4d +#define DEVICEID_LPT14 0x8c4e +#define DEVICEID_LPT15 0x8c4f +#define DEVICEID_LPT16 0x8c50 +#define DEVICEID_LPT17 0x8c51 +#define DEVICEID_LPT18 0x8c52 +#define DEVICEID_LPT19 0x8c53 +#define DEVICEID_LPT20 0x8c54 +#define DEVICEID_LPT21 0x8c55 +#define DEVICEID_LPT22 0x8c56 +#define DEVICEID_LPT23 0x8c57 +#define DEVICEID_LPT24 0x8c58 +#define DEVICEID_LPT25 0x8c59 +#define DEVICEID_LPT26 0x8c5a +#define DEVICEID_LPT27 0x8c5b +#define DEVICEID_LPT28 0x8c5c +#define DEVICEID_LPT29 0x8c5d +#define DEVICEID_LPT30 0x8c5e +#define DEVICEID_LPT31 0x8c5f +#define DEVICEID_WCPT1 0x8cc1 +#define DEVICEID_WCPT2 0x8cc2 +#define DEVICEID_WCPT3 0x8cc3 +#define DEVICEID_WCPT4 0x8cc4 +#define DEVICEID_WCPT6 0x8cc6 +#define DEVICEID_WBG0 0x8d40 +#define DEVICEID_WBG1 0x8d41 +#define DEVICEID_WBG2 0x8d42 +#define DEVICEID_WBG3 0x8d43 +#define DEVICEID_WBG4 0x8d44 +#define DEVICEID_WBG5 0x8d45 +#define DEVICEID_WBG6 0x8d46 +#define DEVICEID_WBG7 0x8d47 +#define DEVICEID_WBG8 0x8d48 +#define DEVICEID_WBG9 0x8d49 +#define DEVICEID_WBG10 0x8d4a +#define DEVICEID_WBG11 0x8d4b +#define DEVICEID_WBG12 0x8d4c +#define DEVICEID_WBG13 0x8d4d +#define DEVICEID_WBG14 0x8d4e +#define DEVICEID_WBG15 0x8d4f +#define DEVICEID_WBG16 0x8d50 +#define DEVICEID_WBG17 0x8d51 +#define DEVICEID_WBG18 0x8d52 +#define DEVICEID_WBG19 0x8d53 +#define DEVICEID_WBG20 0x8d54 +#define DEVICEID_WBG21 0x8d55 +#define DEVICEID_WBG22 0x8d56 +#define DEVICEID_WBG23 0x8d57 +#define DEVICEID_WBG24 0x8d58 +#define DEVICEID_WBG25 0x8d59 +#define DEVICEID_WBG26 0x8d5a +#define DEVICEID_WBG27 0x8d5b +#define DEVICEID_WBG28 0x8d5c +#define DEVICEID_WBG29 0x8d5d +#define DEVICEID_WBG30 0x8d5e +#define DEVICEID_WBG31 0x8d5f +#define DEVICEID_LPT_LP0 0x9c40 +#define DEVICEID_LPT_LP1 0x9c41 +#define DEVICEID_LPT_LP2 0x9c42 +#define DEVICEID_LPT_LP3 0x9c43 +#define DEVICEID_LPT_LP4 0x9c44 +#define DEVICEID_LPT_LP5 0x9c45 +#define DEVICEID_LPT_LP6 0x9c46 +#define DEVICEID_LPT_LP7 0x9c47 +#define DEVICEID_WCPT_LP1 0x9cc1 +#define DEVICEID_WCPT_LP2 0x9cc2 +#define DEVICEID_WCPT_LP3 0x9cc3 +#define DEVICEID_WCPT_LP5 0x9cc5 +#define DEVICEID_WCPT_LP6 0x9cc6 +#define DEVICEID_WCPT_LP7 0x9cc7 +#define DEVICEID_WCPT_LP9 0x9cc9 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ -#define ICH_GEN_STA 0xd4 -#define ICH_GEN_STA_NO_REBOOT 0x02 -#define ICH_PMBASE 0x40 /* ACPI base address register */ -#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ +#define ICH_GEN_STA 0xd4 +#define ICH_GEN_STA_NO_REBOOT 0x02 +#define ICH_PMBASE 0x40 /* ACPI base address register */ +#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ /* ICH Chipset Configuration Registers (ICH6 and newer) */ -#define ICH_RCBA 0xf0 -#define ICH_GCS_OFFSET 0x3410 -#define ICH_GCS_SIZE 0x4 -#define ICH_GCS_NO_REBOOT 0x20 +#define ICH_RCBA 0xf0 +#define ICH_GCS_OFFSET 0x3410 +#define ICH_GCS_SIZE 0x4 +#define ICH_GCS_NO_REBOOT 0x20 /* SoC Power Management Configuration Registers */ -#define ICH_PBASE 0x44 -#define ICH_PMC_OFFSET 0x08 -#define ICH_PMC_SIZE 0x4 -#define ICH_PMC_NO_REBOOT 0x10 +#define ICH_PBASE 0x44 +#define ICH_PMC_OFFSET 0x08 +#define ICH_PMC_SIZE 0x4 +#define ICH_PMC_NO_REBOOT 0x10 /* register names and locations (relative to PMBASE) */ -#define SMI_BASE 0x30 /* base address for SMI registers */ -#define SMI_LEN 0x08 -#define SMI_EN 0x00 /* SMI Control and Enable Register */ -#define SMI_STS 0x04 /* SMI Status Register */ -#define TCO_BASE 0x60 /* base address for TCO registers */ -#define TCO_LEN 0x20 -#define TCO_RLD 0x00 /* TCO Reload and Current Value */ -#define TCO_TMR1 0x01 /* TCO Timer Initial Value +#define SMI_BASE 0x30 /* base address for SMI registers */ +#define SMI_LEN 0x08 +#define SMI_EN 0x00 /* SMI Control and Enable Register */ +#define SMI_STS 0x04 /* SMI Status Register */ +#define TCO_BASE 0x60 /* base address for TCO registers */ +#define TCO_LEN 0x20 +#define TCO_RLD 0x00 /* TCO Reload and Current Value */ +#define TCO_TMR1 0x01 /* TCO Timer Initial Value (ICH5 and older, 8 bits) */ -#define TCO_TMR2 0x12 /* TCO Timer Initial Value +#define TCO_TMR2 0x12 /* TCO Timer Initial Value (ICH6 and newer, 16 bits) */ -#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ -#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ -#define TCO1_STS 0x04 /* TCO Status 1 */ -#define TCO2_STS 0x06 /* TCO Status 2 */ -#define TCO1_CNT 0x08 /* TCO Control 1 */ -#define TCO2_CNT 0x08 /* TCO Control 2 */ -#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ -#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ +#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ +#define TCO1_STS 0x04 /* TCO Status 1 */ +#define TCO2_STS 0x06 /* TCO Status 2 */ +#define TCO1_CNT 0x08 /* TCO Control 1 */ +#define TCO2_CNT 0x08 /* TCO Control 2 */ +#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ +#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ /* bit definitions for SMI_EN and SMI_STS */ -#define SMI_TCO_EN 0x2000 -#define SMI_TCO_STS 0x2000 -#define SMI_GBL_EN 0x0001 +#define SMI_TCO_EN 0x2000 +#define SMI_TCO_STS 0x2000 +#define SMI_GBL_EN 0x0001 /* timer value mask for TCO_RLD and TCO_TMR */ -#define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK 0x1f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ +#define TCO_TIMEOUT 0x08 /* timed out */ +#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ /* control bits for TCO1_CNT */ -#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ -#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ -#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ -#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ +#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ +#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ +#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ /* * Masks for the TCO timer value field in TCO_RLD. @@ -341,13 +341,13 @@ struct ichwd_softc { * I suspect this is a bug in the ICH5 datasheet and that the minimum is * uniformly 2, but I'd rather err on the side of caution. */ -#define TCO_RLD_TMR_MIN 0x0004 -#define TCO_RLD1_TMR_MAX 0x003f -#define TCO_RLD2_TMR_MAX 0x03ff +#define TCO_RLD_TMR_MIN 0x0004 +#define TCO_RLD1_TMR_MAX 0x003f +#define TCO_RLD2_TMR_MAX 0x03ff /* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ -#define ICHWD_TICK 600000000 +#define ICHWD_TICK 600000000 /* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ -#define ICHWD_TCO_V3_TICK 1000000000 +#define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-head@freebsd.org Sun Sep 10 12:10:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6443CE0D874; Sun, 10 Sep 2017 12:10:28 +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 3D52C70B53; Sun, 10 Sep 2017 12:10:28 +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 v8ACAROH088256; Sun, 10 Sep 2017 12:10:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8ACARaH088255; Sun, 10 Sep 2017 12:10:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709101210.v8ACARaH088255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 Sep 2017 12:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323387 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 323387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 12:10:28 -0000 Author: kib Date: Sun Sep 10 12:10:27 2017 New Revision: 323387 URL: https://svnweb.freebsd.org/changeset/base/323387 Log: Add definitions of (new) bits for TCO registers from the Lewisburg/Sunrise Point documentation. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Sun Sep 10 11:57:02 2017 (r323386) +++ head/sys/dev/ichwd/ichwd.h Sun Sep 10 12:10:27 2017 (r323387) @@ -309,6 +309,8 @@ struct ichwd_softc { #define TCO2_CNT 0x08 /* TCO Control 2 */ #define TCO_MESSAGE1 0x0c /* TCO Message 1 */ #define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_WDSTATUS 0x0e /* TCO Watchdog status */ +#define TCO_TMR 0x12 /* TCP Reload value */ /* bit definitions for SMI_EN and SMI_STS */ #define SMI_TCO_EN 0x2000 @@ -317,23 +319,45 @@ struct ichwd_softc { /* timer value mask for TCO_RLD and TCO_TMR */ #define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK2 0x2f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_SLVSEL 0x2000 /* TCO Slave Select Soft Strap */ +#define TCO_CPUSERR_STS 0x1000 +#define TCO_CPUSMI_STS 0x0400 +#define TCO_CPUSCI_STS 0x0200 +#define TCO_BIOSWR_STS 0x0100 +#define TCO_NEWCENTURY 0x0080 /* set for RTC year roll over + (99 to 00) */ +#define TCO_TIMEOUT 0x0008 /* timed out */ +#define TCO_INT_STS 0x0004 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x0002 /* data in (DO NOT USE) */ +#define TCO_NMI2SMI_STS 0x0001 /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_SMLINK_SLAVE_SMI 0x0010 +#define TCO_BOOT_STS 0x0004 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x0002 /* ran down twice */ +#define TCO_INTRD_DET 0x0001 /* control bits for TCO1_CNT */ +#define TCO_LOCK 0x1000 /* SMI_BASE.TCO_EN locked */ #define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ #define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ #define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ #define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +/* control bits for TCO2_CNT */ +#define TCO_OS_POLICY 0x0030 /* mask */ +#define TC0_OS_POLICY_BOOT 0x0000 +#define TCO_OS_POLICY_SHUTD 0x0010 +#define TCO_OS_POLICY_NOLOAD 0x0020 +#define TCO_SMB_ALERT_DISABLE 0x0008 +#define TCO_INTRD_SEL 0x0003 /* mask */ +#define TCO_INTRD_SEL_SILENT 0x0000 +#define TCO_INTRD_SEL_INTR 0x0001 +#define TCO_INTRD_SEL_SMI 0x0002 + /* * Masks for the TCO timer value field in TCO_RLD. * If the datasheets are to be believed, the minimum value actually varies @@ -345,9 +369,15 @@ struct ichwd_softc { #define TCO_RLD1_TMR_MAX 0x003f #define TCO_RLD2_TMR_MAX 0x03ff -/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 0.6 sec) + * for TCO v1/v2/v4 + */ #define ICHWD_TICK 600000000 -/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 1.0 sec) + * for TCO v3 + */ #define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-head@freebsd.org Sun Sep 10 13:21:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5580CE10CCF; Sun, 10 Sep 2017 13:21:56 +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 1FE0574170; Sun, 10 Sep 2017 13:21:56 +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 v8ADLtaP020486; Sun, 10 Sep 2017 13:21:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8ADLtFm020485; Sun, 10 Sep 2017 13:21:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709101321.v8ADLtFm020485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 Sep 2017 13:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323388 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 323388 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 13:21:56 -0000 Author: kib Date: Sun Sep 10 13:21:54 2017 New Revision: 323388 URL: https://svnweb.freebsd.org/changeset/base/323388 Log: Fix typo, TC0->TCO. Submitted by: jhb MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Sun Sep 10 12:10:27 2017 (r323387) +++ head/sys/dev/ichwd/ichwd.h Sun Sep 10 13:21:54 2017 (r323388) @@ -349,7 +349,7 @@ struct ichwd_softc { /* control bits for TCO2_CNT */ #define TCO_OS_POLICY 0x0030 /* mask */ -#define TC0_OS_POLICY_BOOT 0x0000 +#define TCO_OS_POLICY_BOOT 0x0000 #define TCO_OS_POLICY_SHUTD 0x0010 #define TCO_OS_POLICY_NOLOAD 0x0020 #define TCO_SMB_ALERT_DISABLE 0x0008 From owner-svn-src-head@freebsd.org Sun Sep 10 13:53:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7ED0E1242D; Sun, 10 Sep 2017 13:53:44 +0000 (UTC) (envelope-from tsoome@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 7B42E750BC; Sun, 10 Sep 2017 13:53:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8ADrhlO036355; Sun, 10 Sep 2017 13:53:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8ADrhUO036350; Sun, 10 Sep 2017 13:53:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709101353.v8ADrhUO036350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 10 Sep 2017 13:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323389 - in head/sys/boot/efi: include libefi loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi loader X-SVN-Commit-Revision: 323389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 13:53:44 -0000 Author: tsoome Date: Sun Sep 10 13:53:42 2017 New Revision: 323389 URL: https://svnweb.freebsd.org/changeset/base/323389 Log: loader.efi: chain loader should provide proper device handle Since the efipart rewrite, the chain command was looking for device handle using interface applicable only for net devices. Disk partitions and zfs pools need their own approach to find the proper handle. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D12287 Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/include/efizfs.h head/sys/boot/efi/libefi/efipart.c head/sys/boot/efi/libefi/efizfs.c head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Sun Sep 10 13:21:54 2017 (r323388) +++ head/sys/boot/efi/include/efilib.h Sun Sep 10 13:53:42 2017 (r323389) @@ -61,6 +61,7 @@ typedef struct pdinfo } pdinfo_t; pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); +pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); void *efi_get_table(EFI_GUID *tbl); Modified: head/sys/boot/efi/include/efizfs.h ============================================================================== --- head/sys/boot/efi/include/efizfs.h Sun Sep 10 13:21:54 2017 (r323388) +++ head/sys/boot/efi/include/efizfs.h Sun Sep 10 13:53:42 2017 (r323389) @@ -45,6 +45,7 @@ extern uint64_t pool_guid; extern void efi_zfs_probe(void); extern zfsinfo_list_t *efizfs_get_zfsinfo_list(void); +extern EFI_HANDLE efizfs_get_handle_by_guid(uint64_t); #endif Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Sun Sep 10 13:21:54 2017 (r323388) +++ head/sys/boot/efi/libefi/efipart.c Sun Sep 10 13:53:42 2017 (r323389) @@ -101,16 +101,33 @@ static pdinfo_list_t hdinfo; static EFI_HANDLE *efipart_handles = NULL; static UINTN efipart_nhandles = 0; -static pdinfo_t * -efiblk_get_pdinfo(pdinfo_list_t *pdi, int unit) +pdinfo_list_t * +efiblk_get_pdinfo_list(struct devsw *dev) { - pdinfo_t *pd; + if (dev->dv_type == DEVT_DISK) + return (&hdinfo); + if (dev->dv_type == DEVT_CD) + return (&cdinfo); + if (dev->dv_type == DEVT_FD) + return (&fdinfo); + return (NULL); +} +pdinfo_t * +efiblk_get_pdinfo(struct devdesc *dev) +{ + pdinfo_list_t *pdi; + pdinfo_t *pd = NULL; + + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (pd); + STAILQ_FOREACH(pd, pdi, pd_link) { - if (pd->pd_unit == unit) + if (pd->pd_unit == dev->d_unit) return (pd); } - return (NULL); + return (pd); } static int @@ -671,24 +688,11 @@ efipart_printhd(int verbose) return (efipart_print_common(&efipart_hddev, &hdinfo, verbose)); } -pdinfo_list_t * -efiblk_get_pdinfo_list(struct devsw *dev) -{ - if (dev->dv_type == DEVT_DISK) - return (&hdinfo); - if (dev->dv_type == DEVT_CD) - return (&cdinfo); - if (dev->dv_type == DEVT_FD) - return (&fdinfo); - return (NULL); -} - static int efipart_open(struct open_file *f, ...) { va_list args; struct disk_devdesc *dev; - pdinfo_list_t *pdi; pdinfo_t *pd; EFI_BLOCK_IO *blkio; EFI_STATUS status; @@ -699,11 +703,7 @@ efipart_open(struct open_file *f, ...) if (dev == NULL) return (EINVAL); - pdi = efiblk_get_pdinfo_list(dev->d_dev); - if (pdi == NULL) - return (EINVAL); - - pd = efiblk_get_pdinfo(pdi, dev->d_unit); + pd = efiblk_get_pdinfo((struct devdesc *)dev); if (pd == NULL) return (EIO); @@ -734,17 +734,13 @@ static int efipart_close(struct open_file *f) { struct disk_devdesc *dev; - pdinfo_list_t *pdi; pdinfo_t *pd; dev = (struct disk_devdesc *)(f->f_devdata); if (dev == NULL) return (EINVAL); - pdi = efiblk_get_pdinfo_list(dev->d_dev); - if (pdi == NULL) - return (EINVAL); - pd = efiblk_get_pdinfo(pdi, dev->d_unit); + pd = efiblk_get_pdinfo((struct devdesc *)dev); if (pd == NULL) return (EINVAL); @@ -763,18 +759,14 @@ static int efipart_ioctl(struct open_file *f, u_long cmd, void *data) { struct disk_devdesc *dev; - pdinfo_list_t *pdi; pdinfo_t *pd; int rc; dev = (struct disk_devdesc *)(f->f_devdata); if (dev == NULL) return (EINVAL); - pdi = efiblk_get_pdinfo_list(dev->d_dev); - if (pdi == NULL) - return (EINVAL); - pd = efiblk_get_pdinfo(pdi, dev->d_unit); + pd = efiblk_get_pdinfo((struct devdesc *)dev); if (pd == NULL) return (EINVAL); @@ -847,17 +839,13 @@ efipart_strategy(void *devdata, int rw, daddr_t blk, s { struct bcache_devdata bcd; struct disk_devdesc *dev; - pdinfo_list_t *pdi; pdinfo_t *pd; dev = (struct disk_devdesc *)devdata; if (dev == NULL) return (EINVAL); - pdi = efiblk_get_pdinfo_list(dev->d_dev); - if (pdi == NULL) - return (EINVAL); - pd = efiblk_get_pdinfo(pdi, dev->d_unit); + pd = efiblk_get_pdinfo((struct devdesc *)dev); if (pd == NULL) return (EINVAL); @@ -881,7 +869,6 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; - pdinfo_list_t *pdi; pdinfo_t *pd; EFI_BLOCK_IO *blkio; uint64_t off, disk_blocks, d_offset = 0; @@ -893,11 +880,7 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl if (dev == NULL || blk < 0) return (EINVAL); - pdi = efiblk_get_pdinfo_list(dev->d_dev); - if (pdi == NULL) - return (EINVAL); - - pd = efiblk_get_pdinfo(pdi, dev->d_unit); + pd = efiblk_get_pdinfo((struct devdesc *)dev); if (pd == NULL) return (EINVAL); Modified: head/sys/boot/efi/libefi/efizfs.c ============================================================================== --- head/sys/boot/efi/libefi/efizfs.c Sun Sep 10 13:21:54 2017 (r323388) +++ head/sys/boot/efi/libefi/efizfs.c Sun Sep 10 13:53:42 2017 (r323389) @@ -52,6 +52,19 @@ efizfs_get_zfsinfo_list(void) return (&zfsinfo); } +EFI_HANDLE +efizfs_get_handle_by_guid(uint64_t guid) +{ + zfsinfo_t *zi; + + STAILQ_FOREACH(zi, &zfsinfo, zi_link) { + if (zi->zi_pool_guid == guid) { + return (zi->zi_handle); + } + } + return (NULL); +} + static void insert_zfs(EFI_HANDLE handle, uint64_t guid) { Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Sun Sep 10 13:21:54 2017 (r323388) +++ head/sys/boot/efi/loader/main.c Sun Sep 10 13:53:42 2017 (r323389) @@ -871,9 +871,41 @@ command_chain(int argc, char *argv[]) *(--argv) = 0; } - if (efi_getdev((void **)&dev, name, (const char **)&path) == 0) - loaded_image->DeviceHandle = - efi_find_handle(dev->d_dev, dev->d_unit); + if (efi_getdev((void **)&dev, name, (const char **)&path) == 0) { + struct zfs_devdesc *z_dev; + struct disk_devdesc *d_dev; + pdinfo_t *hd, *pd; + + switch (dev->d_type) { + case DEVT_ZFS: + z_dev = (struct zfs_devdesc *)dev; + loaded_image->DeviceHandle = + efizfs_get_handle_by_guid(z_dev->pool_guid); + break; + case DEVT_NET: + loaded_image->DeviceHandle = + efi_find_handle(dev->d_dev, dev->d_unit); + break; + default: + hd = efiblk_get_pdinfo(dev); + if (STAILQ_EMPTY(&hd->pd_part)) { + loaded_image->DeviceHandle = hd->pd_handle; + break; + } + d_dev = (struct disk_devdesc *)dev; + STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { + /* + * d_partition should be 255 + */ + if (pd->pd_unit == d_dev->d_slice) { + loaded_image->DeviceHandle = + pd->pd_handle; + break; + } + } + break; + } + } dev_cleanup(); status = BS->StartImage(loaderhandle, NULL, NULL); From owner-svn-src-head@freebsd.org Sun Sep 10 15:01:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0819E156AF; Sun, 10 Sep 2017 15:01:30 +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 7E5B1771BA; Sun, 10 Sep 2017 15:01:30 +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 v8AF1T1k061706; Sun, 10 Sep 2017 15:01:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AF1Tr4061705; Sun, 10 Sep 2017 15:01:29 GMT (envelope-from des@FreeBSD.org) Message-Id: <201709101501.v8AF1Tr4061705@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: Sun, 10 Sep 2017 15:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323390 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323390 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 15:01:30 -0000 Author: des Date: Sun Sep 10 15:01:29 2017 New Revision: 323390 URL: https://svnweb.freebsd.org/changeset/base/323390 Log: If the user tries to set kern.randompid to 1 (which is meaningless), set it to a random value between 100 and 1123, rather than 0 as before. Submitted by: Marie Helene Kvello-Aune MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5336 Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sun Sep 10 13:53:42 2017 (r323389) +++ head/sys/kern/kern_fork.c Sun Sep 10 15:01:29 2017 (r323390) @@ -208,20 +208,26 @@ sysctl_kern_randompid(SYSCTL_HANDLER_ARGS) pid = randompid; error = sysctl_handle_int(oidp, &pid, 0, req); if (error == 0 && req->newptr != NULL) { - if (pid < 0 || pid > pid_max - 100) /* out of range */ - pid = pid_max - 100; - else if (pid < 2) /* NOP */ - pid = 0; - else if (pid < 100) /* Make it reasonable */ - pid = 100; - randompid = pid; + if (pid == 0) + randompid = 0; + else if (pid == 1) + /* generate a random PID modulus between 100 and 1123 */ + randompid = 100 + arc4random() % 1024; + else if (pid < 0 || pid > pid_max - 100) + /* out of range */ + randompid = pid_max - 100; + else if (pid < 100) + /* Make it reasonable */ + randompid = 100; + else + randompid = pid; } sx_xunlock(&allproc_lock); return (error); } SYSCTL_PROC(_kern, OID_AUTO, randompid, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_kern_randompid, "I", "Random PID modulus"); + 0, 0, sysctl_kern_randompid, "I", "Random PID modulus. Special values: 0: disable, 1: choose random value"); static int fork_findpid(int flags) From owner-svn-src-head@freebsd.org Sun Sep 10 15:07:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E224E15A71; Sun, 10 Sep 2017 15:07:58 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 45EFB7746C; Sun, 10 Sep 2017 15:07:57 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 35ED0D54A; Sun, 10 Sep 2017 15:07:51 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id B95AB9859; Sun, 10 Sep 2017 15:07:52 +0000 (UTC) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323390 - head/sys/kern References: <201709101501.v8AF1Tr4061705@repo.freebsd.org> Date: Sun, 10 Sep 2017 17:07:52 +0200 In-Reply-To: <201709101501.v8AF1Tr4061705@repo.freebsd.org> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav=22's?= message of "Sun, 10 Sep 2017 15:01:29 +0000 (UTC)") Message-ID: <864lsa6187.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 15:07:58 -0000 Dag-Erling Sm=C3=B8rgrav writes: > Log: > If the user tries to set kern.randompid to 1 (which is meaningless), set > it to a random value between 100 and 1123, rather than 0 as before. >=20=20=20 > Submitted by: Marie Helene Kvello-Aune > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D5336 Sorry, the correct D# is https://reviews.freebsd.org/D12238 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@freebsd.org Sun Sep 10 17:46:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16E6AE1DA7E; Sun, 10 Sep 2017 17:46:05 +0000 (UTC) (envelope-from alc@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 E549580049; Sun, 10 Sep 2017 17:46:04 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8AHk33f030737; Sun, 10 Sep 2017 17:46:03 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AHk3qv030733; Sun, 10 Sep 2017 17:46:03 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709101746.v8AHk3qv030733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 10 Sep 2017 17:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323391 - in head/sys: kern sys vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: kern sys vm X-SVN-Commit-Revision: 323391 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 17:46:05 -0000 Author: alc Date: Sun Sep 10 17:46:03 2017 New Revision: 323391 URL: https://svnweb.freebsd.org/changeset/base/323391 Log: To analyze the allocation of swap blocks by blist functions, add a method for analyzing the radix tree structures and reporting on the number, and sizes, of maximal intervals of free blocks. The report includes the number of maximal intervals, and also the number of them in each of several size ranges, from small (size 1, or 3 to 4) to large (28657 to 46367) with size boundaries defined by Fibonacci numbers. The report is written in the test tool with the 's' command, or in a running kernel by sysctl. The analysis of the radix tree frequently computes the position of the lone bit set in a u_daddr_t, a computation that also appears in leaf allocation. That computation has been moved into a function of its own, and optimized for cases where an inlined machine instruction can replace the usual binary search. Submitted by: Doug Moore MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11906 Modified: head/sys/kern/subr_blist.c head/sys/sys/blist.h head/sys/vm/swap_pager.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sun Sep 10 15:01:29 2017 (r323390) +++ head/sys/kern/subr_blist.c Sun Sep 10 17:46:03 2017 (r323391) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -101,6 +102,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -144,6 +146,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); +#define BLIST_META_MASK (BLIST_META_RADIX - 1) /* * For a subtree that can represent the state of up to 'radix' blocks, the @@ -166,10 +169,38 @@ radix_to_skip(daddr_t radix) { return (radix / - ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1))); + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * BLIST_META_MASK)); } /* + * Use binary search, or a faster method, to find the 1 bit in a u_daddr_t. + * Assumes that the argument has only one bit set. + */ +static inline int +bitpos(u_daddr_t mask) +{ + int hi, lo, mid; + + switch (sizeof(mask)) { +#ifdef HAVE_INLINE_FFSLL + case sizeof(long long): + return (ffsll(mask) - 1); +#endif + default: + lo = 0; + hi = BLIST_BMAP_RADIX; + while (lo + 1 < hi) { + mid = (lo + hi) >> 1; + if ((mask >> mid) != 0) + lo = mid; + else + hi = mid; + } + return (lo); + } +} + +/* * blist_create() - create a blist capable of handling up to the specified * number of blocks * @@ -340,6 +371,192 @@ blist_print(blist_t bl) #endif +static const u_daddr_t fib[] = { + 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, + 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, + 514229, 832040, 1346269, 2178309, 3524578, +}; + +/* + * Use 'gap' to describe a maximal range of unallocated blocks/bits. + */ +struct gap_stats { + daddr_t start; /* current gap start, or SWAPBLK_NONE */ + daddr_t num; /* number of gaps observed */ + daddr_t max; /* largest gap size */ + daddr_t avg; /* average gap size */ + daddr_t err; /* sum - num * avg */ + daddr_t histo[nitems(fib)]; /* # gaps in each size range */ + int max_bucket; /* last histo elt with nonzero val */ +}; + +/* + * gap_stats_counting() - is the state 'counting 1 bits'? + * or 'skipping 0 bits'? + */ +static inline bool +gap_stats_counting(const struct gap_stats *stats) +{ + + return (stats->start != SWAPBLK_NONE); +} + +/* + * init_gap_stats() - initialize stats on gap sizes + */ +static inline void +init_gap_stats(struct gap_stats *stats) +{ + + bzero(stats, sizeof(*stats)); + stats->start = SWAPBLK_NONE; +} + +/* + * update_gap_stats() - update stats on gap sizes + */ +static void +update_gap_stats(struct gap_stats *stats, daddr_t posn) +{ + daddr_t size; + int hi, lo, mid; + + if (!gap_stats_counting(stats)) { + stats->start = posn; + return; + } + size = posn - stats->start; + stats->start = SWAPBLK_NONE; + if (size > stats->max) + stats->max = size; + + /* + * Find the fibonacci range that contains size, + * expecting to find it in an early range. + */ + lo = 0; + hi = 1; + while (hi < nitems(fib) && fib[hi] <= size) { + lo = hi; + hi *= 2; + } + if (hi >= nitems(fib)) + hi = nitems(fib); + while (lo + 1 != hi) { + mid = (lo + hi) >> 1; + if (fib[mid] <= size) + lo = mid; + else + hi = mid; + } + stats->histo[lo]++; + if (lo > stats->max_bucket) + stats->max_bucket = lo; + stats->err += size - stats->avg; + stats->num++; + stats->avg += stats->err / stats->num; + stats->err %= stats->num; +} + +/* + * dump_gap_stats() - print stats on gap sizes + */ +static inline void +dump_gap_stats(const struct gap_stats *stats, struct sbuf *s) +{ + int i; + + sbuf_printf(s, "number of maximal free ranges: %jd\n", + (intmax_t)stats->num); + sbuf_printf(s, "largest free range: %jd\n", (intmax_t)stats->max); + sbuf_printf(s, "average maximal free range size: %jd\n", + (intmax_t)stats->avg); + sbuf_printf(s, "number of maximal free ranges of different sizes:\n"); + sbuf_printf(s, " count | size range\n"); + sbuf_printf(s, " ----- | ----------\n"); + for (i = 0; i < stats->max_bucket; i++) { + if (stats->histo[i] != 0) { + sbuf_printf(s, "%20jd | ", + (intmax_t)stats->histo[i]); + if (fib[i] != fib[i + 1] - 1) + sbuf_printf(s, "%jd to %jd\n", (intmax_t)fib[i], + (intmax_t)fib[i + 1] - 1); + else + sbuf_printf(s, "%jd\n", (intmax_t)fib[i]); + } + } + sbuf_printf(s, "%20jd | ", (intmax_t)stats->histo[i]); + if (stats->histo[i] > 1) + sbuf_printf(s, "%jd to %jd\n", (intmax_t)fib[i], + (intmax_t)stats->max); + else + sbuf_printf(s, "%jd\n", (intmax_t)stats->max); +} + +/* + * blist_stats() - dump radix tree stats + */ +void +blist_stats(blist_t bl, struct sbuf *s) +{ + struct gap_stats gstats; + struct gap_stats *stats = &gstats; + daddr_t i, nodes, radix; + u_daddr_t bit, diff, mask; + + init_gap_stats(stats); + nodes = 0; + i = bl->bl_radix; + while (i < bl->bl_radix + bl->bl_blocks) { + /* + * Find max size subtree starting at i. + */ + radix = BLIST_BMAP_RADIX; + while (((i / radix) & BLIST_META_MASK) == 0) + radix *= BLIST_META_RADIX; + + /* + * Check for skippable subtrees starting at i. + */ + while (radix > BLIST_BMAP_RADIX) { + if (bl->bl_root[nodes].u.bmu_avail == 0) { + if (gap_stats_counting(stats)) + update_gap_stats(stats, i); + break; + } + if (bl->bl_root[nodes].u.bmu_avail == radix) { + if (!gap_stats_counting(stats)) + update_gap_stats(stats, i); + break; + } + + /* + * Skip subtree root. + */ + nodes++; + radix /= BLIST_META_RADIX; + } + if (radix == BLIST_BMAP_RADIX) { + /* + * Scan leaf. + */ + mask = bl->bl_root[nodes].u.bmu_bitmap; + diff = mask ^ (mask << 1); + if (gap_stats_counting(stats)) + diff ^= 1; + while (diff != 0) { + bit = diff & -diff; + update_gap_stats(stats, i + bitpos(bit)); + diff ^= bit; + } + } + nodes += radix_to_skip(radix); + i += radix; + } + update_gap_stats(stats, i); + dump_gap_stats(stats, s); +} + /************************************************************************ * ALLOCATION SUPPORT FUNCTIONS * ************************************************************************ @@ -355,13 +572,13 @@ blist_print(blist_t bl) * * This is the core of the allocator and is optimized for the * BLIST_BMAP_RADIX block allocation case. Otherwise, execution - * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX). + * time is proportional to log2(count) + bitpos time. */ static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) { u_daddr_t mask; - int count1, hi, lo, mid, num_shifts, range1, range_ext; + int count1, lo, num_shifts, range1, range_ext; if (count == BLIST_BMAP_RADIX) { /* @@ -419,17 +636,10 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count /* * The least significant set bit in mask marks the start of the first * available range of sufficient size. Clear all the bits but that one, - * and then perform a binary search to find its position. + * and then find its position. */ mask &= -mask; - hi = BLIST_BMAP_RADIX - count1; - while (lo + 1 < hi) { - mid = (lo + hi) >> 1; - if ((mask >> mid) != 0) - lo = mid; - else - hi = mid; - } + lo = bitpos(mask); /* * Set in mask exactly the bits being allocated, and clear them from @@ -980,6 +1190,7 @@ main(int ac, char **av) int size = 1024; int i; blist_t bl; + struct sbuf *s; for (i = 1; i < ac; ++i) { const char *ptr = av[i]; @@ -1014,6 +1225,13 @@ main(int ac, char **av) case 'p': blist_print(bl); break; + case 's': + s = sbuf_new_auto(); + blist_stats(bl, s); + sbuf_finish(s); + printf("%s", sbuf_data(s)); + sbuf_delete(s); + break; case 'a': if (sscanf(buf + 1, "%lld", &count) == 1) { daddr_t blk = blist_alloc(bl, count); @@ -1041,6 +1259,7 @@ main(int ac, char **av) case 'h': puts( "p -print\n" + "s -stats\n" "a %d -allocate\n" "f %x %d -free\n" "l %x %d -fill\n" Modified: head/sys/sys/blist.h ============================================================================== --- head/sys/sys/blist.h Sun Sep 10 15:01:29 2017 (r323390) +++ head/sys/sys/blist.h Sun Sep 10 17:46:03 2017 (r323391) @@ -90,6 +90,8 @@ typedef struct blist { #define BLIST_MAX_ALLOC BLIST_BMAP_RADIX +struct sbuf; + daddr_t blist_alloc(blist_t blist, daddr_t count); daddr_t blist_avail(blist_t blist); blist_t blist_create(daddr_t blocks, int flags); @@ -98,6 +100,7 @@ daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t void blist_free(blist_t blist, daddr_t blkno, daddr_t count); void blist_print(blist_t blist); void blist_resize(blist_t *pblist, daddr_t count, int freenew, int flags); +void blist_stats(blist_t blist, struct sbuf *s); #endif /* _SYS_BLIST_H_ */ Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Sep 10 15:01:29 2017 (r323390) +++ head/sys/vm/swap_pager.c Sun Sep 10 17:46:03 2017 (r323391) @@ -92,6 +92,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -323,6 +324,10 @@ static int sysctl_swap_async_max(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_vm, OID_AUTO, swap_async_max, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sysctl_swap_async_max, "I", "Maximum running async swap ops"); +static int sysctl_swap_fragmentation(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vm, OID_AUTO, swap_fragmentation, CTLTYPE_STRING | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_swap_fragmentation, "A", + "Swap Fragmentation Info"); static struct sx sw_alloc_sx; @@ -777,6 +782,36 @@ swp_pager_freeswapspace(daddr_t blk, int npages) } } panic("Swapdev not found"); +} + +/* + * SYSCTL_SWAP_FRAGMENTATION() - produce raw swap space stats + */ +static int +sysctl_swap_fragmentation(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sbuf; + struct swdevt *sp; + const char *devname; + int error; + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + mtx_lock(&sw_dev_mtx); + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (vn_isdisk(sp->sw_vp, NULL)) + devname = devtoname(sp->sw_vp->v_rdev); + else + devname = "[file]"; + sbuf_printf(&sbuf, "\nFree space on device %s:\n", devname); + blist_stats(sp->sw_blist, &sbuf); + } + mtx_unlock(&sw_dev_mtx); + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + return (error); } /* From owner-svn-src-head@freebsd.org Sun Sep 10 18:08:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B4E6E1EB5E; Sun, 10 Sep 2017 18:08:27 +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 EC1F480B26; Sun, 10 Sep 2017 18:08:26 +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 v8AI8Qov039100; Sun, 10 Sep 2017 18:08:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AI8Pm9039095; Sun, 10 Sep 2017 18:08:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709101808.v8AI8Pm9039095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 Sep 2017 18:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323392 - in head/sys: arm/allwinner arm/freescale/imx dev/gpio sys X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/freescale/imx dev/gpio sys X-SVN-Commit-Revision: 323392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 18:08:27 -0000 Author: ian Date: Sun Sep 10 18:08:25 2017 New Revision: 323392 URL: https://svnweb.freebsd.org/changeset/base/323392 Log: Add gpio methods to read/write/configure up to 32 pins simultaneously. Sometimes it is necessary to combine several gpio pins into an ad-hoc bus and manipulate the pins as a group. In such cases manipulating the pins individualy is not an option, because the value on the "bus" assumes potentially-invalid intermediate values as each pin is changed in turn. Note that the "bus" may be something as simple as a bi-color LED where changing colors requires changing both gpio pins at once, or something as complex as a bitbanged multiplexed address/data bus connected to a microcontroller. In addition to the absolute requirement of simultaneously changing the output values of driven pins, a desirable feature of these new methods is to provide a higher-performance mechanism for reading and writing multiple pins, especially from userland where pin-at-a-time access incurs a noticible syscall time penalty. These new interfaces are NOT intended to abstract away all the ugly details of how gpio is implemented on any given platform. In fact, to use these properly you absolutely must know something about how the gpio hardware is organized. Typically there are "banks" of gpio pins controlled by registers which group several pins together. A bank may be as small as 2 pins or as big as "all the pins on the device, hundreds of them." In the latter case, a driver might support this interface by allowing access to any 32 adjacent pins within the overall collection. Or, more likely, any 32 adjacent pins starting at any multiple of 32. Whatever the hardware restrictions may be, you would need to understand them to use this interface. In additional to defining the interfaces, two example implementations are included here, for imx5/6, and allwinner. These represent the two primary types of gpio hardware drivers. imx6 has multiple gpio devices, each implementing a single bank of 32 pins. Allwinner implements a single large gpio number space from 1-n pins, and the driver internally translates that linear number space to a bank+pin scheme based on how the pins are grouped into control registers. The allwinner implementation imposes the restriction that the first_pin argument to the new functions must always be pin 0 of a bank. Differential Revision: https://reviews.freebsd.org/D11810 Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/freescale/imx/imx_gpio.c head/sys/dev/gpio/gpio_if.m head/sys/dev/gpio/gpioc.c head/sys/sys/gpio.h Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sun Sep 10 17:46:03 2017 (r323391) +++ head/sys/arm/allwinner/a10_gpio.c Sun Sep 10 18:08:25 2017 (r323392) @@ -195,6 +195,9 @@ struct a10_gpio_softc { #define A10_GPIO_GP_INT_STA 0x214 #define A10_GPIO_GP_INT_DEB 0x218 +static int a10_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value); +static int a10_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); + #define A10_GPIO_WRITE(_sc, _off, _val) \ bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) #define A10_GPIO_READ(_sc, _off) \ @@ -316,29 +319,44 @@ a10_gpio_set_drv(struct a10_gpio_softc *sc, uint32_t p static int a10_gpio_pin_configure(struct a10_gpio_softc *sc, uint32_t pin, uint32_t flags) { + u_int val; int err = 0; /* Must be called with lock held. */ A10_GPIO_LOCK_ASSERT(sc); + if (pin > sc->padconf->npins) + return (EINVAL); + /* Manage input/output. */ - if (flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { - if (flags & GPIO_PIN_OUTPUT) - err = a10_gpio_set_function(sc, pin, A10_GPIO_OUTPUT); - else + if (flags & GPIO_PIN_INPUT) { + err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); + } else if (flags & GPIO_PIN_OUTPUT) { + if (flags & GPIO_PIN_PRESET_LOW) { + a10_gpio_pin_set(sc->sc_dev, pin, 0); + } else if (flags & GPIO_PIN_PRESET_HIGH) { + a10_gpio_pin_set(sc->sc_dev, pin, 1); + } else { + /* Read the pin and preset output to current state. */ err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); + if (err == 0) { + a10_gpio_pin_get(sc->sc_dev, pin, &val); + a10_gpio_pin_set(sc->sc_dev, pin, val); + } + } + if (err == 0) + err = a10_gpio_set_function(sc, pin, A10_GPIO_OUTPUT); } if (err) return (err); /* Manage Pull-up/pull-down. */ - if (flags & (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)) { - if (flags & GPIO_PIN_PULLUP) - a10_gpio_set_pud(sc, pin, A10_GPIO_PULLUP); - else - a10_gpio_set_pud(sc, pin, A10_GPIO_PULLDOWN); - } else + if (flags & GPIO_PIN_PULLUP) + a10_gpio_set_pud(sc, pin, A10_GPIO_PULLUP); + else if (flags & GPIO_PIN_PULLDOWN) + a10_gpio_set_pud(sc, pin, A10_GPIO_PULLDOWN); + else a10_gpio_set_pud(sc, pin, A10_GPIO_NONE); return (0); @@ -526,6 +544,73 @@ a10_gpio_pin_toggle(device_t dev, uint32_t pin) } static int +a10_gpio_pin_access_32(device_t dev, uint32_t first_pin, uint32_t clear_pins, + uint32_t change_pins, uint32_t *orig_pins) +{ + struct a10_gpio_softc *sc; + uint32_t bank, data, pin; + + sc = device_get_softc(dev); + if (first_pin > sc->padconf->npins) + return (EINVAL); + + /* + * We require that first_pin refers to the first pin in a bank, because + * this API is not about convenience, it's for making a set of pins + * change simultaneously (required) with reasonably high performance + * (desired); we need to do a read-modify-write on a single register. + */ + bank = sc->padconf->pins[first_pin].port; + pin = sc->padconf->pins[first_pin].pin; + if (pin != 0) + return (EINVAL); + + A10_GPIO_LOCK(sc); + data = A10_GPIO_READ(sc, A10_GPIO_GP_DAT(bank)); + if ((clear_pins | change_pins) != 0) + A10_GPIO_WRITE(sc, A10_GPIO_GP_DAT(bank), + (data & ~clear_pins) ^ change_pins); + A10_GPIO_UNLOCK(sc); + + if (orig_pins != NULL) + *orig_pins = data; + + return (0); +} + +static int +a10_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins, + uint32_t *pin_flags) +{ + struct a10_gpio_softc *sc; + uint32_t bank, pin; + int err; + + sc = device_get_softc(dev); + if (first_pin > sc->padconf->npins) + return (EINVAL); + + bank = sc->padconf->pins[first_pin].port; + if (sc->padconf->pins[first_pin].pin != 0) + return (EINVAL); + + /* + * The configuration for a bank of pins is scattered among several + * registers; we cannot g'tee to simultaneously change the state of all + * the pins in the flags array. So just loop through the array + * configuring each pin for now. If there was a strong need, it might + * be possible to support some limited simultaneous config, such as + * adjacent groups of 8 pins that line up the same as the config regs. + */ + for (err = 0, pin = first_pin; err == 0 && pin < num_pins; ++pin) { + if (pin_flags[pin] & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) + err = a10_gpio_pin_configure(sc, pin, pin_flags[pin]); + } + + return (err); +} + +static int aw_find_pinnum_by_name(struct a10_gpio_softc *sc, const char *pinname) { int i; @@ -780,6 +865,8 @@ static device_method_t a10_gpio_methods[] = { DEVMETHOD(gpio_pin_get, a10_gpio_pin_get), DEVMETHOD(gpio_pin_set, a10_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, a10_gpio_pin_toggle), + DEVMETHOD(gpio_pin_access_32, a10_gpio_pin_access_32), + DEVMETHOD(gpio_pin_config_32, a10_gpio_pin_config_32), DEVMETHOD(gpio_map_gpios, a10_gpio_map_gpios), /* ofw_bus interface */ Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Sun Sep 10 17:46:03 2017 (r323391) +++ head/sys/arm/freescale/imx/imx_gpio.c Sun Sep 10 18:08:25 2017 (r323392) @@ -668,6 +668,72 @@ imx51_gpio_pin_toggle(device_t dev, uint32_t pin) } static int +imx51_gpio_pin_access_32(device_t dev, uint32_t first_pin, uint32_t clear_pins, + uint32_t change_pins, uint32_t *orig_pins) +{ + struct imx51_gpio_softc *sc; + + if (first_pin != 0) + return (EINVAL); + + sc = device_get_softc(dev); + + if (orig_pins != NULL) + *orig_pins = READ4(sc, IMX_GPIO_PSR_REG); + + if ((clear_pins | change_pins) != 0) { + mtx_lock_spin(&sc->sc_mtx); + WRITE4(sc, IMX_GPIO_DR_REG, + (READ4(sc, IMX_GPIO_DR_REG) & ~clear_pins) ^ change_pins); + mtx_unlock_spin(&sc->sc_mtx); + } + + return (0); +} + +static int +imx51_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins, + uint32_t *pin_flags) +{ + struct imx51_gpio_softc *sc; + u_int i; + uint32_t bit, drclr, drset, flags, oeclr, oeset, pads; + + sc = device_get_softc(dev); + + if (first_pin != 0 || num_pins > sc->gpio_npins) + return (EINVAL); + + drclr = drset = oeclr = oeset = 0; + pads = READ4(sc, IMX_GPIO_PSR_REG); + + for (i = 0; i < num_pins; ++i) { + bit = 1u << i; + flags = pin_flags[i]; + if (flags & GPIO_PIN_INPUT) { + oeclr |= bit; + } else if (flags & GPIO_PIN_OUTPUT) { + oeset |= bit; + if (flags & GPIO_PIN_PRESET_LOW) + drclr |= bit; + else if (flags & GPIO_PIN_PRESET_HIGH) + drset |= bit; + else /* Drive whatever it's now pulled to. */ + drset |= pads & bit; + } + } + + mtx_lock_spin(&sc->sc_mtx); + WRITE4(sc, IMX_GPIO_DR_REG, + (READ4(sc, IMX_GPIO_DR_REG) & ~drclr) | drset); + WRITE4(sc, IMX_GPIO_OE_REG, + (READ4(sc, IMX_GPIO_OE_REG) & ~oeclr) | oeset); + mtx_unlock_spin(&sc->sc_mtx); + + return (0); +} + +static int imx51_gpio_probe(device_t dev) { @@ -790,6 +856,8 @@ static device_method_t imx51_gpio_methods[] = { DEVMETHOD(gpio_pin_get, imx51_gpio_pin_get), DEVMETHOD(gpio_pin_set, imx51_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, imx51_gpio_pin_toggle), + DEVMETHOD(gpio_pin_access_32, imx51_gpio_pin_access_32), + DEVMETHOD(gpio_pin_config_32, imx51_gpio_pin_config_32), {0, 0}, }; Modified: head/sys/dev/gpio/gpio_if.m ============================================================================== --- head/sys/dev/gpio/gpio_if.m Sun Sep 10 17:46:03 2017 (r323391) +++ head/sys/dev/gpio/gpio_if.m Sun Sep 10 18:08:25 2017 (r323392) @@ -40,6 +40,13 @@ CODE { } static int + gpio_default_nosupport(void) + { + + return (EOPNOTSUPP); + } + + static int gpio_default_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) @@ -151,3 +158,31 @@ METHOD int map_gpios { uint32_t *pin; uint32_t *flags; } DEFAULT gpio_default_map_gpios; + +# +# Simultaneously read and/or change up to 32 adjacent pins. +# If the device cannot change the pins simultaneously, returns EOPNOTSUPP. +# +# More details about using this interface can be found in sys/gpio.h +# +METHOD int pin_access_32 { + device_t dev; + uint32_t first_pin; + uint32_t clear_pins; + uint32_t change_pins; + uint32_t *orig_pins; +} DEFAULT gpio_default_nosupport; + +# +# Simultaneously configure up to 32 adjacent pins. +# This is intended to change the configuration of all the pins simultaneously, +# but unlike pin_access_32, this will not fail if the hardware can't do so. +# +# More details about using this interface can be found in sys/gpio.h +# +METHOD int pin_config_32 { + device_t dev; + uint32_t first_pin; + uint32_t num_pins; + uint32_t *pin_flags; +} DEFAULT gpio_default_nosupport; Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Sun Sep 10 17:46:03 2017 (r323391) +++ head/sys/dev/gpio/gpioc.c Sun Sep 10 18:08:25 2017 (r323392) @@ -125,6 +125,8 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg struct gpioc_softc *sc = cdev->si_drv1; struct gpio_pin pin; struct gpio_req req; + struct gpio_access_32 *a32; + struct gpio_config_32 *c32; uint32_t caps; bus = GPIO_GET_BUS(sc->sc_pdev); @@ -184,6 +186,16 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg dprintf("set name on pin %d\n", pin.gp_pin); res = GPIOBUS_PIN_SETNAME(bus, pin.gp_pin, pin.gp_name); + break; + case GPIOACCESS32: + a32 = (struct gpio_access_32 *)arg; + res = GPIO_PIN_ACCESS_32(sc->sc_pdev, a32->first_pin, + a32->clear_pins, a32->orig_pins, &a32->orig_pins); + break; + case GPIOCONFIG32: + c32 = (struct gpio_config_32 *)arg; + res = GPIO_PIN_CONFIG_32(sc->sc_pdev, c32->first_pin, + c32->num_pins, c32->pin_flags); break; default: return (ENOTTY); Modified: head/sys/sys/gpio.h ============================================================================== --- head/sys/sys/gpio.h Sun Sep 10 17:46:03 2017 (r323391) +++ head/sys/sys/gpio.h Sun Sep 10 18:08:25 2017 (r323392) @@ -70,6 +70,8 @@ #define GPIO_PIN_INVIN 0x00000080 /* invert input */ #define GPIO_PIN_INVOUT 0x00000100 /* invert output */ #define GPIO_PIN_PULSATE 0x00000200 /* pulsate in hardware */ +#define GPIO_PIN_PRESET_LOW 0x00000400 /* preset pin to high or */ +#define GPIO_PIN_PRESET_HIGH 0x00000800 /* low before enabling output */ /* GPIO interrupt capabilities */ #define GPIO_INTR_NONE 0x00000000 /* no interrupt support */ #define GPIO_INTR_LEVEL_LOW 0x00010000 /* level trigger, low */ @@ -95,6 +97,71 @@ struct gpio_req { }; /* + * gpio_access_32 / GPIOACCESS32 + * + * Simultaneously read and/or change up to 32 adjacent pins. + * If the device cannot change the pins simultaneously, returns EOPNOTSUPP. + * + * This accesses an adjacent set of up to 32 pins starting at first_pin within + * the device's collection of pins. How the hardware pins are mapped to the 32 + * bits in the arguments is device-specific. It is expected that lower-numbered + * pins in the device's number space map linearly to lower-ordered bits within + * the 32-bit words (i.e., bit 0 is first_pin, bit 1 is first_pin+1, etc). + * Other mappings are possible; know your device. + * + * Some devices may limit the value of first_pin to 0, or to multiples of 16 or + * 32 or some other hardware-specific number; to access pin 2 would require + * first_pin to be zero and then manipulate bit (1 << 2) in the 32-bit word. + * Invalid values in first_pin result in an EINVAL error return. + * + * The starting state of the pins is captured and stored in orig_pins, then the + * pins are set to ((starting_state & ~clear_pins) ^ change_pins). + * + * Clear Change Hardware pin after call + * 0 0 No change + * 0 1 Opposite of current value + * 1 0 Cleared + * 1 1 Set + */ +struct gpio_access_32 { + uint32_t first_pin; /* First pin in group of 32 adjacent */ + uint32_t clear_pins; /* Pins are changed using: */ + uint32_t change_pins; /* ((hwstate & ~clear_pins) ^ change_pins) */ + uint32_t orig_pins; /* Returned hwstate of pins before change. */ +}; + +/* + * gpio_config_32 / GPIOCONFIG32 + * + * Simultaneously configure up to 32 adjacent pins. This is intended to change + * the configuration of all the pins simultaneously, such that pins configured + * for output all begin to drive the configured values simultaneously, but not + * all hardware can do that, so the driver "does the best it can" in this + * regard. Notably unlike pin_access_32(), this does NOT fail if the pins + * cannot be atomically configured; it is expected that callers understand the + * hardware and have decided to live with any such limitations it may have. + * + * The pin_flags argument is an array of GPIO_PIN_xxxx flags. If the array + * contains any GPIO_PIN_OUTPUT flags, the driver will manipulate the hardware + * such that all output pins become driven with the proper initial values + * simultaneously if it can. The elements in the array map to pins in the same + * way that bits are mapped by pin_acces_32(), and the same restrictions may + * apply. For example, to configure pins 2 and 3 it may be necessary to set + * first_pin to zero and only populate pin_flags[2] and pin_flags[3]. If a + * given array entry doesn't contain GPIO_PIN_INPUT or GPIO_PIN_OUTPUT then no + * configuration is done for that pin. + * + * Some devices may limit the value of first_pin to 0, or to multiples of 16 or + * 32 or some other hardware-specific number. Invalid values in first_pin or + * num_pins result in an error return with errno set to EINVAL. + */ +struct gpio_config_32 { + uint32_t first_pin; + uint32_t num_pins; + uint32_t pin_flags[32]; +}; + +/* * ioctls */ #define GPIOMAXPIN _IOR('G', 0, int) @@ -104,5 +171,7 @@ struct gpio_req { #define GPIOSET _IOW('G', 4, struct gpio_req) #define GPIOTOGGLE _IOWR('G', 5, struct gpio_req) #define GPIOSETNAME _IOW('G', 6, struct gpio_pin) +#define GPIOACCESS32 _IOWR('G', 7, struct gpio_access_32) +#define GPIOCONFIG32 _IOW('G', 8, struct gpio_config_32) #endif /* __GPIO_H__ */ From owner-svn-src-head@freebsd.org Sun Sep 10 19:00:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C210E217EB; Sun, 10 Sep 2017 19:00:39 +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 6B398826A8; Sun, 10 Sep 2017 19:00:39 +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 v8AJ0cUE059847; Sun, 10 Sep 2017 19:00:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AJ0c2N059845; Sun, 10 Sep 2017 19:00:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201709101900.v8AJ0c2N059845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 10 Sep 2017 19:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323393 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 323393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 19:00:39 -0000 Author: mjg Date: Sun Sep 10 19:00:38 2017 New Revision: 323393 URL: https://svnweb.freebsd.org/changeset/base/323393 Log: Move vmmeter atomic counters into dedicated cache lines Prior to the change they were subject to extreme false sharing. In particular this change shaves about 3 seconds real time of -j 80 buildkernel. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D12281 Modified: head/sys/sys/vmmeter.h head/sys/vm/vm_meter.c Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Sun Sep 10 18:08:25 2017 (r323392) +++ head/sys/sys/vmmeter.h Sun Sep 10 19:00:38 2017 (r323393) @@ -60,6 +60,12 @@ struct vmtotal { #if defined(_KERNEL) || defined(_WANT_VMMETER) #include +#ifdef _KERNEL +#define VMMETER_ALIGNED __aligned(CACHE_LINE_SIZE) +#else +#define VMMETER_ALIGNED +#endif + /* * System wide statistics counters. * Locking: @@ -126,14 +132,15 @@ struct vmmeter { u_int v_free_target; /* (c) pages desired free */ u_int v_free_min; /* (c) pages desired free */ u_int v_free_count; /* (f) pages free */ - u_int v_wire_count; /* (a) pages wired down */ - u_int v_active_count; /* (q) pages active */ u_int v_inactive_target; /* (c) pages desired inactive */ - u_int v_inactive_count; /* (q) pages inactive */ - u_int v_laundry_count; /* (q) pages eligible for laundering */ u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ u_int v_interrupt_free_min; /* (c) reserved pages for int code */ u_int v_free_severe; /* (c) severe page depletion point */ + u_int v_wire_count VMMETER_ALIGNED; /* (a) pages wired down */ + u_int v_active_count VMMETER_ALIGNED; /* (a) pages active */ + u_int v_inactive_count VMMETER_ALIGNED; /* (a) pages inactive */ + u_int v_laundry_count VMMETER_ALIGNED; /* (a) pages eligible for + laundering */ }; #endif /* _KERNEL || _WANT_VMMETER */ Modified: head/sys/vm/vm_meter.c ============================================================================== --- head/sys/vm/vm_meter.c Sun Sep 10 18:08:25 2017 (r323392) +++ head/sys/vm/vm_meter.c Sun Sep 10 19:00:38 2017 (r323393) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include -struct vmmeter vm_cnt = { +struct vmmeter __exclusive_cache_line vm_cnt = { .v_swtch = EARLY_COUNTER, .v_trap = EARLY_COUNTER, .v_syscall = EARLY_COUNTER, From owner-svn-src-head@freebsd.org Sun Sep 10 19:12:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0134E221A6; Sun, 10 Sep 2017 19:12:02 +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 6E2AB83027; Sun, 10 Sep 2017 19:12:02 +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 v8AJC1KN064823; Sun, 10 Sep 2017 19:12:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AJC16k064822; Sun, 10 Sep 2017 19:12:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709101912.v8AJC16k064822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 10 Sep 2017 19:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323394 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 19:12:02 -0000 Author: emaste Date: Sun Sep 10 19:12:01 2017 New Revision: 323394 URL: https://svnweb.freebsd.org/changeset/base/323394 Log: newvers.sh: accept "git-svn-id:" at the start of a line only This prevents incorrect subversion revision detection when "git svn" is not being used to get the sources but git is available. Previously old subversion revisions included in commit messages were favoured over the more recent and correct revisions in git notes. For example cf1f35574722 represents r315395 but was treated as r313908 which is referenced in the commit message. Commits following r315395/cf1f35574722 but before another commit with a git-svn-id reference in the commit message would be treated as r313908 as well. Patch from PR updated to accommodate the initial four space indent in `git log` ouptut. PR: 221848 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 2 weeks Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Sep 10 19:00:38 2017 (r323393) +++ head/sys/conf/newvers.sh Sun Sep 10 19:12:01 2017 (r323394) @@ -218,7 +218,7 @@ if [ -n "$git_cmd" ] ; then svn=" r${svn}" git="=${git}" else - svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \ + svn=`$git_cmd log | grep '^ git-svn-id:' | head -1 | \ sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` if [ -z "$svn" ] ; then svn=`$git_cmd log --format='format:%N' | \ From owner-svn-src-head@freebsd.org Sun Sep 10 20:33:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1926E01482; Sun, 10 Sep 2017 20:33:24 +0000 (UTC) (envelope-from kibab@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 97D97FFA; Sun, 10 Sep 2017 20:33:24 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8AKXNEs000610; Sun, 10 Sep 2017 20:33:23 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8AKXNg0000608; Sun, 10 Sep 2017 20:33:23 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709102033.v8AKXNg0000608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Sun, 10 Sep 2017 20:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323398 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 323398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 10 Sep 2017 20:33:24 -0000 Author: kibab Date: Sun Sep 10 20:33:23 2017 New Revision: 323398 URL: https://svnweb.freebsd.org/changeset/base/323398 Log: Add information about new src committer (kibab) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12304 Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sun Sep 10 20:17:31 2017 (r323397) +++ head/share/misc/committers-src.dot Sun Sep 10 20:33:23 2017 (r323398) @@ -222,6 +222,7 @@ kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004 kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2017/06/20"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] +kibab [label="Ilya Bakulin\nkibab@FreeBSD.org\n2017/09/02"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"] landonf [label="Landon Fuller\nlandonf@FreeBSD.org\n2016/05/31"] @@ -525,6 +526,7 @@ imp -> furuta imp -> joe imp -> jon imp -> keichii +imp -> kibab imp -> mb imp -> mr imp -> neel Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sun Sep 10 20:17:31 2017 (r323397) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sun Sep 10 20:33:23 2017 (r323398) @@ -307,6 +307,7 @@ 08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 08/20 Michael Heffner born in Cleona, Pennsylvania, United States, 1981 08/21 Jason A. Harmening born in Fort Wayne, Indiana, United States, 1981 +08/22 Ilya Bakulin born in Tbilisi, USSR, 1986 08/24 Mark Linimon born in Houston, Texas, United States, 1955 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 From owner-svn-src-head@freebsd.org Mon Sep 11 00:14:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B30E0C3B5; Mon, 11 Sep 2017 00:14:05 +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 174E066C20; Mon, 11 Sep 2017 00:14:05 +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 v8B0E4W9015978; Mon, 11 Sep 2017 00:14:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8B0E4JA015977; Mon, 11 Sep 2017 00:14:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709110014.v8B0E4JA015977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 00:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323405 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 00:14:05 -0000 Author: emaste Date: Mon Sep 11 00:14:04 2017 New Revision: 323405 URL: https://svnweb.freebsd.org/changeset/base/323405 Log: newvers.sh: speed up failing git-svn revision search In the case of running newvers.sh on a git tree w/o git-svn-id notes we previously piped the entire 'git log' to grep. Add --grep to the log invocation to avoid processing log entries of no interest. This saves about 2-3 seconds of newvers.sh run time on my SSD laptop. Later changes will bring further speedups. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Sep 10 23:48:20 2017 (r323404) +++ head/sys/conf/newvers.sh Mon Sep 11 00:14:04 2017 (r323405) @@ -218,8 +218,9 @@ if [ -n "$git_cmd" ] ; then svn=" r${svn}" git="=${git}" else - svn=`$git_cmd log | grep '^ git-svn-id:' | head -1 | \ - sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + svn=`$git_cmd log --grep '^git-svn-id:' | \ + grep '^ git-svn-id:' | head -1 | \ + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` if [ -z "$svn" ] ; then svn=`$git_cmd log --format='format:%N' | \ grep '^svn ' | head -1 | \ From owner-svn-src-head@freebsd.org Mon Sep 11 00:37:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBAA4E0D50C; Mon, 11 Sep 2017 00:37:01 +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 95C98675ED; Mon, 11 Sep 2017 00:37:01 +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 v8B0b0L9024082; Mon, 11 Sep 2017 00:37:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8B0b0Ks024081; Mon, 11 Sep 2017 00:37:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709110037.v8B0b0Ks024081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 00:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323407 - head/sys/boot/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/boot/efi/boot1 X-SVN-Commit-Revision: 323407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 00:37:01 -0000 Author: emaste Date: Mon Sep 11 00:37:00 2017 New Revision: 323407 URL: https://svnweb.freebsd.org/changeset/base/323407 Log: boot1 generate-fat: generate all templates at once In advance of other changes to the fat template generation process, have generate-fat.sh create all template files at the same time so that they cannot get out of sync. Also correct a longstanding but where BOOT1_OFFSET was overwritten on each invocation. A previous version of this patch stored a per-arch offset (e.g. BOOT1_arm64_OFFSET) but that was deemed unnecessary. Instead just hardcode the known offset that applies to all archs (0x2d) and fail if the offset happens to be different. Ongiong work (using newfs_msdos in bsdinstall and adding msdosfs support to makefs) will eventually allow us to do away with this fat template hack altogether, but in the near term we have a few improvements that will build on this. Reviewed by: allanjude, imp, Eric McCorkle MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10931 Modified: head/sys/boot/efi/boot1/generate-fat.sh Modified: head/sys/boot/efi/boot1/generate-fat.sh ============================================================================== --- head/sys/boot/efi/boot1/generate-fat.sh Mon Sep 11 00:19:09 2017 (r323406) +++ head/sys/boot/efi/boot1/generate-fat.sh Mon Sep 11 00:37:00 2017 (r323407) @@ -13,50 +13,14 @@ FAT_SIZE=1600 #Size in 512-byte blocks of the produced image +BOOT1_OFFSET=2d BOOT1_SIZE=128k -# -# Known filenames -# amd64: BOOTx64.efi -# arm64: BOOTaa64.efi -# arm: BOOTarm.efi -# i386: BOOTia32.efi -# -if [ -z "$2" ]; then - echo "Usage: $0 arch boot-filename" +if [ $(id -u) != 0 ]; then + echo "${0##*/}: must run as root" >&2 exit 1 fi -ARCH=$1 -FILENAME=$2 - -# Generate 800K FAT image -OUTPUT_FILE=fat-${ARCH}.tmpl - -dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE -DEVICE=`mdconfig -a -f $OUTPUT_FILE` -newfs_msdos -F 12 -L EFI $DEVICE -mkdir stub -mount -t msdosfs /dev/$DEVICE stub - -# Create and bless a directory for the boot loader -mkdir -p stub/efi/boot - -# Make a dummy file for boot1 -echo 'Boot1 START' | dd of=stub/efi/boot/$FILENAME cbs=$BOOT1_SIZE count=1 conv=block -# Provide a fallback startup.nsh -echo $FILENAME > stub/efi/boot/startup.nsh - -umount stub -mdconfig -d -u $DEVICE -rmdir stub - -# Locate the offset of the fake file -BOOT1_OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') - -# Convert to number of blocks -BOOT1_OFFSET=$(echo 0x$BOOT1_OFFSET | awk '{printf("%x\n",$1/512);}') - # Record maximum boot1 size in bytes case $BOOT1_SIZE in *k) @@ -72,11 +36,50 @@ echo "# \$FreeBSD\$" >> Makefile.fat echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat echo "BOOT1_MAXSIZE=$BOOT1_MAXSIZE" >> Makefile.fat -bzip2 $OUTPUT_FILE -echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu -echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu -echo "\$FreeBSD\$" >> $OUTPUT_FILE.bz2.uu +while read ARCH FILENAME; do + # Generate 800K FAT image + OUTPUT_FILE=fat-${ARCH}.tmpl -uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu -rm $OUTPUT_FILE.bz2 + dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE + DEVICE=`mdconfig -a -f $OUTPUT_FILE` + newfs_msdos -F 12 -L EFI $DEVICE + mkdir stub + mount -t msdosfs /dev/$DEVICE stub + # Create and bless a directory for the boot loader + mkdir -p stub/efi/boot + + # Make a dummy file for boot1 + echo 'Boot1 START' | dd of=stub/efi/boot/$FILENAME cbs=$BOOT1_SIZE count=1 conv=block + # Provide a fallback startup.nsh + echo $FILENAME > stub/efi/boot/startup.nsh + + umount stub + mdconfig -d -u $DEVICE + rmdir stub + + # Locate the offset of the fake file + OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') + + # Convert to number of blocks + OFFSET=$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') + + # Validate the offset + if [ $OFFSET != $BOOT1_OFFSET ]; then + echo "Incorrect offset $OFFSET != $BOOT1_OFFSET" >&2 + exit 1 + fi + + bzip2 $OUTPUT_FILE + echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu + echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu + echo "\$FreeBSD\$" >> $OUTPUT_FILE.bz2.uu + + uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu + rm $OUTPUT_FILE.bz2 +done < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96869E113F4; Mon, 11 Sep 2017 01:51:29 +0000 (UTC) (envelope-from scottl@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 6203F69FA2; Mon, 11 Sep 2017 01:51:29 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8B1pSqt053956; Mon, 11 Sep 2017 01:51:28 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8B1pRQR053947; Mon, 11 Sep 2017 01:51:27 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709110151.v8B1pRQR053947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 11 Sep 2017 01:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323412 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 01:51:29 -0000 Author: scottl Date: Mon Sep 11 01:51:27 2017 New Revision: 323412 URL: https://svnweb.freebsd.org/changeset/base/323412 Log: Add infrastructure for allocating multiple MSI-X interrupts. Also add more fine-tuned controls for allocating requests and replies. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_pci.c head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_pci.c head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mpr/mpr.c Mon Sep 11 01:51:27 2017 (r323412) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); static int mpr_diag_reset(struct mpr_softc *sc, int sleep_flag); static int mpr_init_queues(struct mpr_softc *sc); +static void mpr_resize_queues(struct mpr_softc *sc); static int mpr_message_unit_reset(struct mpr_softc *sc, int sleep_flag); static int mpr_transition_operational(struct mpr_softc *sc); static int mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t attaching); @@ -374,6 +375,46 @@ mpr_transition_operational(struct mpr_softc *sc) return (error); } +static void +mpr_resize_queues(struct mpr_softc *sc) +{ + int reqcr, prireqcr; + + /* + * Size the queues. Since the reply queues always need one free + * entry, we'll deduct one reply message here. The LSI documents + * suggest instead to add a count to the request queue, but I think + * that it's better to deduct from reply queue. + */ + prireqcr = MAX(1, sc->max_prireqframes); + prireqcr = MIN(prireqcr, sc->facts->HighPriorityCredit); + + reqcr = MAX(2, sc->max_reqframes); + reqcr = MIN(reqcr, sc->facts->RequestCredit); + + sc->num_reqs = prireqcr + reqcr; + sc->num_replies = MIN(sc->max_replyframes + sc->max_evtframes, + sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; + + /* + * Figure out the number of MSIx-based queues. If the firmware or + * user has done something crazy and not allowed enough credit for + * the queues to be useful then don't enable multi-queue. + */ + if (sc->facts->MaxMSIxVectors < 2) + sc->msi_msgs = 1; + + if (sc->msi_msgs > 1) { + sc->msi_msgs = MIN(sc->msi_msgs, mp_ncpus); + sc->msi_msgs = MIN(sc->msi_msgs, sc->facts->MaxMSIxVectors); + if (sc->num_reqs / sc->msi_msgs < 2) + sc->msi_msgs = 1; + } + + mpr_dprint(sc, MPR_INIT, "Sized queues to q=%d reqs=%d replies=%d\n", + sc->msi_msgs, sc->num_reqs, sc->num_replies); +} + /* * This is called during attach and when re-initializing due to a Diag Reset. * IOC Facts is used to allocate many of the structures needed by the driver. @@ -530,13 +571,7 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at MPI26_IOCFACTS_CAPABILITY_ATOMIC_REQ) sc->atomic_desc_capable = TRUE; - /* - * Size the queues. Since the reply queues always need one free - * entry, we'll just deduct one reply message here. - */ - sc->num_reqs = MIN(MPR_REQ_FRAMES, sc->facts->RequestCredit); - sc->num_replies = MIN(MPR_REPLY_FRAMES + MPR_EVT_REPLY_FRAMES, - sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; + mpr_resize_queues(sc); /* * Initialize all Tail Queues @@ -1146,11 +1181,11 @@ mpr_alloc_queues(struct mpr_softc *sc) struct mpr_queue *q; int nq, i; - nq = MIN(sc->msi_msgs, mp_ncpus); - sc->msi_msgs = nq; + nq = sc->msi_msgs; mpr_dprint(sc, MPR_INIT|MPR_XINFO, "Allocating %d I/O queues\n", nq); - sc->queues = malloc(sizeof(struct mpr_queue) * nq, M_MPR, M_NOWAIT|M_ZERO); + sc->queues = malloc(sizeof(struct mpr_queue) * nq, M_MPR, + M_NOWAIT|M_ZERO); if (sc->queues == NULL) return (ENOMEM); @@ -1562,11 +1597,16 @@ mpr_get_tunables(struct mpr_softc *sc) sc->mpr_debug = MPR_INFO | MPR_FAULT; sc->disable_msix = 0; sc->disable_msi = 0; + sc->max_msix = MPR_MSIX_MAX; sc->max_chains = MPR_CHAIN_FRAMES; sc->max_io_pages = MPR_MAXIO_PAGES; sc->enable_ssu = MPR_SSU_ENABLE_SSD_DISABLE_HDD; sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; sc->use_phynum = 1; + sc->max_reqframes = MPR_REQ_FRAMES; + sc->max_prireqframes = MPR_PRI_REQ_FRAMES; + sc->max_replyframes = MPR_REPLY_FRAMES; + sc->max_evtframes = MPR_EVT_REPLY_FRAMES; /* * Grab the global variables. @@ -1574,11 +1614,16 @@ mpr_get_tunables(struct mpr_softc *sc) TUNABLE_INT_FETCH("hw.mpr.debug_level", &sc->mpr_debug); TUNABLE_INT_FETCH("hw.mpr.disable_msix", &sc->disable_msix); TUNABLE_INT_FETCH("hw.mpr.disable_msi", &sc->disable_msi); + TUNABLE_INT_FETCH("hw.mpr.max_msix", &sc->max_msix); TUNABLE_INT_FETCH("hw.mpr.max_chains", &sc->max_chains); TUNABLE_INT_FETCH("hw.mpr.max_io_pages", &sc->max_io_pages); TUNABLE_INT_FETCH("hw.mpr.enable_ssu", &sc->enable_ssu); TUNABLE_INT_FETCH("hw.mpr.spinup_wait_time", &sc->spinup_wait_time); TUNABLE_INT_FETCH("hw.mpr.use_phy_num", &sc->use_phynum); + TUNABLE_INT_FETCH("hw.mpr.max_reqframes", &sc->max_reqframes); + TUNABLE_INT_FETCH("hw.mpr.max_prireqframes", &sc->max_prireqframes); + TUNABLE_INT_FETCH("hw.mpr.max_replyframes", &sc->max_replyframes); + TUNABLE_INT_FETCH("hw.mpr.max_evtframes", &sc->max_evtframes); /* Grab the unit-instance variables */ snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.debug_level", @@ -1593,6 +1638,10 @@ mpr_get_tunables(struct mpr_softc *sc) device_get_unit(sc->mpr_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->disable_msi); + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_msix", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_msix); + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_chains", device_get_unit(sc->mpr_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->max_chains); @@ -1617,6 +1666,22 @@ mpr_get_tunables(struct mpr_softc *sc) snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.use_phy_num", device_get_unit(sc->mpr_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->use_phynum); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_reqframes", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_reqframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_prireqframes", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_prireqframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_replyframes", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_replyframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.max_evtframes", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_evtframes); } static void @@ -1658,8 +1723,28 @@ mpr_setup_sysctl(struct mpr_softc *sc) "Disable the use of MSI-X interrupts"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "disable_msi", CTLFLAG_RD, &sc->disable_msi, 0, - "Disable the use of MSI interrupts"); + OID_AUTO, "max_msix", CTLFLAG_RD, &sc->max_msix, 0, + "User-defined maximum number of MSIX queues"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "msix_msgs", CTLFLAG_RD, &sc->msi_msgs, 0, + "Negotiated number of MSIX queues"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_reqframes", CTLFLAG_RD, &sc->max_reqframes, 0, + "Total number of allocated request frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_prireqframes", CTLFLAG_RD, &sc->max_prireqframes, 0, + "Total number of allocated high priority request frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_replyframes", CTLFLAG_RD, &sc->max_replyframes, 0, + "Total number of allocated reply frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_evtframes", CTLFLAG_RD, &sc->max_evtframes, 0, + "Total number of event frames allocated"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "firmware_version", CTLFLAG_RW, sc->fw_version, Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mpr/mpr_pci.c Mon Sep 11 01:51:27 2017 (r323412) @@ -262,23 +262,38 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) error = 0; msgs = 0; - if ((sc->disable_msix == 0) && - ((msgs = pci_msix_count(dev)) >= MPR_MSI_COUNT)) - error = mpr_alloc_msix(sc, MPR_MSI_COUNT); - if ((error != 0) && (sc->disable_msi == 0) && - ((msgs = pci_msi_count(dev)) >= MPR_MSI_COUNT)) - error = mpr_alloc_msi(sc, MPR_MSI_COUNT); - if (error != 0) { + if (sc->disable_msix == 0) { + msgs = pci_msix_count(dev); + mpr_dprint(sc, MPR_INIT, "Counted %d MSI-X messages\n", msgs); + msgs = min(msgs, sc->max_msix); + msgs = min(msgs, MPR_MSIX_MAX); + msgs = min(msgs, 1); /* XXX */ + if (msgs != 0) { + mpr_dprint(sc, MPR_INIT, "Attempting to allocate %d MSI-X " + "messages\n", msgs); + error = mpr_alloc_msix(sc, msgs); + } + } + if (((error != 0) || (msgs == 0)) && (sc->disable_msi == 0)) { + msgs = pci_msi_count(dev); + mpr_dprint(sc, MPR_INIT, "Counted %d MSI messages\n", msgs); + msgs = min(msgs, MPR_MSI_MAX); + if (msgs != 0) { + mpr_dprint(sc, MPR_INIT, "Attempting to allocated %d MSI " + "messages\n", MPR_MSI_MAX); + error = mpr_alloc_msi(sc, MPR_MSI_MAX); + } + } + if ((error != 0) || (msgs == 0)) { /* * If neither MSI or MSI-X are available, assume legacy INTx. * This also implies that there will be only 1 queue. */ + mpr_dprint(sc, MPR_INIT, "Falling back to legacy INTx\n"); sc->mpr_flags |= MPR_FLAGS_INTX; msgs = 1; - } else { + } else sc->mpr_flags |= MPR_FLAGS_MSI; - msgs = MPR_MSI_COUNT; /* XXX */ - } sc->msi_msgs = msgs; mpr_dprint(sc, MPR_INIT, "Allocated %d interrupts\n", msgs); @@ -318,6 +333,7 @@ mpr_pci_setup_interrupts(struct mpr_softc *sc) if (q->irq == NULL) { mpr_dprint(sc, MPR_ERROR|MPR_INIT, "Cannot allocate interrupt RID %d\n", rid); + sc->msi_msgs = i; break; } error = bus_setup_intr(dev, q->irq, @@ -326,6 +342,7 @@ mpr_pci_setup_interrupts(struct mpr_softc *sc) if (error) { mpr_dprint(sc, MPR_ERROR|MPR_INIT, "Cannot setup interrupt RID %d\n", rid); + sc->msi_msgs = i; break; } } Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mpr/mpr_sas.c Mon Sep 11 01:51:27 2017 (r323412) @@ -924,6 +924,9 @@ mpr_detach_sas(struct mpr_softc *sc) /* Make sure CAM doesn't wedge if we had to bail out early. */ mpr_lock(sc); + while (sassc->startup_refcount != 0) + mprsas_startup_decrement(sassc); + /* Deregister our async handler */ if (sassc->path != NULL) { xpt_register_async(0, mprsas_async, sc, sassc->path); Modified: head/sys/dev/mpr/mprvar.h ============================================================================== --- head/sys/dev/mpr/mprvar.h Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mpr/mprvar.h Mon Sep 11 01:51:27 2017 (r323412) @@ -37,13 +37,15 @@ #define MPR_DB_MAX_WAIT 2500 -#define MPR_REQ_FRAMES 1024 +#define MPR_REQ_FRAMES 2048 +#define MPR_PRI_REQ_FRAMES 128 #define MPR_EVT_REPLY_FRAMES 32 #define MPR_REPLY_FRAMES MPR_REQ_FRAMES #define MPR_CHAIN_FRAMES 2048 #define MPR_MAXIO_PAGES (-1) #define MPR_SENSE_LEN SSD_FULL_SIZE -#define MPR_MSI_COUNT 1 +#define MPR_MSI_MAX 1 +#define MPR_MSIX_MAX 96 #define MPR_SGE64_SIZE 12 #define MPR_SGE32_SIZE 8 #define MPR_SGC_SIZE 8 @@ -296,8 +298,6 @@ struct mpr_softc { #define MPR_FLAGS_GEN35_IOC (1 << 6) #define MPR_FLAGS_REALLOCATED (1 << 7) u_int mpr_debug; - u_int disable_msix; - u_int disable_msi; int msi_msgs; u_int atomic_desc_capable; int tm_cmds_active; @@ -446,7 +446,16 @@ struct mpr_softc { uint32_t SSU_refcount; uint8_t SSU_started; + /* Configuration tunables */ + u_int disable_msix; + u_int disable_msi; + u_int max_msix; + u_int max_reqframes; + u_int max_prireqframes; + u_int max_replyframes; + u_int max_evtframes; char exclude_ids[80]; + struct timeval lastfail; }; Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mps/mps.c Mon Sep 11 01:51:27 2017 (r323412) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); +static void mps_resize_queues(struct mps_softc *sc); static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); static int mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching); @@ -368,6 +369,46 @@ mps_transition_operational(struct mps_softc *sc) return (error); } +static void +mps_resize_queues(struct mps_softc *sc) +{ + int reqcr, prireqcr; + + /* + * Size the queues. Since the reply queues always need one free + * entry, we'll deduct one reply message here. The LSI documents + * suggest instead to add a count to the request queue, but I think + * that it's better to deduct from reply queue. + */ + prireqcr = MAX(1, sc->max_prireqframes); + prireqcr = MIN(prireqcr, sc->facts->HighPriorityCredit); + + reqcr = MAX(2, sc->max_reqframes); + reqcr = MIN(reqcr, sc->facts->RequestCredit); + + sc->num_reqs = prireqcr + reqcr; + sc->num_replies = MIN(sc->max_replyframes + sc->max_evtframes, + sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; + + /* + * Figure out the number of MSIx-based queues. If the firmware or + * user has done something crazy and not allowed enough credit for + * the queues to be useful then don't enable multi-queue. + */ + if (sc->facts->MaxMSIxVectors < 2) + sc->msi_msgs = 1; + + if (sc->msi_msgs > 1) { + sc->msi_msgs = MIN(sc->msi_msgs, mp_ncpus); + sc->msi_msgs = MIN(sc->msi_msgs, sc->facts->MaxMSIxVectors); + if (sc->num_reqs / sc->msi_msgs < 2) + sc->msi_msgs = 1; + } + + mps_dprint(sc, MPS_INIT, "Sized queues to q=%d reqs=%d replies=%d\n", + sc->msi_msgs, sc->num_reqs, sc->num_replies); +} + /* * This is called during attach and when re-initializing due to a Diag Reset. * IOC Facts is used to allocate many of the structures needed by the driver. @@ -518,13 +559,7 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at if (sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR) sc->control_TLR = TRUE; - /* - * Size the queues. Since the reply queues always need one free - * entry, we'll just deduct one reply message here. - */ - sc->num_reqs = MIN(MPS_REQ_FRAMES, sc->facts->RequestCredit); - sc->num_replies = MIN(MPS_REPLY_FRAMES + MPS_EVT_REPLY_FRAMES, - sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; + mps_resize_queues(sc); /* * Initialize all Tail Queues @@ -1121,11 +1156,11 @@ mps_alloc_queues(struct mps_softc *sc) struct mps_queue *q; int nq, i; - nq = MIN(sc->msi_msgs, mp_ncpus); - sc->msi_msgs = nq; + nq = sc->msi_msgs; mps_dprint(sc, MPS_INIT|MPS_XINFO, "Allocating %d I/O queues\n", nq); - sc->queues = malloc(sizeof(struct mps_queue) * nq, M_MPT2, M_NOWAIT|M_ZERO); + sc->queues = malloc(sizeof(struct mps_queue) * nq, M_MPT2, + M_NOWAIT|M_ZERO); if (sc->queues == NULL) return (ENOMEM); @@ -1423,11 +1458,16 @@ mps_get_tunables(struct mps_softc *sc) sc->mps_debug = MPS_INFO|MPS_FAULT; sc->disable_msix = 0; sc->disable_msi = 0; + sc->max_msix = MPS_MSIX_MAX; sc->max_chains = MPS_CHAIN_FRAMES; sc->max_io_pages = MPS_MAXIO_PAGES; sc->enable_ssu = MPS_SSU_ENABLE_SSD_DISABLE_HDD; sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; sc->use_phynum = 1; + sc->max_reqframes = MPS_REQ_FRAMES; + sc->max_prireqframes = MPS_PRI_REQ_FRAMES; + sc->max_replyframes = MPS_REPLY_FRAMES; + sc->max_evtframes = MPS_EVT_REPLY_FRAMES; /* * Grab the global variables. @@ -1435,11 +1475,16 @@ mps_get_tunables(struct mps_softc *sc) TUNABLE_INT_FETCH("hw.mps.debug_level", &sc->mps_debug); TUNABLE_INT_FETCH("hw.mps.disable_msix", &sc->disable_msix); TUNABLE_INT_FETCH("hw.mps.disable_msi", &sc->disable_msi); + TUNABLE_INT_FETCH("hw.mps.max_msix", &sc->max_msix); TUNABLE_INT_FETCH("hw.mps.max_chains", &sc->max_chains); TUNABLE_INT_FETCH("hw.mps.max_io_pages", &sc->max_io_pages); TUNABLE_INT_FETCH("hw.mps.enable_ssu", &sc->enable_ssu); TUNABLE_INT_FETCH("hw.mps.spinup_wait_time", &sc->spinup_wait_time); TUNABLE_INT_FETCH("hw.mps.use_phy_num", &sc->use_phynum); + TUNABLE_INT_FETCH("hw.mps.max_reqframes", &sc->max_reqframes); + TUNABLE_INT_FETCH("hw.mps.max_prireqframes", &sc->max_prireqframes); + TUNABLE_INT_FETCH("hw.mps.max_replyframes", &sc->max_replyframes); + TUNABLE_INT_FETCH("hw.mps.max_evtframes", &sc->max_evtframes); /* Grab the unit-instance variables */ snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.debug_level", @@ -1454,6 +1499,10 @@ mps_get_tunables(struct mps_softc *sc) device_get_unit(sc->mps_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->disable_msi); + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_msix", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_msix); + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_chains", device_get_unit(sc->mps_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->max_chains); @@ -1478,6 +1527,23 @@ mps_get_tunables(struct mps_softc *sc) snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.use_phy_num", device_get_unit(sc->mps_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->use_phynum); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_reqframes", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_reqframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_prireqframes", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_prireqframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_replyframes", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_replyframes); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_evtframes", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->max_evtframes); + } static void @@ -1521,6 +1587,30 @@ mps_setup_sysctl(struct mps_softc *sc) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "disable_msi", CTLFLAG_RD, &sc->disable_msi, 0, "Disable the use of MSI interrupts"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_msix", CTLFLAG_RD, &sc->max_msix, 0, + "User-defined maximum number of MSIX queues"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "msix_msgs", CTLFLAG_RD, &sc->msi_msgs, 0, + "Negotiated number of MSIX queues"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_reqframes", CTLFLAG_RD, &sc->max_reqframes, 0, + "Total number of allocated request frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_prireqframes", CTLFLAG_RD, &sc->max_prireqframes, 0, + "Total number of allocated high priority request frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_replyframes", CTLFLAG_RD, &sc->max_replyframes, 0, + "Total number of allocated reply frames"); + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "max_evtframes", CTLFLAG_RD, &sc->max_evtframes, 0, + "Total number of event frames allocated"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "firmware_version", CTLFLAG_RW, sc->fw_version, Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mps/mps_pci.c Mon Sep 11 01:51:27 2017 (r323412) @@ -247,23 +247,38 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) error = 0; msgs = 0; - if ((sc->disable_msix == 0) && - ((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT)) - error = mps_alloc_msix(sc, MPS_MSI_COUNT); - if ((error != 0) && (sc->disable_msi == 0) && - ((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT)) - error = mps_alloc_msi(sc, MPS_MSI_COUNT); - if (error != 0) { + if (sc->disable_msix == 0) { + msgs = pci_msix_count(dev); + mps_dprint(sc, MPS_INIT, "Counted %d MSI-X messages\n", msgs); + msgs = min(msgs, sc->max_msix); + msgs = min(msgs, MPS_MSIX_MAX); + msgs = min(msgs, 1); /* XXX */ + if (msgs != 0) { + mps_dprint(sc, MPS_INIT, "Attempting to allocate %d MSI-X " + "messages\n", msgs); + error = mps_alloc_msix(sc, msgs); + } + } + if (((error != 0) || (msgs == 0)) && (sc->disable_msi == 0)) { + msgs = pci_msi_count(dev); + mps_dprint(sc, MPS_INIT, "Counted %d MSI messages\n", msgs); + msgs = min(msgs, MPS_MSI_MAX); + if (msgs != 0) { + mps_dprint(sc, MPS_INIT, "Attempting to allocate %d MSI " + "messages\n", MPS_MSI_MAX); + error = mps_alloc_msi(sc, MPS_MSI_MAX); + } + } + if ((error != 0) || (msgs == 0)) { /* * If neither MSI or MSI-X are avaiable, assume legacy INTx. * This also implies that there will be only 1 queue. */ + mps_dprint(sc, MPS_INIT, "Falling back to legacy INTx\n"); sc->mps_flags |= MPS_FLAGS_INTX; msgs = 1; - } else { + } else sc->mps_flags |= MPS_FLAGS_MSI; - msgs = 1; /* XXX */ - } sc->msi_msgs = msgs; mps_dprint(sc, MPS_INIT, "Allocated %d interrupts\n", msgs); @@ -302,7 +317,8 @@ mps_pci_setup_interrupts(struct mps_softc *sc) &q->irq_rid, RF_ACTIVE); if (q->irq == NULL) { mps_dprint(sc, MPS_ERROR|MPS_INIT, - "Cannot allocate interrupt RID%d\n", rid); + "Cannot allocate interrupt RID %d\n", rid); + sc->msi_msgs = i; break; } error = bus_setup_intr(dev, q->irq, @@ -311,6 +327,7 @@ mps_pci_setup_interrupts(struct mps_softc *sc) if (error) { mps_dprint(sc, MPS_ERROR|MPS_INIT, "Cannot setup interrupt RID %d\n", rid); + sc->msi_msgs = i; break; } } Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mps/mps_sas.c Mon Sep 11 01:51:27 2017 (r323412) @@ -871,6 +871,9 @@ mps_detach_sas(struct mps_softc *sc) /* Make sure CAM doesn't wedge if we had to bail out early. */ mps_lock(sc); + while (sassc->startup_refcount != 0) + mpssas_startup_decrement(sassc); + /* Deregister our async handler */ if (sassc->path != NULL) { xpt_register_async(0, mpssas_async, sc, sassc->path); Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Mon Sep 11 01:26:26 2017 (r323411) +++ head/sys/dev/mps/mpsvar.h Mon Sep 11 01:51:27 2017 (r323412) @@ -37,13 +37,15 @@ #define MPS_DB_MAX_WAIT 2500 -#define MPS_REQ_FRAMES 1024 +#define MPS_REQ_FRAMES 2048 +#define MPS_PRI_REQ_FRAMES 128 #define MPS_EVT_REPLY_FRAMES 32 #define MPS_REPLY_FRAMES MPS_REQ_FRAMES #define MPS_CHAIN_FRAMES 2048 #define MPS_MAXIO_PAGES (-1) #define MPS_SENSE_LEN SSD_FULL_SIZE -#define MPS_MSI_COUNT 1 +#define MPS_MSI_MAX 1 +#define MPS_MSIX_MAX 16 #define MPS_SGE64_SIZE 12 #define MPS_SGE32_SIZE 8 #define MPS_SGC_SIZE 8 @@ -292,8 +294,6 @@ struct mps_softc { #define MPS_FLAGS_WD_AVAILABLE (1 << 6) #define MPS_FLAGS_REALLOCATED (1 << 7) u_int mps_debug; - u_int disable_msix; - u_int disable_msi; u_int msi_msgs; int tm_cmds_active; int io_cmds_active; @@ -437,12 +437,21 @@ struct mps_softc { uint64_t DD_max_lba; struct mps_column_map DD_column_map[MPS_MAX_DISKS_IN_VOL]; - char exclude_ids[80]; - struct timeval lastfail; - /* StartStopUnit command handling at shutdown */ uint32_t SSU_refcount; uint8_t SSU_started; + + /* Configuration tunables */ + u_int disable_msix; + u_int disable_msi; + u_int max_msix; + u_int max_reqframes; + u_int max_prireqframes; + u_int max_replyframes; + u_int max_evtframes; + char exclude_ids[80]; + + struct timeval lastfail; }; struct mps_config_params { From owner-svn-src-head@freebsd.org Mon Sep 11 01:56:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D89E117C4; Mon, 11 Sep 2017 01:56:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 275CB6A374; Mon, 11 Sep 2017 01:56:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id F048D1A28D8; Mon, 11 Sep 2017 11:56:21 +1000 (AEST) Date: Mon, 11 Sep 2017 11:56:21 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323393 - in head/sys: sys vm In-Reply-To: <201709101900.v8AJ0c2N059845@repo.freebsd.org> Message-ID: <20170911111127.B870@besplex.bde.org> References: <201709101900.v8AJ0c2N059845@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.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=pGeDZM4jIChbch_9Z3sA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 01:56:31 -0000 On Sun, 10 Sep 2017, Mateusz Guzik wrote: > Log: > Move vmmeter atomic counters into dedicated cache lines > > Prior to the change they were subject to extreme false sharing. > In particular this change shaves about 3 seconds real time of -j 80 buildkernel. Changes that small are hard to measure. Kernel builds take about 3 seconds real time altogether (cheating slightly -- this is for a FreeBSD-4 kernel where the sources are held constant to provide a benchmark and a bloatometer for newer kernels and userlands which take 10-20 times longer). > Modified: head/sys/sys/vmmeter.h > ============================================================================== > --- head/sys/sys/vmmeter.h Sun Sep 10 18:08:25 2017 (r323392) > +++ head/sys/sys/vmmeter.h Sun Sep 10 19:00:38 2017 (r323393) > @@ -60,6 +60,12 @@ struct vmtotal { > #if defined(_KERNEL) || defined(_WANT_VMMETER) > #include > > +#ifdef _KERNEL > +#define VMMETER_ALIGNED __aligned(CACHE_LINE_SIZE) > +#else > +#define VMMETER_ALIGNED > +#endif > + Using this breaks the "ABI" which is used by at least vmstat(1). This has some style bugs: - verbose macro name. Using this unimproves the formatting later. - space instead of tab after #define. This vfile is vaguely KNF-conformant and had only 1 instance of this style bug before (for the idempotency ifndef, which has 3 other style bugs: - missing blank line before its #endif - tab instead of space before the comment on its #endif - backwards comment on its #endif). > /* > * System wide statistics counters. > * Locking: > @@ -126,14 +132,15 @@ struct vmmeter { > u_int v_free_target; /* (c) pages desired free */ > u_int v_free_min; /* (c) pages desired free */ > u_int v_free_count; /* (f) pages free */ > - u_int v_wire_count; /* (a) pages wired down */ > - u_int v_active_count; /* (q) pages active */ > u_int v_inactive_target; /* (c) pages desired inactive */ > - u_int v_inactive_count; /* (q) pages inactive */ > - u_int v_laundry_count; /* (q) pages eligible for laundering */ Moving these also breaks the "ABI". > u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ > u_int v_interrupt_free_min; /* (c) reserved pages for int code */ > u_int v_free_severe; /* (c) severe page depletion point */ > + u_int v_wire_count VMMETER_ALIGNED; /* (a) pages wired down */ The more complicated declaration unimproves the formatting, especially since the macro name is so long. Is there a technical reason to move to the end? style(9) requires sorting on alignment, with the most aligned fields first, not last (it says to sort on size, but means alignment). Is there a reason to reverse this here. > + u_int v_active_count VMMETER_ALIGNED; /* (a) pages active */ > + u_int v_inactive_count VMMETER_ALIGNED; /* (a) pages inactive */ > + u_int v_laundry_count VMMETER_ALIGNED; /* (a) pages eligible for > + laundering */ This does more than move the other fields and unimprove their formatting. It also changes the lock annotations from (q) to (a). The formatting is ugliest for the last field. Naming the macro something like VMMA would things fit better. It is stupid to abbreviate VIRTUAL_MEMORY to VM but spell out ALIGNED, especially when the former is global and the latter is local. If the namespace were documented, then the documentation would say that vm, v_ and VM* are reserved, perhaps without underscores, so it would not be namespace pollution to use VMMA. The full undocumented namespace in this file seems to be: - MAXSLP - vm* (used without an underscore for struct vmtotal - t_* - unknown nested pollution in - v_* - VM_* But no VM* without an underscore before VMMETER_ALIGNED. I don't know of any man page where this is undocumented. The only man pages that refers to vmmeter.h is vm_set_page_size(9). The only other man page that refers to vm_cnt is memguard(9). Bruce From owner-svn-src-head@freebsd.org Mon Sep 11 07:30:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2A2BE20D2C; Mon, 11 Sep 2017 07:30:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A5EA74878; Mon, 11 Sep 2017 07:30:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qk0-x235.google.com with SMTP id o129so16878852qkd.0; Mon, 11 Sep 2017 00:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=z40iQcK1NPHxWlF7Hc+DnTezziUcNTiDUQac3eIJM/k=; b=PjGEXDyhbcXoN4q2R2bbiiiqHgIBzAWKZSCaUGdV0/24qFZrR2YXrs+N7GpF6pEnTW 3N8HKHdyNyYk9A2JH/hjYIrntr8AX0zXEB/70fwW2JxaI1afvPWnTJ4YoWQAs1UBCnMS 1kyPQQVfeGoTzOwdah5IKb1taT41aIV9gfJ9L1GKqnVPXGyePTMV7ZOnEsiJGWi/goOV xGixKkzsoVg/eSr8cOjGLP4w9OM+UNz7iPVFMivwfyCFFzkL8obzMcYOyzvpD6JANOHB aUyra8CsNPI9qlyV5kBKQQgQ5YEGXQKnoAiGe9n6R6SvEPk77ybyRoafXn3i4yLp6I2n yXZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z40iQcK1NPHxWlF7Hc+DnTezziUcNTiDUQac3eIJM/k=; b=ULoznsd/y2M0ajMaujjuNOs4F0JMliJyeatANCSeFKi5JgFsMZfIV7gM3VNOLcfmgN XE28rUAy78fICHM85bNKQ8dhzltacKt09LMHWbwmekqb2kKatJAE9DuNkztpa7MuyKQH v5RlN5T+wjOCoFWu3J3YGljzBmmvOztHmKY2FwOfPJYz3u0IdRoO7uYQ8LHCj29BwHyJ dZiqen4KvHbAhOhm6W2+YkFjne5bsWVob4cyenAniSn6g/mRTqGEpT/k7uFCIVaqutNY W64lQ/9g6d019tgLDloFBoWs1S49XB6sDrn2IVtOcUHLK+UfR2Q2Zxxk6iOIAhTw2YsI mAGw== X-Gm-Message-State: AHPjjUjKljtkgjxs9XFoGOud11v8au3aaVe26ithvWML/4i/y08uMFGn 4jhX9M/EzZ4wxgeSbQ1G6KYTirF38Q== X-Google-Smtp-Source: AOwi7QCQTgXpuyz6kN5zFWYZUVMm55Dw5lChm5lVAsADlpdChCoaRoAWEngHxQAALnxhffMP5NjUy8ufbKyP/wOvap8= X-Received: by 10.55.151.135 with SMTP id z129mr14730772qkd.119.1505115011399; Mon, 11 Sep 2017 00:30:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.63.54 with HTTP; Mon, 11 Sep 2017 00:30:10 -0700 (PDT) In-Reply-To: <20170911111127.B870@besplex.bde.org> References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> From: Mateusz Guzik Date: Mon, 11 Sep 2017 09:30:10 +0200 Message-ID: Subject: Re: svn commit: r323393 - in head/sys: sys vm To: Bruce Evans Cc: Mateusz Guzik , "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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 07:30:12 -0000 On Mon, Sep 11, 2017 at 11:56:21AM +1000, Bruce Evans wrote: > On Sun, 10 Sep 2017, Mateusz Guzik wrote: > > > Log: > > Move vmmeter atomic counters into dedicated cache lines > > > > Prior to the change they were subject to extreme false sharing. > > In particular this change shaves about 3 seconds real time of -j 80 buildkernel. > > Changes that small are hard to measure. Kernel builds take about 3 seconds > real time altogether (cheating slightly -- this is for a FreeBSD-4 kernel > where the sources are held constant to provide a benchmark and a bloatometer > for newer kernels and userlands which take 10-20 times longer). > Well, for me building 11.0 on tmpfs with 11.0 world reliably takes 1:25 (and now 1:22). > > Modified: head/sys/sys/vmmeter.h > > ============================================================================== > > --- head/sys/sys/vmmeter.h Sun Sep 10 18:08:25 2017 (r323392) > > +++ head/sys/sys/vmmeter.h Sun Sep 10 19:00:38 2017 (r323393) > > @@ -60,6 +60,12 @@ struct vmtotal { > > #if defined(_KERNEL) || defined(_WANT_VMMETER) > > #include > > > > +#ifdef _KERNEL > > +#define VMMETER_ALIGNED __aligned(CACHE_LINE_SIZE) > > +#else > > +#define VMMETER_ALIGNED > > +#endif > > + > > Using this breaks the "ABI" which is used by at least vmstat(1). > > This has some style bugs: > - verbose macro name. Using this unimproves the formatting later. > - space instead of tab after #define. This vfile is vaguely KNF-conformant > and had only 1 instance of this style bug before (for the idempotency > ifndef, which has 3 other style bugs: > - missing blank line before its #endif > - tab instead of space before the comment on its #endif > - backwards comment on its #endif). > > > /* > > * System wide statistics counters. > > * Locking: > > @@ -126,14 +132,15 @@ struct vmmeter { > > u_int v_free_target; /* (c) pages desired free */ > > u_int v_free_min; /* (c) pages desired free */ > > u_int v_free_count; /* (f) pages free */ > > - u_int v_wire_count; /* (a) pages wired down */ > > - u_int v_active_count; /* (q) pages active */ > > u_int v_inactive_target; /* (c) pages desired inactive */ > > - u_int v_inactive_count; /* (q) pages inactive */ > > - u_int v_laundry_count; /* (q) pages eligible for laundering */ > > Moving these also breaks the "ABI". > The original patched attempted to preserve it, but I was told it does not matter. Apparently that's indeed true, as evidenced by another change made few months ago which introduce counter type. > > u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ > > u_int v_interrupt_free_min; /* (c) reserved pages for int code */ > > u_int v_free_severe; /* (c) severe page depletion point */ > > + u_int v_wire_count VMMETER_ALIGNED; /* (a) pages wired down */ > > The more complicated declaration unimproves the formatting, especially > since the macro name is so long. See way below. > Is there a technical reason to move to the end? style(9) requires > sorting on alignment, with the most aligned fields first, not last > (it says to sort on size, but means alignment). Is there a reason > to reverse this here. > There is. The annotation only guarantees the address of the field will be aligned. Whatever follows in the struct will start filling the same cacheline, unless annotated as well. i.e. in order to prevent the next field from collapsing into the line, the top of the struct would have to look like this: u_int v_wire_count VMMETER_ALIGNED; /* (a) pages wired down */ u_int v_active_count VMMETER_ALIGNED; /* (a) pages active */ u_int v_inactive_count VMMETER_ALIGNED; /* (a) pages inactive */ u_int v_laundry_count VMMETER_ALIGNED; /* (a) pages eligible for counter_u64_t v_swtch VMMETER_ALIGNED; That's significantly crappier. __exclusive_cache_line annotation of the vm_cnt object itself puts it into a dedicated section where the linker guarantees whatever folllows will not share the line. > > + u_int v_active_count VMMETER_ALIGNED; /* (a) pages active */ > > + u_int v_inactive_count VMMETER_ALIGNED; /* (a) pages inactive */ > > + u_int v_laundry_count VMMETER_ALIGNED; /* (a) pages eligible for > > + laundering */ > > This does more than move the other fields and unimprove their formatting. > It also changes the lock annotations from (q) to (a). > > The formatting is ugliest for the last field. > Agreed. > Naming the macro something like VMMA would things fit better. It is > stupid to abbreviate VIRTUAL_MEMORY to VM but spell out ALIGNED, > especially when the former is global and the latter is local. If > the namespace were documented, then the documentation would say that > vm, v_ and VM* are reserved, perhaps without underscores, so it would > not be namespace pollution to use VMMA. > I'm beyond indifferent on how to name the macro. This name was suggested in the review and I just rolled with it. If you want it changed, please argue with alc and/or markj. That said, looking now at the struct I think its use should be retired from the kernel. It can remain in headers for userspace use. First, there is a bunch of counter(9) fields. I don't know the original reasoning. I would expect these counters to be statically defined in a per-cpu struct. Then we are left with a bunch of read-only fields. They can be grouped together in a __read_mostly annotated object. One field with the free page queue lock is v_free_count. It can be annotated by hand in whatever way makes sense. And then there are the 4 atomics. They can just be regular globals with __exclusive_cache_line. However, I'm not interested in pursuing this. My primary motivation for the change here was to get rid of an obvious & important bottleneck and to stabilize performance over time. Interestingly, as different kernel versions produce different binaries, the vm_cnt object's offset within whatever cacheline it used was changing. This in turn was altering false sharing, making performance fluctuate a little bit. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Mon Sep 11 07:38:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79E63E211D5; Mon, 11 Sep 2017 07:38:54 +0000 (UTC) (envelope-from tsoome@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 492BA74CEB; Mon, 11 Sep 2017 07:38:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8B7crLx096503; Mon, 11 Sep 2017 07:38:53 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8B7crWh096502; Mon, 11 Sep 2017 07:38:53 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709110738.v8B7crWh096502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 11 Sep 2017 07:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323428 - head/sys/boot/efi/loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/loader X-SVN-Commit-Revision: 323428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 07:38:54 -0000 Author: tsoome Date: Mon Sep 11 07:38:53 2017 New Revision: 323428 URL: https://svnweb.freebsd.org/changeset/base/323428 Log: r323389 breaks the kernel build when WITHOUT_ZFS is defined in src.conf Need to add #ifdef EFI_ZFS_BOOT guard into efi/loader/main.c PR: 222215 Reported by: Sylvain Garrigues Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Mon Sep 11 07:24:56 2017 (r323427) +++ head/sys/boot/efi/loader/main.c Mon Sep 11 07:38:53 2017 (r323428) @@ -872,16 +872,20 @@ command_chain(int argc, char *argv[]) } if (efi_getdev((void **)&dev, name, (const char **)&path) == 0) { +#ifdef EFI_ZFS_BOOT struct zfs_devdesc *z_dev; +#endif struct disk_devdesc *d_dev; pdinfo_t *hd, *pd; switch (dev->d_type) { +#ifdef EFI_ZFS_BOOT case DEVT_ZFS: z_dev = (struct zfs_devdesc *)dev; loaded_image->DeviceHandle = efizfs_get_handle_by_guid(z_dev->pool_guid); break; +#endif case DEVT_NET: loaded_image->DeviceHandle = efi_find_handle(dev->d_dev, dev->d_unit); From owner-svn-src-head@freebsd.org Mon Sep 11 08:24:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADE9E228FE; Mon, 11 Sep 2017 08:24:37 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com [74.125.83.43]) (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 A04FB76B1C; Mon, 11 Sep 2017 08:24:36 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f43.google.com with SMTP id v66so14080541pgb.5; Mon, 11 Sep 2017 01:24:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=myqUI/i9PDNN8Z7TUanq5/5WhbTtGPLVzTw4w9YW0Gg=; b=Lbl9vvqhHVNa9s5VUdMoU2274RaZHlOWrpDmAu1MXFuBbfkmAN4nOQLJJE0SNFAdQc aMg3hCBQ/Qbg5/skPpUZ6cBfN7mhjZe12MFEjG7yDA9UW+sq8hDCEiU1nOhUNBCHn+vc /5v0Zvu/5s2oxUEUXCLcVqoVH2N1sgFdgxESc7973Z8DKde7XfQjUWeBm388XQQgq3j9 SRic3C0oeu2fyqq+yOlffyzrfxxbQwE++79GeF2Y2N0GfnIs095jZb+6v7LGv3zC9+sN lLekMPlDRtA//0Y2QkmO2kmPCVpv1VmnwX/w5MZKeV0oeoBvN4wW2PmtTBClmjCRz7G/ DvlQ== X-Gm-Message-State: AHPjjUjoLsrZOGuQien5qgzlJWBSHQvJSFygM8WnMWfbLknEt/FjepWC zJ4iHt8JQnAPYcoLp7fE8A== X-Received: by 10.84.218.7 with SMTP id q7mr12964467pli.111.1505118269902; Mon, 11 Sep 2017 01:24:29 -0700 (PDT) Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com. [74.125.83.42]) by smtp.gmail.com with ESMTPSA id i63sm16320050pfk.34.2017.09.11.01.24.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 01:24:29 -0700 (PDT) Received: by mail-pg0-f42.google.com with SMTP id i130so6765782pgc.3; Mon, 11 Sep 2017 01:24:29 -0700 (PDT) X-Google-Smtp-Source: ADKCNb4wFbimr43Mcpc5cqzEZAh/Z/rl0NsDBNUqNdU4MOGYoicFvZzSVP+IO87RlBPznBxgv2u70ZiOF9iFumK1hnY= X-Received: by 10.98.74.4 with SMTP id x4mr10946767pfa.222.1505118268555; Mon, 11 Sep 2017 01:24:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.189.73 with HTTP; Mon, 11 Sep 2017 01:24:27 -0700 (PDT) In-Reply-To: References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> From: Ryan Libby Date: Mon, 11 Sep 2017 01:24:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323393 - in head/sys: sys vm To: Mateusz Guzik Cc: Bruce Evans , Mateusz Guzik , "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.23 Precedence: list List-Id: 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, 11 Sep 2017 08:24:37 -0000 On Mon, Sep 11, 2017 at 12:30 AM, Mateusz Guzik wrote: [...] > That said, looking now at the struct I think its use should be retired > from the kernel. It can remain in headers for userspace use. > > First, there is a bunch of counter(9) fields. I don't know the original > reasoning. I would expect these counters to be statically defined in a > per-cpu struct. The actual counter(9) counters are per-CPU. These are just offsets into the PCPU area. See r317061 / D10156 (recent work by glebius). From owner-svn-src-head@freebsd.org Mon Sep 11 08:37:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18046E2325E; Mon, 11 Sep 2017 08:37:53 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::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 C30D77736B; Mon, 11 Sep 2017 08:37:52 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x229.google.com with SMTP id i50so17620366qtf.0; Mon, 11 Sep 2017 01:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ijWwq+oT8rK2dxuriAT6ZjoJBnRmihr+1megLS2FULM=; b=qObFnhKVKewBsGCS5/eGAPbavhd3JSMVFlUSpsNSykDTb0SLU5HxZw0Tc45Shrcwvq 80RT/Mr/ENLd1g0lDZa9bIgQbpVC6VWqwEwMiJvPGAShaIrEpVPwPUgxymBim3Bau7NH jHvcoEPgXFxTtKFsKsDU3qA8a+z6HaeXCbmfiBi8pJ2+uYRHo78BXi52cdKVFs6TIkGN EYfRcxV2oYPZ3U0Gt6aFQnvsF+oWWZwRwl3ajY3basuPFdcxpfaLW+6AuGYEmFSMbaVP 5B8gl955IPjjd9JSfJruX3j1wnEVSVuLYnFraardt407xtC1xLj8qdJuv7UH6BE7nwe/ BS7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ijWwq+oT8rK2dxuriAT6ZjoJBnRmihr+1megLS2FULM=; b=dAqS9wmvMnflJQNv8PKYlKnqdrKxBMxTGjvelTW5qwffcz8XmkZo17R8ZKK3MCpILi TrFJCNWanQ8ii/7KAOa78N3VRr7V7AkY6m8Ql2i2PkwLH6v4hlSU6V4TjjAIrtlzjTUM 7PS3kvbbX6yBvSotiobagVpZ5q/xCKLcUO2MbC2KszHi477QS68qUnvQnRDOvnm+oP6T T0TB2YN0CgKlex7Choohvl1JpeTSqOHh2jN+QcrylJmkNiFjjk4u7jRNG03OMlwcureT Ir800W/FFz12/dqGpvwaLkj+xwFJIGdEp4HJTdT0Fj8eWq6wKnhZorHQ9qkfZq0OSsfU 2VyQ== X-Gm-Message-State: AHPjjUgjXPBTfK+nC1raBchFYBiUGSGHbDFWE2feCs9qqeahmdP3QRzT YtxKwH/h55vuL4E1mGBIdwAPkKCoorou X-Google-Smtp-Source: AOwi7QA2TE2W+sEkr265m4hvfVgT8aLrukoYnAJX0wvT1BBnIB6pNlgaCAduhUutOAad8/EqjCjMsQGIP8aS82P4Pzc= X-Received: by 10.200.35.65 with SMTP id b1mr14281106qtb.329.1505119071916; Mon, 11 Sep 2017 01:37:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.43.121 with HTTP; Mon, 11 Sep 2017 01:37:50 -0700 (PDT) In-Reply-To: References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> From: Mateusz Guzik Date: Mon, 11 Sep 2017 10:37:50 +0200 Message-ID: Subject: Re: svn commit: r323393 - in head/sys: sys vm To: Ryan Libby Cc: Bruce Evans , Mateusz Guzik , "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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 08:37:53 -0000 On Mon, Sep 11, 2017 at 10:24 AM, Ryan Libby wrote: > On Mon, Sep 11, 2017 at 12:30 AM, Mateusz Guzik wrote: > [...] > > That said, looking now at the struct I think its use should be retired > > from the kernel. It can remain in headers for userspace use. > > > > First, there is a bunch of counter(9) fields. I don't know the original > > reasoning. I would expect these counters to be statically defined in a > > per-cpu struct. > > The actual counter(9) counters are per-CPU. These are just offsets into > the PCPU area. See r317061 / D10156 (recent work by glebius). > I mean their ids are allocated on boot, even though these counters are always present and could be resolved at compilation time. So in order to update them you have to fetch the id, as opposed to having the code just do the right thing. I.e. for stuff which is always there we should just have well known offsets into per-cpu tables. But I'm not going to try to flame a patch in (or write one). -- Mateusz Guzik From owner-svn-src-head@freebsd.org Mon Sep 11 09:39:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 787E6E00C91; Mon, 11 Sep 2017 09:39:37 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 45F627DE76; Mon, 11 Sep 2017 09:39:36 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [IPv6:2a02:c7f:1e13:cf00:3c1a:19f3:83ee:e4f0] (unknown [IPv6:2a02:c7f:1e13:cf00:3c1a:19f3:83ee:e4f0]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 3D87C4ECC6; Mon, 11 Sep 2017 09:39:00 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r323362 - in head/sys: conf dev/neta From: Andrew Turner In-Reply-To: <201709091154.v89Bs4b9094975@repo.freebsd.org> Date: Mon, 11 Sep 2017 10:38:57 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <30B40281-5114-4C72-A9F2-408342BA8216@fubar.geek.nz> References: <201709091154.v89Bs4b9094975@repo.freebsd.org> To: Marcin Wojtas X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 09:39:37 -0000 > On 9 Sep 2017, at 12:54, Marcin Wojtas wrote: >=20 > Author: mw > Date: Sat Sep 9 11:54:04 2017 > New Revision: 323362 > URL: https://svnweb.freebsd.org/changeset/base/323362 >=20 > Log: > Add support for Armada 3700 in the NETA driver >=20 > This patch enables using NETA driver on Marvell Armada 3700 SoC > by introducing new compatible string, modifying clock source > obtaining and also excluding unnecessary parts. > The driver is added as a build option for arm64 platforms as well. I=E2=80=99m getting the following when trying to build with gcc (I have = initial patches to build arm64 with gcc form ports). Andrew --- if_mvneta.o --- = /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mvn= eta.c:101:1: error: function declaration isn't a prototype = [-Werror=3Dstrict-prototypes] mvneta_get_clk() ^~~~~~~~~~~~~~ = /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mvn= eta.c: In function 'mvneta_detach': = /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mvn= eta.c:834:16: warning: variable 'ifp' set but not used = [-Wunused-but-set-variable] struct ifnet *ifp; ^~~ From owner-svn-src-head@freebsd.org Mon Sep 11 10:00:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39982E01999 for ; Mon, 11 Sep 2017 10:00:14 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::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 F0A037E7CA for ; Mon, 11 Sep 2017 10:00:13 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-it0-x231.google.com with SMTP id v19so13198625ite.0 for ; Mon, 11 Sep 2017 03:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ByMVD8iT/6lwBdG2kJ4snoT87dtf0l+HFPpr/g8rqdw=; b=Z/jkkljUCigk4h0g+sr2s+T2BhdwHGdD4pAqmZJGiOC4hS7l9DeOBfNDQU9L3hl6CH RORgbuvv5M+1+j4GuwWH6FV7PZzWkhowxRk1ILHASH0njUgePhJ/KYprXUvtW1FkuDT6 HU/1GnYO0UnuErivEXkLOdeM3oIyLGx1uT2v/MEjJ2qv5in/AZRP3jGFX85Dx5DA8IA+ M6atLwNMLuupsffOj9iEwhFndPpXz8Kyg82TL9vnJGTUWBP2CpAEgTzaqFSNdHXRguT9 4voPW5JEmx/ZciD+KYnGz1bpegaQ8jDQ4VcSiiQRcF0HlJJOhHFJUOW/OTAQuidgea2B ZLOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ByMVD8iT/6lwBdG2kJ4snoT87dtf0l+HFPpr/g8rqdw=; b=SuF8LYsQsO9j4krSgZqNhBzCvCsjF9FVj1NyNgx2JxGIcHi57b8aIQm2y1T4CtgJdr jcWSF930gQm+Jl9yrpR6o3NeDBVqavLvhpZBLMc5m3Mk6PaVQexa7ivnOPKEYixmKdVU jjS/4Q9t+muyUhVUqIV+yXRW4AK+7g3ZjMJh05F8IMvR/vKbUvEALz1U0u+peL+ZtLVr o612dhZxVKetDxdUTCjN/44PF7bRJRqfUzK0x7RPSvIMDpdC0rTgA+klgnP9Lw4GXeF/ 154OUPjAAtceBadG3U14NCd6nmEji3vdPoW6Hsifj30q06qSiPHveJXRyef4ezHr6PG+ xS9g== X-Gm-Message-State: AHPjjUiFgVAV29H8uY6vaz22HrBIAmcaVwKCOfDZHdMygPr8lkFnJLZC 1aY2WSUUzSicM0QpsYHQ7tVOGEfMvdGPKB5ntgkruA== X-Google-Smtp-Source: ADKCNb5NL3I0P7M/IdX5k+Juw8VCEfJwGtd/VWxpWas8omMzDoGdXGqgpLV6S47vdMg+63bC+lWWhW5Mb2S7jHS7y68= X-Received: by 10.36.165.69 with SMTP id w5mr12971427iti.40.1505124013174; Mon, 11 Sep 2017 03:00:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.190.199 with HTTP; Mon, 11 Sep 2017 03:00:12 -0700 (PDT) In-Reply-To: <30B40281-5114-4C72-A9F2-408342BA8216@fubar.geek.nz> References: <201709091154.v89Bs4b9094975@repo.freebsd.org> <30B40281-5114-4C72-A9F2-408342BA8216@fubar.geek.nz> From: Marcin Wojtas Date: Mon, 11 Sep 2017 12:00:12 +0200 Message-ID: Subject: Re: svn commit: r323362 - in head/sys: conf dev/neta To: Andrew Turner Cc: Marcin Wojtas , 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.23 Precedence: list List-Id: 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, 11 Sep 2017 10:00:14 -0000 2017-09-11 11:38 GMT+02:00 Andrew Turner : > >> On 9 Sep 2017, at 12:54, Marcin Wojtas wrote: >> >> Author: mw >> Date: Sat Sep 9 11:54:04 2017 >> New Revision: 323362 >> URL: https://svnweb.freebsd.org/changeset/base/323362 >> >> Log: >> Add support for Armada 3700 in the NETA driver >> >> This patch enables using NETA driver on Marvell Armada 3700 SoC >> by introducing new compatible string, modifying clock source >> obtaining and also excluding unnecessary parts. >> The driver is added as a build option for arm64 platforms as well. > > I=E2=80=99m getting the following when trying to build with gcc (I have i= nitial patches to build arm64 with gcc form ports). > > Andrew > > --- if_mvneta.o --- > /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mv= neta.c:101:1: error: function declaration isn't a prototype [-Werror=3Dstri= ct-prototypes] > mvneta_get_clk() > ^~~~~~~~~~~~~~ > /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mv= neta.c: In function 'mvneta_detach': > /jenkins/workspace/FreeBSD-arm64-head-gcc/freebsd-head/sys/dev/neta/if_mv= neta.c:834:16: warning: variable 'ifp' set but not used [-Wunused-but-set-v= ariable] > struct ifnet *ifp; > ^~~ > Can you apply below and confirm it helps? https://pastebin.com/8kfdnMz3 If yes, I'll issue a commit with fix. Marcin From owner-svn-src-head@freebsd.org Mon Sep 11 10:24:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 815B5E02C47; Mon, 11 Sep 2017 10:24:06 +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 C235E7F463; Mon, 11 Sep 2017 10:24:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 1E4DF10793C; Mon, 11 Sep 2017 20:01:24 +1000 (AEST) Date: Mon, 11 Sep 2017 20:01:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik cc: Ryan Libby , Bruce Evans , Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r323393 - in head/sys: sys vm In-Reply-To: Message-ID: <20170911193618.V1292@besplex.bde.org> References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.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.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=BmAKPIbiGlEMQsjAth0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=6kGIvZw6iX1k4Y-7sg4_:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 10:24:06 -0000 On Mon, 11 Sep 2017, Mateusz Guzik wrote: > On Mon, Sep 11, 2017 at 10:24 AM, Ryan Libby wrote: > >> On Mon, Sep 11, 2017 at 12:30 AM, Mateusz Guzik wrote: >> [...] >>> That said, looking now at the struct I think its use should be retired >>> from the kernel. It can remain in headers for userspace use. More about this in another reply. >>> First, there is a bunch of counter(9) fields. I don't know the original >>> reasoning. I would expect these counters to be statically defined in a >>> per-cpu struct. Changing them to 64 bits was even larger ABI breakage (they could have been replaced by padding so that they read as 0's but don't break all following fields). >> The actual counter(9) counters are per-CPU. These are just offsets into >> the PCPU area. See r317061 / D10156 (recent work by glebius). > > I mean their ids are allocated on boot, even though these counters are > always present and could be resolved at compilation time. So in order > to update them you have to fetch the id, as opposed to having the code > just do the right thing. > > I.e. for stuff which is always there we should just have well known offsets > into per-cpu tables. But I'm not going to try to flame a patch in (or write > one). vmstat(1) has the necessary support to read the counters from dead kernels. systat(1) is simpler because it doesn't support dead kernels. It just uses the horrible GETSYSCTL() macro/implementation. vmstat uses the horrible GET_VM_STATS() macro/implementation instead. The horribleness of these includes different bad error handling. vmstat aborts if a sysctl no longer exists or has changed it size. This gives much the same breakage as an ABI change. systat only spams the window with an error message. This is relatively harmless. Sometimes the error message even remains visible so it explains why some fields are displayed as always 0. The change of the size for the counters was eventually fixed in both vmstat and systat by changing the kernel to use the application's size in some cases. I don't care about dead kernels. Thus, moving the fields doesn't break anything for me. It "only" takes about 10000 instructions per field read to handle the move automatically using sysctl(). Bruce From owner-svn-src-head@freebsd.org Mon Sep 11 10:41:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E825E036A7; Mon, 11 Sep 2017 10:41:43 +0000 (UTC) (envelope-from mw@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 1588B7FBCC; Mon, 11 Sep 2017 10:41:43 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8BAfgJ8074746; Mon, 11 Sep 2017 10:41:42 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BAfgWx074745; Mon, 11 Sep 2017 10:41:42 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201709111041.v8BAfgWx074745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Mon, 11 Sep 2017 10:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323432 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 323432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 10:41:43 -0000 Author: mw Date: Mon Sep 11 10:41:42 2017 New Revision: 323432 URL: https://svnweb.freebsd.org/changeset/base/323432 Log: Improve HW type checking in mv_ehci driver This patch adds hwtype parameter which keeps information about hardware revision of Marvell EHCI controller. It allows to replace multiple calls to ofw_bus_is_compatible with comparing hwtype value during driver initialization. Submitted by: Patryk Duda Suggested by: ian Obtained from: Semihalf Sponsored by: Semihalf Modified: head/sys/dev/usb/controller/ehci_mv.c Modified: head/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mv.c Mon Sep 11 08:48:36 2017 (r323431) +++ head/sys/dev/usb/controller/ehci_mv.c Mon Sep 11 10:41:42 2017 (r323432) @@ -101,11 +101,17 @@ static void *ih_err; #define MV_USB_HOST_OVERFLOW (1 << 2) #define MV_USB_DEVICE_UNDERFLOW (1 << 3) +enum mv_ehci_hwtype { + HWTYPE_NONE = 0, + HWTYPE_MV_EHCI_V1, + HWTYPE_MV_EHCI_V2, +}; + static struct ofw_compat_data compat_data[] = { - {"mrvl,usb-ehci", true}, - {"marvell,orion-ehci", true}, - {"marvell,armada-3700-ehci", true}, - {NULL, false} + {"mrvl,usb-ehci", HWTYPE_MV_EHCI_V1}, + {"marvell,orion-ehci", HWTYPE_MV_EHCI_V2}, + {"marvell,armada-3700-ehci", HWTYPE_MV_EHCI_V2}, + {NULL, HWTYPE_NONE} }; static void @@ -139,6 +145,7 @@ static int mv_ehci_attach(device_t self) { ehci_softc_t *sc = device_get_softc(self); + enum mv_ehci_hwtype hwtype; bus_space_handle_t bsh; int err; int rid; @@ -149,6 +156,12 @@ mv_ehci_attach(device_t self) sc->sc_bus.devices_max = EHCI_MAX_DEVICES; sc->sc_bus.dma_bits = 32; + hwtype = ofw_bus_search_compatible(self, compat_data)->ocd_data; + if (hwtype == HWTYPE_NONE) { + device_printf(self, "Wrong HW type flag detected\n"); + return (ENXIO); + } + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { @@ -177,8 +190,7 @@ mv_ehci_attach(device_t self) device_get_name(self)); rid = 0; - if (!(ofw_bus_is_compatible(self, "marvell,orion-ehci") || - ofw_bus_is_compatible(self, "marvell,armada-3700-ehci"))) { + if (hwtype == HWTYPE_MV_EHCI_V1) { irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (irq_err == NULL) { @@ -211,8 +223,7 @@ mv_ehci_attach(device_t self) sprintf(sc->sc_vendor, "Marvell"); - if (!(ofw_bus_is_compatible(self, "marvell,orion-ehci") || - ofw_bus_is_compatible(self, "marvell,armada-3700-ehci"))) { + if (hwtype == HWTYPE_MV_EHCI_V1) { err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO, err_intr, NULL, sc, &ih_err); if (err) { From owner-svn-src-head@freebsd.org Mon Sep 11 11:31:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 593F1E05EDD; Mon, 11 Sep 2017 11:31:45 +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 32E81815CF; Mon, 11 Sep 2017 11:31:45 +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 v8BBVhp8092149; Mon, 11 Sep 2017 11:31:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BBVhhT092145; Mon, 11 Sep 2017 11:31:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709111131.v8BBVhhT092145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 Sep 2017 11:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323433 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 323433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 11:31:45 -0000 Author: avg Date: Mon Sep 11 11:31:43 2017 New Revision: 323433 URL: https://svnweb.freebsd.org/changeset/base/323433 Log: MFV r323110: 8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems illumos/illumos-gate@216d7723a1a58124cf95c4950d51d5f99d3f4128 https://github.com/illumos/illumos-gate/commit/216d7723a1a58124cf95c4950d51d5f99d3f4128 https://www.illumos.org/issues/8558 On a system with more than 80K ZFS filesystems, we've seen cases where lwp_create() will start to fail by returning EAGAIN. The problem being, for each of those 80K ZFS filesystems, a taskq will be created for each dataset as part of the ZIL for each dataset. For each of these taskq's, a kernel thread will be created which results in 24KB being allocated for each thread. With enough of these 24KB allocations, we eventually exhaust the memory region set aside for these allocations. Currently, segkpsize is set to a value of 2GB, which means we can only support about 80K filesystems; 2GB / 24KB = ~80K. The lwp_create() failure comes into play due to the fact that LWP creation also allocates 24KB from this same region of memory. Thus, if we've exhausted this region of memory due to the number of ZIL taskq's, there won't be any memory avaible to allow the call to lwp_create() to succeed. FreeBSD note: I haven't created sysctl-s for the new ZIL clean parameters. Let's add them if anyone requires to tune them. Reviewed by: George Wilson Reviewed by: Sebastien Roy Approved by: Robert Mustacchi Author: Prakash Surya MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Mon Sep 11 10:41:42 2017 (r323432) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Mon Sep 11 11:31:43 2017 (r323433) @@ -137,6 +137,36 @@ uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; */ int zfs_sync_taskq_batch_pct = 75; +/* + * These tunables determine the behavior of how zil_itxg_clean() is + * called via zil_clean() in the context of spa_sync(). When an itxg + * list needs to be cleaned, TQ_NOSLEEP will be used when dispatching. + * If the dispatch fails, the call to zil_itxg_clean() will occur + * synchronously in the context of spa_sync(), which can negatively + * impact the performance of spa_sync() (e.g. in the case of the itxg + * list having a large number of itxs that needs to be cleaned). + * + * Thus, these tunables can be used to manipulate the behavior of the + * taskq used by zil_clean(); they determine the number of taskq entries + * that are pre-populated when the taskq is first created (via the + * "zfs_zil_clean_taskq_minalloc" tunable) and the maximum number of + * taskq entries that are cached after an on-demand allocation (via the + * "zfs_zil_clean_taskq_maxalloc"). + * + * The idea being, we want to try reasonably hard to ensure there will + * already be a taskq entry pre-allocated by the time that it is needed + * by zil_clean(). This way, we can avoid the possibility of an + * on-demand allocation of a new taskq entry from failing, which would + * result in zil_itxg_clean() being called synchronously from zil_clean() + * (which can adversely affect performance of spa_sync()). + * + * Additionally, the number of threads used by the taskq can be + * configured via the "zfs_zil_clean_taskq_nthr_pct" tunable. + */ +int zfs_zil_clean_taskq_nthr_pct = 100; +int zfs_zil_clean_taskq_minalloc = 1024; +int zfs_zil_clean_taskq_maxalloc = 1024 * 1024; + #if defined(__FreeBSD__) && defined(_KERNEL) extern int zfs_vdev_async_write_active_max_dirty_percent; @@ -272,6 +302,12 @@ dsl_pool_open_impl(spa_t *spa, uint64_t txg) zfs_sync_taskq_batch_pct, minclsyspri, 1, INT_MAX, TASKQ_THREADS_CPU_PCT); + dp->dp_zil_clean_taskq = taskq_create("dp_zil_clean_taskq", + zfs_zil_clean_taskq_nthr_pct, minclsyspri, + zfs_zil_clean_taskq_minalloc, + zfs_zil_clean_taskq_maxalloc, + TASKQ_PREPOPULATE | TASKQ_THREADS_CPU_PCT); + mutex_init(&dp->dp_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&dp->dp_spaceavail_cv, NULL, CV_DEFAULT, NULL); @@ -422,6 +458,7 @@ dsl_pool_close(dsl_pool_t *dp) txg_list_destroy(&dp->dp_sync_tasks); txg_list_destroy(&dp->dp_dirty_dirs); + taskq_destroy(dp->dp_zil_clean_taskq); taskq_destroy(dp->dp_sync_taskq); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Mon Sep 11 10:41:42 2017 (r323432) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Mon Sep 11 11:31:43 2017 (r323433) @@ -122,6 +122,8 @@ typedef struct dsl_pool { txg_list_t dp_dirty_dirs; txg_list_t dp_sync_tasks; taskq_t *dp_sync_taskq; + taskq_t *dp_zil_clean_taskq; + txg_list_t dp_early_sync_tasks; /* * Protects administrative changes (properties, namespace) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Mon Sep 11 10:41:42 2017 (r323432) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Mon Sep 11 11:31:43 2017 (r323433) @@ -124,7 +124,6 @@ struct zilog { list_t zl_lwb_list; /* in-flight log write list */ kmutex_t zl_vdev_lock; /* protects zl_vdev_tree */ avl_tree_t zl_vdev_tree; /* vdevs to flush in zil_commit() */ - taskq_t *zl_clean_taskq; /* runs lwb and itx clean tasks */ avl_tree_t zl_bp_tree; /* track bps during log parse */ clock_t zl_replay_time; /* lbolt of when replay started */ uint64_t zl_replay_blks; /* number of log blocks replayed */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Mon Sep 11 10:41:42 2017 (r323432) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Mon Sep 11 11:31:43 2017 (r323433) @@ -1407,8 +1407,7 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) return; } ASSERT3U(itxg->itxg_txg, <=, synced_txg); - ASSERT(itxg->itxg_txg != 0); - ASSERT(zilog->zl_clean_taskq != NULL); + ASSERT3U(itxg->itxg_txg, !=, 0); clean_me = itxg->itxg_itxs; itxg->itxg_itxs = NULL; itxg->itxg_txg = 0; @@ -1419,7 +1418,9 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) * free it in-line. This should be rare. Note, using TQ_SLEEP * created a bad performance problem. */ - if (taskq_dispatch(zilog->zl_clean_taskq, + ASSERT3P(zilog->zl_dmu_pool, !=, NULL); + ASSERT3P(zilog->zl_dmu_pool->dp_zil_clean_taskq, !=, NULL); + if (taskq_dispatch(zilog->zl_dmu_pool->dp_zil_clean_taskq, (void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0) zil_itxg_clean(clean_me); } @@ -1848,13 +1849,10 @@ zil_open(objset_t *os, zil_get_data_t *get_data) { zilog_t *zilog = dmu_objset_zil(os); - ASSERT(zilog->zl_clean_taskq == NULL); ASSERT(zilog->zl_get_data == NULL); ASSERT(list_is_empty(&zilog->zl_lwb_list)); zilog->zl_get_data = get_data; - zilog->zl_clean_taskq = taskq_create("zil_clean", 1, minclsyspri, - 2, 2, TASKQ_PREPOPULATE); return (zilog); } @@ -1888,8 +1886,6 @@ zil_close(zilog_t *zilog) zfs_dbgmsg("zil (%p) is dirty, txg %llu", zilog, txg); VERIFY(!zilog_is_dirty(zilog)); - taskq_destroy(zilog->zl_clean_taskq); - zilog->zl_clean_taskq = NULL; zilog->zl_get_data = NULL; /* From owner-svn-src-head@freebsd.org Mon Sep 11 12:08:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F0DDE08256; Mon, 11 Sep 2017 12:08:21 +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 4C1DB82D76; Mon, 11 Sep 2017 12:08:21 +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 v8BC8K3X008545; Mon, 11 Sep 2017 12:08:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BC8KP9008544; Mon, 11 Sep 2017 12:08:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709111208.v8BC8KP9008544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 Sep 2017 12:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323434 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 12:08:21 -0000 Author: avg Date: Mon Sep 11 12:08:20 2017 New Revision: 323434 URL: https://svnweb.freebsd.org/changeset/base/323434 Log: Revert r322601, Mark ZFS ABD inline functions static An alternative fix is to be merged from illumos shortly. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Mon Sep 11 11:31:43 2017 (r323433) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Mon Sep 11 12:08:20 2017 (r323434) @@ -61,7 +61,7 @@ typedef int abd_iter_func2_t(void *, void *, size_t, v extern boolean_t zfs_abd_scatter_enabled; -static inline boolean_t +inline boolean_t abd_is_linear(abd_t *abd) { return ((abd->abd_flags & ABD_FLAG_LINEAR) != 0 ? B_TRUE : B_FALSE); @@ -110,31 +110,31 @@ void abd_zero_off(abd_t *, size_t, size_t); * Wrappers for calls with offsets of 0 */ -static inline void +inline void abd_copy(abd_t *dabd, abd_t *sabd, size_t size) { abd_copy_off(dabd, sabd, 0, 0, size); } -static inline void +inline void abd_copy_from_buf(abd_t *abd, const void *buf, size_t size) { abd_copy_from_buf_off(abd, buf, 0, size); } -static inline void +inline void abd_copy_to_buf(void* buf, abd_t *abd, size_t size) { abd_copy_to_buf_off(buf, abd, 0, size); } -static inline int +inline int abd_cmp_buf(abd_t *abd, const void *buf, size_t size) { return (abd_cmp_buf_off(abd, buf, 0, size)); } -static inline void +inline void abd_zero(abd_t *abd, size_t size) { abd_zero_off(abd, 0, size); From owner-svn-src-head@freebsd.org Mon Sep 11 12:15:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F6D0E0884F; Mon, 11 Sep 2017 12:15:50 +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 6071083273; Mon, 11 Sep 2017 12:15:50 +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 v8BCFnRa012516; Mon, 11 Sep 2017 12:15:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BCFnBW012514; Mon, 11 Sep 2017 12:15:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709111215.v8BCFnBW012514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 Sep 2017 12:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323435 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 12:15:50 -0000 Author: avg Date: Mon Sep 11 12:15:49 2017 New Revision: 323435 URL: https://svnweb.freebsd.org/changeset/base/323435 Log: MFV r323111: 8569 problem with inline functions in abd.h illumos/illumos-gate@37e84ab74e939caf52150fc3352081786ecc0c29 https://github.com/illumos/illumos-gate/commit/37e84ab74e939caf52150fc3352081786ecc0c29 https://www.illumos.org/issues/8569 C [C99] has peculiar rules for inline functions that are different from the C++ rules. Unlike C++ where inline is "fire and forget", in C a programmer must pay attention to the function's storage class / visibility. The main problem is with the case where a compiler decides to not inline a call to the function declared as inline. Some relevant links: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15831.html - http://www.drdobbs.com/the-new-c-inline-functions/184401540 The summary is that either the inline functions should be declared 'static inline' or one of the compilation units (.c files) must provide a callable externally visible function definition. In the former case, the compiler would automatically create a local non-inlined function instance in every compilation unit where it's needed. In the latter case the single external definition is used to satisfy any non-inlined calls in all compilation units. As things stand right now, we can get an undefined reference error under certain combinations of compilers and compiler options. For example, this is what I get on FreeBSD when compiling with clang 4.0.0 and -O1: In function `abd_free': /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:385: undefined reference to `abd_is_linear' Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andriy Gapon MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Mon Sep 11 12:08:20 2017 (r323434) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Mon Sep 11 12:15:49 2017 (r323435) @@ -157,6 +157,13 @@ extern vmem_t *zio_alloc_arena; kmem_cache_t *abd_chunk_cache; static kstat_t *abd_ksp; +extern inline boolean_t abd_is_linear(abd_t *abd); +extern inline void abd_copy(abd_t *dabd, abd_t *sabd, size_t size); +extern inline void abd_copy_from_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_copy_to_buf(void* buf, abd_t *abd, size_t size); +extern inline int abd_cmp_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_zero(abd_t *abd, size_t size); + static void * abd_alloc_chunk() { From owner-svn-src-head@freebsd.org Mon Sep 11 14:33:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34DDDE0EDBA; Mon, 11 Sep 2017 14:33:06 +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 0F3823AA6; Mon, 11 Sep 2017 14:33:05 +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 v8BEX5UP071482; Mon, 11 Sep 2017 14:33:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BEX4Wj071477; Mon, 11 Sep 2017 14:33:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709111433.v8BEX4Wj071477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 14:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323436 - in head: release/amd64 release/arm64 release/i386 release/powerpc sys/boot/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: release/amd64 release/arm64 release/i386 release/powerpc sys/boot/efi/boot1 X-SVN-Commit-Revision: 323436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 14:33:06 -0000 Author: emaste Date: Mon Sep 11 14:33:04 2017 New Revision: 323436 URL: https://svnweb.freebsd.org/changeset/base/323436 Log: boot1: remove BOOT1_MAXSIZE default value This Makefile relies on Makefile.fat providing the correct value for BOOT1_MAXSIZE and BOOT1_OFFSET. Since BOOT1_OFFSET had no default value here the build would already fail if Makefile.fat did not provide correct values. Sponsored by: The FreeBSD Foundation Modified: head/release/amd64/make-memstick.sh head/release/arm64/make-memstick.sh head/release/i386/make-memstick.sh head/release/powerpc/make-memstick.sh head/sys/boot/efi/boot1/Makefile Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Mon Sep 11 12:15:49 2017 (r323435) +++ head/release/amd64/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Mon Sep 11 12:15:49 2017 (r323435) +++ head/release/arm64/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Mon Sep 11 12:15:49 2017 (r323435) +++ head/release/i386/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/powerpc/make-memstick.sh ============================================================================== --- head/release/powerpc/make-memstick.sh Mon Sep 11 12:15:49 2017 (r323435) +++ head/release/powerpc/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) @@ -37,7 +37,7 @@ fi echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local rm -f ${tempfile} -makefs -B big ${tempfile} ${1} +makefs -B big -o version=2 ${tempfile} ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Mon Sep 11 12:15:49 2017 (r323435) +++ head/sys/boot/efi/boot1/Makefile Mon Sep 11 14:33:04 2017 (r323436) @@ -126,7 +126,6 @@ boot1.o: ${.CURDIR}/../../common/ufsread.c # created by generate-fat.sh .include "${.CURDIR}/Makefile.fat" -BOOT1_MAXSIZE?= 131072 boot1.efifat: boot1.efi @set -- `ls -l ${.ALLSRC}`; \ From owner-svn-src-head@freebsd.org Mon Sep 11 14:35:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA419E0EF6C; Mon, 11 Sep 2017 14:35:44 +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 C4D6A3C6B; Mon, 11 Sep 2017 14:35:44 +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 v8BEZhhr071757; Mon, 11 Sep 2017 14:35:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BEZhf9071753; Mon, 11 Sep 2017 14:35:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709111435.v8BEZhf9071753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 14:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323437 - in head/release: amd64 arm64 i386 powerpc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/release: amd64 arm64 i386 powerpc X-SVN-Commit-Revision: 323437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 14:35:45 -0000 Author: emaste Date: Mon Sep 11 14:35:43 2017 New Revision: 323437 URL: https://svnweb.freebsd.org/changeset/base/323437 Log: revert unintentional changes from r323436 Modified: head/release/amd64/make-memstick.sh head/release/arm64/make-memstick.sh head/release/i386/make-memstick.sh head/release/powerpc/make-memstick.sh Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) +++ head/release/amd64/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) +++ head/release/arm64/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) +++ head/release/i386/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/powerpc/make-memstick.sh ============================================================================== --- head/release/powerpc/make-memstick.sh Mon Sep 11 14:33:04 2017 (r323436) +++ head/release/powerpc/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) @@ -37,7 +37,7 @@ fi echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local rm -f ${tempfile} -makefs -B big -o version=2 ${tempfile} ${1} +makefs -B big ${tempfile} ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local From owner-svn-src-head@freebsd.org Mon Sep 11 14:41:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B470E0F56C; Mon, 11 Sep 2017 14:41:59 +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 069D2634CD; Mon, 11 Sep 2017 14:41:58 +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 v8BEfwjP072874; Mon, 11 Sep 2017 14:41:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BEfv7p072870; Mon, 11 Sep 2017 14:41:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709111441.v8BEfv7p072870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 14:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323438 - in head/release: amd64 arm64 i386 powerpc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/release: amd64 arm64 i386 powerpc X-SVN-Commit-Revision: 323438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 14:41:59 -0000 Author: emaste Date: Mon Sep 11 14:41:57 2017 New Revision: 323438 URL: https://svnweb.freebsd.org/changeset/base/323438 Log: make-memstick.sh: use UFSv2 There's not much practical difference as far as install media is concerned but newfs creates UFSv2 by default and it is sensible to use the contemporary UFS version. I also intend to change makefs to create UFSv2 by default (to match newfs) so we'll want make-memstick.sh to be explicit, rather than relying on the host tool's default. Reviewed by: andrew, gjb, jhibbits MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12231 Modified: head/release/amd64/make-memstick.sh head/release/arm64/make-memstick.sh head/release/i386/make-memstick.sh head/release/powerpc/make-memstick.sh Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) +++ head/release/amd64/make-memstick.sh Mon Sep 11 14:41:57 2017 (r323438) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) +++ head/release/arm64/make-memstick.sh Mon Sep 11 14:41:57 2017 (r323438) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) +++ head/release/i386/make-memstick.sh Mon Sep 11 14:41:57 2017 (r323438) @@ -32,7 +32,7 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/powerpc/make-memstick.sh ============================================================================== --- head/release/powerpc/make-memstick.sh Mon Sep 11 14:35:43 2017 (r323437) +++ head/release/powerpc/make-memstick.sh Mon Sep 11 14:41:57 2017 (r323438) @@ -37,7 +37,7 @@ fi echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local rm -f ${tempfile} -makefs -B big ${tempfile} ${1} +makefs -B big -o version=2 ${tempfile} ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local From owner-svn-src-head@freebsd.org Mon Sep 11 15:18:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D651E111E4; Mon, 11 Sep 2017 15:18:44 +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 3CA7964974; Mon, 11 Sep 2017 15:18:44 +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 v8BFIh9Q088758; Mon, 11 Sep 2017 15:18:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BFIhqf088757; Mon, 11 Sep 2017 15:18:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709111518.v8BFIhqf088757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 11 Sep 2017 15:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323439 - head/usr.bin/ktrdump X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/ktrdump X-SVN-Commit-Revision: 323439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 15:18:44 -0000 Author: markj Date: Mon Sep 11 15:18:43 2017 New Revision: 323439 URL: https://svnweb.freebsd.org/changeset/base/323439 Log: Provide an error message if KTR symbols in a vmcore cannot be resolved. libkvm does not set an error string in this case, so we were previously failing silently. MFC after: 1 week Modified: head/usr.bin/ktrdump/ktrdump.c Modified: head/usr.bin/ktrdump/ktrdump.c ============================================================================== --- head/usr.bin/ktrdump/ktrdump.c Mon Sep 11 14:41:57 2017 (r323438) +++ head/usr.bin/ktrdump/ktrdump.c Mon Sep 11 15:18:43 2017 (r323439) @@ -98,6 +98,7 @@ main(int ac, char **av) char *p; int version; int entries; + int count; int index, index2; int parm; int in; @@ -184,8 +185,12 @@ main(int ac, char **av) */ caph_cache_catpages(); - if (kvm_nlist(kd, nl) != 0 || - kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) + count = kvm_nlist(kd, nl); + if (count == -1) + errx(1, "%s", kvm_geterr(kd)); + if (count > 0) + errx(1, "failed to resolve ktr symbols"); + if (kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) errx(1, "%s", kvm_geterr(kd)); if (version != KTR_VERSION) errx(1, "ktr version mismatch"); From owner-svn-src-head@freebsd.org Mon Sep 11 17:39:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0594E18C02; Mon, 11 Sep 2017 17:39:22 +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 7D98C6A47B; Mon, 11 Sep 2017 17:39:22 +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 v8BHdLFf046859; Mon, 11 Sep 2017 17:39:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BHdLSZ046858; Mon, 11 Sep 2017 17:39:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709111739.v8BHdLSZ046858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 17:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323448 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 323448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 17:39:22 -0000 Author: emaste Date: Mon Sep 11 17:39:21 2017 New Revision: 323448 URL: https://svnweb.freebsd.org/changeset/base/323448 Log: Ignore error return from newaliases(1) This was originally added as "exit $SUCCESS" but with nothing to set the SUCCESS variable. Thus it became an exit with no argument, which just exits with the status of the preceding command. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Mon Sep 11 17:32:26 2017 (r323447) +++ head/usr.sbin/bsdinstall/scripts/config Mon Sep 11 17:39:21 2017 (r323448) @@ -53,7 +53,7 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases > /dev/null 2>&1 -exit $SUCCESS +exit 0 ################################################################################ # END From owner-svn-src-head@freebsd.org Mon Sep 11 18:11:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1AB7E1A933; Mon, 11 Sep 2017 18:11:54 +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 7F14B6B955; Mon, 11 Sep 2017 18:11:54 +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 v8BIBrkd062965; Mon, 11 Sep 2017 18:11:53 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BIBr8r062964; Mon, 11 Sep 2017 18:11:53 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709111811.v8BIBr8r062964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 11 Sep 2017 18:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323449 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 323449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 18:11:54 -0000 Author: cem Date: Mon Sep 11 18:11:53 2017 New Revision: 323449 URL: https://svnweb.freebsd.org/changeset/base/323449 Log: Decode new AMD SVM feature bits on family 17h Sponsored by: Dell EMC Isilon Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon Sep 11 17:39:21 2017 (r323448) +++ head/sys/x86/x86/identcpu.c Mon Sep 11 18:11:53 2017 (r323449) @@ -2152,9 +2152,27 @@ print_svm_info(void) "\011" "\012" "\013PauseFilter" /* PAUSE intercept filter */ - "\014" + "\014EncryptedMcodePatch" "\015PauseFilterThreshold" /* PAUSE filter threshold */ "\016AVIC" /* virtual interrupt controller */ + "\017" + "\020V_VMSAVE_VMLOAD" + "\021vGIF" + "\022" + "\023" + "\024" + "\025" + "\026" + "\027" + "\030" + "\031" + "\032" + "\033" + "\034" + "\035" + "\036" + "\037" + "\040" ); printf("\nRevision=%d, ASIDs=%d", regs[0] & 0xff, regs[1]); } From owner-svn-src-head@freebsd.org Mon Sep 11 18:29:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9A59E1BA51; Mon, 11 Sep 2017 18:29:10 +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 9792E6C3D7; Mon, 11 Sep 2017 18:29:10 +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 v8BIT9rp067408; Mon, 11 Sep 2017 18:29:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BIT9B2067407; Mon, 11 Sep 2017 18:29:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709111829.v8BIT9B2067407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 11 Sep 2017 18:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323450 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 323450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 18:29:10 -0000 Author: kib Date: Mon Sep 11 18:29:09 2017 New Revision: 323450 URL: https://svnweb.freebsd.org/changeset/base/323450 Log: Fix ioapic acpi id matching on PCI attach and rid calculation. Sponsored by: The FreeBSD Foundation MFC after: 11 days Modified: head/sys/x86/x86/io_apic.c Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Mon Sep 11 18:11:53 2017 (r323449) +++ head/sys/x86/x86/io_apic.c Mon Sep 11 18:29:09 2017 (r323450) @@ -997,7 +997,7 @@ ioapic_pci_attach(device_t dev) } /* Then by apic id */ STAILQ_FOREACH(io, &ioapic_list, io_next) { - if (io->io_id == apic_id) + if (io->io_apic_id == apic_id) goto found; } mtx_unlock_spin(&icu_lock); @@ -1017,13 +1017,13 @@ found: io->pci_dev = dev; io->pci_wnd = res; if (bootverbose && (io->io_paddr != (vm_paddr_t)rman_get_start(res) || - io->io_id != apic_id)) { + io->io_apic_id != apic_id)) { device_printf(dev, "pci%d:%d:%d:%d pci BAR0@%jx id %d " "MADT id %d paddr@%jx\n", pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), (uintmax_t)rman_get_start(res), apic_id, - io->io_id, (uintmax_t)io->io_paddr); + io->io_apic_id, (uintmax_t)io->io_paddr); } mtx_unlock_spin(&icu_lock); return (0); @@ -1051,7 +1051,7 @@ ioapic_get_rid(u_int apic_id, uint16_t *ridp) mtx_lock_spin(&icu_lock); STAILQ_FOREACH(io, &ioapic_list, io_next) { - if (io->io_id == apic_id) + if (io->io_apic_id == apic_id) break; } mtx_unlock_spin(&icu_lock); From owner-svn-src-head@freebsd.org Mon Sep 11 19:00:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92951E1DDA0; Mon, 11 Sep 2017 19:00:54 +0000 (UTC) (envelope-from mw@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 6231F6E3C3; Mon, 11 Sep 2017 19:00:54 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8BJ0rar083796; Mon, 11 Sep 2017 19:00:53 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BJ0r9p083795; Mon, 11 Sep 2017 19:00:53 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201709111900.v8BJ0r9p083795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Mon, 11 Sep 2017 19:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323457 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 323457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 19:00:54 -0000 Author: mw Date: Mon Sep 11 19:00:53 2017 New Revision: 323457 URL: https://svnweb.freebsd.org/changeset/base/323457 Log: Expand Marvell NIC description in arm64 GENERIC config Suggested by: emaste Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Mon Sep 11 18:51:02 2017 (r323456) +++ head/sys/arm64/conf/GENERIC Mon Sep 11 19:00:53 2017 (r323457) @@ -127,7 +127,7 @@ device axgbe # AMD Opteron A1100 integrated NIC device em # Intel PRO/1000 Gigabit Ethernet Family device ix # Intel 10Gb Ethernet Family device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet -device neta # Marvell NETA Controller +device neta # Marvell Armada 370/38x/XP/3700 NIC device smc # SMSC LAN91C111 device vnic # Cavium ThunderX NIC device al_eth # Annapurna Alpine Ethernet NIC From owner-svn-src-head@freebsd.org Mon Sep 11 19:07:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FA1EE1E37E; Mon, 11 Sep 2017 19:07:43 +0000 (UTC) (envelope-from kibab@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 5EE2A6E982; Mon, 11 Sep 2017 19:07:43 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8BJ7glC084070; Mon, 11 Sep 2017 19:07:42 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BJ7gr5084069; Mon, 11 Sep 2017 19:07:42 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709111907.v8BJ7gr5084069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Mon, 11 Sep 2017 19:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323458 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 323458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 19:07:43 -0000 Author: kibab Date: Mon Sep 11 19:07:42 2017 New Revision: 323458 URL: https://svnweb.freebsd.org/changeset/base/323458 Log: Add MMCCAM-enabled kernel config for arm64 Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12114 Added: head/sys/arm64/conf/GENERIC-MMCCAM (contents, props changed) Added: head/sys/arm64/conf/GENERIC-MMCCAM ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/conf/GENERIC-MMCCAM Mon Sep 11 19:07:42 2017 (r323458) @@ -0,0 +1,22 @@ +# +# GENERIC-MMCCAM +# +# Custom kernel for arm64 plus MMCCAM as opposed to the prior MMC stack. It is +# present to keep it building in tree since it wouldn't work in LINT. +# +# $FreeBSD$ + +#NO_UNIVERSE + +include GENERIC + +# Add CAMDEBUG stuff +options CAMDEBUG +options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH) + +# pass(4) device +device pass +options MMCCAM + +nodevice mmc +nodevice mmcsd From owner-svn-src-head@freebsd.org Mon Sep 11 19:07:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEC1CE1E3DF; Mon, 11 Sep 2017 19:07:54 +0000 (UTC) (envelope-from mw@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 7EBF76EA2E; Mon, 11 Sep 2017 19:07:54 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8BJ7reK084120; Mon, 11 Sep 2017 19:07:53 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BJ7rCS084119; Mon, 11 Sep 2017 19:07:53 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201709111907.v8BJ7rCS084119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Mon, 11 Sep 2017 19:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323459 - head/sys/modules/uart X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/modules/uart X-SVN-Commit-Revision: 323459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 19:07:54 -0000 Author: mw Date: Mon Sep 11 19:07:53 2017 New Revision: 323459 URL: https://svnweb.freebsd.org/changeset/base/323459 Log: Restore alphabetical order in UART Makefile Commit r323359 introduced new Marvell UART controller driver and by mistake it broke correct order in the Makefile. Fix this. Reported by: emaste Modified: head/sys/modules/uart/Makefile Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Mon Sep 11 19:07:42 2017 (r323458) +++ head/sys/modules/uart/Makefile Mon Sep 11 19:07:53 2017 (r323459) @@ -33,8 +33,8 @@ KMOD= uart SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \ uart_core.c ${uart_cpu_machine} uart_dbg.c \ - ${uart_dev_lpc} uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \ - uart_dev_z8530.c ${uart_dev_mvebu} \ + ${uart_dev_lpc} ${uart_dev_mvebu} uart_dev_ns8250.c uart_dev_quicc.c \ + uart_dev_sab82532.c uart_dev_z8530.c \ uart_if.c uart_if.h uart_subr.c uart_tty.c SRCS+= acpi_if.h bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} \ From owner-svn-src-head@freebsd.org Mon Sep 11 20:41:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39372E23272; Mon, 11 Sep 2017 20:41:27 +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 06FC471EA0; Mon, 11 Sep 2017 20:41:26 +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 v8BKfQIY020775; Mon, 11 Sep 2017 20:41:26 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BKfQbv020774; Mon, 11 Sep 2017 20:41:26 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709112041.v8BKfQbv020774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 11 Sep 2017 20:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323462 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 323462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 20:41:27 -0000 Author: cem Date: Mon Sep 11 20:41:25 2017 New Revision: 323462 URL: https://svnweb.freebsd.org/changeset/base/323462 Log: x86 MCA: Extract CMCI support predicate into function On AMD, the MCG_CAP feature bit is reserved -- not explicitly zero. Do not use it to determine CMCI support. Reviewed by: avg, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12320 Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Mon Sep 11 20:33:20 2017 (r323461) +++ head/sys/x86/x86/mca.c Mon Sep 11 20:41:25 2017 (r323462) @@ -149,6 +149,18 @@ amd_thresholding_supported(void) } #endif +static inline bool +cmci_supported(uint64_t mcg_cap) +{ + /* + * MCG_CAP_CMCI_P bit is reserved in AMD documentation. Until + * it is defined, do not use it to check for CMCI support. + */ + if (cpu_vendor_id != CPU_VENDOR_INTEL) + return (false); + return ((mcg_cap & MCG_CAP_CMCI_P) != 0); +} + static int sysctl_positive_int(SYSCTL_HANDLER_ARGS) { @@ -322,7 +334,7 @@ mca_log(const struct mca_record *rec) printf("UNCOR "); else { printf("COR "); - if (rec->mr_mcg_cap & MCG_CAP_CMCI_P) + if (cmci_supported(rec->mr_mcg_cap)) printf("(%lld) ", ((long long)rec->mr_status & MC_STATUS_COR_COUNT) >> 38); } @@ -873,7 +885,7 @@ mca_setup(uint64_t mcg_cap) "force_scan", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sysctl_mca_scan, "I", "Force an immediate scan for machine checks"); #ifdef DEV_APIC - if (mcg_cap & MCG_CAP_CMCI_P) + if (cmci_supported(mcg_cap)) cmci_setup(); else if (amd_thresholding_supported()) amd_thresholding_setup(); @@ -1104,7 +1116,7 @@ _mca_init(int boot) wrmsr(MSR_MC_CTL(i), ctl); #ifdef DEV_APIC - if (mcg_cap & MCG_CAP_CMCI_P) { + if (cmci_supported(mcg_cap)) { if (boot) cmci_monitor(i); else From owner-svn-src-head@freebsd.org Mon Sep 11 20:42:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01C91E2344C; Mon, 11 Sep 2017 20:42:09 +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 D2AB072066; Mon, 11 Sep 2017 20:42:08 +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 v8BKg8Bj023994; Mon, 11 Sep 2017 20:42:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BKg7HM023992; Mon, 11 Sep 2017 20:42:07 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709112042.v8BKg7HM023992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 11 Sep 2017 20:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323463 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 323463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 20:42:09 -0000 Author: cem Date: Mon Sep 11 20:42:07 2017 New Revision: 323463 URL: https://svnweb.freebsd.org/changeset/base/323463 Log: MCA: Rename AMD MISC bits/masks They apply to all AMD MCAi_MISC0 registers, not just MCA4 (NB). No functional change. Sponsored by: Dell EMC Isilon Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/mca.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Mon Sep 11 20:41:25 2017 (r323462) +++ head/sys/x86/include/specialreg.h Mon Sep 11 20:42:07 2017 (r323463) @@ -715,22 +715,22 @@ #define MC_CTL2_THRESHOLD 0x0000000000007fff #define MC_CTL2_CMCI_EN 0x0000000040000000 #define MC_AMDNB_BANK 4 -#define MC_MISC_AMDNB_VAL 0x8000000000000000 /* Counter presence valid */ -#define MC_MISC_AMDNB_CNTP 0x4000000000000000 /* Counter present */ -#define MC_MISC_AMDNB_LOCK 0x2000000000000000 /* Register locked */ -#define MC_MISC_AMDNB_INTP 0x1000000000000000 /* Int. type can generate interrupts */ -#define MC_MISC_AMDNB_LVT_MASK 0x00f0000000000000 /* Extended LVT offset */ -#define MC_MISC_AMDNB_LVT_SHIFT 52 -#define MC_MISC_AMDNB_CNTEN 0x0008000000000000 /* Counter enabled */ -#define MC_MISC_AMDNB_INT_MASK 0x0006000000000000 /* Interrupt type */ -#define MC_MISC_AMDNB_INT_LVT 0x0002000000000000 /* Interrupt via Extended LVT */ -#define MC_MISC_AMDNB_INT_SMI 0x0004000000000000 /* SMI */ -#define MC_MISC_AMDNB_OVERFLOW 0x0001000000000000 /* Counter overflow */ -#define MC_MISC_AMDNB_CNT_MASK 0x00000fff00000000 /* Counter value */ -#define MC_MISC_AMDNB_CNT_SHIFT 32 -#define MC_MISC_AMDNB_CNT_MAX 0xfff -#define MC_MISC_AMDNB_PTR_MASK 0x00000000ff000000 /* Pointer to additional registers */ -#define MC_MISC_AMDNB_PTR_SHIFT 24 +#define MC_MISC_AMD_VAL 0x8000000000000000 /* Counter presence valid */ +#define MC_MISC_AMD_CNTP 0x4000000000000000 /* Counter present */ +#define MC_MISC_AMD_LOCK 0x2000000000000000 /* Register locked */ +#define MC_MISC_AMD_INTP 0x1000000000000000 /* Int. type can generate interrupts */ +#define MC_MISC_AMD_LVT_MASK 0x00f0000000000000 /* Extended LVT offset */ +#define MC_MISC_AMD_LVT_SHIFT 52 +#define MC_MISC_AMD_CNTEN 0x0008000000000000 /* Counter enabled */ +#define MC_MISC_AMD_INT_MASK 0x0006000000000000 /* Interrupt type */ +#define MC_MISC_AMD_INT_LVT 0x0002000000000000 /* Interrupt via Extended LVT */ +#define MC_MISC_AMD_INT_SMI 0x0004000000000000 /* SMI */ +#define MC_MISC_AMD_OVERFLOW 0x0001000000000000 /* Counter overflow */ +#define MC_MISC_AMD_CNT_MASK 0x00000fff00000000 /* Counter value */ +#define MC_MISC_AMD_CNT_SHIFT 32 +#define MC_MISC_AMD_CNT_MAX 0xfff +#define MC_MISC_AMD_PTR_MASK 0x00000000ff000000 /* Pointer to additional registers */ +#define MC_MISC_AMD_PTR_SHIFT 24 /* * The following four 3-byte registers control the non-cacheable regions. Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Mon Sep 11 20:41:25 2017 (r323462) +++ head/sys/x86/x86/mca.c Mon Sep 11 20:42:07 2017 (r323463) @@ -649,17 +649,17 @@ amd_thresholding_update(enum scan_mode mode, int bank, ("%s: unexpected bank %d", __func__, bank)); cc = &amd_et_state[PCPU_GET(cpuid)]; misc = rdmsr(MSR_MC_MISC(bank)); - count = (misc & MC_MISC_AMDNB_CNT_MASK) >> MC_MISC_AMDNB_CNT_SHIFT; - count = count - (MC_MISC_AMDNB_CNT_MAX - cc->cur_threshold); + count = (misc & MC_MISC_AMD_CNT_MASK) >> MC_MISC_AMD_CNT_SHIFT; + count = count - (MC_MISC_AMD_CNT_MAX - cc->cur_threshold); new_threshold = update_threshold(mode, valid, cc->last_intr, count, - cc->cur_threshold, MC_MISC_AMDNB_CNT_MAX); + cc->cur_threshold, MC_MISC_AMD_CNT_MAX); cc->cur_threshold = new_threshold; - misc &= ~MC_MISC_AMDNB_CNT_MASK; - misc |= (uint64_t)(MC_MISC_AMDNB_CNT_MAX - cc->cur_threshold) - << MC_MISC_AMDNB_CNT_SHIFT; - misc &= ~MC_MISC_AMDNB_OVERFLOW; + misc &= ~MC_MISC_AMD_CNT_MASK; + misc |= (uint64_t)(MC_MISC_AMD_CNT_MAX - cc->cur_threshold) + << MC_MISC_AMD_CNT_SHIFT; + misc &= ~MC_MISC_AMD_OVERFLOW; wrmsr(MSR_MC_MISC(bank), misc); if (mode == CMCI && valid) cc->last_intr = time_uptime; @@ -971,15 +971,15 @@ amd_thresholding_start(struct amd_et_state *cc) KASSERT(amd_elvt >= 0, ("ELVT offset is not set")); misc = rdmsr(MSR_MC_MISC(MC_AMDNB_BANK)); - misc &= ~MC_MISC_AMDNB_INT_MASK; - misc |= MC_MISC_AMDNB_INT_LVT; - misc &= ~MC_MISC_AMDNB_LVT_MASK; - misc |= (uint64_t)amd_elvt << MC_MISC_AMDNB_LVT_SHIFT; - misc &= ~MC_MISC_AMDNB_CNT_MASK; - misc |= (uint64_t)(MC_MISC_AMDNB_CNT_MAX - cc->cur_threshold) - << MC_MISC_AMDNB_CNT_SHIFT; - misc &= ~MC_MISC_AMDNB_OVERFLOW; - misc |= MC_MISC_AMDNB_CNTEN; + misc &= ~MC_MISC_AMD_INT_MASK; + misc |= MC_MISC_AMD_INT_LVT; + misc &= ~MC_MISC_AMD_LVT_MASK; + misc |= (uint64_t)amd_elvt << MC_MISC_AMD_LVT_SHIFT; + misc &= ~MC_MISC_AMD_CNT_MASK; + misc |= (uint64_t)(MC_MISC_AMD_CNT_MAX - cc->cur_threshold) + << MC_MISC_AMD_CNT_SHIFT; + misc &= ~MC_MISC_AMD_OVERFLOW; + misc |= MC_MISC_AMD_CNTEN; wrmsr(MSR_MC_MISC(MC_AMDNB_BANK), misc); } @@ -992,15 +992,15 @@ amd_thresholding_init(void) /* The counter must be valid and present. */ misc = rdmsr(MSR_MC_MISC(MC_AMDNB_BANK)); - if ((misc & (MC_MISC_AMDNB_VAL | MC_MISC_AMDNB_CNTP)) != - (MC_MISC_AMDNB_VAL | MC_MISC_AMDNB_CNTP)) { + if ((misc & (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) != + (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) { printf("%s: 0x%jx: !valid | !present\n", __func__, (uintmax_t)misc); return; } /* The register should not be locked. */ - if ((misc & MC_MISC_AMDNB_LOCK) != 0) { + if ((misc & MC_MISC_AMD_LOCK) != 0) { printf("%s: 0x%jx: locked\n", __func__, (uintmax_t)misc); return; } @@ -1009,7 +1009,7 @@ amd_thresholding_init(void) * If counter is enabled then either the firmware or another CPU * has already claimed it. */ - if ((misc & MC_MISC_AMDNB_CNTEN) != 0) { + if ((misc & MC_MISC_AMD_CNTEN) != 0) { printf("%s: 0x%jx: count already enabled\n", __func__, (uintmax_t)misc); return; From owner-svn-src-head@freebsd.org Mon Sep 11 21:49:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 628A8E017B1; Mon, 11 Sep 2017 21: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 20DFE74441; Mon, 11 Sep 2017 21: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 v8BLncYU049329; Mon, 11 Sep 2017 21:49:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BLncAs049328; Mon, 11 Sep 2017 21:49:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709112149.v8BLncAs049328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 11 Sep 2017 21:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323465 - head/usr.sbin/i2c X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/i2c X-SVN-Commit-Revision: 323465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 21:49:40 -0000 Author: ian Date: Mon Sep 11 21:49:38 2017 New Revision: 323465 URL: https://svnweb.freebsd.org/changeset/base/323465 Log: Make i2c -s (device scan) work on hardware that supports only full xfers. The existing scan code is based on sending an i2c START condition and if there is no error it assumes there is a device at that i2c address. Some i2c controllers don't support sending individual start/stop signals on the bus, they can only perform complete data transfers with start/stop handled in the silicon. This adds a fallback mechanism that attempts to read a single byte from each i2c address. It's less reliable than looking for an an ACK repsonse to a start, because some devices will NAK an attempt to read that isn't preceeded by a write of a register address. Writing to devices to probe them is too dangerous to even consider. The user is told that a less-reliable scan is being done, so even if the read-scan comes up empty too, it's still a vast improvement over the old situation where it would just claim there were no devices on the bus even though the devices were there and working fine. If the i2c controller responds with a proper ENODEV (device doesn't support operation) or an almost-proper EOPNOTSUPP, the START/STOP scan is switched to a read-scan right away. Most controllers respond with ENXIO or EIO if they don't support START/STOP, so no quick-out is available. For those, if a scan of all 127 addresses and come up empty, the scan is re-done using the read method. Reported by: Maxim Filimonov Modified: head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.c ============================================================================== --- head/usr.sbin/i2c/i2c.c Mon Sep 11 21:32:35 2017 (r323464) +++ head/usr.sbin/i2c/i2c.c Mon Sep 11 21:49:38 2017 (r323465) @@ -121,9 +121,12 @@ skip_get_tokens(char *skip_addr, int *sk_addr, int max static int scan_bus(struct iiccmd cmd, char *dev, int skip, char *skip_addr) { + struct iic_msg rdmsg; + struct iic_rdwr_data rdwrdata; struct skip_range addr_range = { 0, 0 }; int *tokens, fd, error, i, index, j; - int len = 0, do_skip = 0, no_range = 1; + int len = 0, do_skip = 0, no_range = 1, num_found = 0, use_read_xfer = 0; + uint8_t rdbyte; fd = open(dev, O_RDWR); if (fd == -1) { @@ -157,6 +160,14 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char } printf("Scanning I2C devices on %s: ", dev); + +start_over: + if (use_read_xfer) { + fprintf(stderr, + "Hardware may not support START/STOP scanning; " + "trying less-reliable read method.\n"); + } + for (i = 1; i < 127; i++) { if (skip && ( addr_range.start < addr_range.end)) { @@ -180,17 +191,46 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char cmd.last = 1; cmd.count = 0; error = ioctl(fd, I2CRSTCARD, &cmd); - if (error) + if (error) { + fprintf(stderr, "Controller reset failed\n"); goto out; - - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTART, &cmd); - if (!error) - printf("%x ", i); - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTOP, &cmd); + } + if (use_read_xfer) { + rdmsg.buf = &rdbyte; + rdmsg.len = 1; + rdmsg.flags = IIC_M_RD; + rdmsg.slave = i << 1; + rdwrdata.msgs = &rdmsg; + rdwrdata.nmsgs = 1; + error = ioctl(fd, I2CRDWR, &rdwrdata); + } else { + cmd.slave = i << 1; + cmd.last = 1; + error = ioctl(fd, I2CSTART, &cmd); + if (errno == ENODEV || errno == EOPNOTSUPP) { + /* If START not supported try reading. */ + use_read_xfer = 1; + goto start_over; + } + cmd.slave = i << 1; + cmd.last = 1; + ioctl(fd, I2CSTOP, &cmd); + } + if (error == 0) { + ++num_found; + printf("%02x ", i); + } + } + /* + * If we found nothing, maybe START is not supported and returns a + * generic error code such as EIO or ENXIO, so try again using reads. + */ + if (num_found == 0) { + if (!use_read_xfer) { + use_read_xfer = 1; + goto start_over; + } + printf(""); } printf("\n"); From owner-svn-src-head@freebsd.org Mon Sep 11 22:18:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A7A1E02EB5; Mon, 11 Sep 2017 22:18:02 +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 46F49752B2; Mon, 11 Sep 2017 22:18:02 +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 v8BMI16U061422; Mon, 11 Sep 2017 22:18:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BMI15x061421; Mon, 11 Sep 2017 22:18:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709112218.v8BMI15x061421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Sep 2017 22:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323466 - head/libexec/rtld-elf/mips X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/libexec/rtld-elf/mips X-SVN-Commit-Revision: 323466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 22:18:02 -0000 Author: jhb Date: Mon Sep 11 22:18:01 2017 New Revision: 323466 URL: https://svnweb.freebsd.org/changeset/base/323466 Log: Add CFI directives for _rtld_bind_start. This allows debuggers to unwind back into the caller when stopped in the runtime linker. Sponsored by: DARPA / AFRL Modified: head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Mon Sep 11 21:49:38 2017 (r323465) +++ head/libexec/rtld-elf/mips/rtld_start.S Mon Sep 11 22:18:01 2017 (r323466) @@ -104,26 +104,39 @@ END(rtld_start) .ent _rtld_bind_start _rtld_bind_start: .frame sp, XCALLFRAME_SIZ, $15 + .cfi_startproc simple + .cfi_register ra, $15 move v1, gp /* save old GP */ #if defined(__mips_o32) || defined(__mips_o64) PTR_ADDU t9, 8 /* modify T9 to point at .cpload */ #endif SETUP_GP PTR_SUBU sp, XCALLFRAME_SIZ /* save arguments and sp value in stack */ + .cfi_def_cfa sp, XCALLFRAME_SIZ SETUP_GP64(XCALLFRAME_GP, _rtld_bind_start) SAVE_GP(XCALLFRAME_GP) #if defined(__mips_n32) || defined(__mips_n64) REG_S a4, XCALLFRAME_A4(sp) + .cfi_rel_offset a4, XCALLFRAME_A4 REG_S a5, XCALLFRAME_A5(sp) + .cfi_rel_offset a5, XCALLFRAME_A5 REG_S a6, XCALLFRAME_A6(sp) + .cfi_rel_offset a6, XCALLFRAME_A6 REG_S a7, XCALLFRAME_A7(sp) + .cfi_rel_offset a7, XCALLFRAME_A7 #endif REG_S a0, XCALLFRAME_A0(sp) + .cfi_rel_offset a0, XCALLFRAME_A0 REG_S a1, XCALLFRAME_A1(sp) + .cfi_rel_offset a1, XCALLFRAME_A1 REG_S a2, XCALLFRAME_A2(sp) + .cfi_rel_offset a2, XCALLFRAME_A2 REG_S a3, XCALLFRAME_A3(sp) + .cfi_rel_offset a3, XCALLFRAME_A3 REG_S $15, XCALLFRAME_RA(sp) /* ra is in t7/t3 */ + .cfi_rel_offset ra, XCALLFRAME_RA REG_S s0, XCALLFRAME_S0(sp) + .cfi_rel_offset s0, XCALLFRAME_S0 move s0, sp move a0, v1 /* old GP */ @@ -147,20 +160,31 @@ _rtld_bind_start: move sp, s0 REG_L ra, XCALLFRAME_RA(sp) + .cfi_restore ra REG_L s0, XCALLFRAME_S0(sp) + .cfi_restore s0 REG_L a0, XCALLFRAME_A0(sp) + .cfi_restore a0 REG_L a1, XCALLFRAME_A1(sp) + .cfi_restore a1 REG_L a2, XCALLFRAME_A2(sp) + .cfi_restore a2 REG_L a3, XCALLFRAME_A3(sp) + .cfi_restore a3 #if defined(__mips_n32) || defined(__mips_n64) REG_L a4, XCALLFRAME_A4(sp) + .cfi_restore a4 REG_L a5, XCALLFRAME_A5(sp) + .cfi_restore a5 REG_L a6, XCALLFRAME_A6(sp) + .cfi_restore a6 REG_L a7, XCALLFRAME_A7(sp) + .cfi_restore a7 #endif RESTORE_GP64 PTR_ADDU sp, XCALLFRAME_SIZ move t9, v0 jr t9 nop + .cfi_endproc END(_rtld_bind_start) From owner-svn-src-head@freebsd.org Mon Sep 11 23:47:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76724E07FAF; Mon, 11 Sep 2017 23:47:50 +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 43EB37C798; Mon, 11 Sep 2017 23:47:50 +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 v8BNlnfU097920; Mon, 11 Sep 2017 23:47:49 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8BNln8G097919; Mon, 11 Sep 2017 23:47:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709112347.v8BNln8G097919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 11 Sep 2017 23:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323474 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 323474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 11 Sep 2017 23:47:50 -0000 Author: ian Date: Mon Sep 11 23:47:49 2017 New Revision: 323474 URL: https://svnweb.freebsd.org/changeset/base/323474 Log: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms. Modified: head/sys/dev/iicbus/iicbus_if.m Modified: head/sys/dev/iicbus/iicbus_if.m ============================================================================== --- head/sys/dev/iicbus/iicbus_if.m Mon Sep 11 22:43:01 2017 (r323473) +++ head/sys/dev/iicbus/iicbus_if.m Mon Sep 11 23:47:49 2017 (r323474) @@ -32,6 +32,12 @@ INTERFACE iicbus; CODE { + static int iicbus_nosupport(void) + { + + return (ENODEV); + } + static u_int iicbus_default_frequency(device_t bus, u_char speed) { @@ -69,7 +75,7 @@ METHOD int repeated_start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send START condition @@ -78,14 +84,14 @@ METHOD int start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send STOP condition # METHOD int stop { device_t dev; -}; +} DEFAULT iicbus_nosupport; # # Read from I2C bus @@ -97,7 +103,7 @@ METHOD int read { int *bytes; int last; int delay; -}; +} DEFAULT iicbus_nosupport; # # Write to the I2C bus @@ -108,7 +114,7 @@ METHOD int write { int len; int *bytes; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Reset I2C bus From owner-svn-src-head@freebsd.org Tue Sep 12 04:21:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86C9E1612A; Tue, 12 Sep 2017 04:21:05 +0000 (UTC) (envelope-from cy@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 A640262B; Tue, 12 Sep 2017 04:21:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8C4L4tl010781; Tue, 12 Sep 2017 04:21:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C4L4Fh010780; Tue, 12 Sep 2017 04:21:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709120421.v8C4L4Fh010780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 12 Sep 2017 04:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323478 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 04:21:06 -0000 Author: cy Date: Tue Sep 12 04:21:04 2017 New Revision: 323478 URL: https://svnweb.freebsd.org/changeset/base/323478 Log: Improve the wording of a comment describing why EAGAIN is the error code. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Tue Sep 12 03:54:04 2017 (r323477) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Tue Sep 12 04:21:04 2017 (r323478) @@ -1383,10 +1383,10 @@ ipf_state_add(softc, fin, stsave, flags) int out; /* - * If a packet that was created locally is trying to go out but we - * do not match here here because of this lock, it is likely that - * the policy will block it and return network unreachable back up - * the stack. To mitigate this error, EAGAIN is returned instead, + * If a locally created packet is trying to egress but it + * does not match because of this lock, it is likely that + * the policy will block it and return network unreachable further + * up the stack. To mitigate this error, EAGAIN is returned instead, * telling the IP stack to try sending this packet again later. */ if (softs->ipf_state_lock) { From owner-svn-src-head@freebsd.org Tue Sep 12 06:02:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C05E2E1AA06; Tue, 12 Sep 2017 06:02: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 8C15F3717; Tue, 12 Sep 2017 06:02: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 v8C62Lmv052480; Tue, 12 Sep 2017 06:02:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C62LY2052478; Tue, 12 Sep 2017 06:02:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709120602.v8C62LY2052478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 06:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323479 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 323479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 06:02:22 -0000 Author: avg Date: Tue Sep 12 06:02:21 2017 New Revision: 323479 URL: https://svnweb.freebsd.org/changeset/base/323479 Log: zfs: tighten debug versions of ZTOV and VTOZ MFC after: 2 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Sep 12 04:21:04 2017 (r323478) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Sep 12 06:02:21 2017 (r323479) @@ -227,7 +227,7 @@ ZTOV(znode_t *zp) { vnode_t *vp = zp->z_vnode; - ASSERT(vp == NULL || vp->v_data == NULL || vp->v_data == zp); + ASSERT(vp != NULL && vp->v_data == zp); return (vp); } static __inline znode_t * @@ -235,7 +235,7 @@ VTOZ(vnode_t *vp) { znode_t *zp = (znode_t *)vp->v_data; - ASSERT(zp == NULL || zp->z_vnode == NULL || zp->z_vnode == vp); + ASSERT(zp != NULL && zp->z_vnode == vp); return (zp); } #else Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Sep 12 04:21:04 2017 (r323478) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Sep 12 06:02:21 2017 (r323479) @@ -143,8 +143,7 @@ zfs_znode_cache_destructor(void *buf, void *arg) znode_t *zp = buf; ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs)); - ASSERT(ZTOV(zp) == NULL); - vn_free(ZTOV(zp)); + ASSERT3P(zp->z_vnode, ==, NULL); ASSERT(!list_link_active(&zp->z_link_node)); mutex_destroy(&zp->z_acl_lock); avl_destroy(&zp->z_range_avl); From owner-svn-src-head@freebsd.org Tue Sep 12 06:04:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6158DE1AB95; Tue, 12 Sep 2017 06:04:02 +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 2AADB38C3; Tue, 12 Sep 2017 06:04:02 +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 v8C641lM052578; Tue, 12 Sep 2017 06:04:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C641MV052577; Tue, 12 Sep 2017 06:04:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709120604.v8C641MV052577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 06:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323480 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 06:04:02 -0000 Author: avg Date: Tue Sep 12 06:04:01 2017 New Revision: 323480 URL: https://svnweb.freebsd.org/changeset/base/323480 Log: zfs_get_vfs: reference a requested filesystem instead of vfs_busy-ing it The only consumer of zfs_get_vfs, zfs_unmount_snap, does not need the filesystem to be busy, it just need a reference that it can pass to dounmount. Also, previously the code was racy as it unbusied the filesystem before taking a reference on it. Now the code should be simpler and safer. MFC after: 2 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 12 06:02:21 2017 (r323479) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 12 06:04:01 2017 (r323480) @@ -3049,13 +3049,11 @@ zfs_get_vfs(const char *resource) mtx_lock(&mountlist_mtx); TAILQ_FOREACH(vfsp, &mountlist, mnt_list) { if (strcmp(refstr_value(vfsp->vfs_resource), resource) == 0) { - if (vfs_busy(vfsp, MBF_MNTLSTLOCK) != 0) - vfsp = NULL; + vfs_ref(vfsp); break; } } - if (vfsp == NULL) - mtx_unlock(&mountlist_mtx); + mtx_unlock(&mountlist_mtx); return (vfsp); } @@ -3545,7 +3543,9 @@ zfs_unmount_snap(const char *snapname) { vfs_t *vfsp; zfsvfs_t *zfsvfs; +#ifdef illumos int err; +#endif if (strchr(snapname, '@') == NULL) return (0); @@ -3557,23 +3557,19 @@ zfs_unmount_snap(const char *snapname) zfsvfs = vfsp->vfs_data; ASSERT(!dsl_pool_config_held(dmu_objset_pool(zfsvfs->z_os))); - err = vn_vfswlock(vfsp->vfs_vnodecovered); #ifdef illumos + err = vn_vfswlock(vfsp->vfs_vnodecovered); VFS_RELE(vfsp); -#else - vfs_unbusy(vfsp); -#endif if (err != 0) return (SET_ERROR(err)); +#endif /* * Always force the unmount for snapshots. */ - #ifdef illumos (void) dounmount(vfsp, MS_FORCE, kcred); #else - vfs_ref(vfsp); (void) dounmount(vfsp, MS_FORCE, curthread); #endif return (0); From owner-svn-src-head@freebsd.org Tue Sep 12 06:04:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C86C0E1AC65; Tue, 12 Sep 2017 06:04:51 +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 965DB3A48; Tue, 12 Sep 2017 06:04:51 +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 v8C64o3Q052643; Tue, 12 Sep 2017 06:04:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C64opD052642; Tue, 12 Sep 2017 06:04:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709120604.v8C64opD052642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 06:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323481 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 06:04:51 -0000 Author: avg Date: Tue Sep 12 06:04:50 2017 New Revision: 323481 URL: https://svnweb.freebsd.org/changeset/base/323481 Log: zfsvfs_hold: assert that the busied filesystem can not be unmounted This is a FreeBSD specific feature. MFC after: 3 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 12 06:04:01 2017 (r323480) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 12 06:04:50 2017 (r323481) @@ -1488,6 +1488,7 @@ zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zf if (error == 0) { rrm_enter(&(*zfvp)->z_teardown_lock, (writer) ? RW_WRITER : RW_READER, tag); +#ifdef illumos if ((*zfvp)->z_unmounted) { /* * XXX we could probably try again, since the unmounting @@ -1497,6 +1498,13 @@ zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zf rrm_exit(&(*zfvp)->z_teardown_lock, tag); return (SET_ERROR(EBUSY)); } +#else + /* + * vfs_busy() ensures that the filesystem is not and + * can not be unmounted. + */ + ASSERT(!(*zfvp)->z_unmounted); +#endif } return (error); } From owner-svn-src-head@freebsd.org Tue Sep 12 06:05:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FBC1E1AD66; Tue, 12 Sep 2017 06:05:32 +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 F14BF3BB7; Tue, 12 Sep 2017 06:05:31 +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 v8C65V5C052716; Tue, 12 Sep 2017 06:05:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C65Vgn052715; Tue, 12 Sep 2017 06:05:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709120605.v8C65Vgn052715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 06:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323482 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 06:05:32 -0000 Author: avg Date: Tue Sep 12 06:05:30 2017 New Revision: 323482 URL: https://svnweb.freebsd.org/changeset/base/323482 Log: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives None of the tagged functions had unused parameters. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 12 06:04:50 2017 (r323481) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 12 06:05:30 2017 (r323482) @@ -434,7 +434,6 @@ zfsctl_root(zfsvfs_t *zfsvfs, int flags, vnode_t **vpp /* * Common open routine. Disallow any write access. */ -/* ARGSUSED */ static int zfsctl_common_open(struct vop_open_args *ap) { @@ -459,7 +458,6 @@ zfsctl_common_close(struct vop_close_args *ap) /* * Common access routine. Disallow writes. */ -/* ARGSUSED */ static int zfsctl_common_access(ap) struct vop_access_args /* { @@ -515,7 +513,6 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nlink = 2; } -/*ARGSUSED*/ static int zfsctl_common_fid(ap) struct vop_fid_args /* { @@ -569,7 +566,6 @@ zfsctl_common_print(ap) /* * Get root directory attributes. */ -/* ARGSUSED */ static int zfsctl_root_getattr(ap) struct vop_getattr_args /* { @@ -821,7 +817,6 @@ zfsctl_snapshot_vnode_setup(vnode_t *vp, void *arg) * snapshot if it exist, creating the pseudo filesystem vnode as necessary. * Perform a mount of the associated dataset on top of the vnode. */ -/* ARGSUSED */ int zfsctl_snapdir_lookup(ap) struct vop_lookup_args /* { @@ -1013,7 +1008,6 @@ zfsctl_snapdir_readdir(ap) /* NOTREACHED */ } -/* ARGSUSED */ static int zfsctl_snapdir_getattr(ap) struct vop_getattr_args /* { From owner-svn-src-head@freebsd.org Tue Sep 12 06:06:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7164FE1AE4E; Tue, 12 Sep 2017 06:06:59 +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 4C84C3D26; Tue, 12 Sep 2017 06:06:59 +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 v8C66wJm052806; Tue, 12 Sep 2017 06:06:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C66wD3052805; Tue, 12 Sep 2017 06:06:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709120606.v8C66wD3052805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 06:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323483 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 06:06:59 -0000 Author: avg Date: Tue Sep 12 06:06:58 2017 New Revision: 323483 URL: https://svnweb.freebsd.org/changeset/base/323483 Log: zfsctl_snapdir_lookup should be able to handle an uncovered vnode The uncovered vnode is possible because there is no guarantee that its hold count would go to zero (and it would be inactivated and reclaimed) immediately after a covering filesystem is unmounted. So, such a vnode should be expected and it is possible to re-use it without any trouble. MFC after: 3 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 12 06:05:30 2017 (r323482) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 12 06:06:58 2017 (r323483) @@ -816,6 +816,12 @@ zfsctl_snapshot_vnode_setup(vnode_t *vp, void *arg) * Lookup entry point for the 'snapshot' directory. Try to open the * snapshot if it exist, creating the pseudo filesystem vnode as necessary. * Perform a mount of the associated dataset on top of the vnode. + * There are four possibilities: + * - the snapshot node and vnode do not exist + * - the snapshot vnode is covered by the mounted snapshot + * - the snapshot vnode is not covered yet, the mount operation is in progress + * - the snapshot vnode is not covered, because the snapshot has been unmounted + * The last two states are transient and should be relatively short-lived. */ int zfsctl_snapdir_lookup(ap) @@ -881,7 +887,7 @@ zfsctl_snapdir_lookup(ap) /* * The vnode must be referenced at least by this thread and - * the mounted snapshot or the thread doing the mounting. + * the mount point or the thread doing the mounting. * There can be more references from concurrent lookups. */ KASSERT(vrefcnt(*vpp) > 1, ("found unreferenced mountpoint")); @@ -893,22 +899,31 @@ zfsctl_snapdir_lookup(ap) if (err != EJUSTRETURN) return (err); -#ifdef INVARIANTS /* - * If the vnode not covered yet, then the mount operation - * must be in progress. + * If the vnode is not covered, then either the mount operation + * is in progress or the snapshot has already been unmounted + * but the vnode hasn't been inactivated and reclaimed yet. + * We can try to re-use the vnode in the latter case. */ VI_LOCK(*vpp); - KASSERT(((*vpp)->v_iflag & VI_MOUNT) != 0, - ("snapshot vnode not covered")); - VI_UNLOCK(*vpp); -#endif - vput(*vpp); + if (((*vpp)->v_iflag & VI_MOUNT) == 0) { + /* Upgrade to exclusive lock in order to: + * - avoid race conditions + * - satisfy the contract of mount_snapshot() + */ + err = VOP_LOCK(*vpp, LK_TRYUPGRADE | LK_INTERLOCK); + if (err == 0) + break; + } else { + VI_UNLOCK(*vpp); + } /* - * In this situation we can loop on uncontested locks and starve + * In this state we can loop on uncontested locks and starve * the thread doing the lengthy, non-trivial mount operation. + * So, yield to prevent that from happening. */ + vput(*vpp); kern_yield(PRI_USER); } From owner-svn-src-head@freebsd.org Tue Sep 12 10:43:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 531BEE024C3; Tue, 12 Sep 2017 10:43:04 +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 12A3C6C5D6; Tue, 12 Sep 2017 10:43:04 +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 v8CAh3YL066740; Tue, 12 Sep 2017 10:43:03 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CAh2tE066737; Tue, 12 Sep 2017 10:43:02 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201709121043.v8CAh2tE066737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 12 Sep 2017 10:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323490 - head/sys/arm/ti X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm/ti X-SVN-Commit-Revision: 323490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 10:43:04 -0000 Author: cognet Date: Tue Sep 12 10:43:02 2017 New Revision: 323490 URL: https://svnweb.freebsd.org/changeset/base/323490 Log: Some devices come with the same name as TI devices, so we can't rely on the "probe" method of those drivers to mean we're on e TI SoC. Introduce a new function, ti_soc_is_supported(), and use it to be sure we're really a TI system. PR: 222250 Modified: head/sys/arm/ti/ti_cpuid.c head/sys/arm/ti/ti_cpuid.h head/sys/arm/ti/ti_scm.c Modified: head/sys/arm/ti/ti_cpuid.c ============================================================================== --- head/sys/arm/ti/ti_cpuid.c Tue Sep 12 06:34:02 2017 (r323489) +++ head/sys/arm/ti/ti_cpuid.c Tue Sep 12 10:43:02 2017 (r323490) @@ -272,11 +272,7 @@ am335x_get_revision(void) static void ti_cpu_ident(void *dummy) { - phandle_t root; - - root = OF_finddevice("/"); - if (!ofw_bus_node_is_compatible(root, "ti,omap4") && - !ofw_bus_node_is_compatible(root, "ti,am33xx")) + if (!ti_soc_is_supported()) return; switch(ti_chip()) { case CHIP_OMAP_4: Modified: head/sys/arm/ti/ti_cpuid.h ============================================================================== --- head/sys/arm/ti/ti_cpuid.h Tue Sep 12 06:34:02 2017 (r323489) +++ head/sys/arm/ti/ti_cpuid.h Tue Sep 12 10:43:02 2017 (r323490) @@ -80,4 +80,10 @@ static __inline int ti_chip(void) uint32_t ti_revision(void); +static __inline bool ti_soc_is_supported(void) +{ + + return (_ti_chip != -1); +} + #endif /* _TI_CPUID_H_ */ Modified: head/sys/arm/ti/ti_scm.c ============================================================================== --- head/sys/arm/ti/ti_scm.c Tue Sep 12 06:34:02 2017 (r323489) +++ head/sys/arm/ti/ti_scm.c Tue Sep 12 10:43:02 2017 (r323490) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include "ti_scm.h" +#include "ti_cpuid.h" static struct resource_spec ti_scm_res_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Control memory window */ @@ -86,6 +87,10 @@ static struct ti_scm_softc *ti_scm_sc; static int ti_scm_probe(device_t dev) { + + if (!ti_soc_is_supported()) + return (ENXIO); + if (!ofw_bus_status_okay(dev)) return (ENXIO); From owner-svn-src-head@freebsd.org Tue Sep 12 13:21:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C8B1E09025; Tue, 12 Sep 2017 13:21:16 +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 ED4DD70FF7; Tue, 12 Sep 2017 13:21:15 +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 v8CDLFhJ030733; Tue, 12 Sep 2017 13:21:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDLF4n030732; Tue, 12 Sep 2017 13:21:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709121321.v8CDLF4n030732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Sep 2017 13:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323491 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 13:21:16 -0000 Author: avg Date: Tue Sep 12 13:21:14 2017 New Revision: 323491 URL: https://svnweb.freebsd.org/changeset/base/323491 Log: fix a fallout from the ZTOV tightening, r323479 MFC after: 13 days X-MFC with: r323479 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Tue Sep 12 10:43:02 2017 (r323490) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Tue Sep 12 13:21:14 2017 (r323491) @@ -1602,7 +1602,10 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va boolean_t trim = B_FALSE; boolean_t inherited = B_FALSE; - ASSERT_VOP_ELOCKED(ZTOV(dzp), __func__); + if ((flag & IS_ROOT_NODE) == 0) + ASSERT_VOP_ELOCKED(ZTOV(dzp), __func__); + else + ASSERT(dzp->z_vnode == NULL); bzero(acl_ids, sizeof (zfs_acl_ids_t)); acl_ids->z_mode = MAKEIMODE(vap->va_type, vap->va_mode); From owner-svn-src-head@freebsd.org Tue Sep 12 13:34:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F054E09B0E; Tue, 12 Sep 2017 13:34:45 +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 191E371A2E; Tue, 12 Sep 2017 13:34:45 +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 v8CDYiFU036670; Tue, 12 Sep 2017 13:34:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDYieb036667; Tue, 12 Sep 2017 13:34:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709121334.v8CDYieb036667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 Sep 2017 13:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323492 - in head: sys/netinet usr.bin/sockstat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: sys/netinet usr.bin/sockstat X-SVN-Commit-Revision: 323492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 13:34:45 -0000 Author: tuexen Date: Tue Sep 12 13:34:43 2017 New Revision: 323492 URL: https://svnweb.freebsd.org/changeset/base/323492 Log: Add support to print the TCP stack being used. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_var.h head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Tue Sep 12 13:21:14 2017 (r323491) +++ head/sys/netinet/tcp_var.h Tue Sep 12 13:34:43 2017 (r323492) @@ -655,7 +655,7 @@ struct tcp_hhook_data { struct xtcpcb { size_t xt_len; /* length of this structure */ struct xinpcb xt_inp; - char xt_stack[TCP_FUNCTION_NAME_LEN_MAX]; /* (n) */ + char xt_stack[TCP_FUNCTION_NAME_LEN_MAX]; /* (s) */ int64_t spare64[8]; int32_t t_state; /* (s,p) */ uint32_t t_flags; /* (s,p) */ Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Tue Sep 12 13:21:14 2017 (r323491) +++ head/usr.bin/sockstat/sockstat.1 Tue Sep 12 13:34:43 2017 (r323492) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2015 +.Dd September 12, 2017 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46cLlsu +.Op Fl 46cLlSsu .Op Fl j Ar jid .Op Fl p Ar ports .Op Fl P Ar protocols @@ -83,6 +83,9 @@ The argument is a comma-separated list of protocol names, as they are defined in .Xr protocols 5 . +.It Fl S +Display the protocol stack, if applicable. +This is currently only implemented for TCP. .It Fl s Display the protocol state, if applicable. This is currently only implemented for SCTP and TCP. @@ -143,6 +146,14 @@ if the endpoint could not be determined. (Internet sockets only) The address the foreign end of the socket is bound to (see .Xr getpeername 2 ) . +.It Li STATE +The protocol state if +.Fl s +is specified (only for SCTP or TCP). +.It Li STACK +The protocol stack if +.Fl S +is specified (only for TCP). .El .Pp If a socket is associated with more than one file descriptor, Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Sep 12 13:21:14 2017 (r323491) +++ head/usr.bin/sockstat/sockstat.c Tue Sep 12 13:34:43 2017 (r323492) @@ -73,6 +73,7 @@ static int opt_c; /* Show connected sockets */ static int opt_j; /* Show specified jail */ static int opt_L; /* Don't show IPv4 or IPv6 loopback sockets */ static int opt_l; /* Show listening sockets */ +static int opt_S; /* Show protocol stack if applicable */ static int opt_s; /* Show protocol state if applicable */ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ @@ -106,6 +107,7 @@ struct sock { int proto; int state; const char *protoname; + char stack[TCP_FUNCTION_NAME_LEN_MAX]; struct addr *laddr; struct addr *faddr; struct sock *next; @@ -698,8 +700,11 @@ gather_inet(int proto) sock->laddr = laddr; sock->faddr = faddr; sock->vflag = xip->inp_vflag; - if (proto == IPPROTO_TCP) + if (proto == IPPROTO_TCP) { sock->state = xtp->t_state; + memcpy(sock->stack, xtp->xt_stack, + TCP_FUNCTION_NAME_LEN_MAX); + } sock->protoname = protoname; hash = (int)((uintptr_t)sock->socket % HASHSIZE); sock->next = sockhash[hash]; @@ -1040,22 +1045,37 @@ displaysock(struct sock *s, int pos) default: abort(); } - if (first && opt_s && - (s->proto == IPPROTO_SCTP || s->proto == IPPROTO_TCP)) { - while (pos < 80) - pos += xprintf(" "); - switch (s->proto) { - case IPPROTO_SCTP: - pos += xprintf("%s", sctp_state(s->state)); - break; - case IPPROTO_TCP: - if (s->state >= 0 && s->state < TCP_NSTATES) - pos += - xprintf("%s", tcpstates[s->state]); - else - pos += xprintf("?"); - break; + if (first) { + if (opt_s && + (s->proto == IPPROTO_SCTP || + s->proto == IPPROTO_TCP)) { + while (pos < 80) + pos += xprintf(" "); + switch (s->proto) { + case IPPROTO_SCTP: + pos += xprintf("%s", + sctp_state(s->state)); + break; + case IPPROTO_TCP: + if (s->state >= 0 && + s->state < TCP_NSTATES) + pos += + xprintf("%s", + tcpstates[s->state]); + else + pos += xprintf("?"); + break; + } } + if (opt_S && s->proto == IPPROTO_TCP) { + while (pos < 80) + pos += xprintf(" "); + if (opt_s) + while (pos < 93) + pos += xprintf(" "); + xprintf("%.*s", TCP_FUNCTION_NAME_LEN_MAX, + s->stack); + } } if (laddr != NULL) laddr = laddr->next; @@ -1083,6 +1103,8 @@ display(void) "LOCAL ADDRESS", "FOREIGN ADDRESS"); if (opt_s) printf(" %-12s", "STATE"); + if (opt_S) + printf(" %.*s", TCP_FUNCTION_NAME_LEN_MAX, "STACK"); printf("\n"); setpassent(1); for (xf = xfiles, n = 0; n < nxfiles; ++n, ++xf) { @@ -1153,7 +1175,7 @@ static void usage(void) { fprintf(stderr, - "usage: sockstat [-46cLlsu] [-j jid] [-p ports] [-P protocols]\n"); + "usage: sockstat [-46cLlSsu] [-j jid] [-p ports] [-P protocols]\n"); exit(1); } @@ -1164,7 +1186,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46cj:Llp:P:suv")) != -1) + while ((o = getopt(argc, argv, "46cj:Llp:P:Ssuv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1189,6 +1211,9 @@ main(int argc, char *argv[]) break; case 'P': protos_defined = parse_protos(optarg); + break; + case 'S': + opt_S = 1; break; case 's': opt_s = 1; From owner-svn-src-head@freebsd.org Tue Sep 12 13:39:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7B9AE09D2C; Tue, 12 Sep 2017 13:39:45 +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 8272371C47; Tue, 12 Sep 2017 13:39:45 +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 v8CDdipP036960; Tue, 12 Sep 2017 13:39:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDdiWH036958; Tue, 12 Sep 2017 13:39:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709121339.v8CDdiWH036958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 Sep 2017 13:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323493 - head/usr.sbin/tcpdrop X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.sbin/tcpdrop X-SVN-Commit-Revision: 323493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 13:39:45 -0000 Author: tuexen Date: Tue Sep 12 13:39:44 2017 New Revision: 323493 URL: https://svnweb.freebsd.org/changeset/base/323493 Log: Allow TCP connections to be filtered by stack and state. Choose the command line options to be consistent with the ones of sockstat. Sponsored by: Netflix, Inc. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 head/usr.sbin/tcpdrop/tcpdrop.c Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Tue Sep 12 13:34:43 2017 (r323492) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Tue Sep 12 13:39:44 2017 (r323493) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2013 +.Dd September 12, 2017 .Dt TCPDROP 8 .Os .Sh NAME @@ -32,6 +32,16 @@ .Nm tcpdrop .Op Fl l .Fl a +.Nm tcpdrop +.Op Fl l +.Fl S Ar stack +.Nm tcpdrop +.Op Fl l +.Fl s Ar state +.Nm tcpdrop +.Op Fl l +.Fl S Ar stack +.Fl s Ar state .Sh DESCRIPTION The .Nm @@ -41,15 +51,49 @@ If .Fl a is specified then .Nm -will attempt to drop all active connections. +will attempt to drop all TCP connections. +.Pp +If +.Fl S Ar stack +is specified then +.Nm +will attempt to drop all connections using the TCP stack +.Ar stack . +.Pp +If +.Fl s Ar state +is specified then +.Nm +will attempt to drop all TCP connections being in the state +.Ar state . +.Ar state +is one of +.Dv SYN_SENT , +.Dv SYN_RCVD , +.Dv ESTABLISHED , +.Dv CLOSE_WAIT , +.Dv FIN_WAIT_1 , +.Dv CLOSING , +.Dv LAST_ACK , +.Dv FIN_WAIT_2 , or +.Dv TIME_WAIT . +.Pp The .Fl l -flag may be given to list the tcpdrop invocation to drop all active +flag may be given in addition to the +.Fl a , +.Fl S , +or +.Fl s +options to list the tcpdrop invocation to drop all corresponding TCP connections one at a time. .Pp -If -.Fl a -is not specified then only the connection between the given local +If none of the +.Fl a , +.Fl S , +or +.Fl s +options are specified then only the connection between the given local address .Ar local-address , port @@ -88,6 +132,23 @@ port 22, the port used by .Xr sshd 8 : .Bd -literal -offset indent # tcpdrop -l -a | grep -vw 22 | sh +.Ed +.Pp +The following command will drop all connections using the TCP stack +fastack: +.Bd -literal -offset indent +# tcpdrop -S fastack +.Ed +.Pp +To drop all TCP connections in the LAST_ACK state use: +.Bd -literal -offset indent +# tcpdrop -s LAST_ACK +.Ed +.Pp +To drop all TCP connections using the TCP stack fastack and being in the +LAST_ACK state use: +.Bd -literal -offset indent +# tcpdrop -S fastack -s LAST_ACK .Ed .Sh SEE ALSO .Xr netstat 1 , Modified: head/usr.sbin/tcpdrop/tcpdrop.c ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.c Tue Sep 12 13:34:43 2017 (r323492) +++ head/usr.sbin/tcpdrop/tcpdrop.c Tue Sep 12 13:39:44 2017 (r323493) @@ -54,7 +54,7 @@ static char *findport(const char *); static struct xinpgen *getxpcblist(const char *); static void sockinfo(const struct sockaddr *, struct host_service *); static bool tcpdrop(const struct sockaddr *, const struct sockaddr *); -static bool tcpdropall(void); +static bool tcpdropall(const char *, int); static bool tcpdropbyname(const char *, const char *, const char *, const char *); static bool tcpdropconn(const struct in_conninfo *); @@ -66,13 +66,17 @@ static void usage(void); int main(int argc, char *argv[]) { + char stack[TCP_FUNCTION_NAME_LEN_MAX]; char *lport, *fport; - bool dropall; - int ch; + bool dropall, dropallstack; + int ch, state; dropall = false; + dropallstack = false; + memset(stack, 0, TCP_FUNCTION_NAME_LEN_MAX); + state = -1; - while ((ch = getopt(argc, argv, "al")) != -1) { + while ((ch = getopt(argc, argv, "alS:s:")) != -1) { switch (ch) { case 'a': dropall = true; @@ -80,6 +84,17 @@ main(int argc, char *argv[]) case 'l': tcpdrop_list_commands = true; break; + case 'S': + dropallstack = true; + strncpy(stack, optarg, TCP_FUNCTION_NAME_LEN_MAX); + break; + case 's': + dropallstack = true; + for (state = 0; state < TCP_NSTATES; state++) { + if (strcmp(tcpstates[state], optarg) == 0) + break; + } + break; default: usage(); } @@ -87,10 +102,16 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (dropall) { + if (state == TCP_NSTATES || + state == TCPS_CLOSED || + state == TCPS_LISTEN) + usage(); + if (dropall && dropallstack) + usage(); + if (dropall || dropallstack) { if (argc != 0) usage(); - if (!tcpdropall()) + if (!tcpdropall(stack, state)) exit(1); exit(0); } @@ -202,7 +223,7 @@ tcpdrop(const struct sockaddr *lsa, const struct socka } static bool -tcpdropall(void) +tcpdropall(const char *stack, int state) { struct xinpgen *head, *xinp; struct xtcpcb *xtp; @@ -234,6 +255,15 @@ tcpdropall(void) if (xtp->t_state == TCPS_LISTEN) continue; + /* If requested, skip sockets not having the requested state. */ + if ((state != -1) && (xtp->t_state != state)) + continue; + + /* If requested, skip sockets not having the requested stack. */ + if (strnlen(stack, TCP_FUNCTION_NAME_LEN_MAX) > 0 && + strncmp(xtp->xt_stack, stack, TCP_FUNCTION_NAME_LEN_MAX)) + continue; + if (!tcpdropconn(&xip->inp_inc)) ok = false; } @@ -348,6 +378,9 @@ usage(void) "usage: tcpdrop local-address local-port foreign-address foreign-port\n" " tcpdrop local-address:local-port foreign-address:foreign-port\n" " tcpdrop local-address.local-port foreign-address.foreign-port\n" -" tcpdrop [-l] -a\n"); +" tcpdrop [-l] -a\n" +" tcpdrop [-l] -S stack\n" +" tcpdrop [-l] -s state\n" +" tcpdrop [-l] -S stack -s state\n"); exit(1); } From owner-svn-src-head@freebsd.org Tue Sep 12 13:45:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21F3EE0A40B; Tue, 12 Sep 2017 13:45:06 +0000 (UTC) (envelope-from tsoome@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 ED979723DC; Tue, 12 Sep 2017 13:45:05 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CDj50W040973; Tue, 12 Sep 2017 13:45:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDj401040971; Tue, 12 Sep 2017 13:45:04 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709121345.v8CDj401040971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 12 Sep 2017 13:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323494 - in head/sys: boot/zfs cddl/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/sys: boot/zfs cddl/boot/zfs X-SVN-Commit-Revision: 323494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 13:45:06 -0000 Author: tsoome Date: Tue Sep 12 13:45:04 2017 New Revision: 323494 URL: https://svnweb.freebsd.org/changeset/base/323494 Log: loader should support large_dnode The zfsonlinux feature large_dnode is not yet supported by the loader. Reviewed by: avg, allanjude Differential Revision: https://reviews.freebsd.org/D12288 Modified: head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Sep 12 13:39:44 2017 (r323493) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 12 13:45:04 2017 (r323494) @@ -60,6 +60,7 @@ static const char *features_for_read[] = { "org.open-zfs:large_blocks", "org.illumos:sha512", "org.illumos:skein", + "org.zfsonlinux:large_dnode", NULL }; @@ -420,7 +421,7 @@ vdev_read_phys(vdev_t *vdev, const blkptr_t *bp, void psize = size; } - /*printf("ZFS: reading %d bytes at 0x%jx to %p\n", psize, (uintmax_t)offset, buf);*/ + /*printf("ZFS: reading %zu bytes at 0x%jx to %p\n", psize, (uintmax_t)offset, buf);*/ rc = vdev->v_phys_read(vdev, vdev->v_read_priv, offset, buf, psize); if (rc) return (rc); @@ -2280,7 +2281,7 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, str sahdrp = (sa_hdr_phys_t *)DN_BONUS(dn); else { if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0) { - blkptr_t *bp = &dn->dn_spill; + blkptr_t *bp = DN_SPILL_BLKPTR(dn); int error; size = BP_GET_LSIZE(bp); @@ -2330,7 +2331,7 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0) return (EIO); - bp = &dn->dn_spill; + bp = DN_SPILL_BLKPTR(dn); size = BP_GET_LSIZE(bp); buf = zfs_alloc(size); Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 12 13:39:44 2017 (r323493) +++ head/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 12 13:45:04 2017 (r323494) @@ -859,10 +859,19 @@ struct uberblock { /* * Derived constants. */ -#define DNODE_SIZE (1 << DNODE_SHIFT) -#define DN_MAX_NBLKPTR ((DNODE_SIZE - DNODE_CORE_SIZE) >> SPA_BLKPTRSHIFT) -#define DN_MAX_BONUSLEN (DNODE_SIZE - DNODE_CORE_SIZE - (1 << SPA_BLKPTRSHIFT)) -#define DN_MAX_OBJECT (1ULL << DN_MAX_OBJECT_SHIFT) +#define DNODE_MIN_SIZE (1 << DNODE_SHIFT) +#define DNODE_MAX_SIZE (1 << DNODE_BLOCK_SHIFT) +#define DNODE_BLOCK_SIZE (1 << DNODE_BLOCK_SHIFT) +#define DNODE_MIN_SLOTS (DNODE_MIN_SIZE >> DNODE_SHIFT) +#define DNODE_MAX_SLOTS (DNODE_MAX_SIZE >> DNODE_SHIFT) +#define DN_BONUS_SIZE(dnsize) ((dnsize) - DNODE_CORE_SIZE - \ + (1 << SPA_BLKPTRSHIFT)) +#define DN_SLOTS_TO_BONUSLEN(slots) DN_BONUS_SIZE((slots) << DNODE_SHIFT) +#define DN_OLD_MAX_BONUSLEN (DN_BONUS_SIZE(DNODE_MIN_SIZE)) +#define DN_MAX_NBLKPTR ((DNODE_MIN_SIZE - DNODE_CORE_SIZE) >> \ + SPA_BLKPTRSHIFT) +#define DN_MAX_OBJECT (1ULL << DN_MAX_OBJECT_SHIFT) +#define DN_ZERO_BONUSLEN (DN_BONUS_SIZE(DNODE_MAX_SIZE) + 1) #define DNODES_PER_BLOCK_SHIFT (DNODE_BLOCK_SHIFT - DNODE_SHIFT) #define DNODES_PER_BLOCK (1ULL << DNODES_PER_BLOCK_SHIFT) @@ -898,7 +907,8 @@ typedef struct dnode_phys { uint8_t dn_flags; /* DNODE_FLAG_* */ uint16_t dn_datablkszsec; /* data block size in 512b sectors */ uint16_t dn_bonuslen; /* length of dn_bonus */ - uint8_t dn_pad2[4]; + uint8_t dn_extra_slots; /* # of subsequent slots consumed */ + uint8_t dn_pad2[3]; /* accounting is protected by dn_dirty_mtx */ uint64_t dn_maxblkid; /* largest allocated block ID */ @@ -906,10 +916,39 @@ typedef struct dnode_phys { uint64_t dn_pad3[4]; - blkptr_t dn_blkptr[1]; - uint8_t dn_bonus[DN_MAX_BONUSLEN - sizeof (blkptr_t)]; - blkptr_t dn_spill; + /* + * The tail region is 448 bytes for a 512 byte dnode, and + * correspondingly larger for larger dnode sizes. The spill + * block pointer, when present, is always at the end of the tail + * region. There are three ways this space may be used, using + * a 512 byte dnode for this diagram: + * + * 0 64 128 192 256 320 384 448 (offset) + * +---------------+---------------+---------------+-------+ + * | dn_blkptr[0] | dn_blkptr[1] | dn_blkptr[2] | / | + * +---------------+---------------+---------------+-------+ + * | dn_blkptr[0] | dn_bonus[0..319] | + * +---------------+-----------------------+---------------+ + * | dn_blkptr[0] | dn_bonus[0..191] | dn_spill | + * +---------------+-----------------------+---------------+ + */ + union { + blkptr_t dn_blkptr[1+DN_OLD_MAX_BONUSLEN/sizeof (blkptr_t)]; + struct { + blkptr_t __dn_ignore1; + uint8_t dn_bonus[DN_OLD_MAX_BONUSLEN]; + }; + struct { + blkptr_t __dn_ignore2; + uint8_t __dn_ignore3[DN_OLD_MAX_BONUSLEN - + sizeof (blkptr_t)]; + blkptr_t dn_spill; + }; + }; } dnode_phys_t; + +#define DN_SPILL_BLKPTR(dnp) (blkptr_t *)((char *)(dnp) + \ + (((dnp)->dn_extra_slots + 1) << DNODE_SHIFT) - (1 << SPA_BLKPTRSHIFT)) typedef enum dmu_object_byteswap { DMU_BSWAP_UINT8, From owner-svn-src-head@freebsd.org Tue Sep 12 13:51:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AACFE0AAE9; Tue, 12 Sep 2017 13:51:19 +0000 (UTC) (envelope-from tsoome@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 058F872999; Tue, 12 Sep 2017 13:51:18 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CDpIcB042021; Tue, 12 Sep 2017 13:51:18 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDpIOd042020; Tue, 12 Sep 2017 13:51:18 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709121351.v8CDpIOd042020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 12 Sep 2017 13:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323496 - head/lib/libstand X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/lib/libstand X-SVN-Commit-Revision: 323496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 13:51:19 -0000 Author: tsoome Date: Tue Sep 12 13:51:18 2017 New Revision: 323496 URL: https://svnweb.freebsd.org/changeset/base/323496 Log: libstand: tftp_open() can leak pkt on error The memory can be leaked if we will have pkt set and will get an error during tftp_open() processing. Differential Revision: https://reviews.freebsd.org/D12202 Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Tue Sep 12 13:47:54 2017 (r323495) +++ head/lib/libstand/tftp.c Tue Sep 12 13:51:18 2017 (r323496) @@ -467,6 +467,7 @@ tftp_open(const char *path, struct open_file *f) if (res) { free(tftpfile->path); + free(tftpfile->pkt); free(tftpfile); return (res); } From owner-svn-src-head@freebsd.org Tue Sep 12 14:18:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F6AFE0BA2D; Tue, 12 Sep 2017 14:18:46 +0000 (UTC) (envelope-from tsoome@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 5C55E737CC; Tue, 12 Sep 2017 14:18:46 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CEIjPH053660; Tue, 12 Sep 2017 14:18:45 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CEIjX5053659; Tue, 12 Sep 2017 14:18:45 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709121418.v8CEIjX5053659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 12 Sep 2017 14:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323497 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 14:18:46 -0000 Author: tsoome Date: Tue Sep 12 14:18:45 2017 New Revision: 323497 URL: https://svnweb.freebsd.org/changeset/base/323497 Log: libefi: efipart_open should check the status from disk_open In case of error from disk_open(), we should clean up properly. Reviewed by: allanjude, imp Differential Revision: https://reviews.freebsd.org/D12340 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Tue Sep 12 13:51:18 2017 (r323496) +++ head/sys/boot/efi/libefi/efipart.c Tue Sep 12 14:18:45 2017 (r323497) @@ -723,9 +723,20 @@ efipart_open(struct open_file *f, ...) pd->pd_bcache = bcache_allocate(); if (dev->d_dev->dv_type == DEVT_DISK) { - return (disk_open(dev, + int rc; + + rc = disk_open(dev, blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), - blkio->Media->BlockSize)); + blkio->Media->BlockSize); + if (rc != 0) { + pd->pd_open--; + if (pd->pd_open == 0) { + pd->pd_blkio = NULL; + bcache_free(pd->pd_bcache); + pd->pd_bcache = NULL; + } + } + return (rc); } return (0); } From owner-svn-src-head@freebsd.org Tue Sep 12 14:38:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36C18E0C7BF; Tue, 12 Sep 2017 14:38:12 +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 F41A1742A2; Tue, 12 Sep 2017 14:38:11 +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 v8CEcA9w061543; Tue, 12 Sep 2017 14:38:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CEcAM4061542; Tue, 12 Sep 2017 14:38:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709121438.v8CEcAM4061542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Sep 2017 14:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323498 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 323498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 14:38:12 -0000 Author: markj Date: Tue Sep 12 14:38:10 2017 New Revision: 323498 URL: https://svnweb.freebsd.org/changeset/base/323498 Log: Add a O_CLOEXEC use missed in r323166. PR: 199810 Reported by: Jukka A. Ukkonen MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Sep 12 14:18:45 2017 (r323497) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Sep 12 14:38:10 2017 (r323498) @@ -1109,7 +1109,7 @@ dt_vopen(int version, int flags, int *errp, */ if (err == ENOENT && modfind("dtraceall") < 0) { kldload("dtraceall"); /* ignore the error */ - dtfd = open("/dev/dtrace/dtrace", O_RDWR); + dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC); err = errno; } #endif From owner-svn-src-head@freebsd.org Tue Sep 12 16:00:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CFCEE0FEC4; Tue, 12 Sep 2017 16:00:53 +0000 (UTC) (envelope-from lwhsu@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 1FEF17735F; Tue, 12 Sep 2017 16:00:53 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CG0qLn096680; Tue, 12 Sep 2017 16:00:52 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CG0qBW096679; Tue, 12 Sep 2017 16:00:52 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201709121600.v8CG0qBW096679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 12 Sep 2017 16:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323499 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs X-SVN-Commit-Revision: 323499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 16:00:53 -0000 Author: lwhsu (ports committer) Date: Tue Sep 12 16:00:51 2017 New Revision: 323499 URL: https://svnweb.freebsd.org/changeset/base/323499 Log: Fix DTrace test tst_inet_ntop_d: remove definitions are already in libdtrace We have D definitions for the named values in socket.h after r323253. Remove them in test script to prevent compiling failure. Reviewed by: markj, gnn Differential Revision: https://reviews.freebsd.org/D12334 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Tue Sep 12 14:38:10 2017 (r323498) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Tue Sep 12 16:00:51 2017 (r323499) @@ -28,9 +28,6 @@ #pragma D option quiet -inline int AF_INET = 2; -inline int AF_INET6 = 28; - in_addr_t *ip4a; in_addr_t *ip4b; in_addr_t *ip4c; From owner-svn-src-head@freebsd.org Tue Sep 12 17:06:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BAE7E12D09; Tue, 12 Sep 2017 17:06:36 +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 733607D8DE; Tue, 12 Sep 2017 17:06:36 +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 v8CH6Z2e024988; Tue, 12 Sep 2017 17:06:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CH6ZAG024985; Tue, 12 Sep 2017 17:06:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709121706.v8CH6ZAG024985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Sep 2017 17:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323500 - in head: . libexec/rtld-elf/arm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . libexec/rtld-elf/arm X-SVN-Commit-Revision: 323500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 17:06:36 -0000 Author: imp Date: Tue Sep 12 17:06:35 2017 New Revision: 323500 URL: https://svnweb.freebsd.org/changeset/base/323500 Log: End softfp->hardfp transition period for arm On hard-float 32-bit arm platforms, always search for the soft float binaries in the alternative locations. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D12274 MFC After: 1 week Modified: head/UPDATING head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/arm/rtld_machdep.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Sep 12 16:00:51 2017 (r323499) +++ head/UPDATING Tue Sep 12 17:06:35 2017 (r323500) @@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170912: + For 32-bit arm compiled for hard-float support, soft-floating point + binaries now always get their shared libraries from + LD_SOFT_LIBRARY_PATH (in the past, this was only used if + /usr/libsoft also existed). Only users with a hard-float ld.so, but + soft-float everything else should be affected. + 20170826: During boot the geli passphrase will be hidden. To restore previous behavior see geli(8) configuration options. Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Tue Sep 12 16:00:51 2017 (r323499) +++ head/libexec/rtld-elf/arm/reloc.c Tue Sep 12 17:06:35 2017 (r323500) @@ -18,11 +18,18 @@ __FBSDID("$FreeBSD$"); #include "rtld.h" #include "paths.h" +#ifdef __ARM_FP +/* + * On processors that have hard floating point supported, we also support + * running soft float binaries. If we're being built with hard float support, + * check the ELF headers to make sure that this is a hard float binary. If it is + * a soft float binary, force the dynamic linker to use the alternative soft + * float path. + */ void arm_abi_variant_hook(Elf_Auxinfo **aux_info) { Elf_Word ehdr; - struct stat sb; /* * If we're running an old kernel that doesn't provide any data fail @@ -40,17 +47,6 @@ arm_abi_variant_hook(Elf_Auxinfo **aux_info) return; /* - * If there's no /usr/libsoft, then we don't have a system with both - * hard and soft float. In that case, hope for the best and just - * return. Such systems are required to have all soft or all hard - * float ABI binaries and libraries. This is, at best, a transition - * compatibility hack. Once we're fully hard-float, this should - * be removed. - */ - if (stat("/usr/libsoft", &sb) != 0 || !S_ISDIR(sb.st_mode)) - return; - - /* * This is a soft float ABI binary. We need to use the soft float * settings. */ @@ -60,6 +56,7 @@ arm_abi_variant_hook(Elf_Auxinfo **aux_info) ld_standard_library_path = SOFT_STANDARD_LIBRARY_PATH; ld_env_prefix = LD_SOFT_; } +#endif void init_pltgot(Obj_Entry *obj) Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Tue Sep 12 16:00:51 2017 (r323499) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Tue Sep 12 17:06:35 2017 (r323500) @@ -31,6 +31,7 @@ #include #include +#include struct Struct_Obj_Entry; @@ -74,7 +75,11 @@ extern void *__tls_get_addr(tls_index *ti); extern void arm_abi_variant_hook(Elf_Auxinfo **); +#ifdef __ARM_FP #define md_abi_variant_hook(x) arm_abi_variant_hook(x) #define RTLD_VARIANT_ENV_NAMES +#else +#define md_abi_variant_hook(x) +#endif #endif From owner-svn-src-head@freebsd.org Tue Sep 12 17:46:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 372F8E14C36; Tue, 12 Sep 2017 17:46:32 +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 04DA37EF18; Tue, 12 Sep 2017 17:46:31 +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 v8CHkVeh041476; Tue, 12 Sep 2017 17:46:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CHkUdL041453; Tue, 12 Sep 2017 17:46:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709121746.v8CHkUdL041453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 12 Sep 2017 17:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323501 - in head: libexec/rtld-elf libexec/rtld-elf/mips sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: libexec/rtld-elf libexec/rtld-elf/mips sys/sys X-SVN-Commit-Revision: 323501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 17:46:32 -0000 Author: jhb Date: Tue Sep 12 17:46:30 2017 New Revision: 323501 URL: https://svnweb.freebsd.org/changeset/base/323501 Log: Handle relocations for newer non-PIC MIPS ABI. Newer binutils supports extensions to the MIPS ABI for non-PIC code that is used when compiling O32 binaries with clang 5 (but not used for N64 oddly enough). These extensions require support for R_MIPS_COPY relocations as well as a second PLT GOT using R_MIPS_JUMP_SLOT relocations. For R_MIPS_COPY, use the same approach as on other architectures where fixups are deferred to the MD do_copy_relocations. The additional PLT GOT for jump slots is located in a .got.plt section which is identified by a DT_MIPS_PLTGOT dynamic entry. This GOT also requires fixups for the first two GOT entries just as the normal GOT. However, the entry point for this second GOT uses a different calling convention. Rather than passing an offset into the GOT, it passes an offset into the .rel.plt section. This requires a second entry point (_rtld_pltbind_start) which calls the normal _rtld_bind() rather than _mips_rtld_bind(). This also means providing a real version of reloc_jmpslot() which is used by _rtld_bind(). In addition, add real implementions of reloc_plt() and reloc_jmpslots() which walk .rel.plt handling R_MIPS_JUMP_SLOT relocations. Reviewed by: kib Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D12326 Modified: head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/mips/rtld_start.S head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/sys/sys/elf_common.h Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Tue Sep 12 17:06:35 2017 (r323500) +++ head/libexec/rtld-elf/mips/reloc.c Tue Sep 12 17:46:30 2017 (r323501) @@ -67,21 +67,98 @@ __FBSDID("$FreeBSD$"); #define GOT1_RESERVED_FOR_RTLD(got) ((got)[1] & GOT1_MASK) #endif +#ifdef __mips_n64 +/* + * ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain + * the symbol index. The top 32-bits contain three relocation types encoded + * in big-endian integer with first relocation in LSB. This means for little + * endian we have to byte swap that integer (r_type). + */ +#define Elf_Sxword Elf64_Sxword +#define ELF_R_NXTTYPE_64_P(r_type) ((((r_type) >> 8) & 0xff) == R_TYPE(64)) +#if BYTE_ORDER == LITTLE_ENDIAN +#undef ELF_R_SYM +#undef ELF_R_TYPE +#define ELF_R_SYM(r_info) ((r_info) & 0xffffffff) +#define ELF_R_TYPE(r_info) bswap32((r_info) >> 32) +#endif +#else +#define ELF_R_NXTTYPE_64_P(r_type) (0) +#define Elf_Sxword Elf32_Sword +#endif + +void _rtld_pltbind_start(void); + void init_pltgot(Obj_Entry *obj) { + if (obj->pltgot != NULL) { obj->pltgot[0] = (Elf_Addr) &_rtld_bind_start; if (GOT1_RESERVED_FOR_RTLD(obj->pltgot)) obj->pltgot[1] = (Elf_Addr) obj | GOT1_MASK; } + if (obj->mips_pltgot != NULL) { + obj->mips_pltgot[0] = (Elf_Addr) &_rtld_pltbind_start; + obj->mips_pltgot[1] = (Elf_Addr) obj; + } } int do_copy_relocations(Obj_Entry *dstobj) { - /* Do nothing */ - return 0; + const Obj_Entry *srcobj, *defobj; + const Elf_Rel *rellim; + const Elf_Rel *rel; + const Elf_Sym *srcsym; + const Elf_Sym *dstsym; + const void *srcaddr; + const char *name; + void *dstaddr; + SymLook req; + size_t size; + int res; + + /* + * COPY relocs are invalid outside of the main program + */ + assert(dstobj->mainprog); + + rellim = (const Elf_Rel *)((caddr_t)dstobj->rel + dstobj->relsize); + for (rel = dstobj->rel; rel < rellim; rel++) { + if (ELF_R_TYPE(rel->r_info) != R_MIPS_COPY) + continue; + + dstaddr = (void *)(dstobj->relocbase + rel->r_offset); + dstsym = dstobj->symtab + ELF_R_SYM(rel->r_info); + name = dstobj->strtab + dstsym->st_name; + size = dstsym->st_size; + + symlook_init(&req, name); + req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rel->r_info)); + req.flags = SYMLOOK_EARLY; + + for (srcobj = globallist_next(dstobj); srcobj != NULL; + srcobj = globallist_next(srcobj)) { + res = symlook_obj(&req, srcobj); + if (res == 0) { + srcsym = req.sym_out; + defobj = req.defobj_out; + break; + } + } + if (srcobj == NULL) { + _rtld_error( +"Undefined symbol \"%s\" referenced from COPY relocation in %s", + name, dstobj->path); + return (-1); + } + + srcaddr = (const void *)(defobj->relocbase + srcsym->st_value); + memcpy(dstaddr, srcaddr, size); + } + + return (0); } void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); @@ -90,26 +167,6 @@ void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); * It is possible for the compiler to emit relocations for unaligned data. * We handle this situation with these inlines. */ -#ifdef __mips_n64 -/* - * ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain - * the symbol index. The top 32-bits contain three relocation types encoded - * in big-endian integer with first relocation in LSB. This means for little - * endian we have to byte swap that integer (r_type). - */ -#define Elf_Sxword Elf64_Sxword -#define ELF_R_NXTTYPE_64_P(r_type) ((((r_type) >> 8) & 0xff) == R_TYPE(64)) -#if BYTE_ORDER == LITTLE_ENDIAN -#undef ELF_R_SYM -#undef ELF_R_TYPE -#define ELF_R_SYM(r_info) ((r_info) & 0xffffffff) -#define ELF_R_TYPE(r_info) bswap32((r_info) >> 32) -#endif -#else -#define ELF_R_NXTTYPE_64_P(r_type) (0) -#define Elf_Sxword Elf32_Sword -#endif - static __inline Elf_Sxword load_ptr(void *where, size_t len) { @@ -475,6 +532,20 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int break; } + case R_TYPE(COPY): + /* + * These are deferred until all other relocations have + * been done. All we do here is make sure that the + * COPY relocation is not in a shared library. They + * are allowed only in executable files. + */ + if (!obj->mainprog) { + _rtld_error("%s: Unexpected R_MIPS_COPY " + "relocation in shared library", obj->path); + return (-1); + } + break; + #ifdef __mips_n64 case R_TYPE(TLS_DTPMOD64): #else @@ -581,23 +652,25 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int int reloc_plt(Obj_Entry *obj) { -#if 0 const Elf_Rel *rellim; const Elf_Rel *rel; - - dbg("reloc_plt obj:%p pltrel:%p sz:%s", obj, obj->pltrel, (int)obj->pltrelsize); - dbg("gottable %p num syms:%s", obj->pltgot, obj->symtabno ); - dbg("*****************************************************"); - rellim = (const Elf_Rel *)((char *)obj->pltrel + - obj->pltrelsize); - for (rel = obj->pltrel; rel < rellim; rel++) { + + rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize); + for (rel = obj->pltrel; rel < rellim; rel++) { Elf_Addr *where; - where = (Elf_Addr *)(obj->relocbase + rel->r_offset); - *where += (Elf_Addr )obj->relocbase; + + switch (ELF_R_TYPE(rel->r_info)) { + case R_MIPS_JUMP_SLOT: + where = (Elf_Addr *)(obj->relocbase + rel->r_offset); + *where += (Elf_Addr )obj->relocbase; + break; + default: + _rtld_error("Unknown relocation type %u in PLT", + (unsigned int)ELF_R_TYPE(rel->r_info)); + return (-1); + } } -#endif - /* PLT fixups were done above in the GOT relocation. */ return (0); } @@ -607,9 +680,34 @@ reloc_plt(Obj_Entry *obj) int reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { - /* Do nothing */ - obj->jmpslots_done = true; - + const Obj_Entry *defobj; + const Elf_Rel *rellim; + const Elf_Rel *rel; + const Elf_Sym *def; + + rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize); + for (rel = obj->pltrel; rel < rellim; rel++) { + Elf_Addr *where; + + switch (ELF_R_TYPE(rel->r_info)) { + case R_MIPS_JUMP_SLOT: + def = find_symdef(ELF_R_SYM(rel->r_info), obj, + &defobj, SYMLOOK_IN_PLT | flags, NULL, lockstate); + if (def == NULL) { + dbg("reloc_jmpslots: sym not found"); + return (-1); + } + + where = (Elf_Addr *)(obj->relocbase + rel->r_offset); + *where = (Elf_Addr)(defobj->relocbase + def->st_value); + break; + default: + _rtld_error("Unknown relocation type %u in PLT", + (unsigned int)ELF_R_TYPE(rel->r_info)); + return (-1); + } + } + return (0); } @@ -635,9 +733,11 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const const Obj_Entry *obj, const Elf_Rel *rel) { - /* Do nothing */ + assert(ELF_R_TYPE(rel->r_info) == R_MIPS_JUMP_SLOT); - return target; + if (*where != target && !ld_bind_not) + *where = target; + return (target); } void Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Tue Sep 12 17:06:35 2017 (r323500) +++ head/libexec/rtld-elf/mips/rtld_start.S Tue Sep 12 17:46:30 2017 (r323501) @@ -100,6 +100,9 @@ END(rtld_start) #define XCALLFRAME_A4 (0*SZREG) #endif +/* + * Trampoline for "old" PLT stubs which use .got entries. + */ .globl _rtld_bind_start .ent _rtld_bind_start _rtld_bind_start: @@ -188,3 +191,94 @@ _rtld_bind_start: nop .cfi_endproc END(_rtld_bind_start) + + +/* + * Trampoline for PLT stubs using .pltrel entries and .got.plt. + */ + .globl _rtld_pltbind_start + .ent _rtld_pltbind_start +_rtld_pltbind_start: + .frame sp, XCALLFRAME_SIZ, $15 + .cfi_startproc simple + .cfi_register ra, $15 +#if defined(__mips_o32) + move v1, gp /* save pointer to .got.plt */ +#else + move v1, t2 /* save pointer to .got.plt */ +#endif +#if defined(__mips_o32) || defined(__mips_o64) + PTR_ADDU t9, 8 /* modify T9 to point at .cpload */ +#endif + SETUP_GP + PTR_SUBU sp, XCALLFRAME_SIZ /* save arguments and sp value in stack */ + .cfi_def_cfa sp, XCALLFRAME_SIZ + SETUP_GP64(XCALLFRAME_GP, _rtld_pltbind_start) + SAVE_GP(XCALLFRAME_GP) +#if defined(__mips_n32) || defined(__mips_n64) + REG_S a4, XCALLFRAME_A4(sp) + .cfi_rel_offset a4, XCALLFRAME_A4 + REG_S a5, XCALLFRAME_A5(sp) + .cfi_rel_offset a5, XCALLFRAME_A5 + REG_S a6, XCALLFRAME_A6(sp) + .cfi_rel_offset a6, XCALLFRAME_A6 + REG_S a7, XCALLFRAME_A7(sp) + .cfi_rel_offset a7, XCALLFRAME_A7 +#endif + REG_S a0, XCALLFRAME_A0(sp) + .cfi_rel_offset a0, XCALLFRAME_A0 + REG_S a1, XCALLFRAME_A1(sp) + .cfi_rel_offset a1, XCALLFRAME_A1 + REG_S a2, XCALLFRAME_A2(sp) + .cfi_rel_offset a2, XCALLFRAME_A2 + REG_S a3, XCALLFRAME_A3(sp) + .cfi_rel_offset a3, XCALLFRAME_A3 + REG_S $15, XCALLFRAME_RA(sp) /* ra is in t7/t3 */ + .cfi_rel_offset ra, XCALLFRAME_RA + REG_S s0, XCALLFRAME_S0(sp) + .cfi_rel_offset s0, XCALLFRAME_S0 + move s0, sp + + move a0, v1 /* .got.plt */ +#if defined(__mips_n64) + ld a0, 8(a0) /* object = .got.plt[1] */ + sll a1, t8, 4 /* PLT entry index to .rel.plt offset */ +#else + lw a0, 4(a0) /* object = .got.plt[1] */ + sll a1, t8, 3 /* PLT entry index to .rel.plt offset */ +#endif + + PTR_LA t9, _C_LABEL(_rtld_bind) + jalr t9 + nop + + move sp, s0 + REG_L ra, XCALLFRAME_RA(sp) + .cfi_restore ra + REG_L s0, XCALLFRAME_S0(sp) + .cfi_restore s0 + REG_L a0, XCALLFRAME_A0(sp) + .cfi_restore a0 + REG_L a1, XCALLFRAME_A1(sp) + .cfi_restore a1 + REG_L a2, XCALLFRAME_A2(sp) + .cfi_restore a2 + REG_L a3, XCALLFRAME_A3(sp) + .cfi_restore a3 +#if defined(__mips_n32) || defined(__mips_n64) + REG_L a4, XCALLFRAME_A4(sp) + .cfi_restore a4 + REG_L a5, XCALLFRAME_A5(sp) + .cfi_restore a5 + REG_L a6, XCALLFRAME_A6(sp) + .cfi_restore a6 + REG_L a7, XCALLFRAME_A7(sp) + .cfi_restore a7 +#endif + RESTORE_GP64 + PTR_ADDU sp, XCALLFRAME_SIZ + move t9, v0 + jr t9 + nop + .cfi_endproc +END(_rtld_pltbind_start) Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Sep 12 17:06:35 2017 (r323500) +++ head/libexec/rtld-elf/rtld.c Tue Sep 12 17:46:30 2017 (r323501) @@ -1257,6 +1257,12 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_D case DT_MIPS_RLD_MAP: *((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug; break; + + case DT_MIPS_PLTGOT: + obj->mips_pltgot = (Elf_Addr *) (obj->relocbase + + dynp->d_un.d_ptr); + break; + #endif #ifdef __powerpc64__ Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Tue Sep 12 17:06:35 2017 (r323500) +++ head/libexec/rtld-elf/rtld.h Tue Sep 12 17:46:30 2017 (r323501) @@ -187,6 +187,7 @@ typedef struct Struct_Obj_Entry { Elf_Word local_gotno; /* Number of local GOT entries */ Elf_Word symtabno; /* Number of dynamic symbols */ Elf_Word gotsym; /* First dynamic symbol in GOT */ + Elf_Addr *mips_pltgot; /* Second PLT GOT */ #endif #ifdef __powerpc64__ Elf_Addr glink; /* GLINK PLT call stub section */ Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Tue Sep 12 17:06:35 2017 (r323500) +++ head/sys/sys/elf_common.h Tue Sep 12 17:46:30 2017 (r323501) @@ -1059,6 +1059,8 @@ typedef struct { #define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */ #define R_MIPS_JALR 37 #define R_MIPS_TLS_GD 42 +#define R_MIPS_COPY 126 +#define R_MIPS_JUMP_SLOT 127 #define R_PPC_NONE 0 /* No relocation. */ #define R_PPC_ADDR32 1 From owner-svn-src-head@freebsd.org Tue Sep 12 19:20:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC663E18FA4; Tue, 12 Sep 2017 19:20:25 +0000 (UTC) (envelope-from adridg@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 8B5D2826A5; Tue, 12 Sep 2017 19:20:25 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CJKOH9078630; Tue, 12 Sep 2017 19:20:24 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CJKOgM078629; Tue, 12 Sep 2017 19:20:24 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <201709121920.v8CJKOgM078629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Tue, 12 Sep 2017 19:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323502 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 323502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 19:20:25 -0000 Author: adridg (ports committer) Date: Tue Sep 12 19:20:24 2017 New Revision: 323502 URL: https://svnweb.freebsd.org/changeset/base/323502 Log: Add self to mentor-mentee data, procedure 1.5. Approved by: tcberner (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Sep 12 17:46:30 2017 (r323501) +++ head/share/misc/committers-ports.dot Tue Sep 12 19:20:24 2017 (r323502) @@ -43,6 +43,7 @@ node [color=lightblue2, style=filled, bgcolor=black]; ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"] adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"] +adridg [label="Adriaan de Groot\nadridg@FreeBSD.org\n2017/09/08"] ahze [label="Michael Johnson\nahze@FreeBSD.org\n2004/10/29"] ak [label="Alex Kozlov\nak@FreeBSD.org\n2012/02/29"] ale [label="Alex Dupre\nale@FreeBSD.org\n2004/01/12"] @@ -575,6 +576,7 @@ pi -> tz rafan -> chinsan +rakuco -> adridg rakuco -> alonso rakuco -> tcberner @@ -641,6 +643,8 @@ tabthorpe -> pgj tabthorpe -> rene tabthorpe -> zi tabthorpe -> gblach + +tcberner -> adridg thierry -> jadawin thierry -> riggs From owner-svn-src-head@freebsd.org Tue Sep 12 19:36:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B444EE19D06; Tue, 12 Sep 2017 19:36:25 +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 903F48344B; Tue, 12 Sep 2017 19:36:25 +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 v8CJaOZI086919; Tue, 12 Sep 2017 19:36:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CJaOYf086916; Tue, 12 Sep 2017 19:36:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201709121936.v8CJaOYf086916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Sep 2017 19:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323503 - in head: . sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: . sys/cam/ctl X-SVN-Commit-Revision: 323503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 19:36:25 -0000 Author: asomers Date: Tue Sep 12 19:36:24 2017 New Revision: 323503 URL: https://svnweb.freebsd.org/changeset/base/323503 Log: Remove spaces from CTL devices' default serial numbers It's awkward to have spaces in CAM device serial numbers. That leads to such things as device nodes named "/dev/diskid/MYSERIAL%20%20%201". Better to replace the spaces with "0"s. This change only affects the default serial numbers for users who don't provide their own. Reviewed by: ken, mav MFC after: Never Relnotes: Yes Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12263 Modified: head/UPDATING head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Sep 12 19:20:24 2017 (r323502) +++ head/UPDATING Tue Sep 12 19:36:24 2017 (r323503) @@ -52,6 +52,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** 20170912: + The default serial number format for CTL LUNs has changed. This will + affect users who use /dev/diskid/* device nodes, or whose FibreChannel + or iSCSI clients care about their LUNs' serial numbers. Users who + require serial number stability should hardcode serial numbers in + /etc/ctl.conf . + +20170912: For 32-bit arm compiled for hard-float support, soft-floating point binaries now always get their shared libraries from LD_SOFT_LIBRARY_PATH (in the past, this was only used if Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Sep 12 19:20:24 2017 (r323502) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Sep 12 19:36:24 2017 (r323503) @@ -2324,7 +2324,7 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, cbe_lun->be = &ctl_be_block_driver; if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) { - snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d", + snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%04d", softc->num_luns); strncpy((char *)cbe_lun->serial_num, tmpstr, MIN(sizeof(cbe_lun->serial_num), sizeof(tmpstr))); @@ -2338,7 +2338,7 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, sizeof(params->serial_num))); } if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) { - snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns); + snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%04d", softc->num_luns); strncpy((char *)cbe_lun->device_id, tmpstr, MIN(sizeof(cbe_lun->device_id), sizeof(tmpstr))); Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Sep 12 19:20:24 2017 (r323502) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Sep 12 19:36:24 2017 (r323503) @@ -1096,7 +1096,7 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc cbe_lun->lun_config_status = ctl_backend_ramdisk_lun_config_status; cbe_lun->be = &ctl_be_ramdisk_driver; if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) { - snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d", + snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%04d", softc->num_luns); strncpy((char *)cbe_lun->serial_num, tmpstr, MIN(sizeof(cbe_lun->serial_num), sizeof(tmpstr))); @@ -1110,7 +1110,7 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc sizeof(params->serial_num))); } if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) { - snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns); + snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%04d", softc->num_luns); strncpy((char *)cbe_lun->device_id, tmpstr, MIN(sizeof(cbe_lun->device_id), sizeof(tmpstr))); From owner-svn-src-head@freebsd.org Tue Sep 12 21:07:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3CF5E1DFEB; Tue, 12 Sep 2017 21:07:49 +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 9DA173309; Tue, 12 Sep 2017 21:07:49 +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 v8CL7mgG027038; Tue, 12 Sep 2017 21:07:48 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CL7muK027036; Tue, 12 Sep 2017 21:07:48 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709122107.v8CL7muK027036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 Sep 2017 21:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323504 - head/usr.bin/sockstat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.bin/sockstat X-SVN-Commit-Revision: 323504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 21:07:49 -0000 Author: tuexen Date: Tue Sep 12 21:07:48 2017 New Revision: 323504 URL: https://svnweb.freebsd.org/changeset/base/323504 Log: Add printing of the remote encapsulation port for SCTP associations. Sponsored by: Netflix, Inc. Modified: head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Tue Sep 12 19:36:24 2017 (r323503) +++ head/usr.bin/sockstat/sockstat.1 Tue Sep 12 21:07:48 2017 (r323504) @@ -35,7 +35,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46cLlSsu +.Op Fl 46cLlSsUu .Op Fl j Ar jid .Op Fl p Ar ports .Op Fl P Ar protocols @@ -89,6 +89,9 @@ This is currently only implemented for TCP. .It Fl s Display the protocol state, if applicable. This is currently only implemented for SCTP and TCP. +.It Fl U +Display the remote UDP encapsulation port number, if applicable. +This is currently only implemented for SCTP. .It Fl u Show .Dv AF_LOCAL @@ -146,6 +149,10 @@ if the endpoint could not be determined. (Internet sockets only) The address the foreign end of the socket is bound to (see .Xr getpeername 2 ) . +.It Li ENCAPS +The remote UDP encapsulation port number if +.Fl U +is specified (only for SCTP). .It Li STATE The protocol state if .Fl s Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Sep 12 19:36:24 2017 (r323503) +++ head/usr.bin/sockstat/sockstat.c Tue Sep 12 21:07:48 2017 (r323504) @@ -75,6 +75,7 @@ static int opt_L; /* Don't show IPv4 or IPv6 loopbac static int opt_l; /* Show listening sockets */ static int opt_S; /* Show protocol stack if applicable */ static int opt_s; /* Show protocol state if applicable */ +static int opt_U; /* Show remote UDP encapsulation port number */ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ @@ -95,6 +96,7 @@ static int *ports; struct addr { struct sockaddr_storage address; + unsigned int encaps_port; struct addr *next; }; @@ -531,6 +533,7 @@ gather_sctp(void) "address family %d not supported", xraddr->address.sa.sa_family); } + faddr->encaps_port = xraddr->encaps_port; faddr->next = NULL; if (prev_faddr == NULL) sock->faddr = faddr; @@ -979,7 +982,7 @@ static void displaysock(struct sock *s, int pos) { void *p; - int hash, first; + int hash, first, offset; struct addr *laddr, *faddr; struct sock *s_tmp; @@ -1045,34 +1048,46 @@ displaysock(struct sock *s, int pos) default: abort(); } - if (first) { - if (opt_s && - (s->proto == IPPROTO_SCTP || - s->proto == IPPROTO_TCP)) { - while (pos < 80) + offset = 80; + if (opt_U) { + if (faddr != NULL && + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { + while (pos < offset) pos += xprintf(" "); - switch (s->proto) { - case IPPROTO_SCTP: - pos += xprintf("%s", - sctp_state(s->state)); - break; - case IPPROTO_TCP: - if (s->state >= 0 && - s->state < TCP_NSTATES) - pos += - xprintf("%s", - tcpstates[s->state]); - else - pos += xprintf("?"); - break; + pos += xprintf("%u", + ntohs(faddr->encaps_port)); + } + offset += 7; + } + if (first) { + if (opt_s) { + if (s->proto == IPPROTO_SCTP || + s->proto == IPPROTO_TCP) { + while (pos < offset) + pos += xprintf(" "); + switch (s->proto) { + case IPPROTO_SCTP: + pos += xprintf("%s", + sctp_state(s->state)); + break; + case IPPROTO_TCP: + if (s->state >= 0 && + s->state < TCP_NSTATES) + pos += xprintf("%s", + tcpstates[s->state]); + else + pos += xprintf("?"); + break; + } } + offset += 13; } if (opt_S && s->proto == IPPROTO_TCP) { - while (pos < 80) + while (pos < offset) pos += xprintf(" "); - if (opt_s) - while (pos < 93) - pos += xprintf(" "); xprintf("%.*s", TCP_FUNCTION_NAME_LEN_MAX, s->stack); } @@ -1101,6 +1116,8 @@ display(void) printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s", "USER", "COMMAND", "PID", "FD", "PROTO", "LOCAL ADDRESS", "FOREIGN ADDRESS"); + if (opt_U) + printf(" %-6s", "ENCAPS"); if (opt_s) printf(" %-12s", "STATE"); if (opt_S) @@ -1186,7 +1203,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46cj:Llp:P:Ssuv")) != -1) + while ((o = getopt(argc, argv, "46cj:Llp:P:SsUuv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1217,6 +1234,9 @@ main(int argc, char *argv[]) break; case 's': opt_s = 1; + break; + case 'U': + opt_U = 1; break; case 'u': opt_u = 1; From owner-svn-src-head@freebsd.org Tue Sep 12 21:08:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CB4DE1E0D2; Tue, 12 Sep 2017 21:08:52 +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 F00543475; Tue, 12 Sep 2017 21:08:51 +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 v8CL8pOC027117; Tue, 12 Sep 2017 21:08:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CL8p3L027115; Tue, 12 Sep 2017 21:08:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709122108.v8CL8p3L027115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 Sep 2017 21:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323505 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 21:08:52 -0000 Author: tuexen Date: Tue Sep 12 21:08:50 2017 New Revision: 323505 URL: https://svnweb.freebsd.org/changeset/base/323505 Log: Export the UDP encapsualation port and the path state. Modified: head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Sep 12 21:07:48 2017 (r323504) +++ head/sys/netinet/sctp_sysctl.c Tue Sep 12 21:08:50 2017 (r323505) @@ -506,6 +506,14 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) xraddr.rtt = net->rtt / 1000; xraddr.heartbeat_interval = net->heart_beat_delay; xraddr.ssthresh = net->ssthresh; + xraddr.encaps_port = net->port; + if (net->dest_state & SCTP_ADDR_UNCONFIRMED) { + xraddr.state = SCTP_UNCONFIRMED; + } else if (net->dest_state & SCTP_ADDR_REACHABLE) { + xraddr.state = SCTP_ACTIVE; + } else { + xraddr.state = SCTP_INACTIVE; + } xraddr.start_time.tv_sec = (uint32_t)net->start_time.tv_sec; xraddr.start_time.tv_usec = (uint32_t)net->start_time.tv_usec; SCTP_INP_RUNLOCK(inp); Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Tue Sep 12 21:07:48 2017 (r323504) +++ head/sys/netinet/sctp_uio.h Tue Sep 12 21:08:50 2017 (r323505) @@ -1239,7 +1239,9 @@ struct xsctp_raddr { uint32_t rtt; uint32_t heartbeat_interval; uint32_t ssthresh; - uint32_t extra_padding[30]; /* future */ + uint16_t encaps_port; + uint16_t state; + uint32_t extra_padding[29]; /* future */ }; #define SCTP_MAX_LOGGING_SIZE 30000 From owner-svn-src-head@freebsd.org Tue Sep 12 21:12:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8851E1E485; Tue, 12 Sep 2017 21:12:05 +0000 (UTC) (envelope-from rstone@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 7E1323927; Tue, 12 Sep 2017 21:12:05 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CLC42F030435; Tue, 12 Sep 2017 21:12:04 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CLC4qA030434; Tue, 12 Sep 2017 21:12:04 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201709122112.v8CLC4qA030434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Tue, 12 Sep 2017 21:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323506 - head/usr.sbin/iovctl X-SVN-Group: head X-SVN-Commit-Author: rstone X-SVN-Commit-Paths: head/usr.sbin/iovctl X-SVN-Commit-Revision: 323506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 21:12:06 -0000 Author: rstone Date: Tue Sep 12 21:12:04 2017 New Revision: 323506 URL: https://svnweb.freebsd.org/changeset/base/323506 Log: Fix incorrect error message in iovctl If the iovctl command was invoked with only the -C flag, the user would receive a message claiming that they needed to also supply either the -d flag or the -f flag. However, in the case of the -C mode, only the -f flag is acceptable. Correct this error message in this case. PR: 222050 Submitted by: Heinz N. Gies Reported by: Heinz N. Gies MFC after: 1 week Modified: head/usr.sbin/iovctl/iovctl.c Modified: head/usr.sbin/iovctl/iovctl.c ============================================================================== --- head/usr.sbin/iovctl/iovctl.c Tue Sep 12 21:08:50 2017 (r323505) +++ head/usr.sbin/iovctl/iovctl.c Tue Sep 12 21:12:04 2017 (r323506) @@ -230,15 +230,19 @@ main(int argc, char **argv) usage(); } - if (device == NULL && filename == NULL) { + if (device == NULL && filename == NULL && action != CONFIG) { warnx("Either the -d or -f flag must be specified"); usage(); } switch (action) { case CONFIG: - if (filename == NULL) { + if (device != NULL) { warnx("-d flag cannot be used with the -C flag"); + usage(); + } + if (filename == NULL) { + warnx("The -f flag must be specified"); usage(); } config_action(filename, dryrun); From owner-svn-src-head@freebsd.org Tue Sep 12 21:36:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD655E1F915; Tue, 12 Sep 2017 21:36:14 +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 A950963D59; Tue, 12 Sep 2017 21:36:14 +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 v8CLaDC5039574; Tue, 12 Sep 2017 21:36:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CLaDqg039572; Tue, 12 Sep 2017 21:36:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709122136.v8CLaDqg039572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 Sep 2017 21:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323507 - head/usr.bin/sockstat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.bin/sockstat X-SVN-Commit-Revision: 323507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 21:36:14 -0000 Author: tuexen Date: Tue Sep 12 21:36:13 2017 New Revision: 323507 URL: https://svnweb.freebsd.org/changeset/base/323507 Log: Add support for printing the path state for SCTP association. Modified: head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Tue Sep 12 21:12:04 2017 (r323506) +++ head/usr.bin/sockstat/sockstat.1 Tue Sep 12 21:36:13 2017 (r323507) @@ -153,8 +153,12 @@ The address the foreign end of the socket is bound to The remote UDP encapsulation port number if .Fl U is specified (only for SCTP). -.It Li STATE -The protocol state if +.It Li PATH STATE +The path state if +.Fl s +is specified (only for SCTP). +.It Li CONN STATE +The connection state if .Fl s is specified (only for SCTP or TCP). .It Li STACK Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Sep 12 21:12:04 2017 (r323506) +++ head/usr.bin/sockstat/sockstat.c Tue Sep 12 21:36:13 2017 (r323507) @@ -97,6 +97,7 @@ static int *ports; struct addr { struct sockaddr_storage address; unsigned int encaps_port; + int state; struct addr *next; }; @@ -534,6 +535,7 @@ gather_sctp(void) xraddr->address.sa.sa_family); } faddr->encaps_port = xraddr->encaps_port; + faddr->state = xraddr->state; faddr->next = NULL; if (prev_faddr == NULL) sock->faddr = faddr; @@ -939,7 +941,7 @@ check_ports(struct sock *s) } static const char * -sctp_state(int state) +sctp_conn_state(int state) { switch (state) { case SCTP_CLOSED: @@ -978,6 +980,25 @@ sctp_state(int state) } } +static const char * +sctp_path_state(int state) +{ + switch (state) { + case SCTP_UNCONFIRMED: + return "UNCONFIRMED"; + break; + case SCTP_ACTIVE: + return "ACTIVE"; + break; + case SCTP_INACTIVE: + return "INACTIVE"; + break; + default: + return "UNKNOWN"; + break; + } +} + static void displaysock(struct sock *s, int pos) { @@ -1062,6 +1083,19 @@ displaysock(struct sock *s, int pos) } offset += 7; } + if (opt_s) { + if (faddr != NULL && + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { + while (pos < offset) + pos += xprintf(" "); + pos += xprintf("%s", + sctp_path_state(faddr->state)); + } + offset += 13; + } if (first) { if (opt_s) { if (s->proto == IPPROTO_SCTP || @@ -1071,7 +1105,7 @@ displaysock(struct sock *s, int pos) switch (s->proto) { case IPPROTO_SCTP: pos += xprintf("%s", - sctp_state(s->state)); + sctp_conn_state(s->state)); break; case IPPROTO_TCP: if (s->state >= 0 && @@ -1118,8 +1152,10 @@ display(void) "LOCAL ADDRESS", "FOREIGN ADDRESS"); if (opt_U) printf(" %-6s", "ENCAPS"); - if (opt_s) - printf(" %-12s", "STATE"); + if (opt_s) { + printf(" %-12s", "PATH STATE"); + printf(" %-12s", "CONN STATE"); + } if (opt_S) printf(" %.*s", TCP_FUNCTION_NAME_LEN_MAX, "STACK"); printf("\n"); From owner-svn-src-head@freebsd.org Tue Sep 12 22:19:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9714E21B1F; Tue, 12 Sep 2017 22:19:22 +0000 (UTC) (envelope-from rpokala@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 7084B65854; Tue, 12 Sep 2017 22:19:22 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CMJLXc055786; Tue, 12 Sep 2017 22:19:21 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CMJLtl055785; Tue, 12 Sep 2017 22:19:21 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201709122219.v8CMJLtl055785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Tue, 12 Sep 2017 22:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323508 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 323508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 22:19:22 -0000 Author: rpokala Date: Tue Sep 12 22:19:21 2017 New Revision: 323508 URL: https://svnweb.freebsd.org/changeset/base/323508 Log: When doing a non-interactive installation, don't display an interactive warning about a filesystem which doesn't have a mountpoint. Presumably, the person who wrote the install script knew what they were doing. Submitted by: Brian Mueller MFC after: 1 month Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D12346 Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Sep 12 21:36:13 2017 (r323507) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Sep 12 22:19:21 2017 (r323508) @@ -1043,14 +1043,17 @@ addpartform: /* Warn if no mountpoint set */ if (strcmp(items[0].text, "freebsd-ufs") == 0 && items[2].text[0] != '/') { - dialog_vars.defaultno = TRUE; - choice = dialog_yesno("Warning", - "This partition does not have a valid mountpoint " - "(for the partition from which you intend to boot the " - "operating system, the mountpoint should be /). Are you " - "sure you want to continue?" - , 0, 0); - dialog_vars.defaultno = FALSE; + choice = 0; + if (interactive) { + dialog_vars.defaultno = TRUE; + choice = dialog_yesno("Warning", + "This partition does not have a valid mountpoint " + "(for the partition from which you intend to boot the " + "operating system, the mountpoint should be /). Are you " + "sure you want to continue?" + , 0, 0); + dialog_vars.defaultno = FALSE; + } if (choice == 1) /* cancel */ goto addpartform; } From owner-svn-src-head@freebsd.org Tue Sep 12 23:37:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 325F5E24F1D; Tue, 12 Sep 2017 23:37:01 +0000 (UTC) (envelope-from sbruno@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 A68ED687A0; Tue, 12 Sep 2017 23:37:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CNaxgV088526; Tue, 12 Sep 2017 23:36:59 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CNaw9B088517; Tue, 12 Sep 2017 23:36:58 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201709122336.v8CNaw9B088517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 12 Sep 2017 23:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323509 - in head: share/man/man4 sys/conf sys/contrib/dev/liquidio sys/dev/liquidio sys/dev/liquidio/base sys/modules sys/modules/lio X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: in head: share/man/man4 sys/conf sys/contrib/dev/liquidio sys/dev/liquidio sys/dev/liquidio/base sys/modules sys/modules/lio X-SVN-Commit-Revision: 323509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 23:37:01 -0000 Author: sbruno Date: Tue Sep 12 23:36:58 2017 New Revision: 323509 URL: https://svnweb.freebsd.org/changeset/base/323509 Log: The diff is the initial submission of Cavium Liquidio 2350/2360 10/25G Intelligent NIC driver. The submission conconsists of firmware binary file and driver sources. Submitted by: pkanneganti@cavium.com (Prasad V Kanneganti) Relnotes: Yes Sponsored by: Cavium Networks Differential Revision: https://reviews.freebsd.org/D11927 Added: head/share/man/man4/liquidio.4 (contents, props changed) head/sys/contrib/dev/liquidio/ head/sys/contrib/dev/liquidio/lio_23xx_nic.bin.uu head/sys/dev/liquidio/ head/sys/dev/liquidio/base/ head/sys/dev/liquidio/base/cn23xx_pf_device.c (contents, props changed) head/sys/dev/liquidio/base/cn23xx_pf_device.h (contents, props changed) head/sys/dev/liquidio/base/cn23xx_pf_regs.h (contents, props changed) head/sys/dev/liquidio/base/lio_common.h (contents, props changed) head/sys/dev/liquidio/base/lio_config.h (contents, props changed) head/sys/dev/liquidio/base/lio_console.c (contents, props changed) head/sys/dev/liquidio/base/lio_ctrl.c (contents, props changed) head/sys/dev/liquidio/base/lio_ctrl.h (contents, props changed) head/sys/dev/liquidio/base/lio_device.c (contents, props changed) head/sys/dev/liquidio/base/lio_device.h (contents, props changed) head/sys/dev/liquidio/base/lio_droq.c (contents, props changed) head/sys/dev/liquidio/base/lio_droq.h (contents, props changed) head/sys/dev/liquidio/base/lio_image.h (contents, props changed) head/sys/dev/liquidio/base/lio_iq.h (contents, props changed) head/sys/dev/liquidio/base/lio_mem_ops.c (contents, props changed) head/sys/dev/liquidio/base/lio_mem_ops.h (contents, props changed) head/sys/dev/liquidio/base/lio_request_manager.c (contents, props changed) head/sys/dev/liquidio/base/lio_response_manager.c (contents, props changed) head/sys/dev/liquidio/base/lio_response_manager.h (contents, props changed) head/sys/dev/liquidio/lio_bsd.h (contents, props changed) head/sys/dev/liquidio/lio_core.c (contents, props changed) head/sys/dev/liquidio/lio_ioctl.c (contents, props changed) head/sys/dev/liquidio/lio_ioctl.h (contents, props changed) head/sys/dev/liquidio/lio_main.c (contents, props changed) head/sys/dev/liquidio/lio_main.h (contents, props changed) head/sys/dev/liquidio/lio_network.h (contents, props changed) head/sys/dev/liquidio/lio_rss.c (contents, props changed) head/sys/dev/liquidio/lio_rss.h (contents, props changed) head/sys/dev/liquidio/lio_rxtx.c (contents, props changed) head/sys/dev/liquidio/lio_rxtx.h (contents, props changed) head/sys/dev/liquidio/lio_sysctl.c (contents, props changed) head/sys/modules/lio/ head/sys/modules/lio/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/altq.4 head/share/man/man4/vlan.4 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Sep 12 22:19:21 2017 (r323508) +++ head/share/man/man4/Makefile Tue Sep 12 23:36:58 2017 (r323509) @@ -253,6 +253,7 @@ MAN= aac.4 \ led.4 \ lge.4 \ ${_linux.4} \ + liquidio.4 \ lm75.4 \ lmc.4 \ lo.4 \ Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Tue Sep 12 22:19:21 2017 (r323508) +++ head/share/man/man4/altq.4 Tue Sep 12 23:36:58 2017 (r323509) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 12, 2017 +.Dd August 28, 2017 .Dt ALTQ 4 .Os .Sh NAME @@ -152,6 +152,7 @@ They have been applied to the following hardware drive .Xr ixgbe 4 , .Xr jme 4 , .Xr le 4 , +.Xr liquidio 4 , .Xr msk 4 , .Xr mxge 4 , .Xr my 4 , Added: head/share/man/man4/liquidio.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/liquidio.4 Tue Sep 12 23:36:58 2017 (r323509) @@ -0,0 +1,133 @@ +.\" BSD LICENSE +.\" +.\" Copyright(c) 2017 Cavium, Inc.. All rights reserved. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * 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. +.\" * Neither the name of Cavium, Inc. nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" 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(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" $FreeBSD$ +.\" +.Dd August 17, 2017 +.Dt LIQUIDIO 4 +.Os +.Sh NAME +.Nm liquidio +.Nd "Cavium 10Gb/25Gb Ethernet driver for the FreeBSD operating system" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device lio" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_lio_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for 23XX 10Gb/25Gb Ethernet adapters. +The driver supports Jumbo Frames, Transmit/Receive checksum +offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), +VLAN tag insertion/extraction, VLAN checksum offload, +VLAN TSO, and Receive Side Steering (RSS) +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 16000. +.Pp +For more information on configuring this device, see ifconfig(8). +.Sh HARDWARE +The +.Nm +driver supports the following cards: +.Pp +.Bl -bullet -compact +.It +LiquidIO II CN2350 210SV/225SV +.It +LiquidIO II CN2360 210SV/225SV +.El +.Sh LOADER TUBABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Pp +.Bl -tag -width indent +.It Va hw.lio.fw_type +.Pp +String that specifies type of firmware to be loaded. +Default is "nic". Use "none" to load firmware from flash. +.It Va hw.lio.num_queues_per_pf0 +.Pp +Unsigned integers that specify number of queues per PF0. +Valid range is 0 to 64. +Use 0 to derive autoconfigures based on the number of +cpus with a max of 8 +.It Va hw.lio.num_queues_per_pf1 +.Pp +Unsigned integers that specify number of queues per PF1. +Valid range is 0 to 64. +Use 0 to derive autoconfigures based on the number of +cpus with a max of 8 +.It Va hw.lio.console_bitmask +.Pp +Bitmask indicating which consoles have debug output +redirected to syslog. +.It Va hw.lio.rss +.Pp +To enable/disable driver RSS support +.It Va hw.lio.hwlro +.Pp +To enable/disable hardware LRO +.Sh SUPPORT +For general information and support, +go to the Cavium support website at: +.Pa http://support.cavium.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Derek Chickles Aq Mt derek.chickles@cavium.com . Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Tue Sep 12 22:19:21 2017 (r323508) +++ head/share/man/man4/vlan.4 Tue Sep 12 23:36:58 2017 (r323509) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2016 +.Dd August 28, 2017 .Dt VLAN 4 .Os .Sh NAME @@ -135,6 +135,7 @@ in hardware: .Xr ixgb 4 , .Xr ixgbe 4 , .Xr jme 4 , +.Xr liquidio 4 , .Xr msk 4 , .Xr mxge 4 , .Xr nxge 4 , Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Sep 12 22:19:21 2017 (r323508) +++ head/sys/conf/NOTES Tue Sep 12 23:36:58 2017 (r323509) @@ -1984,6 +1984,7 @@ device xmphy # XaQti XMAC II # lge: Support for PCI gigabit ethernet adapters based on the Level 1 # LXT1001 NetCellerator chipset. This includes the D-Link DGE-500SX, # SMC TigerCard 1000 (SMC9462SX), and some Addtron cards. +# lio: Support for Cavium 23XX Ethernet adapters # malo: Marvell Libertas wireless NICs. # mwl: Marvell 88W8363 802.11n wireless NICs. # Requires the mwl firmware module @@ -2143,6 +2144,7 @@ device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ix # Intel Pro/10Gbe PCIE Ethernet device ixv # Intel Pro/10Gbe PCIE Ethernet VF device le # AMD Am7900 LANCE and Am79C9xx PCnet +device lio # Cavium 23XX Ethernet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter device oce # Emulex 10 GbE (OneConnect Ethernet) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 12 22:19:21 2017 (r323508) +++ head/sys/conf/files Tue Sep 12 23:36:58 2017 (r323509) @@ -2216,6 +2216,62 @@ dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge +dev/liquidio/base/cn23xx_pf_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_console.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_ctrl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_droq.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_mem_ops.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_request_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_response_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_core.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_ioctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_main.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rss.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rxtx.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_sysctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +lio.c optional lio \ + compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "lio.c" +lio_23xx_nic.bin.fw.fwo optional lio \ + dependency "lio_23xx_nic.bin.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "lio_23xx_nic.bin.fw.fwo" +lio_23xx_nic.bin.fw optional lio \ + dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "lio_23xx_nic.bin.fw" dev/lmc/if_lmc.c optional lmc dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Sep 12 22:19:21 2017 (r323508) +++ head/sys/conf/files.amd64 Tue Sep 12 23:36:58 2017 (r323509) @@ -328,6 +328,62 @@ dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv +dev/liquidio/base/cn23xx_pf_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_console.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_ctrl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_droq.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_mem_ops.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_request_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_response_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_core.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_ioctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_main.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rss.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rxtx.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_sysctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +lio.c optional lio \ + compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "lio.c" +lio_23xx_nic.bin.fw.fwo optional lio \ + dependency "lio_23xx_nic.bin.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "lio_23xx_nic.bin.fw.fwo" +lio_23xx_nic.bin.fw optional lio \ + dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "lio_23xx_nic.bin.fw" dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb Added: head/sys/contrib/dev/liquidio/lio_23xx_nic.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/liquidio/lio_23xx_nic.bin.uu Tue Sep 12 23:36:58 2017 (r323509) @@ -0,0 +1,28149 @@ +begin 644 lio_23xx_nic.bin +M0TY)0S$N-BXQ``````````````!B;V]T;V-T(#!X,C$P,#`P,#`@;G5M8V]R +M97,])"AN=6UC;W)E]`#``````/`(4&&>]_\B,0E:, +M_[$`"```B"W_OP`P_[4`*/^T`"#_LP`8_[(`$!!```3_L```/`00"PP"?WID +MA#F`/!#__#P4__`V$``)-I0`)0`0A#@`%*7X-A!``3P3$`M\$@`[-I0!`WY2 +M"<,`$(=X/!44&&9S.9``$I$\`!2E.`)0$"4\`P`@W$8```(#&"V.HE:,`D,8 +M)680``APQ2CR`+0H+0"R*"7]`#@4 +MH``$`````/R````#X``(`````-RB``A\I4@!?$,(`GQ"2((``QR\``(5/`!B +M$"4`12@E_(4```/@``@`````?(9Z`#P%``T`!C(``(`0+32E`P!\`K@'0`-X +M``#%*"L0H``N/`4#`!1%``@\!0#_`&0P)C2E_Q``Q2@D%*``&B0"``$#X``( +M`````!1```<`9#`F-*7_#P#%*"04H``2)`(``0/@``@`````/`4!`!1%``<\ +M!@(``&0H)GRE>@`4H``))`(``0/@``@`````%$8`!0!D$"8DI?\?`$4H)!"@ +M_^@D`@`!?((&@!1```,\!0#_`^``"```$"TTI?\0`&48)`"%("0`9!@K$&#_ +M^20"``$#X``(`````!1%``@\!0#_`&0P)C2E_T``Q2@D%*``)20"``$#X``( +M`````!1```<`9#`F-*7_/P#%*"04H``=)`(``0/@``@`````/`4(`!1%``@\ +M!0#_`&0P)C2E_S@`Q2@D%*``$R0"``$#X``(`````#P%`@`410`(/`4`_P!D +M,"8TI?]``,4H)!2@``DD`@`!`^``"``````\!0$`%$4`!`!D*"9\I7H`$*#_ +ML"0"``%\@@=`$$``"#P%__)\8K@`-*7]`#0&C0``12@A`*8H*Q2@_Z8D`@`! +M?(('@!!```<\!?_R?&:X`#2E<```Q2@A+*4$`!2@_YTD`@`!!($`!SP%__)\ +M9K@`-*5L``#%*"$LI0$`%*#_E20"``%\@@<`$$``"'R"!H`\!0`-?&:X`#2E +ME0``Q2@K$*#_C"0"``%\@@:`$$#_I0`````\`@#_-$+_0`!B&"0`@A`D`&(0 +M*Q!`_YX``````^``""0"``$`````9[W_./^_`,#_O@"X`(#P+?^Q`(``H(@M +M_[<`L/^V`*C_M0"@_[0`F/^S`)#_L@"(#`(P7O^P`'@,`(=Z`$`@+3P%``,\ +M`Q0`)`(``?QE1<@D!20`/`,4`#P&``?\947`)`4`0#P#%``TQO___&5%N#P# +M%`#\8$6P/`4`/S2E__X\`Q0`_&5%J#P#%`#\8D6@)`4`"(^$@8`\`Q0`_&5% +MF#P#%`#\9D60/`,4`/QB18@\`Q0`#`"(&*QB18`00`#W/`,4``P`&#@````` +M#`!^N``````40`"3/`(4&`P`?'*,1%=D%$``=#P$$`L,`&[6`````!1``-\\ +M`Q0`D&(!&!!``63_HP!P/`0!SCP&$`LTA!@`)`4`@&3&/M@,`+1>/!`4`!!` +M`-C^`D8(/`8!S@!`("T``"@M#`)F8#3&&``\`Q08W&)6@#P$$`O>`T8(/`40 +M"SP&$`L\!Q`+9(0^\&2E/Q#\0P`X9,8_&`P`%Y9DYS\@*\(`!!1``&\GWO_\ +M9B(`('/>^/)F,0`8`%[P+3P7$`L\%A`+/!40"SP4$`L\$Q`+"``!<3P2$`L, +M`C@L9@0`#-XP``!FI3]8)`8`#0P"@G0"`"`M$$``-P`````"`"`M9H4_:`P" +M@G0D!@`/$$``3``````"`"`M9F4_>`P"@G0D!@`1$$``0@`````"`"`M9D4_ +MD`P"@G0D!@`.$$``.`````!F,0`($CX`1SP$$`O>,```/`40"V2E/S@D!@`' +M#`*"=`(`("T40``&`@`@+20#``$\`A0`K$-%U-XP```"`"`M9N4_0`P"@G0D +M!@`'%$``!@(`("TD`P`!/`(4&*Q#5HS>,````@`@+6;%/T@,`H)T)`8`#!!` +M_\<"`"`M9J4_6`P"@G0D!@`-%$#_S`(`("T,`C?^``````@``5S>,```#``7 +MEF2$/GC?OP#`)`(``=^^`+C?MP"PW[8`J-^U`*#?M`"8W[,`D-^R`(C?L0"` +MW[``>`/@``AGO0#(#`(X9&8$``X(``%O9C$`"`P",%8`````"``!:-XP```, +M`CA&9@0`#P@``6+>,```/`00"PP`%Y9DA#Y`"``!F=^_`,`\!!`+/`40"V2$ +M/Z!DI3^P`Z`P+0P`%Y8\$!(4/`@Q+C4(-BX\`A(4K$B^,#P&$`L\!Q`+9$.^ +M,&3&/\ADYS_@9@2^H"0%`&HD`C$`#`)_UJ1B``1F!;Z@`Z`@+0P"@?"@H`!I +M#``%I@`````,`'W8CX2!@!1`_\7?OP#`#``&L@`````40/_!W[\`P#P#%!C< +M8E:`/`,4&-QC5WC\0P``/`(4&-Q%5H!DI`!@#`#..&2E`&@\`A08W$-6@#P" +M%!ED0IY8/`0`"P!$("UD8P!PW$@``-Q'``C<1@`0W$4`&&1"`"#\:```_&<` +M"/QF`!#\90`8%$3_]F1C`"`,`#[<`````!1`_Z'?OP#`#``^W@`````,`C%T +M``````P`?>@`````$$``$#P$$`L,`!>69(1`(`@``9G?OP#`/`00"PP`%Y9D +MA#ZH"``!F=^_`,`\!!`+#``7EF2$/_`(``&9W[\`P/^C`'`,`(=L``````P` +M!T``````#`(Q#@`````,`(@8CX2!@!!``$??HP!PD&(!&!!``)LD!0(`#`$X +M'"0$#``,`)3H)`0``0P`B$0\$@"O/!4``GP$`#M\A`G##`%93@``@"T,`3R. +M/!$4`#P4`,1F4X0`-K6A@-XB1@``5!@MC&20,`($*"H0H``+`````'(5&`,F +M$``!`$,H+0!S("T"12@M`$0@+0P`09;\H(0@"``"+MXB1@`,`)1PC&60-`P` +M``H`````/`4`#7P$`#LTI?`5#`#`)'R$"<,D`X`!``, +M`E:`W$,``-Q$`&#<10!H/`(4&`P`SD#\0U=X)`0``PP!.&(``"@MW@56@#P# +M%!D\!``+9&.>6&2B`'``1"`MW$D``-Q(``C<1P`0W$8`&&1"`"#\:0``_&@` +M"/QG`!#\9@`8%$3_]F1C`"#``"$/A^0A(*`$#X"0````#>`A5X`%$8*Q1@__AD0@`!#``" +MO@`````\`A`+9$(V8!!```4D`@`!/`00#@P"S9ADA)P`)`(``:)B%7#?OP`@ +MW[,`&-^R`!#?L0`(W[````/@``AGO0`H9[W_^/^_``#?OP```^``"&>]``@` +M````/`(0"V>]__AD0C/8$$``!O^_```\!!`./`42$F2$G``,`LSV9*45@#P$ +M$@_<@MJX$$``!CP"``!D0@``$$``!-^_````0/@)9(3:N-^_```(``+.9[T` +M"&>]__C_OP``W[\```/@``AGO0`(````````$"```!@@```@(```*"```#`@ +M```X(```0"```$@@``!0(```6"```&`@``!H(```<"```'@@``"H(```L"`` +M`+@@``#`(```R"```-`@``#8(```X"```/`@``#X(#P<$A-GG)'```#X+0.@ +M\"T\"2``0`A@``$)0"4\"00``0E`)4"(8``\"0$`1,GX`"0)__]$J0``1*D( +M`$2I$`!$J1@`1*D@`$2I*`!$J3``1*DX`$2I0`!$J4@`1*E0`$2I6`!$J6`` +M1*EH`$2I<`!$J7@`1*F``$2IB`!$J9``1*F8`$2IH`!$J:@`1*FP`$2IN`!$ +MJ<``1*G(`$2IT`!$J=@`1*G@`$2IZ`!$J?``1*GX`&($```\&1(29SD58`P" +M9M#_)````````#P9$A)G.15@WR0``#P9$`=G.<\8$R``!@`````#(/@)```` +M`!```!\``````````$`9>`$D!/P``R3()"0$``T`!"`\-(0`#?\D`(#_)`$` +M_R0!@/\D`@#_)`*`_R0#`/\D`X#_)`0`_R0$@````0\```$/0!E@`#P$_[\T +MA/__`R3()$"98``\&1`*9SG?F`,@^`D`````$````@``````````/!D0`&]_@`\`@#$ +M_[0!T#P4%`#_MP'HWI=&`/^_`?C_O@'P_[8!X`+B$"W_M0'8_[,!R/^R`<#_ +ML0&X_[`!L(Q"D#000`#]_Z0!J#P2$A(\%0`)9E(>,```F"T``(`M/!$4&#:U +MH(```````Z`@+0``*"TD!@&@#`)F8'X6^`,T`JZ`X@`(V%X` +MX8XB5HP40`$R/`00"P``N"T``'@M``!P+0``:"T``&`M``!8+0``4"T``$@M +M``!`+0``."T``#`M```H+0``("T``!@M``#`+0`6\3@`%LBX/`(4``/9R"_< +M0D8(`S;(+3P>`^"T`61`M`_/X+61"`&@`````W%X`&-Q9 +M````?A@M_Z,`>`,9P"W<60`@`)D@+?^D`(#<60#H`+DH+?^E`4C<60$``-DP +M+?^F`6#<60$X`/DX+?^G`9C<60$(`1E`+?^H`6C<60!``3E(+?^I`*#<60!( +M`5E0+?^J`*C<60!0`7E8+?^K`+#<60!8`9E@+?^L`+C<60!@`;EH+?^M`,#< +M60!H`=EP+?^N`,C<60!P`?EX+?^O`-#<60!X`%40+0+YN"T47__3_[<`V#0" +MKH`#H"@MD +M`:#<2```W$<`"-Q&`!#<10`89$(`(/QH``#\9P`(_&8`$/QE`!@41/_V9&,` +M(-Z71@`\`@#$)A```692`:`"XA`MC$*0-`("$"L40/\-9G,!H-^_`?C?O@'P +MW[#?M0'8W[0!T-^S`69(0[6(XB5HS?I0#8$*``!P`````00/^R`````#P$$`L,`!>69(0[>(XB +M5HP00/^LWZ8!J#P"%!C<0U=H/`00"]^B`4ADA#N8WD4!2`##`!\`8`'T`$`P +M+0!%$"\``!@2`$,`'P!@`?0,`!>6```H$@@`!)".(E:,#``7EF2$.]B.(E:, +MWZ4!0!"@``<`````$$#_MP.@$"T\!!`+#``7EF2$._".(E:,$$#_L#P$$`T, +M`!>69(0HN`@`!+0#H!`M/`00"PP`%Y9DA#GXCB)6C-^E`(`0H/\]WZ,`B!1` +M`&@`````"``$3P``$"T``````@`H+0P`%Y9DA#G`W[@`8-^C`'C?I`"`WZ4! +M2-^F`6#?IP&8WZ@!:-^I`*#?J@"HWZL`L-^L`+C?K0#`WZX`R-^O`-`(``/R +MW[<`V-^E`:@\`A08W$-7:#P$$`O>0@!@9(0YT`+`,"T`HP`?`&`!]`+"$"\` +M`"@2`$4`'P"@`?0,`!>6```H$@@`!#Z.(E:,/`00"PP`%Y9DA#NX"``$E8XB +M5HP\!!`+#``7EF2$.Q@(``2&CB)6C#P$$`L,`!>69(0[.`@`!(N.(E:,/`00 +M"PP`%Y9DA#GH"``$FHXB5HP\!!`+#``7EF2$.?@(``2?CB)6C#P$$`L,`!>6 +M9(0[R`@`!*2.(E:,WZ(!H#P$$`MDA#H@`N(H+0"^*"T,`!>6`+8H+P@`!$^. +M(E:,/`00"PP`%Y9DA#HP"``$5(XB5HP\!!`+#``7EF2$.D@(``19CB)6C#P$ +M$`L,`!>69(0Z"`@`!*F.(E:,/`00"PP`%Y9DA#H@"``$KHXB5HP\!!`+#``7 +MEF2$.>@(``1#CB)6C#P$$`L,`!>69(0Z"`@`!$J.(E:,/`00"PP`%Y9DA#I@ +M"``$7HXB5HP\!!`+#``7EF2$.G@(``1CCB)6C#P$$`L,`!>69(0ZD`@`!&B. +M(E:,/`00"PP`%Y9DA#JH"``$;8XB5HP\!!`+#``7EF2$.K@(``1RCB)6C#P$ +M$`L,`!>69(0ZT`@`!'>.(E:,/`00"PP`%Y9DA#KH"``$?(XB5HP\!!`+#``7 +MEF2$.P`(``2!CB)6C``````\!!`+9[W_^/^_```,`!>69(0\`#P$$`L,`!>6 +M9(0\(-^_```\!!`-9[T`"`@`%Y9DA"BX`````&>]_Z@`@$`M_[(`&#P2%!B. +M0E:,_[\`4/^^`$C_MP!`_[8`./^U`##_M``H_[,`(/^Q`!`40`!L_[``"#P4 +M%!B.@E=D$$``-3P3`H\\%108-G-<*3P6`#``$YQX``"`+69SZX5FM5:0`!.< +M^#P7%``VUN1@"``%V#9S]<,`````)A```0("$"L00``ECD)6C'X1^`,`$1"X +M?J(0"A!`__B.@E=DWN5&``(V("W?@H,0``0@N`"D("T00`!6C)X`(`!>$"T` +M`"`M```!#W!$)-^.0E:,%$``("0")Q#>Y$8``C:(+=^"@Q``$8BX`)&(+1!` +M`$..,0`@`%$0+280``$```$/_$```````0^.@E=D`@(0*Q1`_]]^$?@#CD)6 +MC!1``"3?OP!0W[X`2-^W`$#?M@`XW[4`,-^T`"C?LP`@W[(`&-^Q`!#?L``( +M`^``"&>]`%@``````@`H+7""$`,\!!`+_Z@``&2$/$``2``?`0`!]```$!(` +M`C"Z`-,`'0``,!``!C"Z``9(N``&.3@!)S@M``8P```'2+@`Z3@M`$69(0\,`@`!]__A\ +M!``[_[\```P`R-Y\A`G#/`00"P``*"T,`!>69(0\4#P$$`T,`!>69(0HN#P$ +M$``,`+&J)`4(`!!``#P``"`M/`40"V2E/(@`0#`M)`<(``P`R]`\"``"/`1` +M``P`L:HD!0$`$$``220$``(\!1`+9*4\F`!`,"TD!P$`#`#+T#P(`$`\!`@` +M#`"QJB0%!``00``P)`0``SP%$`MDI3RH`$`P+20'!``,`,O0/`@``CP$"``, +M`+&J)`4$`!!``#LD!``%/`40"V2E/,``0#`M)`<$``P`R]`\"``"/`0"``P` +ML:HD!0$`$$``(20$``0\!1`+9*4\V`!`,"TD!P$`#`#+T#P(``(,`(@Z```` +M`!1```PD`P`!#`&*R#P$``$``A`K"``&D'!#`#H\!!`+/`40"V2$/&@,`GZ\ +M9*4\B"0#``'?OP```&`0+0/@``AGO0`(/`00"SP%$`MDA#QH#`)^O&2E/*@( +M``:0)`,``3P$$`L\!1`+9(0\:`P"?KQDI3S8"``&D"0#``$\!!`+/`40"V2$ +M/&@,`GZ\9*4\F`@`!I`D`P`!`````#P$$`L\!1`+9(0\:`P"?KQDI3S`"``& +MD"0#``$`````9[W_N/^P```D$``!_[\`0/^W`#C_M@`P_[4`*/^T`"#_LP`8 +M_[(`$`P`!C[_L0`($$``#0````#?OP!``@`0+=^W`#C?M@`PW[4`*-^T`"#? +MLP`8W[(`$-^Q``C?L````^``"&>]`$@,`!,8`````!1``$$\!!`+#``2\@`` +M```40``W/`00"PP`%T`D$``!%$#_ZM^_`$`,`(5.`````!1`_^;?OP!`/`+_ +M@#1"`0$``A(\-$(!H-Q"``````$//!44&(ZB5V000``[/!84&#P3`#```(`M +M9M96D"04__\\%Q0`"``&\C9SY&``````CJ)79`("$"L00``P/`/_X'X1^`,` +M$1"X?L(0"A!`__@F$``!)`3__PP`T*P",X@M$%0`.@!`D"W>XD8``!&(N`!1 +MB"VN,@`@WX*#$!!``#D``````%*0+0```0_^0``````!#P@`!N^.HE=D```` +M`#P%$`MDA#T`#``7EF2E1%`(``;4`````#P%$`MDA#SH#``7EF2E1%#?OP!` +MW[<`.`(`$"W?M@`PW[4`*-^T`"#?LP`8W[(`$-^Q``C?L````^``"&>]`$@\ +M`__@)!```31C`%4``QVX-&,`#0`#'3A\`@`[?$()PS1C``@``A$\`$,0)20# +M``'\0P``#``4<@`````40/^0``````P`9.(``(`M"``&P=^_`$`\!!`+)!`` +M`0P`%Y9DA#TH"``&P=^_`$`,`-#X``````@`!P/?@H,0`````&>]__C_OP`` +M#`"%8@`````40``%)`,``0P`?>0````````!#P``&"W?OP```&`0+0/@``AG +MO0`(9[W_N/^_`$#_MP`X_[8`,/^U`"C_M``@_[,`&/^R`!#_L0`(&*``)?^P +M```D%0`!/!00"P`5JCP`@(`M``"X+0``B"UFM?_X)!;__V:4/4`(``=U`*"8 +M+7[2_\:2`@`!?&,6`I('``(P:`#_`B`H+0*`("TF,0`!#``7EGQ'>@22`@`" +MD@,``0)`@"U\8GH$,$+__Q(S``H`5[@AW@,``'QF.`$`U1`M?$(X`11`_^H` +M0)`M"``'90``D"T``+@MW[\`0`+@*"W?M@`P/`00"]^W`#ADA#UHW[4`*-^T +M`"#?LP`8W[(`$-^Q``C?L```"``7EF>]`$AGO?_(_[,`*'T31,+_L@`@,/(# +M__^P`!``@(`M_[\`,/^Q`!C<@P`(C(8`#'QD2((PB0#_`-(P)@`)2,)\`O`[ +M$$#__GX%2`$D"P"`?`H`.Q"K`)D``!`M`(!0+0`)2,!\"CC$``0B`@$J2"4` +M@%`M?2-8AB0$``'^`P`(K@8`#-X#``A\@P@&_@,`"````4\D!``!/`/__'R" +M>P8T8P`+?(*`=\L4(&?&-<`B0%`@%\<=P&``4HO"0#``$`12@D +M``,8O!"C`'4\`P`!E@4`L#1C``$R. +M`@"H?$,%@!1@`%$P0P$`_!&!`-X"`!B6!``8D@,`!'Q"2`$H8P`"%&``5WR" +M_`9\`GM&_`*!"/D1`,@D!0`"```!3SP"%!C<0E=XD$,`#0)#&",L8@"`$$`` +M!3P"%!C<0D@8?$,9BA1@`"\D!``)``X;\ +M$8$`W@(`&)8$`!B2`P`$?$)(`2AC``(08/^K?(+\!B0#``$(``?A?&)[1@`` +M``!]2@G#``E(P``*&@`(``>P`&E()0````"&`@!H/`,4`-QE1@@\`P`)-&.@ +M@'P$`#M\A/@#``(Q.'"#(`,``ABX`,,8+P!B$"T``AEX`*00+0!#$"W<0P&8 +M9&,``?Q#`9B.`@"H?$,%@!1@`'0\!``!W@,`J#2$``$`!"%\`&0H)!"D`",` +M````E@4`N"0$`@$R`P"@`&(8+8QF``!H9``,:&(`!'R%^`-\27P#`25(+0`$(#Z( +M90```24H+0`"$#Y\QAX#`*0H+0"B*"TLP@`&%$``"P`%%#HD!``4``8PN``` +M````@Q`M9(0`!(A"``!\0O@#%(;_^P"B*"T`!10Z9&0`"GRE>`,`11`M``(L +M.GQ">`,`HB@M``44.GRE>`,`11`M.$+__Z""``$``@H"H($``-X#`*@(``A< +MC@(`J-X#`)@\`@`!-$(D!R0%``,``A.\?&1(`0`#(`I\@D@%"``'Y/P"@1`` +M$EI`-2D`57#J"3,`"4J\-2D`4`%I2"T!24@EW2H``'U*>`$`"D@`?41X!0#) +M,"H0P/].K$D``'P$C`8D`@`)"``('7Q$_P8(``@`9$(=L'Q#!@`08``*,$)` +M`)8%`+C_IP```@`@+1!``$C_J``(#`!K*`````#?IP``WZ@`"-X"`*@D`P(! +M``,;O`!#("00@P`;`````)8%`+`R]_[C_MP`X?1=$PO^V`#``H+`M_[4`*`+@J"W_M``@?111@O^S`!@`X)@M +M_[(`$`$`D"W_L````("`+?^_`$#_L0`(```!3SP"`0$PX___$*``5P!B&"5\ +M`O`[$$#__CP"__PD!`!!-$(`"P`$(SQ\!0`[``(3?'RE"<,TA`"```4R`'RB +M.09\Q.T&?&(9!7Y1`,+\1```?D,$0@`1C;A^1`D"D@(`$'QQWL:6`P`(?I'4 +M!GR1_X808`$;?%&L!WQQ>`=P1`!O`!$=NCAC``$``Q@``(,8)!!@``\`%B@K +M<$,`K@!E&"048``+`````-X&``!\PU@",&0(`!2``#X`8#@M``8SO@!%*",P +MQ#``#``^V`"'("7>`@"H/`,``20%`@$T8P`!``4HO"0$``$``QE\`$4H)``$ +M(+P0I``R`$,0)!!#`%0`````C@(`J'Q#!8`48``<`````'Z2@8;Z0@#Y`F`@ +M+=X&`!@"("@M```X+20(``$,`7L\```````"$`#?OP!`W[<`.-^V`##?M0`H +MW[0`(-^S`!C?L@`0W[$`"-^P```#X``(9[T`2'P"\#L40/^K/`+__`@`"9(` +M`````````-X#`*A\9`H"$(#_XGQD"L(4@`!;)`0`098"`+``5[@A)O<``0@` +M"7U^\?8'`````#!C#_`(``EG`&`X+0`````00P!C`````(X"`*A\0P6`%&`` +M]S!"`"#>`P"H)`("`0`"$[P`8A@D$&(`A0````".`@"H?$,&`!!@_\8````` +MW@,`J'QD#`(0@/_"?&0,PA"``$DD!``A``0CO`!D&"0D!``!``0CO!!D`*

`P"@E@(`N`!B +M$"V,1@``:$0`#&A#``1\A?@#?&=\`P#E*"T`!"`^B$<```"G*"T``Q@^?,8> +M`P"D*"T`HR@M+,,`!A1@``L`!1PZ)`0`%``&,+@``````((8+62$``2(8P`` +M?&/X`Q2&__L`HR@M``4<.F1$``I\I7@#`&48+0`#+#I\8W@#`*,H+0`%'#I\ +MI7@#`&48+3AC__^@@P`!``,*`J"!```(``EZC@(`J``$(7P`9!@D)`0``0`$ +M(7P09`!G,$(`0!!`_WX"`"`ME@4`L`P`:ZH`M2@A"``)?GZ2@88`````E@(` +MN`!7N"$F]P`!"``)?7[Q]@<`````E@(`L-X#`*``8A@MC&8``&AD``QH8@`$ +M?(7X`WQ'?`,`Y3@M``0@/HAE````Y2@M``(0/GS&'@,`I"@M`*(H+2S"``84 +M0``+``44.B0$`!0`!C"X``````"#$"UDA``$B$(``'Q"^`,4AO_[`*(H+0`% +M%#ID9``*?*5X`P!%$"T``BPZ?$)X`P"B*"T`!10Z?*5X`P!%$"TX0O__H((` +M`0`""@*@@0``"``)JXX"`*B6`@"XW@,`H`!B&"V,9@``:&0`#&AB``1\A?@# +M?$=\`P#E."T`!"`^B&4```#E*"T``A`^?,8>`P"D*"T`HB@M+,(`!A1```L` +M!10Z)`0`%``&,+@``````(,0+62$``2(0@``?$+X`Q2&__L`HB@M``44.F1D +M``I\I7@#`$40+0`"+#I\0G@#`*(H+0`%%#I\I7@#`$40+3A"__^@@@`!``(* +M`J"!```(``FUC@(`J)8%`+`"`"`M#`!K*`"U*"$(``E^?I*!AI8%`+@"`"`M +M#`!K*`"U*"$(``E^?I*!ACP$$`L\!A`+/`<0"V2$/8`D!02]9,9$:`P"7IID +MYSWX/`+_@#1"`2E\`P`[``(2/'QC"<-\8CD&W$(``!!``"\D`___)`0``WQB +M_\8D`P`!``,8?'R1"`;\0P`(-`.``/Q````D!``!_$,`$'Y)!(+\0``@?E(V +MP]X#`$@`":`+`B`H+20(``'\0P!(W@,`0/Q#`$#>`P`H_%0`4'R#_P8"8"`M +M?D/5!OQ#`"A\0T@!W@8`&``"&`H`8!`M`&`X+20#__]\9T(&"``)A`!).`J6 +M!0"P$$``!0(`("T,`&LH``````@`":_>`P"H#`!KJ@`````(``FOW@,`J#P$ +M$`L,`!>69(0^&`@`"8<``!`M9[W_4/^S`)``@)@M_[(`B/^_`*C_M0"@_[0` +MF/^Q`(#_L`!XW)``&'X0.`$2``%*`,"0+20"__]\4/_&`@6`+0``J"V2`P`, +MD@(`#7QB>@0T`X$`,$+__Q!#`/$D$0`.`A&(+3P#0`".(@``CA3__`!`("U\ +M!-@$$(,`FP`4H@("("`M9Z4`2*.@`%AGI@!0_Z``2`P`:VAGIP!8DZ(`6``` +M6"UP101N<$,!K@"C&"408``&```@+=^C`$B49```E&,``@`$7``!8U@E$D`` +M.C0*__^69@`.-`C__S0)__\T!___D@4`!@`%+#C_I0`P/`40(4BE0@`\!?__ +M2*4"`8^E`#!(I0(&CZ4`-$BE`@9()`(!D@4``'R"?`,`!2PX_Z4`.#P%$"%( +MI4(`/`7__TBE`@&/I0`X2*4"!H^E`#Q(I0(&2"0"`30#__\2@``-?(5\`P`4 +MH#P\`Q`A_[0`0$BC0@`\`___2*,"`8^C`$!(HP(&CZ,`1$BC`@9((P(!?&-\ +M`Q)``-;?OP"H`$40)M^U`*``1A`FW[0`F`!#$";?LP"0W[(`B-^Q`(#?L`!X +M`^``"&>]`+#>(P`(_Z,``#P#$"%(HT(`/`/__TBC`@&/HP``2*,"!H^C``1( +MHP(&2","`=XE`!#_I0`(/`40(4BE0@!\`W@'2*,"`8^C``A(HP(&CZ,`#$BC +M`@9((P(!WB4`&``#'`(P9____Z4`$#P%$"%(I4(```,<`$BC`@&/I0`02*4" +M!H^E`!1(I0(&2"4"`=XE`"#_I0`8/`40(4BE0@!(HP(!CZ,`&$BC`@:/HP`< +M2*,"!D@I`@$`%:PX?2E\`P*B$"7_H@`@/`(0(4BB0@`\`O__2*("`8^B`"!( +MH@(&CZ(`)$BB`@9(*@(!```P+7U*?`,0@/^.-`C__P`+6#P\`A`A_ZL`*$BB +M0@`\`O__2*("`8^B`"A(H@(&CZ(`+$BB`@9(*`(!"``*[7T(?`,`````EB4` +M!@``,"V2(P`),*4__Q2@``P``"`M<&<$;G!E`:X`Y2@E$*``!WQ"'@,``A"X +M`B(0+91$``"40@`"``0T.`#","6.(@`,$D``/XXE`!"69P`.-`C__S0*__\T +M"?__D@8`!@`&-#C_I@!@/`80(4BF0@`\!O__2*8"`8^F`&!(I@(&CZ8`9$BF +M`@9()0(!D@8``'RE?`,`!C0X_Z8`:#P&$"%(ID(`/`;__TBF`@&/I@!H2*8" +M!H^F`&Q(I@(&2"0"`30#__\2@``-?(1\`P`4HCP\`A`A_[0`<$BB0@`\`O__ +M2*("`8^B`'!(H@(&CZ(`=$BB`@9((P(!?&-\`Q)``$W?OP"H`*00)M^U`*`` +M1Q`FW[0`F`!#$";?LP"0W[(`B-^Q`(#?L`!X`^``"&>]`+``````EA4`#B01 +M`!((``K,,K4/_P`%*#Q\0O@#`*(0)?^B`$@\`A`A2*)"`#P"__](H@(!CZ(` +M2$BB`@:/H@!,2*("!D@I`@$`%:PX?2E\`P*C&"4\`A`A_Z,`4$BB0@`\`O__ +M2*("`8^B`%!(H@(&CZ(`5$BB`@9(*@(!```X+7U*?`,0@/^I-`C__P`&,#P\ +M`A`A_Z8`6$BB0@`\`O__2*("`8^B`%A(H@(&CZ(`7$BB`@9(*`(!"``+AGT( +M?`,``````2`/@``AGO0"P"``*PP``@"VD +M@``@```0+0"`&"TD"0`_)`@!`-QE```D1@!`9&,`"!"@``5PIS@D``8```H+6>D!@`D!@(`_[\(8/^^"%C_MPA0/!<4`/^V"$@``+`M +M_[4(0/^T"#C_LP@P_[((*/^Q""`,`F9@_[`(&&>D!````"@M#`)F8"0&`@`` +M`"@M)`8"``P"9F!GI`(``Z`@+0``*"T,`F9@)`8"`#P%`/\\`O_P-*7_/SP$ +M``TT0@`C0`9X`#2$EP``Q2@D``(2_'"D("JOI`@```#(+0@`#+,T7@#XW0(` +M"``$)WQ\0@]"``(7?!!$`",`````)SD``20"`0`3(@`29M8(`-[H1@`T`JZ` +MJ!``" +MQS@M``!H+32EH(!F50(`-QB&H-TN````\A`M9.;^````("W<0P```$40+11& +M__T`@R`MW2\"``"`B"T`]1`M```8+=Q&````11`M%$?__0!F&"T1X``%`&`0 +M+0!O,"L4P`%1``````!O&"\1P``%_2("``".$"L40`%.``````".("\1@``) +M_3$``'!P&`-PD"`#`&P`'P&``?0``!@2`(P`'P&``?0``"`2``0P*P`#$"L` +MPA`D$$``\@``````9``?`(`!]-T&!&C=!`1X_68``/U$`````!`2+$0'T!2` +M`.P`````+$,/H!!@``5D0_!@)`,`"/UC``#]0P``9$/P8"QC#Z`08``%9$/@ +MP"0#``;]8P``_4,``&1#X,`L8P^@$&``!61#T2`D`P`$_6,``/U#``!D0]$@ +M+&,?0!!@`10L0DX@)`(``OUB``#]0@``D0(`-R6M``%E*0`(96L`"&5*``@! +MHA`J%$#_J63G``A\`O@[WZ,("`!#$"L40`$L`````'P"^#L`0Q`OW0,$0!!@ +M`2+?HP@0D0,`-A!@`&D\`Q0`/!'^,=QD1@@\`P'/-&.^"#8QY@`\&``!`$Q@ +M+0"#("T\`P`)904(J`.@,"UGIP(``L0@+0``2"TT8Z"`9C("`#<8AJ`D%0`( +M`````-RN````D1`M9(W^````6"W<2@```$,0+11-__T!:E@M$<``!0%@4"T! +M;A`K%$``^0`````!;E@OW*X"``"2$"W\J@````!0+=Q-````0Q`M%$3__0%- +M4"T1P``%`4`0+0%.:"L5H`#N``````%.4"\1@``)_*("`'%04`-Q<%@#`4P` +M'P&``?0``%`2`6P`'P&``?0``%@2``MH*P`*$"L!HA`D$$``D``````!2P`? +M`6`!]-T-!(#="P1X_.T``/S+`````!`2+$L'T!5@`(H`````+$H/H!%```)D +M2O!@_/4``"U*#Z`10``#_-4``"0*``;\Z@``9$K@P"0+``8M2@^@$4```_S+ +M```D"@`$_.H``&1*T2`D"P`$+4H?0!%``*_\RP``)`(``OSB``#\P@``D0(` +M-B4I``%DI0`(9,8`"&3G``@!(A`J%$#_K&2$``@R9``_%(``!```$"V-`PST +MC0(-``!B$".1#0`W/`X4&-W#5WC`90)T%*#__B0%``'@90)T$*#_^P`````\ +M!?^``!2C0#2E`1\"A"`E``4I/`!-&"$TI2@M`$,8*@`%*3C\I```W*0``!!@ +M`&4\!O^```(4>#3&`1\``"@M``8PO"0*`1@TQ@0!)`___P`&,;@\"0`"`$88 +M+63&`&`(``X$`$8@+0.F,"W#/"<(``T(`&\8+0`.<"<(``T.`(X@+=T*!(C=`@1P_.H```@` +M#;?\P@``)`H``BQ"3B`40/]2_,H``"0"``'\X@``"``-M_S"``#=`P1@W0($ +M +M%!C_HP`(`&`P+=_%5VC<0T6(CX2!@/^&@OAPHQ@##`"((/Q#18@40`&'```` +M``P`AVP\%/^`#`"(1C:4`0%\`P`[?&,)PP`4ICBOHP`$/`,`_S1C_S\VE``# +M0`1X`/^@`"``@Q@DKZ,`$```B"T``(`M/!44`#P6%```%*0X`````)."@P`P +M0@#_%$``!0````"3@H,!,$(`_Q!```:?@H&`)C$``20"``(2(@%1`````)^" +M@8`D`P`!``(0^`!4$"W\0P``#`"(((^$@8`40`"X``````P`B!2/A(&`%$`` +MIMZC1@!\$_@[?`+P.Q!`__Z/HP`$/`+__#1"``L``A-\?&(Y!MQ"```$0`!' +M`````'Q72`$2X`!$)`/__P+@D"U\`!#$"\`PA`K%$``$Y^$@8`\`Q0`C&)% +MU!!```4\!!0`_[(`"(R"1=`00``+GX2!@/^R``@,``.\`N`@+0P`A;@"X"`M +M#`"&B@+@("T,``6T`N`@+9^$@8`\`@`PWJ-&`#1"Y&``@A`M``(0N`!B$"V, +M4@`@?`/X.]^"@Q`00``,`'.8+P!2$"T```$/"``.KG!3`!D\`@#$`&(0+8Q$ +MD#`,`)0NC$60-`@`#L<`````#`#0^`````#?@H,0`%(0+0```0\(``ZN<%,` +M&0P`A-8`````"``.PP`````,`C!B`D`@+0@`#PL\`A!BW0(`""0#``$``B\^ +M$*,`"GQ&-0(,`'WF`D`@+1!`_X``````#`"4L`)`("T(``\+/`(08@`````\ +M`Q`+``80^&1C0%!\8A(*`$``"``````,`&RL`D`@+8Y"`*@$0`!^``````P` +M)+X"0"`M"``/"SP"$&(`````W04`$`)`("T``#`M#`!9%'[W2`%\`P`[```! +M3SP"_X!\8PG#-$(!*0`"$CQ\8CD&_%<```@`#PL\`A!B`````)97`$X"0"`M +MCD<`J``7N``,`&RL_Z<`*-^G`"@2X``,)N/__P)`$"TD!O__)`7__]Q$`$#< +M0@"8```!3W!&`!D```%/)&/__Q1E__D`@!`M!.#_10`````,`3=4`D`@+0@` +M#PL\`A!B#`!,X@)`("T(``\+/`(08MY$`#`,`>2`?O=(`7P#`#L```%//`+_ +M@'QC"<,T0@$I``(5^#1"``$``A1X?&(Y!OQ7```(``\+/`(08@`````,`>L< +M`D`@+0@`#PL\`A!B#``OA@)`("T(``\+/`(08@P`2&X"0"`M"``/"SP"$&(, +M`"YJ`D`@+0@`#PL\`A!B#``P"`)`("T(``\+/`(08@P`+?("0"`M"``/"SP" +M$&(,`"H8`D`@+0@`#PL\`A!B#``JH@)`("T(``\+/`(08@P`0QX"0"`M"``/ +M"SP"$&(,`'1(`D`@+0@`#PL\`A!B`D,@+_^D`!@(``\_`E>X+0P`K+(````` +M"``.NY^"@8`,`##&``````P`3)@"0"`M"``/-?^R`"`,`)3N``````@`#R`` +M````WD(`F````4\D`___<$,`&0```4\(``\+/`(08@P`AF8`````#`!NQ@`` +M```,`$#\``````@`#ID``````````&>]_[`\`P#$_[(`$#P2%`#>0D8`_[\` +M2/^^`$#_MP`X`$,8+?^V`##_M0`H_[0`(/^S`!C_L0`(_[```)1CD"(08`!- +M)!:``3P5__``%K2X-K4`(S;68`$`%:WX`L"@+3:U!$,`%K1X`!2D^#;6(`4` +M%:TX-I2*`0``@"TT%ZZ``!:S>#:U`$@(`!!O`!2B^##F`/\D!P$``.8H"R0' +M(```YB`+,$(`/SP(__``HB@M-0@`(P`%*C@`"$+\`+4H+34(`/@`HR@E`&@X +M)=RB```D!@`!)A```3!"`#\`@B`M``0@^`"4("T`@Q@EW&(``'S"M8=\PH0' +M_&(``-Y"1@#@!`F"T"8"`M#`$X8@!`*"U^(PL#``,9/"0% +M`@``=B`EW(8``"0$0`!\QA@"R,#_RC#'``(``"`M"``040``*"W?OP!(W[X` +M0-^W`#C?M@`PW[4`*-^T`"#?LP`8W[(`$-^Q``C?L````^``"&>]`%`0H``- +M```0+7RC/`,P8P#_+&,``A1@``1\I3`#`^``""0"``$`````)(0`?C"E`/\4 +MI/_Z``````/@``@`````/`,4&-QB5W@00``'<(<3!% +M`G00H/_[`````#P"_X!PA@$R-$(!'P`"$3PT0B@M``(1./Q'``!D0@U@`,(P +M+=S"``!\13P#,*4`_P`%*"L4H``$)(@`?CP"``%]`C`'_,(``-QF5W@0P``$ +M`````````4^LP`)T```!3Q2@`!_<95=X?$8T`GQ".`(`!"-\$*``!W!&$`/` +MI@)T%,#__B0&``'@I@)T$,#_^P`````\!O^```(4>#3&`1\`P"@M``8V.``% +M*3PTQ@`!-*4H+0`&-#@`1A`M``4I./RG``#\1```W&)7>!!```0````````! +M3ZQ``G0```%/`^``"`````!GO?_H_[````"`@"W_OP`0#`&72O^Q``@2```5 +M`$"(+0`","L`!C`O`@`@+0``*"T,`F9@,,8`")(B`,JF`@``DB(`Q*("``*2 +M(@#%H@(``Y(B`,:B`@`$DB(`QZ("``62(@#(H@(`!I(B`,FB`@`'W[\`$-^Q +M``C?L````^``"&>]`!@`````9[W^J"0&`0#_LP$@`*"8+?^P`0@``"@M_[(! +M&`"`@"W_L0$0`Z`@+?^_`5!^$?@#_[X!2#P2%`#_MP%`_[8!./^U`3`,`F9@ +M_[0!*#0$KH!R)"@#WD)&``!%*"W1$8`)`8``0""("VLD``` +MWD=&``#B$"W<1``(?,3_QGP$]T;\1``(CL0``*!``#:@0``WI$0`,*Q7#02. +MQ``0K$0`$([&`!`DQ@`6K$8`&!*``*W?HP$`?`,H!'QC^`-P91@#`.,8+=QC +M`"```R(^``,L/C"$`/\PI0#__$,`('RD>@0P@___K$,`%#0#KH`D!A70`Z`P+1!` +M`'T`0*@M```H+3P&``@,`F9@`J`@+?[3(&C^TR!@9J4`.`)@,"T``!@M9J@` +M,`@`$<<\!P`(`````-[&(&@!`Q`M9&,`0/S"``#>9``(_*0``/YB``C\L__X +M%&?_]V2E`$`,`"06`@`@+1:```0T`JZ`#``K9`(`("TT`JZ````H+7(BB`/> +M0D8`)`9```!1$"T,`F9@W$0N2#P"%!C<0E=H/`4(,=Y#1@`TI2;I``4L.``" +M(+@``C'X`,0@+S2E>-4`@B`M``44N'R$X`%D0O?/`((`'0!QB"T``"`0/`(` +MQ`!B$"T`!"$Z_B0N4)1#D"(D8P`!I$.0(H["`#PD0@`!KL(`/-^_`5#?O@%( +MW[]`5@"8"@M9(1$X`(`,"T,`!>6`J`X+0@`$8Z.P@`\ +M/`00"SP%$`MDA$4@#`)^O&2E27`\!!`+_L`@6#P%$`MDA$5(#``7EF2E26`( +M`!'ZW[\!4#P$$`L\!1`+9(1%B`P`%Y9DI4E@"``1^M^_`5!GO?VH```H+?^Q +M`A`D!@$`_[("&`"`B"W_OP)09Z0!`/^^`D@\$A0`_[<"0/^V`CC_M0(P_[0" +M*/^S`B`,`F9@_[`""-Y"1@`T`ZZ`1D8`,N4/_S"E__\R]___```0+0##&"W<9``P_'8. +M(/QW#BBL=0XP?H1[QOQD`#`0H``$_',N2"0%``%\I'.&_&0`,"0#%=`D!P!` +MD`0`,`+/* +M9Z0!`&>D`0```"@M#`)F8"0&`0`\!1`+9Z0!``*@,"T,`H!&9*5%$`P`L\IG +MI`$`/`(4`/Z`(%@(`!)WW%Y&`!!```,D`@!`"``2=ZZ"`#@(`!)WKH``.&>] +M_^C_OP`0_[$`"#P1$`L,`9=*_[```&8D1=@,`+.(``*`*P`0@"\00``1,A`` +M"-Q"```D$``!$$``!0``("T`0"`M)`+__WQ$_\8LD``!#``0Y@````#?OP`0 +M`@`0+=^Q``C?L````^``"&>]`!@\"1```@`@+0``*"T``#`M)`<`"&8H1=@, +M`+1H92E#F`@`$P@L4``!/`,4`)!C`1@48``#```0+0/@``@`````/`0`Q3P& +M$`MGO?^@-(00@"0%`(!DQD7H_[(`,#P2%`#_OP!8_[8`4/^U`$C_M`!`_[,` +M./^Q`"@,`+1>_[``(!!``27^0D8`/`8`Q0!`("T``"@M#`)F8#3&$(#>0D8` +M/`,4&```@"W<8U:`-!.N@"04`0`(`!-!_&(`"``````F$``!$A0`$-Y"1@!R +M$X@#`%&(+=XB+D@40/_Y)`1```P`L:HD!0"`$$`!$@!`J"T`0"`M```H+0P" +M9F`D!D``"``3/OXU+D@\`P#$)`4`0`!#&"TD!/__/!8``CP5`*ZL99&```"` +M+:QED80VUJ&`_&21B#:UA`#\9)&0)!0`"'(6B`,D!0#_)`8`*"80``$"-8@M +M`%$0+613(1!D42$X#`)F8`)@("T,``P,`F`@+0P`#"`"8"`M)`4`_R0&`"@, +M`F9@`B`@+0P`#`P"("`M#``,(`(@("T6%/_IWD)&`#P#`,0`0Q`M)`,``0P! +METJ@0Y`D$$``Y@````"41@#`),+_U#!#__\L8P`J%&``%#P#$`L\!1`+`Z`@ +M+0P"@$9DI490/`00"V2$1G`,`!>6`Z`H+20"___?OP!8W[8`4-^U`$C?M`!` +MW[,`.-^R`##?L0`HW[``(`/@``AGO0!@<$)X\F1C2!!\8A(*`$``"``````D +M`H`!/`7_\``"%+@\!!`,W(2/P#1"8`,``A>X-*4`(WP#`#M\8PG#-$(`,``# +M&3P`!2K\_Z0```!B$"7\0```-*4`^-Y&1@``92@EW*0``#P#`,3<1P`````@ +M+0##,"T`!S@_K,>1F"0&``C\1@``/`<0`-RE``!DYT)(W$(``#P&%`#>148` +M_,=&B#P'$````A`_9.="B`"C&"T\!A0`K&*1G`P`$*+\QT:`#``0HB0$``$\ +M"!0`90@``-Y*1@`\!`##-(20````&"TD!O__)`4`"`%$("T`@!`MK$8``"1C +M``$49?_]9$(`!(T&```8P``3/`,`KCP)``(T8X0``0`H+0%#&"T``!`M-2FA +M@`````",I@`(9*4`!*Q@`$BL9@```&D8+:R"```D0@`!C08```!&."H4X/_V +M9(0`!#P"`,0\!!`+`4)0+62$1H"M1I`P`Z`H+8T"``0,`!>6K4*0-`@`$XP` +M`!`M)`(`31#"`'$`````)`(S`*>B``0\`DY)-$)#,J^B```D`H`!/`3_\``" +M%+@TA``C-$)@`P`$(OP``A>X-(0`^'P#`#M\8PG#-$(`,``#&3P\!A```&(0 +M)0!D&"7\0```9,9"2-QC`````"`MW$,``#P"%`#>148`_$9&B#P"`,0``Q@_ +M`*(0+:Q#D9@\`Q``9&-"B#P"%``,`!"B_$-&@`P`$*(D!``!/`@4``@`$\IE +M"``H/`+_\#1"`",``A+\-$(5L-Q"```P0@`'$$``.CP#$`L\`Q`+/`@4`-QE +M1B!D8D8@90@`>-Q$``B40P`0D$(`$O^E``#_I``(IZ,`$`@`$\JCH@`2/`(W +M.#P(%``T0GAX90@`4*^B```(`!/*HZ``!#P"$`P\"!0`W$.,(&1"C""40@`( +M90@`\/^C```(`!/*IZ(`"#P"$`P\"!0`W$*,"&4(`,@(`!/*_Z(``#P"$`P\ +M"!0`W$*,J&4(`/`(`!/*_Z(``#P$$`L\!1`+9(1%^`P`%Y9DI4F("``3C"0" +M``$\!!`+/`40"V2$1I`,`!>69*5)J`@`$XPD`@`!"``3C```$"T\"!0`W&5& +M.&1B1C@(`!0P90@`H"0",P"GH@`$/`).231"0S<(`!/^KZ(````````#X``( +M`````&>]_Y@\`@"O_[``&#P0%`#>`T8`)`7___^_`&#_O@!8_[<`4`!B$"W_ +MM@!(_[4`0/^T`#C_LP`P_[(`*/^Q`"`,`2F(C$2$`-X"1@`\`P#$`$,8+8QC +MD#`L9``"%(``%``````\%``")!$``3:4H8`\$P"O/!(`Q'XC^`,D!?__<'08 +M`R8Q``$`0Q`M`F(0+0P!*8B,1(0`W@)&``!2&"V,8Y`P`B,@*Q2`__,````` +M$&``/SP$$`LD%8`!/!3_\``5K/@VE``C-K7`!P`4HOQ\$P`[`!6NN'YS"<,` +M$YD\-K5``S:4`/@\%@`"``"(+3;6H8`\$@"O`!6H^`)TH"5^/O@#)C$``7/6 +M\`,`7A`M`D(0+8Q7A``,`3AF`N`@+0P!.PX`0"`MW@-&`"0&!=P"X"`M`'X8 +M+0)#&"W<980(K&:$$"0&/H"L9H04)`8``7S%M8=\1:Q'#`$X>OQEA`@"X"`M +M#`$X9@!`\"TSW@`#<$(1,@!>\"TD`@7X`![U.`/5\"T#T_`E_\(``-X"1@#> +M@P``/`,`Q`!#&"V,8Y`P`B,8*Q1@_]=^/O@#/`00"PP`%Y9DA$;`#`"()``` +M``#>!$8`/`<`Q"0%``8``!@M`( +M`D8`_K8`*`!4$"T"0A`M9E*$`(Q&A`#_I@`0#`$X9@#`("W?I@`0`$"X+0P! +M.'H`P"`MW@1&``*2*"W_H@`0#`!!E@"%("W?H@`0)`.``3+H``<``QSX``A! +M.#1CP`N`$"$"TT8T`A``(5.``#&/@"("`M`$,0+20%``'?HP`` +M)C$``0!#$"7?HP`(_%8``-QB```D`@`$#``E//ZB`!C>!$8`/`(`Q`""$"V, +M0I`P`B(0*Q!``!\`````?C3X`SP"`*YRDQ@#-$*$`#P2`*\`8A@M`(.H+:Z@ +M`$P"H"`MKJ``4*Z@`%2NH`!$#``F*@````#>!D8`C\16C#P%`,0`Q2@MW*>0 +M*'SG>`$0@/^Y`H>P+3P$$`L"("@M`L`P+0P`%Y9DA$<("``5`W(SH`,````` +M```!#]^_`&```!`MW[X`6-^W`%#?M@!(W[4`0-^T`#C?LP`PW[(`*-^Q`"#? +ML``8`^``"&>]`&AGO?[8_[4!`/^T`/C_L@#H_[``V```@"W_OP$@_[X!&/^W +M`1#_M@$(_[,`\`P!.PS_L0#@?!(`.WY2"<,`0*`M&$``#P)`J"T`$I0`)!$` +M"0@`%7D`0)@M)A```1(3`%P`````,@0`_S2$W@`,`3L.`)(@)0`"$``44?_W +M`````"0$__\"D*`F`A0@"P``*"T,`3@H/!?_\#;W`",#H"@M`!>Z_`!`@"T, +M`2``&CHP!J`K>X):.C`&FCHP!H#`$G7J.C`&=\$``[?A`) +MPP`0A``,`3L,``"P+1A```T`0*`M"``5JP!`D"TFU@`!$M(`#"0"`#\RQ`#_ +M-(3>``P!.PX`D"`E``(0`!11__<`````$I8``R0"`#\RPP`_`&`0+3P#__`" +M8A`M-&,`(P`"$C@``QWX9G,!`#1C!$,``QTX-&,`0`!#$"T`51`EW$,``'_# +M*4?\0P``WN(``"0"`@`68O_;W[\!(```$"W?O@$8W[]^B#<8D8` +M/`0`Q/^T!;`D!?___[\%V/^^!=``1"`M_[<%R/^V!<#_M06X_[,%J/^R!:#_ +ML068_[`%D(R$D##_H`48?`,`._^@!2```QG"_Z`%*#!T``/_H`4PKZ4%&/^@ +M!-C_H`3@_Z`$Z/^@!/#_H`3X_Z`%`/^@!0@8@`$0_Z`%$#P(__P`%$D\-0@` +M"0``J"W_H`5@``A$.*^C!8`U"$`!``A'>`$H0"7_J`6(WZ,%8#P%``(TI:&` +M?!'^A'!E(`./I06`/`,`KV1FA`!\L`P`098PT@__WZ,%B`*`("TD!?__)`8`"-QB +M```P0@`_?%&L!"0"^:,,`6G`?%%X!`1``0O_H@5H9[8$W`*`("TD!?__9[`% +M&`P!:R;_M@5P`@"X+0``F"T\!1`+`L#P+=^F!5@"8#@MKN(```.@("T$0`#P +M9*5'<`P"@$8``````!,8^`(@("TD!?__`Z`P+20'"``\"``"#`#)W@.CL"TT +M!/FCKL($W``"$#^NP@38E\(``!!$`-`\!!`+`L#P+=_&!-@\!1`+W[8%<&2$ +M1XADI4G(`@"8+7S&2@(``/`M#``7EC#&__\(`!96)!<`""?>``%FF/@"@"`MCA8```.SF"W>90389A``!`+` +M,"U\I4H"#`%>[#"E__\#TB@A`H`@+0P!7Q("P#`MWF@$V#P$$`L#P#@M9(1' +MJ`+`*"U]"$H"`D`P+0P`%Y8Q"/__WF4$V`*`("TD!@`!)`<``20(!1%\I4H" +M)`D&(C"E__\D"@`!#`$A0"0+!`"OO@4\`]F!3BOI04X`H`@+=YB!-BO +MO@5$K[X%2"?>``&OH`5,?$)*`J^B!4`,`5WHKZ`%4"0&``@7QO_.WZ0%6&>E +M!``,`2@!`@"T"`"`M#`$X8@!`*"TD!H`!WZ,%>``&-+@T +MQF`!``8T>#3&(`4``RD\``8S>"ZC``(`IB`EW(0``!!@``I\A!@"`J08%^A@ +M``#3&`$@D`P`!`$80+3P&%```12@E +MWZ(%8"1"``'_H@5@W*(``"0%@`$`!2RX-*5@`3!"`#\`!2RX`((@+32E10$` +M!2LX``0@^'R%$@H`A2`MWZ4%8'QB4H=\8AC'?&((1_R"```\!/_PW,)&`#2$ +M`",`!"+\-(0`^-R#```\`P#$`$,8+8QCD#``HQ@J%&#^_M^C!6#?OP78```0 +M+=^^!=#?MP7(W[8%P-^U!;C?M`6PW[,%J-^R!:#?L068W[`%D`/@``AGO07@ +M)G,``20&``AF]P`$$F;_5&?>``@"@"`M#`%K)B0%__\\!1`+WZ8%6`)@."VN +MX@```Z`@+01!_Q)DI4=P/`00"SP%$`O?M@5P9(1'2&2E2<@,`!>6`@"8+0@` +M%E```/`M"``6V"05``(\!!`+/`40"V2$1R`,`!>69*5)R-^_!=C?O@70)`+_ +M_]^W!]!>!GO?\P +M_[\`R/^R`,#_L0"X#`'E!/^P`+`,`>4V`$`@+0P!/;@`````)`/__Q!#`$`\ +M!!`+```!#WP2`#M^4@G#)!```0)`("T,`5EZ`D"(+3P#_^`T8P!5/`+_\``# +M';@T0@`C-&,`#0`"%'@``QTX-$(`$31C``@``A:X`!*1/``1,3P"0Y`E-$(" +M`/Y`````PA`EW$,``#P'__`TYP`C`B`@+0`'.OP#H"@M-.<`^'X#2D?\0P`` +M`,] +M`-``````#``5U@`````40/_UW[\`R`@`%X'?L@#`#``7EF2$1^#?OP#(W[(` +MP"0"``'?L0"XW[``L`/@``AGO0#0`````&>]@!`T`H"8_[1_8#0#@*#_LG]0 +M_[%_2/^_?W#_M7]H_[-_6/^P?T!GO?\@`%T0+0!]&"W\10```(`0+?QF```T +M!H"H`-TP+30#@+#\QP``-`:`N`!]&"T`W3`M_&@``#0#@,#\R0``-`:`R`!] +M&"T`W3`M_&H``#0'@`#\RP``-`:`F`.F&"TT!H`0`-TP+0.G."W\PP``-`.` +M&`!`,"T`?1@M)`(`.`.@("V@8@``-`.`&20"`$``?1@MH&(``#0#@-``?1@M +M-`*`6/SC```T`X!@`%T0+0!]&"WT3```]&T``#0"@&@T`X!P`%T0+0!]&"WT +M3@``]&\``#0"@'@T`X"``%T0+0!]&"WT4```]'$``#0"@(@T`X"0`%T0+0!] +M&"WT4@``]',``#0"@`@T`X#0`'T8+0!=$"W\0P``#`*?T#0%@`"?@X&`/`44 +M`#0$@`!DI4:0`$"(+0`#D/@``QOX`D.0+20"__\"19`MCD,```!D*"L0H``% +M`Z"@+8Y%``0`I"`K%(``.P`````T%8````````(B@"H`0#`M`C`P"P`"$"H` +M$1@J`H`H+0!B$"0`P(`M$$``)`#`F"V.0@`$?$3X`P)B&"%DA``(`'48*Q1@ +M``,"1"`M`J*8(P)@@"T,`F5<`@`P+0```0^.1``$`C"((XY#```"D*`M)`+_ +M_P"3F"$R`,"8+6>]`.#?OW]PW[5_:-^T?V#? +MLW]8W[)_4-^Q?TC?L']``^``"&>]?_``````)&)__P!%$",(`!?Z,$)__SP" +M%!B,1%=D$(``$#P"%``DA/__?(3X`V1"1I``!!CX-`6`"``$(_@`12@M`&08 +M+30$@`@`HQ@MK$```*Q```0`1!`M%$/__``````\`Q``/`(4&&1C7E@#X``( +M_$-MF&>]_^@T`X``_[````"`@"W_OP`0_[$`"(R"````0R`K$(``&@````". +M!``$`(,H*Q"@`!8D17__`*0H(P`%*"]`!AGO?_0_[0`(#P4%!B.@E=D +M_[\`*/^S`!C_L@`0_[$`"!!``!G_L```/!'_@#P3%``V,0$!``"`+0`1CCAF +M]`#!GO?_X/`(>W/^E```T0F]!2*)"````$"U(H@(! +MBZ(``DBB`@:3H@`&2*("!).B``=(H@($2"("`0`"$$`D!___"``8MB1(`@`0 +M2``)`````'!#03(`PQ@MC&4`"!2G__HD0@`!WZ(``*QD``C\8@```^``"&>] +M``AGO?_@_[\`&/^R`!#_L0`(`*"(+?^P```,`3AF`("`+0(`("T,`3AZ`$"0 +M+20#@`$R4@`'``,<^#!"``,T8\`'`!*1.``#'K@"0B`M-&-``0`$)3@``QCX +M?`(`.WQ""<,`@R`M``(1/`""$"7<0P``$B``%20"``$D`@`#?$,8AWP"`#M\ +M0@G#/`7_\``"$3PTI0`C`$0@)0`%*OS\@P``-*4`^-^_`!@`11`EW[(`$-^Q +M``C?L```W$(```/@``AGO0`@``````@`&.!\0QB'9[W_X/^_`!C_L@`0_[$` +M"`"@B"W_L```#`$X9@"`@"T"`"`M#`$X>@!`D"TD`X`!,E(`!P`#'/@P0@`# +M-&/`!P`2D3@``QXX`D(@+31C$`L`!"4X``,9>'P"`#M\0@G#`(,@+0`"$3P` +M@A`EW$,``!(@`!,D`@`!?$,YQWP"`#M\0@G#/`7_\``"$3PTI0`C`$0@)0`% +M*OS\@P``-*4`^-^_`!@`11`EW[(`$-^Q``C?L```W$(```/@``AGO0`@"``9 +M$WP#.<>0B```/`,0"]R)``!D8TH@D(<`!)""``,\!!`+9(1*&'TI!<,`B!@+ +M/`00"V2$2BA\1WH$`&!`+3P#$`MD8THP`(D8"SP$$`MDA$GP"``7E@!@2"T` +M````-`*N@&>]_VAP@A`#_[(`6/^D`$`\$A0`WD1&`/^S`&#_L`!(_[\`D/^^ +M`(C_MP"`_[8`>/^U`'#_M`!H_[$`4/^E`#``@B@MD*(`-WP3`#M^148``C80+0(`("UD0@`#`Z`P+0`"$/@`HA`MW$<`('SG +M5X,PY___`.`H+0P!7<0`X/`MCZ@`"`4!_X\\!/_P/`S_\```N"TUC``C``QE +M^#6,!$D(`!F8``RM.`````#?I`!`-`.N@'"#&`,`0Q`M_$`,Z*!``#;?OP"0 +MW[X`B-^W`(#?M@!XW[4`<-^T`&C?LP!@W[(`6-^Q`%#?L`!(`^``"&>]`)@( +M`!EZ_Z,`(`@`&78``+@M,((`/Q1```0T`ZZ``^``"`````````````0A@P`$ +M(8!P@R`#/`,4`-QH1@`\`_^`-&,!*7P'`#L``QH\?.<)PWSC.0;<9P```00@ +M+9"(`CB,@PST$.``&`$#0"$`X!@M)`G__SP$__!](__&-(0``R0)`(5GO?_X +M``E-?``$(OS_OP``?.0X!?QI``#\8@`(K&4`!/QF`!````%/```H+7R'>@(, +M`(G.)`8``=^_```#X``(9[T`"#P$$`L(`!>69(1*J``````\`__P9[W_J#1C +M`"/_M@`X``,:_``$LCLT8S@8_[,`(``6L?C_MP!``L.8+?^U`#`"8+@M_[0` +M*'P7*0;_OP!0?G.2`O^^`$@PA`#__[(`&`"@H"W_L0`0`,"H+?^P``C>X@`` +M?`+&!_[B```D`@$8$F(`13P"``$\`__P-&,`(S1"``(``QK\,)(`'S1C.`!^ +M0F('`L.`+0(`B"U^$)("?!$I!OXB```D`@$8$@(`1P`````,`+=2)`0``SP# +M``$T8X:@/`0AC7!#$`,TA.]!``0D.#2$:]L`!"1X-(0TVP!$`!T``"@0``4L +MNGP"^#L\!/_P`*(H+32$`",`!"+\-(0X$`+$("U\!"D&`````'P#^#MD8P/H +M?`+X.P!#$"L40/_]`````-R"``#(40`%`````'P#^#L`91@K%&#_]`````#( +M4``$,$/__R0"`4$08@`@`````-^_`%#?O@!(W[<`0-^V`#C?M0`PW[0`*-^S +M`"#?L@`8W[$`$-^P``@#X``(9[T`6-QBR.`\`__P-&,`(SP"``$``QK\-$(` +M`C1C.``PD@`?`L.`+7Y"8@<"`(@M?A"2`GP1*0;^(@``)`(!&!8"_[L````` +M"``:?]QBR/C>X@``?`+&!_[B```D`@$8$F("#3P"__`D`P`0-$(`(P`"$OPT +M0C@(`L*P+0+`\"U^UI("?!XI!O_#```D`P$8$L,!_@`````D`@`6?D)B!_XB +M```D`@$8$@(!\SP"__!\`_@[_Z,```P`MU(D!``#/`0``32$AJ`\!2&-<$00 +M`S2E[T'?HP````4L.#2E:]L`!2QX-*4TVP!%`!W?P@`````@$``$)+K(40`/ +M`(,@+0````!\`O@[`((0*Q1```H`````?`/X.V1C`&1\`O@[`$,0*Q1`__T` +M````W\(``.A1__0`````WN(````5JL`VHP!`?`+&!_[B```D`@$8$F(!PSP" +M__`P8O___\(``"0"`1@2P@&X/`+_\"0"``%^0F('_B(``"0"`1@2`@&M/`+_ +M\'P#^#O_HP``#`"W4B0$``,\!``!-(2&H#P%(8UP1!`#-*7O0=^C````!2PX +M-*5KVP`%+'@TI33;`$4`'=_"`````"`0``0DNLA1``X`@R`M?`+X.P""$"L4 +M0``*`````'P#^#MD8P!D?`+X.P!#$"L40/_]`````-_"``#H4?_T`````-[B +M````%*"`-I0``7P"Q@?^X@``)`(!&!)B`7X\`O_P,I3__R0"`1C_U```$L(! +MX@``?`+&!_[B```D`@$8$F(! +M/#P"__#_P```)`(!&!+"`3(\`O_P)`(``WY"8@?^(@``)`(!&!("`2<\`O_P +M?`/X._^C```,`+=2)`0``SP$``$TA(:@/`4AC7!$$`,TI>]!WZ,````%+#@T +MI6O;``4L>#2E--L`10`=W\(`````(!``!"2ZR%$`#P"#("T`````?`+X.P"" +M$"L40``*`````'P#^#MD8P!D?`+X.P!#$"L40/_]`````-_"``#H4?_T```` +M`-[B```VHP!0?`+&!_[B```D`@$8$F(`^#P"__`P8O___\(``"0"`1@2P@#M *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Sep 12 23:42:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BA56E25377; Tue, 12 Sep 2017 23:42:54 +0000 (UTC) (envelope-from sbruno@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 05F6169208; Tue, 12 Sep 2017 23:42:53 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CNgrn6092298; Tue, 12 Sep 2017 23:42:53 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CNgrmL092297; Tue, 12 Sep 2017 23:42:53 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201709122342.v8CNgrmL092297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 12 Sep 2017 23:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323510 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 23:42:54 -0000 Author: sbruno Date: Tue Sep 12 23:42:52 2017 New Revision: 323510 URL: https://svnweb.freebsd.org/changeset/base/323510 Log: Do not try to build the Cavium Liquidio driver on all architechtures. For now, limit to amd64 only. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 12 23:36:58 2017 (r323509) +++ head/sys/conf/files Tue Sep 12 23:42:52 2017 (r323510) @@ -2216,62 +2216,6 @@ dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge -dev/liquidio/base/cn23xx_pf_device.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_console.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_ctrl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_device.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_droq.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_mem_ops.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_request_manager.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_response_manager.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_core.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_ioctl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_main.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_rss.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_rxtx.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_sysctl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -lio.c optional lio \ - compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ - no-implicit-rule before-depend local \ - clean "lio.c" -lio_23xx_nic.bin.fw.fwo optional lio \ - dependency "lio_23xx_nic.bin.fw" \ - compile-with "${NORMAL_FWO}" \ - no-implicit-rule \ - clean "lio_23xx_nic.bin.fw.fwo" -lio_23xx_nic.bin.fw optional lio \ - dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ - compile-with "${NORMAL_FW}" \ - no-obj no-implicit-rule \ - clean "lio_23xx_nic.bin.fw" dev/lmc/if_lmc.c optional lmc dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo From owner-svn-src-head@freebsd.org Tue Sep 12 23:44:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4837CE254AF for ; Tue, 12 Sep 2017 23:44:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::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 0D39A693FF for ; Tue, 12 Sep 2017 23:44:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id g32so38709154ioj.2 for ; Tue, 12 Sep 2017 16:44:26 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=zetxBxDIM/DeIQixwgJ4PFFfTW43UimabQX4W3PVpIc=; b=b60SHNL51cUOBSt+lTKFCQkA4huXtEJ3PQ+j4t3Fz0AVrn95E+3kIQXMuw6HZz25nE YZ4legyllEB9DUrMFnRpAhbuNLl/UunF5Qv8y01cD8CiXXMp99hWkO6XBqSaa7PFycDh 5ryO9tPJ2x1PMe3h32T7A9HVjCR2zecOeyeEnQJBcwjRuxUKzXu7PUL5od622iY/FxtN Tgs7VoHwIzlpWXNEttmPglkRULIwl/A1vpdjrOuWD+GXP9aFWqRV40WLRBF9x11My/uQ P16/2L7bldfyEhNIcS3U2qBJ2AHFYcJzUbI8mu9mdCCVIzpjEqjQH890kkC9lR7A/6+Y vgrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zetxBxDIM/DeIQixwgJ4PFFfTW43UimabQX4W3PVpIc=; b=tBMBTP0CW2UfQRO8zHbyv1OMHdPZ/7DlT89uuxoFSfxzvrhA7D+ZKGHtPO81B+7gaR S5g7isQlzqS/6Ts/eEgwQfZVJ8V4UnIkxxJpoSTdGCda5TgX6nyEWjxxOU/o9YE5/bXq wg52wQ5HDpwqIaayuxGbI5XyemqA7cUwoQ6bNu402RKcF1FvwnAU9KRydFe87zQ11y+h emDxweQqpNu2jkDs7i3ygf4H5OwgdYtiH3PDk6TeoETVPQzU1FMw596CjpwMyfJC1Eub FoGACLsbLYPDp7lAsmYQo3JaYIPGjjjzYokEEURzLufuKhs/JNePbTtlS64lg1Qkecok BFdA== X-Gm-Message-State: AHPjjUjvo89a0YZFvE1VecBZvldbx6KbyYCL/gMgWuy1f3w2Dp4jSRX/ aB6yWOwkH6p4sTLjVnpgfkERVlWJOJv7 X-Google-Smtp-Source: AOwi7QDhuUfHiwYSvSpMoP+ae2qdghdB0YSSYKQOqCOyHir0LrhXY5NYATLMRRt7gO2ieQuZJMrUDaMXRVhRd3VXPD4= X-Received: by 10.107.185.7 with SMTP id j7mr21841826iof.221.1505259865309; Tue, 12 Sep 2017 16:44:25 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Tue, 12 Sep 2017 16:44:24 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:60a7:d7e6:aef8:c203] In-Reply-To: <201709122342.v8CNgrmL092297@repo.freebsd.org> References: <201709122342.v8CNgrmL092297@repo.freebsd.org> From: Warner Losh Date: Tue, 12 Sep 2017 17:44:24 -0600 X-Google-Sender-Auth: Ve5RzRvqKmAU4xjx-7ZlRO3at34 Message-ID: Subject: Re: svn commit: r323510 - head/sys/conf To: Sean Bruno Cc: 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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 23:44:26 -0000 This is the *WRONG* way to have it build only on 64-bit architectures. Leave it in files. Only build the *MODULE* on 64-bit architectures.... Warner On Tue, Sep 12, 2017 at 5:42 PM, Sean Bruno wrote: > Author: sbruno > Date: Tue Sep 12 23:42:52 2017 > New Revision: 323510 > URL: https://svnweb.freebsd.org/changeset/base/323510 > > Log: > Do not try to build the Cavium Liquidio driver on all architechtures. > > For now, limit to amd64 only. > > Modified: > head/sys/conf/files > > Modified: head/sys/conf/files > ============================================================ > ================== > --- head/sys/conf/files Tue Sep 12 23:36:58 2017 (r323509) > +++ head/sys/conf/files Tue Sep 12 23:42:52 2017 (r323510) > @@ -2216,62 +2216,6 @@ dev/le/if_le_pci.c optional le pci > dev/le/lance.c optional le > dev/led/led.c standard > dev/lge/if_lge.c optional lge > -dev/liquidio/base/cn23xx_pf_device.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_console.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_ctrl.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_device.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_droq.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_mem_ops.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_request_manager.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/base/lio_response_manager.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_core.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_ioctl.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_main.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_rss.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_rxtx.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -dev/liquidio/lio_sysctl.c optional lio \ > - compile-with "${NORMAL_C} \ > - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" > -lio.c optional lio \ > - compile-with "${AWK} -f $S/tools/fw_stub.awk > lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ > - no-implicit-rule before-depend local \ > - clean "lio.c" > -lio_23xx_nic.bin.fw.fwo optional lio \ > - dependency "lio_23xx_nic.bin.fw" \ > - compile-with "${NORMAL_FWO}" \ > - no-implicit-rule \ > - clean "lio_23xx_nic.bin.fw.fwo" > -lio_23xx_nic.bin.fw optional lio \ > - dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ > - compile-with "${NORMAL_FW}" \ > - no-obj no-implicit-rule \ > - clean "lio_23xx_nic.bin.fw" > dev/lmc/if_lmc.c optional lmc > dev/malo/if_malo.c optional malo > dev/malo/if_malohal.c optional malo > > From owner-svn-src-head@freebsd.org Tue Sep 12 23:46:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A43E5E255F2; Tue, 12 Sep 2017 23:46:34 +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 6ED5469591; Tue, 12 Sep 2017 23:46:34 +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 v8CNkXUc092487; Tue, 12 Sep 2017 23:46:33 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CNkX6A092486; Tue, 12 Sep 2017 23:46:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709122346.v8CNkX6A092486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Sep 2017 23:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323511 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 23:46:34 -0000 Author: imp Date: Tue Sep 12 23:46:33 2017 New Revision: 323511 URL: https://svnweb.freebsd.org/changeset/base/323511 Log: cam iosched: Limit the quanta default to hz if it's below 200 The cam_iosched_ticker() can't be scheduled more than once per tick. Some limiters depend on quanta matching the number of calls per second to enforce the proper limits. Limit the quanta to no faster than 1 per clock tick. This fixes some features when running in VMs where the default HZ is 100. PR: 221953 Obtained from: ElectroBSD Differential Revision: https://reviews.freebsd.org/D12337 Submitted by: Fabian Keil Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Tue Sep 12 23:42:52 2017 (r323510) +++ head/sys/cam/cam_iosched.c Tue Sep 12 23:46:33 2017 (r323511) @@ -1022,7 +1022,7 @@ cam_iosched_init(struct cam_iosched_softc **iscp, stru bioq_init(&(*iscp)->write_queue); (*iscp)->read_bias = 100; (*iscp)->current_read_bias = 100; - (*iscp)->quanta = 200; + (*iscp)->quanta = min(hz, 200); cam_iosched_iop_stats_init(*iscp, &(*iscp)->read_stats); cam_iosched_iop_stats_init(*iscp, &(*iscp)->write_stats); cam_iosched_iop_stats_init(*iscp, &(*iscp)->trim_stats); From owner-svn-src-head@freebsd.org Tue Sep 12 23:58:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF093E25EB8; Tue, 12 Sep 2017 23:58:39 +0000 (UTC) (envelope-from sbruno@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 8A97769C86; Tue, 12 Sep 2017 23:58:39 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CNwcSA096914; Tue, 12 Sep 2017 23:58:38 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CNwcPp096912; Tue, 12 Sep 2017 23:58:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201709122358.v8CNwcPp096912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 12 Sep 2017 23:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323512 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Sep 2017 23:58:39 -0000 Author: sbruno Date: Tue Sep 12 23:58:38 2017 New Revision: 323512 URL: https://svnweb.freebsd.org/changeset/base/323512 Log: Leave the Cavium Liquid IO driver exist in files, not files.amd64 Submitted by: imp Modified: head/sys/conf/files head/sys/conf/files.amd64 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 12 23:46:33 2017 (r323511) +++ head/sys/conf/files Tue Sep 12 23:58:38 2017 (r323512) @@ -2216,6 +2216,62 @@ dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge +dev/liquidio/base/cn23xx_pf_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_console.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_ctrl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_device.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_droq.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_mem_ops.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_request_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/base/lio_response_manager.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_core.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_ioctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_main.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rss.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_rxtx.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +dev/liquidio/lio_sysctl.c optional lio \ + compile-with "${NORMAL_C} \ + -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" +lio.c optional lio \ + compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "lio.c" +lio_23xx_nic.bin.fw.fwo optional lio \ + dependency "lio_23xx_nic.bin.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "lio_23xx_nic.bin.fw.fwo" +lio_23xx_nic.bin.fw optional lio \ + dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "lio_23xx_nic.bin.fw" dev/lmc/if_lmc.c optional lmc dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Sep 12 23:46:33 2017 (r323511) +++ head/sys/conf/files.amd64 Tue Sep 12 23:58:38 2017 (r323512) @@ -328,62 +328,6 @@ dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv -dev/liquidio/base/cn23xx_pf_device.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_console.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_ctrl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_device.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_droq.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_mem_ops.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_request_manager.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/base/lio_response_manager.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_core.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_ioctl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_main.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_rss.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_rxtx.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -dev/liquidio/lio_sysctl.c optional lio \ - compile-with "${NORMAL_C} \ - -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" -lio.c optional lio \ - compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ - no-implicit-rule before-depend local \ - clean "lio.c" -lio_23xx_nic.bin.fw.fwo optional lio \ - dependency "lio_23xx_nic.bin.fw" \ - compile-with "${NORMAL_FWO}" \ - no-implicit-rule \ - clean "lio_23xx_nic.bin.fw.fwo" -lio_23xx_nic.bin.fw optional lio \ - dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ - compile-with "${NORMAL_FW}" \ - no-obj no-implicit-rule \ - clean "lio_23xx_nic.bin.fw" dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb From owner-svn-src-head@freebsd.org Wed Sep 13 00:25:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61504E0113C; Wed, 13 Sep 2017 00:25:10 +0000 (UTC) (envelope-from mjoras@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 30E606AAA6; Wed, 13 Sep 2017 00:25:10 +0000 (UTC) (envelope-from mjoras@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D0P9Af008818; Wed, 13 Sep 2017 00:25:09 GMT (envelope-from mjoras@FreeBSD.org) Received: (from mjoras@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D0P9tp008817; Wed, 13 Sep 2017 00:25:09 GMT (envelope-from mjoras@FreeBSD.org) Message-Id: <201709130025.v8D0P9tp008817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjoras set sender to mjoras@FreeBSD.org using -f From: Matt Joras Date: Wed, 13 Sep 2017 00:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323513 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mjoras X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 00:25:10 -0000 Author: mjoras Date: Wed Sep 13 00:25:09 2017 New Revision: 323513 URL: https://svnweb.freebsd.org/changeset/base/323513 Log: Allow vlan interfaces to rx through netmap(4). Normally after receiving a packet, a vlan(4) interface sends the packet back through its parent interface's rx routine so that it can be processed as an untagged frame. It does this by using the parent's ifp->if_input. This is incompatible with netmap(4), which replaces the vlan(4) interface's if_input with a netmap(4) hook. Fix this by using the vlan(4) interface's ifp instead of the parent's directly. Reported by: Harry Schmalzbauer Reviewed by: rstone Approved by: rstone (mentor) MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12191 Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Tue Sep 12 23:58:38 2017 (r323512) +++ head/sys/net/if_vlan.c Wed Sep 13 00:25:09 2017 (r323513) @@ -1384,7 +1384,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) VLAN_RUNLOCK(); /* Pass it back through the parent's input routine. */ - (*ifp->if_input)(ifv->ifv_ifp, m); + (*ifv->ifv_ifp->if_input)(ifv->ifv_ifp, m); } static void From owner-svn-src-head@freebsd.org Wed Sep 13 00:37:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 742D7E01A29; Wed, 13 Sep 2017 00:37:43 +0000 (UTC) (envelope-from np@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 439276B190; Wed, 13 Sep 2017 00:37:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D0bgLs013104; Wed, 13 Sep 2017 00:37:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D0bgPw013103; Wed, 13 Sep 2017 00:37:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201709130037.v8D0bgPw013103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 13 Sep 2017 00:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323514 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 323514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 00:37:43 -0000 Author: np Date: Wed Sep 13 00:37:42 2017 New Revision: 323514 URL: https://svnweb.freebsd.org/changeset/base/323514 Log: cxgbetool(8): mode must be specified when creating the dump file. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Wed Sep 13 00:25:09 2017 (r323513) +++ head/usr.sbin/cxgbetool/cxgbetool.c Wed Sep 13 00:37:42 2017 (r323514) @@ -1896,7 +1896,8 @@ dumpstate(int argc, const char *argv[]) return (EINVAL); } - fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY); + fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY, + S_IRUSR | S_IRGRP); if (fd < 0) { warn("open(%s)", fname); return (errno); From owner-svn-src-head@freebsd.org Wed Sep 13 01:18:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B972AE0352A; Wed, 13 Sep 2017 01:18:44 +0000 (UTC) (envelope-from shurd@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 734FB6C598; Wed, 13 Sep 2017 01:18:44 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D1IhOJ029225; Wed, 13 Sep 2017 01:18:43 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D1IgvB029215; Wed, 13 Sep 2017 01:18:42 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709130118.v8D1IgvB029215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 13 Sep 2017 01:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/sys: dev/bnxt dev/e1000 kern net sys X-SVN-Commit-Revision: 323516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 01:18:44 -0000 Author: shurd Date: Wed Sep 13 01:18:42 2017 New Revision: 323516 URL: https://svnweb.freebsd.org/changeset/base/323516 Log: Roll up iflib commits from github. This pulls in most of the work done by Matt Macy as well as other changes which he has accepted via pull request to his github repo at https://github.com/mattmacy/networking/ This should bring -CURRENT and the github repo into close enough sync to allow small feature branches rather than a large chain of interdependant patches being developed out of tree. The reset of the synchronization should be able to be completed on github by splitting the remaining changes that are not yet ready into short feature branches for later review as smaller commits. Here is a summary of changes included in this patch: 1) More checks when INVARIANTS are enabled for eariler problem detection 2) Group Task Queue cleanups - Fix use of duplicate shortdesc for gtaskqueue malloc type. Some interfaces such as memguard(9) use the short description to identify malloc types, so duplicates should be avoided. 3) Allow gtaskqueues to use ithreads in addition to taskqueues - In some cases, this can improve performance 4) Better logging when taskqgroup_attach*() fails to set interrupt affinity. 5) Do not start gtaskqueues until they're needed 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY state. This moves the TX to the gtaskq and allows processing to continue faster as well as make TX batching more likely. 7) Add an ift_txd_errata function to struct if_txrx. This allows drivers to inspect/modify mbufs before transmission. 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need checksums zeroed for checksum offload to work. This avoids modifying packet data in the TX path when possible. 9) Use ithreads for iflib I/O instead of taskqueues 10) Clean up ioctl and support async ioctl functions 11) Prefetch two cachlines from each mbuf instead of one up to 128B. We often need to parse packet header info beyond 64B. 12) Fix potential memory corruption due to fence post error in bit_nclear() usage. 13) Improved hang detection and handling 14) If the packet is smaller than MTU, disable the TSO flags. This avoids extra packet parsing when not needed. 15) Move TCP header parsing inside the IS_TSO?() test. This avoids extra packet parsing when not needed. 16) Pass chains of mbufs that are not consumed by lro to if_input() rather call if_input() for each mbuf. 17) Re-arrange packet header loads to get as much work as possible done before a cache stall. 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/ IFDI_DETACH(); 19) Attempt to distribute RX/TX tasks across cores more sensibly, especially when RX and TX share an interrupt. RX will attempt to take the first threads on a core, and TX will attempt to take successive threads. 20) Allow iflib_softirq_alloc_generic() to request affinity to the same cpus an interrupt has affinity with. This allows TX queues to ensure they are serviced by the socket the device is on. 21) Add new iflib sysctls to net.iflib: - timer_int - interval at which to run per-queue timers in ticks - force_busdma 22) Add new per-device iflib sysctls to dev.X.Y.iflib - rx_budget allows tuning the batch size on the RX path - watchdog_events Count of watchdog events seen since load 23) Fix error where netmap_rxq_init() could get called before IFDI_INIT() 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY when waiting for firmware - After interrupts are enabled, convert all waits to sleeps - Eliminates e1000 software/firmware synchronization busy waits after startup 25) e1000: Remove special case for budget=1 in em_txrx.c - Premature optimization which may actually be incorrect with multi-segment packets 26) e1000: Split out TX interrupt rather than share an interrupt for RX and TX. - Allows better performance by keeping RX and TX paths separate 27) e1000: Separate igb from em code where suitable Much easier to understand separate functions and "if (is_igb)" than previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))" #blamebruno Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12235 Modified: head/sys/dev/bnxt/if_bnxt.c head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_i210.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/em_txrx.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c head/sys/net/iflib.h head/sys/net/mp_ring.c head/sys/sys/gtaskqueue.h Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/bnxt/if_bnxt.c Wed Sep 13 01:18:42 2017 (r323516) @@ -1640,7 +1640,8 @@ bnxt_msix_intr_assign(if_ctx_t ctx, int msix) } for (i=0; iscctx->isc_ntxqsets; i++) - iflib_softirq_alloc_generic(ctx, i + 1, IFLIB_INTR_TX, NULL, i, + /* TODO: Benchmark and see if tying to the RX irqs helps */ + iflib_softirq_alloc_generic(ctx, -1, IFLIB_INTR_TX, NULL, i, "tx_cp"); return rc; Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_80003es2lan.c Wed Sep 13 01:18:42 2017 (r323516) @@ -59,7 +59,6 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw); static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw); static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw); -static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex); static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw); static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw); @@ -68,7 +67,6 @@ static s32 e1000_read_kmrn_reg_80003es2lan(struct e10 static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); -static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); @@ -299,7 +297,7 @@ static s32 e1000_acquire_phy_80003es2lan(struct e1000_ DEBUGFUNC("e1000_acquire_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - return e1000_acquire_swfw_sync_80003es2lan(hw, mask); + return e1000_acquire_swfw_sync(hw, mask); } /** @@ -315,7 +313,7 @@ static void e1000_release_phy_80003es2lan(struct e1000 DEBUGFUNC("e1000_release_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - e1000_release_swfw_sync_80003es2lan(hw, mask); + e1000_release_swfw_sync(hw, mask); } /** @@ -333,7 +331,7 @@ static s32 e1000_acquire_mac_csr_80003es2lan(struct e1 mask = E1000_SWFW_CSR_SM; - return e1000_acquire_swfw_sync_80003es2lan(hw, mask); + return e1000_acquire_swfw_sync(hw, mask); } /** @@ -350,7 +348,7 @@ static void e1000_release_mac_csr_80003es2lan(struct e mask = E1000_SWFW_CSR_SM; - e1000_release_swfw_sync_80003es2lan(hw, mask); + e1000_release_swfw_sync(hw, mask); } /** @@ -365,14 +363,14 @@ static s32 e1000_acquire_nvm_80003es2lan(struct e1000_ DEBUGFUNC("e1000_acquire_nvm_80003es2lan"); - ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); if (ret_val) return ret_val; ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) - e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); return ret_val; } @@ -388,78 +386,7 @@ static void e1000_release_nvm_80003es2lan(struct e1000 DEBUGFUNC("e1000_release_nvm_80003es2lan"); e1000_release_nvm_generic(hw); - e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); -} - -/** - * e1000_acquire_swfw_sync_80003es2lan - Acquire SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Acquire the SW/FW semaphore to access the PHY or NVM. The mask - * will also specify which port we're acquiring the lock for. - **/ -static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - u32 swmask = mask; - u32 fwmask = mask << 16; - s32 i = 0; - s32 timeout = 50; - - DEBUGFUNC("e1000_acquire_swfw_sync_80003es2lan"); - - while (i < timeout) { - if (e1000_get_hw_semaphore_generic(hw)) - return -E1000_ERR_SWFW_SYNC; - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - if (!(swfw_sync & (fwmask | swmask))) - break; - - /* Firmware currently using resource (fwmask) - * or other software thread using resource (swmask) - */ - e1000_put_hw_semaphore_generic(hw); - msec_delay_irq(5); - i++; - } - - if (i == timeout) { - DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); - return -E1000_ERR_SWFW_SYNC; - } - - swfw_sync |= swmask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); - - return E1000_SUCCESS; -} - -/** - * e1000_release_swfw_sync_80003es2lan - Release SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Release the SW/FW semaphore used to access the PHY or NVM. The mask - * will also specify which port we're releasing the lock for. - **/ -static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - - DEBUGFUNC("e1000_release_swfw_sync_80003es2lan"); - - while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) - ; /* Empty */ - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - swfw_sync &= ~mask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); + e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); } /** Modified: head/sys/dev/e1000/e1000_82571.c ============================================================================== --- head/sys/dev/e1000/e1000_82571.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_82571.c Wed Sep 13 01:18:42 2017 (r323516) @@ -70,11 +70,8 @@ static s32 e1000_check_for_serdes_link_82571(struct e static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw); static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data); static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw); -static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw); static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); -static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); -static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, @@ -125,8 +122,8 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw phy->ops.get_cable_length = e1000_get_cable_length_igp_2; phy->ops.read_reg = e1000_read_phy_reg_igp; phy->ops.write_reg = e1000_write_phy_reg_igp; - phy->ops.acquire = e1000_get_hw_semaphore_82571; - phy->ops.release = e1000_put_hw_semaphore_82571; + phy->ops.acquire = e1000_get_hw_semaphore; + phy->ops.release = e1000_put_hw_semaphore; break; case e1000_82573: phy->type = e1000_phy_m88; @@ -138,12 +135,11 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw phy->ops.get_cable_length = e1000_get_cable_length_m88; phy->ops.read_reg = e1000_read_phy_reg_m88; phy->ops.write_reg = e1000_write_phy_reg_m88; - phy->ops.acquire = e1000_get_hw_semaphore_82571; - phy->ops.release = e1000_put_hw_semaphore_82571; + phy->ops.acquire = e1000_get_hw_semaphore; + phy->ops.release = e1000_put_hw_semaphore; break; case e1000_82574: case e1000_82583: - E1000_MUTEX_INIT(&hw->dev_spec._82571.swflag_mutex); phy->type = e1000_phy_bm; phy->ops.get_cfg_done = e1000_get_cfg_done_generic; @@ -506,99 +502,21 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) } /** - * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore + * e1000_get_hw_semaphore_82574 - Acquire hardware semaphore * @hw: pointer to the HW structure * - * Acquire the HW semaphore to access the PHY or NVM - **/ -static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) -{ - u32 swsm; - s32 sw_timeout = hw->nvm.word_size + 1; - s32 fw_timeout = hw->nvm.word_size + 1; - s32 i = 0; - - DEBUGFUNC("e1000_get_hw_semaphore_82571"); - - /* If we have timedout 3 times on trying to acquire - * the inter-port SMBI semaphore, there is old code - * operating on the other port, and it is not - * releasing SMBI. Modify the number of times that - * we try for the semaphore to interwork with this - * older code. - */ - if (hw->dev_spec._82571.smb_counter > 2) - sw_timeout = 1; - - /* Get the SW semaphore */ - while (i < sw_timeout) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - i++; - } - - if (i == sw_timeout) { - DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); - hw->dev_spec._82571.smb_counter++; - } - /* Get the FW semaphore. */ - for (i = 0; i < fw_timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); - - /* Semaphore acquired if bit latched */ - if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) - break; - - usec_delay(50); - } - - if (i == fw_timeout) { - /* Release semaphores */ - e1000_put_hw_semaphore_82571(hw); - DEBUGOUT("Driver can't access the NVM\n"); - return -E1000_ERR_NVM; - } - - return E1000_SUCCESS; -} - -/** - * e1000_put_hw_semaphore_82571 - Release hardware semaphore - * @hw: pointer to the HW structure - * - * Release hardware semaphore used to access the PHY or NVM - **/ -static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw) -{ - u32 swsm; - - DEBUGFUNC("e1000_put_hw_semaphore_generic"); - - swsm = E1000_READ_REG(hw, E1000_SWSM); - - swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); - - E1000_WRITE_REG(hw, E1000_SWSM, swsm); -} - -/** - * e1000_get_hw_semaphore_82573 - Acquire hardware semaphore - * @hw: pointer to the HW structure - * * Acquire the HW semaphore during reset. * **/ -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) +static s32 +e1000_get_hw_semaphore_82574(struct e1000_hw *hw) { u32 extcnf_ctrl; s32 i = 0; - + /* XXX assert that mutex is held */ DEBUGFUNC("e1000_get_hw_semaphore_82573"); + ASSERT_CTX_LOCK_HELD(hw); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); do { extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; @@ -614,7 +532,7 @@ static s32 e1000_get_hw_semaphore_82573(struct e1000_h if (i == MDIO_OWNERSHIP_TIMEOUT) { /* Release semaphores */ - e1000_put_hw_semaphore_82573(hw); + e1000_put_hw_semaphore_82574(hw); DEBUGOUT("Driver can't access the PHY\n"); return -E1000_ERR_PHY; } @@ -623,17 +541,18 @@ static s32 e1000_get_hw_semaphore_82573(struct e1000_h } /** - * e1000_put_hw_semaphore_82573 - Release hardware semaphore + * e1000_put_hw_semaphore_82574 - Release hardware semaphore * @hw: pointer to the HW structure * * Release hardware semaphore used during reset. * **/ -static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw) +static void +e1000_put_hw_semaphore_82574(struct e1000_hw *hw) { u32 extcnf_ctrl; - DEBUGFUNC("e1000_put_hw_semaphore_82573"); + DEBUGFUNC("e1000_put_hw_semaphore_82574"); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); extcnf_ctrl &= ~E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; @@ -641,41 +560,6 @@ static void e1000_put_hw_semaphore_82573(struct e1000_ } /** - * e1000_get_hw_semaphore_82574 - Acquire hardware semaphore - * @hw: pointer to the HW structure - * - * Acquire the HW semaphore to access the PHY or NVM. - * - **/ -static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw) -{ - s32 ret_val; - - DEBUGFUNC("e1000_get_hw_semaphore_82574"); - - E1000_MUTEX_LOCK(&hw->dev_spec._82571.swflag_mutex); - ret_val = e1000_get_hw_semaphore_82573(hw); - if (ret_val) - E1000_MUTEX_UNLOCK(&hw->dev_spec._82571.swflag_mutex); - return ret_val; -} - -/** - * e1000_put_hw_semaphore_82574 - Release hardware semaphore - * @hw: pointer to the HW structure - * - * Release hardware semaphore used to access the PHY or NVM - * - **/ -static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw) -{ - DEBUGFUNC("e1000_put_hw_semaphore_82574"); - - e1000_put_hw_semaphore_82573(hw); - E1000_MUTEX_UNLOCK(&hw->dev_spec._82571.swflag_mutex); -} - -/** * e1000_set_d0_lplu_state_82574 - Set Low Power Linkup D0 state * @hw: pointer to the HW structure * @active: TRUE to enable LPLU, FALSE to disable @@ -746,7 +630,7 @@ static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw DEBUGFUNC("e1000_acquire_nvm_82571"); - ret_val = e1000_get_hw_semaphore_82571(hw); + ret_val = e1000_get_hw_semaphore(hw); if (ret_val) return ret_val; @@ -759,7 +643,7 @@ static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw } if (ret_val) - e1000_put_hw_semaphore_82571(hw); + e1000_put_hw_semaphore(hw); return ret_val; } @@ -775,7 +659,7 @@ static void e1000_release_nvm_82571(struct e1000_hw *h DEBUGFUNC("e1000_release_nvm_82571"); e1000_release_nvm_generic(hw); - e1000_put_hw_semaphore_82571(hw); + e1000_put_hw_semaphore(hw); } /** @@ -1092,8 +976,6 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) */ switch (hw->mac.type) { case e1000_82573: - ret_val = e1000_get_hw_semaphore_82573(hw); - break; case e1000_82574: case e1000_82583: ret_val = e1000_get_hw_semaphore_82574(hw); @@ -1110,10 +992,6 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) /* Must release MDIO ownership and mutex after MAC reset. */ switch (hw->mac.type) { case e1000_82573: - /* Release mutex only if the hw semaphore is acquired */ - if (!ret_val) - e1000_put_hw_semaphore_82573(hw); - break; case e1000_82574: case e1000_82583: /* Release mutex only if the hw semaphore is acquired */ @@ -1121,6 +999,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) e1000_put_hw_semaphore_82574(hw); break; default: + panic("unknown mac type %x\n", hw->mac.type); break; } Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_82575.c Wed Sep 13 01:18:42 2017 (r323516) @@ -79,11 +79,9 @@ static s32 e1000_valid_led_default_82575(struct e1000 static s32 e1000_write_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset, u16 data); static void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw); -static s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask); static s32 e1000_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw, u16 *speed, u16 *duplex); static s32 e1000_get_phy_id_82575(struct e1000_hw *hw); -static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask); static bool e1000_sgmii_active_82575(struct e1000_hw *hw); static s32 e1000_reset_init_script_82575(struct e1000_hw *hw); static s32 e1000_read_mac_addr_82575(struct e1000_hw *hw); @@ -511,12 +509,8 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw /* link info */ mac->ops.get_link_up_info = e1000_get_link_up_info_82575; /* acquire SW_FW sync */ - mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_82575; - mac->ops.release_swfw_sync = e1000_release_swfw_sync_82575; - if (mac->type >= e1000_i210) { - mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_i210; - mac->ops.release_swfw_sync = e1000_release_swfw_sync_i210; - } + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync; + mac->ops.release_swfw_sync = e1000_release_swfw_sync; /* set lan id for port to determine which phy lock to use */ hw->mac.ops.set_lan_id(hw); @@ -988,7 +982,7 @@ static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw DEBUGFUNC("e1000_acquire_nvm_82575"); - ret_val = e1000_acquire_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); if (ret_val) goto out; @@ -1019,7 +1013,7 @@ static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) - e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); out: return ret_val; @@ -1038,83 +1032,7 @@ static void e1000_release_nvm_82575(struct e1000_hw *h e1000_release_nvm_generic(hw); - e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); -} - -/** - * e1000_acquire_swfw_sync_82575 - Acquire SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Acquire the SW/FW semaphore to access the PHY or NVM. The mask - * will also specify which port we're acquiring the lock for. - **/ -static s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - u32 swmask = mask; - u32 fwmask = mask << 16; - s32 ret_val = E1000_SUCCESS; - s32 i = 0, timeout = 200; - - DEBUGFUNC("e1000_acquire_swfw_sync_82575"); - - while (i < timeout) { - if (e1000_get_hw_semaphore_generic(hw)) { - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - if (!(swfw_sync & (fwmask | swmask))) - break; - - /* - * Firmware currently using resource (fwmask) - * or other software thread using resource (swmask) - */ - e1000_put_hw_semaphore_generic(hw); - msec_delay_irq(5); - i++; - } - - if (i == timeout) { - DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } - - swfw_sync |= swmask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); - -out: - return ret_val; -} - -/** - * e1000_release_swfw_sync_82575 - Release SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Release the SW/FW semaphore used to access the PHY or NVM. The mask - * will also specify which port we're releasing the lock for. - **/ -static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - - DEBUGFUNC("e1000_release_swfw_sync_82575"); - - while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) - ; /* Empty */ - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - swfw_sync &= ~mask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); + e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); } /** Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_hw.h Wed Sep 13 01:18:42 2017 (r323516) @@ -934,7 +934,6 @@ struct e1000_dev_spec_82543 { struct e1000_dev_spec_82571 { bool laa_is_present; u32 smb_counter; - E1000_MUTEX swflag_mutex; }; struct e1000_dev_spec_80003es2lan { @@ -958,8 +957,6 @@ enum e1000_ulp_state { struct e1000_dev_spec_ich8lan { bool kmrn_lock_loss_workaround_enabled; struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS]; - E1000_MUTEX nvm_mutex; - E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; bool disable_k1_off; bool eee_disable; Modified: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- head/sys/dev/e1000/e1000_i210.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_i210.c Wed Sep 13 01:18:42 2017 (r323516) @@ -37,7 +37,6 @@ static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw); static void e1000_release_nvm_i210(struct e1000_hw *hw); -static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw); static s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); static s32 e1000_pool_flash_update_done_i210(struct e1000_hw *hw); @@ -58,7 +57,7 @@ static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw) DEBUGFUNC("e1000_acquire_nvm_i210"); - ret_val = e1000_acquire_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); return ret_val; } @@ -74,152 +73,7 @@ static void e1000_release_nvm_i210(struct e1000_hw *hw { DEBUGFUNC("e1000_release_nvm_i210"); - e1000_release_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); -} - -/** - * e1000_acquire_swfw_sync_i210 - Acquire SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Acquire the SW/FW semaphore to access the PHY or NVM. The mask - * will also specify which port we're acquiring the lock for. - **/ -s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - u32 swmask = mask; - u32 fwmask = mask << 16; - s32 ret_val = E1000_SUCCESS; - s32 i = 0, timeout = 200; /* FIXME: find real value to use here */ - - DEBUGFUNC("e1000_acquire_swfw_sync_i210"); - - while (i < timeout) { - if (e1000_get_hw_semaphore_i210(hw)) { - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - if (!(swfw_sync & (fwmask | swmask))) - break; - - /* - * Firmware currently using resource (fwmask) - * or other software thread using resource (swmask) - */ - e1000_put_hw_semaphore_generic(hw); - msec_delay_irq(5); - i++; - } - - if (i == timeout) { - DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } - - swfw_sync |= swmask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); - -out: - return ret_val; -} - -/** - * e1000_release_swfw_sync_i210 - Release SW/FW semaphore - * @hw: pointer to the HW structure - * @mask: specifies which semaphore to acquire - * - * Release the SW/FW semaphore used to access the PHY or NVM. The mask - * will also specify which port we're releasing the lock for. - **/ -void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask) -{ - u32 swfw_sync; - - DEBUGFUNC("e1000_release_swfw_sync_i210"); - - while (e1000_get_hw_semaphore_i210(hw) != E1000_SUCCESS) - ; /* Empty */ - - swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); - swfw_sync &= ~mask; - E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - - e1000_put_hw_semaphore_generic(hw); -} - -/** - * e1000_get_hw_semaphore_i210 - Acquire hardware semaphore - * @hw: pointer to the HW structure - * - * Acquire the HW semaphore to access the PHY or NVM - **/ -static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw) -{ - u32 swsm; - s32 timeout = hw->nvm.word_size + 1; - s32 i = 0; - - DEBUGFUNC("e1000_get_hw_semaphore_i210"); - - /* Get the SW semaphore */ - while (i < timeout) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - i++; - } - - if (i == timeout) { - /* In rare circumstances, the SW semaphore may already be held - * unintentionally. Clear the semaphore once before giving up. - */ - if (hw->dev_spec._82575.clear_semaphore_once) { - hw->dev_spec._82575.clear_semaphore_once = FALSE; - e1000_put_hw_semaphore_generic(hw); - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - } - } - - /* If we do not have the semaphore here, we have to give up. */ - if (i == timeout) { - DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); - return -E1000_ERR_NVM; - } - } - - /* Get the FW semaphore. */ - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); - - /* Semaphore acquired if bit latched */ - if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) - break; - - usec_delay(50); - } - - if (i == timeout) { - /* Release semaphores */ - e1000_put_hw_semaphore_generic(hw); - DEBUGOUT("Driver can't access the NVM\n"); - return -E1000_ERR_NVM; - } - - return E1000_SUCCESS; + e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); } /** Modified: head/sys/dev/e1000/e1000_i210.h ============================================================================== --- head/sys/dev/e1000/e1000_i210.h Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_i210.h Wed Sep 13 01:18:42 2017 (r323516) @@ -43,8 +43,6 @@ s32 e1000_write_nvm_srwr_i210(struct e1000_hw *hw, u16 u16 words, u16 *data); s32 e1000_read_nvm_srrd_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); -s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask); -void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask); s32 e1000_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 *data); s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_ich8lan.c Wed Sep 13 01:18:42 2017 (r323516) @@ -694,9 +694,6 @@ static s32 e1000_init_nvm_params_ich8lan(struct e1000_ dev_spec->shadow_ram[i].value = 0xFFFF; } - E1000_MUTEX_INIT(&dev_spec->nvm_mutex); - E1000_MUTEX_INIT(&dev_spec->swflag_mutex); - /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; @@ -1847,7 +1844,7 @@ static s32 e1000_acquire_nvm_ich8lan(struct e1000_hw * { DEBUGFUNC("e1000_acquire_nvm_ich8lan"); - E1000_MUTEX_LOCK(&hw->dev_spec.ich8lan.nvm_mutex); + ASSERT_CTX_LOCK_HELD(hw); return E1000_SUCCESS; } @@ -1862,9 +1859,7 @@ static void e1000_release_nvm_ich8lan(struct e1000_hw { DEBUGFUNC("e1000_release_nvm_ich8lan"); - E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.nvm_mutex); - - return; + ASSERT_CTX_LOCK_HELD(hw); } /** @@ -1881,7 +1876,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_h DEBUGFUNC("e1000_acquire_swflag_ich8lan"); - E1000_MUTEX_LOCK(&hw->dev_spec.ich8lan.swflag_mutex); + ASSERT_CTX_LOCK_HELD(hw); while (timeout) { extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); @@ -1922,9 +1917,6 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_h } out: - if (ret_val) - E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); - return ret_val; } @@ -1949,10 +1941,6 @@ static void e1000_release_swflag_ich8lan(struct e1000_ } else { DEBUGOUT("Semaphore unexpectedly released by sw/fw/hw\n"); } - - E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); - - return; } /** @@ -5022,8 +5010,6 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) E1000_WRITE_REG(hw, E1000_FEXTNVM3, reg); } - if (!ret_val) - E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); if (ctrl & E1000_CTRL_PHY_RST) { ret_val = hw->phy.ops.get_cfg_done(hw); Modified: head/sys/dev/e1000/e1000_mac.c ============================================================================== --- head/sys/dev/e1000/e1000_mac.c Wed Sep 13 00:51:36 2017 (r323515) +++ head/sys/dev/e1000/e1000_mac.c Wed Sep 13 01:18:42 2017 (r323516) @@ -1707,76 +1707,6 @@ s32 e1000_get_speed_and_duplex_fiber_serdes_generic(st } /** - * e1000_get_hw_semaphore_generic - Acquire hardware semaphore - * @hw: pointer to the HW structure - * - * Acquire the HW semaphore to access the PHY or NVM - **/ -s32 e1000_get_hw_semaphore_generic(struct e1000_hw *hw) -{ - u32 swsm; - s32 timeout = hw->nvm.word_size + 1; - s32 i = 0; - - DEBUGFUNC("e1000_get_hw_semaphore_generic"); - - /* Get the SW semaphore */ - while (i < timeout) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - i++; - } - - if (i == timeout) { - DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); - return -E1000_ERR_NVM; - } - - /* Get the FW semaphore. */ - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); - - /* Semaphore acquired if bit latched */ - if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) - break; - - usec_delay(50); - } - - if (i == timeout) { - /* Release semaphores */ - e1000_put_hw_semaphore_generic(hw); - DEBUGOUT("Driver can't access the NVM\n"); - return -E1000_ERR_NVM; - } - - return E1000_SUCCESS; -} - -/** - * e1000_put_hw_semaphore_generic - Release hardware semaphore - * @hw: pointer to the HW structure - * - * Release hardware semaphore used to access the PHY or NVM - **/ -void e1000_put_hw_semaphore_generic(struct e1000_hw *hw) -{ - u32 swsm; - - DEBUGFUNC("e1000_put_hw_semaphore_generic"); - - swsm = E1000_READ_REG(hw, E1000_SWSM); - - swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); - - E1000_WRITE_REG(hw, E1000_SWSM, swsm); -} - -/** * e1000_get_auto_rd_done_generic - Check for auto read completion * @hw: pointer to the HW structure * @@ -2251,3 +2181,186 @@ s32 e1000_write_8bit_ctrl_reg_generic(struct e1000_hw return E1000_SUCCESS; } + +/** + * e1000_get_hw_semaphore - Acquire hardware semaphore + * @hw: pointer to the HW structure + * + * Acquire the HW semaphore to access the PHY or NVM + **/ +s32 e1000_get_hw_semaphore(struct e1000_hw *hw) +{ + u32 swsm; + s32 timeout = hw->nvm.word_size + 1; + s32 i = 0; + + DEBUGFUNC("e1000_get_hw_semaphore"); +#ifdef notyet + /* _82571 */ + /* If we have timedout 3 times on trying to acquire + * the inter-port SMBI semaphore, there is old code + * operating on the other port, and it is not + * releasing SMBI. Modify the number of times that + * we try for the semaphore to interwork with this + * older code. + */ + if (hw->dev_spec._82571.smb_counter > 2) + sw_timeout = 1; + +#endif + /* Get the SW semaphore */ + while (i < timeout) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + i++; + } + + if (i == timeout) { +#ifdef notyet + /* + * XXX This sounds more like a driver bug whereby we either + * recursed accidentally or missed clearing it previously + */ + /* In rare circumstances, the SW semaphore may already be held + * unintentionally. Clear the semaphore once before giving up. + */ + if (hw->dev_spec._82575.clear_semaphore_once) { + hw->dev_spec._82575.clear_semaphore_once = FALSE; + e1000_put_hw_semaphore_generic(hw); + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + } + } +#endif + + DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); + return -E1000_ERR_NVM; + } + + /* Get the FW semaphore. */ + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); + + /* Semaphore acquired if bit latched */ + if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) + break; + + usec_delay(50); + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Sep 13 01:55:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC153E04E03; Wed, 13 Sep 2017 01:55:04 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) (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 7CAEF6D823; Wed, 13 Sep 2017 01:55:04 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f53.google.com with SMTP id i130so17329273pgc.3; Tue, 12 Sep 2017 18:55:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3YNUYXbfTsnTcV9XciyK/qL9OggbbYQ6oGu9HkVVzD4=; b=eodRKGCPlglcmBBCWANhLCOD2wZku7Q2ve6gZrt45EKpeEfLl1AKFmEqY0XcbjJAVK aotnhubGRMOZeT0Za0NI+pfgN4AboakcZt3V2FJUGIRox1eraSm+5FTBYWkniWYMEsE6 kcMORYit8Pn27+gtUZjak9E53ObgeG0oH/8fKm30S8nYEAohkcLNn9uoosKRkIaiTshs EXQopnV9bnqQU5cuFYej4l+rWdyrzNDUKviuybW4mJ3tzmT/lqEZUygCsdVAGRP75Gnk gSvXxqH7c0kugYNUlY40E9D12y3Za2lPuKWrxK0tvBW57Jz7btLCg3P6cAo1F2PYOKch mcgg== X-Gm-Message-State: AHPjjUhaKx4zIO0ePpyBCK/oYB4VdHYTOmNqqk9Wz1E0ZKi1VfJOb4Kz sDT0fZNqdys0UrtAptxMLA== X-Received: by 10.101.68.130 with SMTP id l2mr16417937pgq.346.1505267264270; Tue, 12 Sep 2017 18:47:44 -0700 (PDT) Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com. [74.125.83.45]) by smtp.gmail.com with ESMTPSA id l85sm23819306pfb.176.2017.09.12.18.47.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 18:47:43 -0700 (PDT) Received: by mail-pg0-f45.google.com with SMTP id 188so24571655pgb.2; Tue, 12 Sep 2017 18:47:43 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6ZOmLSEXzdB2hvHH1LYA/chmdFXsJBIrLJ3W5uqmoKt4I7i5hJtLuaJV673DkNvGmF5klgrY5oe0JNOKTExzc= X-Received: by 10.84.133.35 with SMTP id 32mr18778987plf.249.1505267263009; Tue, 12 Sep 2017 18:47:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Tue, 12 Sep 2017 18:47:42 -0700 (PDT) In-Reply-To: <201709130118.v8D1IgvB029215@repo.freebsd.org> References: <201709130118.v8D1IgvB029215@repo.freebsd.org> From: Ryan Libby Date: Tue, 12 Sep 2017 18:47:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys To: Stephen Hurd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Sean Bruno Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 01:55:04 -0000 On Tue, Sep 12, 2017 at 6:18 PM, Stephen Hurd wrote: > Author: shurd > Date: Wed Sep 13 01:18:42 2017 > New Revision: 323516 > URL: https://svnweb.freebsd.org/changeset/base/323516 > > Log: > Roll up iflib commits from github. This pulls in most of the work done > by Matt Macy as well as other changes which he has accepted via pull > request to his github repo at https://github.com/mattmacy/networking/ > > This should bring -CURRENT and the github repo into close enough sync to > allow small feature branches rather than a large chain of interdependant > patches being developed out of tree. The reset of the synchronization > should be able to be completed on github by splitting the remaining > changes that are not yet ready into short feature branches for later > review as smaller commits. > > Here is a summary of changes included in this patch: > > 1) More checks when INVARIANTS are enabled for eariler problem > detection > 2) Group Task Queue cleanups > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > Some interfaces such as memguard(9) use the short description to > identify malloc types, so duplicates should be avoided. > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > - In some cases, this can improve performance > 4) Better logging when taskqgroup_attach*() fails to set interrupt > affinity. > 5) Do not start gtaskqueues until they're needed > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > state. This moves the TX to the gtaskq and allows processing to > continue faster as well as make TX batching more likely. > 7) Add an ift_txd_errata function to struct if_txrx. This allows > drivers to inspect/modify mbufs before transmission. > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > checksums zeroed for checksum offload to work. This avoids modifying > packet data in the TX path when possible. > 9) Use ithreads for iflib I/O instead of taskqueues > 10) Clean up ioctl and support async ioctl functions > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. We > often need to parse packet header info beyond 64B. > 12) Fix potential memory corruption due to fence post error in > bit_nclear() usage. > 13) Improved hang detection and handling > 14) If the packet is smaller than MTU, disable the TSO flags. > This avoids extra packet parsing when not needed. > 15) Move TCP header parsing inside the IS_TSO?() test. > This avoids extra packet parsing when not needed. > 16) Pass chains of mbufs that are not consumed by lro to if_input() > rather call if_input() for each mbuf. > 17) Re-arrange packet header loads to get as much work as possible done > before a cache stall. > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/ > IFDI_DETACH(); > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > especially when RX and TX share an interrupt. RX will attempt to > take the first threads on a core, and TX will attempt to take > successive threads. > 20) Allow iflib_softirq_alloc_generic() to request affinity to the same > cpus an interrupt has affinity with. This allows TX queues to > ensure they are serviced by the socket the device is on. > 21) Add new iflib sysctls to net.iflib: > - timer_int - interval at which to run per-queue timers in ticks > - force_busdma > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > - rx_budget allows tuning the batch size on the RX path > - watchdog_events Count of watchdog events seen since load > 23) Fix error where netmap_rxq_init() could get called before > IFDI_INIT() > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > when waiting for firmware > - After interrupts are enabled, convert all waits to sleeps > - Eliminates e1000 software/firmware synchronization busy waits after > startup > 25) e1000: Remove special case for budget=1 in em_txrx.c > - Premature optimization which may actually be incorrect with > multi-segment packets > 26) e1000: Split out TX interrupt rather than share an interrupt for > RX and TX. > - Allows better performance by keeping RX and TX paths separate > 27) e1000: Separate igb from em code where suitable > Much easier to understand separate functions and "if (is_igb)" than > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))" > > #blamebruno > > Reviewed by: sbruno > Approved by: sbruno (mentor) > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D12235 > > Modified: > head/sys/dev/bnxt/if_bnxt.c > head/sys/dev/e1000/e1000_80003es2lan.c > head/sys/dev/e1000/e1000_82571.c > head/sys/dev/e1000/e1000_82575.c > head/sys/dev/e1000/e1000_hw.h > head/sys/dev/e1000/e1000_i210.c > head/sys/dev/e1000/e1000_i210.h > head/sys/dev/e1000/e1000_ich8lan.c > head/sys/dev/e1000/e1000_mac.c > head/sys/dev/e1000/e1000_mac.h > head/sys/dev/e1000/e1000_osdep.h > head/sys/dev/e1000/em_txrx.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_em.h > head/sys/kern/subr_gtaskqueue.c > head/sys/net/iflib.c > head/sys/net/iflib.h > head/sys/net/mp_ring.c > head/sys/sys/gtaskqueue.h This broke gcc builds again, e.g. [1], [2]: > /usr/src/sys/dev/e1000/e1000_osdep.h:81: warning: redundant redeclaration of 'cold' [-Wredundant-decls] > /usr/src/sys/sys/systm.h:50: warning: previous declaration of 'cold' was here sys/dev/e1000/e1000_osdep.h is already including sys/sys/systm.h directly so I think this can just be fixed by deleting extern int cold; from e1000_osdep.h. [1] https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/1104 [2] https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/3039/ From owner-svn-src-head@freebsd.org Wed Sep 13 02:44:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 236D7E06D6D; Wed, 13 Sep 2017 02:44:52 +0000 (UTC) (envelope-from shurd@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 E69186F0EC; Wed, 13 Sep 2017 02:44:51 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D2ioUW066194; Wed, 13 Sep 2017 02:44:50 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D2ioqo066193; Wed, 13 Sep 2017 02:44:50 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709130244.v8D2ioqo066193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 13 Sep 2017 02:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323517 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 323517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 02:44:52 -0000 Author: shurd Date: Wed Sep 13 02:44:50 2017 New Revision: 323517 URL: https://svnweb.freebsd.org/changeset/base/323517 Log: Fix GCC build failure caused by r323516 No need to declare cold when we #include Reported by: Jenkins Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12347 Modified: head/sys/dev/e1000/e1000_osdep.h Modified: head/sys/dev/e1000/e1000_osdep.h ============================================================================== --- head/sys/dev/e1000/e1000_osdep.h Wed Sep 13 01:18:42 2017 (r323516) +++ head/sys/dev/e1000/e1000_osdep.h Wed Sep 13 02:44:50 2017 (r323517) @@ -78,7 +78,6 @@ ms_scale(int x) { return (max(1, x/(1000/hz))); } } -extern int cold; static inline void safe_pause_us(int x) { From owner-svn-src-head@freebsd.org Wed Sep 13 03:56:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4268FE096E1; Wed, 13 Sep 2017 03:56:05 +0000 (UTC) (envelope-from sbruno@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 0D08C711FF; Wed, 13 Sep 2017 03:56:04 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D3u4nH095429; Wed, 13 Sep 2017 03:56:04 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D3u4ve095428; Wed, 13 Sep 2017 03:56:04 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201709130356.v8D3u4ve095428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 13 Sep 2017 03:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323518 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 03:56:05 -0000 Author: sbruno Date: Wed Sep 13 03:56:03 2017 New Revision: 323518 URL: https://svnweb.freebsd.org/changeset/base/323518 Log: Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. ixl(4) isn't in here either, so I'll remove lio(4) too. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Sep 13 02:44:50 2017 (r323517) +++ head/sys/conf/NOTES Wed Sep 13 03:56:03 2017 (r323518) @@ -2144,7 +2144,6 @@ device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ix # Intel Pro/10Gbe PCIE Ethernet device ixv # Intel Pro/10Gbe PCIE Ethernet VF device le # AMD Am7900 LANCE and Am79C9xx PCnet -device lio # Cavium 23XX Ethernet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter device oce # Emulex 10 GbE (OneConnect Ethernet) From owner-svn-src-head@freebsd.org Wed Sep 13 04:32:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34852E0B113; Wed, 13 Sep 2017 04:32:24 +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 03C33721D3; Wed, 13 Sep 2017 04:32:23 +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 v8D4WNZh011580; Wed, 13 Sep 2017 04:32:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D4WNgF011579; Wed, 13 Sep 2017 04:32:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709130432.v8D4WNgF011579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 13 Sep 2017 04:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323519 - head/lib/libefivar X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libefivar X-SVN-Commit-Revision: 323519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 04:32:24 -0000 Author: imp Date: Wed Sep 13 04:32:23 2017 New Revision: 323519 URL: https://svnweb.freebsd.org/changeset/base/323519 Log: Minor fixes to edge cases in efi_get_next_variable_name Fix allocating more memory for the names (unlikely to be needed, but still best to get right) to ask for the length the kernel told use we needed, not the old length of the variable. Mind the proper NUL that we add in the space we allocate. Free the old name string before we allcoate a new one to limit what we leak to the last one (free passed in name for the last one in the list), and detect the last one by rv != 0 and errno == ENOENT, rather then just the former to avoid false positives if errno happens to be ENOENT on entry. Sponsored by: Netflix Modified: head/lib/libefivar/efivar.c Modified: head/lib/libefivar/efivar.c ============================================================================== --- head/lib/libefivar/efivar.c Wed Sep 13 03:56:03 2017 (r323518) +++ head/lib/libefivar/efivar.c Wed Sep 13 04:32:23 2017 (r323519) @@ -225,8 +225,13 @@ efi_get_next_variable_name(efi_guid_t **guid, char **n if (efi_open_dev() == -1) return -1; + /* + * Always allocate enough for an extra NUL on the end, but don't tell + * the IOCTL about it so we can NUL terminate the name before converting + * it to UTF8. + */ if (buf == NULL) - buf = malloc(buflen); + buf = malloc(buflen + sizeof(efi_char)); again: efi_var_reset(&var); @@ -244,21 +249,23 @@ again: rv = ioctl(efi_fd, EFIIOC_VAR_NEXT, &var); if (rv == 0 && var.name == NULL) { /* - * oops, too little space. Try again. + * Variable name not long enough, so allocate more space for the + * name and try again. As above, mind the NUL we add. */ - void *new = realloc(buf, buflen); - buflen = var.namesize; + void *new = realloc(buf, var.namesize + sizeof(efi_char)); if (new == NULL) { rv = -1; errno = ENOMEM; goto done; } + buflen = var.namesize; buf = new; goto again; } if (rv == 0) { - *name = NULL; /* XXX */ + free(*name); /* Free last name, to avoid leaking */ + *name = NULL; /* Force ucs2_to_utf8 to malloc new space */ var.name[var.namesize / sizeof(efi_char)] = 0; /* EFI doesn't NUL terminate */ rv = ucs2_to_utf8(var.name, name); if (rv != 0) @@ -269,9 +276,11 @@ again: errout: /* XXX The linux interface expects name to be a static buffer -- fix or leak memory? */ + /* XXX for the moment, we free just before we'd leak, but still leak last one */ done: - if (errno == ENOENT) { + if (rv != 0 && errno == ENOENT) { errno = 0; + free(*name); /* Free last name, to avoid leaking */ return 0; } From owner-svn-src-head@freebsd.org Wed Sep 13 06:04:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FCA0E0E6E5; Wed, 13 Sep 2017 06:04:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::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 C983B746A9; Wed, 13 Sep 2017 06:04:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id d16so57579424ioj.3; Tue, 12 Sep 2017 23:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=N/zb9Qr5nGJesAkJmzryCbLMZhKvu4wzOX5JyrzjFG0=; b=jCAXgG9YM63SrxaGhKqzRZTpwrODwHFphqvVjnYpAqU65SZ2+4DokyU+vLMXNjoyDw kc20uV63W2VkT1yjFdpGC6AeriaRvp+D/tJwv3lB7sNzneuZV6Ukmv2MoTKA2E5IElQ9 S8iMKwZmFjmrbRW/LmCiSIjJwU+7EsAxmb6LkagPKK5EgwDPOfE/thqaMaM4FuOQiHBw uuJGeUzUhj6cDDnrHXfHXQymHVFP5Xx9l9m33bBwIE1GpeWxZQsUDrl5HVIvhfqugc6r BxqemlNviD+eL/sgwaESH/Vc3Rgd86CXl8ugDXpRGsnZTaTbjd/FKpUsP19U6ew/dKGN nICQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=N/zb9Qr5nGJesAkJmzryCbLMZhKvu4wzOX5JyrzjFG0=; b=Uhqk3xBAM13IQXG2ZqoaOY51QNuojn2yZLlE/TEKAtZsmVHvFZizuTPf49imzUZWm1 qdnIjX5ZBygYRyv0QIkb1iar0WgQHpMoB5aVx//fpDWB+AzfyPddXSKMxqwfKIJ/tCgg zArpRVfUrJ648PvN6bCQWI33bs2vGoE8o2DH86d1Fwtua6DzIRjEJKXHdOZ0EQLPVZSj v5i26tDn4eCQAdtSmahCwVO5xO7RT4QUzzotkxVzalMzuJ2aUYrT4/MzN8SZmO8LjBrI 6DQ9bQ2KvO6GgZZM3x4eU8X4Kc+pq+BLmtdJCcQ14TTsYXETo1az24QpGwm5OaJHlKoh 4jOg== X-Gm-Message-State: AHPjjUiKPyz2anpmcPmdLAuaf4GSLRk9659Ln3Lne37h3dUUE+jXtmuf Oqc0thHTrVgryn4vFoyeAg== X-Google-Smtp-Source: AOwi7QCOOzaSI4zYWX8CIMu676OEPygQxUUO9E+AzU4nRMXdKOKKwL5O0v0f/4WEKTgaKM43Nawp3A== X-Received: by 10.107.69.1 with SMTP id s1mr27268603ioa.267.1505282677696; Tue, 12 Sep 2017 23:04:37 -0700 (PDT) Received: from ?IPv6:2607:fb90:9dce:72a3:4135:819b:49e7:7507? ([2607:fb90:9dce:72a3:4135:819b:49e7:7507]) by smtp.gmail.com with ESMTPSA id v191sm290235ith.34.2017.09.12.23.04.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 23:04:37 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r323508 - head/usr.sbin/bsdinstall/partedit From: Ngie Cooper X-Mailer: iPhone Mail (14G60) In-Reply-To: <201709122219.v8CMJLtl055785@repo.freebsd.org> Date: Tue, 12 Sep 2017 23:04:34 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201709122219.v8CMJLtl055785@repo.freebsd.org> To: Ravi Pokala X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 06:04:39 -0000 > On Sep 12, 2017, at 15:19, Ravi Pokala wrote: >=20 > Author: rpokala > Date: Tue Sep 12 22:19:21 2017 > New Revision: 323508 > URL: https://svnweb.freebsd.org/changeset/base/323508 >=20 > Log: > When doing a non-interactive installation, don't display an interactive > warning about a filesystem which doesn't have a mountpoint. Presumably, t= he > person who wrote the install script knew what they were doing. This seems very counterintuitive. It should fail citing the error, not p= rompt. This only mutes the prompt. Thanks, -Ngie= From owner-svn-src-head@freebsd.org Wed Sep 13 06:07:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D049BE0E84E; Wed, 13 Sep 2017 06:07:03 +0000 (UTC) (envelope-from np@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 92283748B4; Wed, 13 Sep 2017 06:07:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8D6723q048066; Wed, 13 Sep 2017 06:07:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D672Ib048065; Wed, 13 Sep 2017 06:07:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <201709130607.v8D672Ib048065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 13 Sep 2017 06:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323520 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 323520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 06:07:03 -0000 Author: np Date: Wed Sep 13 06:07:02 2017 New Revision: 323520 URL: https://svnweb.freebsd.org/changeset/base/323520 Log: cxgbe(4): Ignore capabilities that depend on TOE when the firmware reports TOE is not available. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Sep 13 04:32:23 2017 (r323519) +++ head/sys/dev/cxgbe/t4_main.c Wed Sep 13 06:07:02 2017 (r323520) @@ -3576,6 +3576,18 @@ get_params__post_init(struct adapter *sc) READ_CAPS(iscsicaps); READ_CAPS(fcoecaps); + /* + * The firmware attempts memfree TOE configuration for -SO cards and + * will report toecaps=0 if it runs out of resources (this depends on + * the config file). It may not report 0 for other capabilities + * dependent on the TOE in this case. Set them to 0 here so that the + * driver doesn't bother tracking resources that will never be used. + */ + if (sc->toecaps == 0) { + sc->iscsicaps = 0; + sc->rdmacaps = 0; + } + if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) { param[0] = FW_PARAM_PFVF(ETHOFLD_START); param[1] = FW_PARAM_PFVF(ETHOFLD_END); From owner-svn-src-head@freebsd.org Wed Sep 13 06:14:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8D32E0ECD7; Wed, 13 Sep 2017 06:14:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 96F4174E1B; Wed, 13 Sep 2017 06:14:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id v5so7216531pgn.4; Tue, 12 Sep 2017 23:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hO1Dgci4GKz2QHN9AtOEkdwPdNqcbeskPocf7YmL3Lg=; b=DTagQTtKztTj0/cq0WFQ2aksT6ZTFbIvCDAivPC9znZhaSQ7q0fPkt7+id3NIB3M2T XF3ZdYzkc5jF5X9pmzRg/B4SxbtlCGN3ZqDXSqRJs4erXr0tn0qm0rByg66x9sXwnS7G xCSlMyzZYma85m44dvKANV/YfHjegjpRT+Yu4ew9PzvjcRfie6jwFAmnCQEnIlSqRAvb Qlf4y2OYVO0WRJGErAU96+o2DOGQR8CihpT7cv+9aTXzNBNzDjveLPPbyaPkRdpmuf1z W0jCs5qnlbuEjR5cyH7oUMQUJtQGmM4CIYYUeJhPOC7NSnuTLYyf8VpmkrHGUJxotr8x reUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hO1Dgci4GKz2QHN9AtOEkdwPdNqcbeskPocf7YmL3Lg=; b=nCnVm2+InRQlIwaR9h9jS65To1Jz6GTH8MYncn3E4m65r4iYrzT+Kwh6qJAY+/4a+Y bICIdMpMvaBKq6NDNeA+Kz7kZt8KzdMavyjXMYdgHeYoAcbn04HTKfz+8hoiwNkSZx33 +ynJUq5riyQ2MOWm8pOtFtPItUAv/oIqjxyDFkSibXASD9bj733X56uybWaUBIC8/ga3 0OLl+VCn1/lNxfoXjVS7DjhyTNWrJ4DU2chOYB6rYj0K61XJgwIH94WigUJGhDommKtG KEU/GjNEAz5cm/8N8iR3XZRzwFe8Ciq7ly7dl7uer+Mpr1lpuNQSkeGmGVNAMAiXp3AB fofA== X-Gm-Message-State: AHPjjUjClpPkyaVyFPdK/g9ltHkMhh4L38T2WN3uDIkl8rGmrC7oP04e WqNXGx05/z0fhlQ37NBqlQ== X-Google-Smtp-Source: ADKCNb6S/gDpa+qzu1Ap+CSZJyFJi9u3K1lQ1gWAP/8XWT9pQIASxmKw3ZTTg7Ks+EF1avfx/YHpow== X-Received: by 10.99.126.84 with SMTP id o20mr16410090pgn.273.1505283283734; Tue, 12 Sep 2017 23:14:43 -0700 (PDT) Received: from ?IPv6:2607:fb90:9dce:72a3:4135:819b:49e7:7507? ([2607:fb90:9dce:72a3:4135:819b:49e7:7507]) by smtp.gmail.com with ESMTPSA id v25sm22486209pfg.52.2017.09.12.23.14.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 23:14:43 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys From: Ngie Cooper X-Mailer: iPhone Mail (14G60) In-Reply-To: <201709130118.v8D1IgvB029215@repo.freebsd.org> Date: Tue, 12 Sep 2017 23:14:35 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com> References: <201709130118.v8D1IgvB029215@repo.freebsd.org> To: Stephen Hurd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 06:14:44 -0000 > On Sep 12, 2017, at 18:18, Stephen Hurd wrote: > > Author: shurd > Date: Wed Sep 13 01:18:42 2017 > New Revision: 323516 > URL: https://svnweb.freebsd.org/changeset/base/323516 > > Log: > Roll up iflib commits from github. This pulls in most of the work done > by Matt Macy as well as other changes which he has accepted via pull > request to his github repo at https://github.com/mattmacy/networking/ > > This should bring -CURRENT and the github repo into close enough sync to > allow small feature branches rather than a large chain of interdependant > patches being developed out of tree. The reset of the synchronization > should be able to be completed on github by splitting the remaining > changes that are not yet ready into short feature branches for later > review as smaller commits. > > Here is a summary of changes included in this patch: > > 1) More checks when INVARIANTS are enabled for eariler problem > detection > 2) Group Task Queue cleanups > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > Some interfaces such as memguard(9) use the short description to > identify malloc types, so duplicates should be avoided. > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > - In some cases, this can improve performance > 4) Better logging when taskqgroup_attach*() fails to set interrupt > affinity. > 5) Do not start gtaskqueues until they're needed > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > state. This moves the TX to the gtaskq and allows processing to > continue faster as well as make TX batching more likely. > 7) Add an ift_txd_errata function to struct if_txrx. This allows > drivers to inspect/modify mbufs before transmission. > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > checksums zeroed for checksum offload to work. This avoids modifying > packet data in the TX path when possible. > 9) Use ithreads for iflib I/O instead of taskqueues > 10) Clean up ioctl and support async ioctl functions > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. We > often need to parse packet header info beyond 64B. > 12) Fix potential memory corruption due to fence post error in > bit_nclear() usage. > 13) Improved hang detection and handling > 14) If the packet is smaller than MTU, disable the TSO flags. > This avoids extra packet parsing when not needed. > 15) Move TCP header parsing inside the IS_TSO?() test. > This avoids extra packet parsing when not needed. > 16) Pass chains of mbufs that are not consumed by lro to if_input() > rather call if_input() for each mbuf. > 17) Re-arrange packet header loads to get as much work as possible done > before a cache stall. > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/ > IFDI_DETACH(); > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > especially when RX and TX share an interrupt. RX will attempt to > take the first threads on a core, and TX will attempt to take > successive threads. > 20) Allow iflib_softirq_alloc_generic() to request affinity to the same > cpus an interrupt has affinity with. This allows TX queues to > ensure they are serviced by the socket the device is on. > 21) Add new iflib sysctls to net.iflib: > - timer_int - interval at which to run per-queue timers in ticks > - force_busdma > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > - rx_budget allows tuning the batch size on the RX path > - watchdog_events Count of watchdog events seen since load > 23) Fix error where netmap_rxq_init() could get called before > IFDI_INIT() > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > when waiting for firmware > - After interrupts are enabled, convert all waits to sleeps > - Eliminates e1000 software/firmware synchronization busy waits after > startup > 25) e1000: Remove special case for budget=1 in em_txrx.c > - Premature optimization which may actually be incorrect with > multi-segment packets > 26) e1000: Split out TX interrupt rather than share an interrupt for > RX and TX. > - Allows better performance by keeping RX and TX paths separate > 27) e1000: Separate igb from em code where suitable > Much easier to understand separate functions and "if (is_igb)" than > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))" > > #blamebruno > > Reviewed by: sbruno > Approved by: sbruno (mentor) > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D12235 *gasps at the LoC count and number of changed drivers* Could someone please better break this up in the future..? Thank you, -Ngie From owner-svn-src-head@freebsd.org Wed Sep 13 06:57:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3810E106D9; Wed, 13 Sep 2017 06:57:53 +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 792F675F9C; Wed, 13 Sep 2017 06:57:53 +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 v8D6vq8l068584; Wed, 13 Sep 2017 06:57:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D6vqI7068582; Wed, 13 Sep 2017 06:57:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709130657.v8D6vqI7068582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 13 Sep 2017 06:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323521 - head/usr.bin/sockstat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.bin/sockstat X-SVN-Commit-Revision: 323521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 06:57:53 -0000 Author: tuexen Date: Wed Sep 13 06:57:52 2017 New Revision: 323521 URL: https://svnweb.freebsd.org/changeset/base/323521 Log: Add a command line option for using a wider field for displaying addresses. This allows the table to be consistent when IPv6 addresses have to be printed. While there, document the -v option in the man page. Sponsored by: Netflix, Inc. Modified: head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Wed Sep 13 06:07:02 2017 (r323520) +++ head/usr.bin/sockstat/sockstat.1 Wed Sep 13 06:57:52 2017 (r323521) @@ -35,7 +35,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46cLlSsUu +.Op Fl 46cLlSsUuvw .Op Fl j Ar jid .Op Fl p Ar ports .Op Fl P Ar protocols @@ -97,6 +97,10 @@ Show .Dv AF_LOCAL .Pq Ux sockets. +.It Fl v +Verbose mode. +.It Fl w +Use wider field size for displaying addresses. .El .Pp If neither Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Wed Sep 13 06:07:02 2017 (r323520) +++ head/usr.bin/sockstat/sockstat.c Wed Sep 13 06:57:52 2017 (r323521) @@ -78,6 +78,7 @@ static int opt_s; /* Show protocol state if applicab static int opt_U; /* Show remote UDP encapsulation port number */ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +static int opt_w; /* Wide print area for addresses */ /* * Default protocols to use if no -P was defined. @@ -1020,7 +1021,8 @@ displaysock(struct sock *s, int pos) faddr = s->faddr; first = 1; while (laddr != NULL || faddr != NULL) { - while (pos < 36) + offset = 36; + while (pos < offset) pos += xprintf(" "); switch (s->family) { case AF_INET: @@ -1030,10 +1032,12 @@ displaysock(struct sock *s, int pos) if (s->family == AF_INET6 && pos >= 58) pos += xprintf(" "); } - while (pos < 58) + offset += opt_w ? 46 : 22; + while (pos < offset) pos += xprintf(" "); if (faddr != NULL) pos += printaddr(&faddr->address); + offset += opt_w ? 46 : 22; break; case AF_UNIX: if ((laddr == NULL) || (faddr == NULL)) @@ -1048,6 +1052,7 @@ displaysock(struct sock *s, int pos) p = *(void **)&(faddr->address); if (p == NULL) { pos += xprintf("(not connected)"); + offset += opt_w ? 92 : 44; break; } pos += xprintf("-> "); @@ -1065,11 +1070,11 @@ displaysock(struct sock *s, int pos) pos += xprintf("??"); else pos += printaddr(&s_tmp->laddr->address); + offset += opt_w ? 92 : 44; break; default: abort(); } - offset = 80; if (opt_U) { if (faddr != NULL && s->proto == IPPROTO_SCTP && @@ -1147,9 +1152,10 @@ display(void) struct sock *s; int hash, n, pos; - printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s", + printf("%-8s %-10s %-5s %-2s %-6s %-*s %-*s", "USER", "COMMAND", "PID", "FD", "PROTO", - "LOCAL ADDRESS", "FOREIGN ADDRESS"); + opt_w ? 45 : 21, "LOCAL ADDRESS", + opt_w ? 45 : 21, "FOREIGN ADDRESS"); if (opt_U) printf(" %-6s", "ENCAPS"); if (opt_s) { @@ -1228,7 +1234,7 @@ static void usage(void) { fprintf(stderr, - "usage: sockstat [-46cLlSsu] [-j jid] [-p ports] [-P protocols]\n"); + "usage: sockstat [-46cLlSsUuvw] [-j jid] [-p ports] [-P protocols]\n"); exit(1); } @@ -1239,7 +1245,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46cj:Llp:P:SsUuv")) != -1) + while ((o = getopt(argc, argv, "46cj:Llp:P:SsUuvw")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1279,6 +1285,9 @@ main(int argc, char *argv[]) break; case 'v': ++opt_v; + break; + case 'w': + opt_w = 1; break; default: usage(); From owner-svn-src-head@freebsd.org Wed Sep 13 07:09:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C866E10F00; Wed, 13 Sep 2017 07:09:59 +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 1B23A76636; Wed, 13 Sep 2017 07:09:59 +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 v8D79wWC072566; Wed, 13 Sep 2017 07:09:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8D79w1d072565; Wed, 13 Sep 2017 07:09:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709130709.v8D79w1d072565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Sep 2017 07:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323522 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 07:09:59 -0000 Author: avg Date: Wed Sep 13 07:09:58 2017 New Revision: 323522 URL: https://svnweb.freebsd.org/changeset/base/323522 Log: slightly simplify zfs_vptocnp It's not necessary to look up the parent's ID to check if the node is the root node of the filesystem. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 13 06:57:52 2017 (r323521) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 13 07:09:58 2017 (r323522) @@ -5925,7 +5925,6 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) vnode_t *vp = ap->a_vp;; zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; znode_t *zp = VTOZ(vp); - uint64_t parent; int ltype; int error; @@ -5936,13 +5935,7 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) * If we are a snapshot mounted under .zfs, run the operation * on the covered vnode. */ - if ((error = sa_lookup(zp->z_sa_hdl, - SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) { - ZFS_EXIT(zfsvfs); - return (error); - } - - if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) { + if (zp->z_id != zfsvfs->z_root || zfsvfs->z_parent == zfsvfs) { char name[MAXNAMLEN + 1]; znode_t *dzp; size_t len; From owner-svn-src-head@freebsd.org Wed Sep 13 07:11:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E83BE1119C; Wed, 13 Sep 2017 07:11:56 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2142E76990; Wed, 13 Sep 2017 07:11:55 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id s1psdYJcVM9gts1ptd0hlo; Wed, 13 Sep 2017 01:11:49 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=2JCJgTwv5E4A:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=YxBL1-UpAAAA:8 a=Xtwukj0D_oYdYSCqfX4A:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=IjZwj45LgO3ly-622nXo:22 a=AjGcO6oz07-iQ99wixmX:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C8F1442D; Wed, 13 Sep 2017 00:11:47 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v8D7BlTS003204; Wed, 13 Sep 2017 00:11:47 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201709130711.v8D7BlTS003204@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ngie Cooper cc: Stephen Hurd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys In-Reply-To: Message from Ngie Cooper of "Tue, 12 Sep 2017 23:14:35 -0700." <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 13 Sep 2017 00:11:47 -0700 X-CMAE-Envelope: MS4wfEGYLMOKqyouRaDriWyYQzVgo2OvkJgszG6/O2RQbDSD31mtk+2ELDDi0UGg2aYfFiBVeEPtKV8S1ib2vBxs74fxRNTESBBk5eq06HDMt/zpETNcoAmE Ixt84wLucAmhdq5ts4ov0s6UuAiqViISdUTSsGc5VWvOvrNu/VrNRUuV151cBoDMWVRAzTubqHcdpF0updUBZ/aoJHix2EcoOiCpUeJILO4yhpgtQ3ykOHHp 22EDGNq3K0fLHTDM2lPJCCyd3Jfk6ehSOc0Xqfimap25pUVDUxmT/OVOJ6wC45pfPiLeUgt2+1rWruNNCfiVng== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 07:11:56 -0000 In message <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com>, Ngie Cooper writes : > > > On Sep 12, 2017, at 18:18, Stephen Hurd wrote: > > > > Author: shurd > > Date: Wed Sep 13 01:18:42 2017 > > New Revision: 323516 > > URL: https://svnweb.freebsd.org/changeset/base/323516 > > > > Log: > > Roll up iflib commits from github. This pulls in most of the work done > > by Matt Macy as well as other changes which he has accepted via pull > > request to his github repo at https://github.com/mattmacy/networking/ > > > > This should bring -CURRENT and the github repo into close enough sync to > > allow small feature branches rather than a large chain of interdependant > > patches being developed out of tree. The reset of the synchronization > > should be able to be completed on github by splitting the remaining > > changes that are not yet ready into short feature branches for later > > review as smaller commits. > > > > Here is a summary of changes included in this patch: > > > > 1) More checks when INVARIANTS are enabled for eariler problem > > detection > > 2) Group Task Queue cleanups > > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > > Some interfaces such as memguard(9) use the short description to > > identify malloc types, so duplicates should be avoided. > > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > > - In some cases, this can improve performance > > 4) Better logging when taskqgroup_attach*() fails to set interrupt > > affinity. > > 5) Do not start gtaskqueues until they're needed > > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > > state. This moves the TX to the gtaskq and allows processing to > > continue faster as well as make TX batching more likely. > > 7) Add an ift_txd_errata function to struct if_txrx. This allows > > drivers to inspect/modify mbufs before transmission. > > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > > checksums zeroed for checksum offload to work. This avoids modifying > > packet data in the TX path when possible. > > 9) Use ithreads for iflib I/O instead of taskqueues > > 10) Clean up ioctl and support async ioctl functions > > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. We > > often need to parse packet header info beyond 64B. > > 12) Fix potential memory corruption due to fence post error in > > bit_nclear() usage. > > 13) Improved hang detection and handling > > 14) If the packet is smaller than MTU, disable the TSO flags. > > This avoids extra packet parsing when not needed. > > 15) Move TCP header parsing inside the IS_TSO?() test. > > This avoids extra packet parsing when not needed. > > 16) Pass chains of mbufs that are not consumed by lro to if_input() > > rather call if_input() for each mbuf. > > 17) Re-arrange packet header loads to get as much work as possible done > > before a cache stall. > > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/ > > IFDI_DETACH(); > > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > > especially when RX and TX share an interrupt. RX will attempt to > > take the first threads on a core, and TX will attempt to take > > successive threads. > > 20) Allow iflib_softirq_alloc_generic() to request affinity to the same > > cpus an interrupt has affinity with. This allows TX queues to > > ensure they are serviced by the socket the device is on. > > 21) Add new iflib sysctls to net.iflib: > > - timer_int - interval at which to run per-queue timers in ticks > > - force_busdma > > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > > - rx_budget allows tuning the batch size on the RX path > > - watchdog_events Count of watchdog events seen since load > > 23) Fix error where netmap_rxq_init() could get called before > > IFDI_INIT() > > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > > when waiting for firmware > > - After interrupts are enabled, convert all waits to sleeps > > - Eliminates e1000 software/firmware synchronization busy waits after > > startup > > 25) e1000: Remove special case for budget=1 in em_txrx.c > > - Premature optimization which may actually be incorrect with > > multi-segment packets > > 26) e1000: Split out TX interrupt rather than share an interrupt for > > RX and TX. > > - Allows better performance by keeping RX and TX paths separate > > 27) e1000: Separate igb from em code where suitable > > Much easier to understand separate functions and "if (is_igb)" than > > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))" > > > > #blamebruno > > > > Reviewed by: sbruno > > Approved by: sbruno (mentor) > > Sponsored by: Limelight Networks > > Differential Revision: https://reviews.freebsd.org/D12235 > > *gasps at the LoC count and number of changed drivers* > > Could someone please better break this up in the future..? Agreed. Down the road parsing out individual commits in this jumbo commit will be difficult to parse. IMO this may as well have simply been, import from https://github.com/mattmacy/networking/, just like Mr. Torvalds does at kernel.org. I expect to see a commit like this there but not here. Can we break this down to its functional commits? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Sep 13 10:22:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71748E18A19; Wed, 13 Sep 2017 10:22:10 +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 39D1181106; Wed, 13 Sep 2017 10:22: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 v8DAM9UN055404; Wed, 13 Sep 2017 10:22:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DAM9Ax055403; Wed, 13 Sep 2017 10:22:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709131022.v8DAM9Ax055403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Sep 2017 10:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323524 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 323524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 10:22:10 -0000 Author: avg Date: Wed Sep 13 10:22:09 2017 New Revision: 323524 URL: https://svnweb.freebsd.org/changeset/base/323524 Log: MFV r316932: 6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED illumos/illumos-gate@d1672efb6feac57c42788e27f739dfa3c4f3baf7 https://github.com/illumos/illumos-gate/commit/d1672efb6feac57c42788e27f739dfa3c4f3baf7 https://www.illumos.org/issues/6280 The unshare_one() in libzfs could fail with EZFS_SHARENFSFAILED at line 834 here: 831 /* make sure libshare initialized */ 832 if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { 833 free(mntpt); /* don't need the copy anymore */ 834 return (zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, 835 dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"), 836 name, _sa_errorstr(err))); 837 } The correct error should be EZFS_UNSHARENFSFAILED instead. Reviewed by: Toomas Soome Reviewed by: Dan McDonald Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Marcel Telka MFC after: 4 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Sep 13 10:17:14 2017 (r323523) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Sep 13 10:22:09 2017 (r323524) @@ -20,6 +20,7 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov @@ -872,7 +873,7 @@ unshare_one(libzfs_handle_t *hdl, const char *name, co /* make sure libshare initialized */ if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { free(mntpt); /* don't need the copy anymore */ - return (zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, + return (zfs_error_fmt(hdl, EZFS_UNSHARENFSFAILED, dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"), name, _sa_errorstr(err))); } From owner-svn-src-head@freebsd.org Wed Sep 13 10:23:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D66FDE18CE1; Wed, 13 Sep 2017 10:23:56 +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 B358D812C8; Wed, 13 Sep 2017 10:23:56 +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 v8DANtD8055511; Wed, 13 Sep 2017 10:23:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DANts2055510; Wed, 13 Sep 2017 10:23:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709131023.v8DANts2055510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Sep 2017 10:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323525 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 323525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 10:23:57 -0000 Author: avg Date: Wed Sep 13 10:23:55 2017 New Revision: 323525 URL: https://svnweb.freebsd.org/changeset/base/323525 Log: MFV r323523: 8331 zfs_unshare returns wrong error code for smb unshare failure illumos/illumos-gate@4f4378cc54b7deec3a35c529dc397dbdc325b4bb https://github.com/illumos/illumos-gate/commit/4f4378cc54b7deec3a35c529dc397dbdc325b4bb https://www.illumos.org/issues/8331 zfs_unshare returns EZFS_UNSHARENFSFAILED on error for all share types. Reviewed by: Marcel Telka Reviewed by: Toomas Soome Approved by: Dan McDonald Author: Andrew Stormont MFC after: 4 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Sep 13 10:22:09 2017 (r323524) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Sep 13 10:23:55 2017 (r323525) @@ -24,6 +24,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov + * Copyright 2017 RackTop Systems. */ /* @@ -88,7 +89,7 @@ zfs_share_type_t zfs_is_shared_proto(zfs_handle_t *, c zfs_share_proto_t); /* - * The share protocols table must be in the same order as the zfs_share_prot_t + * The share protocols table must be in the same order as the zfs_share_proto_t * enum in libzfs_impl.h */ typedef struct { @@ -873,7 +874,7 @@ unshare_one(libzfs_handle_t *hdl, const char *name, co /* make sure libshare initialized */ if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { free(mntpt); /* don't need the copy anymore */ - return (zfs_error_fmt(hdl, EZFS_UNSHARENFSFAILED, + return (zfs_error_fmt(hdl, proto_table[proto].p_unshare_err, dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"), name, _sa_errorstr(err))); } @@ -884,12 +885,13 @@ unshare_one(libzfs_handle_t *hdl, const char *name, co if (share != NULL) { err = zfs_sa_disable_share(share, proto_table[proto].p_name); if (err != SA_OK) { - return (zfs_error_fmt(hdl, EZFS_UNSHARENFSFAILED, + return (zfs_error_fmt(hdl, + proto_table[proto].p_unshare_err, dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"), name, _sa_errorstr(err))); } } else { - return (zfs_error_fmt(hdl, EZFS_UNSHARENFSFAILED, + return (zfs_error_fmt(hdl, proto_table[proto].p_unshare_err, dgettext(TEXT_DOMAIN, "cannot unshare '%s': not found"), name)); } From owner-svn-src-head@freebsd.org Wed Sep 13 10:34:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38CFCE19447; Wed, 13 Sep 2017 10:34:33 +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 0217681A4A; Wed, 13 Sep 2017 10:34:32 +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 v8DAYWBw059845; Wed, 13 Sep 2017 10:34:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DAYWLg059844; Wed, 13 Sep 2017 10:34:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709131034.v8DAYWLg059844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Sep 2017 10:34:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323528 - head/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Commit-Revision: 323528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 10:34:33 -0000 Author: avg Date: Wed Sep 13 10:34:31 2017 New Revision: 323528 URL: https://svnweb.freebsd.org/changeset/base/323528 Log: MFV r323527: 5815 libzpool's panic function doesn't set global panicstr, ::status not as useful illumos/illumos-gate@fae6347731c9d3f46b26338313b0422927f29cf6 https://github.com/illumos/illumos-gate/commit/fae6347731c9d3f46b26338313b0422927f29cf6 https://www.illumos.org/issues/5815 When panic() is called from within ztest, the mdb ::status command isn't as useful as it could be since the global panicstr variable isn't updated. We should modify the function to make sure panicstr is set, so ::status can present the error message just like it does on a failed assertion. Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Reviewed by: Gordon Ross Reviewed by: Rich Lowe Approved by: Dan McDonald Author: Prakash Surya MFC after: 4 weeks Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Sep 13 10:33:09 2017 (r323527) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Sep 13 10:34:31 2017 (r323528) @@ -735,11 +735,9 @@ static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n" void vpanic(const char *fmt, va_list adx) { - (void) fprintf(stderr, "error: "); - (void) vfprintf(stderr, fmt, adx); - (void) fprintf(stderr, "\n"); - - abort(); /* think of it as a "user-level crash dump" */ + char buf[512]; + (void) vsnprintf(buf, 512, fmt, adx); + assfail(buf, NULL, 0); } void From owner-svn-src-head@freebsd.org Wed Sep 13 10:56:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B75EBE1A315; Wed, 13 Sep 2017 10:56:03 +0000 (UTC) (envelope-from kibab@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 904FF828E6; Wed, 13 Sep 2017 10:56:03 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DAu2i6068083; Wed, 13 Sep 2017 10:56:02 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DAu2uu068080; Wed, 13 Sep 2017 10:56:02 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709131056.v8DAu2uu068080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Wed, 13 Sep 2017 10:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323532 - in head/sys: amd64/conf arm/conf X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: in head/sys: amd64/conf arm/conf X-SVN-Commit-Revision: 323532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 10:56:03 -0000 Author: kibab Date: Wed Sep 13 10:56:02 2017 New Revision: 323532 URL: https://svnweb.freebsd.org/changeset/base/323532 Log: Add MMCCAM-enabled kernel config for IMX6, reduce debug noice in MMCCAM kernels CAM_DEBUG_TRACE results in way too much debug output than needed now. When debugging, it's always possible to turn on trace level using camcontrol. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12110 Added: head/sys/amd64/conf/GENERIC-MMCCAM - copied, changed from r323530, head/sys/amd64/conf/MMCCAM head/sys/arm/conf/IMX6-MMCCAM (contents, props changed) Deleted: head/sys/amd64/conf/MMCCAM Modified: head/sys/arm/conf/BEAGLEBONE-MMCCAM Copied and modified: head/sys/amd64/conf/GENERIC-MMCCAM (from r323530, head/sys/amd64/conf/MMCCAM) ============================================================================== --- head/sys/amd64/conf/MMCCAM Wed Sep 13 10:45:49 2017 (r323530, copy source) +++ head/sys/amd64/conf/GENERIC-MMCCAM Wed Sep 13 10:56:02 2017 (r323532) @@ -4,7 +4,7 @@ include MINIMAL -ident MMCCAM +ident GENERIC-MMCCAM # Access GPT-formatted and labeled root volume options GEOM_PART_GPT @@ -28,9 +28,9 @@ device virtio_balloon # VirtIO Memory Balloon device device pass device scbus device da -device mmccam -options MMCCAM +options MMCCAM + # Add CAMDEBUG stuff -options CAMDEBUG -options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH|CAM_DEBUG_TRACE) +options CAMDEBUG +options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH) Modified: head/sys/arm/conf/BEAGLEBONE-MMCCAM ============================================================================== --- head/sys/arm/conf/BEAGLEBONE-MMCCAM Wed Sep 13 10:54:56 2017 (r323531) +++ head/sys/arm/conf/BEAGLEBONE-MMCCAM Wed Sep 13 10:56:02 2017 (r323532) @@ -6,16 +6,18 @@ # # $FreeBSD$ +#NO_UNIVERSE + include BEAGLEBONE +options MMCCAM + # Add CAMDEBUG stuff options CAMDEBUG -options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH|CAM_DEBUG_TRACE) +options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH) # pass(4) device device pass -device mmccam -options MMCCAM nodevice mmc nodevice mmcsd Added: head/sys/arm/conf/IMX6-MMCCAM ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/IMX6-MMCCAM Wed Sep 13 10:56:02 2017 (r323532) @@ -0,0 +1,23 @@ +# +# IMX6-MMCCAM +# +# Custom kernel for IMX6 plus MMCCAM as opposed to the prior MMC stack. It is +# present to keep it building in tree since it wouldn't work in LINT. +# +# $FreeBSD$ + +#NO_UNIVERSE + +include IMX6 + +options MMCCAM + +# Add CAMDEBUG stuff +options CAMDEBUG +options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH) + +# pass(4) device +device pass + +nodevice mmc +nodevice mmcsd From owner-svn-src-head@freebsd.org Wed Sep 13 12:16:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79C7FE1E2F1; Wed, 13 Sep 2017 12:16:28 +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 442801F87; Wed, 13 Sep 2017 12:16:28 +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 v8DCGRfV001252; Wed, 13 Sep 2017 12:16:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DCGRgW001251; Wed, 13 Sep 2017 12:16:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709131216.v8DCGRgW001251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 13 Sep 2017 12:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323539 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 323539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 12:16:28 -0000 Author: emaste Date: Wed Sep 13 12:16:27 2017 New Revision: 323539 URL: https://svnweb.freebsd.org/changeset/base/323539 Log: qlnx: exclude if WITHOUT_SOURCELESS_UCODE set PR: 222277 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 1 week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Sep 13 11:29:48 2017 (r323538) +++ head/sys/modules/Makefile Wed Sep 13 12:16:27 2017 (r323539) @@ -718,8 +718,8 @@ _qlxge= qlxge _qlxgb= qlxgb .if ${MK_SOURCELESS_UCODE} != "no" _qlxgbe= qlxgbe -.endif _qlnx= qlnx +.endif _sfxge= sfxge _sgx= sgx _sgx_linux= sgx_linux From owner-svn-src-head@freebsd.org Wed Sep 13 13:03:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E3DE1FF5B; Wed, 13 Sep 2017 13:03:30 +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 9E2303937; Wed, 13 Sep 2017 13:03:30 +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 v8DD3Tnn021584; Wed, 13 Sep 2017 13:03:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DD3TY3021583; Wed, 13 Sep 2017 13:03:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709131303.v8DD3TY3021583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 13 Sep 2017 13:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323540 - head/sys/dev/jedec_ts X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/jedec_ts X-SVN-Commit-Revision: 323540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 13:03:30 -0000 Author: avg Date: Wed Sep 13 13:03:29 2017 New Revision: 323540 URL: https://svnweb.freebsd.org/changeset/base/323540 Log: jedec_ts: add many more devices from various vendors The new IDs are taken from the hardware to which I have access and from open datasheets. Also, the hardware probing is moved to the device probe method. Reviewed by: rpokala MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11730 Modified: head/sys/dev/jedec_ts/jedec_ts.c Modified: head/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- head/sys/dev/jedec_ts/jedec_ts.c Wed Sep 13 12:16:27 2017 (r323539) +++ head/sys/dev/jedec_ts/jedec_ts.c Wed Sep 13 13:03:29 2017 (r323540) @@ -42,6 +42,116 @@ __FBSDID("$FreeBSD$"); /* + * General device identification notes. + * + * The JEDEC TSE2004av specification defines the device ID that all compliant + * devices should use, but very few do in practice. Maybe that's because + * TSE2002av was rather vague about that. + * Rare examples are IDT TSE2004GB2B0 and Atmel AT30TSE004A, not sure if + * they are TSE2004av compliant by design or by accident. + * Also, the specification mandates that PCI SIG manufacturer IDs are to be + * used, but in practice the JEDEC manufacturer IDs are often used. + */ + +const struct ts_dev { + uint16_t vendor_id; + uint8_t device_id; + const char *description; +} known_devices[] = { + /* + * Analog Devices ADT7408. + * http://www.analog.com/media/en/technical-documentation/data-sheets/ADT7408.pdf + */ + { 0x11d4, 0x08, "Analog Devices DIMM temperature sensor" }, + + /* + * Atmel AT30TSE002B, AT30TSE004A. + * http://www.atmel.com/images/doc8711.pdf + * http://www.atmel.com/images/atmel-8868-dts-at30tse004a-datasheet.pdf + * Note how one chip uses the JEDEC Manufacturer ID while the other + * uses the PCI SIG one. + */ + { 0x001f, 0x82, "Atmel DIMM temperature sensor" }, + { 0x1114, 0x22, "Atmel DIMM temperature sensor" }, + + /* + * Integrated Device Technology (IDT) TS3000B3A, TSE2002B3C, + * TSE2004GB2B0 chips and their variants. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + * https://www.idt.com/document/dst/tse2004gb2b0-datasheet + */ + { 0x00b3, 0x29, "IDT DIMM temperature sensor" }, + { 0x00b3, 0x22, "IDT DIMM temperature sensor" }, + + /* + * Maxim Integrated MAX6604. + * Different document revisions specify different Device IDs. + * Document 19-3837; Rev 0; 10/05 has 0x3e00 while + * 19-3837; Rev 3; 10/11 has 0x5400. + * http://datasheets.maximintegrated.com/en/ds/MAX6604.pdf + */ + { 0x004d, 0x3e, "Maxim Integrated DIMM temperature sensor" }, + { 0x004d, 0x54, "Maxim Integrated DIMM temperature sensor" }, + + /* + * Microchip Technology MCP9805, MCP9843, MCP98242, MCP98243 + * and their variants. + * http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + * Microchip Technology EMC1501. + * http://ww1.microchip.com/downloads/en/DeviceDoc/00001605A.pdf + */ + { 0x0054, 0x00, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x20, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x21, "Microchip DIMM temperature sensor" }, + { 0x1055, 0x08, "Microchip DIMM temperature sensor" }, + + /* + * NXP Semiconductors SE97 and SE98. + * http://www.nxp.com/docs/en/data-sheet/SE97B.pdf + */ + { 0x1131, 0xa1, "NXP DIMM temperature sensor" }, + { 0x1131, 0xa2, "NXP DIMM temperature sensor" }, + + /* + * ON Semiconductor CAT34TS02 revisions B and C, CAT6095 and compatible. + * https://www.onsemi.com/pub/Collateral/CAT34TS02-D.PDF + * http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF + */ + { 0x1b09, 0x08, "ON Semiconductor DIMM temperature sensor" }, + { 0x1b09, 0x0a, "ON Semiconductor DIMM temperature sensor" }, + + /* + * ST[Microelectronics] STTS424E02, STTS2002 and others. + * http://www.st.com/resource/en/datasheet/cd00157558.pdf + * http://www.st.com/resource/en/datasheet/stts2002.pdf + */ + { 0x104a, 0x00, "ST DIMM temperature sensor" }, + { 0x104a, 0x03, "ST DIMM temperature sensor" }, +}; + +static const char * +ts_match_device(uint16_t vid, uint16_t did) +{ + const struct ts_dev *d; + int i; + + for (i = 0; i < nitems(known_devices); i++) { + d = &known_devices[i]; + if (vid == d->vendor_id && (did >> 8) == d->device_id) + return (d->description); + } + + /* + * If no match for a specific device, then check + * for a generic TSE2004av compliant device. + */ + if ((did >> 8) == 0x22) + return ("TSE2004av compliant DIMM temperature sensor"); + return (NULL); +} + +/* * SMBus specification defines little-endian byte order, * but it seems that the JEDEC devices expect it to * be big-endian. @@ -89,15 +199,7 @@ ts_temp_sysctl(SYSCTL_HANDLER_ARGS) static int ts_probe(device_t dev) { - device_set_desc(dev, "DIMM memory sensor"); - return (BUS_PROBE_DEFAULT); -} - -static int -ts_attach(device_t dev) -{ - struct sysctl_ctx_list *ctx; - struct sysctl_oid_list *tree; + const char *match; int err; uint16_t vendorid; uint16_t devid; @@ -119,26 +221,9 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Device ID\n"); return (ENXIO); } - if ((devid & 0xff00) == 0x2200) { - /* - * Defined by JEDEC Standard No. 21-C, Release 26, - * Page 4.1.6 – 24 - */ - } else if (vendorid == 0x104a) { - /* - * STMicroelectronics datasheets say that - * device ID and revision can vary. - * E.g. STT424E02, Doc ID 13448 Rev 8, - * section 4.6, page 26. - */ - } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { - /* - * IDT TS3000B3A and TSE2002B3C chips and their variants. - * Revision IDs (the lower byte) can vary. - * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf - * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf - */ - } else { + + match = ts_match_device(vendorid, devid); + if (match == NULL) { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" ", 0x%x and 0x%x\n", vendorid, devid); @@ -146,9 +231,18 @@ ts_attach(device_t dev) return (ENXIO); } + device_set_desc(dev, match); + return (BUS_PROBE_DEFAULT); +} + +static int +ts_attach(device_t dev) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temp", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, ts_temp_sysctl, "IK4", "Current temperature"); From owner-svn-src-head@freebsd.org Wed Sep 13 13:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55791E2161D for ; Wed, 13 Sep 2017 13:35:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::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 10BC064297 for ; Wed, 13 Sep 2017 13:35:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id k101so2048310iod.0 for ; Wed, 13 Sep 2017 06:35:48 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=J2o5aTouM40P6HeIWrIZw/BbNHvkwtqzMmNCPbTNe2s=; b=XEgXJLlgiNYzNMnciNCT1vbKB1iymc9ZxwVN+J9ZnDmOwuI7uUFXWqd6U4NlJOu8bg lUfNIGUqf5NGr1rgoaSke3nuXDB1tmraVaiYLNyEyS9P5WmSg76uANG5YG9xHrFFdLCg ynCB0NPTfcC1wF7rhrpGMqggqixVjR9zAito6diSp/QBrESrrxxNxTGk2YeDWDMjOuEk 7eDQZg1COgu7zoOOTyqbjLklCmJuRN41ckMrC6XTzUbo4CUkfjIy4CfOGW26P1j3iP3U neqpj0av7VxqnCvXF6i3Z00gY3+iqXs4n4TrM4LX75qJHnUhQV8HeM3fqig1bF1u6BCY 4Iaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=J2o5aTouM40P6HeIWrIZw/BbNHvkwtqzMmNCPbTNe2s=; b=XuLdkqfzf954DEqhcEVODeAwrVPUjIcHU9H2l4P/6CWWqGsrqB1hR07dW77yDCZGq7 GeJUYle5/G95rClTFkymaQ9tOPvwLaxZfBU9zH5chncQEFId1AeKag5PbaRAtgC+M20R y5Fir855AE8xyO2MumM3XRacv0sPmQfi56gxEV+BIci8LHyrB+fS7+VLoUb2qxc66qQC CsQncU8F8HFlPGGzQgkzZtE7g42TI7ebOefdlEmw0IDKiLrJiEJaVtAFuFwOQoDe5vVd g8qKN/TUa/H5kcl08l6f4+MK2K4JV2kQhTPTyVD8fz8NczXYrY/bJaJIYVQHyxDG2o6Z FyUA== X-Gm-Message-State: AHPjjUiyZmxpXXqzpIAMyNPvYeNk4gV270KMz4rc7Ewt99YABi4nDbNQ V0ZtZpS82rOzSQomGYTqpPAyFzBiRisoepFLv6FyZA== X-Google-Smtp-Source: AOwi7QAPciKe5nHAPAHWXdSO3Mjr689ZuS+Sff7XPYCx5jfZBQfUpqUACtZW3IRP4SuuUE41kNjzqpIk14uomncAUPs= X-Received: by 10.107.41.138 with SMTP id p132mr28246254iop.282.1505309747324; Wed, 13 Sep 2017 06:35:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Wed, 13 Sep 2017 06:35:46 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <201709130711.v8D7BlTS003204@slippy.cwsent.com> References: <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com> <201709130711.v8D7BlTS003204@slippy.cwsent.com> From: Warner Losh Date: Wed, 13 Sep 2017 07:35:46 -0600 X-Google-Sender-Auth: w-uaXUmnjRPW_DfP7kGPZWz9UZ0 Message-ID: Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys To: Cy Schubert Cc: Ngie Cooper , Stephen Hurd , 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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 13:35:48 -0000 On Wed, Sep 13, 2017 at 1:11 AM, Cy Schubert wrote: > In message <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com>, Ngie Cooper > writes > : > > > > > On Sep 12, 2017, at 18:18, Stephen Hurd wrote: > > > > > > Author: shurd > > > Date: Wed Sep 13 01:18:42 2017 > > > New Revision: 323516 > > > URL: https://svnweb.freebsd.org/changeset/base/323516 > > > > > > Log: > > > Roll up iflib commits from github. This pulls in most of the work > done > > > by Matt Macy as well as other changes which he has accepted via pull > > > request to his github repo at https://github.com/mattmacy/networking/ > > > > > > This should bring -CURRENT and the github repo into close enough sync > to > > > allow small feature branches rather than a large chain of > interdependant > > > patches being developed out of tree. The reset of the synchronization > > > should be able to be completed on github by splitting the remaining > > > changes that are not yet ready into short feature branches for later > > > review as smaller commits. > > > > > > Here is a summary of changes included in this patch: > > > > > > 1) More checks when INVARIANTS are enabled for eariler problem > > > detection > > > 2) Group Task Queue cleanups > > > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > > > Some interfaces such as memguard(9) use the short description to > > > identify malloc types, so duplicates should be avoided. > > > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > > > - In some cases, this can improve performance > > > 4) Better logging when taskqgroup_attach*() fails to set interrupt > > > affinity. > > > 5) Do not start gtaskqueues until they're needed > > > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > > > state. This moves the TX to the gtaskq and allows processing to > > > continue faster as well as make TX batching more likely. > > > 7) Add an ift_txd_errata function to struct if_txrx. This allows > > > drivers to inspect/modify mbufs before transmission. > > > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > > > checksums zeroed for checksum offload to work. This avoids > modifying > > > packet data in the TX path when possible. > > > 9) Use ithreads for iflib I/O instead of taskqueues > > > 10) Clean up ioctl and support async ioctl functions > > > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. > We > > > often need to parse packet header info beyond 64B. > > > 12) Fix potential memory corruption due to fence post error in > > > bit_nclear() usage. > > > 13) Improved hang detection and handling > > > 14) If the packet is smaller than MTU, disable the TSO flags. > > > This avoids extra packet parsing when not needed. > > > 15) Move TCP header parsing inside the IS_TSO?() test. > > > This avoids extra packet parsing when not needed. > > > 16) Pass chains of mbufs that are not consumed by lro to if_input() > > > rather call if_input() for each mbuf. > > > 17) Re-arrange packet header loads to get as much work as possible > done > > > before a cache stall. > > > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_ > POST()/ > > > IFDI_DETACH(); > > > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > > > especially when RX and TX share an interrupt. RX will attempt to > > > take the first threads on a core, and TX will attempt to take > > > successive threads. > > > 20) Allow iflib_softirq_alloc_generic() to request affinity to the > same > > > cpus an interrupt has affinity with. This allows TX queues to > > > ensure they are serviced by the socket the device is on. > > > 21) Add new iflib sysctls to net.iflib: > > > - timer_int - interval at which to run per-queue timers in ticks > > > - force_busdma > > > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > > > - rx_budget allows tuning the batch size on the RX path > > > - watchdog_events Count of watchdog events seen since load > > > 23) Fix error where netmap_rxq_init() could get called before > > > IFDI_INIT() > > > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > > > when waiting for firmware > > > - After interrupts are enabled, convert all waits to sleeps > > > - Eliminates e1000 software/firmware synchronization busy waits > after > > > startup > > > 25) e1000: Remove special case for budget=1 in em_txrx.c > > > - Premature optimization which may actually be incorrect with > > > multi-segment packets > > > 26) e1000: Split out TX interrupt rather than share an interrupt for > > > RX and TX. > > > - Allows better performance by keeping RX and TX paths separate > > > 27) e1000: Separate igb from em code where suitable > > > Much easier to understand separate functions and "if (is_igb)" > than > > > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | > E1000_ICR_LSC))" > > > > > > #blamebruno > > > > > > Reviewed by: sbruno > > > Approved by: sbruno (mentor) > > > Sponsored by: Limelight Networks > > > Differential Revision: https://reviews.freebsd.org/D12235 > > > > *gasps at the LoC count and number of changed drivers* > > > > Could someone please better break this up in the future..? > > Agreed. Down the road parsing out individual commits in this jumbo commit > will be difficult to parse. IMO this may as well have simply been, import > from https://github.com/mattmacy/networking/, just like Mr. Torvalds does > at kernel.org. I expect to see a commit like this there but not here. Can > we break this down to its functional commits? I use git + svn for other things. It should be possible to use that to push the changes in 'machine gun style' (meaning 27 changes pushed so fast they show up as 27 consecutive r numbers). I do change curation, etc with it so I get good sized commits. That's why you'll often see 10 or 20 commits from me show up in a matter of a couple of minutes. git svn dcommit is to blame, but so is about two dozen git rebases and other git crazy along the way. Something like that would be useful here. I'd be quite happy to walk people through my setup if it helps to reduce this. Warner From owner-svn-src-head@freebsd.org Wed Sep 13 13:45:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EDCCE21FC1; Wed, 13 Sep 2017 13:45:44 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F58264ECD; Wed, 13 Sep 2017 13:45:43 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id s7yvdXKsw8LPZs7yxdnq5K; Wed, 13 Sep 2017 07:45:36 -0600 X-Authority-Analysis: v=2.2 cv=e552ceh/ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=2JCJgTwv5E4A:10 a=BWvPGDcYAAAA:8 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=YxBL1-UpAAAA:8 a=HBCkU0zZyFK6ODIDm3oA:9 a=CjuIK1q_8ugA:10 a=pxhY87DP9d2VeQe4joPk:22 a=6kGIvZw6iX1k4Y-7sg4_:22 a=IjZwj45LgO3ly-622nXo:22 a=AjGcO6oz07-iQ99wixmX:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 9056C95; Wed, 13 Sep 2017 06:45:33 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v8DDjXH0033179; Wed, 13 Sep 2017 06:45:33 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201709131345.v8DDjXH0033179@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Ngie Cooper , Stephen Hurd , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys In-Reply-To: Message from Warner Losh of "Wed, 13 Sep 2017 07:35:46 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 13 Sep 2017 06:45:33 -0700 X-CMAE-Envelope: MS4wfHrw7V7GDNc5dw8eqepzpvNTFsl07OW7cKjNi4o2Gwz+9XZwxdDrfZh0HBF5/RQDJ0Pe08RgwCe3zfso1VUX/CpJfb+NWz6Gi8cjnXcBjztJNoDZyuHk JwEOMakXu9BjQnygZmFPuSQndpgpG3Y+DIDSMsTkk0MBwx3GKtuLB07LVjLWRk9nFD3Qtv1ZPC9ijg/n48hZnuUgLeaALY1mB84ViK7Hb2+hTRLKKLcXesgL YBs9SqgMUqx4Zc/Kq9EpeFA0gUobmFIuFNdDBKu1ql21ekJ+G7ZQSMR2xD1LW9tykOxi3a2CDIUYgtwvJqXvOhxz4cyAvCaJlj5eNcJ9oUs= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 13:45:44 -0000 In message , Warner Losh writes: > --001a1141f15ac444250559123c56 > Content-Type: text/plain; charset="UTF-8" > > On Wed, Sep 13, 2017 at 1:11 AM, Cy Schubert > wrote: > > > In message <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com>, Ngie Cooper > > writes > > : > > > > > > > On Sep 12, 2017, at 18:18, Stephen Hurd wrote: > > > > > > > > Author: shurd > > > > Date: Wed Sep 13 01:18:42 2017 > > > > New Revision: 323516 > > > > URL: https://svnweb.freebsd.org/changeset/base/323516 > > > > > > > > Log: > > > > Roll up iflib commits from github. This pulls in most of the work > > done > > > > by Matt Macy as well as other changes which he has accepted via pull > > > > request to his github repo at https://github.com/mattmacy/networking/ > > > > > > > > This should bring -CURRENT and the github repo into close enough sync > > to > > > > allow small feature branches rather than a large chain of > > interdependant > > > > patches being developed out of tree. The reset of the synchronization > > > > should be able to be completed on github by splitting the remaining > > > > changes that are not yet ready into short feature branches for later > > > > review as smaller commits. > > > > > > > > Here is a summary of changes included in this patch: > > > > > > > > 1) More checks when INVARIANTS are enabled for eariler problem > > > > detection > > > > 2) Group Task Queue cleanups > > > > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > > > > Some interfaces such as memguard(9) use the short description to > > > > identify malloc types, so duplicates should be avoided. > > > > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > > > > - In some cases, this can improve performance > > > > 4) Better logging when taskqgroup_attach*() fails to set interrupt > > > > affinity. > > > > 5) Do not start gtaskqueues until they're needed > > > > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > > > > state. This moves the TX to the gtaskq and allows processing to > > > > continue faster as well as make TX batching more likely. > > > > 7) Add an ift_txd_errata function to struct if_txrx. This allows > > > > drivers to inspect/modify mbufs before transmission. > > > > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > > > > checksums zeroed for checksum offload to work. This avoids > > modifying > > > > packet data in the TX path when possible. > > > > 9) Use ithreads for iflib I/O instead of taskqueues > > > > 10) Clean up ioctl and support async ioctl functions > > > > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. > > We > > > > often need to parse packet header info beyond 64B. > > > > 12) Fix potential memory corruption due to fence post error in > > > > bit_nclear() usage. > > > > 13) Improved hang detection and handling > > > > 14) If the packet is smaller than MTU, disable the TSO flags. > > > > This avoids extra packet parsing when not needed. > > > > 15) Move TCP header parsing inside the IS_TSO?() test. > > > > This avoids extra packet parsing when not needed. > > > > 16) Pass chains of mbufs that are not consumed by lro to if_input() > > > > rather call if_input() for each mbuf. > > > > 17) Re-arrange packet header loads to get as much work as possible > > done > > > > before a cache stall. > > > > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_ > > POST()/ > > > > IFDI_DETACH(); > > > > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > > > > especially when RX and TX share an interrupt. RX will attempt to > > > > take the first threads on a core, and TX will attempt to take > > > > successive threads. > > > > 20) Allow iflib_softirq_alloc_generic() to request affinity to the > > same > > > > cpus an interrupt has affinity with. This allows TX queues to > > > > ensure they are serviced by the socket the device is on. > > > > 21) Add new iflib sysctls to net.iflib: > > > > - timer_int - interval at which to run per-queue timers in ticks > > > > - force_busdma > > > > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > > > > - rx_budget allows tuning the batch size on the RX path > > > > - watchdog_events Count of watchdog events seen since load > > > > 23) Fix error where netmap_rxq_init() could get called before > > > > IFDI_INIT() > > > > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > > > > when waiting for firmware > > > > - After interrupts are enabled, convert all waits to sleeps > > > > - Eliminates e1000 software/firmware synchronization busy waits > > after > > > > startup > > > > 25) e1000: Remove special case for budget=1 in em_txrx.c > > > > - Premature optimization which may actually be incorrect with > > > > multi-segment packets > > > > 26) e1000: Split out TX interrupt rather than share an interrupt for > > > > RX and TX. > > > > - Allows better performance by keeping RX and TX paths separate > > > > 27) e1000: Separate igb from em code where suitable > > > > Much easier to understand separate functions and "if (is_igb)" > > than > > > > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | > > E1000_ICR_LSC))" > > > > > > > > #blamebruno > > > > > > > > Reviewed by: sbruno > > > > Approved by: sbruno (mentor) > > > > Sponsored by: Limelight Networks > > > > Differential Revision: https://reviews.freebsd.org/D12235 > > > > > > *gasps at the LoC count and number of changed drivers* > > > > > > Could someone please better break this up in the future..? > > > > Agreed. Down the road parsing out individual commits in this jumbo commit > > will be difficult to parse. IMO this may as well have simply been, import > > from https://github.com/mattmacy/networking/, just like Mr. Torvalds does > > at kernel.org. I expect to see a commit like this there but not here. Can > > we break this down to its functional commits? > > > I use git + svn for other things. It should be possible to use that to push > the changes in 'machine gun style' (meaning 27 changes pushed so fast they > show up as 27 consecutive r numbers). I do change curation, etc with it so > I get good sized commits. That's why you'll often see 10 or 20 commits from > me show up in a matter of a couple of minutes. git svn dcommit is to blame, > but so is about two dozen git rebases and other git crazy along the way. > Something like that would be useful here. I'd be quite happy to walk people > through my setup if it helps to reduce this. I'm interested. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Sep 13 14:27:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2D12E23AE4; Wed, 13 Sep 2017 14:27:14 +0000 (UTC) (envelope-from tsoome@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 C1DB766BB9; Wed, 13 Sep 2017 14:27:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DERDrC056516; Wed, 13 Sep 2017 14:27:13 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DERD58056515; Wed, 13 Sep 2017 14:27:13 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709131427.v8DERD58056515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 13 Sep 2017 14:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323541 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 14:27:15 -0000 Author: tsoome Date: Wed Sep 13 14:27:13 2017 New Revision: 323541 URL: https://svnweb.freebsd.org/changeset/base/323541 Log: libefi: efipart_realstrategy rsize pointer may be NULL Need to check rsize before dereferencing it. Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Wed Sep 13 13:03:29 2017 (r323540) +++ head/sys/boot/efi/libefi/efipart.c Wed Sep 13 14:27:13 2017 (r323541) @@ -924,7 +924,8 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl readstart = off / blkio->Media->BlockSize; if (diskend <= readstart) { - *rsize = 0; + if (rsize != NULL) + *rsize = 0; return (EIO); } From owner-svn-src-head@freebsd.org Wed Sep 13 14:30:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5BEDE23C7C; Wed, 13 Sep 2017 14:30:31 +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 9ECE966E51; Wed, 13 Sep 2017 14:30:31 +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 v8DEUUu9056830; Wed, 13 Sep 2017 14:30:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DEUUb5056824; Wed, 13 Sep 2017 14:30:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709131430.v8DEUUb5056824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 13 Sep 2017 14:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323542 - in head/release: arm arm64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head/release: arm arm64 X-SVN-Commit-Revision: 323542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 14:30:31 -0000 Author: gjb Date: Wed Sep 13 14:30:30 2017 New Revision: 323542 URL: https://svnweb.freebsd.org/changeset/base/323542 Log: Increase arm{,64} SoC image sizes to prevent "filesystem full" build failures. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/CUBIEBOARD.conf head/release/arm/GUMSTIX.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm64/RPI3.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm/BEAGLEBONE.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-beaglebone" KERNEL="BEAGLEBONE" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/CUBIEBOARD.conf ============================================================================== --- head/release/arm/CUBIEBOARD.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm/CUBIEBOARD.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubieboard" KERNEL="ALLWINNER_UP" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm/GUMSTIX.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-duovero" KERNEL="GUMSTIX" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm/PANDABOARD.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-pandaboard" KERNEL="PANDABOARD" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm/RPI-B.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-rpi" KERNEL="RPI-B" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="17m" FAT_TYPE="16" Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Wed Sep 13 14:27:13 2017 (r323541) +++ head/release/arm64/RPI3.conf Wed Sep 13 14:30:30 2017 (r323542) @@ -10,7 +10,7 @@ EMBEDDED_TARGET_ARCH="aarch64" EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss" KERNEL="GENERIC" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000" -IMAGE_SIZE="2G" +IMAGE_SIZE="2560M" PART_SCHEME="MBR" FAT_SIZE="50m -b 1m" FAT_TYPE="16" From owner-svn-src-head@freebsd.org Wed Sep 13 14:44:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8672E246B7; Wed, 13 Sep 2017 14:44:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 865DC67891; Wed, 13 Sep 2017 14:44:07 +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 mail.baldwin.cx (Postfix) with ESMTPSA id 38DE910A7B9; Wed, 13 Sep 2017 10:44:06 -0400 (EDT) From: John Baldwin To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323518 - head/sys/conf Date: Wed, 13 Sep 2017 07:35:45 -0700 Message-ID: <9497208.8lqLTVLir6@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201709130356.v8D3u4ve095428@repo.freebsd.org> References: <201709130356.v8D3u4ve095428@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 13 Sep 2017 10:44:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 14:44:08 -0000 On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: > Author: sbruno > Date: Wed Sep 13 03:56:03 2017 > New Revision: 323518 > URL: https://svnweb.freebsd.org/changeset/base/323518 > > Log: > Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. > > ixl(4) isn't in here either, so I'll remove lio(4) too. ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better yet, just fix the build on !amd64) -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 13 15:09:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDEE0E0069D; Wed, 13 Sep 2017 15:09:45 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB1268960; Wed, 13 Sep 2017 15:09:45 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-215-166.albq.qwest.net [67.0.215.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 82EF6192892; Wed, 13 Sep 2017 15:09:42 +0000 (UTC) Subject: Re: svn commit: r323518 - head/sys/conf To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <9497208.8lqLTVLir6@ralph.baldwin.cx> From: Sean Bruno Message-ID: Date: Wed, 13 Sep 2017 09:09:42 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <9497208.8lqLTVLir6@ralph.baldwin.cx> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ds1fvJegLutcNiTU8WEWQ7OXvhJSpqf5b" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 15:09:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ds1fvJegLutcNiTU8WEWQ7OXvhJSpqf5b Content-Type: multipart/mixed; boundary="T63TJMWNOokQmlvXAtSxucm6Cn5TduO8M"; protected-headers="v1" From: Sean Bruno To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r323518 - head/sys/conf References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <9497208.8lqLTVLir6@ralph.baldwin.cx> In-Reply-To: <9497208.8lqLTVLir6@ralph.baldwin.cx> --T63TJMWNOokQmlvXAtSxucm6Cn5TduO8M Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 09/13/17 08:35, John Baldwin wrote: > On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: >> Author: sbruno >> Date: Wed Sep 13 03:56:03 2017 >> New Revision: 323518 >> URL: https://svnweb.freebsd.org/changeset/base/323518 >> >> Log: >> Jenkins i386 LINT build uses NOTES to generate its LINT kernel confi= g. >> =20 >> ixl(4) isn't in here either, so I'll remove lio(4) too. >=20 > ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better = yet, > just fix the build on !amd64) >=20 In the case of lio(4), Cavium is explicitly not compiling for 32 bit architectures. I'm inquiring to find out if they want to build on the other 64bit architectures we have. In the case of ixl(4), Intel has said that this is not supported on 32bit architectures. I'm unsure what the best course of action is. sean --T63TJMWNOokQmlvXAtSxucm6Cn5TduO8M-- --Ds1fvJegLutcNiTU8WEWQ7OXvhJSpqf5b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlm5SjZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LaOmwf8CS0iCKyRR2XEWZiyz4dS0//cWcHMlvAMEr1UNyuHTwniJmSV102znVi3 jCqkSgfYCXztoqGjQ83ZpxJhz8G+io69ZhBMwO82H4qJFoWi2pHun3dwlHo5jSkO omxbR6kxUOB5JKWs79S8PVfsA+Y6Qc3JXBUIBrfoEvOjecQdZpTAzDsBoFNLERtc 4cSqm+pIuz260ThJjXh2w6tInX1TqCxqg1/i5mXWmhTRDoXVeiDHK10zn8Hptz4J td1Mrn9Mc1L0viag+Hs8a/I2GkkvN2tM1DTezG0QOWqI9cU4wndL+llggsFdbmt/ ETNZk1B9N4sGiB/7qidTamWwXtYKcA== =P5/g -----END PGP SIGNATURE----- --Ds1fvJegLutcNiTU8WEWQ7OXvhJSpqf5b-- From owner-svn-src-head@freebsd.org Wed Sep 13 15:12:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F943E00A7C; Wed, 13 Sep 2017 15:12:52 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BED569438; Wed, 13 Sep 2017 15:12:51 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-215-166.albq.qwest.net [67.0.215.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 076C6192892; Wed, 13 Sep 2017 15:12:49 +0000 (UTC) Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys To: Cy Schubert , Ngie Cooper Cc: Stephen Hurd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> From: Sean Bruno Message-ID: <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> Date: Wed, 13 Sep 2017 09:12:50 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201709130711.v8D7BlTS003204@slippy.cwsent.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="K3RXSO7fXoxBXqJUE1dpQ1sEQkuJPg1DQ" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 15:12:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --K3RXSO7fXoxBXqJUE1dpQ1sEQkuJPg1DQ Content-Type: multipart/mixed; boundary="lalB5jI6dIhQxjTp1UFWH9Jx4OpW69Pfe"; protected-headers="v1" From: Sean Bruno To: Cy Schubert , Ngie Cooper Cc: Stephen Hurd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> In-Reply-To: <201709130711.v8D7BlTS003204@slippy.cwsent.com> --lalB5jI6dIhQxjTp1UFWH9Jx4OpW69Pfe Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable >>> #blamebruno >>> >>> Reviewed by: sbruno >>> Approved by: sbruno (mentor) >>> Sponsored by: Limelight Networks >>> Differential Revision: https://reviews.freebsd.org/D12235 >> >> *gasps at the LoC count and number of changed drivers* >> >> Could someone please better break this up in the future..? >=20 > Agreed. Down the road parsing out individual commits in this jumbo comm= it=20 > will be difficult to parse. IMO this may as well have simply been, impo= rt=20 > from https://github.com/mattmacy/networking/, just like Mr. Torvalds do= es=20 > at kernel.org. I expect to see a commit like this there but not here. C= an=20 > we break this down to its functional commits? >=20 >=20 This ridiculous loc was due to the amount of restructuring needed to get us back to being in sync with our development. The future will not have this big of a commit/change and should be more bite/fun sized. The #blamebruno tag in the commit log was to indicate that this was not something Stephen was doing on his own, but was something that I had induced over the last few months during testing. sean --lalB5jI6dIhQxjTp1UFWH9Jx4OpW69Pfe-- --K3RXSO7fXoxBXqJUE1dpQ1sEQkuJPg1DQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlm5SvJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LZpuwgAy8yZrzJL2sIlt5KN4zKPB3u6sIrdULD0DuYjuG8kV0sZD/jGj0xBsHtM 9KGbkrWVTAfzUQFlXCc+8oi4a4FZBHnD0wubt0t5K++hE+HtkdZIbkF86OUNbrHj i/3x1y1ZgyMsXvlHZA1MMLXTmAIrpxcz0FO37lx4JsM1TLlLGD+ME8pLNHw8ylRL xXfOwle8HMazso8V1Fwtn5zWuV6WOOS5aJFUwXceWMzBbdroA68OJNCzF/Pw2Sxh Un18XphIQ7XHtfipTWpmTlcagws2NA2nZuMh2RZs7DvwNUaJFOze2fcZNJ4qnnLC dnjFpwOknQ/DzBXMexP02PNR7AIbNw== =ACW6 -----END PGP SIGNATURE----- --K3RXSO7fXoxBXqJUE1dpQ1sEQkuJPg1DQ-- From owner-svn-src-head@freebsd.org Wed Sep 13 15:17:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C21E00C92; Wed, 13 Sep 2017 15:17:37 +0000 (UTC) (envelope-from sbruno@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 CF9C16960A; Wed, 13 Sep 2017 15:17:36 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DFHZCD077693; Wed, 13 Sep 2017 15:17:35 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DFHZI9077692; Wed, 13 Sep 2017 15:17:35 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201709131517.v8DFHZI9077692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 13 Sep 2017 15:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323543 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 323543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 15:17:37 -0000 Author: sbruno Date: Wed Sep 13 15:17:35 2017 New Revision: 323543 URL: https://svnweb.freebsd.org/changeset/base/323543 Log: Don't (try to) build lio(4) if the SOURCELESS_UCODE is set. Submitted by: Fabien Keil Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Sep 13 14:30:30 2017 (r323542) +++ head/sys/modules/Makefile Wed Sep 13 15:17:35 2017 (r323543) @@ -711,7 +711,9 @@ _ixl= ixl _ixlv= ixlv _linux64= linux64 _linux_common= linux_common +.if ${MK_SOURCELESS_UCODE} != "no" _lio= lio +.endif _ntb= ntb _pms= pms _qlxge= qlxge From owner-svn-src-head@freebsd.org Wed Sep 13 15:44:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 098E0E01DF7; Wed, 13 Sep 2017 15:44:56 +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 C7EAD6A620; Wed, 13 Sep 2017 15:44:55 +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 v8DFishU089915; Wed, 13 Sep 2017 15:44:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DFispa089913; Wed, 13 Sep 2017 15:44:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709131544.v8DFispa089913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 13 Sep 2017 15:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323544 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 15:44:56 -0000 Author: markj Date: Wed Sep 13 15:44:54 2017 New Revision: 323544 URL: https://svnweb.freebsd.org/changeset/base/323544 Log: Fix a logic error in the item size calculation for internal UMA zones. Kegs for internal zones always keep the slab header in the slab itself. Therefore, when determining the allocation size, we need to take the slab header size into account. Reported and tested by: ae, rakuco Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12342 Modified: head/sys/vm/uma_core.c head/sys/vm/vm_page.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Sep 13 15:17:35 2017 (r323543) +++ head/sys/vm/uma_core.c Wed Sep 13 15:44:54 2017 (r323544) @@ -1306,10 +1306,6 @@ keg_large_init(uma_keg_t keg) keg->uk_ipers = 1; keg->uk_rsize = keg->uk_size; - /* We can't do OFFPAGE if we're internal, bail out here. */ - if (keg->uk_flags & UMA_ZFLAG_INTERNAL) - return; - /* Check whether we have enough space to not do OFFPAGE. */ if ((keg->uk_flags & UMA_ZONE_OFFPAGE) == 0) { shsize = sizeof(struct uma_slab); @@ -1317,8 +1313,17 @@ keg_large_init(uma_keg_t keg) shsize = (shsize & ~UMA_ALIGN_PTR) + (UMA_ALIGN_PTR + 1); - if ((PAGE_SIZE * keg->uk_ppera) - keg->uk_rsize < shsize) - keg->uk_flags |= UMA_ZONE_OFFPAGE; + if (PAGE_SIZE * keg->uk_ppera - keg->uk_rsize < shsize) { + /* + * We can't do OFFPAGE if we're internal, in which case + * we need an extra page per allocation to contain the + * slab header. + */ + if ((keg->uk_flags & UMA_ZFLAG_INTERNAL) == 0) + keg->uk_flags |= UMA_ZONE_OFFPAGE; + else + keg->uk_ppera++; + } } if ((keg->uk_flags & UMA_ZONE_OFFPAGE) && Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Sep 13 15:17:35 2017 (r323543) +++ head/sys/vm/vm_page.c Wed Sep 13 15:44:54 2017 (r323544) @@ -473,7 +473,8 @@ vm_page_startup(vm_offset_t vaddr) * in proportion to the zone structure size. */ pages_per_zone = howmany(sizeof(struct uma_zone) + - sizeof(struct uma_cache) * (mp_maxid + 1), UMA_SLAB_SIZE); + sizeof(struct uma_cache) * (mp_maxid + 1) + + roundup2(sizeof(struct uma_slab), sizeof(void *)), UMA_SLAB_SIZE); if (pages_per_zone > 1) { /* Reserve more pages so that we don't run out. */ boot_pages = UMA_BOOT_PAGES_ZONES * pages_per_zone; From owner-svn-src-head@freebsd.org Wed Sep 13 16:13:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D17DDE037DE; Wed, 13 Sep 2017 16:13:15 +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 9BAA16BEB6; Wed, 13 Sep 2017 16:13:15 +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 v8DGDEJ4002350; Wed, 13 Sep 2017 16:13:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGDEIE002349; Wed, 13 Sep 2017 16:13:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201709131613.v8DGDEIE002349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Sep 2017 16:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323547 - head/lib/libedit X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/libedit X-SVN-Commit-Revision: 323547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:13:15 -0000 Author: pfg Date: Wed Sep 13 16:13:14 2017 New Revision: 323547 URL: https://svnweb.freebsd.org/changeset/base/323547 Log: libedit: add missing bracket. We never hit this because we always build with widechar support. Reported by: cognet MFC after: 3 days Modified: head/lib/libedit/chartype.c Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Wed Sep 13 16:05:26 2017 (r323546) +++ head/lib/libedit/chartype.c Wed Sep 13 16:13:14 2017 (r323547) @@ -223,6 +223,7 @@ ct_mbrtowc(wchar_t *wc, const char *s, size_t n) size_t ct_mbrtowc(wchar_t *wc, const char *s, size_t n) +{ if (s == NULL) return 0; if (n == 0) From owner-svn-src-head@freebsd.org Wed Sep 13 16:24:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C942E0412E; Wed, 13 Sep 2017 16:24:00 +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 5A0E86C7C3; Wed, 13 Sep 2017 16:24:00 +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 v8DGNx6A006763; Wed, 13 Sep 2017 16:23:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGNxE0006762; Wed, 13 Sep 2017 16:23:59 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709131623.v8DGNxE0006762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 13 Sep 2017 16:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323549 - head/sys/dev/intpm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/intpm X-SVN-Commit-Revision: 323549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:24:00 -0000 Author: cem Date: Wed Sep 13 16:23:59 2017 New Revision: 323549 URL: https://svnweb.freebsd.org/changeset/base/323549 Log: intpm(4): Do not attach if io_res can not be allocated Attempts to use the driver without an io_res result in immediate panic. Sponsored by: Dell EMC Isilon Modified: head/sys/dev/intpm/intpm.c Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Wed Sep 13 16:21:11 2017 (r323548) +++ head/sys/dev/intpm/intpm.c Wed Sep 13 16:23:59 2017 (r323549) @@ -191,6 +191,10 @@ sb8xx_attach(device_t dev) } sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid, RF_ACTIVE); + if (sc->io_res == NULL) { + device_printf(dev, "Could not allocate I/O space\n"); + return (ENXIO); + } sc->poll = 1; return (0); } From owner-svn-src-head@freebsd.org Wed Sep 13 16:31:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 870B7E04559; Wed, 13 Sep 2017 16:31:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 601B46CBB7; Wed, 13 Sep 2017 16:31:01 +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 mail.baldwin.cx (Postfix) with ESMTPSA id 9767D10A7DB; Wed, 13 Sep 2017 12:30:59 -0400 (EDT) From: John Baldwin To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323518 - head/sys/conf Date: Wed, 13 Sep 2017 09:26:38 -0700 Message-ID: <2493527.d9eFbJjTgo@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <9497208.8lqLTVLir6@ralph.baldwin.cx> 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.4.3 (mail.baldwin.cx); Wed, 13 Sep 2017 12:30:59 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:31:02 -0000 On Wednesday, September 13, 2017 09:09:42 AM Sean Bruno wrote: > > On 09/13/17 08:35, John Baldwin wrote: > > On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: > >> Author: sbruno > >> Date: Wed Sep 13 03:56:03 2017 > >> New Revision: 323518 > >> URL: https://svnweb.freebsd.org/changeset/base/323518 > >> > >> Log: > >> Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. > >> > >> ixl(4) isn't in here either, so I'll remove lio(4) too. > > > > ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better yet, > > just fix the build on !amd64) > > > > > In the case of lio(4), Cavium is explicitly not compiling for 32 bit > architectures. I'm inquiring to find out if they want to build on the > other 64bit architectures we have. > > In the case of ixl(4), Intel has said that this is not supported on > 32bit architectures. > > I'm unsure what the best course of action is. The bug is more if drivers aren't in NOTES at all. Any thing listed in sys/conf/files.* should be in some NOTES file, either sys/conf/NOTES for things that are MI or sys/${arch}/conf/NOTES for things that are MD. -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 13 16:35:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5515DE049DE; Wed, 13 Sep 2017 16:35:19 +0000 (UTC) (envelope-from gordon@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 2BD8C6D132; Wed, 13 Sep 2017 16:35:19 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DGZIY8010758; Wed, 13 Sep 2017 16:35:18 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGZGFB010742; Wed, 13 Sep 2017 16:35:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709131635.v8DGZGFB010742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 13 Sep 2017 16:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323550 - in head: . etc/defaults etc/periodic/weekly libexec/makewhatis.local share/man/man5 sys/mips/rmi targets/pseudo/userland tools/build/mk tools/build/options usr.bin usr.bin/cat... X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in head: . etc/defaults etc/periodic/weekly libexec/makewhatis.local share/man/man5 sys/mips/rmi targets/pseudo/userland tools/build/mk tools/build/options usr.bin usr.bin/catman usr.bin/su usr.sbin/c... X-SVN-Commit-Revision: 323550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:35:19 -0000 Author: gordon Date: Wed Sep 13 16:35:16 2017 New Revision: 323550 URL: https://svnweb.freebsd.org/changeset/base/323550 Log: Deorbit catman. The tradeoff of disk for performance has long since tipped in favor of just rendering the manpage instead of relying on pre-formatted catpages. Note, this does not impede the ability to use existing catpages, it just removes the utility to generate them. Reviewed by: imp, allanjude Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D12317 Deleted: head/etc/periodic/weekly/330.catman head/usr.bin/catman/ Modified: head/ObsoleteFiles.inc head/etc/defaults/periodic.conf head/etc/periodic/weekly/Makefile head/libexec/makewhatis.local/Makefile head/libexec/makewhatis.local/makewhatis.local.8 head/libexec/makewhatis.local/makewhatis.local.sh head/share/man/man5/periodic.conf.5 head/share/man/man5/rc.conf.5 head/share/man/man5/src.conf.5 head/sys/mips/rmi/rootfs_list.txt head/targets/pseudo/userland/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/build/options/WITHOUT_MAN_UTILS head/usr.bin/Makefile head/usr.bin/su/su.1 head/usr.sbin/crunch/examples/really-big.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Sep 13 16:23:59 2017 (r323549) +++ head/ObsoleteFiles.inc Wed Sep 13 16:35:16 2017 (r323550) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20170913: remove unneeded catman utility +OLD_FILES+=etc/periodic/weekly/330.catman +OLD_FILES+=usr/bin/catman +OLD_FILES+=usr/libexec/catman.local +OLD_FILES+=usr/share/man/man1/catman.1.gz +OLD_FILES+=usr/share/man/man8/catman.local.8.gz + # 20170802: ksyms(4) ioctl interface was removed OLD_FILES+=usr/include/sys/ksyms.h Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Wed Sep 13 16:23:59 2017 (r323549) +++ head/etc/defaults/periodic.conf Wed Sep 13 16:35:16 2017 (r323550) @@ -181,9 +181,6 @@ weekly_locate_enable="YES" # Update locate weekly # 320.whatis weekly_whatis_enable="YES" # Update whatis weekly -# 330.catman -weekly_catman_enable="NO" # Preformat man pages - # 340.noid weekly_noid_enable="NO" # Find unowned files weekly_noid_dirs="/" # Look here Modified: head/etc/periodic/weekly/Makefile ============================================================================== --- head/etc/periodic/weekly/Makefile Wed Sep 13 16:23:59 2017 (r323549) +++ head/etc/periodic/weekly/Makefile Wed Sep 13 16:35:16 2017 (r323550) @@ -13,7 +13,7 @@ FILES+= 310.locate .endif .if ${MK_MAN_UTILS} != "no" -FILES+= 320.whatis 330.catman +FILES+= 320.whatis .endif .include Modified: head/libexec/makewhatis.local/Makefile ============================================================================== --- head/libexec/makewhatis.local/Makefile Wed Sep 13 16:23:59 2017 (r323549) +++ head/libexec/makewhatis.local/Makefile Wed Sep 13 16:35:16 2017 (r323550) @@ -3,7 +3,5 @@ SCRIPTS= makewhatis.local.sh MAN= makewhatis.local.8 SCRIPTSDIR= ${LIBEXECDIR} -LINKS= ${SCRIPTSDIR}/makewhatis.local ${SCRIPTSDIR}/catman.local -MLINKS= makewhatis.local.8 catman.local.8 .include Modified: head/libexec/makewhatis.local/makewhatis.local.8 ============================================================================== --- head/libexec/makewhatis.local/makewhatis.local.8 Wed Sep 13 16:23:59 2017 (r323549) +++ head/libexec/makewhatis.local/makewhatis.local.8 Wed Sep 13 16:35:16 2017 (r323550) @@ -27,22 +27,19 @@ .Dt MAKEWHATIS.LOCAL 8 .Os .Sh NAME -.Nm makewhatis.local , catman.local -.Nd start makewhatis or catman for local file systems +.Nm makewhatis.local +.Nd start makewhatis for local file systems .Sh SYNOPSIS .Nm /usr/libexec/makewhatis.local .Op options .Ar directories ... -.Nm /usr/libexec/catman.local -.Op options -.Ar directories ... .Sh DESCRIPTION The .Nm utility starts .Xr makewhatis 1 only for file systems physically mounted on the system -where the +where .Nm is being executed. Running makewhatis @@ -53,25 +50,14 @@ your NFS server -- all NFS clients start makewhatis at So use this wrapper for .Xr cron 8 instead of calling makewhatis directly. -The -.Nm catman.local -utility is using for same purposes as -.Nm -but for -.Xr catman 1 . .Sh FILES .Bl -tag -width /etc/periodic/weekly/320.whatis.XXX -compact .It Pa /etc/periodic/weekly/320.whatis run .Nm every week -.It Pa /etc/periodic/weekly/330.catman -run -.Nm catman.local -every week .El .Sh SEE ALSO -.Xr catman 1 , .Xr find 1 , .Xr makewhatis 1 , .Xr cron 8 , Modified: head/libexec/makewhatis.local/makewhatis.local.sh ============================================================================== --- head/libexec/makewhatis.local/makewhatis.local.sh Wed Sep 13 16:23:59 2017 (r323549) +++ head/libexec/makewhatis.local/makewhatis.local.sh Wed Sep 13 16:35:16 2017 (r323550) @@ -31,8 +31,6 @@ # /usr may kill your NFS server -- all clients start makewhatis at the same # time! So use this wrapper instead calling makewhatis directly. # -# PS: this wrapper works also for catman(1) -# # $FreeBSD$ PATH=/bin:/usr/bin:$PATH; export PATH Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Wed Sep 13 16:23:59 2017 (r323549) +++ head/share/man/man5/periodic.conf.5 Wed Sep 13 16:35:16 2017 (r323550) @@ -593,15 +593,6 @@ if you want to run This script regenerates the database used by the .Xr apropos 1 command. -.It Va weekly_catman_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Pa /usr/libexec/catman.local . -This script processes all out of date manual pages, speeding up the -.Xr man 1 -command at the expense of disk space. .It Va weekly_noid_enable .Pq Vt bool Set to Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Wed Sep 13 16:23:59 2017 (r323549) +++ head/share/man/man5/rc.conf.5 Wed Sep 13 16:35:16 2017 (r323550) @@ -4453,7 +4453,6 @@ configuration file. .It Pa /etc/rc.conf.local .El .Sh SEE ALSO -.Xr catman 1 , .Xr chmod 1 , .Xr gdb 1 , .Xr info 1 , Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Sep 13 16:23:59 2017 (r323549) +++ head/share/man/man5/src.conf.5 Wed Sep 13 16:35:16 2017 (r323550) @@ -1069,7 +1069,6 @@ Only the uncompressed versions will be installed. .It Va WITHOUT_MAN_UTILS Set to not build utilities for manual pages, .Xr apropos 1 , -.Xr catman 1 , .Xr makewhatis 1 , .Xr man 1 , .Xr whatis 1 , Modified: head/sys/mips/rmi/rootfs_list.txt ============================================================================== --- head/sys/mips/rmi/rootfs_list.txt Wed Sep 13 16:23:59 2017 (r323549) +++ head/sys/mips/rmi/rootfs_list.txt Wed Sep 13 16:35:16 2017 (r323550) @@ -158,7 +158,6 @@ ./etc/periodic/weekly/999.local ./etc/periodic/weekly/310.locate ./etc/periodic/weekly/320.whatis -./etc/periodic/weekly/330.catman ./etc/periodic/weekly/400.status-pkg ./etc/ppp ./etc/ppp/ppp.conf Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Wed Sep 13 16:23:59 2017 (r323549) +++ head/targets/pseudo/userland/Makefile.depend Wed Sep 13 16:35:16 2017 (r323550) @@ -182,7 +182,6 @@ DIRDEPS+= \ usr.bin/c99 \ usr.bin/calendar \ usr.bin/cap_mkdb \ - usr.bin/catman \ usr.bin/chat \ usr.bin/checknr \ usr.bin/chkey \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 13 16:23:59 2017 (r323549) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 13 16:35:16 2017 (r323550) @@ -6097,24 +6097,19 @@ OLD_DIRS+=${MAN_DIRS} .if ${MK_MAN_UTILS} == no OLD_FILES+=etc/periodic/weekly/320.whatis -OLD_FILES+=etc/periodic/weekly/330.catman OLD_FILES+=usr/bin/apropos -OLD_FILES+=usr/bin/catman OLD_FILES+=usr/bin/makewhatis OLD_FILES+=usr/bin/man OLD_FILES+=usr/bin/manpath OLD_FILES+=usr/bin/whatis -OLD_FILES+=usr/libexec/catman.local OLD_FILES+=usr/libexec/makewhatis.local OLD_FILES+=usr/sbin/manctl OLD_FILES+=usr/share/man/man1/apropos.1.gz -OLD_FILES+=usr/share/man/man1/catman.1.gz OLD_FILES+=usr/share/man/man1/makewhatis.1.gz OLD_FILES+=usr/share/man/man1/man.1.gz OLD_FILES+=usr/share/man/man1/manpath.1.gz OLD_FILES+=usr/share/man/man1/whatis.1.gz OLD_FILES+=usr/share/man/man5/man.conf.5.gz -OLD_FILES+=usr/share/man/man8/catman.local.8.gz OLD_FILES+=usr/share/man/man8/makewhatis.local.8.gz OLD_FILES+=usr/share/man/man8/manctl.8.gz OLD_FILES+=usr/share/man/whatis Modified: head/tools/build/options/WITHOUT_MAN_UTILS ============================================================================== --- head/tools/build/options/WITHOUT_MAN_UTILS Wed Sep 13 16:23:59 2017 (r323549) +++ head/tools/build/options/WITHOUT_MAN_UTILS Wed Sep 13 16:35:16 2017 (r323550) @@ -1,7 +1,6 @@ .\" $FreeBSD$ Set to not build utilities for manual pages, .Xr apropos 1 , -.Xr catman 1 , .Xr makewhatis 1 , .Xr man 1 , .Xr whatis 1 , Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Sep 13 16:23:59 2017 (r323549) +++ head/usr.bin/Makefile Wed Sep 13 16:35:16 2017 (r323550) @@ -239,7 +239,6 @@ SUBDIR.${MK_MAIL}+= from SUBDIR.${MK_MAIL}+= mail SUBDIR.${MK_MAIL}+= msgs SUBDIR.${MK_MAKE}+= bmake -SUBDIR.${MK_MAN_UTILS}+= catman SUBDIR.${MK_MAN_UTILS}+= man SUBDIR.${MK_NETCAT}+= nc SUBDIR.${MK_NIS}+= ypcat Modified: head/usr.bin/su/su.1 ============================================================================== --- head/usr.bin/su/su.1 Wed Sep 13 16:23:59 2017 (r323549) +++ head/usr.bin/su/su.1 Wed Sep 13 16:35:16 2017 (r323550) @@ -194,24 +194,24 @@ PAM configuration for .El .Sh EXAMPLES .Bl -tag -width 5n -compact -.It Li "su -m man -c catman" +.It Li "su -m operator -c poweroff" Starts a shell as user -.Li man , +.Li operator , and runs the command -.Li catman . -You will be asked for man's password unless your real UID is 0. +.Li poweroff . +You will be asked for operator's password unless your real UID is 0. Note that the .Fl m option is required since user -.Dq man +.Dq operator does not have a valid shell by default. In this example, .Fl c is passed to the shell of the user -.Dq man , +.Dq operator , and is not interpreted as an argument to .Nm . -.It Li "su -m man -c 'catman /usr/share/man /usr/local/man'" +.It Li "su -m operator -c 'shutdown -p now'" Same as above, but the target command consists of more than a single word and hence is quoted for use with the .Fl c @@ -219,7 +219,7 @@ option being passed to the shell. (Most shells expect the argument to .Fl c to be a single word). -.It Li "su -m -c staff man -c 'catman /usr/share/man /usr/local/man'" +.It Li "su -m -c staff operator -c 'shutdown -p now'" Same as above, but the target command is run with the resource limits of the login class .Dq staff . Modified: head/usr.sbin/crunch/examples/really-big.conf ============================================================================== --- head/usr.sbin/crunch/examples/really-big.conf Wed Sep 13 16:23:59 2017 (r323549) +++ head/usr.sbin/crunch/examples/really-big.conf Wed Sep 13 16:35:16 2017 (r323550) @@ -67,7 +67,7 @@ special tn3270 srcdir /usr/src/usr.bin/tn3270/tn3270 srcdirs /usr/src/usr.sbin -progs ac accton amd arp bad144 catman chown chroot config config.new cron +progs ac accton amd arp bad144 chown chroot config config.new cron progs dev_mkdb diskpart edquota flcopy gettable grfinfo hilinfo htable inetd progs iostat iteconfig kvm_mkdb mtree named portmap pppd progs pstat pwd_mkdb quot quotaon rarpd rbootd repquota rmt rpc.bootparamd From owner-svn-src-head@freebsd.org Wed Sep 13 16:37:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1424AE04BD8 for ; Wed, 13 Sep 2017 16:37:57 +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 EBCD36D2E1 for ; Wed, 13 Sep 2017 16:37:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ee9c36bf-98a1-11e7-950d-03a3531dacf2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id ee9c36bf-98a1-11e7-950d-03a3531dacf2; Wed, 13 Sep 2017 16:38:12 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8DGbtgD017846; Wed, 13 Sep 2017 10:37:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1505320675.32063.123.camel@freebsd.org> Subject: Re: svn commit: r323518 - head/sys/conf From: Ian Lepore To: John Baldwin , Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 13 Sep 2017 10:37:55 -0600 In-Reply-To: <2493527.d9eFbJjTgo@ralph.baldwin.cx> References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <9497208.8lqLTVLir6@ralph.baldwin.cx> <2493527.d9eFbJjTgo@ralph.baldwin.cx> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:37:57 -0000 On Wed, 2017-09-13 at 09:26 -0700, John Baldwin wrote: > On Wednesday, September 13, 2017 09:09:42 AM Sean Bruno wrote: > > > > > > On 09/13/17 08:35, John Baldwin wrote: > > > > > > On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: > > > > > > > > Author: sbruno > > > > Date: Wed Sep 13 03:56:03 2017 > > > > New Revision: 323518 > > > > URL: https://svnweb.freebsd.org/changeset/base/323518 > > > > > > > > Log: > > > >   Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. > > > >    > > > >   ixl(4) isn't in here either, so I'll remove lio(4) too. > > > ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better yet, > > > just fix the build on !amd64) > > > > > > > In the case of lio(4), Cavium is explicitly not compiling for 32 bit > > architectures.  I'm inquiring to find out if they want to build on the > > other 64bit architectures we have. > > > > In the case of ixl(4), Intel has said that this is not supported on > > 32bit architectures. > > > > I'm unsure what the best course of action is. > The bug is more if drivers aren't in NOTES at all.  Any thing listed in > sys/conf/files.* should be in some NOTES file, either sys/conf/NOTES for > things that are MI or sys/${arch}/conf/NOTES for things that are MD. > Didn't somebody start a task list of things for junior hackers to work on?  Writing a script/tool to verify the assertion in that last sentence seems like a good candidate for such a list. -- Ian From owner-svn-src-head@freebsd.org Wed Sep 13 16:43:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43824E050F5; Wed, 13 Sep 2017 16:43: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 110756D7FD; Wed, 13 Sep 2017 16:43:32 +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 v8DGhW9E014852; Wed, 13 Sep 2017 16:43:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGhW4a014851; Wed, 13 Sep 2017 16:43:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709131643.v8DGhW4a014851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 13 Sep 2017 16:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323551 - head/sys/dev/intpm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/intpm X-SVN-Commit-Revision: 323551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:43:33 -0000 Author: cem Date: Wed Sep 13 16:43:31 2017 New Revision: 323551 URL: https://svnweb.freebsd.org/changeset/base/323551 Log: intpm(4): While here, remove redundant 'res' check Reported by: avg Sponsored by: Dell EMC Isilon Modified: head/sys/dev/intpm/intpm.c Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Wed Sep 13 16:35:16 2017 (r323550) +++ head/sys/dev/intpm/intpm.c Wed Sep 13 16:43:31 2017 (r323551) @@ -185,10 +185,6 @@ sb8xx_attach(device_t dev) device_printf(dev, "bus_set_resource for SMBus IO failed\n"); return (ENXIO); } - if (res == NULL) { - device_printf(dev, "bus_alloc_resource for SMBus IO failed\n"); - return (ENXIO); - } sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid, RF_ACTIVE); if (sc->io_res == NULL) { From owner-svn-src-head@freebsd.org Wed Sep 13 16:47:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BBFAE05367; Wed, 13 Sep 2017 16:47:24 +0000 (UTC) (envelope-from glebius@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 1BC086D9FF; Wed, 13 Sep 2017 16:47:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DGlNLX015037; Wed, 13 Sep 2017 16:47:23 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGlNTY015036; Wed, 13 Sep 2017 16:47:23 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201709131647.v8DGlNTY015036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 13 Sep 2017 16:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323552 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:47:24 -0000 Author: glebius Date: Wed Sep 13 16:47:23 2017 New Revision: 323552 URL: https://svnweb.freebsd.org/changeset/base/323552 Log: Fix two issues with not ready data in sockets (read: sendfile) in UNIX sockets. o Check that socket is still connected in uipc_ready(). If not we are responsible to free mbufs. o In uipc_send() if socket appears to be disconnected, but we are sending data with pending I/Os, don't free mbufs. Reported by: Kevin Bowling Tested by: Kevin Bowling PR: 222259 Reported by: Mark Martinec MFC after: 3 days Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Wed Sep 13 16:43:31 2017 (r323551) +++ head/sys/kern/uipc_usrreq.c Wed Sep 13 16:47:23 2017 (r323552) @@ -1056,7 +1056,11 @@ uipc_send(struct socket *so, int flags, struct mbuf *m release: if (control != NULL) m_freem(control); - if (m != NULL) + /* + * In case of PRUS_NOTREADY, uipc_ready() is responsible + * for freeing memory. + */ + if (m != NULL && (flags & PRUS_NOTREADY) == 0) m_freem(m); return (error); } @@ -1071,7 +1075,12 @@ uipc_ready(struct socket *so, struct mbuf *m, int coun unp = sotounpcb(so); UNP_LINK_RLOCK(); - unp2 = unp->unp_conn; + if ((unp2 = unp->unp_conn) == NULL) { + UNP_LINK_RUNLOCK(); + for (int i = 0; i < count; i++) + m = m_free(m); + return (ECONNRESET); + } UNP_PCB_LOCK(unp2); so2 = unp2->unp_socket; From owner-svn-src-head@freebsd.org Wed Sep 13 16:54:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB04EE0589A; Wed, 13 Sep 2017 16:54:28 +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 B6C026DFC7; Wed, 13 Sep 2017 16:54:28 +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 v8DGsRYu019090; Wed, 13 Sep 2017 16:54:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DGsRPN019085; Wed, 13 Sep 2017 16:54:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709131654.v8DGsRPN019085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 13 Sep 2017 16:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323553 - in head/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic X-SVN-Commit-Revision: 323553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:54:29 -0000 Author: ian Date: Wed Sep 13 16:54:27 2017 New Revision: 323553 URL: https://svnweb.freebsd.org/changeset/base/323553 Log: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers. This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early. Modified: head/sys/arm/at91/at91_twi.c head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c head/sys/arm/freescale/imx/imx_i2c.c head/sys/arm/ti/ti_i2c.c head/sys/dev/glxiic/glxiic.c Modified: head/sys/arm/at91/at91_twi.c ============================================================================== --- head/sys/arm/at91/at91_twi.c Wed Sep 13 16:47:23 2017 (r323552) +++ head/sys/arm/at91/at91_twi.c Wed Sep 13 16:54:27 2017 (r323553) @@ -160,8 +160,8 @@ at91_twi_attach(device_t dev) if ((sc->iicbus = device_add_child(dev, "iicbus", -1)) == NULL) device_printf(dev, "could not allocate iicbus instance\n"); - /* probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) at91_twi_deactivate(dev); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Sep 13 16:47:23 2017 (r323552) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Sep 13 16:54:27 2017 (r323553) @@ -309,7 +309,10 @@ bcm_bsc_attach(device_t dev) return (ENXIO); } - return (bus_generic_attach(dev)); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + + return (0); } static int Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Wed Sep 13 16:47:23 2017 (r323552) +++ head/sys/arm/freescale/imx/imx_i2c.c Wed Sep 13 16:54:27 2017 (r323553) @@ -443,7 +443,8 @@ no_recovery: /* We don't do a hardware reset here because iicbus_attach() does it. */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); return (0); } Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Wed Sep 13 16:47:23 2017 (r323552) +++ head/sys/arm/ti/ti_i2c.c Wed Sep 13 16:54:27 2017 (r323553) @@ -37,11 +37,6 @@ * incorporate that sometime in the future. The idea being that for transaction * larger than a certain size the DMA engine is used, for anything less the * normal interrupt/fifo driven option is used. - * - * - * WARNING: This driver uses mtx_sleep and interrupts to perform transactions, - * which means you can't do a transaction during startup before the interrupts - * have been enabled. Hint - the freebsd function config_intrhook_establish(). */ #include @@ -909,8 +904,8 @@ ti_i2c_attach(device_t dev) goto out; } - /* Probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) { Modified: head/sys/dev/glxiic/glxiic.c ============================================================================== --- head/sys/dev/glxiic/glxiic.c Wed Sep 13 16:47:23 2017 (r323552) +++ head/sys/dev/glxiic/glxiic.c Wed Sep 13 16:54:27 2017 (r323553) @@ -408,11 +408,10 @@ glxiic_attach(device_t dev) glxiic_gpio_enable(sc); glxiic_smb_enable(sc, IIC_FASTEST, 0); - error = bus_generic_attach(dev); - if (error != 0) { - device_printf(dev, "Could not probe and attach children\n"); - error = ENXIO; - } + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + error = 0; + out: if (error != 0) { callout_drain(&sc->callout); From owner-svn-src-head@freebsd.org Wed Sep 13 16:56:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A2F9E05A81; Wed, 13 Sep 2017 16:56:36 +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 5EB566E192; Wed, 13 Sep 2017 16:56:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id BBD9BD4AF9B; Thu, 14 Sep 2017 02:56:26 +1000 (AEST) Date: Thu, 14 Sep 2017 02:56:25 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323518 - head/sys/conf In-Reply-To: <2493527.d9eFbJjTgo@ralph.baldwin.cx> Message-ID: <20170914023855.R833@besplex.bde.org> References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <9497208.8lqLTVLir6@ralph.baldwin.cx> <2493527.d9eFbJjTgo@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=aACBSZzDBDV-K70gFSMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 16:56:36 -0000 On Wed, 13 Sep 2017, John Baldwin wrote: > On Wednesday, September 13, 2017 09:09:42 AM Sean Bruno wrote: >> >> On 09/13/17 08:35, John Baldwin wrote: >>> On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: >>>> Author: sbruno >>>> Date: Wed Sep 13 03:56:03 2017 >>>> New Revision: 323518 >>>> URL: https://svnweb.freebsd.org/changeset/base/323518 >>>> >>>> Log: >>>> Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. >>>> >>>> ixl(4) isn't in here either, so I'll remove lio(4) too. >>> >>> ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better yet, >>> just fix the build on !amd64) >> >> In the case of lio(4), Cavium is explicitly not compiling for 32 bit >> architectures. I'm inquiring to find out if they want to build on the >> other 64bit architectures we have. >> >> In the case of ixl(4), Intel has said that this is not supported on >> 32bit architectures. >> >> I'm unsure what the best course of action is. Put it in NOTES for arches that support it. Strictly it should be in MD NOTES, but MI notes already has lots of MD buses like pci and drivers like bge that depend on pci. Some MD NOTES have many nodevice lines to kill non-MI things in MI NOTES, but apparently none needs to kill pci or the hundreds of drivers that depend on it yet. > The bug is more if drivers aren't in NOTES at all. Any thing listed in > sys/conf/files.* should be in some NOTES file, either sys/conf/NOTES for > things that are MI or sys/${arch}/conf/NOTES for things that are MD. The most broken drivers aren't even listed in sys/conf/files.*. Bruce From owner-svn-src-head@freebsd.org Wed Sep 13 17:00:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01BEAE05C41; Wed, 13 Sep 2017 17:00:04 +0000 (UTC) (envelope-from allanjude@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 D16906E37B; Wed, 13 Sep 2017 17:00:03 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DH03a0019492; Wed, 13 Sep 2017 17:00:03 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DH02ga019489; Wed, 13 Sep 2017 17:00:02 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201709131700.v8DH02ga019489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 13 Sep 2017 17:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323554 - head/sys/boot/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/boot/efi/boot1 X-SVN-Commit-Revision: 323554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 17:00:04 -0000 Author: allanjude Date: Wed Sep 13 17:00:02 2017 New Revision: 323554 URL: https://svnweb.freebsd.org/changeset/base/323554 Log: Increase EFI boot file size frok 128k to 384k generate_fat.sh does the following: - create an 800kb zero-filled file - create an md device backed by this file - format the device fat12 - mount the filesystem - create the EFI ESP directory structure - create the EFI boot file (BOOTx64 for amd64, BOOTaa64 for aarch64, etc) - Adds a marker to the beginning of the file, and pad it to 384kb - 384kb was chosen as it is less than half of 800kb, thus allowing users to keep a backup of their older boot file in the small partition - Unmount the filesystem - Scan the image and find the offset where the marker was inserted - The process requires root, to make image generation easier, images for each architecture are pregenerated, compressed with xz, and checked into svn. The Makefile that generates boot1.efifat does the following: - Ensure the compiled boot1.efi file is no larger than the generated image - Decompress the template created by generate-fat.sh - dd the contents of boot1.efi into boot1.efifat starting at the offset where the marker is found. This allows any file less than the maximum size to be written into the fat filesystem without having to mount it, so no root privileges are required. Later work by imp and myself makes bsdinstall create a 200mb fat16 instead of using this process, but it is retained to make image generation easier. Submitted by: Eric McCorkle (original version) Reviewed by: emaste, tsoome, Eric McCorkle MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9680 Added: head/sys/boot/efi/boot1/fat-amd64.tmpl.xz (contents, props changed) head/sys/boot/efi/boot1/fat-arm.tmpl.xz (contents, props changed) head/sys/boot/efi/boot1/fat-arm64.tmpl.xz (contents, props changed) head/sys/boot/efi/boot1/fat-i386.tmpl.xz (contents, props changed) Deleted: head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu head/sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/boot1/Makefile.fat head/sys/boot/efi/boot1/generate-fat.sh Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Wed Sep 13 16:54:27 2017 (r323553) +++ head/sys/boot/efi/boot1/Makefile Wed Sep 13 17:00:02 2017 (r323554) @@ -135,9 +135,7 @@ boot1.efifat: boot1.efi exit 1; \ fi echo ${.OBJDIR} - uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu - mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2 - bzip2 -f -d ${.TARGET}.bz2 + xz -d -c ${.CURDIR}/fat-${MACHINE}.tmpl.xz > ${.TARGET} ${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc CLEANFILES= boot1.efi boot1.efifat Modified: head/sys/boot/efi/boot1/Makefile.fat ============================================================================== --- head/sys/boot/efi/boot1/Makefile.fat Wed Sep 13 16:54:27 2017 (r323553) +++ head/sys/boot/efi/boot1/Makefile.fat Wed Sep 13 17:00:02 2017 (r323554) @@ -1,4 +1,4 @@ # This file autogenerated by generate-fat.sh - DO NOT EDIT # $FreeBSD$ BOOT1_OFFSET=0x2d -BOOT1_MAXSIZE=131072 +BOOT1_MAXSIZE=393216 Added: head/sys/boot/efi/boot1/fat-amd64.tmpl.xz ============================================================================== Binary file. No diff available. Added: head/sys/boot/efi/boot1/fat-arm.tmpl.xz ============================================================================== Binary file. No diff available. Added: head/sys/boot/efi/boot1/fat-arm64.tmpl.xz ============================================================================== Binary file. No diff available. Added: head/sys/boot/efi/boot1/fat-i386.tmpl.xz ============================================================================== Binary file. No diff available. Modified: head/sys/boot/efi/boot1/generate-fat.sh ============================================================================== --- head/sys/boot/efi/boot1/generate-fat.sh Wed Sep 13 16:54:27 2017 (r323553) +++ head/sys/boot/efi/boot1/generate-fat.sh Wed Sep 13 17:00:02 2017 (r323554) @@ -14,7 +14,7 @@ FAT_SIZE=1600 #Size in 512-byte blocks of the produced image BOOT1_OFFSET=2d -BOOT1_SIZE=128k +BOOT1_SIZE=384k if [ $(id -u) != 0 ]; then echo "${0##*/}: must run as root" >&2 @@ -70,13 +70,7 @@ while read ARCH FILENAME; do exit 1 fi - bzip2 $OUTPUT_FILE - echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu - echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu - echo "\$FreeBSD\$" >> $OUTPUT_FILE.bz2.uu - - uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu - rm $OUTPUT_FILE.bz2 + xz -f $OUTPUT_FILE done < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFF7EE060E3; Wed, 13 Sep 2017 17:03:03 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 893C36E90C; Wed, 13 Sep 2017 17:03:02 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 52CA813558; Wed, 13 Sep 2017 17:02:55 +0000 (UTC) Subject: Re: svn commit: r323554 - head/sys/boot/efi/boot1 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709131700.v8DH02ga019489@repo.freebsd.org> From: Allan Jude Message-ID: <905ca592-5f9e-cad2-15d9-89cb39b47b46@freebsd.org> Date: Wed, 13 Sep 2017 13:02:51 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709131700.v8DH02ga019489@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 17:03:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS Content-Type: multipart/mixed; boundary="RiBmPanumEdkELgiwMdUe8hUnVKctqwjh"; protected-headers="v1" From: Allan Jude To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <905ca592-5f9e-cad2-15d9-89cb39b47b46@freebsd.org> Subject: Re: svn commit: r323554 - head/sys/boot/efi/boot1 References: <201709131700.v8DH02ga019489@repo.freebsd.org> In-Reply-To: <201709131700.v8DH02ga019489@repo.freebsd.org> --RiBmPanumEdkELgiwMdUe8hUnVKctqwjh Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2017-09-13 13:00, Allan Jude wrote: > Author: allanjude > Date: Wed Sep 13 17:00:02 2017 > New Revision: 323554 > URL: https://svnweb.freebsd.org/changeset/base/323554 >=20 > Log: > Increase EFI boot file size frok 128k to 384k > =20 > generate_fat.sh does the following: > - create an 800kb zero-filled file > - create an md device backed by this file > - format the device fat12 > - mount the filesystem > - create the EFI ESP directory structure > - create the EFI boot file (BOOTx64 for amd64, BOOTaa64 for aarch64, = etc) > - Adds a marker to the beginning of the file, and pad it to 384kb > - 384kb was chosen as it is less than half of 800kb, thus allowing > users to keep a backup of their older boot file in the small partit= ion > - Unmount the filesystem > - Scan the image and find the offset where the marker was inserted > - The process requires root, to make image generation easier, images = for > each architecture are pregenerated, compressed with xz, and checked= > into svn. > =20 > The Makefile that generates boot1.efifat does the following: > - Ensure the compiled boot1.efi file is no larger than the generated = image > - Decompress the template created by generate-fat.sh > - dd the contents of boot1.efi into boot1.efifat starting at the offs= et > where the marker is found. This allows any file less than the maxim= um > size to be written into the fat filesystem without having to mount = it, > so no root privileges are required. > =20 > Later work by imp and myself makes bsdinstall create a 200mb fat16 in= stead > of using this process, but it is retained to make image generation ea= sier. > =20 > Submitted by: Eric McCorkle (original version) > Reviewed by: emaste, tsoome, Eric McCorkle > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D9680 >=20 > Added: > head/sys/boot/efi/boot1/fat-amd64.tmpl.xz (contents, props changed)= > head/sys/boot/efi/boot1/fat-arm.tmpl.xz (contents, props changed) > head/sys/boot/efi/boot1/fat-arm64.tmpl.xz (contents, props changed)= > head/sys/boot/efi/boot1/fat-i386.tmpl.xz (contents, props changed) > Deleted: > head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu > Modified: > head/sys/boot/efi/boot1/Makefile > head/sys/boot/efi/boot1/Makefile.fat > head/sys/boot/efi/boot1/generate-fat.sh >=20 I forgot to mention: I did away with uuencoding the binary files, because svn and git can handle binary files just fine, and it was just silly. I switched from bzip to xzip, as we are getting away from using bzip as a part of the toolchain. --=20 Allan Jude --RiBmPanumEdkELgiwMdUe8hUnVKctqwjh-- --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS 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.0.22 (MingW32) iQIcBAEBAgAGBQJZuWS+AAoJEBmVNT4SmAt+ij4P/RbwDlUFDzHX3cUjXbpMn7Sz UXUSPydbtMNHg6MlwkH1o2JGt5k+QRfeYmmJjws1TcBCClksjRGa2N7CKJqXmwdC uHTZQTBoN4tZ8XlrUF5s5ZgqwXA9DUbWDA4crw2hDoGYouYZJnGUAWMTPpgXncLH tAgbAVXvqLVspWRmnpSATBQHmePE9ICEpiUc41ljCgpboSEecJE9MBV8+IegqK/9 9VFfyKTYKg9RLm8faD2TJnsQ7B+7O+YnVO8O3u5PzipqCvZHW6GKUnm01mzZMScW ejyyF/UlLqxMzEfXjnElgFqP0Lq8Ictuz4W0w0fmcR4JCRrz/tkjr4gs07nA9kqn miNJWRwuGRpTCOJGFA9OZgaLr9yvwqP2ci5K4KMQvjc44FIKUKrDeHiX1e+kmVcX KTn2t+jGHlyMnxjxTxAZUKHsgbHMnH/CvVtIs8teCxgOTah3KihWYDo5gcwau2Gk YaA6u8s4j/JG52boXkQEalMN8m9nuahZttJJMhlqGK7rJ3h2QsBvxQ0S47aUxzF5 UmCaKhNOlxqlnq6WxgnnuPkq64mB1qvp9x8GnI0ctRrta551ENsieWZgQQCi/1Iw Zd6Se+8AXh/KubdvHMg0tGoH42ZmBOMlHjSnmpLq1YefrVlRjRGVfQRxKjvp6h8N IPekimgPbLQGQhe0gSUb =/ABy -----END PGP SIGNATURE----- --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS-- From owner-svn-src-head@freebsd.org Wed Sep 13 17:43:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C33D4E077D4; Wed, 13 Sep 2017 17:43: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 8D4126FD1E; Wed, 13 Sep 2017 17:43:19 +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 v8DHhITb039454; Wed, 13 Sep 2017 17:43:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DHhI4w039453; Wed, 13 Sep 2017 17:43:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709131743.v8DHhI4w039453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 13 Sep 2017 17:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323555 - head/sys/dev/intpm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/intpm X-SVN-Commit-Revision: 323555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 17:43:19 -0000 Author: cem Date: Wed Sep 13 17:43:18 2017 New Revision: 323555 URL: https://svnweb.freebsd.org/changeset/base/323555 Log: intpm(4): Decrease requested i/o port range width On some AMD FCH devices driven by intpm(4) (read: mine), the SMBus I/O port range is split in two and the low range is only 0x10 wide. intpm(4) does not access any registers above 0x0f, so there is no need for the wider range. Discussed with: avg Sponsored by: Dell EMC Isilon Modified: head/sys/dev/intpm/intpm.c Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Wed Sep 13 17:00:02 2017 (r323554) +++ head/sys/dev/intpm/intpm.c Wed Sep 13 17:43:18 2017 (r323555) @@ -128,7 +128,7 @@ amd_pmio_read(struct resource *res, uint8_t reg) static int sb8xx_attach(device_t dev) { - static const int AMDSB_SMBIO_WIDTH = 0x14; + static const int AMDSB_SMBIO_WIDTH = 0x10; struct intsmb_softc *sc; struct resource *res; uint32_t devid; From owner-svn-src-head@freebsd.org Wed Sep 13 17:49:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9589FE07B95; Wed, 13 Sep 2017 17:49:24 +0000 (UTC) (envelope-from np@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 5EE04700D3; Wed, 13 Sep 2017 17:49:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DHnNDQ039925; Wed, 13 Sep 2017 17:49:23 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DHnNg0039924; Wed, 13 Sep 2017 17:49:23 GMT (envelope-from np@FreeBSD.org) Message-Id: <201709131749.v8DHnNg0039924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 13 Sep 2017 17:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323556 - in head/sys: dev/cxgb/ulp modules/cxgb modules/cxgb/iw_cxgb modules/cxgb/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys: dev/cxgb/ulp modules/cxgb modules/cxgb/iw_cxgb modules/cxgb/tom X-SVN-Commit-Revision: 323556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 17:49:24 -0000 Author: np Date: Wed Sep 13 17:49:23 2017 New Revision: 323556 URL: https://svnweb.freebsd.org/changeset/base/323556 Log: Retire the T3 iWARP and TOE drivers. This saves catch-up work when OFED or other kernel infrastructure changes. Note that this doesn't affect the base cxgb(4) NIC driver for T3 at all. MFC after: No MFC. Sponsored by: Chelsio Communications Deleted: head/sys/dev/cxgb/ulp/ head/sys/modules/cxgb/iw_cxgb/ head/sys/modules/cxgb/tom/ Modified: head/sys/modules/cxgb/Makefile Modified: head/sys/modules/cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/Makefile Wed Sep 13 17:43:18 2017 (r323555) +++ head/sys/modules/cxgb/Makefile Wed Sep 13 17:49:23 2017 (r323556) @@ -5,14 +5,5 @@ SYSDIR?=${SRCTOP}/sys SUBDIR= cxgb SUBDIR+= cxgb_t3fw -SUBDIR+= ${_tom} -SUBDIR+= ${_iw_cxgb} - -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -_tom= tom -.if ${MK_OFED} != "no" || defined(ALL_MODULES) -_iw_cxgb= iw_cxgb -.endif -.endif .include From owner-svn-src-head@freebsd.org Wed Sep 13 18:15:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A8B2E08CFC; Wed, 13 Sep 2017 18:15:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.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 2744270F07; Wed, 13 Sep 2017 18:15:46 +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 mail.baldwin.cx (Postfix) with ESMTPSA id BF0E110A7B9; Wed, 13 Sep 2017 14:15:44 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314942 - head/usr.bin/awk Date: Wed, 13 Sep 2017 11:15:39 -0700 Message-ID: <5311676.nqsSxOZALl@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201703090327.v293RrEY016498@repo.freebsd.org> References: <201703090327.v293RrEY016498@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 13 Sep 2017 14:15:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 18:15:46 -0000 On Thursday, March 09, 2017 03:27:53 AM Baptiste Daroussin wrote: > Author: bapt > Date: Thu Mar 9 03:27:53 2017 > New Revision: 314942 > URL: https://svnweb.freebsd.org/changeset/base/314942 > > Log: > Import the awk(1) manpage from OpenBSD > > As discussed during AsiaBSDcon devsummit, import the manpage from OpenBSD which > is has been rewritten in mdoc(7) format making it readable by default with > mandoc, it also has been extended by OpenBSD to cover all awk(1) options > > Obtained from: OpenBSD > MFH: 1 week One problem noted today by imp@ is that this doesn't quite document the awk we ship: % echo 42 | awk '{ print lshift($1, 1) }' awk: calling undefined function lshift input record number 1, file source line number 1 None of the bit operations described in this manpage are implemented in one-true-awk. Hmm, it seems that OpenBSD added those as a local patch relative to one-true-awk in 1.10 of lex.c. So Someone(tm) needs to probably compare OpenBSD's awk to one-true-awk to see what local changes they have and either update the manpage here or pull the local diffs across. (I'd probably we just grab the implementation for the bitwise ops myself.) -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 13 18:32:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D0FDE09723; Wed, 13 Sep 2017 18:32:44 +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 3A60271756; Wed, 13 Sep 2017 18:32:44 +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 v8DIWhFR059909; Wed, 13 Sep 2017 18:32:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DIWhjD059908; Wed, 13 Sep 2017 18:32:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709131832.v8DIWhjD059908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 13 Sep 2017 18:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323557 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 323557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 18:32:44 -0000 Author: gjb Date: Wed Sep 13 18:32:43 2017 New Revision: 323557 URL: https://svnweb.freebsd.org/changeset/base/323557 Log: Remove an unneeded sentence stop. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/siba.4 Modified: head/share/man/man4/siba.4 ============================================================================== --- head/share/man/man4/siba.4 Wed Sep 13 17:49:23 2017 (r323556) +++ head/share/man/man4/siba.4 Wed Sep 13 18:32:43 2017 (r323557) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2016 +.Dd September 13, 2017 .Dt SIBA 4 .Os .Sh NAME @@ -75,7 +75,7 @@ The device driver first appeared in .Fx 8.0 . The driver was rewritten for -.Fx 11.0 . +.Fx 11.0 to support the common Broadcom .Xr bhnd 4 bus interface. From owner-svn-src-head@freebsd.org Wed Sep 13 18:40:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BE4AE09BFA for ; Wed, 13 Sep 2017 18:40:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm13-vm4.bullet.mail.ne1.yahoo.com (nm13-vm4.bullet.mail.ne1.yahoo.com [98.138.91.173]) (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 35F3D71AEB for ; Wed, 13 Sep 2017 18:40:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1505327836; bh=MlvcPt7AZCO04MjHG7VpIKUFmleTDTgzultUZSeYMZU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=Y39GC++FcmlL/CGr/y3dzBi7X1K+HTOSyK8AsC8J23suEFsVllBUxNqoe0WFvVcOcx51e57Z+ZRQ539c8i53K02aKkjnr7HOupC6CCIZkBXpZyHd+8ehabMlSe+CgtPJamv9Ebh9xWqmcka/yEnS9HPlFzPAk9npGjH2c6FMRbMYuppfgI5iXDKZYLGxV0srAcgm7nIh48UZThV5OJIJzQNdYL4Dvsh84UMpoQyncD0clnWu/Lkm9F8Ahnn+yKbeXvjcUlbffl9QvmiwnuKdiXq9H336x6FW47CxL/AKg/0+MPH/JdmOXX92xri35wBqaU/yJZfRLtrEoCiB4oBiEg== Received: from [98.138.101.129] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 13 Sep 2017 18:37:16 -0000 Received: from [98.138.84.43] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 13 Sep 2017 18:37:15 -0000 Received: from [127.0.0.1] by smtp111.mail.ne1.yahoo.com with NNFMP; 13 Sep 2017 18:37:15 -0000 X-Yahoo-Newman-Id: 982245.51129.bm@smtp111.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: E2fPxXIVM1lmr8NB_8tl0blaErb4z6S6DMQ2.amAYDahdoC QzKPLzZXv8hpkztdVwHTHZEwjRQXee9pxEDQ2VtbNQMvEcE5FR9nrfApzyiY .4VbGb_vCD3K1B2elyDMCFhI.H7VbZCz7wtFSB1K9ZiPhKBtrEwPJnvnEM5S xGQ8VR2FLK_xYgnuVCt9LYObDMuLCFgw8HVcs6sHkGiyKaOO7Alexi8fHABG mJz7CXJVpZzC83NB.jYOutojaNbPKvDlfhpYfXO4NqdNSCPp5b7J6ev3dmDg QqZaRuoh7UwRCOWJQ8McGs9kmuUYE7z.Dz48TCJw_ZRhEXirH6fri_.xicvf QrAyVH_ARRBrAVkfNXI1qb7ZlUQE070uaaDGa3e51QpdjW_S_wsI587QMeg2 LolGcZlW5jJi6yncLRepXup3aRUYYDymTdAN1YnlAGDLNm0B.J.dMUS1LeHd xWp65_DBw28MylBk0xRfbe048gq9xi7QLFuS2igBwj7N3XYACTp8- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314942 - head/usr.bin/awk To: John Baldwin , Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703090327.v293RrEY016498@repo.freebsd.org> <5311676.nqsSxOZALl@ralph.baldwin.cx> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <431fe768-f781-e19f-0e2c-bdffa9be9273@FreeBSD.org> Date: Wed, 13 Sep 2017 13:37:14 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <5311676.nqsSxOZALl@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 18:40:02 -0000 On 13/09/2017 13:15, John Baldwin wrote: > On Thursday, March 09, 2017 03:27:53 AM Baptiste Daroussin wrote: >> Author: bapt >> Date: Thu Mar 9 03:27:53 2017 >> New Revision: 314942 >> URL: https://svnweb.freebsd.org/changeset/base/314942 >> >> Log: >> Import the awk(1) manpage from OpenBSD >> >> As discussed during AsiaBSDcon devsummit, import the manpage from OpenBSD which >> is has been rewritten in mdoc(7) format making it readable by default with >> mandoc, it also has been extended by OpenBSD to cover all awk(1) options >> >> Obtained from: OpenBSD >> MFH: 1 week > One problem noted today by imp@ is that this doesn't quite document the awk we > ship: > > % echo 42 | awk '{ print lshift($1, 1) }' > awk: calling undefined function lshift > input record number 1, file > source line number 1 > > None of the bit operations described in this manpage are implemented in > one-true-awk. Hmm, it seems that OpenBSD added those as a local patch > relative to one-true-awk in 1.10 of lex.c. So Someone(tm) needs to probably > compare OpenBSD's awk to one-true-awk to see what local changes they have > and either update the manpage here or pull the local diffs across. (I'd > probably we just grab the implementation for the bitwise ops myself.) > Hmm ... TBH, many years ago I tried to upstream the OpenBSD (actually gawk) extensions  but upstream (bwk) was not interested. Pedro. From owner-svn-src-head@freebsd.org Wed Sep 13 18:42:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72A19E09E7E; Wed, 13 Sep 2017 18:42:00 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53DBE71D42; Wed, 13 Sep 2017 18:42:00 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 9C32E10A5C; Wed, 13 Sep 2017 18:41:59 +0000 (UTC) Date: Wed, 13 Sep 2017 20:41:59 +0200 From: Baptiste Daroussin To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314942 - head/usr.bin/awk Message-ID: <20170913184159.fbcihrrdwgttckms@ivaldir.net> References: <201703090327.v293RrEY016498@repo.freebsd.org> <5311676.nqsSxOZALl@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f422deqlvtzqdkhx" Content-Disposition: inline In-Reply-To: <5311676.nqsSxOZALl@ralph.baldwin.cx> User-Agent: NeoMutt/20170907 (1.9.0) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 18:42:00 -0000 --f422deqlvtzqdkhx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 13, 2017 at 06:15:39PM +0000, John Baldwin wrote: > On Thursday, March 09, 2017 03:27:53 AM Baptiste Daroussin wrote: > > Author: bapt > > Date: Thu Mar 9 03:27:53 2017 > > New Revision: 314942 > > URL: https://svnweb.freebsd.org/changeset/base/314942 > >=20 > > Log: > > Import the awk(1) manpage from OpenBSD > > =20 > > As discussed during AsiaBSDcon devsummit, import the manpage from Ope= nBSD which > > is has been rewritten in mdoc(7) format making it readable by default= with > > mandoc, it also has been extended by OpenBSD to cover all awk(1) opti= ons > > =20 > > Obtained from: OpenBSD > > MFH: 1 week >=20 > One problem noted today by imp@ is that this doesn't quite document the a= wk we > ship: >=20 > % echo 42 | awk '{ print lshift($1, 1) }' > awk: calling undefined function lshift > input record number 1, file=20 > source line number 1 >=20 > None of the bit operations described in this manpage are implemented in > one-true-awk. Hmm, it seems that OpenBSD added those as a local patch > relative to one-true-awk in 1.10 of lex.c. So Someone(tm) needs to proba= bly > compare OpenBSD's awk to one-true-awk to see what local changes they have > and either update the manpage here or pull the local diffs across. (I'd > probably we just grab the implementation for the bitwise ops myself.) >=20 Good catch, I will have a look after eurobsdcon Best regards, Bapt --f422deqlvtzqdkhx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlm5e/QACgkQY4mL3PG3 PlrsvhAAufiG2X3t65pAeQQqSXVUeAZ6RslYVZsXC1SrwxPtUhXtbE8tdUFALOjj FM8lesV0XQ2vXNUgz1eJ97BdKS2MDsONotQSQoytt2wSEMsHswaLL6MtpDOwKB+M zbx+1E5EUlWRzyRb9Gtbe+bP+AlxUbYNec5Hy8zYbQATxJuULHVCi0bfSpVt3PUy lpmB2ONKbSnKdCnHPZ6V1yNYxjhFPGGa5HW9re/128STzHbvYmlh17wfwJlEArl5 a900L8LkqMIiFGi5vSpuMLNhSnhnnVwmzBZ9mI97AKsEP0k0cCckJh+5haY75ocx r/PfU15g4pB1gbS4U6C0fszDPYyB0JCAAcmMcxYOHMMCHZ18vhufAnA5t83pdikb gqJnM1EhOASDOC/Sw07ux71Ema2TF+ZUxI1Qu9g3eNK+P90oWf8ueHjLcQcslyXr GKDRGKoPoBtMhHrOcBpSjFZ5hJCSoHDvF4p3EVVa0EiNgu1nDAAPVfDVo2bWvJ+/ GU/rRXveH7dVhz6nw6eoGg8CRWEKDTLSqacgZO/SUnVPSM0nTjei6gbovM3/NkCN Um59oN9+2aADWGdDSpL05wZjcAdoYPsRYaW4pKyMOnopzrL3u8br61aXQBgVwf+A 6t95H/LMZLMX9IsHhs45F0Fpfa0cPU94gWGAhYINLYWy55lcPf8= =VOdB -----END PGP SIGNATURE----- --f422deqlvtzqdkhx-- From owner-svn-src-head@freebsd.org Wed Sep 13 18:55:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77CD7E0A5CB for ; Wed, 13 Sep 2017 18:55:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::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 3ACFA723CF for ; Wed, 13 Sep 2017 18:55:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id o200so5566904itg.0 for ; Wed, 13 Sep 2017 11:55:28 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=/ReiVlY77gCzQ59qubT43Z70jYUokQuiE8knm+ZSf8E=; b=FeKYNc2Wkt3b0Fo4szaaT0Nt/Ss4ouYX/Gyq73x88V3Zl5qo9cfBVZ8WuxrHieVtvo FHf+8jHv4MUCQMDW8lyJ0MjLqj20RBtyozxwszdyqXzfrHECcnRB0j5j1mHYeLr1wrY5 0gMPQJdAyshyoAH1loQklhFQQAZt2esj+mhT1L6m4HwZoR6J+KWY03VCYO//15hdkRou XunJNRzH4HkZf2Wy3V7JDfc/vPmAGHYcvT+L94/xtwoadPN12xXC1bVcFLcdyUEvjxFD 07NtrGXOGgPv4ApSQYXWtefKizi7USbce3k1HsNuj2kvtAX04RC7c9+vB2eQs4t89Kp6 /c9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/ReiVlY77gCzQ59qubT43Z70jYUokQuiE8knm+ZSf8E=; b=M5ay+HqVXRQUCf+DTXPcxE+v9u2JohpgCQnzcidUfSOvWOtAYrDg+rbqExiMnHbvf8 KOJi1ZYokaAxReQVV2n9AmtmtW59vM/Iev50CU69S0E+xp9LTAOc+FWyWgxlgFcFH7pg ISi66X8xNMHQtcs+nJP4TduQUCVuUqekYQliBcHFatUu3oX1AqvSFAz+xRTz3avh5STE bTYVqTockzAyL7LDbOAY/51OOoBy69+FCCIl1ryBstGd4HCU/xd6Ul9Cg6U4bPcWmf55 A4UBMdDgLqbWKQLXtzr1bFtduWHyLnvgcgms1EqTUKexQLEABvdp0ejVU/jg9GA9MSa2 Yw5Q== X-Gm-Message-State: AHPjjUj9rgOLGiSkCh0I+QwlPYHdDXLNrKbx4gxROLRM/sgjjUoKvU0H HBF23mxFSuQuI+7ExgXl1BbblIjTIjZqwWxo6OQeOw== X-Google-Smtp-Source: AOwi7QCmdKhRuit+z6TAhlTYY6mDzOJbqn43YIYk9X/wlHaoUGq/JkH7HWEbKCnlV1OqU0VdnX3nIWFafd6Vya5p07Q= X-Received: by 10.36.254.72 with SMTP id w69mr5653337ith.130.1505328927301; Wed, 13 Sep 2017 11:55:27 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Wed, 13 Sep 2017 11:55:26 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:60a7:d7e6:aef8:c203] In-Reply-To: <431fe768-f781-e19f-0e2c-bdffa9be9273@FreeBSD.org> References: <201703090327.v293RrEY016498@repo.freebsd.org> <5311676.nqsSxOZALl@ralph.baldwin.cx> <431fe768-f781-e19f-0e2c-bdffa9be9273@FreeBSD.org> From: Warner Losh Date: Wed, 13 Sep 2017 12:55:26 -0600 X-Google-Sender-Auth: N8hvXur-q1dqg__RLdUQkL-ertk Message-ID: Subject: Re: svn commit: r314942 - head/usr.bin/awk To: Pedro Giffuni Cc: John Baldwin , Baptiste Daroussin , 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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 18:55:28 -0000 Maybe you can bring them in here? :) Warner On Wed, Sep 13, 2017 at 12:37 PM, Pedro Giffuni wrote: > > > On 13/09/2017 13:15, John Baldwin wrote: > >> On Thursday, March 09, 2017 03:27:53 AM Baptiste Daroussin wrote: >> >>> Author: bapt >>> Date: Thu Mar 9 03:27:53 2017 >>> New Revision: 314942 >>> URL: https://svnweb.freebsd.org/changeset/base/314942 >>> >>> Log: >>> Import the awk(1) manpage from OpenBSD >>> As discussed during AsiaBSDcon devsummit, import the manpage from >>> OpenBSD which >>> is has been rewritten in mdoc(7) format making it readable by default >>> with >>> mandoc, it also has been extended by OpenBSD to cover all awk(1) >>> options >>> Obtained from: OpenBSD >>> MFH: 1 week >>> >> One problem noted today by imp@ is that this doesn't quite document the >> awk we >> ship: >> >> % echo 42 | awk '{ print lshift($1, 1) }' >> awk: calling undefined function lshift >> input record number 1, file >> source line number 1 >> >> None of the bit operations described in this manpage are implemented in >> one-true-awk. Hmm, it seems that OpenBSD added those as a local patch >> relative to one-true-awk in 1.10 of lex.c. So Someone(tm) needs to >> probably >> compare OpenBSD's awk to one-true-awk to see what local changes they have >> and either update the manpage here or pull the local diffs across. (I'd >> probably we just grab the implementation for the bitwise ops myself.) >> >> Hmm ... > > TBH, many years ago I tried to upstream the OpenBSD (actually gawk) > extensions but upstream (bwk) was not interested. > > Pedro. > > From owner-svn-src-head@freebsd.org Wed Sep 13 19:04:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDFA8E0ABAE; Wed, 13 Sep 2017 19:04:00 +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 BB460728AF; Wed, 13 Sep 2017 19:04:00 +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 v8DJ3x3I072013; Wed, 13 Sep 2017 19:03:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DJ3xlJ072011; Wed, 13 Sep 2017 19:03:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709131903.v8DJ3xlJ072011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Sep 2017 19:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323558 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:04:01 -0000 Author: kib Date: Wed Sep 13 19:03:59 2017 New Revision: 323558 URL: https://svnweb.freebsd.org/changeset/base/323558 Log: Use existing tag name for the vm_object' memq. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.h head/sys/vm/vm_page.h Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Wed Sep 13 18:32:43 2017 (r323557) +++ head/sys/vm/vm_object.h Wed Sep 13 19:03:59 2017 (r323558) @@ -87,12 +87,17 @@ * */ +#ifndef VM_PAGE_HAVE_PGLIST +TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif + struct vm_object { struct rwlock lock; TAILQ_ENTRY(vm_object) object_list; /* list of all objects */ LIST_HEAD(, vm_object) shadow_head; /* objects that this is a shadow for */ LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ - TAILQ_HEAD(respgs, vm_page) memq; /* list of resident pages */ + struct pglist memq; /* list of resident pages */ struct vm_radix rtree; /* root of the resident page radix trie*/ vm_pindex_t size; /* Object size */ int generation; /* generation ID */ Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Sep 13 18:32:43 2017 (r323557) +++ head/sys/vm/vm_page.h Wed Sep 13 19:03:59 2017 (r323558) @@ -210,7 +210,10 @@ struct vm_page { #define PQ_UNSWAPPABLE 3 #define PQ_COUNT 4 +#ifndef VM_PAGE_HAVE_PGLIST TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif SLIST_HEAD(spglist, vm_page); struct vm_pagequeue { From owner-svn-src-head@freebsd.org Wed Sep 13 19:11:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C1AAE0B175; Wed, 13 Sep 2017 19:11:53 +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 57C1172E16; Wed, 13 Sep 2017 19:11:53 +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 v8DJBqwO076362; Wed, 13 Sep 2017 19:11:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DJBqcs076360; Wed, 13 Sep 2017 19:11:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709131911.v8DJBqcs076360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Sep 2017 19:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323559 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:11:53 -0000 Author: kib Date: Wed Sep 13 19:11:52 2017 New Revision: 323559 URL: https://svnweb.freebsd.org/changeset/base/323559 Log: Split vm_page_free_toq() into two parts, preparation vm_page_free_prep() and insertion into the phys allocator free queues vm_page_free_phys(). Also provide a wrapper vm_page_free_phys_pglist() for batched free. Reviewed by: alc, markj Tested by: mjg (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Sep 13 19:03:59 2017 (r323558) +++ head/sys/vm/vm_page.c Wed Sep 13 19:11:52 2017 (r323559) @@ -163,6 +163,7 @@ static uma_zone_t fakepg_zone; static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); +static void vm_page_free_phys(vm_page_t m); static void vm_page_free_wakeup(void); static void vm_page_init(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, @@ -2402,13 +2403,7 @@ unlock: mtx_lock(&vm_page_queue_free_mtx); do { SLIST_REMOVE_HEAD(&free, plinks.s.ss); - vm_phys_freecnt_adj(m, 1); -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (true) -#endif - vm_phys_free_pages(m, 0); + vm_page_free_phys(m); } while ((m = SLIST_FIRST(&free)) != NULL); vm_page_free_wakeup(); mtx_unlock(&vm_page_queue_free_mtx); @@ -2770,15 +2765,18 @@ vm_page_free_wakeup(void) } /* - * vm_page_free_toq: + * vm_page_free_prep: * - * Returns the given page to the free list, - * disassociating it with any VM object. + * Prepares the given page to be put on the free list, + * disassociating it from any VM object. The caller may return + * the page to the free list only if this function returns true. * - * The object must be locked. The page must be locked if it is managed. + * The object must be locked. The page must be locked if it is + * managed. For a queued managed page, the pagequeue_locked + * argument specifies whether the page queue is already locked. */ -void -vm_page_free_toq(vm_page_t m) +bool +vm_page_free_prep(vm_page_t m, bool pagequeue_locked) { if ((m->oflags & VPO_UNMANAGED) == 0) { @@ -2799,16 +2797,20 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - vm_page_remque(m); + if (m->queue != PQ_NONE) { + if (pagequeue_locked) + vm_page_dequeue_locked(m); + else + vm_page_dequeue(m); + } vm_page_remove(m); /* * If fictitious remove object association and * return, otherwise delay object association removal. */ - if ((m->flags & PG_FICTITIOUS) != 0) { - return; - } + if ((m->flags & PG_FICTITIOUS) != 0) + return (false); m->valid = 0; vm_page_undirty(m); @@ -2820,28 +2822,66 @@ vm_page_free_toq(vm_page_t m) KASSERT((m->flags & PG_UNHOLDFREE) == 0, ("vm_page_free: freeing PG_UNHOLDFREE page %p", m)); m->flags |= PG_UNHOLDFREE; - } else { - /* - * Restore the default memory attribute to the page. - */ - if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) - pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + return (false); + } - /* - * Insert the page into the physical memory allocator's free - * page queues. - */ - mtx_lock(&vm_page_queue_free_mtx); - vm_phys_freecnt_adj(m, 1); + /* + * Restore the default memory attribute to the page. + */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + + return (true); +} + +/* + * Insert the page into the physical memory allocator's free page + * queues. This is the last step to free a page. + */ +static void +vm_page_free_phys(vm_page_t m) +{ + + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + + vm_phys_freecnt_adj(m, 1); #if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (TRUE) + if (!vm_reserv_free_page(m)) #endif - vm_phys_free_pages(m, 0); - vm_page_free_wakeup(); - mtx_unlock(&vm_page_queue_free_mtx); - } + vm_phys_free_pages(m, 0); +} + +void +vm_page_free_phys_pglist(struct pglist *tq) +{ + vm_page_t m; + + mtx_lock(&vm_page_queue_free_mtx); + TAILQ_FOREACH(m, tq, listq) + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); +} + +/* + * vm_page_free_toq: + * + * Returns the given page to the free list, disassociating it + * from any VM object. + * + * The object must be locked. The page must be locked if it is + * managed. + */ +void +vm_page_free_toq(vm_page_t m) +{ + + if (!vm_page_free_prep(m, false)) + return; + mtx_lock(&vm_page_queue_free_mtx); + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); } /* Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Sep 13 19:03:59 2017 (r323558) +++ head/sys/vm/vm_page.h Wed Sep 13 19:11:52 2017 (r323559) @@ -483,6 +483,8 @@ void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); void vm_page_dequeue_locked(vm_page_t m); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); +void vm_page_free_phys_pglist(struct pglist *tq); +bool vm_page_free_prep(vm_page_t m, bool pagequeue_locked); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); From owner-svn-src-head@freebsd.org Wed Sep 13 19:22:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 755C5E0B863; Wed, 13 Sep 2017 19:22:08 +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 4FB9B73669; Wed, 13 Sep 2017 19:22:08 +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 v8DJM7iJ078962; Wed, 13 Sep 2017 19:22:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DJM7bi078961; Wed, 13 Sep 2017 19:22:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709131922.v8DJM7bi078961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Sep 2017 19:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323561 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:22:08 -0000 Author: kib Date: Wed Sep 13 19:22:07 2017 New Revision: 323561 URL: https://svnweb.freebsd.org/changeset/base/323561 Log: Do not relock free queue mutex for each page, free whole terminating object' page queue under the single mutex lock. First, all pages on the queue are prepared for free by calls to vm_page_free_prep(), and pages which should not be returned to the physical allocator (e.g. wired or fictitious) are simply removed from the queue. On the second pass, vm_page_free_phys_pglist() inserts all pages from the queue without relocking the mutex. The change improves the object termination, e.g. on the process exit where large anonymous memory objects otherwise cause relocks the free queue mutex for each page. More, if several such processes are exiting or execing in parallel, the mutex was highly contended on the address space demolition. Diagnosed and tested by: mjg (previous version) Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Sep 13 19:12:28 2017 (r323560) +++ head/sys/vm/vm_object.c Wed Sep 13 19:22:07 2017 (r323561) @@ -713,9 +713,14 @@ static void vm_object_terminate_pages(vm_object_t object) { vm_page_t p, p_next; + struct mtx *mtx, *mtx1; + struct vm_pagequeue *pq, *pq1; VM_OBJECT_ASSERT_WLOCKED(object); + mtx = NULL; + pq = NULL; + /* * Free any remaining pageable pages. This also removes them from the * paging queues. However, don't free wired pages, just remove them @@ -724,21 +729,51 @@ vm_object_terminate_pages(vm_object_t object) */ TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { vm_page_assert_unbusied(p); - vm_page_lock(p); - /* - * Optimize the page's removal from the object by resetting - * its "object" field. Specifically, if the page is not - * wired, then the effect of this assignment is that - * vm_page_free()'s call to vm_page_remove() will return - * immediately without modifying the page or the object. - */ + if ((object->flags & OBJ_UNMANAGED) == 0) { + /* + * vm_page_free_prep() only needs the page + * lock for managed pages. + */ + mtx1 = vm_page_lockptr(p); + if (mtx1 != mtx) { + if (mtx != NULL) + mtx_unlock(mtx); + if (pq != NULL) { + vm_pagequeue_unlock(pq); + pq = NULL; + } + mtx = mtx1; + mtx_lock(mtx); + } + } p->object = NULL; - if (p->wire_count == 0) { - vm_page_free(p); - VM_CNT_INC(v_pfree); + if (p->wire_count != 0) + goto unlist; + VM_CNT_INC(v_pfree); + p->flags &= ~PG_ZERO; + if (p->queue != PQ_NONE) { + KASSERT(p->queue < PQ_COUNT, ("vm_object_terminate: " + "page %p is not queued", p)); + pq1 = vm_page_pagequeue(p); + if (pq != pq1) { + if (pq != NULL) + vm_pagequeue_unlock(pq); + pq = pq1; + vm_pagequeue_lock(pq); + } } - vm_page_unlock(p); + if (vm_page_free_prep(p, true)) + continue; +unlist: + TAILQ_REMOVE(&object->memq, p, listq); } + if (pq != NULL) + vm_pagequeue_unlock(pq); + if (mtx != NULL) + mtx_unlock(mtx); + + vm_page_free_phys_pglist(&object->memq); + /* * If the object contained any pages, then reset it to an empty state. * None of the object's fields, including "resident_page_count", were From owner-svn-src-head@freebsd.org Wed Sep 13 19:28:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D37FE0BD89; Wed, 13 Sep 2017 19:28:57 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E602273999; Wed, 13 Sep 2017 19:28:56 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id sDL4d61nZDJTWsDL5dugqW; Wed, 13 Sep 2017 13:28:49 -0600 X-Authority-Analysis: v=2.2 cv=B4DJ6KlM c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=2JCJgTwv5E4A:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=pGLkceISAAAA:8 a=VxmjJ2MpAAAA:8 a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=YxBL1-UpAAAA:8 a=CArGUo-jAyrTWHpj-QgA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=6kGIvZw6iX1k4Y-7sg4_:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=AjGcO6oz07-iQ99wixmX:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 2FED5410; Wed, 13 Sep 2017 12:28:46 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v8DJSTWV063084; Wed, 13 Sep 2017 12:28:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201709131928.v8DJSTWV063084@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Sean Bruno cc: Cy Schubert , Ngie Cooper , Stephen Hurd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys In-Reply-To: Message from Sean Bruno of "Wed, 13 Sep 2017 09:12:50 -0600." <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 13 Sep 2017 12:28:29 -0700 X-CMAE-Envelope: MS4wfDqLvObsyh24Oj8pmKNWyfgK5juNQGr2S0gJROPjiQC3rssJ9NeP8XGr/xzqq7v3hzmJ2EeoyLQbkgdtS+9GPXPFATW8QaCpc6G1HmyrGfW1cPtp0kgs 5WurNJY9nJ+lIFKAWqnCGnFd9G0np4Gt8PuirGxb+b6qBOFdSD0JR9TeXeouIIqVAIzwb/vvdiIScKyhMjTXMYKVJC1810i9QG+b/MhWNC/m2YdmNf5+HbNq gkKb0gpSRkqVsjJtRdLX7LvQiTbnXtXKfoTbpaa78XGVxv1jbGt+Xd9LY/Ym21pTHX/4gBQQXf0IhZuhIkCbG5XgRR+WSXJ6M0YyLA5SH8TO+ATDtOQf4vtP RVtSHyYC X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:28:57 -0000 In message <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org>, Sean Bruno write s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --K3RXSO7fXoxBXqJUE1dpQ1sEQkuJPg1DQ > Content-Type: multipart/mixed; boundary="lalB5jI6dIhQxjTp1UFWH9Jx4OpW69Pfe"; > protected-headers="v1" > From: Sean Bruno > To: Cy Schubert , > Ngie Cooper > Cc: Stephen Hurd , src-committers@freebsd.org, > svn-src-all@freebsd.org, svn-src-head@freebsd.org > Message-ID: <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> > Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net > sys > References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> > In-Reply-To: <201709130711.v8D7BlTS003204@slippy.cwsent.com> > > --lalB5jI6dIhQxjTp1UFWH9Jx4OpW69Pfe > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > >>> #blamebruno > >>> > >>> Reviewed by: sbruno > >>> Approved by: sbruno (mentor) > >>> Sponsored by: Limelight Networks > >>> Differential Revision: https://reviews.freebsd.org/D12235 > >> > >> *gasps at the LoC count and number of changed drivers* > >> > >> Could someone please better break this up in the future..? > >=20 > > Agreed. Down the road parsing out individual commits in this jumbo comm= > it=20 > > will be difficult to parse. IMO this may as well have simply been, impo= > rt=20 > > from https://github.com/mattmacy/networking/, just like Mr. Torvalds do= > es=20 > > at kernel.org. I expect to see a commit like this there but not here. C= > an=20 > > we break this down to its functional commits? > >=20 > >=20 > > > This ridiculous loc was due to the amount of restructuring needed to get > us back to being in sync with our development. The future will not have > this big of a commit/change and should be more bite/fun sized. > > The #blamebruno tag in the commit log was to indicate that this was not > something Stephen was doing on his own, but was something that I had > induced over the last few months during testing. I suppose it is sometimes unavoidable. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Sep 13 19:30:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2513E0BECB; Wed, 13 Sep 2017 19:30:10 +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 7FB3E73B17; Wed, 13 Sep 2017 19:30:10 +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 v8DJU97E080673; Wed, 13 Sep 2017 19:30:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DJU926080672; Wed, 13 Sep 2017 19:30:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709131930.v8DJU926080672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Sep 2017 19:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323562 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:30:10 -0000 Author: kib Date: Wed Sep 13 19:30:09 2017 New Revision: 323562 URL: https://svnweb.freebsd.org/changeset/base/323562 Log: Remove inline specifier from vm_page_free_wakeup(), do not micro-manage compiler. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Sep 13 19:22:07 2017 (r323561) +++ head/sys/vm/vm_page.c Wed Sep 13 19:30:09 2017 (r323562) @@ -2739,7 +2739,7 @@ vm_page_activate(vm_page_t m) * * The page queues must be locked. */ -static inline void +static void vm_page_free_wakeup(void) { From owner-svn-src-head@freebsd.org Wed Sep 13 19:49:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42BF8E0CA36 for ; Wed, 13 Sep 2017 19:49:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::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 0458B74479 for ; Wed, 13 Sep 2017 19:49:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id 6so5328164itl.1 for ; Wed, 13 Sep 2017 12:49:56 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=JVYvqiCGE39oCNKelyFtsyIMyKUv0KSsGon4a8nAlpM=; b=150OmQ2YJKzpPErv3ZfrG2kDN7p5casgUg9hX2oR+oaHePnlo8Dn3jX6ySLY1q5hMm qgbKhqsPY0RbmeFWXyVx8FU0selsi3TkLMKSSsnZjIuCOSNjexd4CZaZHWqt2OCmTApt jAuI70Hb+SG+OK1WtMoJvo5nN4vTl8vGgsmR5qwDdPD5HwxeGn1QQ3DB9Y9u7PRX00cZ XhCVS/kRCpE52Rn94rS0Jg5H1bmh2VCKFieR9+wAuH63XQV7BaNvc/7Ubn0yQibMr0Bx QIgl/dOOgrq4n2PxBo3d29PWlPYQMZzNz9Bsz2EGhV5diLqpbkyE5pElecpKuaiqrrth A9Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=JVYvqiCGE39oCNKelyFtsyIMyKUv0KSsGon4a8nAlpM=; b=QDSO88DX+BkeG4FOd5T+NzH5zyt84lDHSwZ0NVWABOXrV47puCf6xw4CwQ1OuBEblH iIm4mbftxIar+rd4aD2WNlOD2tIKzHMj3C5VcchFxCIj77k7HQWBeR05WX3sd+IIoeSo 4SikGC3mgb94ghQCy/92xuauikKK4vS/q9WgX+BXOmOe5QCqE8X1MvSRAnCfozze3Rro j2aGGRP0ykmfu+psx8AeDYj1FFdR+P9B1lfQaO+YJYFAdooHNEv3GhJgAihVBDKfpAgp sgJCczNhf1KqM77taVoNUv9+Q54Tkre+3HRjenndL9ZfHusrXKDAf76g+49t3sHNkxhl Gd3g== X-Gm-Message-State: AHPjjUhBp4SVrJfPLbOIXEsv8FO93X3e2EIoox0F/vDDYt2Eihj/0OXK mAIjiX18j766AD1d4R6Yyy+4szty1o1MPZ0ikPVcNw== X-Google-Smtp-Source: AOwi7QByOPRsXeSPIHIX3+7yDQbhTI9ixCTz1XySk8DJGh4/I0yqLE3sVXOvM/odDAqoGarJ+7//JGy45qRSn0In2eU= X-Received: by 10.36.20.149 with SMTP id 143mr4867337itg.63.1505332196208; Wed, 13 Sep 2017 12:49:56 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Wed, 13 Sep 2017 12:49:55 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:60a7:d7e6:aef8:c203] In-Reply-To: <201709131345.v8DDjXH0033179@slippy.cwsent.com> References: <201709131345.v8DDjXH0033179@slippy.cwsent.com> From: Warner Losh Date: Wed, 13 Sep 2017 13:49:55 -0600 X-Google-Sender-Auth: JaNTbpgFsW7KN3zMdh2FtGUBDVo Message-ID: Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys To: Cy Schubert Cc: Ngie Cooper , Stephen Hurd , 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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 19:49:57 -0000 On Wed, Sep 13, 2017 at 7:45 AM, Cy Schubert wrote: > In message KcmTA@mail.gmail.c > om> > , Warner Losh writes: > > --001a1141f15ac444250559123c56 > > Content-Type: text/plain; charset="UTF-8" > > > > On Wed, Sep 13, 2017 at 1:11 AM, Cy Schubert > > wrote: > > > > > In message <4D5AE475-5A38-4429-8B71-DBECDFB0A1FF@gmail.com>, Ngie > Cooper > > > writes > > > : > > > > > > > > > On Sep 12, 2017, at 18:18, Stephen Hurd wrote: > > > > > > > > > > Author: shurd > > > > > Date: Wed Sep 13 01:18:42 2017 > > > > > New Revision: 323516 > > > > > URL: https://svnweb.freebsd.org/changeset/base/323516 > > > > > > > > > > Log: > > > > > Roll up iflib commits from github. This pulls in most of the work > > > done > > > > > by Matt Macy as well as other changes which he has accepted via > pull > > > > > request to his github repo at https://github.com/mattmacy/ > networking/ > > > > > > > > > > This should bring -CURRENT and the github repo into close enough > sync > > > to > > > > > allow small feature branches rather than a large chain of > > > interdependant > > > > > patches being developed out of tree. The reset of the > synchronization > > > > > should be able to be completed on github by splitting the > remaining > > > > > changes that are not yet ready into short feature branches for > later > > > > > review as smaller commits. > > > > > > > > > > Here is a summary of changes included in this patch: > > > > > > > > > > 1) More checks when INVARIANTS are enabled for eariler problem > > > > > detection > > > > > 2) Group Task Queue cleanups > > > > > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > > > > > Some interfaces such as memguard(9) use the short > description to > > > > > identify malloc types, so duplicates should be avoided. > > > > > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > > > > > - In some cases, this can improve performance > > > > > 4) Better logging when taskqgroup_attach*() fails to set > interrupt > > > > > affinity. > > > > > 5) Do not start gtaskqueues until they're needed > > > > > 6) Have mp_ring enqueue function enter the ABDICATED rather than > BUSY > > > > > state. This moves the TX to the gtaskq and allows processing > to > > > > > continue faster as well as make TX batching more likely. > > > > > 7) Add an ift_txd_errata function to struct if_txrx. This allows > > > > > drivers to inspect/modify mbufs before transmission. > > > > > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they > need > > > > > checksums zeroed for checksum offload to work. This avoids > > > modifying > > > > > packet data in the TX path when possible. > > > > > 9) Use ithreads for iflib I/O instead of taskqueues > > > > > 10) Clean up ioctl and support async ioctl functions > > > > > 11) Prefetch two cachlines from each mbuf instead of one up to > 128B. > > > We > > > > > often need to parse packet header info beyond 64B. > > > > > 12) Fix potential memory corruption due to fence post error in > > > > > bit_nclear() usage. > > > > > 13) Improved hang detection and handling > > > > > 14) If the packet is smaller than MTU, disable the TSO flags. > > > > > This avoids extra packet parsing when not needed. > > > > > 15) Move TCP header parsing inside the IS_TSO?() test. > > > > > This avoids extra packet parsing when not needed. > > > > > 16) Pass chains of mbufs that are not consumed by lro to > if_input() > > > > > rather call if_input() for each mbuf. > > > > > 17) Re-arrange packet header loads to get as much work as possible > > > done > > > > > before a cache stall. > > > > > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_ > > > POST()/ > > > > > IFDI_DETACH(); > > > > > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > > > > > especially when RX and TX share an interrupt. RX will > attempt to > > > > > take the first threads on a core, and TX will attempt to take > > > > > successive threads. > > > > > 20) Allow iflib_softirq_alloc_generic() to request affinity to the > > > same > > > > > cpus an interrupt has affinity with. This allows TX queues to > > > > > ensure they are serviced by the socket the device is on. > > > > > 21) Add new iflib sysctls to net.iflib: > > > > > - timer_int - interval at which to run per-queue timers in > ticks > > > > > - force_busdma > > > > > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > > > > > - rx_budget allows tuning the batch size on the RX path > > > > > - watchdog_events Count of watchdog events seen since load > > > > > 23) Fix error where netmap_rxq_init() could get called before > > > > > IFDI_INIT() > > > > > 24) e1000: Fixed version of r323008: post-cold sleep instead of > DELAY > > > > > when waiting for firmware > > > > > - After interrupts are enabled, convert all waits to sleeps > > > > > - Eliminates e1000 software/firmware synchronization busy > waits > > > after > > > > > startup > > > > > 25) e1000: Remove special case for budget=1 in em_txrx.c > > > > > - Premature optimization which may actually be incorrect with > > > > > multi-segment packets > > > > > 26) e1000: Split out TX interrupt rather than share an interrupt > for > > > > > RX and TX. > > > > > - Allows better performance by keeping RX and TX paths > separate > > > > > 27) e1000: Separate igb from em code where suitable > > > > > Much easier to understand separate functions and "if (is_igb)" > > > than > > > > > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | > > > E1000_ICR_LSC))" > > > > > > > > > > #blamebruno > > > > > > > > > > Reviewed by: sbruno > > > > > Approved by: sbruno (mentor) > > > > > Sponsored by: Limelight Networks > > > > > Differential Revision: https://reviews.freebsd.org/D12235 > > > > > > > > *gasps at the LoC count and number of changed drivers* > > > > > > > > Could someone please better break this up in the future..? > > > > > > Agreed. Down the road parsing out individual commits in this jumbo > commit > > > will be difficult to parse. IMO this may as well have simply been, > import > > > from https://github.com/mattmacy/networking/, just like Mr. Torvalds > does > > > at kernel.org. I expect to see a commit like this there but not here. > Can > > > we break this down to its functional commits? > > > > > > I use git + svn for other things. It should be possible to use that to > push > > the changes in 'machine gun style' (meaning 27 changes pushed so fast > they > > show up as 27 consecutive r numbers). I do change curation, etc with it > so > > I get good sized commits. That's why you'll often see 10 or 20 commits > from > > me show up in a matter of a couple of minutes. git svn dcommit is to > blame, > > but so is about two dozen git rebases and other git crazy along the way. > > Something like that would be useful here. I'd be quite happy to walk > people > > through my setup if it helps to reduce this. > > I'm interested. Start with https://wiki.freebsd.org/GitWorkflow/GitSvn Once you get through that, we can chat... Warner From owner-svn-src-head@freebsd.org Wed Sep 13 20:34:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0301FE0E5DC; Wed, 13 Sep 2017 20:34:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.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 D561075A12; Wed, 13 Sep 2017 20:34:12 +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 mail.baldwin.cx (Postfix) with ESMTPSA id CD4F910A82D; Wed, 13 Sep 2017 16:34:11 -0400 (EDT) From: John Baldwin To: Ian Lepore Cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323518 - head/sys/conf Date: Wed, 13 Sep 2017 13:29:42 -0700 Message-ID: <4109326.8sPPBfrheX@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <1505320675.32063.123.camel@freebsd.org> References: <201709130356.v8D3u4ve095428@repo.freebsd.org> <2493527.d9eFbJjTgo@ralph.baldwin.cx> <1505320675.32063.123.camel@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 13 Sep 2017 16:34:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 20:34:13 -0000 On Wednesday, September 13, 2017 10:37:55 AM Ian Lepore wrote: > On Wed, 2017-09-13 at 09:26 -0700, John Baldwin wrote: > > On Wednesday, September 13, 2017 09:09:42 AM Sean Bruno wrote: > > > > > > > > > On 09/13/17 08:35, John Baldwin wrote: > > > > > > > > On Wednesday, September 13, 2017 03:56:04 AM Sean Bruno wrote: > > > > > > > > > > Author: sbruno > > > > > Date: Wed Sep 13 03:56:03 2017 > > > > > New Revision: 323518 > > > > > URL: https://svnweb.freebsd.org/changeset/base/323518 > > > > > > > > > > Log: > > > > > Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. > > > > > > > > > > ixl(4) isn't in here either, so I'll remove lio(4) too. > > > > ixl missing is a bug, please put it in sys/amd64/conf/NOTES (or better yet, > > > > just fix the build on !amd64) > > > > > > > > > > In the case of lio(4), Cavium is explicitly not compiling for 32 bit > > > architectures. I'm inquiring to find out if they want to build on the > > > other 64bit architectures we have. > > > > > > In the case of ixl(4), Intel has said that this is not supported on > > > 32bit architectures. > > > > > > I'm unsure what the best course of action is. > > The bug is more if drivers aren't in NOTES at all. Any thing listed in > > sys/conf/files.* should be in some NOTES file, either sys/conf/NOTES for > > things that are MI or sys/${arch}/conf/NOTES for things that are MD. > > > > Didn't somebody start a task list of things for junior hackers to work > on? Writing a script/tool to verify the assertion in that last > sentence seems like a good candidate for such a list. tools/tools/notescheck/notescheck.py (I haven't run it myself in a long while though) -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 13 21:54:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 059BDE11655; Wed, 13 Sep 2017 21:54:39 +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 C73EE7C5EA; Wed, 13 Sep 2017 21:54:38 +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 v8DLsbcg041514; Wed, 13 Sep 2017 21:54:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DLsbuS041513; Wed, 13 Sep 2017 21:54:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709132154.v8DLsbuS041513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 13 Sep 2017 21:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323564 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 21:54:39 -0000 Author: markj Date: Wed Sep 13 21:54:37 2017 New Revision: 323564 URL: https://svnweb.freebsd.org/changeset/base/323564 Log: Widen uk_pgoff, the slab header offset field. 16 bits is only wide enough for kegs with an item size of up to 64KB. At that size or larger, slab headers are typically offpage because the item size is a multiple of the page size, but there is no requirement that this be the case. We can widen the field without affecting the layout of struct uma_keg since the removal of uk_slabsize in r315077 left an adjacent hole. PR: 218911 MFC after: 2 weeks Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Wed Sep 13 21:21:33 2017 (r323563) +++ head/sys/vm/uma_int.h Wed Sep 13 21:54:37 2017 (r323564) @@ -210,7 +210,7 @@ struct uma_keg { vm_offset_t uk_kva; /* Zone base KVA */ uma_zone_t uk_slabzone; /* Slab zone backing us, if OFFPAGE */ - uint16_t uk_pgoff; /* Offset to uma_slab struct */ + uint32_t uk_pgoff; /* Offset to uma_slab struct */ uint16_t uk_ppera; /* pages per allocation from backend */ uint16_t uk_ipers; /* Items per slab */ uint32_t uk_flags; /* Internal flags */ From owner-svn-src-head@freebsd.org Wed Sep 13 22:11:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50964E12157; Wed, 13 Sep 2017 22:11:07 +0000 (UTC) (envelope-from glebius@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 12D077D0F0; Wed, 13 Sep 2017 22:11:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8DMB6rA048327; Wed, 13 Sep 2017 22:11:06 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8DMB6Pp048326; Wed, 13 Sep 2017 22:11:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201709132211.v8DMB6Pp048326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 13 Sep 2017 22:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323566 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 22:11:07 -0000 Author: glebius Date: Wed Sep 13 22:11:05 2017 New Revision: 323566 URL: https://svnweb.freebsd.org/changeset/base/323566 Log: Use soref() in sendfile(2) instead fhold() to reference a socket. The problem is that fdrop() requires syscall context, as it may enter sleep in some cases. The reason to use it in the original non-blocking sendfile implementation, was to avoid use of global ACCEPT_LOCK() on every I/O completion. Now in head sorele() no longer requires this lock. Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Wed Sep 13 21:56:49 2017 (r323565) +++ head/sys/kern/kern_sendfile.c Wed Sep 13 22:11:05 2017 (r323566) @@ -80,7 +80,7 @@ struct sf_io { volatile u_int nios; u_int error; int npages; - struct file *sock_fp; + struct socket *so; struct mbuf *m; vm_page_t pa[]; }; @@ -255,7 +255,7 @@ static void sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) { struct sf_io *sfio = arg; - struct socket *so; + struct socket *so = sfio->so; for (int i = 0; i < count; i++) if (pg[i] != bogus_page) @@ -267,8 +267,6 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i if (!refcount_release(&sfio->nios)) return; - so = sfio->sock_fp->f_data; - if (sfio->error) { struct mbuf *m; @@ -296,8 +294,8 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i CURVNET_RESTORE(); } - /* XXXGL: curthread */ - fdrop(sfio->sock_fp, curthread); + SOCK_LOCK(so); + sorele(so); free(sfio, M_TEMP); } @@ -724,6 +722,7 @@ retry_space: sfio = malloc(sizeof(struct sf_io) + npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); refcount_init(&sfio->nios, 1); + sfio->so = so; sfio->error = 0; nios = sendfile_swapin(obj, sfio, off, space, npages, rhpages, @@ -858,9 +857,8 @@ prepend_header: error = (*so->so_proto->pr_usrreqs->pru_send) (so, 0, m, NULL, NULL, td); } else { - sfio->sock_fp = sock_fp; sfio->npages = npages; - fhold(sock_fp); + soref(so); error = (*so->so_proto->pr_usrreqs->pru_send) (so, PRUS_NOTREADY, m, NULL, NULL, td); sendfile_iodone(sfio, NULL, 0, 0); From owner-svn-src-head@freebsd.org Wed Sep 13 22:42:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D48BFE13750; Wed, 13 Sep 2017 22:42:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 190167DF96; Wed, 13 Sep 2017 22:42:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v8DMWWOJ015130 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Sep 2017 15:32:32 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v8DMWVTs015129; Wed, 13 Sep 2017 15:32:31 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 13 Sep 2017 15:32:31 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: Bruce Evans , Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r323393 - in head/sys: sys vm Message-ID: <20170913223231.GN1055@FreeBSD.org> References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Sep 2017 22:42:34 -0000 On Mon, Sep 11, 2017 at 09:30:10AM +0200, Mateusz Guzik wrote: M> First, there is a bunch of counter(9) fields. I don't know the original M> reasoning. I would expect these counters to be statically defined in a M> per-cpu struct. The reasoning was to remove 'struct vmmeter' from the 'struct pcpu', which sounds inline with your desire to remote struct vmmeter from the kernel at all. Maintainance wise, it is much easier not to bloat 'struct pcpu' with various global statistics, but keep them as counter(9)s instead. Indeed, what's the big difference between TCP statistics and VM statistics, why treat them differently? Performance wise, I haven't seen any regressions when collapsed multiple entities of struct vmmeter sitting in struct pcpu, into single one with counter(9)s. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Sep 14 03:39:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2D8AE229EF; Thu, 14 Sep 2017 03:39:43 +0000 (UTC) (envelope-from rlibby@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 C01AA30FB; Thu, 14 Sep 2017 03:39:43 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8E3dgCc081036; Thu, 14 Sep 2017 03:39:42 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E3dguc081035; Thu, 14 Sep 2017 03:39:42 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709140339.v8E3dguc081035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 14 Sep 2017 03:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323572 - head/usr.sbin/zic/zic X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/usr.sbin/zic/zic X-SVN-Commit-Revision: 323572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 03:39:44 -0000 Author: rlibby Date: Thu Sep 14 03:39:42 2017 New Revision: 323572 URL: https://svnweb.freebsd.org/changeset/base/323572 Log: zic: -Wno-error=strict-overflow Reviewed by: emaste Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D12284 Modified: head/usr.sbin/zic/zic/Makefile Modified: head/usr.sbin/zic/zic/Makefile ============================================================================== --- head/usr.sbin/zic/zic/Makefile Thu Sep 14 01:24:17 2017 (r323571) +++ head/usr.sbin/zic/zic/Makefile Thu Sep 14 03:39:42 2017 (r323572) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/contrib/tzcode/zic PROG= zic @@ -12,5 +14,9 @@ CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 + +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 +CWARNFLAGS+= -Wno-error=strict-overflow +.endif .include From owner-svn-src-head@freebsd.org Thu Sep 14 03:41:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4213E22B30; Thu, 14 Sep 2017 03:41:50 +0000 (UTC) (envelope-from rlibby@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 83F013468; Thu, 14 Sep 2017 03:41:50 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8E3fnWn085035; Thu, 14 Sep 2017 03:41:49 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E3fn2Y085034; Thu, 14 Sep 2017 03:41:49 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709140341.v8E3fn2Y085034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 14 Sep 2017 03:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323573 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 323573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 03:41:50 -0000 Author: rlibby Date: Thu Sep 14 03:41:49 2017 New Revision: 323573 URL: https://svnweb.freebsd.org/changeset/base/323573 Log: gcc builds: reenable -Wstrict-overflow for bsd.sys.mk This effectively reverts r304877, after having relegated the warning suppression to the zic(8) makefile in r323572. Reviewed by: emaste Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D12284 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Sep 14 03:39:42 2017 (r323572) +++ head/share/mk/bsd.sys.mk Thu Sep 14 03:41:49 2017 (r323573) @@ -131,11 +131,6 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=unused-value .endif -# GCC 5.3.0 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 -CWARNFLAGS+= -Wno-error=strict-overflow -.endif - # GCC 6.1.0 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 CWARNFLAGS+= -Wno-error=misleading-indentation \ From owner-svn-src-head@freebsd.org Thu Sep 14 03:42:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F277E22D26; Thu, 14 Sep 2017 03:42:42 +0000 (UTC) (envelope-from rlibby@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 29A2A364A; Thu, 14 Sep 2017 03:42:42 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8E3gfpt085112; Thu, 14 Sep 2017 03:42:41 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E3gfEm085111; Thu, 14 Sep 2017 03:42:41 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709140342.v8E3gfEm085111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 14 Sep 2017 03:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323574 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 03:42:42 -0000 Author: rlibby Date: Thu Sep 14 03:42:41 2017 New Revision: 323574 URL: https://svnweb.freebsd.org/changeset/base/323574 Log: gcc builds: reenable -Wstrict-overflow for kern.mk Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12284 Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Sep 14 03:41:49 2017 (r323573) +++ head/sys/conf/kern.mk Thu Sep 14 03:42:41 2017 (r323574) @@ -58,7 +58,6 @@ CWARNEXTRA?= -Wno-error=address \ -Wno-error=maybe-uninitialized \ -Wno-error=overflow \ -Wno-error=sequence-point \ - -Wno-error=strict-overflow \ -Wno-error=unused-but-set-variable .if ${COMPILER_VERSION} >= 60100 CWARNEXTRA+= -Wno-error=misleading-indentation \ From owner-svn-src-head@freebsd.org Thu Sep 14 04:51:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF112E253C7; Thu, 14 Sep 2017 04:51:18 +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 764CD6452E; Thu, 14 Sep 2017 04:51:18 +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 v8E4pHhC012365; Thu, 14 Sep 2017 04:51:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E4pHT6012364; Thu, 14 Sep 2017 04:51:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709140451.v8E4pHT6012364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Sep 2017 04:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323575 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 323575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 04:51:18 -0000 Author: mav Date: Thu Sep 14 04:51:17 2017 New Revision: 323575 URL: https://svnweb.freebsd.org/changeset/base/323575 Log: Add second entry to LUT on a link side in B2B mode. Each of two entries on a virtual side should have its counterpart on a peer's link side. MFC after: 1 week Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 14 03:42:41 2017 (r323574) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 14 04:51:17 2017 (r323575) @@ -197,8 +197,8 @@ ntb_plx_init(device_t dev) } } - /* Enable Link Interface LUT entry 0 for 0:0.0. */ - PNTX_WRITE(sc, 0xdb4, 1); + /* Enable Link Interface LUT entries 0/1 for peer 0/1. */ + PNTX_WRITE(sc, 0xdb4, 0x00090001); } /* @@ -631,13 +631,12 @@ ntb_plx_mw_set_trans_internal(device_t dev, unsigned m val64 = 0; if (size > 0) val64 = (~(size - 1) & ~0xfffff); - val64 |= 0x4; + val64 |= 0xc; PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); /* Set Link Interface BAR address. */ val64 = 0x2000000000000000 * mw->mw_bar + off; - val64 |= 0x4; PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); } From owner-svn-src-head@freebsd.org Thu Sep 14 05:47:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A09EDE01357; Thu, 14 Sep 2017 05:47:56 +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 79B246592D; Thu, 14 Sep 2017 05:47:56 +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 v8E5lt9B033557; Thu, 14 Sep 2017 05:47:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E5ltM3033554; Thu, 14 Sep 2017 05:47:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709140547.v8E5ltM3033554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Sep 2017 05:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323576 - head/contrib/one-true-awk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/one-true-awk X-SVN-Commit-Revision: 323576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 05:47:56 -0000 Author: imp Date: Thu Sep 14 05:47:55 2017 New Revision: 323576 URL: https://svnweb.freebsd.org/changeset/base/323576 Log: Bring in bit operation functions, ala gawk. These are from OpenBSD: >>> Extend awk with bitwise operations. This is an extension to the awk >>> spec and documented as such, but comes in handy from time to time. >>> The prototypes make it compatible with a similar GNU awk extension. >>> >>> ok millert@, enthusiasm from deraadt@ Edited to fix cut and paste in error messages, as well as using tabs instead of spaces after #defines added. Obtained From: OpenBSD awk.h 1.12, lex.c 1.10, run.c 1.29 Differential Revision: https://reviews.freebsd.org/D12361 Sponsored by: Netflix Modified: head/contrib/one-true-awk/awk.h head/contrib/one-true-awk/lex.c head/contrib/one-true-awk/run.c Modified: head/contrib/one-true-awk/awk.h ============================================================================== --- head/contrib/one-true-awk/awk.h Thu Sep 14 04:51:17 2017 (r323575) +++ head/contrib/one-true-awk/awk.h Thu Sep 14 05:47:55 2017 (r323576) @@ -126,6 +126,12 @@ extern Cell *rlengthloc; /* RLENGTH */ #define FTOUPPER 12 #define FTOLOWER 13 #define FFLUSH 14 +#define FAND 15 +#define FFOR 16 +#define FXOR 17 +#define FCOMPL 18 +#define FLSHIFT 19 +#define FRSHIFT 20 /* Node: parse tree is made of nodes, with Cell's at bottom */ Modified: head/contrib/one-true-awk/lex.c ============================================================================== --- head/contrib/one-true-awk/lex.c Thu Sep 14 04:51:17 2017 (r323575) +++ head/contrib/one-true-awk/lex.c Thu Sep 14 05:47:55 2017 (r323576) @@ -47,9 +47,11 @@ Keyword keywords[] ={ /* keep sorted: binary searched { "BEGIN", XBEGIN, XBEGIN }, { "END", XEND, XEND }, { "NF", VARNF, VARNF }, + { "and", FAND, BLTIN }, { "atan2", FATAN, BLTIN }, { "break", BREAK, BREAK }, { "close", CLOSE, CLOSE }, + { "compl", FCOMPL, BLTIN }, { "continue", CONTINUE, CONTINUE }, { "cos", FCOS, BLTIN }, { "delete", DELETE, DELETE }, @@ -69,13 +71,16 @@ Keyword keywords[] ={ /* keep sorted: binary searched { "int", FINT, BLTIN }, { "length", FLENGTH, BLTIN }, { "log", FLOG, BLTIN }, + { "lshift", FLSHIFT, BLTIN }, { "match", MATCHFCN, MATCHFCN }, { "next", NEXT, NEXT }, { "nextfile", NEXTFILE, NEXTFILE }, + { "or", FFOR, BLTIN }, { "print", PRINT, PRINT }, { "printf", PRINTF, PRINTF }, { "rand", FRAND, BLTIN }, { "return", RETURN, RETURN }, + { "rshift", FRSHIFT, BLTIN }, { "sin", FSIN, BLTIN }, { "split", SPLIT, SPLIT }, { "sprintf", SPRINTF, SPRINTF }, @@ -87,6 +92,7 @@ Keyword keywords[] ={ /* keep sorted: binary searched { "tolower", FTOLOWER, BLTIN }, { "toupper", FTOUPPER, BLTIN }, { "while", WHILE, WHILE }, + { "xor", FXOR, BLTIN }, }; #define RET(x) { if(dbg)printf("lex %s\n", tokname(x)); return(x); } Modified: head/contrib/one-true-awk/run.c ============================================================================== --- head/contrib/one-true-awk/run.c Thu Sep 14 04:51:17 2017 (r323575) +++ head/contrib/one-true-awk/run.c Thu Sep 14 05:47:55 2017 (r323576) @@ -1516,6 +1516,64 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0 nextarg = nextarg->nnext; } break; + case FCOMPL: + u = ~((int)getfval(x)); + break; + case FAND: + if (nextarg == 0) { + WARNING("and requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) & ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FFOR: + if (nextarg == 0) { + WARNING("or requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) | ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FXOR: + if (nextarg == 0) { + WARNING("xor requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) ^ ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FLSHIFT: + if (nextarg == 0) { + WARNING("lshift requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) << ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FRSHIFT: + if (nextarg == 0) { + WARNING("rshift requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) >> ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; case FSYSTEM: fflush(stdout); /* in case something is buffered already */ u = (Awkfloat) system(getsval(x)) / 256; /* 256 is unix-dep */ From owner-svn-src-head@freebsd.org Thu Sep 14 05:48:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F753E013CD; Thu, 14 Sep 2017 05:48:24 +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 4962265A76; Thu, 14 Sep 2017 05:48:24 +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 v8E5mNtG033625; Thu, 14 Sep 2017 05:48:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E5mNIf033623; Thu, 14 Sep 2017 05:48:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709140548.v8E5mNIf033623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Sep 2017 05:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323577 - in head: contrib/one-true-awk usr.bin/awk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: contrib/one-true-awk usr.bin/awk X-SVN-Commit-Revision: 323577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 05:48:24 -0000 Author: imp Date: Thu Sep 14 05:48:23 2017 New Revision: 323577 URL: https://svnweb.freebsd.org/changeset/base/323577 Log: Implement gawk multiple-arg extension to and, or, and xor. gawk allows multiple arguemnts to bit-wiste and, or and xor functions. Implement an arbitrary number of arguments for these functions. Also, use NULL in preference to 0 to match rest of file. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D12361 Modified: head/contrib/one-true-awk/run.c head/usr.bin/awk/awk.1 Modified: head/contrib/one-true-awk/run.c ============================================================================== --- head/contrib/one-true-awk/run.c Thu Sep 14 05:47:55 2017 (r323576) +++ head/contrib/one-true-awk/run.c Thu Sep 14 05:48:23 2017 (r323577) @@ -1476,7 +1476,7 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0 { Cell *x, *y; Awkfloat u; - int t; + int t, i; Awkfloat tmp; char *p, *buf; Node *nextarg; @@ -1520,40 +1520,52 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0 u = ~((int)getfval(x)); break; case FAND: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("and requires two arguments; returning 0"); u = 0; break; } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) & ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; + i = ((int)getfval(x)); + while (nextarg != NULL) { + y = execute(nextarg); + i &= (int)getfval(y); + tempfree(y); + nextarg = nextarg->nnext; + } + u = i; break; case FFOR: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("or requires two arguments; returning 0"); u = 0; break; } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) | ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; + i = ((int)getfval(x)); + while (nextarg != NULL) { + y = execute(nextarg); + i |= (int)getfval(y); + tempfree(y); + nextarg = nextarg->nnext; + } + u = i; break; case FXOR: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("xor requires two arguments; returning 0"); u = 0; break; } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) ^ ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; + i = ((int)getfval(x)); + while (nextarg != NULL) { + y = execute(nextarg); + i ^= (int)getfval(y); + tempfree(y); + nextarg = nextarg->nnext; + } + u = i; break; case FLSHIFT: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("lshift requires two arguments; returning 0"); u = 0; break; @@ -1564,7 +1576,7 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0 nextarg = nextarg->nnext; break; case FRSHIFT: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("rshift requires two arguments; returning 0"); u = 0; break; Modified: head/usr.bin/awk/awk.1 ============================================================================== --- head/usr.bin/awk/awk.1 Thu Sep 14 05:47:55 2017 (r323576) +++ head/usr.bin/awk/awk.1 Thu Sep 14 05:48:23 2017 (r323577) @@ -690,12 +690,15 @@ and returns its exit status. .Bl -tag -width "lshift(a, b)" .It Fn compl x Returns the bitwise complement of integer argument x. -.It Fn and x y -Performs a bitwise AND on integer arguments x and y. -.It Fn or x y -Performs a bitwise OR on integer arguments x and y. -.It Fn xor x y -Performs a bitwise Exclusive-OR on integer arguments x and y. +.It Fn and v1 v2 ... +Performs a bitwise AND on all arguments provided, as integers. +There must be at least two values. +.It Fn or v1 v2 ... +Performs a bitwise OR on all arguments provided, as integers. +There must be at least two values. +.It Fn xor v1 v2 ... +Performs a bitwise Exclusive-OR on all arguments provided, as integers. +There must be at least two values. .It Fn lshift x n Returns integer argument x shifted by n bits to the left. .It Fn rshift x n From owner-svn-src-head@freebsd.org Thu Sep 14 07:32:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE888E05501 for ; Thu, 14 Sep 2017 07:32:01 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::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 5DFDD686BB for ; Thu, 14 Sep 2017 07:32:01 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22a.google.com with SMTP id a137so3682072wma.0 for ; Thu, 14 Sep 2017 00:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=lqL0jDHkT7Aa0ibCjgLsmAyLGzBbXwILQfvqJ+k7XPw=; b=a23va4EJbdk2ozo5JGjK1K3BoD6vpx3vl3LT85VfjsHPTks6dbhkOfYdPp0jdkUjZV G2FKVgZ3Q/amf7NyJIEK2JxS13mkmvMfDwhG4L7zDZugeD8dlVsDcrhWFT/i9GFi0gmg SJ6yTnRxUUIkEDvYZLmvjQloSPXeSpZMTdQQA0BCu9QUcHwGArgSVv5jKSJfWQNz4rXf ixoDqy/osy2Jm5A+En+Os4iUzMMbYczkd1g0Z0FRN8P80EYF1iolryrh40SXVWZYWudo YJ9QLaNcCdJMmxnN+LJQQpYWGD1WfoL+znxS0NZe8cQ8BZVctXVkbjsSlaCIbhcVSN4+ w6qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=lqL0jDHkT7Aa0ibCjgLsmAyLGzBbXwILQfvqJ+k7XPw=; b=nujyBkxEbDCRu66w2xoNty1KTMM9iXjuPVO3dm+/emUNRrbVeABySUmr1QDtuO4Bum itVwJbMVBra2Bmof0/L0T14zL9ooQJKbrYF+TulL6yZ32DQ+OMm38P4bEtqUQGG++ncb VaEDCegvM2RdxvfcmnEvmUizTq3oajd02hdHInY82vvUNvDHsVHbsj/GMpWl4HAPF8ZG ruARTkLjdlRmTG8V4G/mAbBN1D9gFhY9bFcEEqiwZrrX05DrG8yXDk69FI74vqGCT5jx vqMIRRYUh72VwjYJGvIBSOq+PLmwZWvLiPfyIQ1KDmXM2vlRwYCjAhvpfdygKn46305T kc2Q== X-Gm-Message-State: AHPjjUipUozg5BoRbIHN1ttOtxiWpEq8mWddDtn4RS3EoHz0L3a09q8n +iHdUOwqZHl7ThFKHEN0hQ== X-Google-Smtp-Source: AOwi7QBuAH3ostErlok7x/nes+qan34fkyudobrA0CaxTk9VbW0g7npm84YxXUh8KQAeNzcxlcQOqw== X-Received: by 10.28.212.65 with SMTP id l62mr966550wmg.77.1505374319157; Thu, 14 Sep 2017 00:31:59 -0700 (PDT) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id g37sm19563379wra.6.2017.09.14.00.31.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 00:31:57 -0700 (PDT) Subject: Re: svn commit: r323566 - head/sys/kern To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709132211.v8DMB6Pp048326@repo.freebsd.org> From: Steven Hartland Message-ID: <4ae03e74-4fc3-d23b-4f14-3329b20b8df0@multiplay.co.uk> Date: Thu, 14 Sep 2017 08:31:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709132211.v8DMB6Pp048326@repo.freebsd.org> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 07:32:01 -0000 Is this something that will be MFC'ed to 11 or is this 12 / CURRENT only? On 13/09/2017 23:11, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Sep 13 22:11:05 2017 > New Revision: 323566 > URL: https://svnweb.freebsd.org/changeset/base/323566 > > Log: > Use soref() in sendfile(2) instead fhold() to reference a socket. > > The problem is that fdrop() requires syscall context, as it may > enter sleep in some cases. The reason to use it in the original > non-blocking sendfile implementation, was to avoid use of global > ACCEPT_LOCK() on every I/O completion. Now in head sorele() no > longer requires this lock. > > Modified: > head/sys/kern/kern_sendfile.c > > Modified: head/sys/kern/kern_sendfile.c > ============================================================================== > --- head/sys/kern/kern_sendfile.c Wed Sep 13 21:56:49 2017 (r323565) > +++ head/sys/kern/kern_sendfile.c Wed Sep 13 22:11:05 2017 (r323566) > @@ -80,7 +80,7 @@ struct sf_io { > volatile u_int nios; > u_int error; > int npages; > - struct file *sock_fp; > + struct socket *so; > struct mbuf *m; > vm_page_t pa[]; > }; > @@ -255,7 +255,7 @@ static void > sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) > { > struct sf_io *sfio = arg; > - struct socket *so; > + struct socket *so = sfio->so; > > for (int i = 0; i < count; i++) > if (pg[i] != bogus_page) > @@ -267,8 +267,6 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i > if (!refcount_release(&sfio->nios)) > return; > > - so = sfio->sock_fp->f_data; > - > if (sfio->error) { > struct mbuf *m; > > @@ -296,8 +294,8 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i > CURVNET_RESTORE(); > } > > - /* XXXGL: curthread */ > - fdrop(sfio->sock_fp, curthread); > + SOCK_LOCK(so); > + sorele(so); > free(sfio, M_TEMP); > } > > @@ -724,6 +722,7 @@ retry_space: > sfio = malloc(sizeof(struct sf_io) + > npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); > refcount_init(&sfio->nios, 1); > + sfio->so = so; > sfio->error = 0; > > nios = sendfile_swapin(obj, sfio, off, space, npages, rhpages, > @@ -858,9 +857,8 @@ prepend_header: > error = (*so->so_proto->pr_usrreqs->pru_send) > (so, 0, m, NULL, NULL, td); > } else { > - sfio->sock_fp = sock_fp; > sfio->npages = npages; > - fhold(sock_fp); > + soref(so); > error = (*so->so_proto->pr_usrreqs->pru_send) > (so, PRUS_NOTREADY, m, NULL, NULL, td); > sendfile_iodone(sfio, NULL, 0, 0); > From owner-svn-src-head@freebsd.org Thu Sep 14 08:47:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE62AE08A6E; Thu, 14 Sep 2017 08:47:07 +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 A7C766AD3F; Thu, 14 Sep 2017 08:47:07 +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 v8E8l6Ct006796; Thu, 14 Sep 2017 08:47:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8E8l6GN006794; Thu, 14 Sep 2017 08:47:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709140847.v8E8l6GN006794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 14 Sep 2017 08:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323578 - in head/sys: cddl/compat/opensolaris/kern kern X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: cddl/compat/opensolaris/kern kern X-SVN-Commit-Revision: 323578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 08:47:08 -0000 Author: avg Date: Thu Sep 14 08:47:06 2017 New Revision: 323578 URL: https://svnweb.freebsd.org/changeset/base/323578 Log: dounmount: do not release the mount point's reference on the covered vnode As long as mnt_ref is not zero there can be a consumer that might try to access mnt_vnodecovered. For this reason the covered vnode must not be freed until mnt_ref goes to zero. So, move the release of the covered vnode to vfs_mount_destroy. Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D12329 Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c head/sys/kern/vfs_mount.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Thu Sep 14 05:48:23 2017 (r323577) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Thu Sep 14 08:47:06 2017 (r323578) @@ -209,6 +209,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const cha vput(vp); vfs_unbusy(mp); vfs_freeopts(mp->mnt_optnew); + mp->mnt_vnodecovered = NULL; vfs_mount_destroy(mp); return (error); } Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Sep 14 05:48:23 2017 (r323577) +++ head/sys/kern/vfs_mount.c Thu Sep 14 08:47:06 2017 (r323578) @@ -507,6 +507,8 @@ vfs_mount_destroy(struct mount *mp) KASSERT(mp->mnt_ref == 0, ("%s: invalid refcount in the drain path @ %s:%d", __func__, __FILE__, __LINE__)); + if (mp->mnt_vnodecovered != NULL) + vrele(mp->mnt_vnodecovered); if (mp->mnt_writeopcount != 0) panic("vfs_mount_destroy: nonzero writeopcount"); if (mp->mnt_secondary_writes != 0) @@ -819,6 +821,7 @@ vfs_domount_first( error = VFS_MOUNT(mp); if (error != 0) { vfs_unbusy(mp); + mp->mnt_vnodecovered = NULL; vfs_mount_destroy(mp); VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; @@ -1426,7 +1429,7 @@ dounmount(struct mount *mp, int flags, struct thread * EVENTHANDLER_INVOKE(vfs_unmounted, mp, td); if (coveredvp != NULL) { coveredvp->v_mountedhere = NULL; - vput(coveredvp); + VOP_UNLOCK(coveredvp, 0); } vfs_event_signal(NULL, VQ_UNMOUNT, 0); if (mp == rootdevmp) From owner-svn-src-head@freebsd.org Thu Sep 14 14:26:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD1CCE1B8C8; Thu, 14 Sep 2017 14:26: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 A740B75FDA; Thu, 14 Sep 2017 14:26: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 v8EEQupt045499; Thu, 14 Sep 2017 14:26:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EEQupo045490; Thu, 14 Sep 2017 14:26:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141426.v8EEQupo045490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 14:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323579 - in head/sys: arm/include arm64/include kern mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: arm/include arm64/include kern mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Commit-Revision: 323579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 14:26:57 -0000 Author: jhb Date: Thu Sep 14 14:26:55 2017 New Revision: 323579 URL: https://svnweb.freebsd.org/changeset/base/323579 Log: Add AT_HWCAP and AT_EHDRFLAGS on all platforms. A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A process ABI can set this field to point to a value holding a mask of architecture-specific CPU feature flags. If an ABI does not wish to supply AT_HWCAP to processes the field can be left as NULL. The support code for AT_EHDRFLAGS was already present on all systems, just the #define was not present. This is a step towards unifying the AT_* constants across platforms. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12290 Modified: head/sys/arm/include/elf.h head/sys/arm64/include/elf.h head/sys/kern/imgact_elf.c head/sys/mips/include/elf.h head/sys/powerpc/include/elf.h head/sys/riscv/include/elf.h head/sys/sparc64/include/elf.h head/sys/sys/sysent.h head/sys/x86/include/elf.h Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/arm/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -85,8 +85,9 @@ __ElfType(Auxinfo); #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 25 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ Modified: head/sys/arm64/include/elf.h ============================================================================== --- head/sys/arm64/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/arm64/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -90,8 +90,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/kern/imgact_elf.c Thu Sep 14 14:26:55 2017 (r323579) @@ -1110,9 +1110,7 @@ __elfN(freebsd_fixup)(register_t **stack_base, struct AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); -#ifdef AT_EHDRFLAGS AUXARGS_ENTRY(pos, AT_EHDRFLAGS, args->hdr_eflags); -#endif if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); AUXARGS_ENTRY(pos, AT_OSRELDATE, @@ -1133,6 +1131,8 @@ __elfN(freebsd_fixup)(register_t **stack_base, struct AUXARGS_ENTRY(pos, AT_STACKPROT, imgp->sysent->sv_shared_page_obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : imgp->sysent->sv_stackprot); + if (imgp->sysent->sv_hwcap != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/mips/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -144,8 +144,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ #define ET_DYN_LOAD_ADDR 0x0120000 Modified: head/sys/powerpc/include/elf.h ============================================================================== --- head/sys/powerpc/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/powerpc/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -107,8 +107,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 19 /* Number of pagesizes. */ #define AT_STACKPROT 21 /* Initial stack protection. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 23 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* * Relocation types. Modified: head/sys/riscv/include/elf.h ============================================================================== --- head/sys/riscv/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/riscv/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -90,8 +90,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: head/sys/sparc64/include/elf.h ============================================================================== --- head/sys/sparc64/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/sparc64/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -92,8 +92,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #if __ELF_WORD_SIZE == 32 Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/sys/sysent.h Thu Sep 14 14:26:55 2017 (r323579) @@ -129,6 +129,7 @@ struct sysentvec { void (*sv_schedtail)(struct thread *); void (*sv_thread_detach)(struct thread *); int (*sv_trap)(struct thread *); + u_long *sv_hwcap; /* Value passed in AT_HWCAP. */ }; #define SV_ILP32 0x000100 /* 32-bit executable. */ Modified: head/sys/x86/include/elf.h ============================================================================== --- head/sys/x86/include/elf.h Thu Sep 14 08:47:06 2017 (r323578) +++ head/sys/x86/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) @@ -100,8 +100,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* * Relocation types. From owner-svn-src-head@freebsd.org Thu Sep 14 14:30:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73552E1BC44; Thu, 14 Sep 2017 14:30:45 +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 4C39D7620E; Thu, 14 Sep 2017 14:30:45 +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 v8EEUiPx045695; Thu, 14 Sep 2017 14:30:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EEUieQ045691; Thu, 14 Sep 2017 14:30:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141430.v8EEUieQ045691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 14:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323580 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 323580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 14:30:45 -0000 Author: jhb Date: Thu Sep 14 14:30:43 2017 New Revision: 323580 URL: https://svnweb.freebsd.org/changeset/base/323580 Log: Add AT_HWCAP flags for VFP settings for FreeBSD/arm. These flags match the meaning and value of flags in Linux, though Linux has many more flags. Reviewed by: stevek, Michal Meloun (earlier version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12291 Modified: head/sys/arm/arm/elf_machdep.c head/sys/arm/arm/vfp.c head/sys/arm/include/elf.h head/sys/arm/include/md_var.h Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Thu Sep 14 14:26:55 2017 (r323579) +++ head/sys/arm/arm/elf_machdep.c Thu Sep 14 14:30:43 2017 (r323580) @@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$"); static boolean_t elf32_arm_abi_supported(struct image_params *); +u_long elf_hwcap; + struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -86,6 +88,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &elf_hwcap, }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Thu Sep 14 14:26:55 2017 (r323579) +++ head/sys/arm/arm/vfp.c Thu Sep 14 14:30:43 2017 (r323580) @@ -33,9 +33,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -115,6 +117,7 @@ vfp_init(void) vfp_exists = 1; is_d32 = 0; PCPU_SET(vfpsid, fpsid); /* save the fpsid */ + elf_hwcap |= HWCAP_VFP; vfp_arch = (fpsid & VFPSID_SUBVERSION2_MASK) >> VFPSID_SUBVERSION_OFF; @@ -122,9 +125,13 @@ vfp_init(void) if (vfp_arch >= VFP_ARCH3) { tmp = fmrx(mvfr0); PCPU_SET(vfpmvfr0, tmp); + elf_hwcap |= HWCAP_VFPv3; - if ((tmp & VMVFR0_RB_MASK) == 2) + if ((tmp & VMVFR0_RB_MASK) == 2) { + elf_hwcap |= HWCAP_VFPD32; is_d32 = 1; + } else + elf_hwcap |= HWCAP_VFPv3D16; tmp = fmrx(mvfr1); PCPU_SET(vfpmvfr1, tmp); Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Thu Sep 14 14:26:55 2017 (r323579) +++ head/sys/arm/include/elf.h Thu Sep 14 14:30:43 2017 (r323580) @@ -115,4 +115,10 @@ __ElfType(Auxinfo); #define ET_DYN_LOAD_ADDR 0x12000 +/* Flags passed in AT_HWCAP. */ +#define HWCAP_VFP 0x00000040 +#define HWCAP_VFPv3 0x00000200 +#define HWCAP_VFPv3D16 0x00000400 +#define HWCAP_VFPD32 0x00080000 + #endif /* !_MACHINE_ELF_H_ */ Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Thu Sep 14 14:26:55 2017 (r323579) +++ head/sys/arm/include/md_var.h Thu Sep 14 14:30:43 2017 (r323580) @@ -38,6 +38,7 @@ extern char sigcode[]; extern int szsigcode; extern uint32_t *vm_page_dump; extern int vm_page_dump_size; +extern u_long elf_hwcap; extern int (*_arm_memcpy)(void *, void *, int, int); extern int (*_arm_bzero)(void *, int, int); From owner-svn-src-head@freebsd.org Thu Sep 14 14:36:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E4C6E1C2F1; Thu, 14 Sep 2017 14:36:58 +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 D03E5766D6; Thu, 14 Sep 2017 14:36: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 v8EEavGH049786; Thu, 14 Sep 2017 14:36:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EEavSd049785; Thu, 14 Sep 2017 14:36:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141436.v8EEavSd049785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 14:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323581 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 323581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 14:36:58 -0000 Author: jhb Date: Thu Sep 14 14:36:56 2017 New Revision: 323581 URL: https://svnweb.freebsd.org/changeset/base/323581 Log: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext. Future changes will use these functions to fetch and store VFP state for threads other than curthread. Reviewed by: andrew, stevek, Michal Meloun MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12292 Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Sep 14 14:30:43 2017 (r323580) +++ head/sys/arm/arm/machdep.c Thu Sep 14 14:36:56 2017 (r323581) @@ -408,17 +408,18 @@ exec_setregs(struct thread *td, struct image_params *i static void get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { - struct pcb *curpcb; + struct pcb *pcb; - curpcb = curthread->td_pcb; - critical_enter(); - - vfp_store(&curpcb->pcb_vfpstate, false); - memcpy(vfp->mcv_reg, curpcb->pcb_vfpstate.reg, + pcb = td->td_pcb; + if (td == curthread) { + critical_enter(); + vfp_store(&pcb->pcb_vfpstate, false); + critical_exit(); + } else + MPASS(TD_IS_SUSPENDED(td)); + memcpy(vfp->mcv_reg, pcb->pcb_vfpstate.reg, sizeof(vfp->mcv_reg)); - vfp->mcv_fpscr = curpcb->pcb_vfpstate.fpscr; - - critical_exit(); + vfp->mcv_fpscr = pcb->pcb_vfpstate.fpscr; } /* @@ -427,17 +428,18 @@ get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) static void set_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { - struct pcb *curpcb; + struct pcb *pcb; - curpcb = curthread->td_pcb; - critical_enter(); - - vfp_discard(td); - memcpy(curpcb->pcb_vfpstate.reg, vfp->mcv_reg, - sizeof(curpcb->pcb_vfpstate.reg)); - curpcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr; - - critical_exit(); + pcb = td->td_pcb; + if (td == curthread) { + critical_enter(); + vfp_discard(td); + critical_exit(); + } else + MPASS(TD_IS_SUSPENDED(td)); + memcpy(pcb->pcb_vfpstate.reg, vfp->mcv_reg, + sizeof(pcb->pcb_vfpstate.reg)); + pcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr; } #endif From owner-svn-src-head@freebsd.org Thu Sep 14 15:03:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 612D6E1DE70; Thu, 14 Sep 2017 15:03:45 +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 3B9CC77BAA; Thu, 14 Sep 2017 15:03:45 +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 v8EF3ikC061745; Thu, 14 Sep 2017 15:03:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EF3irB061741; Thu, 14 Sep 2017 15:03:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141503.v8EF3irB061741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 15:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323582 - in head: lib/libc/sys sys/arm/arm sys/arm/include sys/conf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: lib/libc/sys sys/arm/arm sys/arm/include sys/conf X-SVN-Commit-Revision: 323582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:03:45 -0000 Author: jhb Date: Thu Sep 14 15:03:43 2017 New Revision: 323582 URL: https://svnweb.freebsd.org/changeset/base/323582 Log: Add ptrace operations to fetch and store VFP registers. Reviewed by: mmel, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12294 Added: head/sys/arm/arm/ptrace_machdep.c (contents, props changed) Modified: head/lib/libc/sys/ptrace.2 head/sys/arm/include/ptrace.h head/sys/conf/files.arm Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Thu Sep 14 14:36:56 2017 (r323581) +++ head/lib/libc/sys/ptrace.2 Thu Sep 14 15:03:43 2017 (r323582) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd June 11, 2017 +.Dd September 14, 2017 .Dt PTRACE 2 .Os .Sh NAME @@ -762,6 +762,28 @@ The .Fa data argument is ignored. .El +.Sh ARM MACHINE-SPECIFIC REQUESTS +.Bl -tag -width "Dv PT_SETVFPREGS" +.It Dv PT_GETVFPREGS +Return the thread's +.Dv VFP +machine state in the buffer pointed to by +.Fa addr . +.Pp +The +.Fa data +argument is ignored. +.It Dv PT_SETVFPREGS +Set the thread's +.Dv VFP +machine state from the buffer pointed to by +.Fa addr . +.Pp +The +.Fa data +argument is ignored. +.El +.Pp .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_GETXSTATE_INFO" .It Dv PT_GETXMMREGS Added: head/sys/arm/arm/ptrace_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/ptrace_machdep.c Thu Sep 14 15:03:43 2017 (r323582) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2017 John Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#ifdef VFP +#include +#endif + +int +cpu_ptrace(struct thread *td, int req, void *addr, int data) +{ +#ifdef VFP + mcontext_vfp_t vfp; +#endif + int error; + + switch (req) { +#ifdef VFP + case PT_GETVFPREGS: + get_vfpcontext(td, &vfp); + error = copyout(&vfp, addr, sizeof(vfp)); + break; + case PT_SETVFPREGS: + error = copyin(addr, &vfp, sizeof(vfp)); + if (error == 0) + set_vfpcontext(td, &vfp); + break; +#endif + default: + error = EINVAL; + } + + return (error); +} Modified: head/sys/arm/include/ptrace.h ============================================================================== --- head/sys/arm/include/ptrace.h Thu Sep 14 14:36:56 2017 (r323581) +++ head/sys/arm/include/ptrace.h Thu Sep 14 15:03:43 2017 (r323582) @@ -4,5 +4,20 @@ #ifndef _MACHINE_PTRACE_H_ #define _MACHINE_PTRACE_H_ +#define __HAVE_PTRACE_MACHDEP + +/* + * Must match mcontext_vfp_t. Note that mcontext_vfp_t does not + * include explicit padding. + */ +struct vfpreg { + __uint64_t vfp_reg[32]; + __uint32_t vfp_scr; + __uint32_t vfp_pad0; +}; + +#define PT_GETVFPREGS (PT_FIRSTMACH + 0) +#define PT_SETVFPREGS (PT_FIRSTMACH + 1) + #endif /* !_MACHINE_PTRACE_H */ Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Sep 14 14:36:56 2017 (r323581) +++ head/sys/conf/files.arm Thu Sep 14 15:03:43 2017 (r323582) @@ -88,6 +88,7 @@ arm/arm/platform_pl310_if.m optional platform pl310 arm/arm/pmap-v4.c optional !armv6 arm/arm/pmap-v6.c optional armv6 arm/arm/pmu.c optional pmu | fdt hwpmc +arm/arm/ptrace_machdep.c standard arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-head@freebsd.org Thu Sep 14 15:06:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA9F8E1E155; Thu, 14 Sep 2017 15:06:30 +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 9849777E23; Thu, 14 Sep 2017 15:06:30 +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 v8EF6TVe061889; Thu, 14 Sep 2017 15:06:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EF6TNO061887; Thu, 14 Sep 2017 15:06:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141506.v8EF6TNO061887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 15:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323583 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 323583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:06:30 -0000 Author: jhb Date: Thu Sep 14 15:06:29 2017 New Revision: 323583 URL: https://svnweb.freebsd.org/changeset/base/323583 Log: Export get/set_vfpcontext from machdep.c. Should have been part of the previous commit to add ptrace operations for VFP registers. MFC after: 1 month Modified: head/sys/arm/arm/machdep.c head/sys/arm/include/vfp.h Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Sep 14 15:03:43 2017 (r323582) +++ head/sys/arm/arm/machdep.c Thu Sep 14 15:06:29 2017 (r323583) @@ -405,7 +405,7 @@ exec_setregs(struct thread *td, struct image_params *i /* * Get machine VFP context. */ -static void +void get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { struct pcb *pcb; @@ -425,7 +425,7 @@ get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) /* * Set machine VFP context. */ -static void +void set_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { struct pcb *pcb; Modified: head/sys/arm/include/vfp.h ============================================================================== --- head/sys/arm/include/vfp.h Thu Sep 14 15:03:43 2017 (r323582) +++ head/sys/arm/include/vfp.h Thu Sep 14 15:06:29 2017 (r323583) @@ -142,6 +142,8 @@ struct vfp_state { }; #ifdef _KERNEL +void get_vfpcontext(struct thread *, mcontext_vfp_t *); +void set_vfpcontext(struct thread *, mcontext_vfp_t *); void vfp_init(void); void vfp_store(struct vfp_state *, boolean_t); void vfp_discard(struct thread *); From owner-svn-src-head@freebsd.org Thu Sep 14 15:07:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C93E1E2DB; Thu, 14 Sep 2017 15:07:49 +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 7B39A7C150; Thu, 14 Sep 2017 15:07:49 +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 v8EF7mOr061974; Thu, 14 Sep 2017 15:07:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EF7mEc061971; Thu, 14 Sep 2017 15:07:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141507.v8EF7mEc061971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 15:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323584 - in head: sys/arm/arm sys/sys usr.bin/gcore X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sys/arm/arm sys/sys usr.bin/gcore X-SVN-Commit-Revision: 323584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:07:49 -0000 Author: jhb Date: Thu Sep 14 15:07:48 2017 New Revision: 323584 URL: https://svnweb.freebsd.org/changeset/base/323584 Log: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread. The core note matches the format and layout of NT_ARM_VFP on Linux. Debuggers use the AT_HWCAP flags to determine how many VFP registers are actually used and their format. Reviewed by: mmel (earlier version w/o gcore) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12293 Modified: head/sys/arm/arm/elf_machdep.c head/sys/sys/elf_common.h head/usr.bin/gcore/elfcore.c Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Thu Sep 14 15:06:29 2017 (r323583) +++ head/sys/arm/arm/elf_machdep.c Thu Sep 14 15:07:48 2017 (r323584) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef VFP +#include +#endif static boolean_t elf32_arm_abi_supported(struct image_params *); @@ -127,9 +130,19 @@ elf32_arm_abi_supported(struct image_params *imgp) } void -elf32_dump_thread(struct thread *td __unused, void *dst __unused, - size_t *off __unused) +elf32_dump_thread(struct thread *td, void *dst, size_t *off) { +#ifdef VFP + mcontext_vfp_t vfp; + + if (dst != NULL) { + get_vfpcontext(td, &vfp); + *off = elf32_populate_note(NT_ARM_VFP, &vfp, dst, sizeof(vfp), + NULL); + } else + *off = elf32_populate_note(NT_ARM_VFP, NULL, NULL, sizeof(vfp), + NULL); +#endif } /* Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Sep 14 15:06:29 2017 (r323583) +++ head/sys/sys/elf_common.h Thu Sep 14 15:07:48 2017 (r323584) @@ -757,6 +757,7 @@ typedef struct { #define NT_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state. */ +#define NT_ARM_VFP 0x400 /* ARM VFP registers */ /* Symbol Binding - ELFNN_ST_BIND - st_info */ #define STB_LOCAL 0 /* Local symbol */ Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Thu Sep 14 15:06:29 2017 (r323583) +++ head/usr.bin/gcore/elfcore.c Thu Sep 14 15:07:48 2017 (r323584) @@ -109,6 +109,9 @@ static void *elf_note_prpsinfo(void *, size_t *); static void *elf_note_prstatus(void *, size_t *); static void *elf_note_thrmisc(void *, size_t *); static void *elf_note_ptlwpinfo(void *, size_t *); +#if defined(__arm__) +static void *elf_note_arm_vfp(void *, size_t *); +#endif #if defined(__i386__) || defined(__amd64__) static void *elf_note_x86_xstate(void *, size_t *); #endif @@ -368,6 +371,9 @@ elf_putnotes(pid_t pid, struct sbuf *sb, size_t *sizep elf_putnote(NT_FPREGSET, elf_note_fpregset, tids + i, sb); elf_putnote(NT_THRMISC, elf_note_thrmisc, tids + i, sb); elf_putnote(NT_PTLWPINFO, elf_note_ptlwpinfo, tids + i, sb); +#if defined(__arm__) + elf_putnote(NT_ARM_VFP, elf_note_arm_vfp, tids + i, sb); +#endif #if defined(__i386__) || defined(__amd64__) elf_putnote(NT_X86_XSTATE, elf_note_x86_xstate, tids + i, sb); #endif @@ -717,6 +723,31 @@ elf_note_ptlwpinfo(void *arg, size_t *sizep) *sizep = sizeof(int) + sizeof(struct ptrace_lwpinfo); return (p); } + +#if defined(__arm__) +static void * +elf_note_arm_vfp(void *arg, size_t *sizep) +{ + lwpid_t tid; + struct vfpreg *vfp; + static bool has_vfp = true; + struct vfpreg info; + + tid = *(lwpid_t *)arg; + if (has_vfp) { + if (ptrace(PT_GETVFPREGS, tid, (void *)&info, 0) != 0) + has_vfp = false; + } + if (!has_vfp) { + *sizep = 0; + return (NULL); + } + vfp = calloc(1, sizeof(*vfp)); + memcpy(vfp, &info, sizeof(*vfp)); + *sizep = sizeof(*vfp); + return (vfp); +} +#endif #if defined(__i386__) || defined(__amd64__) static void * From owner-svn-src-head@freebsd.org Thu Sep 14 15:34:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF89E1FECB; Thu, 14 Sep 2017 15:34:31 +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 CED0E804AA; Thu, 14 Sep 2017 15:34:30 +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 v8EFYT10074041; Thu, 14 Sep 2017 15:34:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EFYTMW074040; Thu, 14 Sep 2017 15:34:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141534.v8EFYTMW074040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 15:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323585 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 323585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:34:31 -0000 Author: jhb Date: Thu Sep 14 15:34:29 2017 New Revision: 323585 URL: https://svnweb.freebsd.org/changeset/base/323585 Log: Add AT_EHDRFLAGS and AT_HWCAP on amd64. x86 has two separate (but identical) list of AT_* constants and the earlier commit to add AT_HWCAP only updated the i386 list. Modified: head/sys/x86/include/elf.h Modified: head/sys/x86/include/elf.h ============================================================================== --- head/sys/x86/include/elf.h Thu Sep 14 15:07:48 2017 (r323584) +++ head/sys/x86/include/elf.h Thu Sep 14 15:34:29 2017 (r323585) @@ -187,8 +187,10 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ +#define AT_HWCAP 25 /* CPU feature flags. */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 26 /* Count of defined aux entry types. */ /* * Relocation types. From owner-svn-src-head@freebsd.org Thu Sep 14 15:34:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0667E1FF4C; Thu, 14 Sep 2017 15:34:46 +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 9BAB0805BB; Thu, 14 Sep 2017 15:34:46 +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 v8EFYjWe074095; Thu, 14 Sep 2017 15:34:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EFYjKh074090; Thu, 14 Sep 2017 15:34:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709141534.v8EFYjKh074090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 14 Sep 2017 15:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323586 - in head/sys/dev: amdsmn amdtemp intpm ioat ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/dev: amdsmn amdtemp intpm ioat ntb/ntb_hw X-SVN-Commit-Revision: 323586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:34:46 -0000 Author: cem Date: Thu Sep 14 15:34:45 2017 New Revision: 323586 URL: https://svnweb.freebsd.org/changeset/base/323586 Log: Add PNP metadata to a few drivers An eventual devd(8) or other component should be able to scan buses and automatically load drivers that match device ids described in this metadata. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12364 Modified: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/intpm/intpm.c head/sys/dev/ioat/ioat.c head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Thu Sep 14 15:34:29 2017 (r323585) +++ head/sys/dev/amdsmn/amdsmn.c Thu Sep 14 15:34:45 2017 (r323586) @@ -89,6 +89,8 @@ static driver_t amdsmn_driver = { static devclass_t amdsmn_devclass; DRIVER_MODULE(amdsmn, hostb, amdsmn_driver, amdsmn_devclass, NULL, NULL); MODULE_VERSION(amdsmn, 1); +MODULE_PNP_INFO("W32:vendor/device", pci, amdsmn, amdsmn_ids, + sizeof(amdsmn_ids[0]), nitems(amdsmn_ids)); static bool amdsmn_match(device_t parent) Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Thu Sep 14 15:34:29 2017 (r323585) +++ head/sys/dev/amdtemp/amdtemp.c Thu Sep 14 15:34:45 2017 (r323586) @@ -100,7 +100,6 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H }, { VENDORID_AMD, DEVICEID_AMD_MISC17 }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H }, - { 0, 0 } }; /* @@ -165,6 +164,8 @@ static devclass_t amdtemp_devclass; DRIVER_MODULE(amdtemp, hostb, amdtemp_driver, amdtemp_devclass, NULL, NULL); MODULE_VERSION(amdtemp, 1); MODULE_DEPEND(amdtemp, amdsmn, 1, 1, 1); +MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdtemp, amdtemp_products, + sizeof(amdtemp_products[0]), nitems(amdtemp_products)); static int amdtemp_match(device_t dev) @@ -175,7 +176,7 @@ amdtemp_match(device_t dev) vendor = pci_get_vendor(dev); devid = pci_get_device(dev); - for (i = 0; amdtemp_products[i].amdtemp_vendorid != 0; i++) { + for (i = 0; i < nitems(amdtemp_products); i++) { if (vendor == amdtemp_products[i].amdtemp_vendorid && devid == amdtemp_products[i].amdtemp_deviceid) return (1); Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Thu Sep 14 15:34:29 2017 (r323585) +++ head/sys/dev/intpm/intpm.c Thu Sep 14 15:34:45 2017 (r323586) @@ -88,34 +88,38 @@ static int intsmb_stop_poll(struct intsmb_softc *sc); static int intsmb_free(struct intsmb_softc *sc); static void intsmb_rawintr(void *arg); +const struct intsmb_device { + uint32_t devid; + const char *description; +} intsmb_products[] = { + { 0x71138086, "Intel PIIX4 SMBUS Interface" }, + { 0x719b8086, "Intel PIIX4 SMBUS Interface" }, +#if 0 + /* Not a good idea yet, this stops isab0 functioning */ + { 0x02001166, "ServerWorks OSB4" }, +#endif + { 0x43721002, "ATI IXP400 SMBus Controller" }, + { AMDSB_SMBUS_DEVID, "AMD SB600/7xx/8xx/9xx SMBus Controller" }, + { AMDFCH_SMBUS_DEVID, "AMD FCH SMBus Controller" }, + { AMDCZ_SMBUS_DEVID, "AMD FCH SMBus Controller" }, +}; + static int intsmb_probe(device_t dev) { + const struct intsmb_device *isd; + uint32_t devid; + size_t i; - switch (pci_get_devid(dev)) { - case 0x71138086: /* Intel 82371AB */ - case 0x719b8086: /* Intel 82443MX */ -#if 0 - /* Not a good idea yet, this stops isab0 functioning */ - case 0x02001166: /* ServerWorks OSB4 */ -#endif - device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); - break; - case 0x43721002: - device_set_desc(dev, "ATI IXP400 SMBus Controller"); - break; - case AMDSB_SMBUS_DEVID: - device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); - break; - case AMDFCH_SMBUS_DEVID: /* AMD FCH */ - case AMDCZ_SMBUS_DEVID: /* AMD Carizzo FCH */ - device_set_desc(dev, "AMD FCH SMBus Controller"); - break; - default: - return (ENXIO); + devid = pci_get_devid(dev); + for (i = 0; i < nitems(intsmb_products); i++) { + isd = &intsmb_products[i]; + if (isd->devid == devid) { + device_set_desc(dev, isd->description); + return (BUS_PROBE_DEFAULT); + } } - - return (BUS_PROBE_DEFAULT); + return (ENXIO); } static uint8_t @@ -891,3 +895,5 @@ DRIVER_MODULE_ORDERED(intsmb, pci, intsmb_driver, ints DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devclass, 0, 0); MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); MODULE_VERSION(intsmb, 1); +MODULE_PNP_INFO("W32:vendor/device;D:human", pci, intpm, intsmb_products, + sizeof(intsmb_products[0]), nitems(intsmb_products)); Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Thu Sep 14 15:34:29 2017 (r323585) +++ head/sys/dev/ioat/ioat.c Thu Sep 14 15:34:45 2017 (r323586) @@ -236,10 +236,11 @@ static struct _pcsid { 0x6f278086, "BDX IOAT Ch7" }, { 0x6f2e8086, "BDX IOAT Ch0 (RAID)" }, { 0x6f2f8086, "BDX IOAT Ch1 (RAID)" }, - - { 0x00000000, NULL } }; +MODULE_PNP_INFO("W32:vendor/device;D:human", pci, ioat, pci_ids, + sizeof(pci_ids[0]), nitems(pci_ids)); + /* * OS <-> Driver linkage functions */ @@ -250,7 +251,7 @@ ioat_probe(device_t device) u_int32_t type; type = pci_get_devid(device); - for (ep = pci_ids; ep->type; ep++) { + for (ep = pci_ids; ep < &pci_ids[nitems(pci_ids)]; ep++) { if (ep->type == type) { device_set_desc(device, ep->desc); return (0); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Sep 14 15:34:29 2017 (r323585) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Sep 14 15:34:45 2017 (r323586) @@ -495,8 +495,6 @@ static struct ntb_hw_info pci_ids[] = { { 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP }, - - { 0x00000000, NULL, NTB_ATOM, 0 } }; static const struct ntb_reg atom_reg = { @@ -1390,12 +1388,11 @@ intel_ntb_get_msix_info(struct ntb_softc *ntb) static struct ntb_hw_info * intel_ntb_get_device_info(uint32_t device_id) { - struct ntb_hw_info *ep = pci_ids; + struct ntb_hw_info *ep; - while (ep->device_id) { + for (ep = pci_ids; ep < &pci_ids[nitems(pci_ids)]; ep++) { if (ep->device_id == device_id) return (ep); - ++ep; } return (NULL); } @@ -3122,3 +3119,5 @@ static DEFINE_CLASS_0(ntb_hw, ntb_intel_driver, ntb_in DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, ntb_hw_devclass, NULL, NULL); MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); MODULE_VERSION(ntb_hw_intel, 1); +MODULE_PNP_INFO("W32:vendor/device;D:human", pci, ntb_hw_intel, pci_ids, + sizeof(pci_ids[0]), nitems(pci_ids)); From owner-svn-src-head@freebsd.org Thu Sep 14 15:37:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B579E2026A; Thu, 14 Sep 2017 15:37:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.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 4AF9480B55; Thu, 14 Sep 2017 15:37:45 +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 mail.baldwin.cx (Postfix) with ESMTPSA id 8166110A7DB; Thu, 14 Sep 2017 11:37:43 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323580 - in head/sys/arm: arm include Date: Thu, 14 Sep 2017 07:54:17 -0700 Message-ID: <2385698.hFNfOSpqlD@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201709141430.v8EEUieQ045691@repo.freebsd.org> References: <201709141430.v8EEUieQ045691@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 14 Sep 2017 11:37:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 15:37:45 -0000 On Thursday, September 14, 2017 02:30:44 PM John Baldwin wrote: > Author: jhb > Date: Thu Sep 14 14:30:43 2017 > New Revision: 323580 > URL: https://svnweb.freebsd.org/changeset/base/323580 > > Log: > Add AT_HWCAP flags for VFP settings for FreeBSD/arm. > > These flags match the meaning and value of flags in Linux, though > Linux has many more flags. > > Reviewed by: stevek, Michal Meloun (earlier version) > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D12291 It would probably be good to add HWCAP_NEON if someone knows the right things to check to detect it. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Sep 14 16:27:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B5BE22BEA; Thu, 14 Sep 2017 16:27:23 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 1117983789; Thu, 14 Sep 2017 16:27:21 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from dhcp-10-248-113-1.eduroam.wireless.private.cam.ac.uk (global-5-143.nat-2.net.cam.ac.uk [131.111.5.143]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id A66A64E690; Thu, 14 Sep 2017 16:27:14 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r323580 - in head/sys/arm: arm include From: Andrew Turner In-Reply-To: <2385698.hFNfOSpqlD@ralph.baldwin.cx> Date: Thu, 14 Sep 2017 17:27:14 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5678B08C-F4FD-474C-A3F2-8B4C8973FC22@fubar.geek.nz> References: <201709141430.v8EEUieQ045691@repo.freebsd.org> <2385698.hFNfOSpqlD@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 16:27:23 -0000 > On 14 Sep 2017, at 15:54, John Baldwin wrote: >=20 > On Thursday, September 14, 2017 02:30:44 PM John Baldwin wrote: >> Author: jhb >> Date: Thu Sep 14 14:30:43 2017 >> New Revision: 323580 >> URL: https://svnweb.freebsd.org/changeset/base/323580 >>=20 >> Log: >> Add AT_HWCAP flags for VFP settings for FreeBSD/arm. >>=20 >> These flags match the meaning and value of flags in Linux, though >> Linux has many more flags. >>=20 >> Reviewed by: stevek, Michal Meloun = (earlier version) >> MFC after: 1 month >> Differential Revision: https://reviews.freebsd.org/D12291 >=20 > It would probably be good to add HWCAP_NEON if someone knows the right = things > to check to detect it. You=E2=80=99ll need to check the mvfr1 register for it. Linux checks the = A_SIMD SPFP, A_SIMD integer, and A_SIMD load/store fields are all 1. Andrew=20 From owner-svn-src-head@freebsd.org Thu Sep 14 16:41:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CF15E235C9; Thu, 14 Sep 2017 16:41:23 +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 2A41D844D0; Thu, 14 Sep 2017 16:41:23 +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 v8EGfMFq099691; Thu, 14 Sep 2017 16:41:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EGfMCn099690; Thu, 14 Sep 2017 16:41:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709141641.v8EGfMCn099690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 Sep 2017 16:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323587 - head/sys/contrib/octeon-sdk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/contrib/octeon-sdk X-SVN-Commit-Revision: 323587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 16:41:23 -0000 Author: emaste Date: Thu Sep 14 16:41:22 2017 New Revision: 323587 URL: https://svnweb.freebsd.org/changeset/base/323587 Log: octeon sdk: initialize variable to quiet Clang warning Clang complains "variable 'dummy' is uninitialized when used here". Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/contrib/octeon-sdk/cvmx-l2c.c Modified: head/sys/contrib/octeon-sdk/cvmx-l2c.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 14 15:34:45 2017 (r323586) +++ head/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 14 16:41:22 2017 (r323587) @@ -339,7 +339,7 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter) static void fault_in(uint64_t addr, int len) { volatile char *ptr; - volatile char dummy; + volatile char dummy = 0; /* * Adjust addr and length so we get all cache lines even for * small ranges spanning two cache lines. From owner-svn-src-head@freebsd.org Thu Sep 14 16:41:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47B18E235CF; Thu, 14 Sep 2017 16:41:25 +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 15660844DA; Thu, 14 Sep 2017 16:41:25 +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 v8EGfOi4099738; Thu, 14 Sep 2017 16:41:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EGfOLg099737; Thu, 14 Sep 2017 16:41:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709141641.v8EGfOLg099737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 16:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323588 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 323588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 16:41:25 -0000 Author: jhb Date: Thu Sep 14 16:41:24 2017 New Revision: 323588 URL: https://svnweb.freebsd.org/changeset/base/323588 Log: Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores. Reviewed by: emaste MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12371 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Thu Sep 14 16:41:22 2017 (r323587) +++ head/contrib/elftoolchain/readelf/readelf.c Thu Sep 14 16:41:24 2017 (r323588) @@ -1141,7 +1141,9 @@ note_type_freebsd_core(unsigned int nt) case 14: return "NT_PROCSTAT_OSREL"; case 15: return "NT_PROCSTAT_PSSTRINGS"; case 16: return "NT_PROCSTAT_AUXV"; + case 17: return "NT_PTLWPINFO"; case 0x202: return "NT_X86_XSTATE (x86 XSAVE extended state)"; + case 0x400: return "NT_ARM_VFP (arm VFP registers)"; default: return (note_type_unknown(nt)); } } From owner-svn-src-head@freebsd.org Thu Sep 14 16:42:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B1F0E2384D; Thu, 14 Sep 2017 16:42:31 +0000 (UTC) (envelope-from tsoome@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 EA10284863; Thu, 14 Sep 2017 16:42:30 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8EGgUfY002912; Thu, 14 Sep 2017 16:42:30 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EGgUuf002911; Thu, 14 Sep 2017 16:42:30 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709141642.v8EGgUuf002911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 14 Sep 2017 16:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323589 - head/sys/boot/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/i386/libi386 X-SVN-Commit-Revision: 323589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 16:42:31 -0000 Author: tsoome Date: Thu Sep 14 16:42:29 2017 New Revision: 323589 URL: https://svnweb.freebsd.org/changeset/base/323589 Log: loader: biosmem.c cstyle cleanup No functional changes, just cleanup. Reviewed by: allanjude, imp Differential Revision: https://reviews.freebsd.org/D12370 Modified: head/sys/boot/i386/libi386/biosmem.c Modified: head/sys/boot/i386/libi386/biosmem.c ============================================================================== --- head/sys/boot/i386/libi386/biosmem.c Thu Sep 14 16:41:24 2017 (r323588) +++ head/sys/boot/i386/libi386/biosmem.c Thu Sep 14 16:42:29 2017 (r323589) @@ -63,150 +63,157 @@ static uint8_t b_bios_probed; * memory correctly. You need both maker and product as * reported by smbios. */ -#define BQ_DISTRUST_E820_EXTMEM 0x1 /* e820 might not return useful - extended memory */ +/* e820 might not return useful extended memory */ +#define BQ_DISTRUST_E820_EXTMEM 0x1 struct bios_getmem_quirks { - const char* bios_vendor; - const char* maker; - const char* product; - int quirk; + const char *bios_vendor; + const char *maker; + const char *product; + int quirk; }; static struct bios_getmem_quirks quirks[] = { - {"coreboot", "Acer", "Peppy", BQ_DISTRUST_E820_EXTMEM}, - {NULL, NULL, NULL, 0} + {"coreboot", "Acer", "Peppy", BQ_DISTRUST_E820_EXTMEM}, + {NULL, NULL, NULL, 0} }; static int bios_getquirks(void) { - int i; + int i; - for (i=0; quirks[i].quirk != 0; ++i) - if (smbios_match(quirks[i].bios_vendor, quirks[i].maker, - quirks[i].product)) - return (quirks[i].quirk); + for (i = 0; quirks[i].quirk != 0; ++i) { + if (smbios_match(quirks[i].bios_vendor, quirks[i].maker, + quirks[i].product)) + return (quirks[i].quirk); + } - return (0); + return (0); } void bios_getmem(void) { - uint64_t size; + uint64_t size; - /* Parse system memory map */ - v86.ebx = 0; - do { - v86.ctl = V86_FLAGS; - v86.addr = 0x15; /* int 0x15 function 0xe820*/ - v86.eax = 0xe820; - v86.ecx = sizeof(struct bios_smap_xattr); - v86.edx = SMAP_SIG; - v86.es = VTOPSEG(&smap); - v86.edi = VTOPOFF(&smap); - v86int(); - if ((V86_CY(v86.efl)) || (v86.eax != SMAP_SIG)) - break; - /* look for a low-memory segment that's large enough */ - if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0) && - (smap.length >= (512 * 1024))) { - bios_basemem = smap.length; - b_bios_probed |= B_BASEMEM_E820; - } + /* Parse system memory map */ + v86.ebx = 0; + do { + v86.ctl = V86_FLAGS; + v86.addr = 0x15; /* int 0x15 function 0xe820 */ + v86.eax = 0xe820; + v86.ecx = sizeof(struct bios_smap_xattr); + v86.edx = SMAP_SIG; + v86.es = VTOPSEG(&smap); + v86.edi = VTOPOFF(&smap); + v86int(); + if ((V86_CY(v86.efl)) || (v86.eax != SMAP_SIG)) + break; + /* look for a low-memory segment that's large enough */ + if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0) && + (smap.length >= (512 * 1024))) { + bios_basemem = smap.length; + b_bios_probed |= B_BASEMEM_E820; + } - /* look for the first segment in 'extended' memory */ - if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0x100000) && - !(bios_getquirks() & BQ_DISTRUST_E820_EXTMEM)) { - bios_extmem = smap.length; - b_bios_probed |= B_EXTMEM_E820; - } + /* look for the first segment in 'extended' memory */ + if ((smap.type == SMAP_TYPE_MEMORY) && + (smap.base == 0x100000) && + !(bios_getquirks() & BQ_DISTRUST_E820_EXTMEM)) { + bios_extmem = smap.length; + b_bios_probed |= B_EXTMEM_E820; + } - /* - * Look for the largest segment in 'extended' memory beyond - * 1MB but below 4GB. - */ - if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base > 0x100000) && - (smap.base < 0x100000000ull)) { - size = smap.length; + /* + * Look for the largest segment in 'extended' memory beyond + * 1MB but below 4GB. + */ + if ((smap.type == SMAP_TYPE_MEMORY) && + (smap.base > 0x100000) && + (smap.base < 0x100000000ull)) { + size = smap.length; - /* - * If this segment crosses the 4GB boundary, truncate it. - */ - if (smap.base + size > 0x100000000ull) - size = 0x100000000ull - smap.base; + /* + * If this segment crosses the 4GB boundary, + * truncate it. + */ + if (smap.base + size > 0x100000000ull) + size = 0x100000000ull - smap.base; - if (size > high_heap_size) { - high_heap_size = size; - high_heap_base = smap.base; - } - } - } while (v86.ebx != 0); + if (size > high_heap_size) { + high_heap_size = size; + high_heap_base = smap.base; + } + } + } while (v86.ebx != 0); - /* Fall back to the old compatibility function for base memory */ - if (bios_basemem == 0) { - v86.ctl = 0; - v86.addr = 0x12; /* int 0x12 */ - v86int(); - - bios_basemem = (v86.eax & 0xffff) * 1024; - b_bios_probed |= B_BASEMEM_12; - } + /* Fall back to the old compatibility function for base memory */ + if (bios_basemem == 0) { + v86.ctl = 0; + v86.addr = 0x12; /* int 0x12 */ + v86int(); - /* Fall back through several compatibility functions for extended memory */ - if (bios_extmem == 0) { - v86.ctl = V86_FLAGS; - v86.addr = 0x15; /* int 0x15 function 0xe801*/ - v86.eax = 0xe801; - v86int(); - if (!(V86_CY(v86.efl))) { - /* - * Clear high_heap; it may end up overlapping - * with the segment we're determining here. - * Let the default "steal stuff from top of - * bios_extmem" code below pick up on it. - */ - high_heap_size = 0; - high_heap_base = 0; + bios_basemem = (v86.eax & 0xffff) * 1024; + b_bios_probed |= B_BASEMEM_12; + } - /* - * %cx is the number of 1KiB blocks between 1..16MiB. - * It can only be up to 0x3c00; if it's smaller then - * there's a PC AT memory hole so we can't treat - * it as contiguous. - */ - bios_extmem = (v86.ecx & 0xffff) * 1024; - if (bios_extmem == (1024 * 0x3c00)) - bios_extmem += (v86.edx & 0xffff) * 64 * 1024; + /* + * Fall back through several compatibility functions for extended + * memory. + */ + if (bios_extmem == 0) { + v86.ctl = V86_FLAGS; + v86.addr = 0x15; /* int 0x15 function 0xe801 */ + v86.eax = 0xe801; + v86int(); + if (!(V86_CY(v86.efl))) { + /* + * Clear high_heap; it may end up overlapping + * with the segment we're determining here. + * Let the default "steal stuff from top of + * bios_extmem" code below pick up on it. + */ + high_heap_size = 0; + high_heap_base = 0; - /* truncate bios_extmem */ - if (bios_extmem > 0x3ff00000) - bios_extmem = 0x3ff00000; + /* + * %cx is the number of 1KiB blocks between 1..16MiB. + * It can only be up to 0x3c00; if it's smaller then + * there's a PC AT memory hole so we can't treat + * it as contiguous. + */ + bios_extmem = (v86.ecx & 0xffff) * 1024; + if (bios_extmem == (1024 * 0x3c00)) + bios_extmem += (v86.edx & 0xffff) * 64 * 1024; - b_bios_probed |= B_EXTMEM_E801; + /* truncate bios_extmem */ + if (bios_extmem > 0x3ff00000) + bios_extmem = 0x3ff00000; + + b_bios_probed |= B_EXTMEM_E801; + } } - } - if (bios_extmem == 0) { - v86.ctl = 0; - v86.addr = 0x15; /* int 0x15 function 0x88*/ - v86.eax = 0x8800; - v86int(); - bios_extmem = (v86.eax & 0xffff) * 1024; - b_bios_probed |= B_EXTMEM_8800; - } + if (bios_extmem == 0) { + v86.ctl = 0; + v86.addr = 0x15; /* int 0x15 function 0x88 */ + v86.eax = 0x8800; + v86int(); + bios_extmem = (v86.eax & 0xffff) * 1024; + b_bios_probed |= B_EXTMEM_8800; + } - /* Set memtop to actual top of memory */ - memtop = memtop_copyin = 0x100000 + bios_extmem; + /* Set memtop to actual top of memory */ + memtop = memtop_copyin = 0x100000 + bios_extmem; - /* - * If we have extended memory and did not find a suitable heap - * region in the SMAP, use the last HEAP_MIN of 'extended' memory as a - * high heap candidate. - */ - if (bios_extmem >= HEAP_MIN && high_heap_size < HEAP_MIN) { - high_heap_size = HEAP_MIN; - high_heap_base = memtop - HEAP_MIN; - } + /* + * If we have extended memory and did not find a suitable heap + * region in the SMAP, use the last HEAP_MIN of 'extended' memory as a + * high heap candidate. + */ + if (bios_extmem >= HEAP_MIN && high_heap_size < HEAP_MIN) { + high_heap_size = HEAP_MIN; + high_heap_base = memtop - HEAP_MIN; + } } static int @@ -214,16 +221,16 @@ command_biosmem(int argc, char *argv[]) { int bq = bios_getquirks(); - printf("bios_basemem: 0x%llx\n", (unsigned long long) bios_basemem); - printf("bios_extmem: 0x%llx\n", (unsigned long long) bios_extmem); - printf("memtop: 0x%llx\n", (unsigned long long) memtop); - printf("high_heap_base: 0x%llx\n", (unsigned long long) high_heap_base); - printf("high_heap_size: 0x%llx\n", (unsigned long long) high_heap_size); + printf("bios_basemem: 0x%llx\n", (unsigned long long)bios_basemem); + printf("bios_extmem: 0x%llx\n", (unsigned long long)bios_extmem); + printf("memtop: 0x%llx\n", (unsigned long long)memtop); + printf("high_heap_base: 0x%llx\n", (unsigned long long)high_heap_base); + printf("high_heap_size: 0x%llx\n", (unsigned long long)high_heap_size); printf("bios_quirks: 0x%02x", bq); if (bq & BQ_DISTRUST_E820_EXTMEM) printf(" BQ_DISTRUST_E820_EXTMEM"); printf("\n"); - printf("b_bios_probed: 0x%02x", (int) b_bios_probed); + printf("b_bios_probed: 0x%02x", (int)b_bios_probed); if (b_bios_probed & B_BASEMEM_E820) printf(" B_BASEMEM_E820"); if (b_bios_probed & B_BASEMEM_12) From owner-svn-src-head@freebsd.org Thu Sep 14 17:29:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3F10E25DB8; Thu, 14 Sep 2017 17:29: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 BDE852224; Thu, 14 Sep 2017 17:29: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 v8EHTpEA019782; Thu, 14 Sep 2017 17:29:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EHTpM0019776; Thu, 14 Sep 2017 17:29:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709141729.v8EHTpM0019776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 14 Sep 2017 17:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323593 - in head/sys: arm64/arm64 arm64/include conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include conf X-SVN-Commit-Revision: 323593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 17:29:53 -0000 Author: andrew Date: Thu Sep 14 17:29:51 2017 New Revision: 323593 URL: https://svnweb.freebsd.org/changeset/base/323593 Log: Add support for handling undefined instructions in userspace and the kernel. We can register callbacks to perform the required operation on the saved registers before returning. This is initially used to work around a bug in old versions of QEMU that trigger such an exception when reading from an ID register when it should load z zero value. I expect this could be used with other exception types, e.g. to emulate special register access from userland. Sponsored by: DARPA, AFRL Added: head/sys/arm64/arm64/undefined.c (contents, props changed) head/sys/arm64/include/undefined.h (contents, props changed) Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/trap.c head/sys/conf/files.arm64 Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Thu Sep 14 16:58:26 2017 (r323592) +++ head/sys/arm64/arm64/identcpu.c Thu Sep 14 17:29:51 2017 (r323593) @@ -897,11 +897,7 @@ identify_cpu(void) cpu_desc[cpu].id_aa64isar1 = READ_SPECIALREG(ID_AA64ISAR1_EL1); cpu_desc[cpu].id_aa64mmfr0 = READ_SPECIALREG(ID_AA64MMFR0_EL1); cpu_desc[cpu].id_aa64mmfr1 = READ_SPECIALREG(ID_AA64MMFR1_EL1); -#ifdef NOTYET cpu_desc[cpu].id_aa64mmfr2 = READ_SPECIALREG(ID_AA64MMFR2_EL1); -#else - cpu_desc[cpu].id_aa64mmfr2 = 0; -#endif cpu_desc[cpu].id_aa64pfr0 = READ_SPECIALREG(ID_AA64PFR0_EL1); cpu_desc[cpu].id_aa64pfr1 = READ_SPECIALREG(ID_AA64PFR1_EL1); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu Sep 14 16:58:26 2017 (r323592) +++ head/sys/arm64/arm64/machdep.c Thu Sep 14 17:29:51 2017 (r323593) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef VFP @@ -162,6 +163,7 @@ static void cpu_startup(void *dummy) { + undef_init(); identify_cpu(); vm_ksubmap_init(&kmi); Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Thu Sep 14 16:58:26 2017 (r323592) +++ head/sys/arm64/arm64/trap.c Thu Sep 14 17:29:51 2017 (r323593) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KDTRACE_HOOKS #include @@ -332,6 +333,10 @@ do_el1h_sync(struct thread *td, struct trapframe *fram panic("No debugger in kernel.\n"); #endif break; + case EXCP_UNKNOWN: + if (undef_insn(1, frame)) + break; + /* FALLTHROUGH */ default: print_registers(frame); panic("Unknown kernel exception %x esr_el1 %lx\n", exception, @@ -341,20 +346,6 @@ do_el1h_sync(struct thread *td, struct trapframe *fram td->td_frame = oframe; } -/* - * The attempted execution of an instruction bit pattern that has no allocated - * instruction results in an exception with an unknown reason. - */ -static void -el0_excp_unknown(struct trapframe *frame, uint64_t far) -{ - struct thread *td; - - td = curthread; - call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)far); - userret(td, frame); -} - void do_el0_sync(struct thread *td, struct trapframe *frame) { @@ -399,7 +390,9 @@ do_el0_sync(struct thread *td, struct trapframe *frame data_abort(td, frame, esr, far, 1); break; case EXCP_UNKNOWN: - el0_excp_unknown(frame, far); + if (!undef_insn(0, frame)) + call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)far); + userret(td, frame); break; case EXCP_SP_ALIGN: call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_sp); Added: head/sys/arm64/arm64/undefined.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/undefined.c Thu Sep 14 17:29:51 2017 (r323593) @@ -0,0 +1,145 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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 + +MALLOC_DEFINE(M_UNDEF, "undefhandler", "Undefined instruction handler data"); + +struct undef_handler { + LIST_ENTRY(undef_handler) uh_link; + undef_handler_t uh_handler; +}; + +/* + * Create two undefined instruction handler lists, one for userspace, one for + * the kernel. This allows us to handle instructions that will trap + */ +LIST_HEAD(, undef_handler) undef_handlers[2]; + +/* + * Work around a bug in QEMU prior to 2.5.1 where reading unknown ID + * registers would raise an exception when they should return 0. + */ +static int +id_aa64mmfr2_handler(vm_offset_t va, uint32_t insn, struct trapframe *frame, + uint32_t esr) +{ + int reg; + +#define MRS_MASK 0xfff00000 +#define MRS_VALUE 0xd5300000 +#define MRS_REGISTER(insn) ((insn) & 0x1f) +#define MRS_ID_AA64MMFR2_EL0_MASK (MRS_MASK | 0x000fffe0) +#define MRS_ID_AA64MMFR2_EL0_VALUE (MRS_VALUE | 0x00080740) + + /* mrs xn, id_aa64mfr2_el1 */ + if ((insn & MRS_ID_AA64MMFR2_EL0_MASK) == MRS_ID_AA64MMFR2_EL0_VALUE) { + reg = MRS_REGISTER(insn); + + frame->tf_elr += INSN_SIZE; + if (reg < nitems(frame->tf_x)) { + frame->tf_x[reg] = 0; + } else if (reg == 30) { + frame->tf_lr = 0; + } + /* If reg is 32 then write to xzr, i.e. do nothing */ + + return (1); + } + return (0); +} + +void +undef_init(void) +{ + + LIST_INIT(&undef_handlers[0]); + LIST_INIT(&undef_handlers[1]); + + install_undef_handler(false, id_aa64mmfr2_handler); +} + +void * +install_undef_handler(bool user, undef_handler_t func) +{ + struct undef_handler *uh; + + uh = malloc(sizeof(*uh), M_UNDEF, M_WAITOK); + uh->uh_handler = func; + LIST_INSERT_HEAD(&undef_handlers[user ? 0 : 1], uh, uh_link); + + return (uh); +} + +void +remove_undef_handler(void *handle) +{ + struct undef_handler *uh; + + uh = handle; + LIST_REMOVE(uh, uh_link); + free(handle, M_UNDEF); +} + +int +undef_insn(u_int el, struct trapframe *frame) +{ + struct undef_handler *uh; + uint32_t insn; + int ret; + + KASSERT(el < 2, ("Invalid exception level %u", el)); + + if (el == 0) { + ret = fueword32((uint32_t *)frame->tf_elr, &insn); + if (ret != 0) + panic("Unable to read userspace faulting instruction"); + } else { + insn = *(uint32_t *)frame->tf_elr; + } + + LIST_FOREACH(uh, &undef_handlers[el], uh_link) { + ret = uh->uh_handler(frame->tf_elr, insn, frame, frame->tf_esr); + if (ret) + return (1); + } + + return (0); +} Added: head/sys/arm64/include/undefined.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/undefined.h Thu Sep 14 17:29:51 2017 (r323593) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__UNDEFINED_H_ +#define _MACHINE__UNDEFINED_H_ + +typedef int (*undef_handler_t)(vm_offset_t, uint32_t, struct trapframe *, + uint32_t); + +void undef_init(void); +void *install_undef_handler(bool, undef_handler_t); +void remove_undef_handler(void *); +int undef_insn(u_int, struct trapframe *); + +#endif Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Sep 14 16:58:26 2017 (r323592) +++ head/sys/conf/files.arm64 Thu Sep 14 17:29:51 2017 (r323593) @@ -118,6 +118,7 @@ arm64/arm64/sys_machdep.c standard arm64/arm64/trap.c standard arm64/arm64/uio_machdep.c standard arm64/arm64/uma_machdep.c standard +arm64/arm64/undefined.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard From owner-svn-src-head@freebsd.org Thu Sep 14 18:05:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84B16E01DAF; Thu, 14 Sep 2017 18:05:55 +0000 (UTC) (envelope-from glebius@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 5FBB43DC5; Thu, 14 Sep 2017 18:05:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8EI5s8V036477; Thu, 14 Sep 2017 18:05:54 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EI5s8r036476; Thu, 14 Sep 2017 18:05:54 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201709141805.v8EI5s8r036476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Sep 2017 18:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323594 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 18:05:55 -0000 Author: glebius Date: Thu Sep 14 18:05:54 2017 New Revision: 323594 URL: https://svnweb.freebsd.org/changeset/base/323594 Log: Fix locking in soisconnected(). When a newborn socket moves from incomplete queue to complete one, we need to obtain the listening socket lock after the child, which is a wrong order. The old code did that in potentially endless loop of mtx_trylock(). The new one does only one attempt of mtx_trylock(), and in case of failure references listening socket, unlocks child and locks everything in right order. In case if listening socket shuts down during that, just bail out. Reported & tested by: Jason Eggleston Reported & tested by: Jason Wolfe Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Sep 14 17:29:51 2017 (r323593) +++ head/sys/kern/uipc_socket.c Thu Sep 14 18:05:54 2017 (r323594) @@ -3688,24 +3688,41 @@ soisconnecting(struct socket *so) void soisconnected(struct socket *so) { - struct socket *head; - int ret; - /* - * XXXGL: this is the only place where we acquire socket locks - * in reverse order: first child, then listening socket. To - * avoid possible LOR, use try semantics. - */ -restart: SOCK_LOCK(so); - if ((head = so->so_listen) != NULL && - __predict_false(SOLISTEN_TRYLOCK(head) == 0)) { - SOCK_UNLOCK(so); - goto restart; - } so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING); so->so_state |= SS_ISCONNECTED; - if (head != NULL && (so->so_qstate == SQ_INCOMP)) { + + if (so->so_qstate == SQ_INCOMP) { + struct socket *head = so->so_listen; + int ret; + + KASSERT(head, ("%s: so %p on incomp of NULL", __func__, so)); + /* + * Promoting a socket from incomplete queue to complete, we + * need to go through reverse order of locking. We first do + * trylock, and if that doesn't succeed, we go the hard way + * leaving a reference and rechecking consistency after proper + * locking. + */ + if (__predict_false(SOLISTEN_TRYLOCK(head) == 0)) { + soref(head); + SOCK_UNLOCK(so); + SOLISTEN_LOCK(head); + SOCK_LOCK(so); + if (__predict_false(head != so->so_listen)) { + /* + * The socket went off the listen queue, + * should be lost race to close(2) of sol. + * The socket is about to soabort(). + */ + SOCK_UNLOCK(so); + sorele(head); + return; + } + /* Not the last one, as so holds a ref. */ + refcount_release(&head->so_count); + } again: if ((so->so_options & SO_ACCEPTFILTER) == 0) { TAILQ_REMOVE(&head->sol_incomp, so, so_list); @@ -3734,8 +3751,6 @@ again: } return; } - if (head != NULL) - SOLISTEN_UNLOCK(head); SOCK_UNLOCK(so); wakeup(&so->so_timeo); sorwakeup(so); From owner-svn-src-head@freebsd.org Thu Sep 14 18:50:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CA7AE044E8; Thu, 14 Sep 2017 18:50:42 +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 CE53D6480F; Thu, 14 Sep 2017 18:50:41 +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 v8EIoewB053908; Thu, 14 Sep 2017 18:50:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EIoewN053907; Thu, 14 Sep 2017 18:50:40 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709141850.v8EIoewN053907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 14 Sep 2017 18:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323596 - head/usr.sbin/tcpdrop X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.sbin/tcpdrop X-SVN-Commit-Revision: 323596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 18:50:42 -0000 Author: tuexen Date: Thu Sep 14 18:50:40 2017 New Revision: 323596 URL: https://svnweb.freebsd.org/changeset/base/323596 Log: Add a description how tcpdrop handles the case of specifying the -s and the -S option. Sponsored by: Netflix, Inc. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Thu Sep 14 18:07:30 2017 (r323595) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Thu Sep 14 18:50:40 2017 (r323596) @@ -78,6 +78,26 @@ is one of .Dv FIN_WAIT_2 , or .Dv TIME_WAIT . .Pp +If +.Fl S Ar stack +and +.Fl s Ar state +are specified, +.Nm +will attempt to drop all TCP connections being in the state +.Ar state +and using the TCP stack +.Ar stack . +Since TCP connections in the +.Dv TIME_WAIT +state are not tied to any TCP stack, using the option +.Fl s Dv TIME_WAIT +in combination with the +.Fl S Ar stack +option results in +.Nm +not dropping any TCP connection. +.Pp The .Fl l flag may be given in addition to the From owner-svn-src-head@freebsd.org Thu Sep 14 19:18:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C36E4E05C31; Thu, 14 Sep 2017 19:18:25 +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 92C8B654DF; Thu, 14 Sep 2017 19:18:25 +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 v8EJIONG065196; Thu, 14 Sep 2017 19:18:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EJIOLu065194; Thu, 14 Sep 2017 19:18:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709141918.v8EJIOLu065194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Sep 2017 19:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323597 - head/lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/net X-SVN-Commit-Revision: 323597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 19:18:25 -0000 Author: kib Date: Thu Sep 14 19:18:24 2017 New Revision: 323597 URL: https://svnweb.freebsd.org/changeset/base/323597 Log: Silently handle freeaddrinfo(NULL) for compatibility with code which works on other OSes. Also avoid unnecessary NULL check, free(NULL) is valid. Reviewed by: bjk (man page), hrs, hselasky, ume Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D12354 Modified: head/lib/libc/net/getaddrinfo.3 head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Thu Sep 14 18:50:40 2017 (r323596) +++ head/lib/libc/net/getaddrinfo.3 Thu Sep 14 19:18:24 2017 (r323597) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2015 +.Dd September 13, 2017 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -351,6 +351,17 @@ pointer should be a .Li addrinfo structure created by a call to .Fn getaddrinfo . +.Sh IMPLEMENTATION NOTES +The behavior of +.Li freeadrinfo(NULL) +is left unspecified by both +.St -susv4 +and +.Dv "RFC 3493" . +The current implementation ignores a +.Dv NULL +argument for compatibility with programs that rely on the implementation +details of other operating systems. .Sh RETURN VALUES .Fn getaddrinfo returns zero on success or one of the error codes listed in Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Thu Sep 14 18:50:40 2017 (r323596) +++ head/lib/libc/net/getaddrinfo.c Thu Sep 14 19:18:24 2017 (r323597) @@ -35,7 +35,7 @@ * in the source code. This is because RFC2553 is silent about which error * code must be returned for which situation. * - freeaddrinfo(NULL). RFC2553 is silent about it. XNET 5.2 says it is - * invalid. current code - SEGV on freeaddrinfo(NULL) + * invalid. Current code accepts NULL to be compatible with other OSes. * * Note: * - The code filters out AFs that are not supported by the kernel, @@ -359,14 +359,13 @@ freeaddrinfo(struct addrinfo *ai) { struct addrinfo *next; - do { + while (ai != NULL) { next = ai->ai_next; - if (ai->ai_canonname) - free(ai->ai_canonname); + free(ai->ai_canonname); /* no need to free(ai->ai_addr) */ free(ai); ai = next; - } while (ai); + } } static int From owner-svn-src-head@freebsd.org Thu Sep 14 19:50:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9845E07897; Thu, 14 Sep 2017 19:50:08 +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 97757667A9; Thu, 14 Sep 2017 19:50:08 +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 v8EJo7xc077812; Thu, 14 Sep 2017 19:50:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EJo745077811; Thu, 14 Sep 2017 19:50:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201709141950.v8EJo745077811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 14 Sep 2017 19:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323598 - head/lib/libedit X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/libedit X-SVN-Commit-Revision: 323598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 19:50:08 -0000 Author: pfg Date: Thu Sep 14 19:50:07 2017 New Revision: 323598 URL: https://svnweb.freebsd.org/changeset/base/323598 Log: libedit: raise the warning level to 3. NetBSD has the warning level to 5 but that actually triggers -Wcast-qual. Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Thu Sep 14 19:18:24 2017 (r323597) +++ head/lib/libedit/Makefile Thu Sep 14 19:50:07 2017 (r323598) @@ -7,6 +7,8 @@ LIB= edit SHLIB_MAJOR= 7 SHLIBDIR?= /lib +WARNS?= 3 + OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c @@ -40,8 +42,6 @@ CLEANFILES+= tokenizern.c historyn.c CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR #CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH #CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT - -WARNS?= 1 SUBDIR= edit/readline From owner-svn-src-head@freebsd.org Thu Sep 14 19:51:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F14E07AD1; Thu, 14 Sep 2017 19:51:21 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BC6966A89; Thu, 14 Sep 2017 19:51:21 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [10.6.32.30] (unknown [185.12.128.224]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 92CB5C0B97; Thu, 14 Sep 2017 21:51:17 +0200 (CEST) Subject: Re: svn commit: r323290 - head/sys/vm To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709072143.v87Lhdsg060310@repo.freebsd.org> From: Andreas Tobler Message-ID: Date: Thu, 14 Sep 2017 21:51:17 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709072143.v87Lhdsg060310@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Asterix Submit on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 19:51:21 -0000 Hi Mark, On 07.09.17 23:43, Mark Johnston wrote: > Author: markj > Date: Thu Sep 7 21:43:39 2017 > New Revision: 323290 > URL: https://svnweb.freebsd.org/changeset/base/323290 > > Log: > Speed up vm_page_array initialization. > > We currently initialize the vm_page array in three passes: one to zero > the array, one to initialize the "order" field of each page (necessary > when inserting them into the vm_phys buddy allocator one-by-one), and > one to initialize the remaining non-zero fields and individually insert > each page into the allocator. > > Merge the three passes into one following a suggestion from alc: > initialize vm_page fields in a single pass, and use vm_phys_free_contig() > to efficiently insert physical memory segments into the buddy allocator. > This reduces the initialization time to a third or a quarter of what it > was before on most systems that I tested. > > Reviewed by: alc, kib > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D12248 > > Modified: > head/sys/vm/vm_page.c > head/sys/vm/vm_phys.c > head/sys/vm/vm_phys.h I just found out that this commit breaks booting my powerpc64 Quad G5. It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. Sometimes it hangs earlier when the kbd is not there yet (usb), then I can't get the process/task where it hangs. Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) Any ideas how to find out what's wrong? The previous revision, r323289 seems stable, at least it survived several kernel builds. TIA, Andreas From owner-svn-src-head@freebsd.org Thu Sep 14 20:02:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB57AE083AB; Thu, 14 Sep 2017 20:02:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B86CA67018; Thu, 14 Sep 2017 20:02:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v8EK2IVH022277 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Sep 2017 13:02:18 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v8EK2IXj022276; Thu, 14 Sep 2017 13:02:18 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 14 Sep 2017 13:02:18 -0700 From: Gleb Smirnoff To: Steven Hartland Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323566 - head/sys/kern Message-ID: <20170914200218.GU1055@FreeBSD.org> References: <201709132211.v8DMB6Pp048326@repo.freebsd.org> <4ae03e74-4fc3-d23b-4f14-3329b20b8df0@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ae03e74-4fc3-d23b-4f14-3329b20b8df0@multiplay.co.uk> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 20:02:21 -0000 Steven, I don't want to MFC that, since that will hurt performance on stable/11 due to ACCEPT_LOCK(). On Thu, Sep 14, 2017 at 08:31:57AM +0100, Steven Hartland wrote: S> Is this something that will be MFC'ed to 11 or is this 12 / CURRENT only? S> S> On 13/09/2017 23:11, Gleb Smirnoff wrote: S> > Author: glebius S> > Date: Wed Sep 13 22:11:05 2017 S> > New Revision: 323566 S> > URL: https://svnweb.freebsd.org/changeset/base/323566 S> > S> > Log: S> > Use soref() in sendfile(2) instead fhold() to reference a socket. S> > S> > The problem is that fdrop() requires syscall context, as it may S> > enter sleep in some cases. The reason to use it in the original S> > non-blocking sendfile implementation, was to avoid use of global S> > ACCEPT_LOCK() on every I/O completion. Now in head sorele() no S> > longer requires this lock. S> > S> > Modified: S> > head/sys/kern/kern_sendfile.c S> > S> > Modified: head/sys/kern/kern_sendfile.c S> > ============================================================================== S> > --- head/sys/kern/kern_sendfile.c Wed Sep 13 21:56:49 2017 (r323565) S> > +++ head/sys/kern/kern_sendfile.c Wed Sep 13 22:11:05 2017 (r323566) S> > @@ -80,7 +80,7 @@ struct sf_io { S> > volatile u_int nios; S> > u_int error; S> > int npages; S> > - struct file *sock_fp; S> > + struct socket *so; S> > struct mbuf *m; S> > vm_page_t pa[]; S> > }; S> > @@ -255,7 +255,7 @@ static void S> > sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) S> > { S> > struct sf_io *sfio = arg; S> > - struct socket *so; S> > + struct socket *so = sfio->so; S> > S> > for (int i = 0; i < count; i++) S> > if (pg[i] != bogus_page) S> > @@ -267,8 +267,6 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i S> > if (!refcount_release(&sfio->nios)) S> > return; S> > S> > - so = sfio->sock_fp->f_data; S> > - S> > if (sfio->error) { S> > struct mbuf *m; S> > S> > @@ -296,8 +294,8 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i S> > CURVNET_RESTORE(); S> > } S> > S> > - /* XXXGL: curthread */ S> > - fdrop(sfio->sock_fp, curthread); S> > + SOCK_LOCK(so); S> > + sorele(so); S> > free(sfio, M_TEMP); S> > } S> > S> > @@ -724,6 +722,7 @@ retry_space: S> > sfio = malloc(sizeof(struct sf_io) + S> > npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); S> > refcount_init(&sfio->nios, 1); S> > + sfio->so = so; S> > sfio->error = 0; S> > S> > nios = sendfile_swapin(obj, sfio, off, space, npages, rhpages, S> > @@ -858,9 +857,8 @@ prepend_header: S> > error = (*so->so_proto->pr_usrreqs->pru_send) S> > (so, 0, m, NULL, NULL, td); S> > } else { S> > - sfio->sock_fp = sock_fp; S> > sfio->npages = npages; S> > - fhold(sock_fp); S> > + soref(so); S> > error = (*so->so_proto->pr_usrreqs->pru_send) S> > (so, PRUS_NOTREADY, m, NULL, NULL, td); S> > sendfile_iodone(sfio, NULL, 0, 0); S> > S> -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Sep 14 20:32:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDF1AE0A461; Thu, 14 Sep 2017 20:32:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (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 847A6684D9; Thu, 14 Sep 2017 20:32:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x242.google.com with SMTP id l25so326346qtf.2; Thu, 14 Sep 2017 13:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gQTMp9EJEWG4BITNlQGbis0fBUxcxiUv1Uz/oy4/kHA=; b=o2iSXtZgp1c4H+aKf44ODiWf938AJd2aGZmj/jVIiRwEuC6x71EKsA4NFcqb/GfnCx ZXE+vgGhAjvwc8tbhyLL4+F5FJK1Al2xqNzABEzuQjka802Vh61sdW9hP1JRJcdE3Tdy 7D2gM/RqY8HUBmBzU3uK144Yk0ywyloKo76FaP1Dyhv0LQf2GvccO/pYgvv2gQCCySkC A5yRoWuwtfbVKh/7g8vCwAifgwMyO+9hLo4n8x3rdaObVgZ0zGHO3JfeQ27T/m0aS6Vh Ph/cZVeQAYXB/E2CRQE2JJgZtNkK73oNvHG1vvYhjwQlD86G5Y/sKw3PGXlSqtZet5az JZjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=gQTMp9EJEWG4BITNlQGbis0fBUxcxiUv1Uz/oy4/kHA=; b=S9jktkv6zEMw0d1isfiVtv5drjZ93dnbMDA+6rgWH57DpATBaCSPzEQNEgZ6gQIv6t +YOKW8XIdc4UJI3VXMfyfDCtXigzys56NM2fCUtOXu9X4zmy47pZF8JFYBmO9Hj5KpTC B1lPi/NKs27v9BvE9WKs4kVy9TvDeCscgPma9hOQI6D1L/rzFopcx65xfQL6nWe+bkgV iTYUcpYIm9n2DraiCmuMTKG9iAIUHahcQ4Pv+WnPADbdBztJ7zu7/rS62f1hBNO4RKCi x9h5ZbhwssauuJlI12OUg3bOIbkgTM1Cw7XH3XOPFVqiMoNWnybkQqq6AZK73Su8dcec Pzbw== X-Gm-Message-State: AHPjjUie6Xh/aItOGZv7OkmAaeLQTw3YASbbTzUQQjylLPKKjxGgUIOE qeHRbiWBFYKfv7J2 X-Google-Smtp-Source: AOwi7QCQkHgwfLGwG+8wDPnpdVOhMbpWbuMX5F+XGgpnkQ5qh2H5Am//7tJiQSWIfrRHvmEc9hFLMQ== X-Received: by 10.237.52.69 with SMTP id w63mr17515037qtd.78.1505421160226; Thu, 14 Sep 2017 13:32:40 -0700 (PDT) Received: from bish (toroon0560w-lp140-01-69-159-37-127.dsl.bell.ca. [69.159.37.127]) by smtp.gmail.com with ESMTPSA id j206sm11520819qke.7.2017.09.14.13.32.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 13:32:38 -0700 (PDT) Sender: Mark Johnston Date: Thu, 14 Sep 2017 16:32:32 -0400 From: Mark Johnston To: Andreas Tobler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323290 - head/sys/vm Message-ID: <20170914203232.GA72190@bish> References: <201709072143.v87Lhdsg060310@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 20:32:42 -0000 On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: > Hi Mark, > > On 07.09.17 23:43, Mark Johnston wrote: > > Author: markj > > Date: Thu Sep 7 21:43:39 2017 > > New Revision: 323290 > > URL: https://svnweb.freebsd.org/changeset/base/323290 > > > > Log: > > Speed up vm_page_array initialization. > > > > We currently initialize the vm_page array in three passes: one to zero > > the array, one to initialize the "order" field of each page (necessary > > when inserting them into the vm_phys buddy allocator one-by-one), and > > one to initialize the remaining non-zero fields and individually insert > > each page into the allocator. > > > > Merge the three passes into one following a suggestion from alc: > > initialize vm_page fields in a single pass, and use vm_phys_free_contig() > > to efficiently insert physical memory segments into the buddy allocator. > > This reduces the initialization time to a third or a quarter of what it > > was before on most systems that I tested. > > > > Reviewed by: alc, kib > > MFC after: 3 weeks > > Differential Revision: https://reviews.freebsd.org/D12248 > > > > Modified: > > head/sys/vm/vm_page.c > > head/sys/vm/vm_phys.c > > head/sys/vm/vm_phys.h > > I just found out that this commit breaks booting my powerpc64 Quad G5. > It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. > > Sometimes it hangs earlier when the kbd is not there yet (usb), then I > can't get the process/task where it hangs. > > Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) > > Any ideas how to find out what's wrong? Are you able to break into DDB when the hang occurs? If so, the output of "show page" would be helpful. Are you running with INVARIANTS configured? If not, please try that. > The previous revision, r323289 seems stable, at least it survived > several kernel builds. Could you apply the patch below and capture the first page or so of output from after the kernel starts booting? diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index fda8d1cf37f7..6862195c3e9c 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -648,8 +648,11 @@ vm_page_startup(vm_offset_t vaddr) * Add physical memory segments corresponding to the available * physical pages. */ - for (i = 0; phys_avail[i + 1] != 0; i += 2) + for (i = 0; phys_avail[i + 1] != 0; i += 2) { + printf("adding phys_avail seg %#jx - %#jx\n", + phys_avail[i], phys_avail[i + 1]); vm_phys_add_seg(phys_avail[i], phys_avail[i + 1]); + } /* * Initialize the physical memory allocator. @@ -664,6 +667,8 @@ vm_page_startup(vm_offset_t vaddr) vm_cnt.v_free_count = 0; for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; + printf("inserting seg %d: %#jx - %#jx\n", segind, + (uintmax_t)seg->start, (uintmax_t)seg->end); for (pa = seg->start; pa < seg->end; pa += PAGE_SIZE) vm_phys_init_page(pa); @@ -679,6 +684,7 @@ vm_page_startup(vm_offset_t vaddr) seg->end > phys_avail[i + 1]) continue; + printf("inserting seg %d into vm_phys\n", segind); m = seg->first_page; pagecount = (u_long)atop(seg->end - seg->start); @@ -694,6 +700,7 @@ vm_page_startup(vm_offset_t vaddr) break; } } + printf("v_free_count: %u\n", vm_cnt.v_free_count); /* * Remove blacklisted pages from the physical memory allocator. From owner-svn-src-head@freebsd.org Thu Sep 14 20:42:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93772E0ADE4; Thu, 14 Sep 2017 20:42:20 +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 6037968A3E; Thu, 14 Sep 2017 20:42:20 +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 v8EKgJfx001915; Thu, 14 Sep 2017 20:42:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EKgJ8Q001914; Thu, 14 Sep 2017 20:42:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709142042.v8EKgJ8Q001914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 14 Sep 2017 20:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323599 - head/usr.sbin/tcpdrop X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.sbin/tcpdrop X-SVN-Commit-Revision: 323599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 20:42:20 -0000 Author: tuexen Date: Thu Sep 14 20:42:19 2017 New Revision: 323599 URL: https://svnweb.freebsd.org/changeset/base/323599 Log: Bump date missed in r323596. Trim trailing whitespace. Sponsored by: Netflix, Inc. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Thu Sep 14 19:50:07 2017 (r323598) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Thu Sep 14 20:42:19 2017 (r323599) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2017 +.Dd September 14, 2017 .Dt TCPDROP 8 .Os .Sh NAME @@ -88,7 +88,7 @@ will attempt to drop all TCP connections being in the .Ar state and using the TCP stack .Ar stack . -Since TCP connections in the +Since TCP connections in the .Dv TIME_WAIT state are not tied to any TCP stack, using the option .Fl s Dv TIME_WAIT From owner-svn-src-head@freebsd.org Thu Sep 14 21:06:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEA20E0C1A5; Thu, 14 Sep 2017 21:06:09 +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 BBDA869A6E; Thu, 14 Sep 2017 21:06:09 +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 v8EL68Rp011817; Thu, 14 Sep 2017 21:06:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EL68He011816; Thu, 14 Sep 2017 21:06:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709142106.v8EL68He011816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 14 Sep 2017 21:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323600 - head/sys/dev/cxgbe/crypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 323600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Sep 2017 21:06:10 -0000 Author: jhb Date: Thu Sep 14 21:06:08 2017 New Revision: 323600 URL: https://svnweb.freebsd.org/changeset/base/323600 Log: Fix some incorrect sysctl pointers for some error stats. The bad_session, sglist_error, and process_error sysctl nodes were returning the value of the pad_error node instead of the appropriate error counters. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Thu Sep 14 20:42:19 2017 (r323599) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Thu Sep 14 21:06:08 2017 (r323600) @@ -1483,11 +1483,12 @@ ccr_sysctls(struct ccr_softc *sc) SYSCTL_ADD_U64(ctx, children, OID_AUTO, "pad_error", CTLFLAG_RD, &sc->stats_pad_error, 0, "Padding errors"); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "bad_session", CTLFLAG_RD, - &sc->stats_pad_error, 0, "Requests with invalid session ID"); + &sc->stats_bad_session, 0, "Requests with invalid session ID"); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "sglist_error", CTLFLAG_RD, - &sc->stats_pad_error, 0, "Requests for which DMA mapping failed"); + &sc->stats_sglist_error, 0, + "Requests for which DMA mapping failed"); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "process_error", CTLFLAG_RD, - &sc->stats_pad_error, 0, "Requests failed during queueing"); + &sc->stats_process_error, 0, "Requests failed during queueing"); } static int From owner-svn-src-head@freebsd.org Fri Sep 15 00:08:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D084E16171; Fri, 15 Sep 2017 00:08:37 +0000 (UTC) (envelope-from leres@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 4AAFA6F87C; Fri, 15 Sep 2017 00:08:37 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8F08aQZ086223; Fri, 15 Sep 2017 00:08:36 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8F08a9B086222; Fri, 15 Sep 2017 00:08:36 GMT (envelope-from leres@FreeBSD.org) Message-Id: <201709150008.v8F08a9B086222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Fri, 15 Sep 2017 00:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323602 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: leres X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 323602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 00:08:37 -0000 Author: leres (ports committer) Date: Fri Sep 15 00:08:36 2017 New Revision: 323602 URL: https://svnweb.freebsd.org/changeset/base/323602 Log: Add myself (leres) as a ports committer with ler and matthew as mentors. Reviewed by: matthew (mentor) Approved by: matthew (mentor) Differential Revision: https://reviews.freebsd.org/D12372 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu Sep 14 22:19:56 2017 (r323601) +++ head/share/misc/committers-ports.dot Fri Sep 15 00:08:36 2017 (r323602) @@ -149,6 +149,7 @@ lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2 lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"] leeym [label="Yen-Ming Lee\nleeym@FreeBSD.org\n2002/08/14"] ler [label="Larry Rosenman\nler@FreeBSD.org\n2017/01/09"] +leres [label="Craig Leres\nleres@FreeBSD.org\n2017/10/10"] lev [label="Lev Serebryakov\nlev@FreeBSD.org\n2003/06/17"] lifanov [label="Nikolai Lifanov\nlifanov@FreeBSD.org\n2016/12/11"] linimon [label="Mark Linimon\nlinimon@FreeBSD.org\n2003/10/23"] @@ -468,6 +469,8 @@ lawrance -> itetcu leeym -> clsung +ler -> leres + lifanov -> ultima lioux -> pat @@ -502,6 +505,7 @@ mat -> thierry mat -> tobik mat -> woodsb02 +matthew -> leres matthew -> lifanov matthew -> ultima From owner-svn-src-head@freebsd.org Fri Sep 15 00:54:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD3BE18BBE; Fri, 15 Sep 2017 00:54:39 +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 0CD2C712A6; Fri, 15 Sep 2017 00:54:38 +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 v8F0sbfg007078; Fri, 15 Sep 2017 00:54:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8F0sb3K007077; Fri, 15 Sep 2017 00:54:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709150054.v8F0sb3K007077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Sep 2017 00:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323607 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 323607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 00:54:39 -0000 Author: emaste Date: Fri Sep 15 00:54:37 2017 New Revision: 323607 URL: https://svnweb.freebsd.org/changeset/base/323607 Log: Update OptionalObsoleteFiles.inc with NTP docs The list of files for MK_NTP was incomplete. PR: 218193 Submitted by: brnrd MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 15 00:34:59 2017 (r323606) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 15 00:54:37 2017 (r323607) @@ -6397,16 +6397,26 @@ OLD_FILES+=usr/sbin/ntpdate OLD_FILES+=usr/sbin/ntpdc OLD_FILES+=usr/sbin/ntptime OLD_FILES+=usr/sbin/sntp +OLD_FILES+=usr/share/doc/ntp/access.html OLD_FILES+=usr/share/doc/ntp/accopt.html OLD_FILES+=usr/share/doc/ntp/assoc.html OLD_FILES+=usr/share/doc/ntp/audio.html +OLD_FILES+=usr/share/doc/ntp/authentic.html OLD_FILES+=usr/share/doc/ntp/authopt.html +OLD_FILES+=usr/share/doc/ntp/autokey.html +OLD_FILES+=usr/share/doc/ntp/bugs.html OLD_FILES+=usr/share/doc/ntp/build.html +OLD_FILES+=usr/share/doc/ntp/clock.html OLD_FILES+=usr/share/doc/ntp/clockopt.html +OLD_FILES+=usr/share/doc/ntp/cluster.html +OLD_FILES+=usr/share/doc/ntp/comdex.html OLD_FILES+=usr/share/doc/ntp/config.html OLD_FILES+=usr/share/doc/ntp/confopt.html OLD_FILES+=usr/share/doc/ntp/copyright.html OLD_FILES+=usr/share/doc/ntp/debug.html +OLD_FILES+=usr/share/doc/ntp/decode.html +OLD_FILES+=usr/share/doc/ntp/discipline.html +OLD_FILES+=usr/share/doc/ntp/discover.html OLD_FILES+=usr/share/doc/ntp/driver1.html OLD_FILES+=usr/share/doc/ntp/driver10.html OLD_FILES+=usr/share/doc/ntp/driver11.html @@ -6435,34 +6445,227 @@ OLD_FILES+=usr/share/doc/ntp/driver6.html OLD_FILES+=usr/share/doc/ntp/driver7.html OLD_FILES+=usr/share/doc/ntp/driver8.html OLD_FILES+=usr/share/doc/ntp/driver9.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver1.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver10.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver11.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver12.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver16.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver18.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver19.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver20.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver22.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver26.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver27.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver28.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver29.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver3.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver30.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver31.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver32.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver33.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver34.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver35.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver36.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver37.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver38.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver39.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver4.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver40.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver42.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver43.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver44.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver45.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver46.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver5.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver6.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver7.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver8.html +OLD_FILES+=usr/share/doc/ntp/drivers/driver9.html +OLD_FILES+=usr/share/doc/ntp/drivers/icons/home.gif +OLD_FILES+=usr/share/doc/ntp/drivers/icons/mail2.gif +OLD_FILES+=usr/share/doc/ntp/drivers/mx4200data.html +OLD_FILES+=usr/share/doc/ntp/drivers/oncore-shmem.html +OLD_FILES+=usr/share/doc/ntp/drivers/scripts/footer.txt +OLD_FILES+=usr/share/doc/ntp/drivers/scripts/style.css +OLD_FILES+=usr/share/doc/ntp/drivers/tf582_4.html OLD_FILES+=usr/share/doc/ntp/extern.html +OLD_FILES+=usr/share/doc/ntp/filter.html OLD_FILES+=usr/share/doc/ntp/hints.html +OLD_FILES+=usr/share/doc/ntp/hints/a-ux +OLD_FILES+=usr/share/doc/ntp/hints/aix +OLD_FILES+=usr/share/doc/ntp/hints/bsdi +OLD_FILES+=usr/share/doc/ntp/hints/changes +OLD_FILES+=usr/share/doc/ntp/hints/decosf1 +OLD_FILES+=usr/share/doc/ntp/hints/decosf2 +OLD_FILES+=usr/share/doc/ntp/hints/freebsd +OLD_FILES+=usr/share/doc/ntp/hints/hpux +OLD_FILES+=usr/share/doc/ntp/hints/linux +OLD_FILES+=usr/share/doc/ntp/hints/mpeix +OLD_FILES+=usr/share/doc/ntp/hints/notes-xntp-v3 +OLD_FILES+=usr/share/doc/ntp/hints/parse +OLD_FILES+=usr/share/doc/ntp/hints/refclocks +OLD_FILES+=usr/share/doc/ntp/hints/rs6000 +OLD_FILES+=usr/share/doc/ntp/hints/sco.html +OLD_FILES+=usr/share/doc/ntp/hints/sgi +OLD_FILES+=usr/share/doc/ntp/hints/solaris-dosynctodr.html +OLD_FILES+=usr/share/doc/ntp/hints/solaris.html +OLD_FILES+=usr/share/doc/ntp/hints/solaris.xtra.4023118 +OLD_FILES+=usr/share/doc/ntp/hints/solaris.xtra.4095849 +OLD_FILES+=usr/share/doc/ntp/hints/solaris.xtra.S99ntpd +OLD_FILES+=usr/share/doc/ntp/hints/solaris.xtra.patchfreq +OLD_FILES+=usr/share/doc/ntp/hints/sun4 +OLD_FILES+=usr/share/doc/ntp/hints/svr4-dell +OLD_FILES+=usr/share/doc/ntp/hints/svr4_package +OLD_FILES+=usr/share/doc/ntp/hints/todo +OLD_FILES+=usr/share/doc/ntp/hints/vxworks.html +OLD_FILES+=usr/share/doc/ntp/hints/winnt.html +OLD_FILES+=usr/share/doc/ntp/history.html OLD_FILES+=usr/share/doc/ntp/howto.html +OLD_FILES+=usr/share/doc/ntp/huffpuff.html +OLD_FILES+=usr/share/doc/ntp/icons/home.gif +OLD_FILES+=usr/share/doc/ntp/icons/mail2.gif +OLD_FILES+=usr/share/doc/ntp/icons/sitemap.png OLD_FILES+=usr/share/doc/ntp/index.html OLD_FILES+=usr/share/doc/ntp/kern.html +OLD_FILES+=usr/share/doc/ntp/kernpps.html +OLD_FILES+=usr/share/doc/ntp/keygen.html OLD_FILES+=usr/share/doc/ntp/ldisc.html +OLD_FILES+=usr/share/doc/ntp/leap.html OLD_FILES+=usr/share/doc/ntp/measure.html OLD_FILES+=usr/share/doc/ntp/miscopt.html OLD_FILES+=usr/share/doc/ntp/monopt.html +OLD_FILES+=usr/share/doc/ntp/msyslog.html OLD_FILES+=usr/share/doc/ntp/mx4200data.html OLD_FILES+=usr/share/doc/ntp/notes.html +OLD_FILES+=usr/share/doc/ntp/ntp-keygen.html +OLD_FILES+=usr/share/doc/ntp/ntp-wait.html +OLD_FILES+=usr/share/doc/ntp/ntp.conf.html +OLD_FILES+=usr/share/doc/ntp/ntp.keys.html +OLD_FILES+=usr/share/doc/ntp/ntp_conf.html OLD_FILES+=usr/share/doc/ntp/ntpd.html OLD_FILES+=usr/share/doc/ntp/ntpdate.html OLD_FILES+=usr/share/doc/ntp/ntpdc.html +OLD_FILES+=usr/share/doc/ntp/ntpdsim.html +OLD_FILES+=usr/share/doc/ntp/ntpdsim_new.html OLD_FILES+=usr/share/doc/ntp/ntpq.html +OLD_FILES+=usr/share/doc/ntp/ntpsnmpd.html OLD_FILES+=usr/share/doc/ntp/ntptime.html OLD_FILES+=usr/share/doc/ntp/ntptrace.html +OLD_FILES+=usr/share/doc/ntp/orphan.html OLD_FILES+=usr/share/doc/ntp/parsedata.html OLD_FILES+=usr/share/doc/ntp/parsenew.html OLD_FILES+=usr/share/doc/ntp/patches.html +OLD_FILES+=usr/share/doc/ntp/pic/9400n.jpg +OLD_FILES+=usr/share/doc/ntp/pic/alice11.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice13.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice15.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice23.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice31.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice32.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice35.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice38.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice44.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice47.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice51.gif +OLD_FILES+=usr/share/doc/ntp/pic/alice61.gif +OLD_FILES+=usr/share/doc/ntp/pic/barnstable.gif +OLD_FILES+=usr/share/doc/ntp/pic/beaver.gif +OLD_FILES+=usr/share/doc/ntp/pic/boom3.gif +OLD_FILES+=usr/share/doc/ntp/pic/boom3a.gif +OLD_FILES+=usr/share/doc/ntp/pic/boom4.gif +OLD_FILES+=usr/share/doc/ntp/pic/broad.gif +OLD_FILES+=usr/share/doc/ntp/pic/bustardfly.gif +OLD_FILES+=usr/share/doc/ntp/pic/c51.jpg +OLD_FILES+=usr/share/doc/ntp/pic/description.jpg +OLD_FILES+=usr/share/doc/ntp/pic/discipline.gif +OLD_FILES+=usr/share/doc/ntp/pic/dogsnake.gif +OLD_FILES+=usr/share/doc/ntp/pic/driver29.gif +OLD_FILES+=usr/share/doc/ntp/pic/driver43_1.gif +OLD_FILES+=usr/share/doc/ntp/pic/driver43_2.jpg +OLD_FILES+=usr/share/doc/ntp/pic/fg6021.gif +OLD_FILES+=usr/share/doc/ntp/pic/fg6039.jpg +OLD_FILES+=usr/share/doc/ntp/pic/fig_3_1.gif +OLD_FILES+=usr/share/doc/ntp/pic/flatheads.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt1.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt2.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt3.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt4.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt5.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt6.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt7.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt8.gif +OLD_FILES+=usr/share/doc/ntp/pic/flt9.gif +OLD_FILES+=usr/share/doc/ntp/pic/freq1211.gif +OLD_FILES+=usr/share/doc/ntp/pic/gadget.jpg +OLD_FILES+=usr/share/doc/ntp/pic/gps167.jpg +OLD_FILES+=usr/share/doc/ntp/pic/group.gif +OLD_FILES+=usr/share/doc/ntp/pic/hornraba.gif +OLD_FILES+=usr/share/doc/ntp/pic/igclock.gif +OLD_FILES+=usr/share/doc/ntp/pic/neoclock4x.gif +OLD_FILES+=usr/share/doc/ntp/pic/offset1211.gif +OLD_FILES+=usr/share/doc/ntp/pic/oncore_evalbig.gif +OLD_FILES+=usr/share/doc/ntp/pic/oncore_remoteant.jpg +OLD_FILES+=usr/share/doc/ntp/pic/oncore_utplusbig.gif +OLD_FILES+=usr/share/doc/ntp/pic/oz2.gif +OLD_FILES+=usr/share/doc/ntp/pic/panda.gif +OLD_FILES+=usr/share/doc/ntp/pic/pd_om006.gif +OLD_FILES+=usr/share/doc/ntp/pic/pd_om011.gif +OLD_FILES+=usr/share/doc/ntp/pic/peer.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo1a.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo3a.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo4.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo5.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo6.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo7.gif +OLD_FILES+=usr/share/doc/ntp/pic/pogo8.gif +OLD_FILES+=usr/share/doc/ntp/pic/pzf509.jpg +OLD_FILES+=usr/share/doc/ntp/pic/pzf511.jpg +OLD_FILES+=usr/share/doc/ntp/pic/rabbit.gif +OLD_FILES+=usr/share/doc/ntp/pic/radio2.jpg +OLD_FILES+=usr/share/doc/ntp/pic/sheepb.jpg +OLD_FILES+=usr/share/doc/ntp/pic/stack1a.jpg +OLD_FILES+=usr/share/doc/ntp/pic/stats.gif +OLD_FILES+=usr/share/doc/ntp/pic/sx5.gif +OLD_FILES+=usr/share/doc/ntp/pic/thunderbolt.jpg +OLD_FILES+=usr/share/doc/ntp/pic/time1.gif +OLD_FILES+=usr/share/doc/ntp/pic/tonea.gif +OLD_FILES+=usr/share/doc/ntp/pic/tribeb.gif +OLD_FILES+=usr/share/doc/ntp/pic/wingdorothy.gif +OLD_FILES+=usr/share/doc/ntp/poll.html OLD_FILES+=usr/share/doc/ntp/porting.html OLD_FILES+=usr/share/doc/ntp/pps.html OLD_FILES+=usr/share/doc/ntp/prefer.html OLD_FILES+=usr/share/doc/ntp/quick.html +OLD_FILES+=usr/share/doc/ntp/rate.html OLD_FILES+=usr/share/doc/ntp/rdebug.html OLD_FILES+=usr/share/doc/ntp/refclock.html OLD_FILES+=usr/share/doc/ntp/release.html +OLD_FILES+=usr/share/doc/ntp/scripts/accopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/audio.txt +OLD_FILES+=usr/share/doc/ntp/scripts/authopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/clockopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/command.txt +OLD_FILES+=usr/share/doc/ntp/scripts/config.txt +OLD_FILES+=usr/share/doc/ntp/scripts/confopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/external.txt +OLD_FILES+=usr/share/doc/ntp/scripts/footer.txt +OLD_FILES+=usr/share/doc/ntp/scripts/hand.txt +OLD_FILES+=usr/share/doc/ntp/scripts/install.txt +OLD_FILES+=usr/share/doc/ntp/scripts/manual.txt +OLD_FILES+=usr/share/doc/ntp/scripts/misc.txt +OLD_FILES+=usr/share/doc/ntp/scripts/miscopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/monopt.txt +OLD_FILES+=usr/share/doc/ntp/scripts/refclock.txt +OLD_FILES+=usr/share/doc/ntp/scripts/special.txt +OLD_FILES+=usr/share/doc/ntp/scripts/style.css +OLD_FILES+=usr/share/doc/ntp/select.html +OLD_FILES+=usr/share/doc/ntp/sitemap.html +OLD_FILES+=usr/share/doc/ntp/sntp.html +OLD_FILES+=usr/share/doc/ntp/stats.html OLD_FILES+=usr/share/doc/ntp/tickadj.html +OLD_FILES+=usr/share/doc/ntp/warp.html +OLD_FILES+=usr/share/doc/ntp/xleave.html OLD_DIRS+=usr/share/doc/ntp/drivers OLD_DIRS+=usr/share/doc/ntp/drivers/scripts OLD_DIRS+=usr/share/doc/ntp/drivers/icons From owner-svn-src-head@freebsd.org Fri Sep 15 08:13:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 022EFE067AB; Fri, 15 Sep 2017 08:13:33 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82F1B815FF; Fri, 15 Sep 2017 08:13:31 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id v8F8A3XZ068100; Fri, 15 Sep 2017 11:10:03 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Fri, 15 Sep 2017 11:10:03 +0300 (MSK) From: Maxim Konovalov To: Michael Tuexen cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323493 - head/usr.sbin/tcpdrop In-Reply-To: <201709121339.v8CDdiWH036958@repo.freebsd.org> Message-ID: References: <201709121339.v8CDdiWH036958@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 08:13:33 -0000 Hi Michael, On Tue, 12 Sep 2017, 13:39-0000, Michael Tuexen wrote: > Author: tuexen > Date: Tue Sep 12 13:39:44 2017 > New Revision: 323493 > URL: https://svnweb.freebsd.org/changeset/base/323493 > > Log: > Allow TCP connections to be filtered by stack and state. > > Choose the command line options to be consistent with the ones of > sockstat. > Makes sense? Index: tcpdrop.8 =================================================================== --- tcpdrop.8 (revision 323607) +++ tcpdrop.8 (working copy) @@ -172,7 +172,8 @@ LAST_ACK state use: .Ed .Sh SEE ALSO .Xr netstat 1 , -.Xr sockstat 1 +.Xr sockstat 1 , +.Xr tcp_functions 9 .Sh AUTHORS .An Markus Friedl Aq Mt markus@openbsd.org .An Juli Mallett Aq Mt jmallett@FreeBSD.org -- Maxim Konovalov From owner-svn-src-head@freebsd.org Fri Sep 15 11:58:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED85E10FFE; Fri, 15 Sep 2017 11:58:22 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CE7F864277; Fri, 15 Sep 2017 11:58:21 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad2.stack.nl (toad2.stack.nl [IPv6:2001:610:1108:5010::161]) by mailout.stack.nl (Postfix) with ESMTP id 3AC7941; Fri, 15 Sep 2017 13:58:19 +0200 (CEST) Received: by toad2.stack.nl (Postfix, from userid 1677) id 33E5D89294; Fri, 15 Sep 2017 13:58:19 +0200 (CEST) Date: Fri, 15 Sep 2017 13:58:19 +0200 From: Jilles Tjoelker To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323177 - in head: sys/compat/cloudabi sys/contrib/cloudabi usr.bin/truss Message-ID: <20170915115819.GA22099@stack.nl> References: <201709050746.v857kjX9032212@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201709050746.v857kjX9032212@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 11:58:22 -0000 On Tue, Sep 05, 2017 at 07:46:45AM +0000, Ed Schouten wrote: > Author: ed > Date: Tue Sep 5 07:46:45 2017 > New Revision: 323177 > URL: https://svnweb.freebsd.org/changeset/base/323177 > Log: > Merge pipes and socket pairs. > Now that CloudABI's sockets API has been changed to be addressless and > only connected socket instances are used (e.g., socket pairs), they have > become fairly similar to pipes. The only differences on CloudABI is that > socket pairs additionally support shutdown(), send() and recv(). > To simplify the ABI, we've therefore decided to remove pipes as a > separate file descriptor type and just let pipe() return a socket pair > of type SOCK_STREAM. S_ISFIFO() and S_ISSOCK() are now defined > identically. Although this is correct from a functionality point of view (S_IFIFO and S_IFSOCK are probably expected to be different in a POSIX context, but this is unlikely to break anything that is not already broken), it is a partial reversal of previous changes to FreeBSD that created separate implementations for pipes (first unnamed pipes in 1996, later fifos in 2012 r232055). The main reason for these changes was performance. Unfortunately, I do not have concrete benchmarks in the CloudABI context. -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Fri Sep 15 12:57:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89199E149AB; Fri, 15 Sep 2017 12:57:35 +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 4D3C766533; Fri, 15 Sep 2017 12:57:35 +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 v8FCvYXd067868; Fri, 15 Sep 2017 12:57:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FCvYSM067866; Fri, 15 Sep 2017 12:57:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709151257.v8FCvYSM067866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 15 Sep 2017 12:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323610 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 323610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 12:57:35 -0000 Author: andrew Date: Fri Sep 15 12:57:34 2017 New Revision: 323610 URL: https://svnweb.freebsd.org/changeset/base/323610 Log: Add the ARMv8.3 ID register fields. These were found in the A-Profile exploration tools documentation: https://developer.arm.com/products/architecture/a-profile/exploration-tools Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Fri Sep 15 09:03:01 2017 (r323609) +++ head/sys/arm64/arm64/identcpu.c Fri Sep 15 12:57:34 2017 (r323610) @@ -282,6 +282,9 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SHA2_BASE: printf("%sSHA2", SEP_STR); break; + case ID_AA64ISAR0_SHA2_512: + printf("%sSHA2+SHA512", SEP_STR); + break; default: printf("%sUnknown SHA2", SEP_STR); break; @@ -298,6 +301,50 @@ print_cpu_features(u_int cpu) break; } + switch (ID_AA64ISAR0_SHA3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA3_NONE: + break; + case ID_AA64ISAR0_SHA3_IMPL: + printf("%sSHA3", SEP_STR); + break; + default: + printf("%sUnknown SHA3", SEP_STR); + break; + } + + switch (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM3_NONE: + break; + case ID_AA64ISAR0_SM3_IMPL: + printf("%sSM3", SEP_STR); + break; + default: + printf("%sUnknown SM3", SEP_STR); + break; + } + + switch (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM4_NONE: + break; + case ID_AA64ISAR0_SM4_IMPL: + printf("%sSM4", SEP_STR); + break; + default: + printf("%sUnknown SM4", SEP_STR); + break; + } + + switch (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_DP_NONE: + break; + case ID_AA64ISAR0_DP_IMPL: + printf("%sDotProd", SEP_STR); + break; + default: + printf("%sUnknown DP", SEP_STR); + break; + } + if ((cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK) != 0) printf("%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK); @@ -310,6 +357,83 @@ print_cpu_features(u_int cpu) printed = 0; printf(" Instruction Set Attributes 1 = <"); + switch (ID_AA64ISAR1_GPI(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_GPI_NONE: + break; + case ID_AA64ISAR1_GPI_IMPL: + printf("%sImpl GenericAuth", SEP_STR); + break; + default: + printf("%sUnknown GenericAuth", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_GPA(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_GPA_NONE: + break; + case ID_AA64ISAR1_GPA_IMPL: + printf("%sPrince GenericAuth", SEP_STR); + break; + default: + printf("%sUnknown GenericAuth", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_LRCPC(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_LRCPC_NONE: + break; + case ID_AA64ISAR1_LRCPC_IMPL: + printf("%sRCpc", SEP_STR); + break; + default: + printf("%sUnknown RCpc", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_FCMA(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_FCMA_NONE: + break; + case ID_AA64ISAR1_FCMA_IMPL: + printf("%sFCMA", SEP_STR); + break; + default: + printf("%sUnknown FCMA", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_JSCVT(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_JSCVT_NONE: + break; + case ID_AA64ISAR1_JSCVT_IMPL: + printf("%sJS Conv", SEP_STR); + break; + default: + printf("%sUnknown JS Conv", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_API(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_API_NONE: + break; + case ID_AA64ISAR1_API_IMPL: + printf("%sImpl AddrAuth", SEP_STR); + break; + default: + printf("%sUnknown Impl AddrAuth", SEP_STR); + break; + } + + switch (ID_AA64ISAR1_APA(cpu_desc[cpu].id_aa64isar1)) { + case ID_AA64ISAR1_APA_NONE: + break; + case ID_AA64ISAR1_APA_IMPL: + printf("%sPrince AddrAuth", SEP_STR); + break; + default: + printf("%sUnknown Prince AddrAuth", SEP_STR); + break; + } + switch (ID_AA64ISAR1_DPB(cpu_desc[cpu].id_aa64isar1)) { case ID_AA64ISAR1_DPB_NONE: break; @@ -687,6 +811,29 @@ print_cpu_features(u_int cpu) if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_MMFR2) != 0) { printed = 0; printf(" Memory Model Features 2 = <"); + + switch (ID_AA64MMFR2_NV(cpu_desc[cpu].id_aa64mmfr2)) { + case ID_AA64MMFR2_NV_NONE: + break; + case ID_AA64MMFR2_NV_IMPL: + printf("%sNestedVirt", SEP_STR); + break; + default: + printf("%sUnknown NestedVirt", SEP_STR); + break; + } + + switch (ID_AA64MMFR2_CCIDX(cpu_desc[cpu].id_aa64mmfr2)) { + case ID_AA64MMFR2_CCIDX_32: + printf("%s32b CCIDX", SEP_STR); + break; + case ID_AA64MMFR2_CCIDX_64: + printf("%s64b CCIDX", SEP_STR); + break; + default: + printf("%sUnknown CCIDX", SEP_STR); + break; + } switch (ID_AA64MMFR2_VA_RANGE(cpu_desc[cpu].id_aa64mmfr2)) { case ID_AA64MMFR2_VA_RANGE_48: Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Sep 15 09:03:01 2017 (r323609) +++ head/sys/arm64/include/armreg.h Fri Sep 15 12:57:34 2017 (r323610) @@ -205,7 +205,7 @@ #define ID_AA64DFR0_PMS_VER_V1 (0x1ul << ID_AA64DFR0_PMS_VER_SHIFT) /* ID_AA64ISAR0_EL1 */ -#define ID_AA64ISAR0_MASK 0xf0fffff0 +#define ID_AA64ISAR0_MASK 0x0000fffff0fffff0ul #define ID_AA64ISAR0_AES_SHIFT 4 #define ID_AA64ISAR0_AES_MASK (0xf << ID_AA64ISAR0_AES_SHIFT) #define ID_AA64ISAR0_AES(x) ((x) & ID_AA64ISAR0_AES_MASK) @@ -222,6 +222,7 @@ #define ID_AA64ISAR0_SHA2(x) ((x) & ID_AA64ISAR0_SHA2_MASK) #define ID_AA64ISAR0_SHA2_NONE (0x0 << ID_AA64ISAR0_SHA2_SHIFT) #define ID_AA64ISAR0_SHA2_BASE (0x1 << ID_AA64ISAR0_SHA2_SHIFT) +#define ID_AA64ISAR0_SHA2_512 (0x2 << ID_AA64ISAR0_SHA2_SHIFT) #define ID_AA64ISAR0_CRC32_SHIFT 16 #define ID_AA64ISAR0_CRC32_MASK (0xf << ID_AA64ISAR0_CRC32_SHIFT) #define ID_AA64ISAR0_CRC32(x) ((x) & ID_AA64ISAR0_CRC32_MASK) @@ -237,14 +238,69 @@ #define ID_AA64ISAR0_RDM(x) ((x) & ID_AA64ISAR0_RDM_MASK) #define ID_AA64ISAR0_RDM_NONE (0x0 << ID_AA64ISAR0_RDM_SHIFT) #define ID_AA64ISAR0_RDM_IMPL (0x1 << ID_AA64ISAR0_RDM_SHIFT) +#define ID_AA64ISAR0_SHA3_SHIFT 32 +#define ID_AA64ISAR0_SHA3_MASK (0xful << ID_AA64ISAR0_SHA3_SHIFT) +#define ID_AA64ISAR0_SHA3(x) ((x) & ID_AA64ISAR0_SHA3_MASK) +#define ID_AA64ISAR0_SHA3_NONE (0x0ul << ID_AA64ISAR0_SHA3_SHIFT) +#define ID_AA64ISAR0_SHA3_IMPL (0x1ul << ID_AA64ISAR0_SHA3_SHIFT) +#define ID_AA64ISAR0_SM3_SHIFT 36 +#define ID_AA64ISAR0_SM3_MASK (0xful << ID_AA64ISAR0_SM3_SHIFT) +#define ID_AA64ISAR0_SM3(x) ((x) & ID_AA64ISAR0_SM3_MASK) +#define ID_AA64ISAR0_SM3_NONE (0x0ul << ID_AA64ISAR0_SM3_SHIFT) +#define ID_AA64ISAR0_SM3_IMPL (0x1ul << ID_AA64ISAR0_SM3_SHIFT) +#define ID_AA64ISAR0_SM4_SHIFT 40 +#define ID_AA64ISAR0_SM4_MASK (0xful << ID_AA64ISAR0_SM4_SHIFT) +#define ID_AA64ISAR0_SM4(x) ((x) & ID_AA64ISAR0_SM4_MASK) +#define ID_AA64ISAR0_SM4_NONE (0x0ul << ID_AA64ISAR0_SM4_SHIFT) +#define ID_AA64ISAR0_SM4_IMPL (0x1ul << ID_AA64ISAR0_SM4_SHIFT) +#define ID_AA64ISAR0_DP_SHIFT 48 +#define ID_AA64ISAR0_DP_MASK (0xful << ID_AA64ISAR0_DP_SHIFT) +#define ID_AA64ISAR0_DP(x) ((x) & ID_AA64ISAR0_DP_MASK) +#define ID_AA64ISAR0_DP_NONE (0x0ul << ID_AA64ISAR0_DP_SHIFT) +#define ID_AA64ISAR0_DP_IMPL (0x1ul << ID_AA64ISAR0_DP_SHIFT) /* ID_AA64ISAR1_EL1 */ -#define ID_AA64ISAR1_MASK 0x0000000f +#define ID_AA64ISAR1_MASK 0xffffffff #define ID_AA64ISAR1_DPB_SHIFT 0 #define ID_AA64ISAR1_DPB_MASK (0xf << ID_AA64ISAR1_DPB_SHIFT) #define ID_AA64ISAR1_DPB(x) ((x) & ID_AA64ISAR1_DPB_MASK) #define ID_AA64ISAR1_DPB_NONE (0x0 << ID_AA64ISAR1_DPB_SHIFT) #define ID_AA64ISAR1_DPB_IMPL (0x1 << ID_AA64ISAR1_DPB_SHIFT) +#define ID_AA64ISAR1_APA_SHIFT 4 +#define ID_AA64ISAR1_APA_MASK (0xf << ID_AA64ISAR1_APA_SHIFT) +#define ID_AA64ISAR1_APA(x) ((x) & ID_AA64ISAR1_APA_MASK) +#define ID_AA64ISAR1_APA_NONE (0x0 << ID_AA64ISAR1_APA_SHIFT) +#define ID_AA64ISAR1_APA_IMPL (0x1 << ID_AA64ISAR1_APA_SHIFT) +#define ID_AA64ISAR1_API_SHIFT 8 +#define ID_AA64ISAR1_API_MASK (0xf << ID_AA64ISAR1_API_SHIFT) +#define ID_AA64ISAR1_API(x) ((x) & ID_AA64ISAR1_API_MASK) +#define ID_AA64ISAR1_API_NONE (0x0 << ID_AA64ISAR1_API_SHIFT) +#define ID_AA64ISAR1_API_IMPL (0x1 << ID_AA64ISAR1_API_SHIFT) +#define ID_AA64ISAR1_JSCVT_SHIFT 12 +#define ID_AA64ISAR1_JSCVT_MASK (0xf << ID_AA64ISAR1_JSCVT_SHIFT) +#define ID_AA64ISAR1_JSCVT(x) ((x) & ID_AA64ISAR1_JSCVT_MASK) +#define ID_AA64ISAR1_JSCVT_NONE (0x0 << ID_AA64ISAR1_JSCVT_SHIFT) +#define ID_AA64ISAR1_JSCVT_IMPL (0x1 << ID_AA64ISAR1_JSCVT_SHIFT) +#define ID_AA64ISAR1_FCMA_SHIFT 16 +#define ID_AA64ISAR1_FCMA_MASK (0xf << ID_AA64ISAR1_FCMA_SHIFT) +#define ID_AA64ISAR1_FCMA(x) ((x) & ID_AA64ISAR1_FCMA_MASK) +#define ID_AA64ISAR1_FCMA_NONE (0x0 << ID_AA64ISAR1_FCMA_SHIFT) +#define ID_AA64ISAR1_FCMA_IMPL (0x1 << ID_AA64ISAR1_FCMA_SHIFT) +#define ID_AA64ISAR1_LRCPC_SHIFT 20 +#define ID_AA64ISAR1_LRCPC_MASK (0xf << ID_AA64ISAR1_LRCPC_SHIFT) +#define ID_AA64ISAR1_LRCPC(x) ((x) & ID_AA64ISAR1_LRCPC_MASK) +#define ID_AA64ISAR1_LRCPC_NONE (0x0 << ID_AA64ISAR1_LRCPC_SHIFT) +#define ID_AA64ISAR1_LRCPC_IMPL (0x1 << ID_AA64ISAR1_LRCPC_SHIFT) +#define ID_AA64ISAR1_GPA_SHIFT 24 +#define ID_AA64ISAR1_GPA_MASK (0xf << ID_AA64ISAR1_GPA_SHIFT) +#define ID_AA64ISAR1_GPA(x) ((x) & ID_AA64ISAR1_GPA_MASK) +#define ID_AA64ISAR1_GPA_NONE (0x0 << ID_AA64ISAR1_GPA_SHIFT) +#define ID_AA64ISAR1_GPA_IMPL (0x1 << ID_AA64ISAR1_GPA_SHIFT) +#define ID_AA64ISAR1_GPI_SHIFT 28 +#define ID_AA64ISAR1_GPI_MASK (0xf << ID_AA64ISAR1_GPI_SHIFT) +#define ID_AA64ISAR1_GPI(x) ((x) & ID_AA64ISAR1_GPI_MASK) +#define ID_AA64ISAR1_GPI_NONE (0x0 << ID_AA64ISAR1_GPI_SHIFT) +#define ID_AA64ISAR1_GPI_IMPL (0x1 << ID_AA64ISAR1_GPI_SHIFT) /* ID_AA64MMFR0_EL1 */ #define ID_AA64MMFR0_MASK 0xffffffff @@ -342,7 +398,7 @@ /* ID_AA64MMFR2_EL1 */ #define ID_AA64MMFR2_EL1 S3_0_C0_C7_2 -#define ID_AA64MMFR2_MASK 0x000fffff +#define ID_AA64MMFR2_MASK 0x0fffffff #define ID_AA64MMFR2_CNP_SHIFT 0 #define ID_AA64MMFR2_CNP_MASK (0xf << ID_AA64MMFR2_CNP_SHIFT) #define ID_AA64MMFR2_CNP(x) ((x) & ID_AA64MMFR2_CNP_MASK) @@ -368,6 +424,16 @@ #define ID_AA64MMFR2_VA_RANGE(x) ((x) & ID_AA64MMFR2_VA_RANGE_MASK) #define ID_AA64MMFR2_VA_RANGE_48 (0x0 << ID_AA64MMFR2_VA_RANGE_SHIFT) #define ID_AA64MMFR2_VA_RANGE_52 (0x1 << ID_AA64MMFR2_VA_RANGE_SHIFT) +#define ID_AA64MMFR2_CCIDX_SHIFT 20 +#define ID_AA64MMFR2_CCIDX_MASK (0xf << ID_AA64MMFR2_CCIDX_SHIFT) +#define ID_AA64MMFR2_CCIDX(x) ((x) & ID_AA64MMFR2_CCIDX_MASK) +#define ID_AA64MMFR2_CCIDX_32 (0x0 << ID_AA64MMFR2_CCIDX_SHIFT) +#define ID_AA64MMFR2_CCIDX_64 (0x1 << ID_AA64MMFR2_CCIDX_SHIFT) +#define ID_AA64MMFR2_NV_SHIFT 24 +#define ID_AA64MMFR2_NV_MASK (0xf << ID_AA64MMFR2_NV_SHIFT) +#define ID_AA64MMFR2_NV(x) ((x) & ID_AA64MMFR2_NV_MASK) +#define ID_AA64MMFR2_NV_NONE (0x0 << ID_AA64MMFR2_NV_SHIFT) +#define ID_AA64MMFR2_NV_IMPL (0x1 << ID_AA64MMFR2_NV_SHIFT) /* ID_AA64PFR0_EL1 */ #define ID_AA64PFR0_MASK 0x0000000ffffffffful From owner-svn-src-head@freebsd.org Fri Sep 15 13:34:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14C2FE16CB9; Fri, 15 Sep 2017 13:34:02 +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 D6A8F67BCA; Fri, 15 Sep 2017 13:34:01 +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 v8FDY1Ya084296; Fri, 15 Sep 2017 13:34:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FDY1Zd084295; Fri, 15 Sep 2017 13:34:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709151334.v8FDY1Zd084295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Sep 2017 13:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323611 - head/usr.bin/grep/regex X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/grep/regex X-SVN-Commit-Revision: 323611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 13:34:02 -0000 Author: emaste Date: Fri Sep 15 13:34:00 2017 New Revision: 323611 URL: https://svnweb.freebsd.org/changeset/base/323611 Log: fastmatch.h: remove duplicate #defines Reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12375 Modified: head/usr.bin/grep/regex/fastmatch.h Modified: head/usr.bin/grep/regex/fastmatch.h ============================================================================== --- head/usr.bin/grep/regex/fastmatch.h Fri Sep 15 12:57:34 2017 (r323610) +++ head/usr.bin/grep/regex/fastmatch.h Fri Sep 15 13:34:00 2017 (r323611) @@ -92,17 +92,4 @@ tre_fastwnexec(const fastmatch_t *preg, const wchar_t #define fastexec tre_fastexec #define fastwnexec tre_fastwnexec #define fastwexec tre_fastwexec -#define fixcomp tre_fixcomp -#define fastcomp tre_fastcomp -#define fastexec tre_fastexec -#define fastfree tre_fastfree -#define fixwcomp tre_fixwcomp -#define fastwcomp tre_fastwcomp -#define fastwexec tre_fastwexec -#define fixncomp tre_fixncomp -#define fastncomp tre_fastncomp -#define fastnexec tre_fastnexec -#define fixwncomp tre_fixwncomp -#define fastwncomp tre_fastwncomp -#define fastwnexec tre_fastwnexec #endif /* FASTMATCH_H */ From owner-svn-src-head@freebsd.org Fri Sep 15 13:57:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E841E18150; Fri, 15 Sep 2017 13:57:10 +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 57D1F68AA8; Fri, 15 Sep 2017 13:57: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 v8FDv9jE092283; Fri, 15 Sep 2017 13:57:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FDv91x092281; Fri, 15 Sep 2017 13:57:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709151357.v8FDv91x092281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 15 Sep 2017 13:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323612 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 323612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 13:57:10 -0000 Author: avg Date: Fri Sep 15 13:57:08 2017 New Revision: 323612 URL: https://svnweb.freebsd.org/changeset/base/323612 Log: gmirror: treat ENXIO as disk disconnect, not media error In theory, all data access errors mean that a member is out of sync at most. But they were treated as more serious errors to avoid the situation where a flaky disk gets repeatedly disconnected, re-synchronized, reconnected and then disconnected again. ENXIO is a special error that means that the member disk disappeared, so it should get the same handling as the GEOM orphaning event. There is a better chance that when the disk is reconnected, it will be a good member again. When ENXIO happens on a read we use the exisiting G_MIRROR_BUMP_SYNCID mechanism which means that the mirror's syncid is increased as soon as there is a write to the mirror. That's because no data has got out of sync yet, but the problematic memeber is disconnected, so the future write will make it stale. When ENXIO happens on a write we use a new G_MIRROR_BUMP_SYNCID_NOW mechanism which means that we update the mirror metadata as soon as possible because the problematic memeber is already behind. Reviewed by: markj, imp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D9463 Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror.h Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Sep 15 13:34:00 2017 (r323611) +++ head/sys/geom/mirror/g_mirror.c Fri Sep 15 13:57:08 2017 (r323612) @@ -982,7 +982,13 @@ g_mirror_regular_request(struct bio *bp) if (g_mirror_disconnect_on_failure && g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) > 1) { - sc->sc_bump_id |= G_MIRROR_BUMP_GENID; + if (bp->bio_error == ENXIO && + bp->bio_cmd == BIO_READ) + sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID; + else if (bp->bio_error == ENXIO) + sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID_NOW; + else + sc->sc_bump_id |= G_MIRROR_BUMP_GENID; g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DISCONNECTED, G_MIRROR_EVENT_DONTWAIT); @@ -2517,6 +2523,10 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool if ((sc->sc_bump_id & G_MIRROR_BUMP_GENID) != 0) { sc->sc_bump_id &= ~G_MIRROR_BUMP_GENID; g_mirror_bump_genid(sc); + } + if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID_NOW) != 0) { + sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID_NOW; + g_mirror_bump_syncid(sc); } break; default: Modified: head/sys/geom/mirror/g_mirror.h ============================================================================== --- head/sys/geom/mirror/g_mirror.h Fri Sep 15 13:34:00 2017 (r323611) +++ head/sys/geom/mirror/g_mirror.h Fri Sep 15 13:57:08 2017 (r323612) @@ -169,9 +169,11 @@ struct g_mirror_event { #define G_MIRROR_TYPE_AUTOMATIC 1 /* Bump syncid on first write. */ -#define G_MIRROR_BUMP_SYNCID 0x1 +#define G_MIRROR_BUMP_SYNCID 0x1 /* Bump genid immediately. */ -#define G_MIRROR_BUMP_GENID 0x2 +#define G_MIRROR_BUMP_GENID 0x2 +/* Bump syncid immediately. */ +#define G_MIRROR_BUMP_SYNCID_NOW 0x4 struct g_mirror_softc { u_int sc_type; /* Device type (manual/automatic). */ u_int sc_state; /* Device state. */ From owner-svn-src-head@freebsd.org Fri Sep 15 14:59:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BDBAE1B8ED; Fri, 15 Sep 2017 14:59:37 +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 48FAC6ADF1; Fri, 15 Sep 2017 14:59:37 +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 v8FExaLV017181; Fri, 15 Sep 2017 14:59:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FExaeC017180; Fri, 15 Sep 2017 14:59:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709151459.v8FExaeC017180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Sep 2017 14:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323613 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 14:59:37 -0000 Author: markj Date: Fri Sep 15 14:59:35 2017 New Revision: 323613 URL: https://svnweb.freebsd.org/changeset/base/323613 Log: Include _bitset.h to get BITSET_DEFINE, used to define struct slabbits. MFC after: 1 week Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Fri Sep 15 13:57:08 2017 (r323612) +++ head/sys/vm/uma_int.h Fri Sep 15 14:59:35 2017 (r323613) @@ -28,6 +28,7 @@ * */ +#include #include /* From owner-svn-src-head@freebsd.org Fri Sep 15 15:41:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 417EDE1E33D; Fri, 15 Sep 2017 15:41:09 +0000 (UTC) (envelope-from scottl@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 1BEEB6C9A8; Fri, 15 Sep 2017 15:41:09 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FFf893033484; Fri, 15 Sep 2017 15:41:08 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FFf8Y5033480; Fri, 15 Sep 2017 15:41:08 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709151541.v8FFf8Y5033480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 15 Sep 2017 15:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323614 - head/usr.sbin/acpi/acpidump X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.sbin/acpi/acpidump X-SVN-Commit-Revision: 323614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 15:41:09 -0000 Author: scottl Date: Fri Sep 15 15:41:07 2017 New Revision: 323614 URL: https://svnweb.freebsd.org/changeset/base/323614 Log: Add support for parsing the Watchdog Descriptor Table (WDDT) Sponsored by: Netflix Modified: head/usr.sbin/acpi/acpidump/acpi.c head/usr.sbin/acpi/acpidump/acpidump.8 Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Fri Sep 15 14:59:35 2017 (r323613) +++ head/usr.sbin/acpi/acpidump/acpi.c Fri Sep 15 15:41:07 2017 (r323614) @@ -65,6 +65,7 @@ static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp); static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp); static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_wddt(ACPI_TABLE_HEADER *sdp); static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags); static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp); @@ -679,6 +680,40 @@ acpi_handle_slit(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_wddt(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_WDDT *wddt; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + wddt = (ACPI_TABLE_WDDT *)sdp; + printf("\tSpecVersion=0x%04x, TableVersion=0x%04x\n", + wddt->SpecVersion, wddt->TableVersion); + printf("\tPciVendorId=0x%04x, Address=", wddt->PciVendorId); + acpi_print_gas(&wddt->Address); + printf("\n\tMaxCount=%u, MinCount=%u, Period=%ums\n", + wddt->MaxCount, wddt->MinCount, wddt->Period); + +#define PRINTFLAG(var, flag) printflag((var), ACPI_WDDT_## flag, #flag) + printf("\tStatus="); + PRINTFLAG(wddt->Status, AVAILABLE); + PRINTFLAG(wddt->Status, ACTIVE); + PRINTFLAG(wddt->Status, TCO_OS_OWNED); + PRINTFLAG(wddt->Status, USER_RESET); + PRINTFLAG(wddt->Status, WDT_RESET); + PRINTFLAG(wddt->Status, POWER_FAIL); + PRINTFLAG(wddt->Status, UNKNOWN_RESET); + PRINTFLAG_END(); + printf("\tCapability="); + PRINTFLAG(wddt->Capability, AUTO_RESET); + PRINTFLAG(wddt->Capability, ALERT_SUPPORT); + PRINTFLAG_END(); +#undef PRINTFLAG + + printf(END_COMMENT); +} + +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags) { @@ -1654,6 +1689,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) acpi_handle_dmar(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4)) acpi_handle_nfit(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_WDDT, 4)) + acpi_handle_wddt(sdp); else { printf(BEGIN_COMMENT); acpi_print_sdt(sdp); Modified: head/usr.sbin/acpi/acpidump/acpidump.8 ============================================================================== --- head/usr.sbin/acpi/acpidump/acpidump.8 Fri Sep 15 14:59:35 2017 (r323613) +++ head/usr.sbin/acpi/acpidump/acpidump.8 Fri Sep 15 15:41:07 2017 (r323614) @@ -107,6 +107,7 @@ utility dumps contents of the following tables: .It MCFG .It RSD PTR .It RSDT +.It WDDT .El .Pp The RSDT contains a pointer to the physical memory address of the FACP From owner-svn-src-head@freebsd.org Fri Sep 15 15:57:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E94E1F04A; Fri, 15 Sep 2017 15:57:16 +0000 (UTC) (envelope-from kevans@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 AF8AD6D223; Fri, 15 Sep 2017 15:57:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FFvFNm041594; Fri, 15 Sep 2017 15:57:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FFvFKK041593; Fri, 15 Sep 2017 15:57:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201709151557.v8FFvFKK041593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 15 Sep 2017 15:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323615 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 323615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 15:57:17 -0000 Author: kevans Date: Fri Sep 15 15:57:15 2017 New Revision: 323615 URL: https://svnweb.freebsd.org/changeset/base/323615 Log: bsdgrep: disable TRE implementation by default Start the phasing out of TRE by disabling it by default. r317254 introduced a BSD_GREP_FASTMATCH knob (defaulting to on) for testing of bsdgrep with and without TRE enabled. More bugs have cropped up since then, and WITHOUT_BSD_GREP_FASTMATCH has shown in testing to be more stable than its counterpart. Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D12381 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Sep 15 15:41:07 2017 (r323614) +++ head/share/mk/src.opts.mk Fri Sep 15 15:57:15 2017 (r323615) @@ -62,7 +62,6 @@ __DEFAULT_YES_OPTIONS = \ BOOTPARAMD \ BOOTPD \ BSD_CPIO \ - BSD_GREP_FASTMATCH \ BSDINSTALL \ BSNMP \ BZIP2 \ @@ -175,6 +174,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ + BSD_GREP_FASTMATCH \ CLANG_EXTRAS \ DTRACE_TESTS \ GNU_GREP_COMPAT \ From owner-svn-src-head@freebsd.org Fri Sep 15 16:07:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3607E1FB36; Fri, 15 Sep 2017 16:07:10 +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 813696DAB0; Fri, 15 Sep 2017 16:07:10 +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 v8FG79c7045732; Fri, 15 Sep 2017 16:07:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FG79E1045731; Fri, 15 Sep 2017 16:07:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709151607.v8FG79E1045731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Sep 2017 16:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323616 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 323616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 16:07:10 -0000 Author: kib Date: Fri Sep 15 16:07:09 2017 New Revision: 323616 URL: https://svnweb.freebsd.org/changeset/base/323616 Log: Batch freeing of the pages in vm_object_page_remove() under the same free queue mutex lock owning session, same as it was done for the object termination in r323561. Reported and tested by: mjg Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Sep 15 15:57:15 2017 (r323615) +++ head/sys/vm/vm_object.c Fri Sep 15 16:07:09 2017 (r323616) @@ -1953,6 +1953,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t { vm_page_t p, next; struct mtx *mtx; + struct pglist pgl; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1961,6 +1962,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t if (object->resident_page_count == 0) return; vm_object_pip_add(object, 1); + TAILQ_INIT(&pgl); again: p = vm_page_find_least(object, start); mtx = NULL; @@ -2012,10 +2014,13 @@ again: } if ((options & OBJPR_NOTMAPPED) == 0) pmap_remove_all(p); - vm_page_free(p); + p->flags &= ~PG_ZERO; + if (vm_page_free_prep(p, false)) + TAILQ_INSERT_TAIL(&pgl, p, listq); } if (mtx != NULL) mtx_unlock(mtx); + vm_page_free_phys_pglist(&pgl); vm_object_pip_wakeup(object); } From owner-svn-src-head@freebsd.org Fri Sep 15 19:47:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E666BE0598C; Fri, 15 Sep 2017 19:47:45 +0000 (UTC) (envelope-from kibab@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 C1DD575CEB; Fri, 15 Sep 2017 19:47:45 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FJliMj038392; Fri, 15 Sep 2017 19:47:44 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FJliJ4038386; Fri, 15 Sep 2017 19:47:44 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709151947.v8FJliJ4038386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Fri, 15 Sep 2017 19:47:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323619 - in head/sys: arm/broadcom/bcm2835 cam/mmc conf dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 cam/mmc conf dev/mmc/host X-SVN-Commit-Revision: 323619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 19:47:46 -0000 Author: kibab Date: Fri Sep 15 19:47:44 2017 New Revision: 323619 URL: https://svnweb.freebsd.org/changeset/base/323619 Log: Miscellaneous fixes and improvements to MMCCAM stack * Demote the level of several debug messages to CAM_DEBUG_TRACE * Add detection for SDHC cards that can do 1.8V. No voltage switch sequence is issued yet; * Don't create a separate LUN for each SDIO function. We need just one to make pass(4) attach; * Remove obsolete mmc_sdio* files. SDIO functionality will be moved into the separate device that will manage a new sdio(4) bus; * Terminate probing if got no reply to CMD0; * Make bcm2835 SDHCI host controller driver compile with 'option MMCCAM'. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12109 Deleted: head/sys/cam/mmc/mmc_sdio.c head/sys/cam/mmc/mmc_sdio.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/cam/mmc/mmc.h head/sys/cam/mmc/mmc_da.c head/sys/cam/mmc/mmc_xpt.c head/sys/conf/files head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Sep 15 19:47:44 2017 (r323619) @@ -685,4 +685,6 @@ static driver_t bcm_sdhci_driver = { DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, NULL, NULL); MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1); +#ifndef MMCCAM MMC_DECLARE_BRIDGE(sdhci_bcm); +#endif Modified: head/sys/cam/mmc/mmc.h ============================================================================== --- head/sys/cam/mmc/mmc.h Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/cam/mmc/mmc.h Fri Sep 15 19:47:44 2017 (r323619) @@ -87,6 +87,7 @@ struct mmc_params { #define CARD_FEATURE_SDIO 0x1 << 2 #define CARD_FEATURE_SD20 0x1 << 3 #define CARD_FEATURE_MMC 0x1 << 4 +#define CARD_FEATURE_18V 0x1 << 5 uint8_t sdio_func_count; } __packed; Modified: head/sys/cam/mmc/mmc_da.c ============================================================================== --- head/sys/cam/mmc/mmc_da.c Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/cam/mmc/mmc_da.c Fri Sep 15 19:47:44 2017 (r323619) @@ -378,8 +378,7 @@ sddaopen(struct disk *dp) return (error); } - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE | CAM_DEBUG_PERIPH, - ("sddaopen\n")); + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaopen\n")); softc = (struct sdda_softc *)periph->softc; softc->flags |= SDDA_FLAG_OPEN; @@ -403,8 +402,7 @@ sddaclose(struct disk *dp) cam_periph_lock(periph); - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE | CAM_DEBUG_PERIPH, - ("sddaclose\n")); + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaclose\n")); while (softc->refcount != 0) cam_periph_sleep(periph, &softc->refcount, PRIBIO, "sddaclose", 1); Modified: head/sys/cam/mmc/mmc_xpt.c ============================================================================== --- head/sys/cam/mmc/mmc_xpt.c Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/cam/mmc/mmc_xpt.c Fri Sep 15 19:47:44 2017 (r323619) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include /* for xpt_print below */ #include /* for PRIu64 */ @@ -162,6 +161,7 @@ typedef struct { union ccb saved_ccb; uint32_t flags; #define PROBE_FLAG_ACMD_SENT 0x1 /* CMD55 is sent, card expects ACMD */ + uint8_t acmd41_count; /* how many times ACMD41 has been issued */ struct cam_periph *periph; } mmcprobe_softc; @@ -219,6 +219,8 @@ mmc_dev_async(u_int32_t async_code, struct cam_eb *bus printf("Got AC_PATH_REGISTERED -- whatever...\n"); } else if (async_code == AC_PATH_DEREGISTERED ) { printf("Got AC_PATH_DEREGISTERED -- whatever...\n"); + } else if (async_code == AC_UNIT_ATTENTION) { + printf("Got interrupt generated by the card and ignored it\n"); } else panic("Unknown async code\n"); } @@ -299,9 +301,9 @@ mmc_scan_lun(struct cam_periph *periph, struct cam_pat static void mmc_action(union ccb *start_ccb) { - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO, + CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("mmc_action! func_code=%x, action %s\n", start_ccb->ccb_h.func_code, - xpt_action_name(start_ccb->ccb_h.func_code))); + xpt_action_name(start_ccb->ccb_h.func_code))); switch (start_ccb->ccb_h.func_code) { case XPT_SCAN_BUS: @@ -486,6 +488,7 @@ mmcprobe_register(struct cam_periph *periph, void *arg } softc->flags = 0; + softc->acmd41_count = 0; periph->softc = softc; softc->periph = periph; softc->action = PROBE_INVALID; @@ -672,8 +675,12 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s * We set CCS bit because we do support SDHC cards. * XXX: Don't set CCS if no response to CMD8. */ - mmcio->cmd.arg = MMC_OCR_CCS | mmcp->card_ocr; /* CCS + ocr */ + uint32_t cmd_arg = MMC_OCR_CCS | mmcp->card_ocr; /* CCS + ocr */ + if (softc->acmd41_count < 10 && mmcp->card_ocr != 0 ) + cmd_arg |= MMC_OCR_S18R; + mmcio->cmd.arg = cmd_arg; mmcio->cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; + softc->acmd41_count++; } else { mmcio->cmd.opcode = MMC_APP_CMD; /* CMD 55 */ mmcio->cmd.arg = 0; /* rca << 16 */ @@ -769,8 +776,9 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do /* There was a device there, but now it's gone... */ if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { xpt_async(AC_LOST_DEVICE, path, NULL); - PROBE_SET_ACTION(softc, PROBE_INVALID); } + PROBE_SET_ACTION(softc, PROBE_INVALID); + break; } path->device->protocol = PROTO_MMCSD; PROBE_SET_ACTION(softc, PROBE_SEND_IF_COND); @@ -936,12 +944,18 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do mmcp->card_features |= CARD_FEATURE_SDHC; } - } else { - CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE, - ("Card not ready: %08x\n", mmcio->cmd.resp[0])); - /* Send CMD55+ACMD41 once again */ - PROBE_SET_ACTION(softc, PROBE_SEND_APP_OP_COND); - } + /* Whether the card supports 1.8V signaling */ + if (mmcio->cmd.resp[0] & MMC_OCR_S18A) { + CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE, + ("Card supports 1.8V signaling\n")); + mmcp->card_features |= CARD_FEATURE_18V; + } + } else { + CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE, + ("Card not ready: %08x\n", mmcio->cmd.resp[0])); + /* Send CMD55+ACMD41 once again */ + PROBE_SET_ACTION(softc, PROBE_SEND_APP_OP_COND); + } break; } @@ -1053,21 +1067,6 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); xpt_async(AC_FOUND_DEVICE, path, done_ccb); - } - - /* Also announce each SDIO function */ - struct mmc_params *mmcp = &path->device->mmc_ident_data; - - for (int i = 0; i < mmcp->sdio_func_count; i++) { - struct cam_path *newpath; - cam_status status; - status = xpt_create_path(&newpath, NULL, - done_ccb->ccb_h.path_id, 0, i + 1); - if (status != CAM_REQ_CMP) - printf("xpt_create_path failed" - " with status %#x\n", - status); - xpt_async(AC_FOUND_DEVICE, newpath, done_ccb); } } if (softc->action == PROBE_DONE || softc->action == PROBE_INVALID) { Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/conf/files Fri Sep 15 19:47:44 2017 (r323619) @@ -112,7 +112,6 @@ cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da -cam/mmc/mmc_sdio.c optional scbus mmccam cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ncv | nsp | stg cam/scsi/scsi_pass.c optional pass Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Fri Sep 15 19:17:30 2017 (r323618) +++ head/sys/dev/mmc/host/dwmmc.c Fri Sep 15 19:47:44 2017 (r323619) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_mmccam.h" + #include "mmcbr_if.h" #define dprintf(x, arg...) @@ -1181,4 +1183,6 @@ static devclass_t dwmmc_devclass; DRIVER_MODULE(dwmmc, simplebus, dwmmc_driver, dwmmc_devclass, NULL, NULL); DRIVER_MODULE(dwmmc, ofwbus, dwmmc_driver, dwmmc_devclass, NULL, NULL); +#ifndef MMCCAM MMC_DECLARE_BRIDGE(dwmmc); +#endif From owner-svn-src-head@freebsd.org Fri Sep 15 19:48:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0350FE05AF5; Fri, 15 Sep 2017 19:48:50 +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 D2EF175EA9; Fri, 15 Sep 2017 19:48:49 +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 v8FJmmhd038472; Fri, 15 Sep 2017 19:48:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FJmm27038466; Fri, 15 Sep 2017 19:48:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201709151948.v8FJmm27038466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 15 Sep 2017 19:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323620 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise X-SVN-Commit-Revision: 323620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 19:48:50 -0000 Author: bdrewery Date: Fri Sep 15 19:48:48 2017 New Revision: 323620 URL: https://svnweb.freebsd.org/changeset/base/323620 Log: Fix the raise tests. - The exit probe was not appropriately filtered to only the known pid so it was firing on any random process that would exit rather the only the one we cared about. - The dtest script executes the tst.raise*.exe in the background from POSIX sh without jobs control. POSIX mandates that SIGINT be set to SIG_IGN in this case. The test executable never actually tested that SIGINT could be caught despite trying to block and delay the signal. So the SIGINT sent from raise() is never actually received since it is ignored. This could be fixed by calling 'trap - INT' from dtest before running the executable but I've opted to just use SIGUSR1 instead in these specific tests rather than adding more logic to test that SIGINT is not ignored at startup. These 2 issues meant that the tests would randomly work but only if a process coincidentally exited during the test. Reviewed by: markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c Fri Sep 15 19:48:48 2017 (r323620) @@ -35,13 +35,13 @@ main(int argc, char **argv) sigset_t ss; (void) sigemptyset(&ss); - (void) sigaddset(&ss, SIGINT); + (void) sigaddset(&ss, SIGUSR1); (void) sigprocmask(SIG_BLOCK, &ss, NULL); do { (void) getpid(); (void) sigpending(&ss); - } while (!sigismember(&ss, SIGINT)); + } while (!sigismember(&ss, SIGUSR1)); return (0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d Fri Sep 15 19:48:48 2017 (r323620) @@ -47,7 +47,7 @@ syscall::getpid:entry /pid == $1/ { trace("raised"); - raise(SIGINT); + raise(SIGUSR1); /* * Wait no more than half a second for the process to die. */ @@ -55,6 +55,7 @@ syscall::getpid:entry } syscall::exit:entry +/pid == $1/ { exit(0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c Fri Sep 15 19:48:48 2017 (r323620) @@ -45,7 +45,7 @@ main(int argc, char **argv) sigemptyset(&sa.sa_mask); sa.sa_flags = 0; - (void) sigaction(SIGINT, &sa, NULL); + (void) sigaction(SIGUSR1, &sa, NULL); for (;;) { (void) getpid(); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d Fri Sep 15 19:48:48 2017 (r323620) @@ -47,7 +47,7 @@ syscall::getpid:return /pid == $1/ { trace("raised"); - raise(SIGINT); + raise(SIGUSR1); /* * Wait no more than half a second for the process to die. */ @@ -55,6 +55,7 @@ syscall::getpid:return } syscall::exit:entry +/pid == $1/ { exit(0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c Fri Sep 15 19:48:48 2017 (r323620) @@ -45,7 +45,7 @@ main(int argc, char **argv) sigemptyset(&sa.sa_mask); sa.sa_flags = 0; - (void) sigaction(SIGINT, &sa, NULL); + (void) sigaction(SIGUSR1, &sa, NULL); for (;;) { (void) getpid(); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d Fri Sep 15 19:47:44 2017 (r323619) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d Fri Sep 15 19:48:48 2017 (r323620) @@ -47,7 +47,7 @@ syscall::getpid:entry /pid == $1/ { trace("raised"); - raise(SIGINT); + raise(SIGUSR1); /* * Wait no more than half a second for the process to die. */ @@ -55,6 +55,7 @@ syscall::getpid:entry } syscall::exit:entry +/pid == $1/ { exit(0); } From owner-svn-src-head@freebsd.org Fri Sep 15 19:56:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B6B9E061D8; Fri, 15 Sep 2017 19:56:23 +0000 (UTC) (envelope-from landonf@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 06F67763A6; Fri, 15 Sep 2017 19:56:22 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FJuMER042646; Fri, 15 Sep 2017 19:56:22 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FJuMQl042644; Fri, 15 Sep 2017 19:56:22 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201709151956.v8FJuMQl042644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Fri, 15 Sep 2017 19:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323621 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 323621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 19:56:23 -0000 Author: landonf Date: Fri Sep 15 19:56:21 2017 New Revision: 323621 URL: https://svnweb.freebsd.org/changeset/base/323621 Log: Add MIPS32/64 Rev2 CP0 intctl register definitions. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D12300 Modified: head/sys/mips/include/cpufunc.h head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Fri Sep 15 19:48:48 2017 (r323620) +++ head/sys/mips/include/cpufunc.h Fri Sep 15 19:56:21 2017 (r323621) @@ -279,6 +279,15 @@ MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW32_COP0(prid, MIPS_COP_0_PRID); /* XXX 64-bit? */ MIPS_RW32_COP0_SEL(ebase, MIPS_COP_0_PRID, 1); + +#if defined(CPU_MIPS24K) || defined(CPU_MIPS34K) || \ + defined(CPU_MIPS74K) || defined(CPU_MIPS1004K) || \ + defined(CPU_MIPS1074K) || defined(CPU_INTERAPTIV) || \ + defined(CPU_PROAPTIV) +/* MIPS32/64 r2 intctl */ +MIPS_RW32_COP0_SEL(intctl, MIPS_COP_0_INTCTL, 1); +#endif + #ifdef CPU_XBURST MIPS_RW32_COP0_SEL(xburst_mbox0, MIPS_COP_0_XBURST_MBOX, 0); MIPS_RW32_COP0_SEL(xburst_mbox1, MIPS_COP_0_XBURST_MBOX, 1); Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Fri Sep 15 19:48:48 2017 (r323620) +++ head/sys/mips/include/cpuregs.h Fri Sep 15 19:56:21 2017 (r323621) @@ -468,6 +468,7 @@ * 10 MIPS_COP_0_TLB_HI 3636 TLB entry high. * 11 MIPS_COP_0_COMPARE .333 Compare (against Count). * 12 MIPS_COP_0_STATUS 3333 Status register. + * 12/1 MIPS_COP_0_INTCTL ..33 Interrupt setup (MIPS32/64 r2). * 13 MIPS_COP_0_CAUSE 3333 Exception cause register. * 14 MIPS_COP_0_EXC_PC 3636 Exception PC. * 15 MIPS_COP_0_PRID 3333 Processor revision identifier. @@ -548,6 +549,7 @@ /* MIPS32/64 */ #define MIPS_COP_0_USERLOCAL _(4) /* sel 2 is userlevel register */ #define MIPS_COP_0_HWRENA _(7) +#define MIPS_COP_0_INTCTL _(12) #define MIPS_COP_0_DEBUG _(23) #define MIPS_COP_0_DEPC _(24) #define MIPS_COP_0_PERFCNT _(25) @@ -560,6 +562,16 @@ #define MIPS_MMU_TLB 0x01 /* Standard TLB */ #define MIPS_MMU_BAT 0x02 /* Standard BAT */ #define MIPS_MMU_FIXED 0x03 /* Standard fixed mapping */ + +/* + * IntCtl Register Fields + */ +#define MIPS_INTCTL_IPTI_MASK 0xE0000000 /* bits 31..29 timer intr # */ +#define MIPS_INTCTL_IPTI_SHIFT 29 +#define MIPS_INTCTL_IPPCI_MASK 0x1C000000 /* bits 26..29 perf counter intr # */ +#define MIPS_INTCTL_IPPCI_SHIFT 26 +#define MIPS_INTCTL_VS_MASK 0x000001F0 /* bits 5..9 vector spacing */ +#define MIPS_INTCTL_VS_SHIFT 4 /* * Config Register Fields From owner-svn-src-head@freebsd.org Fri Sep 15 20:05:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2739E069FB; Fri, 15 Sep 2017 20:05:56 +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 AC683768E2; Fri, 15 Sep 2017 20:05:56 +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 v8FK5tvO046867; Fri, 15 Sep 2017 20:05:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FK5tT1046866; Fri, 15 Sep 2017 20:05:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709152005.v8FK5tT1046866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Sep 2017 20:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323622 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 323622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:05:57 -0000 Author: emaste Date: Fri Sep 15 20:05:55 2017 New Revision: 323622 URL: https://svnweb.freebsd.org/changeset/base/323622 Log: open(2): update ENOTCAPABLE description for .. lookups After r308212 Capsicum permits .. lookups in capability mode, as long as path component traversal does not escape the directory corresponding to the provided file descriptor. We should add a description of the vfs.lookup_cap_dotdot and vfs.lookup_cap_dotdot_nonlocal sysctls, perhaps as a cross-reference to capsicum(4). I intend to look at that soon. Reviewed by: bjk, cem, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12343 Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Fri Sep 15 19:56:21 2017 (r323621) +++ head/lib/libc/sys/open.2 Fri Sep 15 20:05:55 2017 (r323622) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd November 22, 2016 +.Dd September 15, 2017 .Dt OPEN 2 .Os .Sh NAME @@ -487,7 +487,9 @@ is specified and the process is in capability mode. was called and the process is in capability mode. .It Bq Er ENOTCAPABLE .Fa path -is an absolute path or contained "..". +is an absolute path or contained a ".." component leading to a +directory outside of the directory hierarchy specified by +.Fa fd . .El .Sh SEE ALSO .Xr chmod 2 , From owner-svn-src-head@freebsd.org Fri Sep 15 20:12:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F94E07036; Fri, 15 Sep 2017 20:12: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 DB57976E2A; Fri, 15 Sep 2017 20:12:39 +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 v8FKCd8D050686; Fri, 15 Sep 2017 20:12:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKCdDA050685; Fri, 15 Sep 2017 20:12:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709152012.v8FKCdDA050685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Sep 2017 20:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323623 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 323623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:12:40 -0000 Author: emaste Date: Fri Sep 15 20:12:38 2017 New Revision: 323623 URL: https://svnweb.freebsd.org/changeset/base/323623 Log: rename(2): document capability mode errors Reviewed by: allanjude MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12339 Modified: head/lib/libc/sys/rename.2 Modified: head/lib/libc/sys/rename.2 ============================================================================== --- head/lib/libc/sys/rename.2 Fri Sep 15 20:05:55 2017 (r323622) +++ head/lib/libc/sys/rename.2 Fri Sep 15 20:12:38 2017 (r323623) @@ -28,7 +28,7 @@ .\" @(#)rename.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd September 15, 2017 .Dt RENAME 2 .Os .Sh NAME @@ -252,6 +252,9 @@ The .Fa to argument is a directory and is not empty. +.It Bq Er ECAPMODE +.Fn rename +was called and the process is in capability mode. .El .Pp In addition to the errors returned by the @@ -288,6 +291,26 @@ argument is not an absolute path and is neither .Dv AT_FDCWD nor a file descriptor associated with a directory. +.It Bq Er ECAPMODE +.Dv AT_FDCWD +is specified and the process is in capability mode. +.It Bq Er ENOTCAPABLE +.Fa path +is an absolute path or contained a ".." component leading to a directory +outside of the directory hierarchy specified by +.Fa fromfd +or +.Fa tofd . +.It Bq Er ENOTCAPABLE +The +.Fa fromfd +file descriptor lacks the +.Dv CAP_RENAMEAT_SOURCE +right, or the +.Fa tofd +file descriptor lacks the +.Dv CAP_RENAMEAT_TARGET +right. .El .Sh SEE ALSO .Xr chflags 2 , From owner-svn-src-head@freebsd.org Fri Sep 15 20:15:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEC1BE072B8; Fri, 15 Sep 2017 20:15:56 +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 9C92177021; Fri, 15 Sep 2017 20:15:56 +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 v8FKFtx4050863; Fri, 15 Sep 2017 20:15:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKFtn3050862; Fri, 15 Sep 2017 20:15:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709152015.v8FKFtn3050862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Sep 2017 20:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323624 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:15:56 -0000 Author: imp Date: Fri Sep 15 20:15:55 2017 New Revision: 323624 URL: https://svnweb.freebsd.org/changeset/base/323624 Log: Update comments on what the CAM_IOSCHED_FLAG_TRIM_ACTIVE means. It's intended only for those situations where the periph driver ones to limit the number of trims active to one and only one. Also update comments on associated functions. Sponsored by: Netflix Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 15 20:12:38 2017 (r323623) +++ head/sys/cam/cam_iosched.c Fri Sep 15 20:15:55 2017 (r323624) @@ -673,7 +673,10 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) } #endif - /* Trim or similar currently pending completion */ +/* + * Trim or similar currently pending completion. Should only be set for + * those drivers wishing only one Trim active at a time. + */ #define CAM_IOSCHED_FLAG_TRIM_ACTIVE (1ul << 0) /* Callout active, and needs to be torn down */ #define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1) @@ -1387,7 +1390,7 @@ cam_iosched_schedule(struct cam_iosched_softc *isc, st } /* - * Complete a trim request + * Complete a trim request. Mark that we no longer have one in flight. */ void cam_iosched_trim_done(struct cam_iosched_softc *isc) @@ -1437,7 +1440,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc /* * Tell the io scheduler that you've pushed a trim down into the sim. - * xxx better place for this? + * This also tells the I/O scheduler not to push any more trims down, so + * some periphs do not call it if they can cope with multiple trims in flight. */ void cam_iosched_submit_trim(struct cam_iosched_softc *isc) From owner-svn-src-head@freebsd.org Fri Sep 15 20:16:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 582FFE072FF; Fri, 15 Sep 2017 20:16: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 235ED770BC; Fri, 15 Sep 2017 20:16: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 v8FKG6Gb050923; Fri, 15 Sep 2017 20:16:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKG675050922; Fri, 15 Sep 2017 20:16:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709152016.v8FKG675050922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Sep 2017 20:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323625 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 323625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:16:07 -0000 Author: imp Date: Fri Sep 15 20:16:06 2017 New Revision: 323625 URL: https://svnweb.freebsd.org/changeset/base/323625 Log: Allow multiple TRIMs to be done for nda Don't call cam_iosched_trim_done or cam_iosched_submit_trim for nda since its hardware can handle almost an arbitrary number of TRIMs and we don't have to be careful to only ever do one. Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Fri Sep 15 20:15:55 2017 (r323624) +++ head/sys/cam/nvme/nvme_da.c Fri Sep 15 20:16:06 2017 (r323625) @@ -920,7 +920,12 @@ ndastart(struct cam_periph *periph, union ccb *start_c nda_nvme_trim(softc, &start_ccb->nvmeio, dsm_range, 1); start_ccb->ccb_h.ccb_state = NDA_CCB_TRIM; start_ccb->ccb_h.flags |= CAM_UNLOCKED; - cam_iosched_submit_trim(softc->cam_iosched); /* XXX */ + /* + * Note: We can have multiple TRIMs in flight, so we don't call + * cam_iosched_submit_trim(softc->cam_iosched); + * since that forces the I/O scheduler to only schedule one at a time. + * On NVMe drives, this is a performance disaster. + */ goto out; } case BIO_FLUSH: @@ -1013,7 +1018,11 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); #endif - cam_iosched_trim_done(softc->cam_iosched); + /* + * Since we can have multiple trims in flight, we don't + * need to call this here. + * cam_iosched_trim_done(softc->cam_iosched); + */ ndaschedule(periph); cam_periph_unlock(periph); #ifdef notyet From owner-svn-src-head@freebsd.org Fri Sep 15 20:34:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E482CE085BC; Fri, 15 Sep 2017 20:34:53 +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 B21A17C19A; Fri, 15 Sep 2017 20:34:53 +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 v8FKYqo1059614; Fri, 15 Sep 2017 20:34:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKYqKh059613; Fri, 15 Sep 2017 20:34:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709152034.v8FKYqKh059613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 15 Sep 2017 20:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323626 - head/usr.sbin/tcpdrop X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.sbin/tcpdrop X-SVN-Commit-Revision: 323626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:34:54 -0000 Author: tuexen Date: Fri Sep 15 20:34:52 2017 New Revision: 323626 URL: https://svnweb.freebsd.org/changeset/base/323626 Log: Add references. Suggested by Maxim Konovalov. Sponsored by: Netflix, Inc. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:16:06 2017 (r323625) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:34:52 2017 (r323626) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2017 +.Dd September 15, 2017 .Dt TCPDROP 8 .Os .Sh NAME @@ -172,7 +172,10 @@ LAST_ACK state use: .Ed .Sh SEE ALSO .Xr netstat 1 , -.Xr sockstat 1 +.Xr sockstat 1 , +.Xr tcp 4 , +.Xr tcp_functions 9 + .Sh AUTHORS .An Markus Friedl Aq Mt markus@openbsd.org .An Juli Mallett Aq Mt jmallett@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Sep 15 20:35:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D44DE08659; Fri, 15 Sep 2017 20:35:36 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 224CB7C2F3; Fri, 15 Sep 2017 20:35:36 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2003:cd:6be7:6700:88e4:d136:c842:ed69] (p200300CD6BE7670088E4D136C842ED69.dip0.t-ipconnect.de [IPv6:2003:cd:6be7:6700:88e4:d136:c842:ed69]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id BB6D9721E281A; Fri, 15 Sep 2017 22:35:22 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r323493 - head/usr.sbin/tcpdrop From: Michael Tuexen In-Reply-To: Date: Fri, 15 Sep 2017 22:35:21 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <90B04FAA-C92B-45E2-A917-7AD8160F9720@freebsd.org> References: <201709121339.v8CDdiWH036958@repo.freebsd.org> To: Maxim Konovalov X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:35:36 -0000 > On 15. Sep 2017, at 10:10, Maxim Konovalov = wrote: >=20 > Hi Michael, >=20 > On Tue, 12 Sep 2017, 13:39-0000, Michael Tuexen wrote: >=20 >> Author: tuexen >> Date: Tue Sep 12 13:39:44 2017 >> New Revision: 323493 >> URL: https://svnweb.freebsd.org/changeset/base/323493 >>=20 >> Log: >> Allow TCP connections to be filtered by stack and state. >>=20 >> Choose the command line options to be consistent with the ones of >> sockstat. >>=20 > Makes sense? Yes. Also added a reference to TCP in r323626. Thanks for the suggestion. Best regards Michael >=20 > Index: tcpdrop.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- tcpdrop.8 (revision 323607) > +++ tcpdrop.8 (working copy) > @@ -172,7 +172,8 @@ LAST_ACK state use: > .Ed > .Sh SEE ALSO > .Xr netstat 1 , > -.Xr sockstat 1 > +.Xr sockstat 1 , > +.Xr tcp_functions 9 > .Sh AUTHORS > .An Markus Friedl Aq Mt markus@openbsd.org > .An Juli Mallett Aq Mt jmallett@FreeBSD.org >=20 > --=20 > Maxim Konovalov From owner-svn-src-head@freebsd.org Fri Sep 15 20:41:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA286E08B76; Fri, 15 Sep 2017 20:41:13 +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 87E617C6FE; Fri, 15 Sep 2017 20:41:13 +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 v8FKfCQB059907; Fri, 15 Sep 2017 20:41:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKfCgg059906; Fri, 15 Sep 2017 20:41:12 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709152041.v8FKfCgg059906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 15 Sep 2017 20:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323627 - head/usr.sbin/tcpdrop X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.sbin/tcpdrop X-SVN-Commit-Revision: 323627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:41:13 -0000 Author: tuexen Date: Fri Sep 15 20:41:12 2017 New Revision: 323627 URL: https://svnweb.freebsd.org/changeset/base/323627 Log: Remove empty line accidently introduced in r323626. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:34:52 2017 (r323626) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:41:12 2017 (r323627) @@ -175,7 +175,6 @@ LAST_ACK state use: .Xr sockstat 1 , .Xr tcp 4 , .Xr tcp_functions 9 - .Sh AUTHORS .An Markus Friedl Aq Mt markus@openbsd.org .An Juli Mallett Aq Mt jmallett@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Sep 15 20:46:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D22E08FB3; Fri, 15 Sep 2017 20:46:53 +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 DDB507CC94; Fri, 15 Sep 2017 20:46:52 +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 v8FKkqPq063665; Fri, 15 Sep 2017 20:46:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKkqi7063664; Fri, 15 Sep 2017 20:46:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709152046.v8FKkqi7063664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 15 Sep 2017 20:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323628 - head/usr.bin/sockstat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.bin/sockstat X-SVN-Commit-Revision: 323628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:46:53 -0000 Author: tuexen Date: Fri Sep 15 20:46:51 2017 New Revision: 323628 URL: https://svnweb.freebsd.org/changeset/base/323628 Log: Remove tailing whitespace. Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Fri Sep 15 20:41:12 2017 (r323627) +++ head/usr.bin/sockstat/sockstat.c Fri Sep 15 20:46:51 2017 (r323628) @@ -535,7 +535,7 @@ gather_sctp(void) "address family %d not supported", xraddr->address.sa.sa_family); } - faddr->encaps_port = xraddr->encaps_port; + faddr->encaps_port = xraddr->encaps_port; faddr->state = xraddr->state; faddr->next = NULL; if (prev_faddr == NULL) From owner-svn-src-head@freebsd.org Fri Sep 15 20:58:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A57AE09AB4; Fri, 15 Sep 2017 20:58:53 +0000 (UTC) (envelope-from scottl@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 6A0F47D4FB; Fri, 15 Sep 2017 20:58:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FKwqgG067801; Fri, 15 Sep 2017 20:58:52 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKwqes067799; Fri, 15 Sep 2017 20:58:52 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709152058.v8FKwqes067799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 15 Sep 2017 20:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323629 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 20:58:53 -0000 Author: scottl Date: Fri Sep 15 20:58:52 2017 New Revision: 323629 URL: https://svnweb.freebsd.org/changeset/base/323629 Log: Fix line wrap issues. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_pci.c head/sys/dev/mps/mps_pci.c Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Fri Sep 15 20:46:51 2017 (r323628) +++ head/sys/dev/mpr/mpr_pci.c Fri Sep 15 20:58:52 2017 (r323629) @@ -269,8 +269,8 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) msgs = min(msgs, MPR_MSIX_MAX); msgs = min(msgs, 1); /* XXX */ if (msgs != 0) { - mpr_dprint(sc, MPR_INIT, "Attempting to allocate %d MSI-X " - "messages\n", msgs); + mpr_dprint(sc, MPR_INIT, "Attempting to allocate %d " + "MSI-X messages\n", msgs); error = mpr_alloc_msix(sc, msgs); } } @@ -279,8 +279,8 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) mpr_dprint(sc, MPR_INIT, "Counted %d MSI messages\n", msgs); msgs = min(msgs, MPR_MSI_MAX); if (msgs != 0) { - mpr_dprint(sc, MPR_INIT, "Attempting to allocated %d MSI " - "messages\n", MPR_MSI_MAX); + mpr_dprint(sc, MPR_INIT, "Attempting to allocated %d " + "MSI messages\n", MPR_MSI_MAX); error = mpr_alloc_msi(sc, MPR_MSI_MAX); } } Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Fri Sep 15 20:46:51 2017 (r323628) +++ head/sys/dev/mps/mps_pci.c Fri Sep 15 20:58:52 2017 (r323629) @@ -254,8 +254,8 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) msgs = min(msgs, MPS_MSIX_MAX); msgs = min(msgs, 1); /* XXX */ if (msgs != 0) { - mps_dprint(sc, MPS_INIT, "Attempting to allocate %d MSI-X " - "messages\n", msgs); + mps_dprint(sc, MPS_INIT, "Attempting to allocate %d " + "MSI-X messages\n", msgs); error = mps_alloc_msix(sc, msgs); } } @@ -264,8 +264,8 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) mps_dprint(sc, MPS_INIT, "Counted %d MSI messages\n", msgs); msgs = min(msgs, MPS_MSI_MAX); if (msgs != 0) { - mps_dprint(sc, MPS_INIT, "Attempting to allocate %d MSI " - "messages\n", MPS_MSI_MAX); + mps_dprint(sc, MPS_INIT, "Attempting to allocate %d " + "MSI messages\n", MPS_MSI_MAX); error = mps_alloc_msi(sc, MPS_MSI_MAX); } } From owner-svn-src-head@freebsd.org Fri Sep 15 21:31:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36C31E0B778; Fri, 15 Sep 2017 21:31:13 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1307E69B; Fri, 15 Sep 2017 21:31:12 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 89B2F20BD8; Fri, 15 Sep 2017 17:31:10 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 15 Sep 2017 17:31:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=qnN3F6dL9F7Ac4IS4D TZeR2XG3/V1RBHmV2hQYvg67w=; b=Ky4nwUcFk6tm1wFVUwk1rPJniord9q+Z+A mfzp2wo2DVw0G1jX8cwf82UI5E3aAnglfNM0eyLARuv10uOQVOvMpdSqjh6RVXJ6 7qEEj245cm8mfi+xHeBjBGzlssUebQB5ZzjSD0GaXtDt6hXYvDGVkpTgaPObhKXl P0WP2+mL6x9z33lag89bDJngvxAtdnnTZk2qiET46hVg0QRFTx0imf/4KVBFObIi il5HGxHMJrvnzvVBBbbjj5D+mrZZSm8dQe19Ylm0+t7wqxaRBpzVI2hT9g4fkK2o 20HqJCzKAW76myhQT4r/XIkHIu16p9r4MP2jTi0fD/l+GKWSySMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=qnN3F6dL9F7Ac4IS4DTZeR2XG3/V1RBHmV2hQYvg67w=; b=mJAiOVdJ sqkXJcxeWKjB10lcqbLozczQHCw56vx/tEfswHqE8BkFikdAR6hka4PxDOgG/8Nf DQhqKRdXy7Vh8DsQlGoXFeEXcqQ/lfY4BIm0HElJYGFZTQGaFwL8DO637zlgLmW4 DZXYRwUvc4wpAFUm/dMvJovLvDfzM9dHnJSUWQOeHM7jk6lO2o3kdZQ51qsTiqL5 yeWIlzq408q58+Hdcy6+WC+I5it46EpTWqguM9dkbkZWIliWIRyovV0JeWwzl4hf YgjYQtkF7tUmdKe0RpdPmm/7Us6O2dzyQSzowCOrL7tf6OGEMoGZHe/vH72CXT05 hoV6nqhOHR3A5w== X-ME-Sender: X-Sasl-enc: 3jOBROD6xFXshRT2t6nZjho11bgZysd9Ixj65o93PwP2 1505511070 Received: from [192.168.0.117] (unknown [161.97.249.191]) by mail.messagingengine.com (Postfix) with ESMTPA id BBCDF7F955; Fri, 15 Sep 2017 17:31:09 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys From: Scott Long In-Reply-To: <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> Date: Fri, 15 Sep 2017 15:31:07 -0600 Cc: Cy Schubert , Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1EBD0641-002D-409C-B18E-AAB5FCDECEBA@samsco.org> References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> To: Sean Bruno , Stephen Hurd X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 21:31:13 -0000 > On Sep 13, 2017, at 9:12 AM, Sean Bruno wrote: >=20 >>>> #blamebruno >>>>=20 >>>> Reviewed by: sbruno >>>> Approved by: sbruno (mentor) >>>> Sponsored by: Limelight Networks >>>> Differential Revision: https://reviews.freebsd.org/D12235 >>>=20 >>> *gasps at the LoC count and number of changed drivers* >>>=20 >>> Could someone please better break this up in the future..? >>=20 >> Agreed. Down the road parsing out individual commits in this jumbo = commit=20 >> will be difficult to parse. IMO this may as well have simply been, = import=20 >> from https://github.com/mattmacy/networking/, just like Mr. Torvalds = does=20 >> at kernel.org. I expect to see a commit like this there but not here. = Can=20 >> we break this down to its functional commits? >>=20 >>=20 >=20 >=20 > This ridiculous loc was due to the amount of restructuring needed to = get > us back to being in sync with our development. The future will not = have > this big of a commit/change and should be more bite/fun sized. >=20 > The #blamebruno tag in the commit log was to indicate that this was = not > something Stephen was doing on his own, but was something that I had > induced over the last few months during testing. >=20 This breaks my system. I prior to this commit, I had igb0 and igb1. = Now I only have igb0, and it=E2=80=99s like igb1 isn=E2=80=99t even trying to = attach. Unfortunately, this breaks my nfsroot setup, so I need to roll back my tree. Please = let me know if there=E2=80=99s anything I can provide to help debugging. Scott From owner-svn-src-head@freebsd.org Fri Sep 15 22:40:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94291E0EC9E; Fri, 15 Sep 2017 22:40:58 +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 63406805F1; Fri, 15 Sep 2017 22:40:58 +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 v8FMev38009108; Fri, 15 Sep 2017 22:40:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FMevvt009106; Fri, 15 Sep 2017 22:40:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709152240.v8FMevvt009106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 15 Sep 2017 22:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323630 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 323630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 22:40:58 -0000 Author: jhb Date: Fri Sep 15 22:40:57 2017 New Revision: 323630 URL: https://svnweb.freebsd.org/changeset/base/323630 Log: Avoid reusing the wrong buffer for a DDP AIO request. To optimize the case of ping-ponging between two buffers, the DDP code caches the last two buffers used keeping the pages wired and page pods stored in the NIC's RAM. If a new aio_read() request uses one of the same buffers, then the work of holding pages, etc. can be avoided. However, the starting virtual address of an aio buffer was not saved, only the page count, length, and initial page offset. Thus, an aio_read() request could match a different buffer in the address space. (Earlier during development vm_fault_hold_quick_pages() was always called and the vm_page_t values were compared, but that was eventually removed without being adequately replaced.) Fix by storing the starting virtual address and comparing that (along with other fields) to determine if a buffer can be reused. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Fri Sep 15 20:58:52 2017 (r323629) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Fri Sep 15 22:40:57 2017 (r323630) @@ -1277,7 +1277,8 @@ pscmp(struct pageset *ps, struct vmspace *vm, vm_offse int pgoff, int len) { - if (ps->npages != npages || ps->offset != pgoff || ps->len != len) + if (ps->start != start || ps->npages != npages || + ps->offset != pgoff || ps->len != len) return (1); return (ps->vm != vm || ps->vm_timestamp != vm->vm_map.timestamp); @@ -1378,6 +1379,7 @@ hold_aio(struct toepcb *toep, struct kaiocb *job, stru ps->len = job->uaiocb.aio_nbytes; atomic_add_int(&vm->vm_refcnt, 1); ps->vm = vm; + ps->start = start; CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", __func__, toep->tid, ps, job, ps->npages); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Fri Sep 15 20:58:52 2017 (r323629) +++ head/sys/dev/cxgbe/tom/t4_tom.h Fri Sep 15 22:40:57 2017 (r323630) @@ -112,6 +112,7 @@ struct pageset { int len; struct ppod_reservation prsv; struct vmspace *vm; + vm_offset_t start; u_int vm_timestamp; }; From owner-svn-src-head@freebsd.org Fri Sep 15 22:55:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EE1CE0F9DE; Fri, 15 Sep 2017 22:55: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 EC97780D60; Fri, 15 Sep 2017 22:55: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 v8FMtFm4016823; Fri, 15 Sep 2017 22:55:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FMtFJv016817; Fri, 15 Sep 2017 22:55:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709152255.v8FMtFJv016817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 15 Sep 2017 22:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323631 - head/usr.bin/getconf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.bin/getconf X-SVN-Commit-Revision: 323631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 22:55:17 -0000 Author: jhb Date: Fri Sep 15 22:55:15 2017 New Revision: 323631 URL: https://svnweb.freebsd.org/changeset/base/323631 Log: Add an -a flag to getconf. When -a is specified, the name and value of all system or path configuration values is reported to standard output. Reviewed by: kib (earlier version) MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D12373 Modified: head/usr.bin/getconf/confstr.gperf head/usr.bin/getconf/getconf.1 head/usr.bin/getconf/getconf.c head/usr.bin/getconf/getconf.h head/usr.bin/getconf/pathconf.gperf head/usr.bin/getconf/sysconf.gperf Modified: head/usr.bin/getconf/confstr.gperf ============================================================================== --- head/usr.bin/getconf/confstr.gperf Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/confstr.gperf Fri Sep 15 22:55:15 2017 (r323631) @@ -68,3 +68,14 @@ find_confstr(const char *name, int *key) } return 0; } + +void +foreach_confstr(void (*func)(const char *, int)) +{ + const struct map *mp; + + for (mp = wordlist; mp->name != NULL; mp++) { + if (mp->valid) + func(mp->name, mp->key); + } +} Modified: head/usr.bin/getconf/getconf.1 ============================================================================== --- head/usr.bin/getconf/getconf.1 Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/getconf.1 Fri Sep 15 22:55:15 2017 (r323631) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 8, 2016 +.Dd September 15, 2017 .Dt GETCONF 1 .Os .Sh NAME @@ -36,6 +36,9 @@ .Nd retrieve standard configuration variables .Sh SYNOPSIS .Nm +.Fl a +.Op Ar file +.Nm .Op Fl v Ar environment .Ar path_var .Ar file @@ -45,20 +48,35 @@ .Sh DESCRIPTION The .Nm -utility prints the value of a +utility prints the values of .Tn POSIX or .Tn X/Open -path or system configuration variable to the standard output. -If the specified variable is undefined, the string +path or system configuration variables to the standard output. +If a variable is undefined, the string .Dq Li undefined is output. .Pp -The first form of the command, with two mandatory +The first form of the command displays all of the path or system configuration +variables to standard output. +If +.Ar file +is provided, +all path configuration variables are reported for +.Ar file +using +.Xr pathconf 2 . +Otherwise, +all system configuration variables are reported using +.Xr confstr 3 +and +.Xr sysconf 3. +.Pp +The second form of the command, with two mandatory arguments, retrieves file- and file system-specific configuration variables using .Xr pathconf 2 . -The second form, with a single argument, retrieves system +The third form, with a single argument, retrieves system configuration variables using .Xr confstr 3 and Modified: head/usr.bin/getconf/getconf.c ============================================================================== --- head/usr.bin/getconf/getconf.c Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/getconf.c Fri Sep 15 22:55:15 2017 (r323631) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include "getconf.h" +static void do_allsys(void); +static void do_allpath(const char *path); static void do_confstr(const char *name, int key); static void do_sysconf(const char *name, int key); static void do_pathconf(const char *name, int key, const char *path); @@ -49,7 +52,8 @@ static void usage(void) { fprintf(stderr, -"usage: getconf [-v prog_env] system_var\n" +"usage: getconf -a [pathname]\n" +" getconf [-v prog_env] system_var\n" " getconf [-v prog_env] path_var pathname\n"); exit(EX_USAGE); } @@ -57,13 +61,18 @@ usage(void) int main(int argc, char **argv) { + bool aflag; int c, key, valid; const char *name, *vflag, *alt_path; intmax_t limitval; + aflag = false; vflag = NULL; - while ((c = getopt(argc, argv, "v:")) != -1) { + while ((c = getopt(argc, argv, "av:")) != -1) { switch (c) { + case 'a': + aflag = true; + break; case 'v': vflag = optarg; break; @@ -73,6 +82,16 @@ main(int argc, char **argv) } } + if (aflag) { + if (vflag != NULL) + usage(); + if (argv[optind] == NULL) + do_allsys(); + else + do_allpath(argv[optind]); + return (0); + } + if ((name = argv[optind]) == NULL) usage(); @@ -133,6 +152,77 @@ main(int argc, char **argv) name); } return 0; +} + +static void +do_onestr(const char *name, int key) +{ + size_t len; + + errno = 0; + len = confstr(key, 0, 0); + if (len == 0 && errno != 0) { + warn("confstr: %s", name); + return; + } + printf("%s: ", name); + if (len == 0) + printf("undefined\n"); + else { + char buf[len + 1]; + + confstr(key, buf, len); + printf("%s\n", buf); + } +} + +static void +do_onesys(const char *name, int key) +{ + long value; + + errno = 0; + value = sysconf(key); + if (value == -1 && errno != 0) { + warn("sysconf: %s", name); + return; + } + printf("%s: ", name); + if (value == -1) + printf("undefined\n"); + else + printf("%ld\n", value); +} + +static void +do_allsys(void) +{ + + foreach_confstr(do_onestr); + foreach_sysconf(do_onesys); +} + +static void +do_onepath(const char *name, int key, const char *path) +{ + long value; + + errno = 0; + value = pathconf(path, key); + if (value == -1 && errno != EINVAL && errno != 0) + warn("pathconf: %s", name); + printf("%s: ", name); + if (value == -1) + printf("undefined\n"); + else + printf("%ld\n", value); +} + +static void +do_allpath(const char *path) +{ + + foreach_pathconf(do_onepath, path); } static void Modified: head/usr.bin/getconf/getconf.h ============================================================================== --- head/usr.bin/getconf/getconf.h Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/getconf.h Fri Sep 15 22:55:15 2017 (r323631) @@ -41,3 +41,7 @@ int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); int find_progenv(const char *name, const char **alt_path); int find_sysconf(const char *name, int *key); +void foreach_confstr(void (*func)(const char *, int)); +void foreach_pathconf(void (*func)(const char *, int, const char *), + const char *path); +void foreach_sysconf(void (*func)(const char *, int)); Modified: head/usr.bin/getconf/pathconf.gperf ============================================================================== --- head/usr.bin/getconf/pathconf.gperf Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/pathconf.gperf Fri Sep 15 22:55:15 2017 (r323631) @@ -68,3 +68,15 @@ find_pathconf(const char *name, int *key) } return 0; } + +void +foreach_pathconf(void (*func)(const char *, int, const char *), + const char *path) +{ + const struct map *mp; + + for (mp = wordlist; mp->name != NULL; mp++) { + if (mp->valid) + func(mp->name, mp->key, path); + } +} Modified: head/usr.bin/getconf/sysconf.gperf ============================================================================== --- head/usr.bin/getconf/sysconf.gperf Fri Sep 15 22:40:57 2017 (r323630) +++ head/usr.bin/getconf/sysconf.gperf Fri Sep 15 22:55:15 2017 (r323631) @@ -147,3 +147,14 @@ find_sysconf(const char *name, int *key) } return 0; } + +void +foreach_sysconf(void (*func)(const char *, int)) +{ + const struct map *mp; + + for (mp = wordlist; mp->name != NULL; mp++) { + if (mp->valid) + func(mp->name, mp->key); + } +} From owner-svn-src-head@freebsd.org Fri Sep 15 22:56:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE226E0FB10; Fri, 15 Sep 2017 22:56:40 +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 8BFD480ED9; Fri, 15 Sep 2017 22:56:40 +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 v8FMudVg016907; Fri, 15 Sep 2017 22:56:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FMudhu016906; Fri, 15 Sep 2017 22:56:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709152256.v8FMudhu016906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 15 Sep 2017 22:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323632 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 323632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Sep 2017 22:56:40 -0000 Author: jhb Date: Fri Sep 15 22:56:39 2017 New Revision: 323632 URL: https://svnweb.freebsd.org/changeset/base/323632 Log: Add missing newline after unknown MIPS-specific dynamic entries. Reviewed by: emaste Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D12384 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Sep 15 22:55:15 2017 (r323631) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Sep 15 22:56:39 2017 (r323632) @@ -2695,6 +2695,9 @@ dump_arch_dyn_val(struct readelf *re, GElf_Dyn *dyn) case DT_MIPS_TIME_STAMP: printf(" %s\n", timestamp(dyn->d_un.d_val)); break; + default: + printf("\n"); + break; } break; default: From owner-svn-src-head@freebsd.org Sat Sep 16 02:41:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 344D9E1E404; Sat, 16 Sep 2017 02:41:41 +0000 (UTC) (envelope-from shurd@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 E30CD3954; Sat, 16 Sep 2017 02:41:40 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8G2feiQ008808; Sat, 16 Sep 2017 02:41:40 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8G2fdGN008798; Sat, 16 Sep 2017 02:41:39 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709160241.v8G2fdGN008798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 16 Sep 2017 02:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323635 - in head/sys: dev/bnxt dev/e1000 kern net sys X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/sys: dev/bnxt dev/e1000 kern net sys X-SVN-Commit-Revision: 323635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 02:41:41 -0000 Author: shurd Date: Sat Sep 16 02:41:38 2017 New Revision: 323635 URL: https://svnweb.freebsd.org/changeset/base/323635 Log: Revert r323516 (iflib rollup) This was really too big of a commit even if everything worked, but there are multiple new issues introduced in the one huge commit, so it's not worth keeping this until it's fixed. I'll work on splitting this up into logical chunks and introduce them one at a time over the next week or two. Approved by: sbruno (mentor) Sponsored by: Limelight Networks Modified: head/sys/dev/bnxt/if_bnxt.c head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_i210.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/em_txrx.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c head/sys/net/iflib.h head/sys/net/mp_ring.c head/sys/sys/gtaskqueue.h Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/bnxt/if_bnxt.c Sat Sep 16 02:41:38 2017 (r323635) @@ -1640,8 +1640,7 @@ bnxt_msix_intr_assign(if_ctx_t ctx, int msix) } for (i=0; iscctx->isc_ntxqsets; i++) - /* TODO: Benchmark and see if tying to the RX irqs helps */ - iflib_softirq_alloc_generic(ctx, -1, IFLIB_INTR_TX, NULL, i, + iflib_softirq_alloc_generic(ctx, i + 1, IFLIB_INTR_TX, NULL, i, "tx_cp"); return rc; Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_80003es2lan.c Sat Sep 16 02:41:38 2017 (r323635) @@ -59,6 +59,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw); static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw); static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw); +static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex); static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw); static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw); @@ -67,6 +68,7 @@ static s32 e1000_read_kmrn_reg_80003es2lan(struct e10 static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); +static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); @@ -297,7 +299,7 @@ static s32 e1000_acquire_phy_80003es2lan(struct e1000_ DEBUGFUNC("e1000_acquire_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - return e1000_acquire_swfw_sync(hw, mask); + return e1000_acquire_swfw_sync_80003es2lan(hw, mask); } /** @@ -313,7 +315,7 @@ static void e1000_release_phy_80003es2lan(struct e1000 DEBUGFUNC("e1000_release_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - e1000_release_swfw_sync(hw, mask); + e1000_release_swfw_sync_80003es2lan(hw, mask); } /** @@ -331,7 +333,7 @@ static s32 e1000_acquire_mac_csr_80003es2lan(struct e1 mask = E1000_SWFW_CSR_SM; - return e1000_acquire_swfw_sync(hw, mask); + return e1000_acquire_swfw_sync_80003es2lan(hw, mask); } /** @@ -348,7 +350,7 @@ static void e1000_release_mac_csr_80003es2lan(struct e mask = E1000_SWFW_CSR_SM; - e1000_release_swfw_sync(hw, mask); + e1000_release_swfw_sync_80003es2lan(hw, mask); } /** @@ -363,14 +365,14 @@ static s32 e1000_acquire_nvm_80003es2lan(struct e1000_ DEBUGFUNC("e1000_acquire_nvm_80003es2lan"); - ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); if (ret_val) return ret_val; ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) - e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); return ret_val; } @@ -386,7 +388,78 @@ static void e1000_release_nvm_80003es2lan(struct e1000 DEBUGFUNC("e1000_release_nvm_80003es2lan"); e1000_release_nvm_generic(hw); - e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); +} + +/** + * e1000_acquire_swfw_sync_80003es2lan - Acquire SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Acquire the SW/FW semaphore to access the PHY or NVM. The mask + * will also specify which port we're acquiring the lock for. + **/ +static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + u32 swmask = mask; + u32 fwmask = mask << 16; + s32 i = 0; + s32 timeout = 50; + + DEBUGFUNC("e1000_acquire_swfw_sync_80003es2lan"); + + while (i < timeout) { + if (e1000_get_hw_semaphore_generic(hw)) + return -E1000_ERR_SWFW_SYNC; + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + if (!(swfw_sync & (fwmask | swmask))) + break; + + /* Firmware currently using resource (fwmask) + * or other software thread using resource (swmask) + */ + e1000_put_hw_semaphore_generic(hw); + msec_delay_irq(5); + i++; + } + + if (i == timeout) { + DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); + return -E1000_ERR_SWFW_SYNC; + } + + swfw_sync |= swmask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); + + return E1000_SUCCESS; +} + +/** + * e1000_release_swfw_sync_80003es2lan - Release SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Release the SW/FW semaphore used to access the PHY or NVM. The mask + * will also specify which port we're releasing the lock for. + **/ +static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + + DEBUGFUNC("e1000_release_swfw_sync_80003es2lan"); + + while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) + ; /* Empty */ + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + swfw_sync &= ~mask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); } /** Modified: head/sys/dev/e1000/e1000_82571.c ============================================================================== --- head/sys/dev/e1000/e1000_82571.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_82571.c Sat Sep 16 02:41:38 2017 (r323635) @@ -70,8 +70,11 @@ static s32 e1000_check_for_serdes_link_82571(struct e static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw); static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data); static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw); +static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw); static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); +static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); +static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, @@ -122,8 +125,8 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw phy->ops.get_cable_length = e1000_get_cable_length_igp_2; phy->ops.read_reg = e1000_read_phy_reg_igp; phy->ops.write_reg = e1000_write_phy_reg_igp; - phy->ops.acquire = e1000_get_hw_semaphore; - phy->ops.release = e1000_put_hw_semaphore; + phy->ops.acquire = e1000_get_hw_semaphore_82571; + phy->ops.release = e1000_put_hw_semaphore_82571; break; case e1000_82573: phy->type = e1000_phy_m88; @@ -135,11 +138,12 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw phy->ops.get_cable_length = e1000_get_cable_length_m88; phy->ops.read_reg = e1000_read_phy_reg_m88; phy->ops.write_reg = e1000_write_phy_reg_m88; - phy->ops.acquire = e1000_get_hw_semaphore; - phy->ops.release = e1000_put_hw_semaphore; + phy->ops.acquire = e1000_get_hw_semaphore_82571; + phy->ops.release = e1000_put_hw_semaphore_82571; break; case e1000_82574: case e1000_82583: + E1000_MUTEX_INIT(&hw->dev_spec._82571.swflag_mutex); phy->type = e1000_phy_bm; phy->ops.get_cfg_done = e1000_get_cfg_done_generic; @@ -502,21 +506,99 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) } /** - * e1000_get_hw_semaphore_82574 - Acquire hardware semaphore + * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore * @hw: pointer to the HW structure * + * Acquire the HW semaphore to access the PHY or NVM + **/ +static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) +{ + u32 swsm; + s32 sw_timeout = hw->nvm.word_size + 1; + s32 fw_timeout = hw->nvm.word_size + 1; + s32 i = 0; + + DEBUGFUNC("e1000_get_hw_semaphore_82571"); + + /* If we have timedout 3 times on trying to acquire + * the inter-port SMBI semaphore, there is old code + * operating on the other port, and it is not + * releasing SMBI. Modify the number of times that + * we try for the semaphore to interwork with this + * older code. + */ + if (hw->dev_spec._82571.smb_counter > 2) + sw_timeout = 1; + + /* Get the SW semaphore */ + while (i < sw_timeout) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + i++; + } + + if (i == sw_timeout) { + DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); + hw->dev_spec._82571.smb_counter++; + } + /* Get the FW semaphore. */ + for (i = 0; i < fw_timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); + + /* Semaphore acquired if bit latched */ + if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) + break; + + usec_delay(50); + } + + if (i == fw_timeout) { + /* Release semaphores */ + e1000_put_hw_semaphore_82571(hw); + DEBUGOUT("Driver can't access the NVM\n"); + return -E1000_ERR_NVM; + } + + return E1000_SUCCESS; +} + +/** + * e1000_put_hw_semaphore_82571 - Release hardware semaphore + * @hw: pointer to the HW structure + * + * Release hardware semaphore used to access the PHY or NVM + **/ +static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw) +{ + u32 swsm; + + DEBUGFUNC("e1000_put_hw_semaphore_generic"); + + swsm = E1000_READ_REG(hw, E1000_SWSM); + + swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); + + E1000_WRITE_REG(hw, E1000_SWSM, swsm); +} + +/** + * e1000_get_hw_semaphore_82573 - Acquire hardware semaphore + * @hw: pointer to the HW structure + * * Acquire the HW semaphore during reset. * **/ -static s32 -e1000_get_hw_semaphore_82574(struct e1000_hw *hw) +static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) { u32 extcnf_ctrl; s32 i = 0; - /* XXX assert that mutex is held */ + DEBUGFUNC("e1000_get_hw_semaphore_82573"); - ASSERT_CTX_LOCK_HELD(hw); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); do { extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; @@ -532,7 +614,7 @@ e1000_get_hw_semaphore_82574(struct e1000_hw *hw) if (i == MDIO_OWNERSHIP_TIMEOUT) { /* Release semaphores */ - e1000_put_hw_semaphore_82574(hw); + e1000_put_hw_semaphore_82573(hw); DEBUGOUT("Driver can't access the PHY\n"); return -E1000_ERR_PHY; } @@ -541,18 +623,17 @@ e1000_get_hw_semaphore_82574(struct e1000_hw *hw) } /** - * e1000_put_hw_semaphore_82574 - Release hardware semaphore + * e1000_put_hw_semaphore_82573 - Release hardware semaphore * @hw: pointer to the HW structure * * Release hardware semaphore used during reset. * **/ -static void -e1000_put_hw_semaphore_82574(struct e1000_hw *hw) +static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw) { u32 extcnf_ctrl; - DEBUGFUNC("e1000_put_hw_semaphore_82574"); + DEBUGFUNC("e1000_put_hw_semaphore_82573"); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); extcnf_ctrl &= ~E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; @@ -560,6 +641,41 @@ e1000_put_hw_semaphore_82574(struct e1000_hw *hw) } /** + * e1000_get_hw_semaphore_82574 - Acquire hardware semaphore + * @hw: pointer to the HW structure + * + * Acquire the HW semaphore to access the PHY or NVM. + * + **/ +static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw) +{ + s32 ret_val; + + DEBUGFUNC("e1000_get_hw_semaphore_82574"); + + E1000_MUTEX_LOCK(&hw->dev_spec._82571.swflag_mutex); + ret_val = e1000_get_hw_semaphore_82573(hw); + if (ret_val) + E1000_MUTEX_UNLOCK(&hw->dev_spec._82571.swflag_mutex); + return ret_val; +} + +/** + * e1000_put_hw_semaphore_82574 - Release hardware semaphore + * @hw: pointer to the HW structure + * + * Release hardware semaphore used to access the PHY or NVM + * + **/ +static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw) +{ + DEBUGFUNC("e1000_put_hw_semaphore_82574"); + + e1000_put_hw_semaphore_82573(hw); + E1000_MUTEX_UNLOCK(&hw->dev_spec._82571.swflag_mutex); +} + +/** * e1000_set_d0_lplu_state_82574 - Set Low Power Linkup D0 state * @hw: pointer to the HW structure * @active: TRUE to enable LPLU, FALSE to disable @@ -630,7 +746,7 @@ static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw DEBUGFUNC("e1000_acquire_nvm_82571"); - ret_val = e1000_get_hw_semaphore(hw); + ret_val = e1000_get_hw_semaphore_82571(hw); if (ret_val) return ret_val; @@ -643,7 +759,7 @@ static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw } if (ret_val) - e1000_put_hw_semaphore(hw); + e1000_put_hw_semaphore_82571(hw); return ret_val; } @@ -659,7 +775,7 @@ static void e1000_release_nvm_82571(struct e1000_hw *h DEBUGFUNC("e1000_release_nvm_82571"); e1000_release_nvm_generic(hw); - e1000_put_hw_semaphore(hw); + e1000_put_hw_semaphore_82571(hw); } /** @@ -976,6 +1092,8 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) */ switch (hw->mac.type) { case e1000_82573: + ret_val = e1000_get_hw_semaphore_82573(hw); + break; case e1000_82574: case e1000_82583: ret_val = e1000_get_hw_semaphore_82574(hw); @@ -992,6 +1110,10 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) /* Must release MDIO ownership and mutex after MAC reset. */ switch (hw->mac.type) { case e1000_82573: + /* Release mutex only if the hw semaphore is acquired */ + if (!ret_val) + e1000_put_hw_semaphore_82573(hw); + break; case e1000_82574: case e1000_82583: /* Release mutex only if the hw semaphore is acquired */ @@ -999,7 +1121,6 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) e1000_put_hw_semaphore_82574(hw); break; default: - panic("unknown mac type %x\n", hw->mac.type); break; } Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_82575.c Sat Sep 16 02:41:38 2017 (r323635) @@ -79,9 +79,11 @@ static s32 e1000_valid_led_default_82575(struct e1000 static s32 e1000_write_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset, u16 data); static void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw); +static s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask); static s32 e1000_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw, u16 *speed, u16 *duplex); static s32 e1000_get_phy_id_82575(struct e1000_hw *hw); +static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask); static bool e1000_sgmii_active_82575(struct e1000_hw *hw); static s32 e1000_reset_init_script_82575(struct e1000_hw *hw); static s32 e1000_read_mac_addr_82575(struct e1000_hw *hw); @@ -509,8 +511,12 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw /* link info */ mac->ops.get_link_up_info = e1000_get_link_up_info_82575; /* acquire SW_FW sync */ - mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync; - mac->ops.release_swfw_sync = e1000_release_swfw_sync; + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_82575; + mac->ops.release_swfw_sync = e1000_release_swfw_sync_82575; + if (mac->type >= e1000_i210) { + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_i210; + mac->ops.release_swfw_sync = e1000_release_swfw_sync_i210; + } /* set lan id for port to determine which phy lock to use */ hw->mac.ops.set_lan_id(hw); @@ -982,7 +988,7 @@ static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw DEBUGFUNC("e1000_acquire_nvm_82575"); - ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); if (ret_val) goto out; @@ -1013,7 +1019,7 @@ static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) - e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); out: return ret_val; @@ -1032,7 +1038,83 @@ static void e1000_release_nvm_82575(struct e1000_hw *h e1000_release_nvm_generic(hw); - e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); +} + +/** + * e1000_acquire_swfw_sync_82575 - Acquire SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Acquire the SW/FW semaphore to access the PHY or NVM. The mask + * will also specify which port we're acquiring the lock for. + **/ +static s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + u32 swmask = mask; + u32 fwmask = mask << 16; + s32 ret_val = E1000_SUCCESS; + s32 i = 0, timeout = 200; + + DEBUGFUNC("e1000_acquire_swfw_sync_82575"); + + while (i < timeout) { + if (e1000_get_hw_semaphore_generic(hw)) { + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + if (!(swfw_sync & (fwmask | swmask))) + break; + + /* + * Firmware currently using resource (fwmask) + * or other software thread using resource (swmask) + */ + e1000_put_hw_semaphore_generic(hw); + msec_delay_irq(5); + i++; + } + + if (i == timeout) { + DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync |= swmask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); + +out: + return ret_val; +} + +/** + * e1000_release_swfw_sync_82575 - Release SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Release the SW/FW semaphore used to access the PHY or NVM. The mask + * will also specify which port we're releasing the lock for. + **/ +static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + + DEBUGFUNC("e1000_release_swfw_sync_82575"); + + while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) + ; /* Empty */ + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + swfw_sync &= ~mask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); } /** Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_hw.h Sat Sep 16 02:41:38 2017 (r323635) @@ -934,6 +934,7 @@ struct e1000_dev_spec_82543 { struct e1000_dev_spec_82571 { bool laa_is_present; u32 smb_counter; + E1000_MUTEX swflag_mutex; }; struct e1000_dev_spec_80003es2lan { @@ -957,6 +958,8 @@ enum e1000_ulp_state { struct e1000_dev_spec_ich8lan { bool kmrn_lock_loss_workaround_enabled; struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS]; + E1000_MUTEX nvm_mutex; + E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; bool disable_k1_off; bool eee_disable; Modified: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- head/sys/dev/e1000/e1000_i210.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_i210.c Sat Sep 16 02:41:38 2017 (r323635) @@ -37,6 +37,7 @@ static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw); static void e1000_release_nvm_i210(struct e1000_hw *hw); +static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw); static s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); static s32 e1000_pool_flash_update_done_i210(struct e1000_hw *hw); @@ -57,7 +58,7 @@ static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw) DEBUGFUNC("e1000_acquire_nvm_i210"); - ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM); + ret_val = e1000_acquire_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); return ret_val; } @@ -73,7 +74,152 @@ static void e1000_release_nvm_i210(struct e1000_hw *hw { DEBUGFUNC("e1000_release_nvm_i210"); - e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM); + e1000_release_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); +} + +/** + * e1000_acquire_swfw_sync_i210 - Acquire SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Acquire the SW/FW semaphore to access the PHY or NVM. The mask + * will also specify which port we're acquiring the lock for. + **/ +s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + u32 swmask = mask; + u32 fwmask = mask << 16; + s32 ret_val = E1000_SUCCESS; + s32 i = 0, timeout = 200; /* FIXME: find real value to use here */ + + DEBUGFUNC("e1000_acquire_swfw_sync_i210"); + + while (i < timeout) { + if (e1000_get_hw_semaphore_i210(hw)) { + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + if (!(swfw_sync & (fwmask | swmask))) + break; + + /* + * Firmware currently using resource (fwmask) + * or other software thread using resource (swmask) + */ + e1000_put_hw_semaphore_generic(hw); + msec_delay_irq(5); + i++; + } + + if (i == timeout) { + DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync |= swmask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); + +out: + return ret_val; +} + +/** + * e1000_release_swfw_sync_i210 - Release SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Release the SW/FW semaphore used to access the PHY or NVM. The mask + * will also specify which port we're releasing the lock for. + **/ +void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + + DEBUGFUNC("e1000_release_swfw_sync_i210"); + + while (e1000_get_hw_semaphore_i210(hw) != E1000_SUCCESS) + ; /* Empty */ + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + swfw_sync &= ~mask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_generic(hw); +} + +/** + * e1000_get_hw_semaphore_i210 - Acquire hardware semaphore + * @hw: pointer to the HW structure + * + * Acquire the HW semaphore to access the PHY or NVM + **/ +static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw) +{ + u32 swsm; + s32 timeout = hw->nvm.word_size + 1; + s32 i = 0; + + DEBUGFUNC("e1000_get_hw_semaphore_i210"); + + /* Get the SW semaphore */ + while (i < timeout) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + i++; + } + + if (i == timeout) { + /* In rare circumstances, the SW semaphore may already be held + * unintentionally. Clear the semaphore once before giving up. + */ + if (hw->dev_spec._82575.clear_semaphore_once) { + hw->dev_spec._82575.clear_semaphore_once = FALSE; + e1000_put_hw_semaphore_generic(hw); + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + } + } + + /* If we do not have the semaphore here, we have to give up. */ + if (i == timeout) { + DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); + return -E1000_ERR_NVM; + } + } + + /* Get the FW semaphore. */ + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); + + /* Semaphore acquired if bit latched */ + if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) + break; + + usec_delay(50); + } + + if (i == timeout) { + /* Release semaphores */ + e1000_put_hw_semaphore_generic(hw); + DEBUGOUT("Driver can't access the NVM\n"); + return -E1000_ERR_NVM; + } + + return E1000_SUCCESS; } /** Modified: head/sys/dev/e1000/e1000_i210.h ============================================================================== --- head/sys/dev/e1000/e1000_i210.h Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_i210.h Sat Sep 16 02:41:38 2017 (r323635) @@ -43,6 +43,8 @@ s32 e1000_write_nvm_srwr_i210(struct e1000_hw *hw, u16 u16 words, u16 *data); s32 e1000_read_nvm_srrd_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); +s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask); +void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask); s32 e1000_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 *data); s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_ich8lan.c Sat Sep 16 02:41:38 2017 (r323635) @@ -694,6 +694,9 @@ static s32 e1000_init_nvm_params_ich8lan(struct e1000_ dev_spec->shadow_ram[i].value = 0xFFFF; } + E1000_MUTEX_INIT(&dev_spec->nvm_mutex); + E1000_MUTEX_INIT(&dev_spec->swflag_mutex); + /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; @@ -1844,7 +1847,7 @@ static s32 e1000_acquire_nvm_ich8lan(struct e1000_hw * { DEBUGFUNC("e1000_acquire_nvm_ich8lan"); - ASSERT_CTX_LOCK_HELD(hw); + E1000_MUTEX_LOCK(&hw->dev_spec.ich8lan.nvm_mutex); return E1000_SUCCESS; } @@ -1859,7 +1862,9 @@ static void e1000_release_nvm_ich8lan(struct e1000_hw { DEBUGFUNC("e1000_release_nvm_ich8lan"); - ASSERT_CTX_LOCK_HELD(hw); + E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.nvm_mutex); + + return; } /** @@ -1876,7 +1881,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_h DEBUGFUNC("e1000_acquire_swflag_ich8lan"); - ASSERT_CTX_LOCK_HELD(hw); + E1000_MUTEX_LOCK(&hw->dev_spec.ich8lan.swflag_mutex); while (timeout) { extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); @@ -1917,6 +1922,9 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_h } out: + if (ret_val) + E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); + return ret_val; } @@ -1941,6 +1949,10 @@ static void e1000_release_swflag_ich8lan(struct e1000_ } else { DEBUGOUT("Semaphore unexpectedly released by sw/fw/hw\n"); } + + E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); + + return; } /** @@ -5010,6 +5022,8 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) E1000_WRITE_REG(hw, E1000_FEXTNVM3, reg); } + if (!ret_val) + E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex); if (ctrl & E1000_CTRL_PHY_RST) { ret_val = hw->phy.ops.get_cfg_done(hw); Modified: head/sys/dev/e1000/e1000_mac.c ============================================================================== --- head/sys/dev/e1000/e1000_mac.c Sat Sep 16 02:32:00 2017 (r323634) +++ head/sys/dev/e1000/e1000_mac.c Sat Sep 16 02:41:38 2017 (r323635) @@ -1707,6 +1707,76 @@ s32 e1000_get_speed_and_duplex_fiber_serdes_generic(st } /** + * e1000_get_hw_semaphore_generic - Acquire hardware semaphore + * @hw: pointer to the HW structure + * + * Acquire the HW semaphore to access the PHY or NVM + **/ +s32 e1000_get_hw_semaphore_generic(struct e1000_hw *hw) +{ + u32 swsm; + s32 timeout = hw->nvm.word_size + 1; + s32 i = 0; + + DEBUGFUNC("e1000_get_hw_semaphore_generic"); + + /* Get the SW semaphore */ + while (i < timeout) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + i++; + } + + if (i == timeout) { + DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); + return -E1000_ERR_NVM; + } + + /* Get the FW semaphore. */ + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); + + /* Semaphore acquired if bit latched */ + if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) + break; + + usec_delay(50); + } + + if (i == timeout) { + /* Release semaphores */ + e1000_put_hw_semaphore_generic(hw); + DEBUGOUT("Driver can't access the NVM\n"); + return -E1000_ERR_NVM; + } + + return E1000_SUCCESS; +} + +/** + * e1000_put_hw_semaphore_generic - Release hardware semaphore + * @hw: pointer to the HW structure + * + * Release hardware semaphore used to access the PHY or NVM + **/ +void e1000_put_hw_semaphore_generic(struct e1000_hw *hw) +{ + u32 swsm; + + DEBUGFUNC("e1000_put_hw_semaphore_generic"); + + swsm = E1000_READ_REG(hw, E1000_SWSM); + + swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); + + E1000_WRITE_REG(hw, E1000_SWSM, swsm); +} + +/** * e1000_get_auto_rd_done_generic - Check for auto read completion * @hw: pointer to the HW structure * @@ -2181,186 +2251,3 @@ s32 e1000_write_8bit_ctrl_reg_generic(struct e1000_hw return E1000_SUCCESS; } - -/** - * e1000_get_hw_semaphore - Acquire hardware semaphore - * @hw: pointer to the HW structure - * - * Acquire the HW semaphore to access the PHY or NVM - **/ -s32 e1000_get_hw_semaphore(struct e1000_hw *hw) -{ - u32 swsm; - s32 timeout = hw->nvm.word_size + 1; - s32 i = 0; - - DEBUGFUNC("e1000_get_hw_semaphore"); -#ifdef notyet - /* _82571 */ - /* If we have timedout 3 times on trying to acquire - * the inter-port SMBI semaphore, there is old code - * operating on the other port, and it is not - * releasing SMBI. Modify the number of times that - * we try for the semaphore to interwork with this - * older code. - */ - if (hw->dev_spec._82571.smb_counter > 2) - sw_timeout = 1; - -#endif - /* Get the SW semaphore */ - while (i < timeout) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - i++; - } - - if (i == timeout) { -#ifdef notyet - /* - * XXX This sounds more like a driver bug whereby we either - * recursed accidentally or missed clearing it previously - */ - /* In rare circumstances, the SW semaphore may already be held - * unintentionally. Clear the semaphore once before giving up. - */ - if (hw->dev_spec._82575.clear_semaphore_once) { - hw->dev_spec._82575.clear_semaphore_once = FALSE; - e1000_put_hw_semaphore_generic(hw); - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - } - } -#endif - - DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); - return -E1000_ERR_NVM; - } - - /* Get the FW semaphore. */ - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); - - /* Semaphore acquired if bit latched */ - if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) - break; - - usec_delay(50); - } - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Sep 16 03:46:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 504A0E22654; Sat, 16 Sep 2017 03:46:49 +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 8361A65309; Sat, 16 Sep 2017 03:46:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id F04FC10408E; Sat, 16 Sep 2017 13:46:38 +1000 (AEST) Date: Sat, 16 Sep 2017 13:46:37 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Scott Long cc: Sean Bruno , Stephen Hurd , Cy Schubert , Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys In-Reply-To: <1EBD0641-002D-409C-B18E-AAB5FCDECEBA@samsco.org> Message-ID: <20170916124826.P1107@besplex.bde.org> References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> <1EBD0641-002D-409C-B18E-AAB5FCDECEBA@samsco.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.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=NZlVo5omRyg7tE8A30gA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 03:46:49 -0000 On Fri, 15 Sep 2017, Scott Long wrote: >> On Sep 13, 2017, at 9:12 AM, Sean Bruno wrote: >> >>>>> #blamebruno A large burden. >>>>> Reviewed by: sbruno >>>>> Approved by: sbruno (mentor) >>>>> Sponsored by: Limelight Networks >>>>> Differential Revision: https://reviews.freebsd.org/D12235 >>>> >>>> *gasps at the LoC count and number of changed drivers* >>>> >>>> Could someone please better break this up in the future..? >> >> This ridiculous loc was due to the amount of restructuring needed to get >> us back to being in sync with our development. The future will not have >> this big of a commit/change and should be more bite/fun sized. >> >> The #blamebruno tag in the commit log was to indicate that this was not >> something Stephen was doing on his own, but was something that I had >> induced over the last few months during testing. > > This breaks my system. I prior to this commit, I had igb0 and igb1. Now I > only have igb0, and it\xe2]x80\x99s like igb1 isn\xe2\x80\x99tt even trying to attach. Unfortunately, > this breaks my nfsroot setup, so I need to roll back my tree. Please let me > know if there\xe2\x80\x99ss anything I can provide to help debugging. It gives lesser breakage here: - with an old PCI em, an error that occur every few makeworlds over nfs now hang the hardware. It used to be recovered from afger about 10 seconds. This only happened once. I then applied my old fix which ignores the error better so as to recover from it immediately. This seems to work as before. - with a newer PCI-e em, throughput as measured by netblast is down by more that a factor of 2 since last month. Bruce From owner-svn-src-head@freebsd.org Sat Sep 16 03:53:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C201AE22DEB; Sat, 16 Sep 2017 03:53:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::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 840886580D; Sat, 16 Sep 2017 03:53:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x231.google.com with SMTP id w204so4341628itc.4; Fri, 15 Sep 2017 20:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=xnMBt/KHKqPjLh9bBLC+XP+QOMfVcU4VuyP85Avppek=; b=gYD6j0sbXbvoDpxpnMaSAY/kHuCNjZlMIyxhRYFugJgL00fasekUvy/0b7+D/OUnle cShtQ6mSGYGscLpIi9/kuBTIPAj4I+uSJ1cIQeSPhU+nvj5V1y6AgvmEGX4RzIu7U56g InXQ3OlaXfO1W/SaGztPwj3+0MBtD7KUsLKiE1ZAmVbYBb+xwb6tUiLZyxphLIzZBsK9 Kyr8z/Nt+atOdi6W3LN7TRmY396QkYPUhfkovpXon7pEz7Tg+sH6nGgOvo/8CQ2IWSQI ckL3seDPwTo3FBSZJspC954IIhobWOMvOcaNV4QVcFjo3dZ/ADZ37u/M/57hQRg9Uvfc Bw8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=xnMBt/KHKqPjLh9bBLC+XP+QOMfVcU4VuyP85Avppek=; b=Bj8oyLa4bSEPXzijOptThlt7Bav3salT/gH67XtajHa+sAQ+MrJ4PXIbK2/Zl+WqoW 7szzMiaTdtvCNjl9ec7wTFnni1fXyNxjf9nTDT6Lnfl3a8U0UirHeucxVAUW1FAtMgCY yDgk70YT1HPRcHhfVJabiCZTc78LLfw9s4VtkAtqOh7w5DKn5bCsIdOh8ofVnFG/r3uk aL0og5Dl68F83qL1bOpyhgspLlnNNhXTavCYWRppUx6aZcYpUrvVe+teQBWLn4yv94cm o7nhIz1mffPz1EC0IpwZ45tDNcSTqet+Pi/8ugQaITIaIjN0HZuEoJMQtvRi10tZSvaa Vedw== X-Gm-Message-State: AHPjjUiKSX3uE8zsxsYIcqQ/fWGdD4VTCr/Nhum4Z7B1Y92plDNT+IOY Pxzql6Gtc7NnaQOY9JYFhlVoQnmW X-Google-Smtp-Source: AOwi7QBakEK8BgoXThbV3EKWXRAULETAhRAeujIk89npErxVKBgbCPBNMEVik+IxNxOxH84WIrBC/g== X-Received: by 10.36.253.130 with SMTP id m124mr8607832ith.105.1505534013540; Fri, 15 Sep 2017 20:53:33 -0700 (PDT) Received: from [172.20.1.25] (50-207-206-10-static.hfc.comcastbusiness.net. [50.207.206.10]) by smtp.gmail.com with ESMTPSA id m15sm1238724iod.85.2017.09.15.20.53.32 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Sep 2017 20:53:32 -0700 (PDT) Subject: Re: svn commit: r323635 - in head/sys: dev/bnxt dev/e1000 kern net sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_116A50DD-9916-471B-A567-939ECE4934BF"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201709160241.v8G2fdGN008798@repo.freebsd.org> Date: Fri, 15 Sep 2017 20:53:30 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4C93AF31-E16D-42E5-9C6E-79695EB95302@gmail.com> References: <201709160241.v8G2fdGN008798@repo.freebsd.org> To: Stephen Hurd X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 03:53:34 -0000 --Apple-Mail=_116A50DD-9916-471B-A567-939ECE4934BF Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Sep 15, 2017, at 19:41, Stephen Hurd wrote: > > Author: shurd > Date: Sat Sep 16 02:41:38 2017 > New Revision: 323635 > URL: https://svnweb.freebsd.org/changeset/base/323635 > > Log: > Revert r323516 (iflib rollup) > > This was really too big of a commit even if everything worked, but there > are multiple new issues introduced in the one huge commit, so it's not > worth keeping this until it's fixed. > > I'll work on splitting this up into logical chunks and introduce them one > at a time over the next week or two. Thank you, -Ngie --Apple-Mail=_116A50DD-9916-471B-A567-939ECE4934BF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZvKA7AAoJEPWDqSZpMIYVOmMP/RBDv/fX2zDDTKE1Uu6Zss6B S13Le+Zy4zYsHgtTpV7oWRITuwQcSeQ8WBAzJoFypd/+z3X33LvWweg/oduzsJXg WrrfM22vbeSw1klcg9X3R5mqrd6EhxHZD2eMeM+KnDhKiC02c5qcoG0IQYH37+QM MmRK3cZ+nZhYpOcljFYIoMNrX4k8lwlXTJ/fHSQAHbUJ1utP1pceBYkKcuTMHp9l +X7LmrRxRk+Aj2GkJOMR63DEqDQqYmfkv1I+bkAgJIyiazYdW59L3gLQalFOUShp wy1jqDsbhoK6T1K+EzW397grK+88Ek/x5U4tpRYuUS631WU6tJd+n4aE2s6Qf6uK DKAkIznPyR5AlZXyGdObwXE0xzs73gvKo4A513Lc+Gw/BFCgGn50aVFLcrjVcOMf RKjLrrvswyRRSzhBokF90hG/CbqjkpthsE542WQn7K46Hq4KTbiIIFGfUDgifTSz 3rtccXuRUfeyUMZHkvOeIkmRXR4gOYP1fVuOVM5c/hNGk6+Wl4e1rMW4lCCmJuW0 2795jCcto+fvxqE9bkBWog8EfdAv+l+tbQ2q8K7UCiv2XFZnwXCGi/NAGubnaR6L QdUMUbtO8Or7YONj25RAoUVrvlyz7QSl7ACpHNZuu9F+eGtUcLjzM0SqMcmc7Yr6 992HGQYFqxK54I1nSAh1 =eMxH -----END PGP SIGNATURE----- --Apple-Mail=_116A50DD-9916-471B-A567-939ECE4934BF-- From owner-svn-src-head@freebsd.org Sat Sep 16 05:42:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01F9AE01DCD; Sat, 16 Sep 2017 05:42:29 +0000 (UTC) (envelope-from sjg@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 B6BAD697EB; Sat, 16 Sep 2017 05:42:28 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8G5gRt3084557; Sat, 16 Sep 2017 05:42:27 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8G5gROb084552; Sat, 16 Sep 2017 05:42:27 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201709160542.v8G5gROb084552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 16 Sep 2017 05:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323637 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 323637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 05:42:29 -0000 Author: sjg Date: Sat Sep 16 05:42:27 2017 New Revision: 323637 URL: https://svnweb.freebsd.org/changeset/base/323637 Log: Use OBJS_SRCS_FILTER to control setting OBJS from SRCS Some makefiles do reachover builds. In some cases it is convenient to list subdirs of the distribution in SRCS. It is not very convenient, or always even desirable to have corresponding subdirs in .OBJDIR, so OBJS_SRCS_FILTER allows the makefile to choose. The default value 'R' matches existing practice. But a makefile can set OBJS_SRCS_FILTER= T (the R gets added by bsd.init.mk) to avoid the need for subdirs in .OBJDIR Differential Revision: https://reviews.freebsd.org/D12218 Reviewed by: bdrewery Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.init.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Sep 16 03:54:20 2017 (r323636) +++ head/share/mk/bsd.dep.mk Sat Sep 16 05:42:27 2017 (r323637) @@ -101,7 +101,7 @@ _SKIP_DEPEND= 1 CLEANFILES?= .for _S in ${SRCS:N*.[dhly]} -OBJS_DEPEND_GUESS.${_S:R}.o+= ${_S} +OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.o+= ${_S} .endfor # Lexical analyzers @@ -180,7 +180,7 @@ DEPEND_MP?= -MP DEPEND_FILTER= C,/,_,g DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} .if !empty(DEPENDSRCS) -DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} +DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} .if defined(_SKIP_DEPEND) Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Sat Sep 16 03:54:20 2017 (r323636) +++ head/share/mk/bsd.init.mk Sat Sep 16 05:42:27 2017 (r323637) @@ -16,6 +16,10 @@ ____: .include .MAIN: all +# This is used in bsd.{dep,lib,prog}.mk as ${OBJS_SRCS_FILTER:ts:} +# Some makefiles may want T as well to avoid nested objdirs. +OBJS_SRCS_FILTER+= R + # Handle INSTALL_AS_USER here to maximize the chance that # it has final authority over fooOWN and fooGRP. .if ${MK_INSTALL_AS_USER} != "no" Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Sat Sep 16 03:54:20 2017 (r323636) +++ head/share/mk/bsd.lib.mk Sat Sep 16 05:42:27 2017 (r323637) @@ -168,7 +168,7 @@ LDFLAGS+= -Wl,--version-script=${VERSION_MAP} .endif .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) -OBJS+= ${SRCS:N*.h:R:S/$/.o/} +OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/} CLEANFILES+= ${OBJS} ${STATICOBJS} .endif @@ -437,13 +437,13 @@ lint: ${SRCS:M*.c} .if defined(LIB) && !empty(LIB) OBJS_DEPEND_GUESS+= ${SRCS:M*.h} .for _S in ${SRCS:N*.[hly]} -OBJS_DEPEND_GUESS.${_S:R}.po+= ${_S} +OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.po+= ${_S} .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) .for _S in ${SRCS:N*.[hly]} -OBJS_DEPEND_GUESS.${_S:R}.pico+= ${_S} +OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.pico+= ${_S} .endfor .endif Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Sat Sep 16 03:54:20 2017 (r323636) +++ head/share/mk/bsd.prog.mk Sat Sep 16 05:42:27 2017 (r323637) @@ -85,7 +85,7 @@ PROGNAME?= ${PROG} .if defined(SRCS) -OBJS+= ${SRCS:N*.h:R:S/$/.o/g} +OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g} .if target(beforelinking) beforelinking: ${OBJS} From owner-svn-src-head@freebsd.org Sat Sep 16 09:02:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 676F9E096F5; Sat, 16 Sep 2017 09:02:16 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:375::1:5]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23EAD6EF2D; Sat, 16 Sep 2017 09:02:16 +0000 (UTC) (envelope-from Alexander@leidinger.net) Date: Sat, 16 Sep 2017 11:01:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1505552533; bh=qOQsaBIXZOgHyFpYwGIOcL/mY4If6d/UADEq5Im1NOc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bVIdlpHpgiB3GNQkvr3tU3ncaUTMC56j7bCVrcWOwJDgFyeKs93An//JiyhG99ytg tQ2mAd7Z0Rv5jX3e90e545Pn5wnrH4zxaNeM7JUauQ74AK337Pk2S7NvkCwZX/oUuU tzpCo8vPizi9p/LCl3O0DV+9DJ2yftW18m+Cv26c+ymXAyXLl1QpshHqK6487gUPjZ 4Q+qoXk/Fs0PxX3Mo1kLBmog10ycakYFwd1845ACtwijvMY6g2lE7546kOHpukQ3w6 O1Py0CJwGtYURMgaIX6CMH4If2NU1rPvBbwU8bwtpiuCvr8wQO4iJnZHjPn684dQUF uHrvyhvWt6jwA== Message-ID: <20170916110159.Horde.lN4uQjj9fb7hJ2309eQrexb@webmail.leidinger.net> From: Alexander Leidinger To: Bruce Evans Cc: Scott Long , Sean Bruno , Stephen Hurd , Cy Schubert , Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> <1EBD0641-002D-409C-B18E-AAB5FCDECEBA@samsco.org> <20170916124826.P1107@besplex.bde.org> In-Reply-To: <20170916124826.P1107@besplex.bde.org> User-Agent: Horde Application Framework 5 Content-Type: multipart/signed; boundary="=_nIWceyOrArqQ53GMu70I5Wd"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 09:02:16 -0000 This message is in MIME format and has been PGP signed. --=_nIWceyOrArqQ53GMu70I5Wd Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Bruce Evans (from Sat, 16 Sep 2017=20=20 13:46:37=20+1000 (EST)): > It gives lesser breakage here: > - with an old PCI em, an error that occur every few makeworlds over nfs n= ow > hang the hardware. It used to be recovered from afger about 10 seconds= . > This only happened once. I then applied my old fix which ignores the > error better so as to recover from it immediately. This seems to work = as > before. As I also have an em device which switches into non-working state:=20=20 what's=20the patch you have for this? I would like to see if your change=20= =20 also=20helps my device to get back into working shape again. Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_nIWceyOrArqQ53GMu70I5Wd Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJZvOiHAAoJEKrxQhqFIICEoeIP/3wbaz5uWTSmcEY2UE6IOiRv /Qs3S6xjMvRMTb0h8FUwXPPr1/tPVrXGoD6YoDXFkNI1ad4bTKesP1fUoDrb9gjN 4S+a5JCZcTVKUlMRt5HriVL5R9fcW7AWvvieca+nLz8pSPqJ7h7kcTb+piBsufgG 38ELg01lF2NzXW7ecMW9b0wMtUOx1vfwW13X5TspsVyzsSXZIDgrjoJk2uvigWuq 4N/ytSBScX/W7WO2jgmyqvQ8LYkdBbR9xRjLDU2DwoaPXR8xWmEA8sf9fsLeraa6 0Ox7jCwSKiV2wc6tf2N8WfWOFC7wlnkh6TVzvRn9GY4s+I98tDGdmNtagGFCL41V d3Uvzkw9kkiyZnQthf3qZozIyKs9E3N7/n8YGvtqndOmeGaYpCbu1wtsAfW1tqOE gQbdnexEfkp6mUC7lQl+4eHFAQQQ21/XaEKCTsxArVy8j+rHqiYGv9dnbRQEvnlD ZuyqtsQr5AwjlCslIv11h97jHl7+6oN+CH+8dmOPModwISEuRYuWSYD9ygc3cW0Y VGgTIAcHo1f9v1jCtJJujZVu1V5lFFdrAUWnar8ph6P7b1Lbt/1eaS6msuXxKW6t qpnzzriuAHHOqHBW4zRwlpiynfnKbr2ltMv0umgvvRFVDp+eXmlsayI4AxZbeh1o KKiKUeg/UxlEq+Tjwj26 =RLD2 -----END PGP SIGNATURE----- --=_nIWceyOrArqQ53GMu70I5Wd-- From owner-svn-src-head@freebsd.org Sat Sep 16 09:41:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22EA7E0B251; Sat, 16 Sep 2017 09:41:30 +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 AB56A6FE88; Sat, 16 Sep 2017 09:41:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 0DD8FD44E1C; Sat, 16 Sep 2017 19:41:18 +1000 (AEST) Date: Sat, 16 Sep 2017 19:41:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Leidinger cc: Bruce Evans , Scott Long , Sean Bruno , Stephen Hurd , Cy Schubert , Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys In-Reply-To: <20170916110159.Horde.lN4uQjj9fb7hJ2309eQrexb@webmail.leidinger.net> Message-ID: <20170916192800.E14782@besplex.bde.org> References: <201709130711.v8D7BlTS003204@slippy.cwsent.com> <48654d1f-4cc7-da05-7a73-ef538b431560@freebsd.org> <1EBD0641-002D-409C-B18E-AAB5FCDECEBA@samsco.org> <20170916124826.P1107@besplex.bde.org> <20170916110159.Horde.lN4uQjj9fb7hJ2309eQrexb@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=MlaUAiCI1E6xVCer72cA:9 a=CjuIK1q_8ugA:10 X-Mailman-Approved-At: Sat, 16 Sep 2017 10:17:23 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 09:41:30 -0000 On Sat, 16 Sep 2017, Alexander Leidinger wrote: > Quoting Bruce Evans (from Sat, 16 Sep 2017 13:46:37 > +1000 (EST)): > >> It gives lesser breakage here: >> - with an old PCI em, an error that occur every few makeworlds over nfs now >> hang the hardware. It used to be recovered from afger about 10 seconds. >> This only happened once. I then applied my old fix which ignores the >> error better so as to recover from it immediately. This seems to work as >> before. > > As I also have an em device which switches into non-working state: what's the > patch you have for this? I would like to see if your change also helps my > device to get back into working shape again. X Index: em_txrx.c X =================================================================== X --- em_txrx.c (revision 323636) X +++ em_txrx.c (working copy) X @@ -640,9 +640,20 @@ X X /* Make sure bad packets are discarded */ X if (errors & E1000_RXD_ERR_FRAME_ERR_MASK) { X +#if 0 X adapter->dropped_pkts++; X - /* XXX fixup if common */ X return (EBADMSG); X +#else X + /* X + * XXX the above error handling is worse than none. X + * First it it drops 'i' packets before the current X + * one and doesn't count them. Then it returns an X + * error. iflib can't really handle this error. X + * It just resets, and this usually drops many more X + * packets (without counting them) and much time. X + */ X + printf("lem: frame error: ignored\n"); X +#endif X } X X ri->iri_frags[i].irf_flid = 0; This is for old em. nfs doesn't seem to notice the dropped packet(s) after this. I think the comment "fixup if common" means "this error should actually be handled if it occurs enough to matter". I removed the increment of the dropped packet count because with the change none are dropped directly here. I think the error is just for this packet but more than 1 packet might be dropped by returning in the old code, but debugging code seem to show no more than 1 packet at a time having an error. I think returning drops good packets after the bad one together with leaving the state inconsistent, and it takes almost a reset to recover. X @@ -703,8 +714,12 @@ X X /* Make sure bad packets are discarded */ X if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) { X +#if 0 X adapter->dropped_pkts++; X return EBADMSG; X +#else X + printf("em: frame error: ignored\n"); X +#endif X } X X ri->iri_frags[i].irf_flid = 0; This is for newer em. I haven't noticed any problems with that (except it has 27 usec higher latency). Bruce From owner-svn-src-head@freebsd.org Sat Sep 16 11:51:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7264AE116BB for ; Sat, 16 Sep 2017 11:51:59 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::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 EB5A5737FB for ; Sat, 16 Sep 2017 11:51:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-lf0-x230.google.com with SMTP id l196so4490515lfl.1 for ; Sat, 16 Sep 2017 04:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EjZwzs9q3qejFXwY07qVCJdlOaaa65yERySyYNIJJi4=; b=EnOc78JOqxXbfz4M7bVfpYW6PzmamcUrvF9VIkva3pM+JzB4JooQUX8rUQuuEhWfNV ZOSSGQxwMUZfVmKEATEXlYqlQmBFWsuhRCFmA3CKHhk9EuDrXaCKaIuuJKTyU2WuWO/P 2DKG6LTFOwSxcNythO/3CsSY+A7zBQvDfivMtUC+DKrtoLrzrgoDzopwzcE1++lgUxFX rL4dKtqR+xsx2P2+PRhIAJNBXKB6IbOIZ/DDHzHWbjf7cJW+hj9SzN5lrHKlBzxmY6QH FDhwcst4I5LOoOKXTPTRy2gYMcUWNofopoXA/vxkD8w84+MWVcZ4po0AHjsT1S/D4E3e 3n8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EjZwzs9q3qejFXwY07qVCJdlOaaa65yERySyYNIJJi4=; b=IVLrNQa134OKVl2317OY1u3Yec1ZeaQ9CBDMpoakN2HX1rDj7fwdOQaE4l8GMpaa60 7KRY7jPQnUu6+dlSbzFPwMHi8/SCG0P4LoNFo3rbj7JBDNU+FbiKlPKqtcUGL/dsc/UY FCCnZHFPVeyQNmMuIg9pD30opSGTd2ZfIOwJ1BCLMgmVz1OCjB0euUc00iIK6sezV1P/ hLRgGgfGJJ0gQU8G3HT5oHY8Puo3WarQUV5bt564sf4e1NEKbHJ7U6NT22khZwBrgGn2 oSfyNdKymnk+uEFmfhVS1/PjsObs5Bl0UPt0mo/pqAiSFmqaWK8jOVHRg6NsSXL44o/O LkAA== X-Gm-Message-State: AHPjjUiYVbn5eMafqj8GJsdx7oq8wwkGHYa7xHPI4FzrscSY6/i8F6wN 01pWN25h4E7aRhXVqJLRld7X/efxjkJuZ3P05kvYYA== X-Google-Smtp-Source: AOwi7QDghaPMAKvj1pPtvaOL3R2AU+25iTPq3XeI0vBsvdztRF9cEFdT0YkatM9mV+GKnqcA7O9+ko4lxP8N5qF1S4M= X-Received: by 10.25.92.68 with SMTP id q65mr1517680lfb.206.1505562716897; Sat, 16 Sep 2017 04:51:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.142.68 with HTTP; Sat, 16 Sep 2017 04:51:26 -0700 (PDT) In-Reply-To: <20170915115819.GA22099@stack.nl> References: <201709050746.v857kjX9032212@repo.freebsd.org> <20170915115819.GA22099@stack.nl> From: Ed Schouten Date: Sat, 16 Sep 2017 12:51:26 +0100 Message-ID: Subject: Re: svn commit: r323177 - in head: sys/compat/cloudabi sys/contrib/cloudabi usr.bin/truss To: Jilles Tjoelker Cc: src-committers , 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.23 Precedence: list List-Id: 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, 16 Sep 2017 11:51:59 -0000 Hi Jilles, 2017-09-15 12:58 GMT+01:00 Jilles Tjoelker : > Although this is correct from a functionality point of view (S_IFIFO and > S_IFSOCK are probably expected to be different in a POSIX context, but > this is unlikely to break anything that is not already broken), it is a > partial reversal of previous changes to FreeBSD that created separate > implementations for pipes (first unnamed pipes in 1996, later fifos in > 2012 r232055). The main reason for these changes was performance. > > Unfortunately, I do not have concrete benchmarks in the CloudABI > context. That is important to keep in mind indeed. Thanks for pointing this out! When I discussed this with some of the other folks working on CloudABI, we came to the conclusion that this (potential) loss of performance is acceptable in the nearby future. If it would really affect us negatively, it should in theory be possible to reimplement our streaming sockets and pipes with something as simple and fast as FreeBSD's pipes, but still support file descriptor passing, etc. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Sat Sep 16 14:08:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63D89E18BAB; Sat, 16 Sep 2017 14:08:21 +0000 (UTC) (envelope-from manu@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 3DFF17743E; Sat, 16 Sep 2017 14:08:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GE8K14090094; Sat, 16 Sep 2017 14:08:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GE8KEX090093; Sat, 16 Sep 2017 14:08:20 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201709161408.v8GE8KEX090093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 16 Sep 2017 14:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323639 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 323639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 14:08:21 -0000 Author: manu Date: Sat Sep 16 14:08:20 2017 New Revision: 323639 URL: https://svnweb.freebsd.org/changeset/base/323639 Log: Allwinner: a10_gpio Fix panic on multiple lock r323392 introduce gpio_pin_get/gpio_pin_set for a10_gpio driver. When called via gpio method they must aquire the device lock while when they are called via gpio_pin_configure the lock is already aquire. Introduce a10_gpio_pin_{s,g}et_locked and call them in pin_gpio_configure instead. Tested On: BananaPi (A20) Reported by: Richard Puga richard@puga.net Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Sep 16 13:49:26 2017 (r323638) +++ head/sys/arm/allwinner/a10_gpio.c Sat Sep 16 14:08:20 2017 (r323639) @@ -197,6 +197,8 @@ struct a10_gpio_softc { static int a10_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value); static int a10_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); +static int a10_gpio_pin_get_locked(struct a10_gpio_softc *sc, uint32_t pin, unsigned int *value); +static int a10_gpio_pin_set_locked(struct a10_gpio_softc *sc, uint32_t pin, unsigned int value); #define A10_GPIO_WRITE(_sc, _off, _val) \ bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) @@ -333,15 +335,15 @@ a10_gpio_pin_configure(struct a10_gpio_softc *sc, uint err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); } else if (flags & GPIO_PIN_OUTPUT) { if (flags & GPIO_PIN_PRESET_LOW) { - a10_gpio_pin_set(sc->sc_dev, pin, 0); + a10_gpio_pin_set_locked(sc, pin, 0); } else if (flags & GPIO_PIN_PRESET_HIGH) { - a10_gpio_pin_set(sc->sc_dev, pin, 1); + a10_gpio_pin_set_locked(sc, pin, 1); } else { /* Read the pin and preset output to current state. */ err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); if (err == 0) { - a10_gpio_pin_get(sc->sc_dev, pin, &val); - a10_gpio_pin_set(sc->sc_dev, pin, val); + a10_gpio_pin_get_locked(sc, pin, &val); + a10_gpio_pin_set_locked(sc, pin, val); } } if (err == 0) @@ -473,49 +475,77 @@ a10_gpio_pin_setflags(device_t dev, uint32_t pin, uint } static int -a10_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) +a10_gpio_pin_set_locked(struct a10_gpio_softc *sc, uint32_t pin, + unsigned int value) { - struct a10_gpio_softc *sc; uint32_t bank, data; - sc = device_get_softc(dev); + A10_GPIO_LOCK_ASSERT(sc); + if (pin > sc->padconf->npins) return (EINVAL); bank = sc->padconf->pins[pin].port; pin = sc->padconf->pins[pin].pin; - A10_GPIO_LOCK(sc); data = A10_GPIO_READ(sc, A10_GPIO_GP_DAT(bank)); if (value) data |= (1 << pin); else data &= ~(1 << pin); A10_GPIO_WRITE(sc, A10_GPIO_GP_DAT(bank), data); - A10_GPIO_UNLOCK(sc); return (0); } static int -a10_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) +a10_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) { struct a10_gpio_softc *sc; - uint32_t bank, reg_data; + int ret; sc = device_get_softc(dev); + + A10_GPIO_LOCK(sc); + ret = a10_gpio_pin_set_locked(sc, pin, value); + A10_GPIO_UNLOCK(sc); + + return (ret); +} + +static int +a10_gpio_pin_get_locked(struct a10_gpio_softc *sc,uint32_t pin, + unsigned int *val) +{ + uint32_t bank, reg_data; + + A10_GPIO_LOCK_ASSERT(sc); + if (pin > sc->padconf->npins) return (EINVAL); bank = sc->padconf->pins[pin].port; pin = sc->padconf->pins[pin].pin; - A10_GPIO_LOCK(sc); reg_data = A10_GPIO_READ(sc, A10_GPIO_GP_DAT(bank)); - A10_GPIO_UNLOCK(sc); *val = (reg_data & (1 << pin)) ? 1 : 0; return (0); +} + +static int +a10_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) +{ + struct a10_gpio_softc *sc; + int ret; + + sc = device_get_softc(dev); + + A10_GPIO_LOCK(sc); + ret = a10_gpio_pin_get_locked(sc, pin, val); + A10_GPIO_UNLOCK(sc); + + return (ret); } static int From owner-svn-src-head@freebsd.org Sat Sep 16 15:50:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54FB7E1E1A2; Sat, 16 Sep 2017 15:50:33 +0000 (UTC) (envelope-from manu@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 2400C7E107; Sat, 16 Sep 2017 15:50:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GFoW85030754; Sat, 16 Sep 2017 15:50:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GFoWfv030753; Sat, 16 Sep 2017 15:50:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201709161550.v8GFoWfv030753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 16 Sep 2017 15:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323640 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 323640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 15:50:33 -0000 Author: manu Date: Sat Sep 16 15:50:31 2017 New Revision: 323640 URL: https://svnweb.freebsd.org/changeset/base/323640 Log: A64 CCUNG: Correct gate and reset for OHCI0/1 Reported by: jmcneill Pointy Hat: manu Modified: head/sys/arm/allwinner/clkng/ccu_a64.c Modified: head/sys/arm/allwinner/clkng/ccu_a64.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a64.c Sat Sep 16 14:08:20 2017 (r323639) +++ head/sys/arm/allwinner/clkng/ccu_a64.c Sat Sep 16 15:50:31 2017 (r323640) @@ -66,8 +66,8 @@ static struct aw_ccung_reset a64_ccu_resets[] = { CCU_RESET(A64_RST_BUS_OTG, 0x2c0, 23) CCU_RESET(A64_RST_BUS_EHCI0, 0x2c0, 24) CCU_RESET(A64_RST_BUS_EHCI1, 0x2c0, 25) - CCU_RESET(A64_RST_BUS_OHCI0, 0x2c0, 26) - CCU_RESET(A64_RST_BUS_OHCI1, 0x2c0, 27) + CCU_RESET(A64_RST_BUS_OHCI0, 0x2c0, 28) + CCU_RESET(A64_RST_BUS_OHCI1, 0x2c0, 29) CCU_RESET(A64_RST_BUS_VE, 0x2c4, 0) CCU_RESET(A64_RST_BUS_TCON0, 0x2c4, 3) @@ -119,8 +119,8 @@ static struct aw_ccung_gate a64_ccu_gates[] = { CCU_GATE(A64_CLK_BUS_OTG, "bus-otg", "ahb1", 0x60, 23) CCU_GATE(A64_CLK_BUS_EHCI0, "bus-ehci0", "ahb1", 0x60, 24) CCU_GATE(A64_CLK_BUS_EHCI1, "bus-ehci1", "ahb2", 0x60, 25) - CCU_GATE(A64_CLK_BUS_OHCI0, "bus-ohci0", "ahb1", 0x60, 26) - CCU_GATE(A64_CLK_BUS_OHCI1, "bus-ohci1", "ahb2", 0x60, 27) + CCU_GATE(A64_CLK_BUS_OHCI0, "bus-ohci0", "ahb1", 0x60, 28) + CCU_GATE(A64_CLK_BUS_OHCI1, "bus-ohci1", "ahb2", 0x60, 29) CCU_GATE(A64_CLK_BUS_VE, "bus-ve", "ahb1", 0x64, 0) CCU_GATE(A64_CLK_BUS_TCON0, "bus-tcon0", "ahb1", 0x64, 3) From owner-svn-src-head@freebsd.org Sat Sep 16 15:58:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 227FBE1E992; Sat, 16 Sep 2017 15:58:22 +0000 (UTC) (envelope-from manu@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 ED34C7E5BD; Sat, 16 Sep 2017 15:58:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GFwKj1034866; Sat, 16 Sep 2017 15:58:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GFwKfj034865; Sat, 16 Sep 2017 15:58:20 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201709161558.v8GFwKfj034865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 16 Sep 2017 15:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323641 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 323641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 15:58:22 -0000 Author: manu Date: Sat Sep 16 15:58:20 2017 New Revision: 323641 URL: https://svnweb.freebsd.org/changeset/base/323641 Log: Allwinner usb phy: Rework resource allocation The usbphy node for allwinner have two kind of resources, one for the phy_ctrl and one per phy. Instead of blindy allocating resources, alloc the phy_ctrl and pmu ones separately. Also add a configuration struct for all different phy that hold the difference between them (number of phys, unknow needed register write etc ...). While here remove A83T code as upstream and FreeBSD dts don't have nodes for USB. This (plus 323640) re-enable OHCI on Pine64 on the bottom USB port. The top USB port is routed to the OHCI0/EHCI0 which is by default in OTG mode. While the phy code can handle the re-route to standard OHCI/EHCI we still need a driver for musb to probe and configure it in host mode. EHCI is still buggy on Pine64 (hang the board) so do not enable it for now. Tested On: Bananapi (A20), BananapiM2 (A31S), OrangePi One (H3) Pine64 (A64) Modified: head/sys/arm/allwinner/aw_usbphy.c Modified: head/sys/arm/allwinner/aw_usbphy.c ============================================================================== --- head/sys/arm/allwinner/aw_usbphy.c Sat Sep 16 15:50:31 2017 (r323640) +++ head/sys/arm/allwinner/aw_usbphy.c Sat Sep 16 15:58:20 2017 (r323641) @@ -53,53 +53,90 @@ __FBSDID("$FreeBSD$"); #include "phy_if.h" -#define USBPHY_NPHYS 4 -#define USBPHY_NRES USBPHY_NPHYS - enum awusbphy_type { AWUSBPHY_TYPE_A10 = 1, AWUSBPHY_TYPE_A13, AWUSBPHY_TYPE_A20, AWUSBPHY_TYPE_A31, - AWUSBPHY_TYPE_A83T, AWUSBPHY_TYPE_H3, AWUSBPHY_TYPE_A64 }; +struct aw_usbphy_conf { + int num_phys; + enum awusbphy_type phy_type; + bool pmu_unk1; + bool phy0_route; +}; + +static const struct aw_usbphy_conf a10_usbphy_conf = { + .num_phys = 3, + .phy_type = AWUSBPHY_TYPE_A10, + .pmu_unk1 = false, + .phy0_route = false, +}; + +static const struct aw_usbphy_conf a13_usbphy_conf = { + .num_phys = 2, + .phy_type = AWUSBPHY_TYPE_A13, + .pmu_unk1 = false, + .phy0_route = false, +}; + +static const struct aw_usbphy_conf a20_usbphy_conf = { + .num_phys = 3, + .phy_type = AWUSBPHY_TYPE_A20, + .pmu_unk1 = false, + .phy0_route = false, +}; + +static const struct aw_usbphy_conf a31_usbphy_conf = { + .num_phys = 3, + .phy_type = AWUSBPHY_TYPE_A31, + .pmu_unk1 = false, + .phy0_route = false, +}; + +static const struct aw_usbphy_conf h3_usbphy_conf = { + .num_phys = 4, + .phy_type = AWUSBPHY_TYPE_H3, + .pmu_unk1 = true, + .phy0_route = false, +}; + +static const struct aw_usbphy_conf a64_usbphy_conf = { + .num_phys = 2, + .phy_type = AWUSBPHY_TYPE_A64, + .pmu_unk1 = true, + .phy0_route = true, +}; + static struct ofw_compat_data compat_data[] = { - { "allwinner,sun4i-a10-usb-phy", AWUSBPHY_TYPE_A10 }, - { "allwinner,sun5i-a13-usb-phy", AWUSBPHY_TYPE_A13 }, - { "allwinner,sun6i-a31-usb-phy", AWUSBPHY_TYPE_A31 }, - { "allwinner,sun7i-a20-usb-phy", AWUSBPHY_TYPE_A20 }, - { "allwinner,sun8i-a83t-usb-phy", AWUSBPHY_TYPE_A83T }, - { "allwinner,sun8i-h3-usb-phy", AWUSBPHY_TYPE_H3 }, - { "allwinner,sun50i-a64-usb-phy", AWUSBPHY_TYPE_A64 }, + { "allwinner,sun4i-a10-usb-phy", (uintptr_t)&a10_usbphy_conf }, + { "allwinner,sun5i-a13-usb-phy", (uintptr_t)&a13_usbphy_conf }, + { "allwinner,sun6i-a31-usb-phy", (uintptr_t)&a31_usbphy_conf }, + { "allwinner,sun7i-a20-usb-phy", (uintptr_t)&a20_usbphy_conf }, + { "allwinner,sun8i-h3-usb-phy", (uintptr_t)&h3_usbphy_conf }, + { "allwinner,sun50i-a64-usb-phy", (uintptr_t)&a64_usbphy_conf }, { NULL, 0 } }; struct awusbphy_softc { - struct resource * res[USBPHY_NRES]; - regulator_t reg[USBPHY_NPHYS]; + struct resource * phy_ctrl; + struct resource ** pmu; + regulator_t * reg; gpio_pin_t id_det_pin; int id_det_valid; gpio_pin_t vbus_det_pin; int vbus_det_valid; - enum awusbphy_type phy_type; + struct aw_usbphy_conf *phy_conf; }; -static struct resource_spec awusbphy_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { SYS_RES_MEMORY, 1, RF_ACTIVE }, - { SYS_RES_MEMORY, 2, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_MEMORY, 3, RF_ACTIVE | RF_OPTIONAL }, - { -1, 0 } -}; +#define RD4(res, o) bus_read_4(res, (o)) +#define WR4(res, o, v) bus_write_4(res, (o), (v)) +#define CLR4(res, o, m) WR4(res, o, RD4(res, o) & ~(m)) +#define SET4(res, o, m) WR4(res, o, RD4(res, o) | (m)) -#define RD4(sc, i, o) bus_read_4((sc)->res[(i)], (o)) -#define WR4(sc, i, o, v) bus_write_4((sc)->res[(i)], (o), (v)) -#define CLR4(sc, i, o, m) WR4(sc, i, o, RD4(sc, i, o) & ~(m)) -#define SET4(sc, i, o, m) WR4(sc, i, o, RD4(sc, i, o) | (m)) - #define OTG_PHY_CFG 0x20 #define OTG_PHY_ROUTE_OTG (1 << 0) #define PMU_IRQ_ENABLE 0x00 @@ -117,24 +154,21 @@ awusbphy_configure(device_t dev, int phyno) sc = device_get_softc(dev); - if (sc->res[phyno] == NULL) + if (sc->pmu[phyno] == NULL) return; - if (sc->phy_type == AWUSBPHY_TYPE_A64) { - CLR4(sc, phyno, PMU_UNK_H3, PMU_UNK_H3_CLR); + if (sc->phy_conf->pmu_unk1 == true) + CLR4(sc->phy_ctrl, PMU_UNK_H3, PMU_UNK_H3_CLR); - /* EHCI0 and OTG share a PHY */ + if (sc->phy_conf->phy0_route == true) { if (phyno == 0) - SET4(sc, 0, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); - else if (phyno == 1) - CLR4(sc, 0, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); + SET4(sc->phy_ctrl, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); + else + CLR4(sc->phy_ctrl, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); } - if (phyno > 0) { - /* Enable passby */ - SET4(sc, phyno, PMU_IRQ_ENABLE, PMU_ULPI_BYPASS | - PMU_AHB_INCR8 | PMU_AHB_INCR4 | PMU_AHB_INCRX_ALIGN); - } + SET4(sc->pmu[phyno], PMU_IRQ_ENABLE, PMU_ULPI_BYPASS | + PMU_AHB_INCR8 | PMU_AHB_INCR4 | PMU_AHB_INCRX_ALIGN); } static int @@ -143,7 +177,7 @@ awusbphy_init(device_t dev) struct awusbphy_softc *sc; phandle_t node; char pname[20]; - int error, off; + int error, off, rid; regulator_t reg; hwreset_t rst; clk_t clk; @@ -151,8 +185,20 @@ awusbphy_init(device_t dev) sc = device_get_softc(dev); node = ofw_bus_get_node(dev); - sc->phy_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + sc->phy_conf = (struct aw_usbphy_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + /* Get phy_ctrl region */ + if (ofw_bus_find_string_index(node, "reg-names", "phy_ctrl", &rid) != 0) { + device_printf(dev, "Cannot locate phy control resource\n"); + return (ENXIO); + } + sc->phy_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->phy_ctrl == NULL) { + device_printf(dev, "Cannot allocate resource\n"); + return (ENXIO); + } + /* Enable clocks */ for (off = 0; clk_get_by_ofw_index(dev, 0, off, &clk) == 0; off++) { error = clk_enable(clk); @@ -173,13 +219,6 @@ awusbphy_init(device_t dev) } } - /* Get regulators */ - for (off = 0; off < USBPHY_NPHYS; off++) { - snprintf(pname, sizeof(pname), "usb%d_vbus-supply", off); - if (regulator_get_by_ofw_property(dev, 0, pname, ®) == 0) - sc->reg[off] = reg; - } - /* Get GPIOs */ error = gpio_pin_get_by_ofw_property(dev, node, "usb0_id_det-gpios", &sc->id_det_pin); @@ -190,10 +229,29 @@ awusbphy_init(device_t dev) if (error == 0) sc->vbus_det_valid = 1; - /* Allocate resources */ - if (bus_alloc_resources(dev, awusbphy_spec, sc->res) != 0) - device_printf(dev, "couldn't allocate resources\n"); + sc->reg = malloc(sizeof(*(sc->reg)) * sc->phy_conf->num_phys, M_DEVBUF, + M_WAITOK | M_ZERO); + sc->pmu = malloc(sizeof(*(sc->pmu)) * sc->phy_conf->num_phys, M_DEVBUF, + M_WAITOK | M_ZERO); + /* Get regulators */ + for (off = 0; off < sc->phy_conf->num_phys; off++) { + snprintf(pname, sizeof(pname), "usb%d_vbus-supply", off); + if (regulator_get_by_ofw_property(dev, 0, pname, ®) == 0) + sc->reg[off] = reg; + snprintf(pname, sizeof(pname), "pmu%d", off); + if (ofw_bus_find_string_index(node, "reg-names", + pname, &rid) != 0) + continue; + + sc->pmu[off] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->pmu[off] == NULL) { + device_printf(dev, "Cannot allocate resource\n"); + return (ENXIO); + } + } + return (0); } @@ -225,10 +283,10 @@ awusbphy_phy_enable(device_t dev, intptr_t phy, bool e regulator_t reg; int error, vbus_det; - if (phy < 0 || phy >= USBPHY_NPHYS) - return (ERANGE); - sc = device_get_softc(dev); + + if (phy < 0 || phy >= sc->phy_conf->num_phys) + return (ERANGE); /* Configure PHY */ awusbphy_configure(dev, phy); From owner-svn-src-head@freebsd.org Sat Sep 16 16:09:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F23FE1F24C; Sat, 16 Sep 2017 16:09:07 +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 EA24C7EB18; Sat, 16 Sep 2017 16:09:06 +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 v8GG96ud038802; Sat, 16 Sep 2017 16:09:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GG95ft038796; Sat, 16 Sep 2017 16:09:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709161609.v8GG95ft038796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 16 Sep 2017 16:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323642 - in head/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Commit-Revision: 323642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 16:09:07 -0000 Author: ian Date: Sat Sep 16 16:09:05 2017 New Revision: 323642 URL: https://svnweb.freebsd.org/changeset/base/323642 Log: Add a missing header file to SRCS to fix out-of-kernel builds. PR: 222354 Submitted by: eugen@ Pointy hat: ian@ Modified: head/sys/modules/i2c/ds1307/Makefile head/sys/modules/i2c/ds13rtc/Makefile head/sys/modules/i2c/ds3231/Makefile head/sys/modules/i2c/isl12xx/Makefile head/sys/modules/i2c/nxprtc/Makefile head/sys/modules/i2c/s35390a/Makefile Modified: head/sys/modules/i2c/ds1307/Makefile ============================================================================== --- head/sys/modules/i2c/ds1307/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/ds1307/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds1307 -SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: head/sys/modules/i2c/ds13rtc/Makefile ============================================================================== --- head/sys/modules/i2c/ds13rtc/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/ds13rtc/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds13rtc -SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: head/sys/modules/i2c/ds3231/Makefile ============================================================================== --- head/sys/modules/i2c/ds3231/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/ds3231/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds3231 -SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: head/sys/modules/i2c/isl12xx/Makefile ============================================================================== --- head/sys/modules/i2c/isl12xx/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/isl12xx/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = isl12xx -SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: head/sys/modules/i2c/nxprtc/Makefile ============================================================================== --- head/sys/modules/i2c/nxprtc/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/nxprtc/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = nxprtc -SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: head/sys/modules/i2c/s35390a/Makefile ============================================================================== --- head/sys/modules/i2c/s35390a/Makefile Sat Sep 16 15:58:20 2017 (r323641) +++ head/sys/modules/i2c/s35390a/Makefile Sat Sep 16 16:09:05 2017 (r323642) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = s35390a -SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include From owner-svn-src-head@freebsd.org Sat Sep 16 16:23:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24675E1FE4B; Sat, 16 Sep 2017 16:23:02 +0000 (UTC) (envelope-from allanjude@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 E7A307F574; Sat, 16 Sep 2017 16:23:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GGN1Al047006; Sat, 16 Sep 2017 16:23:01 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GGN1Qb047005; Sat, 16 Sep 2017 16:23:01 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201709161623.v8GGN1Qb047005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 16 Sep 2017 16:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323645 - head/sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sbin/sysctl X-SVN-Commit-Revision: 323645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 16:23:02 -0000 Author: allanjude Date: Sat Sep 16 16:23:00 2017 New Revision: 323645 URL: https://svnweb.freebsd.org/changeset/base/323645 Log: kern.osreldate is an integer, not a string PR: 217501 Submitted by: Yavuz Tanriverdi MFC after: 1 week Modified: head/sbin/sysctl/sysctl.8 Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Sat Sep 16 16:17:08 2017 (r323644) +++ head/sbin/sysctl/sysctl.8 Sat Sep 16 16:23:00 2017 (r323645) @@ -214,7 +214,7 @@ String and integer values can be set using .It "kern.filedelay integer yes" .It "kern.dirdelay integer yes" .It "kern.metadelay integer yes" -.It "kern.osreldate string no" +.It "kern.osreldate integer no" .It "kern.bootfile string yes" .It "kern.corefile string yes" .It "kern.logsigexit integer yes" From owner-svn-src-head@freebsd.org Sat Sep 16 17:50:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DEC0E246F8; Sat, 16 Sep 2017 17:50:26 +0000 (UTC) (envelope-from oshogbo@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 D115F82AE7; Sat, 16 Sep 2017 17:50:25 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GHoOi0082411; Sat, 16 Sep 2017 17:50:24 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GHoOoH082410; Sat, 16 Sep 2017 17:50:24 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709161750.v8GHoOoH082410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 16 Sep 2017 17:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323654 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 323654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 17:50:26 -0000 Author: oshogbo Date: Sat Sep 16 17:50:24 2017 New Revision: 323654 URL: https://svnweb.freebsd.org/changeset/base/323654 Log: Fix names of the array functions in the nv man page. Submitted by: def@ MFC after: 1 week Modified: head/share/man/man9/nv.9 Modified: head/share/man/man9/nv.9 ============================================================================== --- head/share/man/man9/nv.9 Sat Sep 16 16:37:18 2017 (r323653) +++ head/share/man/man9/nv.9 Sat Sep 16 17:50:24 2017 (r323654) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2015 +.Dd September 16, 2017 .Dt NV 9 .Os .Sh NAME @@ -201,11 +201,11 @@ .Ft "const bool *" .Fn nvlist_get_bool_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const uint64_t *" -.Fn nvlist_get_number "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_number_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const char * const *" -.Fn nvlist_get_string "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_string_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t * const *" -.Fn nvlist_get_nvlist "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_nvlist_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const int *" .Fn nvlist_get_descriptor_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t *" @@ -230,13 +230,13 @@ .Ft "bool *" .Fn nvlist_take_bool_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "uint64_t **" -.Fn nvlist_take_number "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_number_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "char **" -.Fn nvlist_take_string "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_string_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "nvlist_t **" -.Fn nvlist_take_nvlist "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_nvlist_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "int *" -.Fn nvlist_take_descriptor "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_descriptor_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .\" .Ft void .Fn nvlist_free "nvlist_t *nvl" "const char *name" From owner-svn-src-head@freebsd.org Sat Sep 16 17:52:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35DB4E2497F; Sat, 16 Sep 2017 17:52:26 +0000 (UTC) (envelope-from oshogbo@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 125D182E7D; Sat, 16 Sep 2017 17:52:26 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GHqPBT086250; Sat, 16 Sep 2017 17:52:25 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GHqP5V086249; Sat, 16 Sep 2017 17:52:25 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709161752.v8GHqP5V086249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 16 Sep 2017 17:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323655 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 323655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 17:52:26 -0000 Author: oshogbo Date: Sat Sep 16 17:52:25 2017 New Revision: 323655 URL: https://svnweb.freebsd.org/changeset/base/323655 Log: Add missing links to the nv man page. MFC after: 1 week Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Sat Sep 16 17:50:24 2017 (r323654) +++ head/share/man/man9/Makefile Sat Sep 16 17:52:25 2017 (r323655) @@ -1316,13 +1316,18 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist.9 \ nv.9 nvlist_add_binary.9 \ nv.9 nvlist_add_bool.9 \ + nv.9 nvlist_add_bool_array.9 \ nv.9 nvlist_add_descriptor.9 \ + nv.9 nvlist_add_descriptor_array.9 \ nv.9 nvlist_add_null.9 \ nv.9 nvlist_add_number.9 \ + nv.9 nvlist_add_number_array.9 \ nv.9 nvlist_add_nvlist.9 \ + nv.9 nvlist_add_nvlist_array.9 \ nv.9 nvlist_add_string.9 \ nv.9 nvlist_add_stringf.9 \ nv.9 nvlist_add_stringv.9 \ + nv.9 nvlist_add_string_array.9 \ nv.9 nvlist_clone.9 \ nv.9 nvlist_create.9 \ nv.9 nvlist_destroy.9 \ @@ -1332,10 +1337,14 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_exists.9 \ nv.9 nvlist_exists_binary.9 \ nv.9 nvlist_exists_bool.9 \ + nv.9 nvlist_exists_bool_array.9 \ nv.9 nvlist_exists_descriptor.9 \ + nv.9 nvlist_exists_descriptor_array.9 \ nv.9 nvlist_exists_null.9 \ nv.9 nvlist_exists_number.9 \ + nv.9 nvlist_exists_number_array.9 \ nv.9 nvlist_exists_nvlist.9 \ + nv.9 nvlist_exists_nvlist_array.9 \ nv.9 nvlist_exists_string.9 \ nv.9 nvlist_exists_type.9 \ nv.9 nvlist_fdump.9 \ @@ -1343,23 +1352,36 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_free.9 \ nv.9 nvlist_free_binary.9 \ nv.9 nvlist_free_bool.9 \ + nv.9 nvlist_free_bool_array.9 \ nv.9 nvlist_free_descriptor.9 \ + nv.9 nvlist_free_descriptor_array.9 \ nv.9 nvlist_free_null.9 \ nv.9 nvlist_free_number.9 \ + nv.9 nvlist_free_number_array.9 \ nv.9 nvlist_free_nvlist.9 \ + nv.9 nvlist_free_nvlist_array.9 \ nv.9 nvlist_free_string.9 \ + nv.9 nvlist_free_string_array.9 \ nv.9 nvlist_free_type.9 \ nv.9 nvlist_get_binary.9 \ nv.9 nvlist_get_bool.9 \ + nv.9 nvlist_get_bool_array.9 \ nv.9 nvlist_get_descriptor.9 \ + nv.9 nvlist_get_descriptor_array.9 \ nv.9 nvlist_get_number.9 \ + nv.9 nvlist_get_number_array.9 \ nv.9 nvlist_get_nvlist.9 \ + nv.9 nvlist_get_nvlist_array.9 \ nv.9 nvlist_get_parent.9 \ nv.9 nvlist_get_string.9 \ + nv.9 nvlist_get_string_array.9 \ nv.9 nvlist_move_binary.9 \ nv.9 nvlist_move_descriptor.9 \ + nv.9 nvlist_move_descriptor_array.9 \ nv.9 nvlist_move_nvlist.9 \ + nv.9 nvlist_move_nvlist_array.9 \ nv.9 nvlist_move_string.9 \ + nv.9 nvlist_move_string_array.9 \ nv.9 nvlist_next.9 \ nv.9 nvlist_pack.9 \ nv.9 nvlist_recv.9 \ @@ -1368,10 +1390,15 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_size.9 \ nv.9 nvlist_take_binary.9 \ nv.9 nvlist_take_bool.9 \ + nv.9 nvlist_take_bool_array.9 \ nv.9 nvlist_take_descriptor.9 \ + nv.9 nvlist_take_descriptor_array.9 \ nv.9 nvlist_take_number.9 \ + nv.9 nvlist_take_number_array.9 \ nv.9 nvlist_take_nvlist.9 \ + nv.9 nvlist_take_nvlist_array.9 \ nv.9 nvlist_take_string.9 \ + nv.9 nvlist_take_string_array.9 \ nv.9 nvlist_unpack.9 \ nv.9 nvlist_xfer.9 MLINKS+=osd.9 osd_call.9 \ From owner-svn-src-head@freebsd.org Sat Sep 16 18:12:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38749E2582C; Sat, 16 Sep 2017 18:12:17 +0000 (UTC) (envelope-from alc@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 0FD61837AE; Sat, 16 Sep 2017 18:12:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GICG1L091257; Sat, 16 Sep 2017 18:12:16 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GICGNp091243; Sat, 16 Sep 2017 18:12:16 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709161812.v8GICGNp091243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 16 Sep 2017 18:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323656 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 18:12:17 -0000 Author: alc Date: Sat Sep 16 18:12:15 2017 New Revision: 323656 URL: https://svnweb.freebsd.org/changeset/base/323656 Log: Modify blst_leaf_alloc to take only the cursor argument. Modify blst_leaf_alloc to find allocations that cross the boundary between one leaf node and the next when those two leaves descend from the same meta node. Update the hint field for leaves so that it represents a bound on how large an allocation can begin in that leaf, where it currently represents a bound on how large an allocation can be found within the boundaries of the leaf. The first phase of blst_leaf_alloc currently shrinks sequences of consecutive 1-bits in mask until each has been shrunken by count-1 bits, so that any bits remaining show where an allocation can begin, or until all the bits have disappeared, in which case the allocation fails. This change amends that so that the high-order bit is copied, as if, when the last block was free, it was followed by an endless stream of free blocks. It also amends the early stopping condition, so that the shrinking of 1-sequences stops early when there are none, or there is only one unbounded one remaining. The search for the first set bit is unchanged, and the code path thereafter is mostly unchanged unless the first set bit is in a position that makes some of those copied sign bits matter. In that case, we look for a next leaf, and at what blocks it can provide, to see if a cross-boundary allocation is possible. The hint is updated on a successful allocation that clears the last bit, but it not updated on a failed allocation that leaves the last bit set. So, as long as the last block is free, the hint value for the leaf is large. As long as the last block is free, and there's a next leaf, a large allocation can begin here, perhaps. A stricter rule than this would mean that allocations and frees in one leaf could require hint updates to the preceding leaf, and this change seeks to leave the freeing code unmodified. Define BLIST_BMAP_MASK, and use it for bit masking in blst_leaf_free and blist_leaf_fill, as well as in blst_leaf_alloc. Correct a panic message in blst_leaf_free. Submitted by: Doug Moore Reviewed by: markj (an earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11819 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sat Sep 16 17:52:25 2017 (r323655) +++ head/sys/kern/subr_blist.c Sat Sep 16 18:12:15 2017 (r323656) @@ -32,14 +32,17 @@ * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * - * A radix tree is used to maintain the bitmap. Two radix constants are - * involved: One for the bitmaps contained in the leaf nodes (typically - * 64), and one for the meta nodes (typically 16). Both meta and leaf - * nodes have a hint field. This field gives us a hint as to the largest - * free contiguous range of blocks under the node. It may contain a - * value that is too high, but will never contain a value that is too - * low. When the radix tree is searched, allocation failures in subtrees - * update the hint. + * A radix tree controls access to pieces of the bitmap, and includes + * auxiliary information at each interior node about the availabilty of + * contiguous free blocks in the subtree rooted at that node. Two radix + * constants are involved: one for the size of the bitmaps contained in the + * leaf nodes (BLIST_BMAP_RADIX), and one for the number of descendents of + * each of the meta (interior) nodes (BLIST_META_RADIX). Each subtree is + * associated with a range of blocks. The root of any subtree stores a + * hint field that defines an upper bound on the size of the largest + * allocation that can begin in the associated block range. A hint is an + * upper bound on a potential allocation, but not necessarily a tight upper + * bound. * * The radix tree also implements two collapsed states for meta nodes: * the ALL-ALLOCATED state and the ALL-FREE state. If a meta node is @@ -112,7 +115,7 @@ __FBSDID("$FreeBSD$"); #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) #define free(a,b) free(a) -#define CTASSERT(expr) +static __inline int imax(int a, int b) { return (a > b ? a : b); } #include @@ -123,8 +126,7 @@ void panic(const char *ctl, ...); /* * static support functions */ -static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, - daddr_t cursor); +static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_t count, u_daddr_t radix); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); @@ -145,7 +147,9 @@ static void blst_radix_print(blmeta_t *scan, daddr_t b static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif -CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); +_Static_assert(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0, + "radix divisibility error"); +#define BLIST_BMAP_MASK (BLIST_BMAP_RADIX - 1) #define BLIST_META_MASK (BLIST_META_RADIX - 1) /* @@ -575,33 +579,16 @@ blist_stats(blist_t bl, struct sbuf *s) * time is proportional to log2(count) + bitpos time. */ static daddr_t -blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) +blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count) { u_daddr_t mask; - int count1, lo, num_shifts, range1, range_ext; + int count1, hi, lo, num_shifts, range1, range_ext; - if (count == BLIST_BMAP_RADIX) { - /* - * Optimize allocation of BLIST_BMAP_RADIX bits. If this wasn't - * a special case, then forming the final value of 'mask' below - * would require special handling to avoid an invalid left shift - * when count equals the number of bits in mask. - */ - if (~scan->u.bmu_bitmap != 0) { - scan->bm_bighint = BLIST_BMAP_RADIX - 1; - return (SWAPBLK_NONE); - } - if (cursor != blk) - return (SWAPBLK_NONE); - scan->u.bmu_bitmap = 0; - scan->bm_bighint = 0; - return (blk); - } range1 = 0; count1 = count - 1; num_shifts = fls(count1); mask = scan->u.bmu_bitmap; - while (mask != 0 && num_shifts > 0) { + while ((-mask & ~mask) != 0 && num_shifts > 0) { /* * If bit i is set in mask, then bits in [i, i+range1] are set * in scan->u.bmu_bitmap. The value of range1 is equal to @@ -609,27 +596,32 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count * while preserving these invariants. The updates to mask leave * fewer bits set, but each bit that remains set represents a * longer string of consecutive bits set in scan->u.bmu_bitmap. + * If more updates to mask cannot clear more bits, because mask + * is partitioned with all 0 bits preceding all 1 bits, the loop + * terminates immediately. */ num_shifts--; range_ext = range1 + ((count1 >> num_shifts) & 1); - mask &= mask >> range_ext; + /* + * mask is a signed quantity for the shift because when it is + * shifted right, the sign bit should copied; when the last + * block of the leaf is free, pretend, for a while, that all the + * blocks that follow it are also free. + */ + mask &= (daddr_t)mask >> range_ext; range1 += range_ext; } if (mask == 0) { /* * Update bighint. There is no allocation bigger than range1 - * available in this leaf. + * starting in this leaf. */ scan->bm_bighint = range1; return (SWAPBLK_NONE); } - /* - * Discard any candidates that appear before the cursor. - */ - lo = cursor - blk; - mask &= ~(u_daddr_t)0 << lo; - + /* Discard any candidates that appear before blk. */ + mask &= (u_daddr_t)-1 << (blk & BLIST_BMAP_MASK); if (mask == 0) return (SWAPBLK_NONE); @@ -641,13 +633,58 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count mask &= -mask; lo = bitpos(mask); - /* - * Set in mask exactly the bits being allocated, and clear them from - * the set of available bits. - */ - mask = (mask << count) - mask; + hi = lo + count; + if (hi > BLIST_BMAP_RADIX) { + /* + * An allocation within this leaf is impossible, so a successful + * allocation depends on the next leaf providing some of the blocks. + */ + if (((blk / BLIST_BMAP_RADIX + 1) & BLIST_META_MASK) == 0) { + /* + * The next leaf has a different meta-node parent, so it + * is not necessarily initialized. Update bighint, + * comparing the range found at the end of mask to the + * largest earlier range that could have been made to + * vanish in the initial processing of mask. + */ + scan->bm_bighint = imax(BLIST_BMAP_RADIX - lo, range1); + return (SWAPBLK_NONE); + } + hi -= BLIST_BMAP_RADIX; + if (((scan[1].u.bmu_bitmap + 1) & ~((u_daddr_t)-1 << hi)) != 0) { + /* + * The next leaf doesn't have enough free blocks at the + * beginning to complete the spanning allocation. The + * hint cannot be updated, because the same allocation + * request could be satisfied later, by this leaf, if + * the state of the next leaf changes, and without any + * changes to this leaf. + */ + return (SWAPBLK_NONE); + } + /* Clear the first 'hi' bits in the next leaf, allocating them. */ + scan[1].u.bmu_bitmap &= (u_daddr_t)-1 << hi; + hi = BLIST_BMAP_RADIX; + } + + /* Set the bits of mask at position 'lo' and higher. */ + mask = -mask; + if (hi == BLIST_BMAP_RADIX) { + /* + * Update bighint. There is no allocation bigger than range1 + * available in this leaf after this allocation completes. + */ + scan->bm_bighint = range1; + } else { + /* Clear the bits of mask at position 'hi' and higher. */ + mask &= (u_daddr_t)-1 >> (BLIST_BMAP_RADIX - hi); + /* If this allocation uses all the bits, clear the hint. */ + if (mask == scan->u.bmu_bitmap) + scan->bm_bighint = 0; + } + /* Clear the allocated bits from this leaf. */ scan->u.bmu_bitmap &= ~mask; - return (blk + lo); + return ((blk & ~BLIST_BMAP_MASK) + lo); } /* @@ -665,9 +702,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_ int child; bool scan_from_start; - blk = cursor & -radix; if (radix == BLIST_BMAP_RADIX) - return (blst_leaf_alloc(scan, blk, count, cursor)); + return (blst_leaf_alloc(scan, cursor, count)); if (scan->u.bmu_avail < count) { /* * The meta node's hint must be too large if the allocation @@ -677,6 +713,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_ scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + blk = cursor & -radix; skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; @@ -715,7 +752,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_ for (i = 1 + child * next_skip; i < skip; i += next_skip) { if (count <= scan[i].bm_bighint) { /* - * The allocation might fit in the i'th subtree. + * The allocation might fit beginning in the i'th subtree. */ r = blst_meta_alloc(&scan[i], cursor > blk ? cursor : blk, count, radix); @@ -748,22 +785,20 @@ blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_ static void blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) { + u_daddr_t mask; + int n; + /* * free some data in this bitmap - * - * e.g. - * 0000111111111110000 + * mask=0000111111111110000 * \_________/\__/ - * v n + * count n */ - int n = blk & (BLIST_BMAP_RADIX - 1); - u_daddr_t mask; - + n = blk & BLIST_BMAP_MASK; mask = ((u_daddr_t)-1 << n) & ((u_daddr_t)-1 >> (BLIST_BMAP_RADIX - count - n)); - if (scan->u.bmu_bitmap & mask) - panic("blst_radix_free: freeing free block"); + panic("freeing free block"); scan->u.bmu_bitmap |= mask; /* @@ -944,10 +979,11 @@ blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) { - int n = blk & (BLIST_BMAP_RADIX - 1); daddr_t nblks; u_daddr_t mask; + int n; + n = blk & BLIST_BMAP_MASK; mask = ((u_daddr_t)-1 << n) & ((u_daddr_t)-1 >> (BLIST_BMAP_RADIX - count - n)); @@ -1097,10 +1133,14 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count = 0; } else { /* - * Add terminator and break out + * Add terminator and break out. Make terminator bitmap + * zero to avoid a spanning leaf allocation that + * includes the terminator. */ - if (scan) + if (scan) { scan[i].bm_bighint = (daddr_t)-1; + scan[i].u.bmu_bitmap = 0; + } break; } } From owner-svn-src-head@freebsd.org Sat Sep 16 19:02:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61C35E0202E; Sat, 16 Sep 2017 19:02:02 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 283B2FB0; Sat, 16 Sep 2017 19:02:02 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-10-49.flashcable.ch [91.190.10.49]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 36EF9C06CD; Sat, 16 Sep 2017 21:01:56 +0200 (CEST) Subject: Re: svn commit: r323290 - head/sys/vm To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> From: Andreas Tobler Message-ID: <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> Date: Sat, 16 Sep 2017 21:01:56 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170914203232.GA72190@bish> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 19:02:02 -0000 On 14.09.17 22:32, Mark Johnston wrote: > On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: >> Hi Mark, >> >> On 07.09.17 23:43, Mark Johnston wrote: >>> Author: markj >>> Date: Thu Sep 7 21:43:39 2017 >>> New Revision: 323290 >>> URL: https://svnweb.freebsd.org/changeset/base/323290 >>> >>> Log: >>> Speed up vm_page_array initialization. >>> >>> We currently initialize the vm_page array in three passes: one to zero >>> the array, one to initialize the "order" field of each page (necessary >>> when inserting them into the vm_phys buddy allocator one-by-one), and >>> one to initialize the remaining non-zero fields and individually insert >>> each page into the allocator. >>> >>> Merge the three passes into one following a suggestion from alc: >>> initialize vm_page fields in a single pass, and use vm_phys_free_contig() >>> to efficiently insert physical memory segments into the buddy allocator. >>> This reduces the initialization time to a third or a quarter of what it >>> was before on most systems that I tested. >>> >>> Reviewed by: alc, kib >>> MFC after: 3 weeks >>> Differential Revision: https://reviews.freebsd.org/D12248 >>> >>> Modified: >>> head/sys/vm/vm_page.c >>> head/sys/vm/vm_phys.c >>> head/sys/vm/vm_phys.h >> >> I just found out that this commit breaks booting my powerpc64 Quad G5. >> It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. >> >> Sometimes it hangs earlier when the kbd is not there yet (usb), then I >> can't get the process/task where it hangs. >> >> Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) >> >> Any ideas how to find out what's wrong? > > Are you able to break into DDB when the hang occurs? If so, the output > of "show page" would be helpful. Unfortunately not from the beginning. The keyboard is usb and it gets installed late. Once it survives the loading of the kbd and co, I can enter into ddb. But it is a trial and error. So far I didn't succeed to come that far. > Are you running with INVARIANTS configured? If not, please try that. The above was w/o INVARIANTS. With invariants the kernel panics immediately after boot, see pic. >> The previous revision, r323289 seems stable, at least it survived >> several kernel builds. > > Could you apply the patch below and capture the first page or so of > output from after the kernel starts booting? I applied this diff and you see its output on the pic: https://people.freebsd.org/~andreast/r323290_generic64_with_dbg_patch.jpg I try now to get that far that I have a kbd and capture a 'show page'. Thanks, Andreas From owner-svn-src-head@freebsd.org Sat Sep 16 20:32:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E0D6E0717D; Sat, 16 Sep 2017 20:32:36 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::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 D3F1A3E69; Sat, 16 Sep 2017 20:32:35 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id q132so5000898lfe.5; Sat, 16 Sep 2017 13:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UUqrDg0+EZIsLXxmt4FSpUUiOjbnwFLWUyFfAkMdnwk=; b=SIVNem8VqoDy2mODtGCATB0Cn6yApngM6NXXpq8BPAt6xX83OUrJCyLwJg45eh8pDJ vzFhlryKaO9kSHbeeDIcXKd8DqLgG8tYJGox3kdmiJzEeic3Qv2QuT3zEVVkwdeDMjgP f7ZFReTSENH9hUlDnSBmoCqDu4ZygLovxguhblyPb3YuxkMPe31FTicEVHaJcOoym5Wl UBxFml5FZBqZq00q5uEHDY3M+GPxV7vaDLZUqUPaKHOTVNHk8BWMeOQjDt5+DbPClJuW /TUqqmbXpNBNhGf4tHna8WDmp7j+6wDBJrhyDKGjtUwi1bMKu+WoaMeRCyKPcIwYaTpk Fcsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UUqrDg0+EZIsLXxmt4FSpUUiOjbnwFLWUyFfAkMdnwk=; b=lrH3uaOkIyJDQRGdLM9tTujxnv2SB6QxfHhOVzyjdNMyMQgYXE/hlchYi1xM19H/JM 3W55NZhL8gNMsdqIjNTfyzWM5qXX5acY3dMXzRpoKb5ID1G2ZlBQXVkz6pNGe/rAC4jQ Yzz5YJutYqAw8XaunNnzTr6qXzRxGR7l2gi13BCsV4PfA396/xdd8G4c5lQmFGbmwlLt iPybUwSq7wAxu7C/AgnZvMqfLKmVK1eLhQriS60T86GRJ4/RRH+wZ25Yn4UjKYvFPScY IHG2SFqi7WtnJlQhkq/Nvuc81txkT9/EmX+VcBjLIpQacL3G2YB5R2qWuGPiCvys2Tnd oR4A== X-Gm-Message-State: AHPjjUj9mNtiMhNIjXdEGpwubjldl/vuJgBdJmX23XTfqS4+88qBu5/6 +0Pu5Xnd575oWPxmtCHHLBP9uKqkgpkYewUUj9I= X-Google-Smtp-Source: AOwi7QBVIZ+kgXtj9qxfy9N6xZ0s4ppbQzoKdoFBzB2Gn5X/bi7r/HTF462tvTHmnfBUG12+PLKk9PlJab5y4NipsKw= X-Received: by 10.25.212.209 with SMTP id l200mr1675949lfg.13.1505593953795; Sat, 16 Sep 2017 13:32:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.87.65 with HTTP; Sat, 16 Sep 2017 13:32:33 -0700 (PDT) Received: by 10.46.87.65 with HTTP; Sat, 16 Sep 2017 13:32:33 -0700 (PDT) In-Reply-To: <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> From: Justin Hibbits Date: Sat, 16 Sep 2017 15:32:33 -0500 Message-ID: Subject: Re: svn commit: r323290 - head/sys/vm To: Andreas Tobler Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Johnston Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 20:32:36 -0000 On Sep 16, 2017 14:02, "Andreas Tobler" wrote: On 14.09.17 22:32, Mark Johnston wrote: > On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: > >> Hi Mark, >> >> On 07.09.17 23:43, Mark Johnston wrote: >> >>> Author: markj >>> Date: Thu Sep 7 21:43:39 2017 >>> New Revision: 323290 >>> URL: https://svnweb.freebsd.org/changeset/base/323290 >>> >>> Log: >>> Speed up vm_page_array initialization. >>> We currently initialize the vm_page array in three passes: one >>> to zero >>> the array, one to initialize the "order" field of each page >>> (necessary >>> when inserting them into the vm_phys buddy allocator one-by-one), and >>> one to initialize the remaining non-zero fields and individually >>> insert >>> each page into the allocator. >>> Merge the three passes into one following a suggestion from alc: >>> initialize vm_page fields in a single pass, and use >>> vm_phys_free_contig() >>> to efficiently insert physical memory segments into the buddy >>> allocator. >>> This reduces the initialization time to a third or a quarter of what >>> it >>> was before on most systems that I tested. >>> Reviewed by: alc, kib >>> MFC after: 3 weeks >>> Differential Revision: https://reviews.freebsd.org/D12248 >>> >>> Modified: >>> head/sys/vm/vm_page.c >>> head/sys/vm/vm_phys.c >>> head/sys/vm/vm_phys.h >>> >> >> I just found out that this commit breaks booting my powerpc64 Quad G5. >> It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. >> >> Sometimes it hangs earlier when the kbd is not there yet (usb), then I >> can't get the process/task where it hangs. >> >> Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) >> >> Any ideas how to find out what's wrong? >> > > Are you able to break into DDB when the hang occurs? If so, the output > of "show page" would be helpful. > Unfortunately not from the beginning. The keyboard is usb and it gets installed late. Once it survives the loading of the kbd and co, I can enter into ddb. But it is a trial and error. So far I didn't succeed to come that far. What about using dcons? That's saved me many times when I couldn't break into ddb from the console. Are you running with INVARIANTS configured? If not, please try that. > The above was w/o INVARIANTS. With invariants the kernel panics immediately after boot, see pic. The previous revision, r323289 seems stable, at least it survived >> several kernel builds. >> > > Could you apply the patch below and capture the first page or so of > output from after the kernel starts booting? > I applied this diff and you see its output on the pic: https://people.freebsd.org/~andreast/r323290_generic64_with_dbg_patch.jpg I try now to get that far that I have a kbd and capture a 'show page'. Thanks, Andreas From owner-svn-src-head@freebsd.org Sat Sep 16 20:52:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4A31E08270; Sat, 16 Sep 2017 20:52:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [157.161.13.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7985363A59; Sat, 16 Sep 2017 20:52:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-10-49.flashcable.ch [91.190.10.49]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 1FC85C1924; Sat, 16 Sep 2017 22:52:41 +0200 (CEST) Subject: Re: svn commit: r323290 - head/sys/vm To: Justin Hibbits Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Johnston References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> From: Andreas Tobler Message-ID: Date: Sat, 16 Sep 2017 22:52:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 8bit X-Scanned-By: Asterix Submit on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 20:52:49 -0000 On 16.09.17 22:32, Justin Hibbits wrote: > > > On Sep 16, 2017 14:02, "Andreas Tobler" > wrote: > > On 14.09.17 22:32, Mark Johnston wrote: > > On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: > > Hi Mark, > > On 07.09.17 23:43, Mark Johnston wrote: > > Author: markj > Date: Thu Sep  7 21:43:39 2017 > New Revision: 323290 > URL: https://svnweb.freebsd.org/changeset/base/323290 > > > Log: >     Speed up vm_page_array initialization. >         We currently initialize the vm_page array in > three passes: one to zero >     the array, one to initialize the "order" field of > each page (necessary >     when inserting them into the vm_phys buddy > allocator one-by-one), and >     one to initialize the remaining non-zero fields and > individually insert >     each page into the allocator. >         Merge the three passes into one following a > suggestion from alc: >     initialize vm_page fields in a single pass, and use > vm_phys_free_contig() >     to efficiently insert physical memory segments into > the buddy allocator. >     This reduces the initialization time to a third or > a quarter of what it >     was before on most systems that I tested. >         Reviewed by:    alc, kib >     MFC after:  3 weeks >     Differential Revision: > https://reviews.freebsd.org/D12248 > > > Modified: >     head/sys/vm/vm_page.c >     head/sys/vm/vm_phys.c >     head/sys/vm/vm_phys.h > > > I just found out that this commit breaks booting my > powerpc64 Quad G5. > It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. > > Sometimes it hangs earlier when the kbd is not there yet > (usb), then I > can't get the process/task where it hangs. > > Note, this kernel is compiled with the default gcc > (4.2.1-FreeBSD) > > Any ideas how to find out what's wrong? > > > Are you able to break into DDB when the hang occurs? If so, the > output > of "show page" would be helpful. > > > Unfortunately not from the beginning. The keyboard is usb and it > gets installed late. Once it survives the loading of the kbd and co, > I can enter into ddb. But it is a trial and error. So far I didn't > succeed to come that far. > > > What about using dcons? That's saved me many times when I couldn't break > into ddb from the console. Might be worth a try, but as you might have seen on the pic, the panic happens immediately after printing the banner. At that time no driver is available. It might work when I try w/o invariants and have luck and get past the fwohci init. Thx, Andreas From owner-svn-src-head@freebsd.org Sat Sep 16 21:26:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E65DDE09B8E; Sat, 16 Sep 2017 21:26: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 B99BE64623; Sat, 16 Sep 2017 21:26:07 +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 v8GLQ6AR070848; Sat, 16 Sep 2017 21:26:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GLQ6E2070843; Sat, 16 Sep 2017 21:26:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709162126.v8GLQ6E2070843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 16 Sep 2017 21:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323657 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 21:26:08 -0000 Author: tuexen Date: Sat Sep 16 21:26:06 2017 New Revision: 323657 URL: https://svnweb.freebsd.org/changeset/base/323657 Log: Remove code not used on any platform currently supported. MFC after: 1 week Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_pcb.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Sat Sep 16 18:12:15 2017 (r323656) +++ head/sys/netinet/sctp.h Sat Sep 16 21:26:06 2017 (r323657) @@ -545,7 +545,6 @@ struct sctp_error_auth_invalid_hmac { #define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010 #define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020 #define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040 -#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0000000000000080 /* socket options */ #define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100 #define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200 Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sat Sep 16 18:12:15 2017 (r323656) +++ head/sys/netinet/sctp_constants.h Sat Sep 16 21:26:06 2017 (r323657) @@ -555,11 +555,9 @@ __FBSDID("$FreeBSD$"); #define SCTP_TIMER_TYPE_INPKILL 15 #define SCTP_TIMER_TYPE_ASOCKILL 16 #define SCTP_TIMER_TYPE_ADDR_WQ 17 -#define SCTP_TIMER_TYPE_ZERO_COPY 18 -#define SCTP_TIMER_TYPE_ZCOPY_SENDQ 19 -#define SCTP_TIMER_TYPE_PRIM_DELETED 20 +#define SCTP_TIMER_TYPE_PRIM_DELETED 18 /* add new timers here - and increment LAST */ -#define SCTP_TIMER_TYPE_LAST 21 +#define SCTP_TIMER_TYPE_LAST 19 #define SCTP_IS_TIMER_TYPE_VALID(t) (((t) > SCTP_TIMER_TYPE_NONE) && \ ((t) < SCTP_TIMER_TYPE_LAST)) Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Sep 16 18:12:15 2017 (r323656) +++ head/sys/netinet/sctp_os_bsd.h Sat Sep 16 21:26:06 2017 (r323657) @@ -404,11 +404,6 @@ typedef struct rtentry sctp_rtentry_t; #define SCTP_RTALLOC(ro, vrf_id, fibnum) \ rtalloc_ign_fib((struct route *)ro, 0UL, fibnum) -/* Future zero copy wakeup/send function */ -#define SCTP_ZERO_COPY_EVENT(inp, so) -/* This is re-pulse ourselves for sendbuf */ -#define SCTP_ZERO_COPY_SENDQ_EVENT(inp, so) - /* * SCTP protocol specific mbuf flags. */ Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Sat Sep 16 18:12:15 2017 (r323656) +++ head/sys/netinet/sctp_pcb.h Sat Sep 16 21:26:06 2017 (r323657) @@ -314,10 +314,6 @@ struct sctp_pcb { */ struct sctp_timer signature_change; - /* Zero copy full buffer timer */ - struct sctp_timer zero_copy_timer; - /* Zero copy app to transport (sendq) read repulse timer */ - struct sctp_timer zero_copy_sendq_timer; uint32_t def_cookie_life; /* defaults to 0 */ int auto_close_time; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Sep 16 18:12:15 2017 (r323656) +++ head/sys/netinet/sctputil.c Sat Sep 16 21:26:06 2017 (r323657) @@ -1633,22 +1633,6 @@ sctp_timeout_handler(void *t) /* call the handler for the appropriate timer type */ switch (type) { - case SCTP_TIMER_TYPE_ZERO_COPY: - if (inp == NULL) { - break; - } - if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) { - SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket); - } - break; - case SCTP_TIMER_TYPE_ZCOPY_SENDQ: - if (inp == NULL) { - break; - } - if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) { - SCTP_ZERO_COPY_SENDQ_EVENT(inp, inp->sctp_socket); - } - break; case SCTP_TIMER_TYPE_ADDR_WQ: sctp_handle_addr_wq(); break; @@ -1962,14 +1946,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s SCTP_TCB_LOCK_ASSERT(stcb); } switch (t_type) { - case SCTP_TIMER_TYPE_ZERO_COPY: - tmr = &inp->sctp_ep.zero_copy_timer; - to_ticks = SCTP_ZERO_COPY_TICK_DELAY; - break; - case SCTP_TIMER_TYPE_ZCOPY_SENDQ: - tmr = &inp->sctp_ep.zero_copy_sendq_timer; - to_ticks = SCTP_ZERO_COPY_SENDQ_TICK_DELAY; - break; case SCTP_TIMER_TYPE_ADDR_WQ: /* Only 1 tick away :-) */ tmr = &SCTP_BASE_INFO(addr_wq_timer); @@ -2251,12 +2227,6 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st SCTP_TCB_LOCK_ASSERT(stcb); } switch (t_type) { - case SCTP_TIMER_TYPE_ZERO_COPY: - tmr = &inp->sctp_ep.zero_copy_timer; - break; - case SCTP_TIMER_TYPE_ZCOPY_SENDQ: - tmr = &inp->sctp_ep.zero_copy_sendq_timer; - break; case SCTP_TIMER_TYPE_ADDR_WQ: tmr = &SCTP_BASE_INFO(addr_wq_timer); break; @@ -4470,36 +4440,32 @@ sctp_wakeup_the_read_socket(struct sctp_inpcb *inp, ) { if ((inp != NULL) && (inp->sctp_socket != NULL)) { - if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) { - SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket); - } else { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; + struct socket *so; - so = SCTP_INP_SO(inp); - if (!so_locked) { - if (stcb) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - } - SCTP_SOCKET_LOCK(so, 1); - if (stcb) { - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - } - if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } + so = SCTP_INP_SO(inp); + if (!so_locked) { + if (stcb) { + atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_UNLOCK(stcb); } -#endif - sctp_sorwakeup(inp, inp->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { + SCTP_SOCKET_LOCK(so, 1); + if (stcb) { + SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); + } + if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { SCTP_SOCKET_UNLOCK(so, 1); + return; } + } #endif + sctp_sorwakeup(inp, inp->sctp_socket); +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); } +#endif } } From owner-svn-src-head@freebsd.org Sat Sep 16 22:28:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12B30E0CD7A; Sat, 16 Sep 2017 22:28:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::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 CA7AD65EB6; Sat, 16 Sep 2017 22:28:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x232.google.com with SMTP id w204so5327560itc.4; Sat, 16 Sep 2017 15:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XV+bYAc1qvFYFktEPDs9gWEPWIw8K9H9PmAWyQfnGjE=; b=c5LoG03P6jxUt2iXR5To6H+i9sPRwHO7SkK6ZhUWW89pExEGKdga8AOl5f9GIy/Sj7 h2UKy0EprfSEFWt48oB5DMBuyMIJcQtY/xQr445EhrQT0CkKrzCf2FPRd9bRGAncvxeE wl/oSuPp3XBCDyGqjyxtX0Ev14MUGlHwX9cONS20PIp8MiurWJXDRAcU8xWgCAS8eted kb7hM+5dJPudROfCK57fjOVk2YyNgjzYHFKwVG0D5PJEkqfk/3p3ZuwEKQHu6g2kwoNz Ofw3/2TjsZWpZA4A8QLrjivEQ1J3m33y60evWRgpwIirhUwmB2fiyA2CxTFkHNs7DwwB xboQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XV+bYAc1qvFYFktEPDs9gWEPWIw8K9H9PmAWyQfnGjE=; b=PXIS72/7HYJ9hbn6ZMFMgCN/x3+sGIbgURpu983S6c6fcIARb/rnOoSX1ezUM7Ka+w SjocGwS1URR6opi13x+8hHfAWQQeNQ48A3NYU6dXBRDLjuvMBcX24L3LUFq+LfDv4BMn DtK9Z77zb5EngBgPds1YIop2GPbKy3WQLSq2rJ4qlFGd/lGFDnWbrx9ci4cabkxM48SB BQOPQOq044dturJISa+8AA03SAYFyJWagYbrTDWf+4Yh+g9/Me/fzreiKuC5zpkcMpA7 cGnEwwngz1P42e+UXYghB8JnCk7SDszd6/KSA9/10Y+It/8kG1VJBlC+WZzs40JroWso HYMQ== X-Gm-Message-State: AHPjjUg0DqyEvoHMD8x/j2cpVq6076Z3XpCnW9Xug91C8OQtxg32njAg oc329mm1iVv6rDZ9GV4jJjfLaw== X-Google-Smtp-Source: AOwi7QAaoJYheX1+9t0BIsrB/3modXrwgRhVtcKzNvE44TJ3mxA8Rv2mpaifEn6fxE4UbSiKenBZpg== X-Received: by 10.36.202.197 with SMTP id k188mr10459397itg.94.1505600931876; Sat, 16 Sep 2017 15:28:51 -0700 (PDT) Received: from bish (toroon0560w-lp140-01-69-159-37-127.dsl.bell.ca. [69.159.37.127]) by smtp.gmail.com with ESMTPSA id v65sm1205057itf.38.2017.09.16.15.28.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Sep 2017 15:28:50 -0700 (PDT) Sender: Mark Johnston Date: Sat, 16 Sep 2017 18:28:46 -0400 From: Mark Johnston To: Andreas Tobler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323290 - head/sys/vm Message-ID: <20170916222846.GA88851@bish> References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Sep 2017 22:28:53 -0000 On Sat, Sep 16, 2017 at 09:01:56PM +0200, Andreas Tobler wrote: > On 14.09.17 22:32, Mark Johnston wrote: > > On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: > >> Hi Mark, > >> > >> On 07.09.17 23:43, Mark Johnston wrote: > >>> Author: markj > >>> Date: Thu Sep 7 21:43:39 2017 > >>> New Revision: 323290 > >>> URL: https://svnweb.freebsd.org/changeset/base/323290 > >>> > >>> Log: > >>> Speed up vm_page_array initialization. > >>> > >>> We currently initialize the vm_page array in three passes: one to zero > >>> the array, one to initialize the "order" field of each page (necessary > >>> when inserting them into the vm_phys buddy allocator one-by-one), and > >>> one to initialize the remaining non-zero fields and individually insert > >>> each page into the allocator. > >>> > >>> Merge the three passes into one following a suggestion from alc: > >>> initialize vm_page fields in a single pass, and use vm_phys_free_contig() > >>> to efficiently insert physical memory segments into the buddy allocator. > >>> This reduces the initialization time to a third or a quarter of what it > >>> was before on most systems that I tested. > >>> > >>> Reviewed by: alc, kib > >>> MFC after: 3 weeks > >>> Differential Revision: https://reviews.freebsd.org/D12248 > >>> > >>> Modified: > >>> head/sys/vm/vm_page.c > >>> head/sys/vm/vm_phys.c > >>> head/sys/vm/vm_phys.h > >> > >> I just found out that this commit breaks booting my powerpc64 Quad G5. > >> It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. > >> > >> Sometimes it hangs earlier when the kbd is not there yet (usb), then I > >> can't get the process/task where it hangs. > >> > >> Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) > >> > >> Any ideas how to find out what's wrong? > > > > Are you able to break into DDB when the hang occurs? If so, the output > > of "show page" would be helpful. > > Unfortunately not from the beginning. The keyboard is usb and it gets > installed late. Once it survives the loading of the kbd and co, I can > enter into ddb. But it is a trial and error. So far I didn't succeed to > come that far. > > > Are you running with INVARIANTS configured? If not, please try that. > > The above was w/o INVARIANTS. With invariants the kernel panics > immediately after boot, see pic. Thanks. Could you please try applying the patch at the end of this email and see if that fixes the issue? I have not yet tried to compile it, sorry. > > >> The previous revision, r323289 seems stable, at least it survived > >> several kernel builds. > > > > Could you apply the patch below and capture the first page or so of > > output from after the kernel starts booting? > > I applied this diff and you see its output on the pic: > > https://people.freebsd.org/~andreast/r323290_generic64_with_dbg_patch.jpg > > I try now to get that far that I have a kbd and capture a 'show page'. I don't think that's necessary anymore given the information provided in the picture. diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 04066418fcc1..b576474fcd1d 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -287,6 +287,7 @@ boolean_t moea_is_referenced(mmu_t, vm_page_t); int moea_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea_page_exists_quick(mmu_t, pmap_t, vm_page_t); +void moea_page_init(mmu_t, vm_page_t); int moea_page_wired_mappings(mmu_t, vm_page_t); void moea_pinit(mmu_t, pmap_t); void moea_pinit0(mmu_t, pmap_t); @@ -334,6 +335,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_ts_referenced, moea_ts_referenced), MMUMETHOD(mmu_map, moea_map), MMUMETHOD(mmu_page_exists_quick,moea_page_exists_quick), + MMUMETHOD(mmu_page_init, moea_page_init), MMUMETHOD(mmu_page_wired_mappings,moea_page_wired_mappings), MMUMETHOD(mmu_pinit, moea_pinit), MMUMETHOD(mmu_pinit0, moea_pinit0), @@ -1594,6 +1596,15 @@ moea_page_exists_quick(mmu_t mmu, pmap_t pmap, vm_page_t m) return (rv); } +void +moea_page_init(mmu_t mmu __unused, vm_page_t m) +{ + + m->md.mdpg_attrs = 0; + m->md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT; + LIST_INIT(&m->md.mdpg_pvoh); +} + /* * Return the number of managed mappings to the given physical page * that are wired. diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index c0461ff57453..28c9c79916f1 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -251,6 +251,7 @@ boolean_t moea64_is_referenced(mmu_t, vm_page_t); int moea64_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea64_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea64_page_exists_quick(mmu_t, pmap_t, vm_page_t); +void moea64_page_init(mmu_t, vm_page_t); int moea64_page_wired_mappings(mmu_t, vm_page_t); void moea64_pinit(mmu_t, pmap_t); void moea64_pinit0(mmu_t, pmap_t); @@ -298,6 +299,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_ts_referenced, moea64_ts_referenced), MMUMETHOD(mmu_map, moea64_map), MMUMETHOD(mmu_page_exists_quick,moea64_page_exists_quick), + MMUMETHOD(mmu_page_init, moea64_page_init), MMUMETHOD(mmu_page_wired_mappings,moea64_page_wired_mappings), MMUMETHOD(mmu_pinit, moea64_pinit), MMUMETHOD(mmu_pinit0, moea64_pinit0), @@ -1898,6 +1900,15 @@ moea64_page_exists_quick(mmu_t mmu, pmap_t pmap, vm_page_t m) return (rv); } +void +moea64_page_init(mmu_t mmu __unused, vm_page_t m) +{ + + m->md.mdpg_attrs = 0; + m->md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT; + LIST_INIT(&m->md.mdpg_pvoh); +} + /* * Return the number of managed mappings to the given physical page * that are wired.