From owner-svn-src-all@freebsd.org Sun Jun 18 00:08:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6915EC77D67; Sun, 18 Jun 2017 00:08: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 351AA7C767; Sun, 18 Jun 2017 00:08: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 v5I08cfI032587; Sun, 18 Jun 2017 00:08:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5I08c1W032586; Sun, 18 Jun 2017 00:08:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706180008.v5I08c1W032586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 18 Jun 2017 00:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320065 - head/sys/dev/psci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 00:08:39 -0000 Author: emaste Date: Sun Jun 18 00:08:38 2017 New Revision: 320065 URL: https://svnweb.freebsd.org/changeset/base/320065 Log: arm: add .arch_extension sec for smc instruction Clang 4.0 accepts the smc instruction with or without specifying .arch_extension sec, but Clang 5.0 produces an error without it. MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/psci/psci_arm.S Modified: head/sys/dev/psci/psci_arm.S ============================================================================== --- head/sys/dev/psci/psci_arm.S Sat Jun 17 23:34:53 2017 (r320064) +++ head/sys/dev/psci/psci_arm.S Sun Jun 18 00:08:38 2017 (r320065) @@ -28,7 +28,8 @@ #include __FBSDID("$FreeBSD$"); -.arch_extension virt /* For hvc */ +.arch_extension sec /* For smc */ +.arch_extension virt /* For hvc */ /* * int psci_hvc_despatch(register_t psci_fnid, register_t...) From owner-svn-src-all@freebsd.org Sun Jun 18 07:16:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAD40D8AEDD; Sun, 18 Jun 2017 07:16:11 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::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 4BC87296D; Sun, 18 Jun 2017 07:16:11 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id 70so11653267wme.1; Sun, 18 Jun 2017 00:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RlTdsIuSaZu2zEEObbHS/g0vTEO2YClyA6AY2gjwfI8=; b=h6+sGpwcg3xFeVyXyVuXL7eBXTFCcbRnsK3dfu29nfM10hQmjkUCfnafqgpWf+cMjn QfQxCnbRBELSSfkrc8ar43nu4kFbHIjSLbFgwkHr24rfXAO9xXqYXOmB0rJSDklgGOwR LcQ10y7Cl4MSkEbEyWIbGzDnC2eIOS2sx1XCO6CUfdWQoRWW4c9PHM5CBILFAOgdaV09 CebC1GPQ2Ht0/vPr4cDCUS9bu9mNyWN3tdx6Y3ldBag8C1FUs9mbS0J+Pj2x5OaPec2Y nEn2B/BIAZxJEpD50tNmqzPG6kDSQosVh0q3e/FhghnF/MAVzHAA4qwETw3/pFmtgYX7 VhZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RlTdsIuSaZu2zEEObbHS/g0vTEO2YClyA6AY2gjwfI8=; b=qhClYZ4Ciwp5lyx/Oo7NQPMIa9TY85S+1jmylhQREqIw+sS2nUr41D9uodGbStqf/O GCvWvpcbqrgwrGFWSOUStY6kachWBwjdNicSOG2Yi2f53qygX4JQwQVrPhG6WPTuLxkT VqrnCRRfM/UygTxj4jyd8+xHGv3DsPWvpjE3btZM4jgNAvtH4X4sq1olVRQQBCkBZBNS u7FZcktmhBWZzkNWGS2GGO9btgxj/sSwy/26ruxwHIgGpD1dvkUEldtImzcNiW4NL3BL 20KwWABvSgVZGAJ31TWu8FE+3MZ0PfZHWion3f3RuHVmMMBCP/V9upBXi+mjtz+mPVtT DMEw== X-Gm-Message-State: AKS2vOxRPwX5kKgO4nWz6BGGeudf818W+/8ZaNXTB9IZ+8cskTlOeYhJ 65sfn+cXtHtdzXpSlkqu/Q== X-Received: by 10.80.162.38 with SMTP id 35mr12537591edl.99.1497770168471; Sun, 18 Jun 2017 00:16:08 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id h57sm3941725edh.52.2017.06.18.00.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Jun 2017 00:16:07 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sys To: Rick Macklem , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706172224.v5HMOJoV090858@repo.freebsd.org> Message-ID: Date: Sun, 18 Jun 2017 09:16:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706172224.v5HMOJoV090858@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 07:16:11 -0000 On 18.06.2017 0:24, Rick Macklem wrote: > Author: rmacklem > Date: Sat Jun 17 22:24:19 2017 > New Revision: 320062 > URL: https://svnweb.freebsd.org/changeset/base/320062 > > Log: > Make MAXBCACHEBUF a tunable called vfs.maxbcachebuf. > > By making MAXBCACHEBUF a tunable, it can be increased to allow for > larger read/write data sizes for the NFS client. > The tunable is limited to MAXPHYS, which is currently 128K. > Making MAXPHYS a tunable or increasing its value is being discussed, > since it would be nice to support a read/write data size of 1Mbyte > for the NFS client when mounting the AmazonEFS file service. > > Reviewed by: kib > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10991 > > Modified: > head/sys/fs/nfs/nfs_commonkrpc.c > head/sys/fs/nfs/nfsport.h > head/sys/fs/nfsclient/nfs_clrpcops.c > head/sys/kern/vfs_bio.c > head/sys/sys/param.h > This one breaks armv6 kernel: cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp -B/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O -pipe -g -nostdinc -I. -I/usr2/Meloun/git/tegra/sys -I/usr2/Meloun/git/tegra/sys/contrib/libfdt -I/usr2/Meloun/git/tegra/sys/gnu/dts/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -march=armv7a -funwind-tables -MD -MF.depend.elf_note.o -MTelf_note.o -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mfpu=none -std=iso9899:1999 -Werror /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S /usr2/Meloun/git/tegra/sys/sys/param.h:272:12: error: unexpected token in argument list extern int maxbcachebuf; ^ /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S:35:1: warning: DWARF2 only supports one section per compilation unit .pushsection .note.tag ; .balign 4 ; .long 2f - 1f ; .long 4f - 3f ; .long 1 ; 1: .asciz "FreeBSD" ; 2: .balign 4 ; 3: .long 1200033 ; 4: .balign 4 ; .popsection; ^ *** Error code 1 Michal > Modified: head/sys/fs/nfs/nfs_commonkrpc.c > ============================================================================== > --- head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 22:24:19 2017 (r320062) > @@ -161,7 +161,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq > struct ucred *cred, NFSPROC_T *p, int callback_retry_mult) > { > int rcvreserve, sndreserve; > - int pktscale; > + int pktscale, pktscalesav; > struct sockaddr *saddr; > struct ucred *origcred; > CLIENT *client; > @@ -210,6 +210,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq > pktscale = 2; > if (pktscale > 64) > pktscale = 64; > + pktscalesav = pktscale; > /* > * soreserve() can fail if sb_max is too small, so shrink pktscale > * and try again if there is an error. > @@ -228,8 +229,12 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq > goto out; > } > do { > - if (error != 0 && pktscale > 2) > + if (error != 0 && pktscale > 2) { > + if (nmp != NULL && nrp->nr_sotype == SOCK_STREAM && > + pktscale == pktscalesav) > + printf("Consider increasing kern.ipc.maxsockbuf\n"); > pktscale--; > + } > if (nrp->nr_sotype == SOCK_DGRAM) { > if (nmp != NULL) { > sndreserve = (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * > @@ -243,15 +248,19 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq > if (nrp->nr_sotype != SOCK_STREAM) > panic("nfscon sotype"); > if (nmp != NULL) { > - sndreserve = (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > - rcvreserve = (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > } else { > sndreserve = rcvreserve = 1024 * pktscale; > } > } > error = soreserve(so, sndreserve, rcvreserve); > + if (error != 0 && nmp != NULL && nrp->nr_sotype == SOCK_STREAM && > + pktscale <= 2) > + printf("Must increase kern.ipc.maxsockbuf or reduce" > + " rsize, wsize\n"); > } while (error != 0 && pktscale > 2); > soclose(so); > if (error) { > > Modified: head/sys/fs/nfs/nfsport.h > ============================================================================== > --- head/sys/fs/nfs/nfsport.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/fs/nfs/nfsport.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -1016,7 +1016,7 @@ struct nfsreq { > }; > > #ifndef NFS_MAXBSIZE > -#define NFS_MAXBSIZE MAXBCACHEBUF > +#define NFS_MAXBSIZE (maxbcachebuf) > #endif > > /* > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 22:24:19 2017 (r320062) > @@ -4625,7 +4625,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc > struct nfssockreq *nrp, uint32_t sequenceid, int mds, struct ucred *cred, > NFSPROC_T *p) > { > - uint32_t crflags, *tl; > + uint32_t crflags, maxval, *tl; > struct nfsrv_descript nfsd; > struct nfsrv_descript *nd = &nfsd; > int error, irdcnt; > @@ -4643,8 +4643,8 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc > /* Fill in fore channel attributes. */ > NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED); > *tl++ = 0; /* Header pad size */ > - *tl++ = txdr_unsigned(100000); /* Max request size */ > - *tl++ = txdr_unsigned(100000); /* Max response size */ > + *tl++ = txdr_unsigned(nmp->nm_wsize + NFS_MAXXDR);/* Max request size */ > + *tl++ = txdr_unsigned(nmp->nm_rsize + NFS_MAXXDR);/* Max reply size */ > *tl++ = txdr_unsigned(4096); /* Max response size cached */ > *tl++ = txdr_unsigned(20); /* Max operations */ > *tl++ = txdr_unsigned(64); /* Max slots */ > @@ -4691,7 +4691,26 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc > > /* Get the fore channel slot count. */ > NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED); > - tl += 3; /* Skip the other counts. */ > + tl++; /* Skip the header pad size. */ > + > + /* Make sure nm_wsize is small enough. */ > + maxval = fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_wsize + NFS_MAXXDR) { > + if (nmp->nm_wsize > 8096) > + nmp->nm_wsize /= 2; > + else > + break; > + } > + > + /* Make sure nm_rsize is small enough. */ > + maxval = fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_rsize + NFS_MAXXDR) { > + if (nmp->nm_rsize > 8096) > + nmp->nm_rsize /= 2; > + else > + break; > + } > + > sep->nfsess_maxcache = fxdr_unsigned(int, *tl++); > tl++; > sep->nfsess_foreslots = fxdr_unsigned(uint16_t, *tl++); > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/kern/vfs_bio.c Sat Jun 17 22:24:19 2017 (r320062) > @@ -131,6 +131,7 @@ static void bufkva_reclaim(vmem_t *, int); > static void bufkva_free(struct buf *); > static int buf_import(void *, void **, int, int); > static void buf_release(void *, void **, int); > +static void maxbcachebuf_adjust(void); > > #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ > defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) > @@ -245,6 +246,9 @@ SYSCTL_LONG(_vfs, OID_AUTO, barrierwrites, CTLFLAG_RW, > SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_allowed, CTLFLAG_RD, > &unmapped_buf_allowed, 0, > "Permit the use of the unmapped i/o"); > +int maxbcachebuf = MAXBCACHEBUF; > +SYSCTL_INT(_vfs, OID_AUTO, maxbcachebuf, CTLFLAG_RDTUN, &maxbcachebuf, 0, > + "Maximum size of a buffer cache block"); > > /* > * This lock synchronizes access to bd_request. > @@ -847,6 +851,29 @@ bd_wakeup(void) > } > > /* > + * Adjust the maxbcachbuf tunable. > + */ > +static void > +maxbcachebuf_adjust(void) > +{ > + int i; > + > + /* > + * maxbcachebuf must be a power of 2 >= MAXBSIZE. > + */ > + i = 2; > + while (i * 2 <= maxbcachebuf) > + i *= 2; > + maxbcachebuf = i; > + if (maxbcachebuf < MAXBSIZE) > + maxbcachebuf = MAXBSIZE; > + if (maxbcachebuf > MAXPHYS) > + maxbcachebuf = MAXPHYS; > + if (bootverbose != 0 && maxbcachebuf != MAXBCACHEBUF) > + printf("maxbcachebuf=%d\n", maxbcachebuf); > +} > + > +/* > * bd_speedup - speedup the buffer cache flushing code > */ > void > @@ -893,6 +920,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) > */ > physmem_est = physmem_est * (PAGE_SIZE / 1024); > > + maxbcachebuf_adjust(); > /* > * The nominal buffer size (and minimum KVA allocation) is BKVASIZE. > * For the first 64MB of ram nominally allocate sufficient buffers to > @@ -1003,7 +1031,9 @@ bufinit(void) > struct buf *bp; > int i; > > - CTASSERT(MAXBCACHEBUF >= MAXBSIZE); > + KASSERT(maxbcachebuf >= MAXBSIZE, > + ("maxbcachebuf (%d) must be >= MAXBSIZE (%d)\n", maxbcachebuf, > + MAXBSIZE)); > mtx_init(&bqlocks[QUEUE_DIRTY], "bufq dirty lock", NULL, MTX_DEF); > mtx_init(&bqlocks[QUEUE_EMPTY], "bufq empty lock", NULL, MTX_DEF); > for (i = QUEUE_CLEAN; i < QUEUE_CLEAN + CLEAN_QUEUES; i++) > @@ -1050,7 +1080,7 @@ bufinit(void) > * PAGE_SIZE. > */ > maxbufspace = (long)nbuf * BKVASIZE; > - hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); > + hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - maxbcachebuf * 10); > lobufspace = (hibufspace / 20) * 19; /* 95% */ > bufspacethresh = lobufspace + (hibufspace - lobufspace) / 2; > > @@ -1062,9 +1092,9 @@ bufinit(void) > * The lower 1 MiB limit is the historical upper limit for > * hirunningspace. > */ > - hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF), > + hirunningspace = lmax(lmin(roundup(hibufspace / 64, maxbcachebuf), > 16 * 1024 * 1024), 1024 * 1024); > - lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); > + lorunningspace = roundup((hirunningspace * 2) / 3, maxbcachebuf); > > /* > * Limit the amount of malloc memory since it is wired permanently into > @@ -3484,9 +3514,9 @@ getblk(struct vnode *vp, daddr_t blkno, int size, int > KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, > ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); > ASSERT_VOP_LOCKED(vp, "getblk"); > - if (size > MAXBCACHEBUF) > - panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, > - MAXBCACHEBUF); > + if (size > maxbcachebuf) > + panic("getblk: size(%d) > maxbcachebuf(%d)\n", size, > + maxbcachebuf); > if (!unmapped_buf_allowed) > flags &= ~(GB_UNMAPPED | GB_KVAALLOC); > > > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/sys/param.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -244,9 +244,7 @@ > * Filesystems can of course request smaller chunks. Actual > * backing memory uses a chunk size of a page (PAGE_SIZE). > * The default value here can be overridden on a per-architecture > - * basis by defining it in . This should > - * probably be done to increase its value, when MAXBCACHEBUF is > - * defined as a larger value in . > + * basis by defining it in . > * > * If you make BKVASIZE too small you risk seriously fragmenting > * the buffer KVM map which may slow things down a bit. If you > @@ -265,6 +263,14 @@ > #define BKVASIZE 16384 /* must be power of 2 */ > #endif > #define BKVAMASK (BKVASIZE-1) > + > +/* > + * This variable is tuned via vfs.maxbcachebuf and is set to the value of > + * MAXBCACHEBUF by default. > + */ > +#ifdef _KERNEL > +extern int maxbcachebuf; > +#endif > > /* > * MAXPATHLEN defines the longest permissible path length after expanding > From owner-svn-src-all@freebsd.org Sun Jun 18 11:46:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E273DD8F143; Sun, 18 Jun 2017 11:46:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B18F868BB3; Sun, 18 Jun 2017 11:46:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBkHq1017392; Sun, 18 Jun 2017 11:46:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBkHJI017391; Sun, 18 Jun 2017 11:46:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181146.v5IBkHJI017391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320066 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:46:19 -0000 Author: hselasky Date: Sun Jun 18 11:46:17 2017 New Revision: 320066 URL: https://svnweb.freebsd.org/changeset/base/320066 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Approved by: re (gjb) Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 00:08:38 2017 (r320065) +++ stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:46:17 2017 (r320066) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2052,7 +2051,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-all@freebsd.org Sun Jun 18 11:48:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1DC7D8F29B; Sun, 18 Jun 2017 11:48:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C0F68DDD; Sun, 18 Jun 2017 11:48:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBmev0017528; Sun, 18 Jun 2017 11:48:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBmeWI017527; Sun, 18 Jun 2017 11:48:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181148.v5IBmeWI017527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320067 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:48:42 -0000 Author: hselasky Date: Sun Jun 18 11:48:40 2017 New Revision: 320067 URL: https://svnweb.freebsd.org/changeset/base/320067 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:46:17 2017 (r320066) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:48:40 2017 (r320067) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2053,7 +2052,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-all@freebsd.org Sun Jun 18 11:50:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4512BD8F356; Sun, 18 Jun 2017 11:50:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 121CF68F6A; Sun, 18 Jun 2017 11:50:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBo9b4017664; Sun, 18 Jun 2017 11:50:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBo9WT017663; Sun, 18 Jun 2017 11:50:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181150.v5IBo9WT017663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r320068 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:50:10 -0000 Author: hselasky Date: Sun Jun 18 11:50:09 2017 New Revision: 320068 URL: https://svnweb.freebsd.org/changeset/base/320068 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:48:40 2017 (r320067) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:50:09 2017 (r320068) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2055,7 +2054,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-all@freebsd.org Sun Jun 18 11:51:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18D45D8F404; Sun, 18 Jun 2017 11:51: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 DBC506A0F6; Sun, 18 Jun 2017 11:51:04 +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 v5IBp4mP017750; Sun, 18 Jun 2017 11:51:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBp4p6017749; Sun, 18 Jun 2017 11:51:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706181151.v5IBp4p6017749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 18 Jun 2017 11:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320069 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:51:05 -0000 Author: emaste Date: Sun Jun 18 11:51:03 2017 New Revision: 320069 URL: https://svnweb.freebsd.org/changeset/base/320069 Log: Add ZFS to Linux statfs ftype PR: 220086 Reviewed by: cem MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11252 Modified: head/sys/compat/linux/linux_stats.c Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sun Jun 18 11:50:09 2017 (r320068) +++ head/sys/compat/linux/linux_stats.c Sun Jun 18 11:51:03 2017 (r320069) @@ -318,6 +318,7 @@ struct l_statfs { #define LINUX_NTFS_SUPER_MAGIC 0x5346544EL #define LINUX_PROC_SUPER_MAGIC 0x9fa0L #define LINUX_UFS_SUPER_MAGIC 0x00011954L /* XXX - UFS_MAGIC in Linux */ +#define LINUX_ZFS_SUPER_MAGIC 0x2FC12FC1 #define LINUX_DEVFS_SUPER_MAGIC 0x1373L #define LINUX_SHMFS_MAGIC 0x01021994 @@ -327,6 +328,7 @@ bsd_to_linux_ftype(const char *fstypename) int i; static struct {const char *bsd_name; long linux_type;} b2l_tbl[] = { {"ufs", LINUX_UFS_SUPER_MAGIC}, + {"zfs", LINUX_ZFS_SUPER_MAGIC}, {"cd9660", LINUX_ISOFS_SUPER_MAGIC}, {"nfs", LINUX_NFS_SUPER_MAGIC}, {"ext2fs", LINUX_EXT2_SUPER_MAGIC}, From owner-svn-src-all@freebsd.org Sun Jun 18 12:28:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C49D908E5; Sun, 18 Jun 2017 12:28:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DD56E5E0; Sun, 18 Jun 2017 12:28:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ICSini033946; Sun, 18 Jun 2017 12:28:44 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ICSh9w033943; Sun, 18 Jun 2017 12:28:43 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706181228.v5ICSh9w033943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 18 Jun 2017 12:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320070 - in head/sys: fs/nfs fs/nfsclient sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 12:28:45 -0000 Author: rmacklem Date: Sun Jun 18 12:28:43 2017 New Revision: 320070 URL: https://svnweb.freebsd.org/changeset/base/320070 Log: Take "extern int maxbcachebuf" out of sys/param.h, since it breaks the arm build. In the arm build, elf_note.S includes sys/param.h and then does an elf macro called ELFNOTE(). Although the compile error doesn't make sense to me, I believe it just means that an "extern ..." can't exist in param.h for this inclusion case. I suspect adding #if !defined(LOCORE) might fix the build, but this commit just takes the definition out. I will ask freebsd-current@ what is the best was to deal with this and do a subsequent commit after that. Reported by: melounmichal@gmail.com Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/sys/param.h Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Sun Jun 18 11:51:03 2017 (r320069) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sun Jun 18 12:28:43 2017 (r320070) @@ -96,6 +96,7 @@ extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); extern int nfs_numnfscbd; extern int nfscl_debuglevel; +extern int maxbcachebuf; SVCPOOL *nfscbd_pool; static int nfsrv_gsscallbackson = 0; Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Jun 18 11:51:03 2017 (r320069) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Jun 18 12:28:43 2017 (r320070) @@ -83,6 +83,7 @@ extern int nfscl_debuglevel; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern struct mtx ncl_iod_mutex; +extern int maxbcachebuf; NFSCLSTATEMUTEX; MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "NFS request header"); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Jun 18 11:51:03 2017 (r320069) +++ head/sys/sys/param.h Sun Jun 18 12:28:43 2017 (r320070) @@ -265,14 +265,6 @@ #define BKVAMASK (BKVASIZE-1) /* - * This variable is tuned via vfs.maxbcachebuf and is set to the value of - * MAXBCACHEBUF by default. - */ -#ifdef _KERNEL -extern int maxbcachebuf; -#endif - -/* * MAXPATHLEN defines the longest permissible path length after expanding * symbolic links. It is used to allocate a temporary buffer from the buffer * pool in which to do the name expansion, hence should be a power of two, From owner-svn-src-all@freebsd.org Sun Jun 18 12:30:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF30D9096D; Sun, 18 Jun 2017 12:30:31 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670069.outbound.protection.outlook.com [40.107.67.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B42F6E726; Sun, 18 Jun 2017 12:30:30 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Sun, 18 Jun 2017 12:30:28 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1178.018; Sun, 18 Jun 2017 12:30:28 +0000 From: Rick Macklem To: Rick Macklem , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "meloun.michal@gmail.com" Subject: Re: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sys Thread-Topic: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sys Thread-Index: AQHS6ALSR0VrzKO2dE6NnsIkbEp8zqIqjQuE Date: Sun, 18 Jun 2017 12:30:28 +0000 Message-ID: References: <201706172224.v5HMOJoV090858@repo.freebsd.org>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0189; 7:DPaIROHuULC0iwd6eSsClJUFS8CzxemkOGe/o0amjsPLBqhvSfBfU3em6GgnfzMRMc/rmWhm4XRL/KCwVTEvu1GrC21cCR4UrZsqZUAN+E1KtzLdKZOzGT45RcavskB8tvLsCduS+RZXGcyz90RjIQhHjtrLnneB+3bAU1bUm63SeDvN1W6FUc5exPpFbVTvM3mKB3volV33TcPoU2MO7jtHG15YakVRW/VOghBlq3mFrArX2KWlWahkvEgVym/KUGt7XRIlWlJl9Qc7I7mzHtlhezPifDthCnXMvsPXri2IN6piqwuc/VKkyRpv5sXPWHcMQ8N4PJ/5eWUmxNwBa9aRaZL2K72h9ivBRgM0CKWywQE6mXP7v2l+6HLd4cCNaRsPO+epH80Q+Ecb5SRLENK4SGqLuKfwtlTOCfqjzUfpyNLwAgEVhL11egwF6az8ZbYehMlsppVO+Yh2Jwz8A9coFj/pPc8jpS5+sLgpFzHuh74Cs7EGCTqu1Goq0mVT0Bfwbwlm/zfTF1RVGCeKac58JcqtxoQibMOa2MRH45IOp1lY1/Yr183ZduCerlj39j6Z1zl079QviO2cjApDlVB26eCyPEaIu8o1ad1xHCWLAb7AklCFejTacVh0b4BA5EUsbQWI1rCgdTVVD4SFp1dHbzSjId5AcxfEv1f3bL6rEwSvOtkbQ9TGKeL3tFd1aMwC/jk1qK5bUN0xQoZ3/f8v6/+YqjFwI4/yHfdmIqS7XEIhNr1IVri98JZxP4YBPbgi+QGG8o/i9qwo4OBhQB6XR1t7E6Mha+ABg0+njcY= x-ms-office365-filtering-correlation-id: ded488bc-a086-479f-ce1c-08d4b645cdab x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:YTXPR01MB0189; x-ms-traffictypediagnostic: YTXPR01MB0189: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(211171220733660); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTXPR01MB0189; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTXPR01MB0189; x-forefront-prvs: 034215E98F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(377454003)(24454002)(2906002)(3660700001)(6306002)(55016002)(105586002)(3280700002)(478600001)(2201001)(189998001)(53936002)(9686003)(229853002)(14454004)(33656002)(2950100002)(74482002)(966005)(2501003)(77096006)(6506006)(8676002)(6436002)(81166006)(102836003)(5660300001)(6246003)(38730400002)(53546009)(25786009)(305945005)(39060400002)(7696004)(2900100001)(8936002)(122556002)(74316002)(54356999)(76176999)(50986999)(86362001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0189; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2017 12:30:28.5201 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0189 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 12:30:31 -0000 I have committed r320070, which takes the definition out of param.h and sho= uld fix the build. I will ask on freebsd-current@ how best to fix this. Thanks for reporting it and sorry about the breakage, rick ________________________________________ From: Michal Meloun Sent: Sunday, June 18, 2017 3:16:07 AM To: Rick Macklem; src-committers@freebsd.org; svn-src-all@freebsd.org; svn-= src-head@freebsd.org Subject: Re: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sy= s On 18.06.2017 0:24, Rick Macklem wrote: > Author: rmacklem > Date: Sat Jun 17 22:24:19 2017 > New Revision: 320062 > URL: https://svnweb.freebsd.org/changeset/base/320062 > > Log: > Make MAXBCACHEBUF a tunable called vfs.maxbcachebuf. > > By making MAXBCACHEBUF a tunable, it can be increased to allow for > larger read/write data sizes for the NFS client. > The tunable is limited to MAXPHYS, which is currently 128K. > Making MAXPHYS a tunable or increasing its value is being discussed, > since it would be nice to support a read/write data size of 1Mbyte > for the NFS client when mounting the AmazonEFS file service. > > Reviewed by: kib > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10991 > > Modified: > head/sys/fs/nfs/nfs_commonkrpc.c > head/sys/fs/nfs/nfsport.h > head/sys/fs/nfsclient/nfs_clrpcops.c > head/sys/kern/vfs_bio.c > head/sys/sys/param.h > This one breaks armv6 kernel: cc -target armv6-gnueabihf-freebsd12.0 --sysroot=3D/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp -B/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O -pipe -g -nostdinc -I. -I/usr2/Meloun/git/tegra/sys -I/usr2/Meloun/git/tegra/sys/contrib/libfdt -I/usr2/Meloun/git/tegra/sys/gnu/dts/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -march=3Darmv7a -funwind-tables -MD -MF.depend.elf_note.o -MTelf_note.o -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mfpu=3Dnone -std=3Diso9899:1999 -Werror /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S /usr2/Meloun/git/tegra/sys/sys/param.h:272:12: error: unexpected token in argument list extern int maxbcachebuf; ^ /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S:35:1: warning: DWARF2 only supports one section per compilation unit .pushsection .note.tag ; .balign 4 ; .long 2f - 1f ; .long 4f - 3f ; .long 1 ; 1: .asciz "FreeBSD" ; 2: .balign 4 ; 3: .long 1200033 ; 4: .balign 4 ; .popsection; ^ *** Error code 1 Michal > Modified: head/sys/fs/nfs/nfs_commonkrpc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 20:33:11 2017 (r3= 20061) > +++ head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 22:24:19 2017 (r3= 20062) > @@ -161,7 +161,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockre= q > struct ucred *cred, NFSPROC_T *p, int callback_retry_mult) > { > int rcvreserve, sndreserve; > - int pktscale; > + int pktscale, pktscalesav; > struct sockaddr *saddr; > struct ucred *origcred; > CLIENT *client; > @@ -210,6 +210,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockre= q > pktscale =3D 2; > if (pktscale > 64) > pktscale =3D 64; > + pktscalesav =3D pktscale; > /* > * soreserve() can fail if sb_max is too small, so shrink pktscale > * and try again if there is an error. > @@ -228,8 +229,12 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockr= eq > goto out; > } > do { > - if (error !=3D 0 && pktscale > 2) > + if (error !=3D 0 && pktscale > 2) { > + if (nmp !=3D NULL && nrp->nr_sotype =3D=3D SOCK_STREAM && > + pktscale =3D=3D pktscalesav) > + printf("Consider increasing kern.ipc.maxsockbuf\n"); > pktscale--; > + } > if (nrp->nr_sotype =3D=3D SOCK_DGRAM) { > if (nmp !=3D NULL) { > sndreserve =3D (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * > @@ -243,15 +248,19 @@ newnfs_connect(struct nfsmount *nmp, struct nfssock= req > if (nrp->nr_sotype !=3D SOCK_STREAM) > panic("nfscon sotype"); > if (nmp !=3D NULL) { > - sndreserve =3D (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + sndreserve =3D (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > - rcvreserve =3D (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + rcvreserve =3D (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > } else { > sndreserve =3D rcvreserve =3D 1024 * pktscale; > } > } > error =3D soreserve(so, sndreserve, rcvreserve); > + if (error !=3D 0 && nmp !=3D NULL && nrp->nr_sotype =3D=3D SOCK= _STREAM && > + pktscale <=3D 2) > + printf("Must increase kern.ipc.maxsockbuf or reduce" > + " rsize, wsize\n"); > } while (error !=3D 0 && pktscale > 2); > soclose(so); > if (error) { > > Modified: head/sys/fs/nfs/nfsport.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfs/nfsport.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/fs/nfs/nfsport.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -1016,7 +1016,7 @@ struct nfsreq { > }; > > #ifndef NFS_MAXBSIZE > -#define NFS_MAXBSIZE MAXBCACHEBUF > +#define NFS_MAXBSIZE (maxbcachebuf) > #endif > > /* > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 20:33:11 2017 = (r320061) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 22:24:19 2017 = (r320062) > @@ -4625,7 +4625,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct n= fsc > struct nfssockreq *nrp, uint32_t sequenceid, int mds, struct ucred *= cred, > NFSPROC_T *p) > { > - uint32_t crflags, *tl; > + uint32_t crflags, maxval, *tl; > struct nfsrv_descript nfsd; > struct nfsrv_descript *nd =3D &nfsd; > int error, irdcnt; > @@ -4643,8 +4643,8 @@ nfsrpc_createsession(struct nfsmount *nmp, struct n= fsc > /* Fill in fore channel attributes. */ > NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED); > *tl++ =3D 0; /* Header pad size */ > - *tl++ =3D txdr_unsigned(100000); /* Max request size */ > - *tl++ =3D txdr_unsigned(100000); /* Max response size */ > + *tl++ =3D txdr_unsigned(nmp->nm_wsize + NFS_MAXXDR);/* Max request = size */ > + *tl++ =3D txdr_unsigned(nmp->nm_rsize + NFS_MAXXDR);/* Max reply si= ze */ > *tl++ =3D txdr_unsigned(4096); /* Max response size cach= ed */ > *tl++ =3D txdr_unsigned(20); /* Max operations */ > *tl++ =3D txdr_unsigned(64); /* Max slots */ > @@ -4691,7 +4691,26 @@ nfsrpc_createsession(struct nfsmount *nmp, struct = nfsc > > /* Get the fore channel slot count. */ > NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED); > - tl +=3D 3; /* Skip the other counts. */ > + tl++; /* Skip the header pad size. */ > + > + /* Make sure nm_wsize is small enough. */ > + maxval =3D fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_wsize + NFS_MAXXDR) { > + if (nmp->nm_wsize > 8096) > + nmp->nm_wsize /=3D 2; > + else > + break; > + } > + > + /* Make sure nm_rsize is small enough. */ > + maxval =3D fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_rsize + NFS_MAXXDR) { > + if (nmp->nm_rsize > 8096) > + nmp->nm_rsize /=3D 2; > + else > + break; > + } > + > sep->nfsess_maxcache =3D fxdr_unsigned(int, *tl++); > tl++; > sep->nfsess_foreslots =3D fxdr_unsigned(uint16_t, *tl++); > > Modified: head/sys/kern/vfs_bio.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_bio.c Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/kern/vfs_bio.c Sat Jun 17 22:24:19 2017 (r320062) > @@ -131,6 +131,7 @@ static void bufkva_reclaim(vmem_t *, int); > static void bufkva_free(struct buf *); > static int buf_import(void *, void **, int, int); > static void buf_release(void *, void **, int); > +static void maxbcachebuf_adjust(void); > > #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ > defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) > @@ -245,6 +246,9 @@ SYSCTL_LONG(_vfs, OID_AUTO, barrierwrites, CTLFLAG_RW= , > SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_allowed, CTLFLAG_RD, > &unmapped_buf_allowed, 0, > "Permit the use of the unmapped i/o"); > +int maxbcachebuf =3D MAXBCACHEBUF; > +SYSCTL_INT(_vfs, OID_AUTO, maxbcachebuf, CTLFLAG_RDTUN, &maxbcachebuf, 0= , > + "Maximum size of a buffer cache block"); > > /* > * This lock synchronizes access to bd_request. > @@ -847,6 +851,29 @@ bd_wakeup(void) > } > > /* > + * Adjust the maxbcachbuf tunable. > + */ > +static void > +maxbcachebuf_adjust(void) > +{ > + int i; > + > + /* > + * maxbcachebuf must be a power of 2 >=3D MAXBSIZE. > + */ > + i =3D 2; > + while (i * 2 <=3D maxbcachebuf) > + i *=3D 2; > + maxbcachebuf =3D i; > + if (maxbcachebuf < MAXBSIZE) > + maxbcachebuf =3D MAXBSIZE; > + if (maxbcachebuf > MAXPHYS) > + maxbcachebuf =3D MAXPHYS; > + if (bootverbose !=3D 0 && maxbcachebuf !=3D MAXBCACHEBUF) > + printf("maxbcachebuf=3D%d\n", maxbcachebuf); > +} > + > +/* > * bd_speedup - speedup the buffer cache flushing code > */ > void > @@ -893,6 +920,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est= ) > */ > physmem_est =3D physmem_est * (PAGE_SIZE / 1024); > > + maxbcachebuf_adjust(); > /* > * The nominal buffer size (and minimum KVA allocation) is BKVASIZE= . > * For the first 64MB of ram nominally allocate sufficient buffers = to > @@ -1003,7 +1031,9 @@ bufinit(void) > struct buf *bp; > int i; > > - CTASSERT(MAXBCACHEBUF >=3D MAXBSIZE); > + KASSERT(maxbcachebuf >=3D MAXBSIZE, > + ("maxbcachebuf (%d) must be >=3D MAXBSIZE (%d)\n", maxbcachebuf= , > + MAXBSIZE)); > mtx_init(&bqlocks[QUEUE_DIRTY], "bufq dirty lock", NULL, MTX_DEF); > mtx_init(&bqlocks[QUEUE_EMPTY], "bufq empty lock", NULL, MTX_DEF); > for (i =3D QUEUE_CLEAN; i < QUEUE_CLEAN + CLEAN_QUEUES; i++) > @@ -1050,7 +1080,7 @@ bufinit(void) > * PAGE_SIZE. > */ > maxbufspace =3D (long)nbuf * BKVASIZE; > - hibufspace =3D lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF= * 10); > + hibufspace =3D lmax(3 * maxbufspace / 4, maxbufspace - maxbcachebuf= * 10); > lobufspace =3D (hibufspace / 20) * 19; /* 95% */ > bufspacethresh =3D lobufspace + (hibufspace - lobufspace) / 2; > > @@ -1062,9 +1092,9 @@ bufinit(void) > * The lower 1 MiB limit is the historical upper limit for > * hirunningspace. > */ > - hirunningspace =3D lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF)= , > + hirunningspace =3D lmax(lmin(roundup(hibufspace / 64, maxbcachebuf)= , > 16 * 1024 * 1024), 1024 * 1024); > - lorunningspace =3D roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); > + lorunningspace =3D roundup((hirunningspace * 2) / 3, maxbcachebuf); > > /* > * Limit the amount of malloc memory since it is wired permanently = into > @@ -3484,9 +3514,9 @@ getblk(struct vnode *vp, daddr_t blkno, int size, i= nt > KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) !=3D GB_KVAALLOC, > ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); > ASSERT_VOP_LOCKED(vp, "getblk"); > - if (size > MAXBCACHEBUF) > - panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, > - MAXBCACHEBUF); > + if (size > maxbcachebuf) > + panic("getblk: size(%d) > maxbcachebuf(%d)\n", size, > + maxbcachebuf); > if (!unmapped_buf_allowed) > flags &=3D ~(GB_UNMAPPED | GB_KVAALLOC); > > > Modified: head/sys/sys/param.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/param.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/sys/param.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -244,9 +244,7 @@ > * Filesystems can of course request smaller chunks. Actual > * backing memory uses a chunk size of a page (PAGE_SIZE). > * The default value here can be overridden on a per-architect= ure > - * basis by defining it in . This should > - * probably be done to increase its value, when MAXBCACHEBUF i= s > - * defined as a larger value in . > + * basis by defining it in . > * > * If you make BKVASIZE too small you risk seriously fragmenti= ng > * the buffer KVM map which may slow things down a bit. If yo= u > @@ -265,6 +263,14 @@ > #define BKVASIZE 16384 /* must be power of 2 */ > #endif > #define BKVAMASK (BKVASIZE-1) > + > +/* > + * This variable is tuned via vfs.maxbcachebuf and is set to the value o= f > + * MAXBCACHEBUF by default. > + */ > +#ifdef _KERNEL > +extern int maxbcachebuf; > +#endif > > /* > * MAXPATHLEN defines the longest permissible path length after expandin= g > From owner-svn-src-all@freebsd.org Sun Jun 18 16:43:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81D22D89689; Sun, 18 Jun 2017 16:43:59 +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 5C51A74777; Sun, 18 Jun 2017 16:43:59 +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 v5IGhwG3039480; Sun, 18 Jun 2017 16:43:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IGhv2Y039469; Sun, 18 Jun 2017 16:43:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706181643.v5IGhv2Y039469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 18 Jun 2017 16:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320072 - in head/sys: compat/linuxkpi/common/include/linux contrib/rdma/krping ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 16:43:59 -0000 Author: markj Date: Sun Jun 18 16:43:57 2017 New Revision: 320072 URL: https://svnweb.freebsd.org/changeset/base/320072 Log: Avoid including list.h in LinuxKPI headers. list.h includes a number of FreeBSD headers as a workaround for the LIST_HEAD name collision. To reduce pollution, avoid including list.h in commonly used headers when it is not explicitly needed. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11249 Modified: head/sys/compat/linuxkpi/common/include/linux/completion.h head/sys/compat/linuxkpi/common/include/linux/kernel.h head/sys/compat/linuxkpi/common/include/linux/kobject.h head/sys/compat/linuxkpi/common/include/linux/mm_types.h head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/contrib/rdma/krping/krping.c head/sys/ofed/drivers/infiniband/core/fmr_pool.c head/sys/ofed/drivers/infiniband/core/iwcm.c head/sys/ofed/drivers/infiniband/core/umem.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h Modified: head/sys/compat/linuxkpi/common/include/linux/completion.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/completion.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/compat/linuxkpi/common/include/linux/completion.h Sun Jun 18 16:43:57 2017 (r320072) @@ -32,7 +32,6 @@ #define _LINUX_COMPLETION_H_ #include -#include struct completion { unsigned int done; Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Jun 18 16:43:57 2017 (r320072) @@ -49,7 +49,6 @@ #include #include #include -#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/kobject.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kobject.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/compat/linuxkpi/common/include/linux/kobject.h Sun Jun 18 16:43:57 2017 (r320072) @@ -35,6 +35,7 @@ #include #include +#include #include struct kobject; Modified: head/sys/compat/linuxkpi/common/include/linux/mm_types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm_types.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/compat/linuxkpi/common/include/linux/mm_types.h Sun Jun 18 16:43:57 2017 (r320072) @@ -30,7 +30,6 @@ #define _LINUX_MM_TYPES_H_ #include -#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Sun Jun 18 16:43:57 2017 (r320072) @@ -37,7 +37,6 @@ #include #include -#include #include #include #include Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/contrib/rdma/krping/krping.c Sun Jun 18 16:43:57 2017 (r320072) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: head/sys/ofed/drivers/infiniband/core/fmr_pool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/fmr_pool.c Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/ofed/drivers/infiniband/core/fmr_pool.c Sun Jun 18 16:43:57 2017 (r320072) @@ -37,6 +37,7 @@ #include #include #include +#include #include Modified: head/sys/ofed/drivers/infiniband/core/iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/iwcm.c Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/ofed/drivers/infiniband/core/iwcm.c Sun Jun 18 16:43:57 2017 (r320072) @@ -50,6 +50,7 @@ #include #include #include +#include #include #include Modified: head/sys/ofed/drivers/infiniband/core/umem.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/umem.c Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/ofed/drivers/infiniband/core/umem.c Sun Jun 18 16:43:57 2017 (r320072) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h Sun Jun 18 12:59:43 2017 (r320071) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h Sun Jun 18 16:43:57 2017 (r320072) @@ -45,6 +45,7 @@ #include #include #include +#include #include "mthca_provider.h" #include "mthca_doorbell.h" From owner-svn-src-all@freebsd.org Sun Jun 18 17:20:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CABB4D8A601; Sun, 18 Jun 2017 17:20:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86F37759BE; Sun, 18 Jun 2017 17:20:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IHKmAB053020; Sun, 18 Jun 2017 17:20:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IHKm8i053018; Sun, 18 Jun 2017 17:20:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706181720.v5IHKm8i053018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 18 Jun 2017 17:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320073 - stable/11/sys/contrib/octeon-sdk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 17:20:49 -0000 Author: jhibbits Date: Sun Jun 18 17:20:48 2017 New Revision: 320073 URL: https://svnweb.freebsd.org/changeset/base/320073 Log: MFC r317928 Add necessary bits to get FreeBSD booting on the Unifi Security Gateway Summary: The Ubiquiti Unifi Security Gateway is virtually identical to the EdgeRouter Lite, with a smaller PCB and apparently a different board identifier. Simply adding the new board identifier alongside the ERL identifier, FreeBSD boots successfully, and can access the needed peripherals. Approved by: re(bdrewery) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h Sun Jun 18 16:43:57 2017 (r320072) +++ stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h Sun Jun 18 17:20:48 2017 (r320073) @@ -311,6 +311,7 @@ enum cvmx_board_types_enum { #endif #if defined(OCTEON_VENDOR_UBIQUITI) CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002, + CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004, #endif #if defined(OCTEON_VENDOR_RADISYS) CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, @@ -457,6 +458,7 @@ static inline const char *cvmx_board_type_to_string(en #endif #if defined(OCTEON_VENDOR_UBIQUITI) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) #endif #if defined(OCTEON_VENDOR_RADISYS) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Jun 18 16:43:57 2017 (r320072) +++ stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Jun 18 17:20:48 2017 (r320073) @@ -598,6 +598,7 @@ int cvmx_helper_board_get_mii_address(int ipd_port) #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: if (ipd_port > 2) return -1; return (7 - ipd_port); @@ -1499,7 +1500,8 @@ int __cvmx_helper_board_hardware_enable(int interface) } } #if defined(OCTEON_VENDOR_UBIQUITI) - else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 || + cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) { /* Configure ASX cloks for all ports on interface 0. */ if (interface == 0) @@ -1590,6 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cvmx_helper_boar #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: #endif #if defined(OCTEON_BOARD_CAPK_0100ND) case CVMX_BOARD_TYPE_CN3010_EVB_HS5: From owner-svn-src-all@freebsd.org Sun Jun 18 17:26:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6733D8A69F; Sun, 18 Jun 2017 17:26:55 +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 8CC5475D29; Sun, 18 Jun 2017 17:26:55 +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 v5IHQshg056027; Sun, 18 Jun 2017 17:26:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IHQsAD056026; Sun, 18 Jun 2017 17:26:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706181726.v5IHQsAD056026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Jun 2017 17:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320074 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 17:26:55 -0000 Author: ian Date: Sun Jun 18 17:26:54 2017 New Revision: 320074 URL: https://svnweb.freebsd.org/changeset/base/320074 Log: Only register as the platform DELAY() implementation if the setup of the global timer was successful, since the implementation tries to read it. Notably, if the platform has a variable-frequency global timer (because of dynamic frequency scaling), it doesn't set up the global timer for use as a system timecounter, and in that case it also can't use it for DELAY. Such platforms use different timer hardware for both timecounter and DELAY. Modified: head/sys/arm/arm/mpcore_timer.c Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Sun Jun 18 17:20:48 2017 (r320073) +++ head/sys/arm/arm/mpcore_timer.c Sun Jun 18 17:26:54 2017 (r320074) @@ -439,7 +439,12 @@ arm_tmr_attach(device_t dev) } #ifdef MULTIDELAY - arm_set_delay(arm_tmr_delay, sc); + /* + * We can register as the DELAY() implementation only if we successfully + * set up the global timer. + */ + if (tc_err == 0) + arm_set_delay(arm_tmr_delay, sc); #endif return (0); From owner-svn-src-all@freebsd.org Sun Jun 18 18:09:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7496AD8AF00; Sun, 18 Jun 2017 18:09:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4110B77205; Sun, 18 Jun 2017 18:09:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5II9VuH074933; Sun, 18 Jun 2017 18:09:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5II9VSD074932; Sun, 18 Jun 2017 18:09:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181809.v5II9VSD074932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 18:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320075 - stable/11/sys/fs/cuse X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 18:09:32 -0000 Author: hselasky Date: Sun Jun 18 18:09:31 2017 New Revision: 320075 URL: https://svnweb.freebsd.org/changeset/base/320075 Log: MFC r319355: Minor code optimisation. Avoid locking the global CUSE lock when the polling flags are zero. Approved by: re (kib) Modified: stable/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Sun Jun 18 17:26:54 2017 (r320074) +++ stable/11/sys/fs/cuse/cuse.c Sun Jun 18 18:09:31 2017 (r320075) @@ -1507,8 +1507,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* get the latest polling state from the server */ temp = cuse_client_poll(dev, POLLIN | POLLOUT, NULL); - cuse_lock(); if (temp & (POLLIN | POLLOUT)) { + cuse_lock(); if (temp & POLLIN) pcc->cflags |= CUSE_CLI_KNOTE_NEED_READ; if (temp & POLLOUT) @@ -1516,8 +1516,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* make sure the "knote" gets woken up */ cuse_server_wakeup_locked(pcc->server); + cuse_unlock(); } - cuse_unlock(); } } From owner-svn-src-all@freebsd.org Sun Jun 18 18:22:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20792D8B4B9; Sun, 18 Jun 2017 18:22:54 +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 D9C3F77A0B; Sun, 18 Jun 2017 18:22:53 +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 v5IIMr5N082734; Sun, 18 Jun 2017 18:22:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IIMqld082729; Sun, 18 Jun 2017 18:22:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706181822.v5IIMqld082729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Jun 2017 18:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320076 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 18:22:54 -0000 Author: ian Date: Sun Jun 18 18:22:52 2017 New Revision: 320076 URL: https://svnweb.freebsd.org/changeset/base/320076 Log: Add a driver for the imx6 EPIT timer that can be used as the system timecounter instead of the GPT timer, freeing up the more flexible GPT hardware for other uses. The EPIT driver is a standard (always in the kernel) driver, and the existing GPT driver is now optional and included only if you ask for device imx_gpt. Added: head/sys/arm/freescale/imx/imx_epit.c (contents, props changed) Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx6_ccm.c head/sys/arm/freescale/imx/imx6_ccmreg.h Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sun Jun 18 18:09:31 2017 (r320075) +++ head/sys/arm/freescale/imx/files.imx6 Sun Jun 18 18:22:52 2017 (r320076) @@ -15,9 +15,10 @@ arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx6_src.c standard +arm/freescale/imx/imx_epit.c standard arm/freescale/imx/imx_iomux.c standard arm/freescale/imx/imx_machdep.c standard -arm/freescale/imx/imx_gpt.c standard +arm/freescale/imx/imx_gpt.c optional imx_gpt arm/freescale/imx/imx_gpio.c optional gpio arm/freescale/imx/imx_i2c.c optional fsliic arm/freescale/imx/imx6_sdma.c optional sdma Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Sun Jun 18 18:09:31 2017 (r320075) +++ head/sys/arm/freescale/imx/imx6_ccm.c Sun Jun 18 18:22:52 2017 (r320076) @@ -94,8 +94,8 @@ ccm_init_gates(struct ccm_softc *sc) reg = CCGR0_AIPS_TZ1 | CCGR0_AIPS_TZ2 | CCGR0_ABPHDMA; WR4(sc, CCM_CCGR0, reg); - /* gpt, enet */ - reg = CCGR1_ENET | CCGR1_GPT; + /* enet, epit, gpt */ + reg = CCGR1_ENET | CCGR1_EPIT1 | CCGR1_GPT; WR4(sc, CCM_CCGR1, reg); /* ipmux & ipsync (bridges), iomux, i2c */ Modified: head/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccmreg.h Sun Jun 18 18:09:31 2017 (r320075) +++ head/sys/arm/freescale/imx/imx6_ccmreg.h Sun Jun 18 18:22:52 2017 (r320076) @@ -79,7 +79,10 @@ #define CCGR0_ABPHDMA (0x3 << 4) #define CCM_CCGR1 0x06C #define CCGR1_ENET (0x3 << 10) +#define CCGR1_EPIT1 (0x3 << 12) +#define CCGR1_EPIT2 (0x3 << 14) #define CCGR1_GPT (0x3 << 20) +#define CCGR1_GPT_SERIAL (0x3 << 22) #define CCM_CCGR2 0x070 #define CCGR2_HDMI_TX (0x3 << 0) #define CCGR2_HDMI_TX_ISFR (0x3 << 4) Added: head/sys/arm/freescale/imx/imx_epit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx_epit.c Sun Jun 18 18:22:52 2017 (r320076) @@ -0,0 +1,528 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * 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$"); + +/* + * Driver for imx Enhanced Programmable Interval Timer, a simple free-running + * counter device that can be used as the system timecounter. On imx5 a second + * instance of the device is used as the system eventtimer. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define EPIT_CR 0x00 /* Control register */ +#define EPIT_CR_CLKSRC_SHIFT 24 +#define EPIT_CR_CLKSRC_OFF 0 +#define EPIT_CR_CLKSRC_IPG 1 +#define EPIT_CR_CLKSRC_HFCLK 2 +#define EPIT_CR_CLKSRC_LFCLK 3 +#define EPIT_CR_STOPEN (1u << 21) +#define EPIT_CR_WAITEN (1u << 19) +#define EPIT_CR_DBGEN (1u << 18) +#define EPIT_CR_IOVW (1u << 17) +#define EPIT_CR_SWR (1u << 16) +#define EPIT_CR_RLD (1u << 3) +#define EPIT_CR_OCIEN (1u << 2) +#define EPIT_CR_ENMOD (1u << 1) +#define EPIT_CR_EN (1u << 0) + +#define EPIT_SR 0x04 /* Status register */ +#define EPIT_SR_OCIF (1u << 0) + +#define EPIT_LR 0x08 /* Load register */ +#define EPIT_CMPR 0x0c /* Compare register */ +#define EPIT_CNR 0x10 /* Counter register */ + +/* + * Define event timer limits. + * + * In theory our minimum period is 1 tick, because to setup a oneshot we don't + * need a read-modify-write sequence to calculate and set a compare register + * value while the counter is running. In practice the waveform diagrams in the + * manual make it appear that a setting of 1 might cause it to miss the event, + * so I'm setting the lower limit to 2 ticks. + */ +#define ET_MIN_TICKS 2 +#define ET_MAX_TICKS 0xfffffffe + +static u_int epit_tc_get_timecount(struct timecounter *tc); + +struct epit_softc { + device_t dev; + struct resource * memres; + struct resource * intres; + void * inthandle; + uint32_t clkfreq; + uint32_t ctlreg; + uint32_t period; + struct timecounter tc; + struct eventtimer et; + bool oneshot; +}; + +#ifndef MULTIDELAY +/* Global softc pointer for use in DELAY(). */ +static struct epit_softc *epit_sc; +#endif + +/* + * Probe data. For some reason, the standard linux dts files don't have + * compatible properties on the epit devices (other properties are missing too, + * like clocks, but we don't care as much about that). So our probe routine + * uses the name of the node (must contain "epit") and the address of the + * registers as identifying marks. + */ +static const uint32_t imx51_epit_ioaddr[2] = {0x73fac000, 0x73fb0000}; +static const uint32_t imx53_epit_ioaddr[2] = {0x53fac000, 0x53fb0000}; +static const uint32_t imx6_epit_ioaddr[2] = {0x020d0000, 0x020d4000}; + +/* ocd_data is number of units to instantiate on the platform */ +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6ul-epit", 1}, + {"fsl,imx6sx-epit", 1}, + {"fsl,imx6q-epit", 1}, + {"fsl,imx6dl-epit", 1}, + {"fsl,imx53-epit", 2}, + {"fsl,imx51-epit", 2}, + {"fsl,imx31-epit", 2}, + {"fsl,imx27-epit", 2}, + {"fsl,imx25-epit", 2}, + {NULL, 0} +}; + +static inline uint32_t +RD4(struct epit_softc *sc, bus_size_t offset) +{ + + return (bus_read_4(sc->memres, offset)); +} + +static inline void +WR4(struct epit_softc *sc, bus_size_t offset, uint32_t value) +{ + + bus_write_4(sc->memres, offset, value); +} + +static inline void +WR4B(struct epit_softc *sc, bus_size_t offset, uint32_t value) +{ + + bus_write_4(sc->memres, offset, value); + bus_barrier(sc->memres, offset, 4, BUS_SPACE_BARRIER_WRITE); +} + +static u_int +epit_read_counter(struct epit_softc *sc) +{ + + /* + * Hardware is a downcounter, adjust to look like it counts up for use + * with timecounter and DELAY. + */ + return (0xffffffff - RD4(sc, EPIT_CNR)); +} + +static void +epit_do_delay(int usec, void *arg) +{ + struct epit_softc *sc = arg; + uint64_t curcnt, endcnt, startcnt, ticks; + + /* + * Calculate the tick count with 64-bit values so that it works for any + * clock frequency. Loop until the hardware count reaches start+ticks. + * If the 32-bit hardware count rolls over while we're looping, just + * manually do a carry into the high bits after each read; don't worry + * that doing this on each loop iteration is inefficient -- we're trying + * to waste time here. + */ + ticks = 1 + ((uint64_t)usec * sc->clkfreq) / 1000000; + curcnt = startcnt = epit_read_counter(sc); + endcnt = startcnt + ticks; + while (curcnt < endcnt) { + curcnt = epit_read_counter(sc); + if (curcnt < startcnt) + curcnt += 1ULL << 32; + } +} + +static u_int +epit_tc_get_timecount(struct timecounter *tc) +{ + + return (epit_read_counter(tc->tc_priv)); +} + +static int +epit_tc_attach(struct epit_softc *sc) +{ + + /* When the counter hits zero, reload with 0xffffffff. Start it. */ + WR4(sc, EPIT_LR, 0xffffffff); + WR4(sc, EPIT_CR, sc->ctlreg | EPIT_CR_EN); + + /* Register as a timecounter. */ + sc->tc.tc_name = "EPIT"; + sc->tc.tc_quality = 1000; + sc->tc.tc_frequency = sc->clkfreq; + sc->tc.tc_counter_mask = 0xffffffff; + sc->tc.tc_get_timecount = epit_tc_get_timecount; + sc->tc.tc_priv = sc; + tc_init(&sc->tc); + + /* We are the DELAY() implementation. */ +#ifdef MULTIDELAY + arm_set_delay(epit_do_delay, sc); +#else + epit_sc = sc; +#endif + return (0); +} + +static int +epit_et_start(struct eventtimer *et, sbintime_t first, sbintime_t period) +{ + struct epit_softc *sc; + uint32_t ticks; + + sc = (struct epit_softc *)et->et_priv; + + /* + * Disable the timer and clear any pending status. The timer may be + * running or may have just expired if we're called to reschedule the + * next event before the previous event time arrives. + */ + WR4(sc, EPIT_CR, sc->ctlreg); + WR4(sc, EPIT_SR, EPIT_SR_OCIF); + if (period != 0) { + sc->oneshot = false; + ticks = ((uint32_t)et->et_frequency * period) >> 32; + } else if (first != 0) { + sc->oneshot = true; + ticks = ((uint32_t)et->et_frequency * first) >> 32; + } else { + return (EINVAL); + } + + /* Set the countdown load register and start the timer. */ + WR4(sc, EPIT_LR, ticks); + WR4B(sc, EPIT_CR, sc->ctlreg | EPIT_CR_EN); + + return (0); +} + +static int +epit_et_stop(struct eventtimer *et) +{ + struct epit_softc *sc; + + sc = (struct epit_softc *)et->et_priv; + + /* Disable the timer and clear any pending status. */ + WR4(sc, EPIT_CR, sc->ctlreg); + WR4B(sc, EPIT_SR, EPIT_SR_OCIF); + + return (0); +} + +static int +epit_intr(void *arg) +{ + struct epit_softc *sc; + uint32_t status; + + sc = arg; + + /* + * Disable a one-shot timer until a new event is scheduled so that the + * counter doesn't wrap and fire again. Do this before clearing the + * status since a short period would make it fire again really soon. + * + * Clear interrupt status before invoking event callbacks. The callback + * often sets up a new one-shot timer event and if the interval is short + * enough it can fire before we get out of this function. If we cleared + * at the bottom we'd miss the interrupt and hang until the clock wraps. + */ + if (sc->oneshot) + WR4(sc, EPIT_CR, sc->ctlreg); + + status = RD4(sc, EPIT_SR); + WR4B(sc, EPIT_SR, status); + + if ((status & EPIT_SR_OCIF) == 0) + return (FILTER_STRAY); + + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + + return (FILTER_HANDLED); +} + +static int +epit_et_attach(struct epit_softc *sc) +{ + int err, rid; + + rid = 0; + sc->intres = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->intres == NULL) { + device_printf(sc->dev, "could not allocate interrupt\n"); + return (ENXIO); + } + + err = bus_setup_intr(sc->dev, sc->intres, INTR_TYPE_CLK | INTR_MPSAFE, + epit_intr, NULL, sc, &sc->inthandle); + if (err != 0) { + device_printf(sc->dev, "unable to setup the irq handler\n"); + return (err); + } + + /* To be an eventtimer, we need interrupts enabled. */ + sc->ctlreg |= EPIT_CR_OCIEN; + + /* Register as an eventtimer. */ + sc->et.et_name = "EPIT"; + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; + sc->et.et_quality = 1000; + sc->et.et_frequency = sc->clkfreq; + sc->et.et_min_period = ((uint64_t)ET_MIN_TICKS << 32) / sc->clkfreq; + sc->et.et_max_period = ((uint64_t)ET_MAX_TICKS << 32) / sc->clkfreq; + sc->et.et_start = epit_et_start; + sc->et.et_stop = epit_et_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + return (0); +} + +static int +epit_probe(device_t dev) +{ + struct resource *memres; + rman_res_t ioaddr; + int num_units, rid, unit; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + /* + * The FDT data for imx5 and imx6 EPIT hardware is missing or broken, + * but it may get fixed some day, so first just do a normal check. We + * return success if the compatible string matches and we haven't + * already instantiated the number of units needed on this platform. + */ + unit = device_get_unit(dev); + num_units = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + if (unit < num_units) { + device_set_desc(dev, "i.MX EPIT timer"); + return (BUS_PROBE_DEFAULT); + } + + /* + * No compat string match, but for imx6 all the data we need is in the + * node except the compat string, so do our own compatibility check + * using the device name of the node and the register block address. + */ + if (strstr(ofw_bus_get_name(dev), "epit") == NULL) + return (ENXIO); + + rid = 0; + memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_UNMAPPED); + if (memres == NULL) + return (ENXIO); + ioaddr = rman_get_start(memres); + bus_free_resource(dev, SYS_RES_MEMORY, memres); + + if (imx_soc_family() == 6) { + if (unit > 0) + return (ENXIO); + if (ioaddr != imx6_epit_ioaddr[unit]) + return (ENXIO); + } else { + if (unit > 1) + return (ENXIO); + switch (imx_soc_type()) { + case IMXSOC_51: + if (ioaddr != imx51_epit_ioaddr[unit]) + return (ENXIO); + break; + case IMXSOC_53: + if (ioaddr != imx53_epit_ioaddr[unit]) + return (ENXIO); + break; + default: + return (ENXIO); + } + /* + * XXX Right now we have no way to handle the fact that the + * entire EPIT node is missing, which means no interrupt data. + */ + return (ENXIO); + } + + device_set_desc(dev, "i.MX EPIT timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +epit_attach(device_t dev) +{ + struct epit_softc *sc; + int err, rid; + uint32_t clksrc; + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->memres = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->memres == NULL) { + device_printf(sc->dev, "could not allocate registers\n"); + return (ENXIO); + } + + /* + * For now, use ipg (66 MHz). Some day we should get this from fdt. + */ + clksrc = EPIT_CR_CLKSRC_IPG; + + switch (clksrc) { + default: + device_printf(dev, + "Unsupported clock source '%d', using IPG\n", clksrc); + /* FALLTHROUGH */ + case EPIT_CR_CLKSRC_IPG: + sc->clkfreq = imx_ccm_ipg_hz(); + break; + case EPIT_CR_CLKSRC_HFCLK: + sc->clkfreq = imx_ccm_perclk_hz(); + break; + case EPIT_CR_CLKSRC_LFCLK: + sc->clkfreq = 32768; + break; + } + + /* + * Init: stop operations and clear all options, then set up options and + * clock source, then do a soft-reset and wait for it to complete. + */ + WR4(sc, EPIT_CR, 0); + + sc->ctlreg = + (clksrc << EPIT_CR_CLKSRC_SHIFT) | /* Use selected clock */ + EPIT_CR_ENMOD | /* Reload counter on enable */ + EPIT_CR_RLD | /* Reload counter from LR */ + EPIT_CR_STOPEN | /* Run in STOP mode */ + EPIT_CR_WAITEN | /* Run in WAIT mode */ + EPIT_CR_DBGEN; /* Run in DEBUG mode */ + + WR4B(sc, EPIT_CR, sc->ctlreg | EPIT_CR_SWR); + while (RD4(sc, EPIT_CR) & EPIT_CR_SWR) + continue; + + /* + * Unit 0 is the timecounter, 1 (if instantiated) is the eventtimer. + */ + if (device_get_unit(sc->dev) == 0) + err = epit_tc_attach(sc); + else + err = epit_et_attach(sc); + + return (err); +} + +static device_method_t epit_methods[] = { + DEVMETHOD(device_probe, epit_probe), + DEVMETHOD(device_attach, epit_attach), + + DEVMETHOD_END +}; + +static driver_t epit_driver = { + "imx_epit", + epit_methods, + sizeof(struct epit_softc), +}; + +static devclass_t epit_devclass; + +EARLY_DRIVER_MODULE(imx_epit, simplebus, epit_driver, epit_devclass, 0, + 0, BUS_PASS_TIMER); + +#ifndef MULTIDELAY + +/* + * Hand-calibrated delay-loop counter. This was calibrated on an i.MX6 running + * at 792mhz. It will delay a bit too long on slower processors -- that's + * better than not delaying long enough. In practice this is unlikely to get + * used much since the clock driver is one of the first to start up, and once + * we're attached the delay loop switches to using the timer hardware. + */ +static const int epit_delay_count = 78; + +void +DELAY(int usec) +{ + uint64_t ticks; + + /* If the timer hardware is not accessible, just use a loop. */ + if (epit_sc == NULL) { + while (usec-- > 0) + for (ticks = 0; ticks < epit_delay_count; ++ticks) + cpufunc_nullop(); + return; + } else { + epit_do_delay(usec, epit_sc); + } +} + +#endif From owner-svn-src-all@freebsd.org Sun Jun 18 18:23:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EBEBD8B534; Sun, 18 Jun 2017 18:23:41 +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 4920E77B44; Sun, 18 Jun 2017 18:23:41 +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 v5IINe7L082805; Sun, 18 Jun 2017 18:23:40 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IINeHi082803; Sun, 18 Jun 2017 18:23:40 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706181823.v5IINeHi082803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 18 Jun 2017 18:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320077 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 18:23:41 -0000 Author: alc Date: Sun Jun 18 18:23:39 2017 New Revision: 320077 URL: https://svnweb.freebsd.org/changeset/base/320077 Log: Change blist_alloc()'s allocation policy from first-fit to next-fit so that disk writes are more likely to be sequential. This change is beneficial on both the solid state and mechanical disks that I've tested. (A similar change in allocation policy was made by DragonFly BSD in 2013 to speed up Poudriere with "stressful memory parameters".) Increase the width of blst_meta_alloc()'s parameter "skip" and the local variables whose values are derived from it to 64 bits. (This matches the width of the field "skip" that is stored in the structure "blist" and passed to blst_meta_alloc().) Eliminate a pointless check for a NULL blist_t. Simplify blst_meta_alloc()'s handling of the ALL-FREE case. Address nearby style errors. Reviewed by: kib, markj MFC after: 5 weeks Differential Revision: https://reviews.freebsd.org/D11247 Modified: head/sys/kern/subr_blist.c head/sys/sys/blist.h Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sun Jun 18 18:22:52 2017 (r320076) +++ head/sys/kern/subr_blist.c Sun Jun 18 18:23:39 2017 (r320077) @@ -121,8 +121,8 @@ void panic(const char *ctl, ...); */ 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 blk, - daddr_t count, daddr_t radix, int skip); +static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, + daddr_t radix, daddr_t skip, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, int skip, daddr_t blk); @@ -177,6 +177,7 @@ blist_create(daddr_t blocks, int flags) bl->bl_blocks = blocks; bl->bl_radix = radix; bl->bl_skip = skip; + bl->bl_cursor = 0; nodes = 1 + blst_radix_init(NULL, radix, bl->bl_skip, blocks); bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { @@ -218,13 +219,23 @@ blist_alloc(blist_t bl, daddr_t count) { daddr_t blk; - if (bl != NULL && count <= bl->bl_root->bm_bighint) { + /* + * This loop iterates at most twice. An allocation failure in the + * first iteration leads to a second iteration only if the cursor was + * non-zero. When the cursor is zero, an allocation failure will + * reduce the hint, stopping further iterations. + */ + while (count <= bl->bl_root->bm_bighint) { if (bl->bl_radix == BLIST_BMAP_RADIX) blk = blst_leaf_alloc(bl->bl_root, 0, count); else blk = blst_meta_alloc(bl->bl_root, 0, count, - bl->bl_radix, bl->bl_skip); - return (blk); + bl->bl_radix, bl->bl_skip, bl->bl_cursor); + if (blk != SWAPBLK_NONE) { + bl->bl_cursor = blk + count; + return (blk); + } else if (bl->bl_cursor != 0) + bl->bl_cursor = 0; } return (SWAPBLK_NONE); } @@ -424,16 +435,12 @@ blst_leaf_alloc( */ static daddr_t -blst_meta_alloc( - blmeta_t *scan, - daddr_t blk, - daddr_t count, - daddr_t radix, - int skip -) { - daddr_t r; - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); +blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t cursor) +{ + daddr_t i, next_skip, r; + int child; + bool scan_from_start; if (scan->u.bmu_avail < count) { /* @@ -444,6 +451,7 @@ blst_meta_alloc( scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + next_skip = skip / BLIST_META_RADIX; /* * An ALL-FREE meta node requires special handling before allocating @@ -457,13 +465,11 @@ blst_meta_alloc( * meta node cannot have a terminator in any subtree. */ for (i = 1; i <= skip; i += next_skip) { - if (next_skip == 1) { + if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; - scan[i].bm_bighint = BLIST_BMAP_RADIX; - } else { - scan[i].bm_bighint = radix; + else scan[i].u.bmu_avail = radix; - } + scan[i].bm_bighint = radix; } } else { radix /= BLIST_META_RADIX; @@ -476,7 +482,10 @@ blst_meta_alloc( */ panic("allocation too large"); } - for (i = 1; i <= skip; i += next_skip) { + scan_from_start = cursor == blk; + child = (cursor - blk) / radix; + blk += child * radix; + 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. @@ -485,7 +494,8 @@ blst_meta_alloc( r = blst_leaf_alloc(&scan[i], blk, count); } else { r = blst_meta_alloc(&scan[i], blk, count, - radix, next_skip - 1); + radix, next_skip - 1, cursor > blk ? + cursor : blk); } if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; @@ -503,9 +513,10 @@ blst_meta_alloc( /* * We couldn't allocate count in this subtree, update bighint. */ - if (scan->bm_bighint >= count) + if (scan_from_start && scan->bm_bighint >= count) scan->bm_bighint = count - 1; - return(SWAPBLK_NONE); + + return (SWAPBLK_NONE); } /* Modified: head/sys/sys/blist.h ============================================================================== --- head/sys/sys/blist.h Sun Jun 18 18:22:52 2017 (r320076) +++ head/sys/sys/blist.h Sun Jun 18 18:23:39 2017 (r320077) @@ -82,6 +82,7 @@ typedef struct blist { daddr_t bl_blocks; /* area of coverage */ daddr_t bl_radix; /* coverage radix */ daddr_t bl_skip; /* starting skip */ + daddr_t bl_cursor; /* next-fit search starts at */ blmeta_t *bl_root; /* root of radix tree */ } *blist_t; From owner-svn-src-all@freebsd.org Sun Jun 18 19:22:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADEA9D8C3D4; Sun, 18 Jun 2017 19:22:06 +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 8923F79250; Sun, 18 Jun 2017 19:22:06 +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 v5IJM5lJ007767; Sun, 18 Jun 2017 19:22:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IJM5x2007763; Sun, 18 Jun 2017 19:22:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706181922.v5IJM5x2007763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 18 Jun 2017 19:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320078 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 19:22:06 -0000 Author: markj Date: Sun Jun 18 19:22:05 2017 New Revision: 320078 URL: https://svnweb.freebsd.org/changeset/base/320078 Log: Add kthread parking support to the LinuxKPI. Submitted by: kmacy (original version) Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11264 Modified: head/sys/compat/linuxkpi/common/include/linux/kthread.h head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/compat/linuxkpi/common/src/linux_current.c head/sys/compat/linuxkpi/common/src/linux_kthread.c Modified: head/sys/compat/linuxkpi/common/include/linux/kthread.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kthread.h Sun Jun 18 18:23:39 2017 (r320077) +++ head/sys/compat/linuxkpi/common/include/linux/kthread.h Sun Jun 18 19:22:05 2017 (r320078) @@ -48,15 +48,26 @@ __task; \ }) -#define in_atomic() ({ \ - linux_in_atomic(); \ -}) +int linux_kthread_stop(struct task_struct *); +bool linux_kthread_should_stop_task(struct task_struct *); +bool linux_kthread_should_stop(void); +int linux_kthread_park(struct task_struct *); +void linux_kthread_parkme(void); +bool linux_kthread_should_park(void); +void linux_kthread_unpark(struct task_struct *); +void linux_kthread_fn(void *); +struct task_struct *linux_kthread_setup_and_run(struct thread *, + linux_task_fn_t *, void *arg); +int linux_in_atomic(void); -extern int kthread_stop(struct task_struct *); -extern bool kthread_should_stop_task(struct task_struct *); -extern bool kthread_should_stop(void); -extern void linux_kthread_fn(void *); -extern struct task_struct *linux_kthread_setup_and_run(struct thread *, linux_task_fn_t *, void *arg); -extern int linux_in_atomic(void); +#define kthread_stop(task) linux_kthread_stop(task) +#define kthread_should_stop() linux_kthread_should_stop() +#define kthread_should_stop_task(task) linux_kthread_should_stop_task(task) +#define kthread_park(task) linux_kthread_park(task) +#define kthread_parkme() linux_kthread_parkme() +#define kthread_should_park() linux_kthread_should_park() +#define kthread_unpark(task) linux_kthread_unpark(task) -#endif /* _LINUX_KTHREAD_H_ */ +#define in_atomic() linux_in_atomic() + +#endif /* _LINUX_KTHREAD_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Sun Jun 18 18:23:39 2017 (r320077) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Sun Jun 18 19:22:05 2017 (r320078) @@ -54,6 +54,7 @@ #define TASK_UNINTERRUPTIBLE 0x0002 #define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) #define TASK_WAKING 0x0100 +#define TASK_PARKED 0x0200 struct task_struct { struct thread *task_thread; Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Sun Jun 18 18:23:39 2017 (r320077) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Sun Jun 18 19:22:05 2017 (r320078) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -68,6 +69,8 @@ linux_alloc_current(struct thread *td, int flags) ts->pid = td->td_tid; atomic_set(&ts->usage, 1); ts->state = TASK_RUNNING; + init_completion(&ts->parked); + init_completion(&ts->exited); proc = td->td_proc; Modified: head/sys/compat/linuxkpi/common/src/linux_kthread.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_kthread.c Sun Jun 18 18:23:39 2017 (r320077) +++ head/sys/compat/linuxkpi/common/src/linux_kthread.c Sun Jun 18 19:22:05 2017 (r320078) @@ -43,21 +43,21 @@ enum { }; bool -kthread_should_stop_task(struct task_struct *task) +linux_kthread_should_stop_task(struct task_struct *task) { return (atomic_read(&task->kthread_flags) & KTHREAD_SHOULD_STOP_MASK); } bool -kthread_should_stop(void) +linux_kthread_should_stop(void) { return (atomic_read(¤t->kthread_flags) & KTHREAD_SHOULD_STOP_MASK); } int -kthread_stop(struct task_struct *task) +linux_kthread_stop(struct task_struct *task) { int retval; @@ -66,6 +66,7 @@ kthread_stop(struct task_struct *task) * kthread_stop(): */ atomic_or(KTHREAD_SHOULD_STOP_MASK, &task->kthread_flags); + kthread_unpark(task); wake_up_process(task); wait_for_completion(&task->exited); @@ -78,6 +79,53 @@ kthread_stop(struct task_struct *task) return (retval); } +int +linux_kthread_park(struct task_struct *task) +{ + + atomic_or(KTHREAD_SHOULD_PARK_MASK, &task->kthread_flags); + wake_up_process(task); + wait_for_completion(&task->parked); + return (0); +} + +void +linux_kthread_parkme(void) +{ + struct task_struct *task; + + task = current; + set_task_state(task, TASK_PARKED | TASK_UNINTERRUPTIBLE); + while (linux_kthread_should_park()) { + while ((atomic_fetch_or(KTHREAD_IS_PARKED_MASK, + &task->kthread_flags) & KTHREAD_IS_PARKED_MASK) == 0) + complete(&task->parked); + schedule(); + set_task_state(task, TASK_PARKED | TASK_UNINTERRUPTIBLE); + } + atomic_andnot(KTHREAD_IS_PARKED_MASK, &task->kthread_flags); + set_task_state(task, TASK_RUNNING); +} + +bool +linux_kthread_should_park(void) +{ + struct task_struct *task; + + task = current; + return (atomic_read(&task->kthread_flags) & KTHREAD_SHOULD_PARK_MASK); +} + +void +linux_kthread_unpark(struct task_struct *task) +{ + + atomic_andnot(KTHREAD_SHOULD_PARK_MASK, &task->kthread_flags); + if ((atomic_fetch_andnot(KTHREAD_IS_PARKED_MASK, &task->kthread_flags) & + KTHREAD_IS_PARKED_MASK) != 0) + wake_up_state(task, TASK_PARKED); +} + struct task_struct * linux_kthread_setup_and_run(struct thread *td, linux_task_fn_t *task_fn, void *arg) { @@ -104,10 +152,10 @@ linux_kthread_fn(void *arg __unused) { struct task_struct *task = current; - if (kthread_should_stop_task(task) == 0) + if (linux_kthread_should_stop_task(task) == 0) task->task_ret = task->task_fn(task->task_data); - if (kthread_should_stop_task(task) != 0) { + if (linux_kthread_should_stop_task(task) != 0) { struct thread *td = curthread; /* let kthread_stop() free data */ @@ -118,4 +166,3 @@ linux_kthread_fn(void *arg __unused) } kthread_exit(); } - From owner-svn-src-all@freebsd.org Sun Jun 18 20:55:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 821FED8DDAE; Sun, 18 Jun 2017 20:55:47 +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 527757BA79; Sun, 18 Jun 2017 20:55:47 +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 v5IKtku3045333; Sun, 18 Jun 2017 20:55:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IKtkW9045332; Sun, 18 Jun 2017 20:55:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706182055.v5IKtkW9045332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jun 2017 20:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320079 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 20:55:47 -0000 Author: pfg Date: Sun Jun 18 20:55:46 2017 New Revision: 320079 URL: https://svnweb.freebsd.org/changeset/base/320079 Log: ext2fs: Enable RO huge_file feature support. We can have support for reading ext4 "huge" files but we can't write (anything) on ext4. and some filesystem. Formally enable the feature so that we can mount such filesystems. Submitted by: Fedor Uponov Differential Revision: https://reviews.freebsd.org/D11209 Modified: head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Sun Jun 18 19:22:05 2017 (r320078) +++ head/sys/fs/ext2fs/ext2fs.h Sun Jun 18 20:55:46 2017 (r320079) @@ -259,6 +259,7 @@ struct csum { #define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ + EXT2F_ROCOMPAT_HUGE_FILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE #define EXT4F_RO_INCOMPAT_SUPP (EXT2F_INCOMPAT_EXTENTS | \ From owner-svn-src-all@freebsd.org Sun Jun 18 20:58:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC76BD8DE30 for ; Sun, 18 Jun 2017 20:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm18.bullet.mail.ne1.yahoo.com (nm18.bullet.mail.ne1.yahoo.com [98.138.90.81]) (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 8BAC27BBF3 for ; Sun, 18 Jun 2017 20:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1497819530; bh=xZeruc6rTlxn6jvWmaMZ303p/XgkG8n1C5DZi6emuU0=; h=Subject:From:To:References:Date:In-Reply-To:From:Subject; b=HvHbqPXNej2JJjW4QtXEI5uvNVZ59TM5m/RU0dUsbWMgNlINTNru83nh5MT3sKRXz+yvS8XeUv/UUiHqGVjD9p5coVRo5URJsRnHYbKhEKCzuor7ScQDeWwYjBvWQE16X+LRnjFnMwIfbN7A8u0e+thoORaA4JWwND2m23hGrb4XvqgnJH9el3/WbekWhew0SYVcASyjZLB9T0zylRQg/scbKyPLPWeaacd7v/udY2I1wQMAt6EP4hU4g2Sph4nM0Z7fjH8AAlrtjwxwtUJseZnPgN/d8Y/WKCM9WhJW5XW1m5IRCRhWDja2+UTU1LUEH3sVnrK8Toquzi3wrsgzqw== Received: from [98.138.100.113] by nm18.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jun 2017 20:58:50 -0000 Received: from [98.138.84.45] by tm104.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jun 2017 20:58:50 -0000 Received: from [127.0.0.1] by smtp113.mail.ne1.yahoo.com with NNFMP; 18 Jun 2017 20:58:50 -0000 X-Yahoo-Newman-Id: 309492.14267.bm@smtp113.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 0RVrzsAVM1nWZxR1AUlHlmMU.aqLo9gUICXCNOwNHY7xq13 OxQTeVF2mhX37no851hFmf8dTsnPNuPZFD1HUhoHt7Y6WhdoKnU.qI9uC2bL 42V50zw_R_bKNp8IvF8dKxXtUxJj_JVLRz66zplh6wCRy_cvY9PP7FWQZ_i1 lYT1nkZ3AikWnJVhUQI1sCZHLmQkdl4phaC3wYECpgbty_HbKLd0RnM.3ja. QuF3N91kXV810qCTekGkv7aDsGhmD7S0Fxh8Na3I3EbCfnBjJYDZTuLkEyw0 5E4QVwBlD7p.7PepybN1.6ywJeMHQ.QdKXu9gCsuUeeKsvx9WAIfl0a3Im5h hBmy3jpSMquh8yDVbhG0C2E0gVMm10xNiruPJMN3xZ7iEf55GmAqbwFUrmVW WOVCWynPMrv5Gu1.vLFHXU13V4Icz3BVX86bJ7JdlQJG6ythx2Tzj6sWWlih AfFrA9S3u1S9jMS0d4HgSiKeJeNW6WKw8sJE04RXwWUmRpgdGpnUDaCEpnYg RBVOFBn3s3hzoRpBWFd.mHSxiEOX80mhgs.c9sevT4dXB X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320079 - head/sys/fs/ext2fs From: Pedro Giffuni To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706182055.v5IKtkW9045332@repo.freebsd.org> Organization: FreeBSD Message-ID: <53ce2c2f-ed6d-cb91-9a9b-1c33668e246d@FreeBSD.org> Date: Sun, 18 Jun 2017 15:58:48 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706182055.v5IKtkW9045332@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 20:58:57 -0000 On 06/18/17 15:55, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Jun 18 20:55:46 2017 > New Revision: 320079 > URL: https://svnweb.freebsd.org/changeset/base/320079 > > Log: > ext2fs: Enable RO huge_file feature support. > > We can have support for reading ext4 "huge" files but we can't write > (anything) on ext4. and some filesystem. Formally enable the feature so > that we can mount such filesystems. > > Submitted by: Fedor Uponov It's Uporov ... sorry. Pedro. > Differential Revision: https://reviews.freebsd.org/D11209 > > From owner-svn-src-all@freebsd.org Sun Jun 18 21:03:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F05FD8E62F; Sun, 18 Jun 2017 21:03: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 2ACF37C6C8; Sun, 18 Jun 2017 21:03: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 v5IL3ZOI049295; Sun, 18 Jun 2017 21:03:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IL3Zh5049294; Sun, 18 Jun 2017 21:03:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706182103.v5IL3Zh5049294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 18 Jun 2017 21:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320080 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:03:36 -0000 Author: imp Date: Sun Jun 18 21:03:35 2017 New Revision: 320080 URL: https://svnweb.freebsd.org/changeset/base/320080 Log: Load the transmit dma buffer at attach time as well. We don't need to load and unload it all the time since the buffer never changes. In addition, we were loading it with a hardware spin lock held, which makes the sleepable lock in busdma (for the bounce pages) trigger a witness warning, as well as ipend being called with it held by uart, which made it impossible to unload. These differences don't matter with the v4 busdma implementation, but they do with the v6 implementation since the latter likes to bounce transactions more, and will always do so for Atmel's driver. It's more efficient as well as being more correct. Modified: head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Sun Jun 18 20:55:46 2017 (r320079) +++ head/sys/arm/at91/uart_dev_at91usart.c Sun Jun 18 21:03:35 2017 (r320080) @@ -72,6 +72,7 @@ struct at91_usart_softc { struct uart_softc base; bus_dma_tag_t tx_tag; bus_dmamap_t tx_map; + bus_addr_t tx_paddr; uint32_t flags; #define HAS_TIMEOUT 0x1 #define USE_RTS0_WORKAROUND 0x2 @@ -472,6 +473,9 @@ at91_usart_bus_attach(struct uart_softc *sc) err = bus_dmamap_create(atsc->tx_tag, 0, &atsc->tx_map); if (err != 0) goto errout; + if (bus_dmamap_load(atsc->tx_tag, atsc->tx_map, sc->sc_txbuf, + sc->sc_txfifosz, at91_getaddr, &atsc->tx_paddr, 0) != 0) + goto errout; if (atsc->flags & HAS_TIMEOUT) { /* @@ -547,29 +551,22 @@ errout: static int at91_usart_bus_transmit(struct uart_softc *sc) { - bus_addr_t addr; struct at91_usart_softc *atsc; int err; err = 0; atsc = (struct at91_usart_softc *)sc; uart_lock(sc->sc_hwmtx); - if (bus_dmamap_load(atsc->tx_tag, atsc->tx_map, sc->sc_txbuf, - sc->sc_txdatasz, at91_getaddr, &addr, 0) != 0) { - err = EAGAIN; - goto errout; - } bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, BUS_DMASYNC_PREWRITE); sc->sc_txbusy = 1; /* * Setup the PDC to transfer the data and interrupt us when it * is done. We've already requested the interrupt. */ - WR4(&sc->sc_bas, PDC_TPR, addr); + WR4(&sc->sc_bas, PDC_TPR, atsc->tx_paddr); WR4(&sc->sc_bas, PDC_TCR, sc->sc_txdatasz); WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_TXTEN); WR4(&sc->sc_bas, USART_IER, USART_CSR_ENDTX); -errout: uart_unlock(sc->sc_hwmtx); return (err); } @@ -666,7 +663,6 @@ at91_usart_bus_ipend(struct uart_softc *sc) if (csr & USART_CSR_ENDTX) { bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(atsc->tx_tag, atsc->tx_map); } if (csr & (USART_CSR_TXRDY | USART_CSR_ENDTX)) { if (sc->sc_txbusy) From owner-svn-src-all@freebsd.org Sun Jun 18 21:03:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A90CD8E671; Sun, 18 Jun 2017 21:03:44 +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 59D807C731; Sun, 18 Jun 2017 21:03:44 +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 v5IL3hnG049349; Sun, 18 Jun 2017 21:03:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IL3h2L049348; Sun, 18 Jun 2017 21:03:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706182103.v5IL3h2L049348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 18 Jun 2017 21:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320081 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:03:44 -0000 Author: imp Date: Sun Jun 18 21:03:43 2017 New Revision: 320081 URL: https://svnweb.freebsd.org/changeset/base/320081 Log: Include the generic cpu.h instead of the v4/v6 specific cpu.h. This one change allows it to be compiled either for v4 or v6. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Jun 18 21:03:35 2017 (r320080) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Jun 18 21:03:43 2017 (r320081) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #define BUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size From owner-svn-src-all@freebsd.org Sun Jun 18 21:03:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BA33D8E6AC; Sun, 18 Jun 2017 21:03:49 +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 3A6A07C7A7; Sun, 18 Jun 2017 21:03:49 +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 v5IL3mHK049402; Sun, 18 Jun 2017 21:03:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IL3mu1049400; Sun, 18 Jun 2017 21:03:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706182103.v5IL3mu1049400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 18 Jun 2017 21:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320082 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:03:49 -0000 Author: imp Date: Sun Jun 18 21:03:48 2017 New Revision: 320082 URL: https://svnweb.freebsd.org/changeset/base/320082 Log: Create a new option ARM_USE_V6_BUSDMA to force an armv4/5 kernel to use the armv6 busdma interface. This interface uses more memory than the armv4 one, but bounces more data more often so may be more correct than the armv4 one. It is intended for debugging purposes only at the moment. Modified: head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Jun 18 21:03:43 2017 (r320081) +++ head/sys/conf/files.arm Sun Jun 18 21:03:48 2017 (r320082) @@ -25,8 +25,8 @@ arm/arm/blockio.S standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_base.c optional fdt arm/arm/bus_space_generic.c standard -arm/arm/busdma_machdep-v4.c optional !armv6 -arm/arm/busdma_machdep-v6.c optional armv6 +arm/arm/busdma_machdep-v4.c optional !armv6 !ARM_USE_V6_BUSDMA +arm/arm/busdma_machdep-v6.c optional armv6 | ARM_USE_V6_BUSDMA arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sun Jun 18 21:03:43 2017 (r320081) +++ head/sys/conf/options.arm Sun Jun 18 21:03:48 2017 (r320082) @@ -4,7 +4,7 @@ ARM_CACHE_LOCK_ENABLE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPT opt_global.h ARM_MANY_BOARD opt_global.h -NKPT2PG opt_pmap.h +ARM_USE_V6_BUSDMA opt_global.h ARM_WANT_TP_ADDRESS opt_global.h COUNTS_PER_SEC opt_timer.h CPSW_ETHERSWITCH opt_cpsw.h @@ -35,6 +35,7 @@ KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h MULTIDELAY opt_global.h +NKPT2PG opt_pmap.h PHYSADDR opt_global.h PLATFORM opt_global.h PLATFORM_SMP opt_global.h From owner-svn-src-all@freebsd.org Sun Jun 18 21:03:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AABEED8E6DF; Sun, 18 Jun 2017 21:03:54 +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 785E87C84F; Sun, 18 Jun 2017 21:03:54 +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 v5IL3rR7049456; Sun, 18 Jun 2017 21:03:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IL3rAi049455; Sun, 18 Jun 2017 21:03:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706182103.v5IL3rAi049455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 18 Jun 2017 21:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320083 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:03:54 -0000 Author: imp Date: Sun Jun 18 21:03:53 2017 New Revision: 320083 URL: https://svnweb.freebsd.org/changeset/base/320083 Log: Put ARM_USE_V6_BUSDMA into the SAM9G20EK reference kernel to try to track down the unaligned I/O issues we have with at least USB on that platform. Modified: head/sys/arm/conf/SAM9G20EK Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Sun Jun 18 21:03:48 2017 (r320082) +++ head/sys/arm/conf/SAM9G20EK Sun Jun 18 21:03:53 2017 (r320083) @@ -35,6 +35,8 @@ options SOCDEV_VA=0xdc000000 hints "SAM9G20EK.hints" makeoptions MODULES_OVERRIDE="" +options ARM_USE_V6_BUSDMA # Use v6 to track down unaligned I/O issues + options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols From owner-svn-src-all@freebsd.org Sun Jun 18 21:46:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08B4D8F0EC; Sun, 18 Jun 2017 21:46:55 +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 74A4C7DACC; Sun, 18 Jun 2017 21:46:55 +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 v5ILks37065711; Sun, 18 Jun 2017 21:46:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILks7Z065710; Sun, 18 Jun 2017 21:46:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706182146.v5ILks7Z065710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jun 2017 21:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320084 - stable/11/usr.bin/patch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:46:55 -0000 Author: pfg Date: Sun Jun 18 21:46:54 2017 New Revision: 320084 URL: https://svnweb.freebsd.org/changeset/base/320084 Log: MFC r319676: patch: if reading fails, do not go into infinite loop asking for a filename. This can happen if no tty is available. Obtained from: OpenBSD (CVS rev 1.54) Approved by: re (marius) Modified: stable/11/usr.bin/patch/pch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/patch/pch.c ============================================================================== --- stable/11/usr.bin/patch/pch.c Sun Jun 18 21:03:53 2017 (r320083) +++ stable/11/usr.bin/patch/pch.c Sun Jun 18 21:46:54 2017 (r320084) @@ -216,8 +216,10 @@ there_is_another_patch(void) filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { - ask("No file found--skip this patch? [n] "); - if (*buf != 'y') + int def_skip = *bestguess == '\0'; + ask("No file found--skip this patch? [%c] ", + def_skip ? 'y' : 'n'); + if (*buf == 'n' || (!def_skip && *buf != 'y')) continue; if (verbose) say("Skipping patch...\n"); From owner-svn-src-all@freebsd.org Sun Jun 18 21:48:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DB1ED8F1B7; Sun, 18 Jun 2017 21:48:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69DFC7DC09; Sun, 18 Jun 2017 21:48:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ILmWt1065825; Sun, 18 Jun 2017 21:48:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILmV3V065813; Sun, 18 Jun 2017 21:48:31 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706182148.v5ILmV3V065813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 18 Jun 2017 21:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320085 - in head/sys: fs/nfs fs/nfsclient fs/nfsserver sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:48:33 -0000 Author: rmacklem Date: Sun Jun 18 21:48:31 2017 New Revision: 320085 URL: https://svnweb.freebsd.org/changeset/base/320085 Log: Fix the NFS client/server so that it actually uses the 64bit ino_t filenos. The code still doesn't use d_off. That will come in a future commit. The code also removes the checks for servers returning a fileno that doesn't fit in 32bits, since that should work ok now. Bump __FreeBSD_version since this patch changes the interface between the NFS kernel modules. Reviewed by: kib Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsserver/nfs_nfsdsubs.c head/sys/sys/param.h Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfs/nfs.h Sun Jun 18 21:48:31 2017 (r320085) @@ -265,7 +265,7 @@ struct nfsreferral { u_char *nfr_srvlist; /* List of servers */ int nfr_srvcnt; /* number of servers */ vnode_t nfr_vp; /* vnode for referral */ - u_int32_t nfr_dfileno; /* assigned dir inode# */ + uint64_t nfr_dfileno; /* assigned dir inode# */ }; /* Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfs/nfs_commonport.c Sun Jun 18 21:48:31 2017 (r320085) @@ -348,7 +348,7 @@ nfsvno_pathconf(struct vnode *vp, int flag, register_t /* Fake nfsrv_atroot. Just return 0 */ int -nfsrv_atroot(struct vnode *vp, long *retp) +nfsrv_atroot(struct vnode *vp, uint64_t *retp) { return (0); Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfs/nfs_commonsubs.c Sun Jun 18 21:48:31 2017 (r320085) @@ -820,19 +820,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, struct timespec temptime; uid_t uid; gid_t gid; - long fid; u_int32_t freenum = 0, tuint; u_int64_t uquad = 0, thyp, thyp2; #ifdef QUOTA struct dqblk dqb; uid_t savuid; #endif - static struct timeval last64fileid; - static size_t count64fileid; - static struct timeval last64mountfileid; - static size_t count64mountfileid; - static struct timeval warninterval = { 60, 0 }; + CTASSERT(sizeof(ino_t) == sizeof(uint64_t)); if (compare) { retnotsup = 0; error = nfsrv_getattrbits(nd, &attrbits, NULL, &retnotsup); @@ -1212,20 +1207,11 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, thyp = fxdr_hyper(tl); if (compare) { if (!(*retcmpp)) { - if ((u_int64_t)nap->na_fileid != thyp) - *retcmpp = NFSERR_NOTSAME; + if (nap->na_fileid != thyp) + *retcmpp = NFSERR_NOTSAME; } - } else if (nap != NULL) { - if (*tl++) { - count64fileid++; - if (ratecheck(&last64fileid, &warninterval)) { - printf("NFSv4 fileid > 32bits (%zu occurrences)\n", - count64fileid); - count64fileid = 0; - } - } + } else if (nap != NULL) nap->na_fileid = thyp; - } attrsum += NFSX_HYPER; break; case NFSATTRBIT_FILESAVAIL: @@ -1749,27 +1735,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, NFSM_DISSECT(tl, u_int32_t *, NFSX_HYPER); thyp = fxdr_hyper(tl); if (compare) { - if (!(*retcmpp)) { - if (*tl++) { - *retcmpp = NFSERR_NOTSAME; - } else { - if (!vp || !nfsrv_atroot(vp, &fid)) - fid = nap->na_fileid; - if ((u_int64_t)fid != thyp) + if (!(*retcmpp)) { + if (!vp || !nfsrv_atroot(vp, &thyp2)) + thyp2 = nap->na_fileid; + if (thyp2 != thyp) *retcmpp = NFSERR_NOTSAME; } - } - } else if (nap != NULL) { - if (*tl++) { - count64mountfileid++; - if (ratecheck(&last64mountfileid, &warninterval)) { - printf("NFSv4 mounted on fileid > 32bits (%zu occurrences)\n", - count64mountfileid); - count64mountfileid = 0; - } - } - nap->na_mntonfileno = thyp; - } + } else if (nap != NULL) + nap->na_mntonfileno = thyp; attrsum += NFSX_HYPER; break; case NFSATTRBIT_SUPPATTREXCLCREAT: @@ -2259,8 +2232,8 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount break; case NFSATTRBIT_FILEID: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); - *tl++ = 0; - *tl = txdr_unsigned(vap->va_fileid); + uquad = vap->va_fileid; + txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; case NFSATTRBIT_FILESAVAIL: @@ -2525,7 +2498,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount if (at_root != 0) uquad = mounted_on_fileno; else - uquad = (u_int64_t)vap->va_fileid; + uquad = vap->va_fileid; txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfs/nfs_var.h Sun Jun 18 21:48:31 2017 (r320085) @@ -370,7 +370,7 @@ int nfs_catnap(int, int, const char *); struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t); int nfsvno_pathconf(vnode_t, int, register_t *, struct ucred *, NFSPROC_T *); -int nfsrv_atroot(vnode_t, long *); +int nfsrv_atroot(vnode_t, uint64_t *); void newnfs_timer(void *); int nfs_supportsnfsv4acls(vnode_t); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfs/nfsport.h Sun Jun 18 21:48:31 2017 (r320085) @@ -518,7 +518,7 @@ struct nfs_vattr { struct nfsvattr { struct vattr na_vattr; nfsattrbit_t na_suppattr; - u_int32_t na_mntonfileno; + u_int64_t na_mntonfileno; u_int64_t na_filesid[2]; }; Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Jun 18 21:48:31 2017 (r320085) @@ -2742,11 +2742,10 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 struct nfsrv_descript nfsd, *nd = &nfsd; int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1; int reqsize, tryformoredirs = 1, readsize, eof = 0, gotmnton = 0; - long dotfileid, dotdotfileid = 0; - u_int32_t fakefileno = 0xffffffff, rderr; + u_int64_t dotfileid, dotdotfileid = 0, fakefileno = UINT64_MAX; char *cp; nfsattrbit_t attrbits, dattrbits; - u_int32_t *tl2 = NULL; + u_int32_t rderr, *tl2 = NULL; size_t tresid; KASSERT(uiop->uio_iovcnt == 1 && @@ -2823,14 +2822,14 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 error = EPERM; if (!error) { NFSM_DISSECT(tl, u_int32_t *, 2*NFSX_UNSIGNED); - nfsva.na_mntonfileno = 0xffffffff; + nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { - if (nfsva.na_mntonfileno != 0xffffffff) + if (nfsva.na_mntonfileno != UINT64_MAX) dotdotfileid = nfsva.na_mntonfileno; else dotdotfileid = nfsva.na_fileid; @@ -2981,8 +2980,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 len = fxdr_unsigned(int, *tl); } else { NFSM_DISSECT(tl, u_int32_t *, 2*NFSX_UNSIGNED); - nfsva.na_fileid = - fxdr_unsigned(long, *tl++); + nfsva.na_fileid = fxdr_unsigned(uint64_t, + *tl++); len = fxdr_unsigned(int, *tl); } if (len <= 0 || len > NFS_MAXNAMLEN) { @@ -3037,7 +3036,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 } if (nd->nd_flag & ND_NFSV4) { rderr = 0; - nfsva.na_mntonfileno = 0xffffffff; + nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, &rderr, p, cred); @@ -3059,7 +3058,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 dp->d_fileno = 0; } else { if (gotmnton) { - if (nfsva.na_mntonfileno != 0xffffffff) + if (nfsva.na_mntonfileno != UINT64_MAX) dp->d_fileno = nfsva.na_mntonfileno; else dp->d_fileno = nfsva.na_fileid; @@ -3184,11 +3183,12 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1; int attrflag, tryformoredirs = 1, eof = 0, gotmnton = 0; int isdotdot = 0, unlocknewvp = 0; - long dotfileid, dotdotfileid = 0, fileno = 0; + u_int64_t dotfileid, dotdotfileid = 0, fakefileno = UINT64_MAX; + u_int64_t fileno = 0; char *cp; nfsattrbit_t attrbits, dattrbits; size_t tresid; - u_int32_t *tl2 = NULL, fakefileno = 0xffffffff, rderr; + u_int32_t *tl2 = NULL, rderr; struct timespec dctime; KASSERT(uiop->uio_iovcnt == 1 && @@ -3255,14 +3255,14 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui error = EPERM; if (!error) { NFSM_DISSECT(tl, u_int32_t *, 2*NFSX_UNSIGNED); - nfsva.na_mntonfileno = 0xffffffff; + nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { - if (nfsva.na_mntonfileno != 0xffffffff) + if (nfsva.na_mntonfileno != UINT64_MAX) dotdotfileid = nfsva.na_mntonfileno; else dotdotfileid = nfsva.na_fileid; @@ -3394,8 +3394,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui ncookie.lval[0] = *tl++; ncookie.lval[1] = *tl++; } else { - fileno = fxdr_unsigned(long, *++tl); - tl++; + fileno = fxdr_hyper(tl); + tl += 2; } len = fxdr_unsigned(int, *tl); if (len <= 0 || len > NFS_MAXNAMLEN) { Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jun 18 21:48:31 2017 (r320085) @@ -1398,8 +1398,7 @@ nfsrv_fillattr(struct nfsrv_descript *nd, struct nfsva fp->fa3_rdev.specdata2 = txdr_unsigned(NFSMINOR(nvap->na_rdev)); fp->fa3_fsid.nfsuquad[0] = 0; fp->fa3_fsid.nfsuquad[1] = txdr_unsigned(nvap->na_fsid); - fp->fa3_fileid.nfsuquad[0] = 0; - fp->fa3_fileid.nfsuquad[1] = txdr_unsigned(nvap->na_fileid); + txdr_hyper(nvap->na_fileid, &fp->fa3_fileid); txdr_nfsv3time(&nvap->na_atime, &fp->fa3_atime); txdr_nfsv3time(&nvap->na_mtime, &fp->fa3_mtime); txdr_nfsv3time(&nvap->na_ctime, &fp->fa3_ctime); @@ -1809,8 +1808,7 @@ nfsrv_putreferralattr(struct nfsrv_descript *nd, nfsat break; case NFSATTRBIT_MOUNTEDONFILEID: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); - *tl++ = 0; - *tl = txdr_unsigned(refp->nfr_dfileno); + txdr_hyper(refp->nfr_dfileno, tl); retnum += NFSX_HYPER; break; default: Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Jun 18 21:46:54 2017 (r320084) +++ head/sys/sys/param.h Sun Jun 18 21:48:31 2017 (r320085) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200033 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200034 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sun Jun 18 21:48:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B9DD8F1BA; Sun, 18 Jun 2017 21:48:34 +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 08AEB7DC0A; Sun, 18 Jun 2017 21:48:33 +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 v5ILmXgG065865; Sun, 18 Jun 2017 21:48:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILmXJ5065864; Sun, 18 Jun 2017 21:48:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706182148.v5ILmXJ5065864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jun 2017 21:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320086 - stable/10/usr.bin/patch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:48:34 -0000 Author: pfg Date: Sun Jun 18 21:48:33 2017 New Revision: 320086 URL: https://svnweb.freebsd.org/changeset/base/320086 Log: MFC r319676: patch: if reading fails, do not go into infinite loop asking for a filename. This can happen if no tty is available. Obtained from: OpenBSD (CVS rev 1.54) Modified: stable/10/usr.bin/patch/pch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/pch.c ============================================================================== --- stable/10/usr.bin/patch/pch.c Sun Jun 18 21:48:31 2017 (r320085) +++ stable/10/usr.bin/patch/pch.c Sun Jun 18 21:48:33 2017 (r320086) @@ -216,8 +216,10 @@ there_is_another_patch(void) filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { - ask("No file found--skip this patch? [n] "); - if (*buf != 'y') + int def_skip = *bestguess == '\0'; + ask("No file found--skip this patch? [%c] ", + def_skip ? 'y' : 'n'); + if (*buf == 'n' || (!def_skip && *buf != 'y')) continue; if (verbose) say("Skipping patch...\n"); From owner-svn-src-all@freebsd.org Sun Jun 18 21:53:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6D2FD8F3EB; Sun, 18 Jun 2017 21:53:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2367E0E7; Sun, 18 Jun 2017 21:53:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ILrHdi069591; Sun, 18 Jun 2017 21:53:17 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILrHo1069590; Sun, 18 Jun 2017 21:53:17 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706182153.v5ILrHo1069590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 18 Jun 2017 21:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320087 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:53:18 -0000 Author: rmacklem Date: Sun Jun 18 21:53:17 2017 New Revision: 320087 URL: https://svnweb.freebsd.org/changeset/base/320087 Log: Add an entry to UPDATING for the version bump done by r320085. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jun 18 21:48:33 2017 (r320086) +++ head/UPDATING Sun Jun 18 21:53:17 2017 (r320087) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170618: + The internal ABI used for communication between the NFS kernel modules + was changed by r320085, so __FreeBSD_version was bumped to + ensure all the NFS related modules are updated together. + 20170617: The ABI of struct event was changed by extending the data member to 64bit and adding ext fields. For upgrade, same From owner-svn-src-all@freebsd.org Mon Jun 19 03:07:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 737A9D93A02; Mon, 19 Jun 2017 03:07: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 4DD48788; Mon, 19 Jun 2017 03:07: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 v5J370gZ095805; Mon, 19 Jun 2017 03:07:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J370fi095802; Mon, 19 Jun 2017 03:07:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706190307.v5J370fi095802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Jun 2017 03:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320088 - in stable/11/usr.sbin/bsdinstall: partedit scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 03:07:01 -0000 Author: emaste Date: Mon Jun 19 03:07:00 2017 New Revision: 320088 URL: https://svnweb.freebsd.org/changeset/base/320088 Log: bsdinstall: use consistent EFI configuration across platforms MFC r320007: - increase arm64 EFI partition to 200M, as x86 - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M MFC r320008: bsdinstall: correct comment after r320007 PR: 201898 Approved by: re (kib) Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c Mon Jun 19 03:07:00 2017 (r320088) @@ -34,8 +34,8 @@ #include "partedit.h" -/* EFI partition size in KB */ -#define EFI_BOOTPART_SIZE (50 * 1024) +/* EFI partition size in bytes */ +#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) #define EFI_BOOTPART_PATH "/boot/boot1.efifat" const char * @@ -73,7 +73,7 @@ bootpart_size(const char *scheme) if (strcmp(scheme, "GPT") != 0) return (0); - return ((EFI_BOOTPART_SIZE) * 1024); + return (EFI_BOOTPART_SIZE); } const char * Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c Mon Jun 19 03:07:00 2017 (r320088) @@ -32,6 +32,10 @@ #include "partedit.h" +/* EFI partition size in bytes */ +#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) +#define EFI_BOOTPART_PATH "/boot/boot1.efifat" + static const char * x86_bootmethod(void) { @@ -99,7 +103,7 @@ bootpart_size(const char *scheme) if (strcmp(x86_bootmethod(), "BIOS") == 0) return (512*1024); else - return (200*1024*1024); + return (EFI_BOOTPART_SIZE); return (0); } @@ -137,7 +141,7 @@ partcode_path(const char *part_type, const char *fs_ty if (strcmp(part_type, "GPT") == 0) { if (strcmp(x86_bootmethod(), "UEFI") == 0) - return ("/boot/boot1.efifat"); + return (EFI_BOOTPART_PATH); else if (strcmp(fs_type, "zfs") == 0) return ("/boot/gptzfsboot"); else Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 19 03:07:00 2017 (r320088) @@ -848,7 +848,7 @@ zfs_create_diskpart() f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" efiboot$index efi 800k $disk || + "$align_small" efiboot$index efi 200M $disk || return $FAILURE f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \ /boot/boot1.efifat 1 $disk || From owner-svn-src-all@freebsd.org Mon Jun 19 05:01:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC47FD957AC; Mon, 19 Jun 2017 05:01:52 +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 AA75F3CB1; Mon, 19 Jun 2017 05:01:52 +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 v5J51psQ042555; Mon, 19 Jun 2017 05:01:51 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J51p8n042554; Mon, 19 Jun 2017 05:01:51 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706190501.v5J51p8n042554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 05:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320089 - stable/11/contrib/ipfilter/man X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 05:01:53 -0000 Author: cy Date: Mon Jun 19 05:01:51 2017 New Revision: 320089 URL: https://svnweb.freebsd.org/changeset/base/320089 Log: MFC r319962: Correct example directory location. Submitted by: olivier@ Approved by: re@ (kib@) Modified: stable/11/contrib/ipfilter/man/ipf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ipfilter/man/ipf.5 ============================================================================== --- stable/11/contrib/ipfilter/man/ipf.5 Mon Jun 19 03:07:00 2017 (r320088) +++ stable/11/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:01:51 2017 (r320089) @@ -1693,6 +1693,6 @@ environment. /dev/ipf /etc/ipf.conf .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipf(8), ipfstat(8), ippool.conf(5), ippool(8) From owner-svn-src-all@freebsd.org Mon Jun 19 05:02:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9805DD95807; Mon, 19 Jun 2017 05:02:28 +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 666F23E96; Mon, 19 Jun 2017 05:02:28 +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 v5J52RHF045787; Mon, 19 Jun 2017 05:02:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J52RRC045786; Mon, 19 Jun 2017 05:02:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706190502.v5J52RRC045786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 05:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320090 - stable/10/contrib/ipfilter/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 05:02:28 -0000 Author: cy Date: Mon Jun 19 05:02:27 2017 New Revision: 320090 URL: https://svnweb.freebsd.org/changeset/base/320090 Log: MFC r319962: Correct example directory location. Submitted by: olivier@ Modified: stable/10/contrib/ipfilter/man/ipf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ipfilter/man/ipf.5 ============================================================================== --- stable/10/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:01:51 2017 (r320089) +++ stable/10/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:02:27 2017 (r320090) @@ -1693,6 +1693,6 @@ environment. /dev/ipf /etc/ipf.conf .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipf(8), ipfstat(8), ippool.conf(5), ippool(8) From owner-svn-src-all@freebsd.org Mon Jun 19 06:30:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5643ED96A96; Mon, 19 Jun 2017 06:30:05 +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 2520165DA7; Mon, 19 Jun 2017 06:30:05 +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 v5J6U4F9079202; Mon, 19 Jun 2017 06:30:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J6U4bT079201; Mon, 19 Jun 2017 06:30:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706190630.v5J6U4bT079201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 19 Jun 2017 06:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320091 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 06:30:05 -0000 Author: manu Date: Mon Jun 19 06:30:04 2017 New Revision: 320091 URL: https://svnweb.freebsd.org/changeset/base/320091 Log: allwinner: Configure pins for DTS >= Linux 4.11 Starting with DTS from Linux 4.11, the pins list, function, drive and pull are no longer prefixed with "allwinner,". Allow the pinctrl driver to handle both case. Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Mon Jun 19 05:02:27 2017 (r320090) +++ head/sys/arm/allwinner/a10_gpio.c Mon Jun 19 06:30:04 2017 (r320091) @@ -565,24 +565,38 @@ aw_fdt_configure_pins(device_t dev, phandle_t cfgxref) ret = 0; /* Getting all prop for configuring pins */ - pins_nb = ofw_bus_string_list_to_array(node, "allwinner,pins", &pinlist); - if (pins_nb <= 0) - return (ENOENT); - if (OF_getprop_alloc(node, "allwinner,function", + pins_nb = ofw_bus_string_list_to_array(node, "pins", &pinlist); + if (pins_nb <= 0) { + pins_nb = ofw_bus_string_list_to_array(node, "allwinner,pins", + &pinlist); + if (pins_nb <= 0) + return (ENOENT); + } + if (OF_getprop_alloc(node, "function", sizeof(*pin_function), (void **)&pin_function) == -1) { - ret = ENOENT; - goto out; + if (OF_getprop_alloc(node, "allwinner,function", + sizeof(*pin_function), + (void **)&pin_function) == -1) { + ret = ENOENT; + goto out; + } } - if (OF_getencprop(node, "allwinner,drive", + if (OF_getencprop(node, "drive", &pin_drive, sizeof(pin_drive)) == -1) { - ret = ENOENT; - goto out; + if (OF_getencprop(node, "allwinner,drive", + &pin_drive, sizeof(pin_drive)) == -1) { + ret = ENOENT; + goto out; + } } - if (OF_getencprop(node, "allwinner,pull", + if (OF_getencprop(node, "pull", &pin_pull, sizeof(pin_pull)) == -1) { - ret = ENOENT; - goto out; + if (OF_getencprop(node, "allwinner,pull", + &pin_pull, sizeof(pin_pull)) == -1) { + ret = ENOENT; + goto out; + } } /* Configure each pin to the correct function, drive and pull */ @@ -697,6 +711,8 @@ a10_gpio_attach(device_t dev) /* * Register as a pinctrl device */ + fdt_pinctrl_register(dev, "pins"); + fdt_pinctrl_configure_tree(dev); fdt_pinctrl_register(dev, "allwinner,pins"); fdt_pinctrl_configure_tree(dev); From owner-svn-src-all@freebsd.org Mon Jun 19 06:48:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0647BD970AD; Mon, 19 Jun 2017 06:48:23 +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 C874C66644; Mon, 19 Jun 2017 06:48:22 +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 v5J6mLGa086848; Mon, 19 Jun 2017 06:48:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J6mLVK086847; Mon, 19 Jun 2017 06:48:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706190648.v5J6mLVK086847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 06:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320092 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 06:48:23 -0000 Author: kib Date: Mon Jun 19 06:48:21 2017 New Revision: 320092 URL: https://svnweb.freebsd.org/changeset/base/320092 Log: MFC r320034: Start a new sentence on the new line. Approved by: re (delphij) Modified: stable/11/lib/libc/sys/kqueue.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/kqueue.2 ============================================================================== --- stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 06:30:04 2017 (r320091) +++ stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 06:48:21 2017 (r320092) @@ -544,7 +544,8 @@ is in nanoseconds. .Pp If .Va fflags -is not set, the default is milliseconds. On return, +is not set, the default is milliseconds. +On return, .Va fflags contains the events which triggered the filter. .It Dv EVFILT_USER From owner-svn-src-all@freebsd.org Mon Jun 19 07:02:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 585EDD9746C; Mon, 19 Jun 2017 07:02:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2769966D43; Mon, 19 Jun 2017 07:02:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J72rl6094926; Mon, 19 Jun 2017 07:02:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J72rAC094925; Mon, 19 Jun 2017 07:02:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706190702.v5J72rAC094925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 19 Jun 2017 07:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320093 - head/usr.sbin/rpc.lockd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 07:02:54 -0000 Author: delphij Date: Mon Jun 19 07:02:52 2017 New Revision: 320093 URL: https://svnweb.freebsd.org/changeset/base/320093 Log: Check return value of seteuid() and bail out if we fail. MFC after: 2 weeks Modified: head/usr.sbin/rpc.lockd/lock_proc.c Modified: head/usr.sbin/rpc.lockd/lock_proc.c ============================================================================== --- head/usr.sbin/rpc.lockd/lock_proc.c Mon Jun 19 06:48:21 2017 (r320092) +++ head/usr.sbin/rpc.lockd/lock_proc.c Mon Jun 19 07:02:52 2017 (r320093) @@ -276,7 +276,10 @@ get_client(struct sockaddr *host_addr, rpcvers_t vers) /* Regain root privileges, for bindresvport. */ old_euid = geteuid(); - seteuid(0); + if (seteuid(0) != 0) { + syslog(LOG_ERR, "seteuid(0) failed"); + return NULL; + } /* * Bind the client FD to a reserved port. @@ -285,7 +288,10 @@ get_client(struct sockaddr *host_addr, rpcvers_t vers) bindresvport(clnt_fd, NULL); /* Drop root privileges again. */ - seteuid(old_euid); + if (seteuid(old_euid) != 0) { + syslog(LOG_ERR, "seteuid(%d) failed", old_euid); + return NULL; + } /* Success - update the cache entry */ clnt_cache_ptr[clnt_cache_next_to_use] = client; From owner-svn-src-all@freebsd.org Mon Jun 19 07:15:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 997E6D976D1; Mon, 19 Jun 2017 07:15:48 +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 63FFD671DA; Mon, 19 Jun 2017 07:15:48 +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 v5J7FlpQ098906; Mon, 19 Jun 2017 07:15:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J7Flke098905; Mon, 19 Jun 2017 07:15:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706190715.v5J7Flke098905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 07:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320094 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 07:15:48 -0000 Author: kib Date: Mon Jun 19 07:15:47 2017 New Revision: 320094 URL: https://svnweb.freebsd.org/changeset/base/320094 Log: MFC r320035: Move the description of kern.kq_calloutmax sysctl into a new paragraph for better presentation. Approved by: re (delphij) Modified: stable/11/lib/libc/sys/kqueue.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/kqueue.2 ============================================================================== --- stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:02:52 2017 (r320093) +++ stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:15:47 2017 (r320094) @@ -523,10 +523,6 @@ On return, contains the number of times the timeout has expired since the last call to .Fn kevent . This filter automatically sets the EV_CLEAR flag internally. -There is a system wide limit on the number of timers -which is controlled by the -.Va kern.kq_calloutmax -sysctl. .Bl -tag -width "Dv NOTE_USECONDS" .It Dv NOTE_SECONDS .Va data @@ -548,6 +544,11 @@ is not set, the default is milliseconds. On return, .Va fflags contains the events which triggered the filter. +.Pp +There is a system wide limit on the number of timers +which is controlled by the +.Va kern.kq_calloutmax +sysctl. .It Dv EVFILT_USER Establishes a user event identified by .Va ident From owner-svn-src-all@freebsd.org Mon Jun 19 12:33:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21BBED9C28D; Mon, 19 Jun 2017 12:33:24 +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 E4A7E72F6A; Mon, 19 Jun 2017 12:33:23 +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 v5JCXM28029605; Mon, 19 Jun 2017 12:33:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JCXMlJ029604; Mon, 19 Jun 2017 12:33:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706191233.v5JCXMlJ029604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 12:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320095 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 12:33:24 -0000 Author: cy Date: Mon Jun 19 12:33:22 2017 New Revision: 320095 URL: https://svnweb.freebsd.org/changeset/base/320095 Log: Flag poolcommand() (ippool -A and ippool -R) command line syntax errors. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Mon Jun 19 07:15:47 2017 (r320094) +++ head/contrib/ipfilter/tools/ippool.c Mon Jun 19 12:33:22 2017 (r320095) @@ -297,7 +297,13 @@ poolcommand(remove, argc, argv) case 'v' : opts |= OPT_VERBOSE; break; + default : + usage(argv[0]); + break; /* keep compiler happy */ } + + if (argc - 1 - optind > 0) + usage(argv[0]); if (opts & OPT_DEBUG) fprintf(stderr, "poolcommand: opts = %#x\n", opts); From owner-svn-src-all@freebsd.org Mon Jun 19 13:25:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB80D9CE46; Mon, 19 Jun 2017 13:25:48 +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 A905974863; Mon, 19 Jun 2017 13:25:48 +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 v5JDPlUH050077; Mon, 19 Jun 2017 13:25:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JDPl9A050076; Mon, 19 Jun 2017 13:25:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191325.v5JDPl9A050076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 13:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320096 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 13:25:49 -0000 Author: gjb Date: Mon Jun 19 13:25:47 2017 New Revision: 320096 URL: https://svnweb.freebsd.org/changeset/base/320096 Log: Document r320088, default EFI partition size change. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 12:33:22 2017 (r320095) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 13:25:47 2017 (r320096) @@ -837,6 +837,11 @@ EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server. + + The + default EFI partition created by + &man.bsdinstall.8; has been increased from 800kb to + 200Mb. From owner-svn-src-all@freebsd.org Mon Jun 19 13:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D04ED9CEB2; Mon, 19 Jun 2017 13:26:40 +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 DEE7D74997; Mon, 19 Jun 2017 13:26:39 +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 v5JDQdhK050153; Mon, 19 Jun 2017 13:26:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JDQd7p050152; Mon, 19 Jun 2017 13:26:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191326.v5JDQd7p050152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 13:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320097 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 13:26:40 -0000 Author: gjb Date: Mon Jun 19 13:26:38 2017 New Revision: 320097 URL: https://svnweb.freebsd.org/changeset/base/320097 Log: MFC r319942 (jhb): Don't try to assign interrupts to a CPU on single-CPU systems. All interrupts are routed to the sole CPU in that case implicitly. This is a regression in EARLY_AP_STARTUP. Previously the 'assign_cpu' variable was only set when a multi-CPU system finished booting, so its value both meant that interrupts could be assigned and that there was more than one CPU. PR: 219882 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/x86/x86/intr_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:25:47 2017 (r320096) +++ stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:26:38 2017 (r320097) @@ -315,7 +315,9 @@ intr_assign_cpu(void *arg, int cpu) #ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); - if (cpu != NOCPU) { + + /* Nothing to do if there is only a single CPU. */ + if (mp_ncpus > 1 && cpu != NOCPU) { #else /* * Don't do anything during early boot. We will pick up the @@ -503,6 +505,8 @@ intr_next_cpu(void) #ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); + if (mp_ncpus == 1) + return (PCPU_GET(apic_id)); #else /* Leave all interrupts on the BSP during boot. */ if (!assign_cpu) From owner-svn-src-all@freebsd.org Mon Jun 19 14:30:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F167D9DAFC; Mon, 19 Jun 2017 14:30:02 +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 41D5776267; Mon, 19 Jun 2017 14:30:02 +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 v5JEU1EO075212; Mon, 19 Jun 2017 14:30:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEU1k7075210; Mon, 19 Jun 2017 14:30:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191430.v5JEU1k7075210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 14:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320098 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:30:02 -0000 Author: gjb Date: Mon Jun 19 14:30:01 2017 New Revision: 320098 URL: https://svnweb.freebsd.org/changeset/base/320098 Log: Fix units in the r320088 entry. [1] While here, move to a more appropriate section. Submitted by: rpokala [1] Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 13:26:38 2017 (r320097) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 14:30:01 2017 (r320098) @@ -373,6 +373,11 @@ The installer, &man.bsdinstall.8;, has been updated to include support for hidden wireless networks when configuring the &man.wlan.4; interface. + + The + default EFI partition created by + &man.bsdinstall.8; has been increased from 800KB to + 200MB. @@ -837,11 +842,6 @@ EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server. - - The - default EFI partition created by - &man.bsdinstall.8; has been increased from 800kb to - 200Mb. From owner-svn-src-all@freebsd.org Mon Jun 19 14:45:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B96D9E02C; Mon, 19 Jun 2017 14:45: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 4092376BA2; Mon, 19 Jun 2017 14:45: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 v5JEjKVS082983; Mon, 19 Jun 2017 14:45:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEjKHE082982; Mon, 19 Jun 2017 14:45:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191445.v5JEjKHE082982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 14:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320099 - stable/11/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:45:21 -0000 Author: avg Date: Mon Jun 19 14:45:20 2017 New Revision: 320099 URL: https://svnweb.freebsd.org/changeset/base/320099 Log: MFC r318867: fix vmxnet3 crash when LRO is enabled The crash can occur when all of the following conditions are true: - a packet consists of multiple segments (requires LRO enabled) - there has been a failure to allocate an mbuf for the packet and the packet has to be dropped - a host (vmware) still owned at least one segment of the packet, so the driver had to wait for another interrupt to proceed to discarding the remaining segment(s) Reviewed by: rstone Approved by: re (gjb) Sponsored by: Panzura Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 14:30:01 2017 (r320098) +++ stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 14:45:20 2017 (r320099) @@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq) } else { KASSERT(rxd->btype == VMXNET3_BTYPE_BODY, ("%s: non start of frame w/o body buffer", __func__)); + + if (m_head == NULL && m_tail == NULL) { + /* + * This is a continuation of a packet that we + * started to drop, but could not drop entirely + * because this segment was still owned by the + * host. So, drop the remainder now. + */ + vmxnet3_rxq_eof_discard(rxq, rxr, idx); + if (!rxcd->eop) + vmxnet3_rxq_discard_chain(rxq); + goto nextp; + } + KASSERT(m_head != NULL, ("%s: frame not started?", __func__)); From owner-svn-src-all@freebsd.org Mon Jun 19 14:50:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36A85D9E3A9; Mon, 19 Jun 2017 14:50:28 +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 02D4376E3E; Mon, 19 Jun 2017 14:50:27 +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 v5JEoRhM083210; Mon, 19 Jun 2017 14:50:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEoQb2083206; Mon, 19 Jun 2017 14:50:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191450.v5JEoQb2083206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 14:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320100 - in stable/10/sys: dev/hwpmc sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:50:28 -0000 Author: avg Date: Mon Jun 19 14:50:26 2017 New Revision: 320100 URL: https://svnweb.freebsd.org/changeset/base/320100 Log: MFC 281102: hwpmc: add initial Intel Broadwell support. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:50:26 2017 (r320100) @@ -578,7 +578,8 @@ struct iap_event_descr { #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ -#define IAP_F_FM (1 << 13) /* Fixed mask */ +#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ +#define IAP_F_FM (1 << 14) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -2063,6 +2064,7 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE: @@ -2094,6 +2096,9 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, break; case PMC_CPU_INTEL_ATOM_SILVERMONT: cpuflag = IAP_F_CAS; + break; + case PMC_CPU_INTEL_BROADWELL: + cpuflag = IAP_F_BW; break; case PMC_CPU_INTEL_CORE: cpuflag = IAP_F_CC; Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 19 14:50:26 2017 (r320100) @@ -179,6 +179,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON; nclasses = 3; break; + case 0x3D: + cputype = PMC_CPU_INTEL_BROADWELL; + nclasses = 3; + break; case 0x3F: /* Per Intel document 325462-045US 09/2014. */ case 0x46: /* Per Intel document 325462-045US 09/2014. */ /* Should 46 be XEON. probably its own? */ @@ -227,6 +231,7 @@ pmc_intel_initialize(void) */ case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -295,6 +300,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_BROADWELL: error = pmc_uncore_initialize(pmc_mdep, ncpus); break; default: @@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md) #if defined(__i386__) || defined(__amd64__) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md) */ #if defined(__i386__) || defined(__amd64__) switch (md->pmd_cputype) { + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_COREI7: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:50:26 2017 (r320100) @@ -1540,6 +1540,11 @@ __PMC_EV_ALIAS("BACLEARS.RETURN", IAP_EVENT_E6H_0 __PMC_EV_ALIAS("BACLEARS.COND", IAP_EVENT_E6H_10H) \ __PMC_EV_ALIAS("MS_DECODED.MS_ENTRY", IAP_EVENT_E7H_01H) +/* + * Aliases for Broadwell PMC events. + */ +#define __PMC_EV_ALIAS_BROADWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() /* * Aliases for Core PMC events. @@ -4231,6 +4236,11 @@ __PMC_EV(UCP, EVENT_86H_01H) #define PMC_EV_UCP_FIRST PMC_EV_UCP_EVENT_00H_01H #define PMC_EV_UCP_LAST PMC_EV_UCP_EVENT_86H_01H + +/* + * Aliases for Broadwell uncore PMC events + */ +#define __PMC_EV_ALIAS_BROADWELLUC() #define __PMC_EV_ALIAS_COREI7UC() \ __PMC_EV_ALIAS("GQ_CYCLES_FULL.READ_TRACKER", UCP_EVENT_00H_01H) \ Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/sys/pmc.h Mon Jun 19 14:50:26 2017 (r320100) @@ -95,6 +95,7 @@ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-all@freebsd.org Mon Jun 19 15:00:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57580D9E6D9; Mon, 19 Jun 2017 15:00:08 +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 2EF1F772F9; Mon, 19 Jun 2017 15:00:08 +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 v5JF07Xb087519; Mon, 19 Jun 2017 15:00:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF0663087516; Mon, 19 Jun 2017 15:00:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191500.v5JF0663087516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320101 - in stable/10/sys: dev/hwpmc sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:00:08 -0000 Author: avg Date: Mon Jun 19 15:00:06 2017 New Revision: 320101 URL: https://svnweb.freebsd.org/changeset/base/320101 Log: MFC r277524: style(9) cleanup in hwpmc Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:00:06 2017 (r320101) @@ -685,7 +685,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -715,9 +716,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -831,7 +835,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -972,7 +977,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | + IAP_F_HWX), IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), @@ -1013,10 +1019,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1119,9 +1129,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), - IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1372,7 +1382,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | + IAP_F_HWX), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:00:06 2017 (r320101) @@ -2739,7 +2739,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_MEMORY", IAP_EV __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ @@ -2968,7 +2968,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_MEMORY", IAP_EV __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/sys/pmc.h Mon Jun 19 15:00:06 2017 (r320101) @@ -94,7 +94,7 @@ __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ - __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ From owner-svn-src-all@freebsd.org Mon Jun 19 15:03:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3297DD9E855; Mon, 19 Jun 2017 15:03:49 +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 EC436776D9; Mon, 19 Jun 2017 15:03:48 +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 v5JF3mVS091179; Mon, 19 Jun 2017 15:03:48 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF3lNp091178; Mon, 19 Jun 2017 15:03:47 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706191503.v5JF3lNp091178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 19 Jun 2017 15:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320102 - stable/11/sys/dev/e1000 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:03:49 -0000 Author: sbruno Date: Mon Jun 19 15:03:47 2017 New Revision: 320102 URL: https://svnweb.freebsd.org/changeset/base/320102 Log: Direct commit to stable/11 to correctly setting the EIAC and IMS registers to the same values when processing interrupts. This reverts a change made in r286831 that was not fully reverted in r311979 This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219 PR: 211219 Submitted by: Franco Fitchner Approved by: re (marius) Modified: stable/11/sys/dev/e1000/if_em.c Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:00:06 2017 (r320101) +++ stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:03:47 2017 (r320102) @@ -5115,7 +5115,7 @@ em_enable_intr(struct adapter *adapter) if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); - ims_mask |= adapter->ims; + ims_mask |= EM_MSIX_MASK; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); } From owner-svn-src-all@freebsd.org Mon Jun 19 15:04:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1AB3D9E909; Mon, 19 Jun 2017 15:04:40 +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 CD5E3778C7; Mon, 19 Jun 2017 15:04:40 +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 v5JF4dbB091262; Mon, 19 Jun 2017 15:04:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF4dgq091261; Mon, 19 Jun 2017 15:04:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191504.v5JF4dgq091261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320103 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:04:41 -0000 Author: avg Date: Mon Jun 19 15:04:39 2017 New Revision: 320103 URL: https://svnweb.freebsd.org/changeset/base/320103 Log: MFC r279830: Fix various bugs in Haswell counter definitions Modified: stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:03:47 2017 (r320102) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:04:39 2017 (r320103) @@ -2590,7 +2590,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", \ IAP_EVENT_08H_04H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H) \ @@ -2646,8 +2646,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", IAP_EVENT_58H_08H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H) \ __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", \ IAP_EVENT_60H_01H) \ @@ -2819,7 +2819,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", \ IAP_EVENT_08H_04H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H) \ @@ -2875,8 +2875,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", IAP_EVENT_58H_08H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H) \ __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", \ IAP_EVENT_60H_01H) \ From owner-svn-src-all@freebsd.org Mon Jun 19 15:06:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86F34D9E9FA; Mon, 19 Jun 2017 15:06:38 +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 552B877B3D; Mon, 19 Jun 2017 15:06:38 +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 v5JF6b0E091545; Mon, 19 Jun 2017 15:06:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF6bBf091544; Mon, 19 Jun 2017 15:06:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191506.v5JF6bBf091544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320104 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:06:38 -0000 Author: avg Date: Mon Jun 19 15:06:37 2017 New Revision: 320104 URL: https://svnweb.freebsd.org/changeset/base/320104 Log: MFC r279831: Fix pmc unit restrictions to match documentation Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:04:39 2017 (r320103) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:06:37 2017 (r320104) @@ -1974,15 +1974,15 @@ iap_event_sb_sbx_ib_ibx_ok_on_counter(enum pmc_event p break; /* Events valid only on counter 1. */ case PMC_EV_IAP_EVENT_C0H_01H: - mask = 0x1; + mask = 0x2; break; /* Events valid only on counter 2. */ case PMC_EV_IAP_EVENT_48H_01H: case PMC_EV_IAP_EVENT_A2H_02H: + case PMC_EV_IAP_EVENT_A3H_08H: mask = 0x4; break; /* Events valid only on counter 3. */ - case PMC_EV_IAP_EVENT_A3H_08H: case PMC_EV_IAP_EVENT_BBH_01H: case PMC_EV_IAP_EVENT_CDH_01H: case PMC_EV_IAP_EVENT_CDH_02H: From owner-svn-src-all@freebsd.org Mon Jun 19 15:09:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0009D9EA80; Mon, 19 Jun 2017 15:09:38 +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 5A0E477C9A; Mon, 19 Jun 2017 15:09:38 +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 v5JF9bRj091705; Mon, 19 Jun 2017 15:09:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF9bIB091703; Mon, 19 Jun 2017 15:09:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191509.v5JF9bIB091703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320105 - stable/10/lib/libpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:09:38 -0000 Author: avg Date: Mon Jun 19 15:09:37 2017 New Revision: 320105 URL: https://svnweb.freebsd.org/changeset/base/320105 Log: MFC r279829: Add manpage for Haswell Xeon pmc implementation Added: stable/10/lib/libpmc/pmc.haswellxeon.3 - copied unchanged from r279829, head/lib/libpmc/pmc.haswellxeon.3 Modified: stable/10/lib/libpmc/pmc.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.3 ============================================================================== --- stable/10/lib/libpmc/pmc.3 Mon Jun 19 15:06:37 2017 (r320104) +++ stable/10/lib/libpmc/pmc.3 Mon Jun 19 15:09:37 2017 (r320105) @@ -525,6 +525,7 @@ API is .Xr pmc.atom 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , +.Xr pmc.haswellxeon 3 , .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , Copied: stable/10/lib/libpmc/pmc.haswellxeon.3 (from r279829, head/lib/libpmc/pmc.haswellxeon.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:09:37 2017 (r320105, copy of r279829, head/lib/libpmc/pmc.haswellxeon.3) @@ -0,0 +1,975 @@ +.\" +.\" Copyright (c) 2013 Hiren Panchasara +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd 21 November, 2014 +.Dt PMC.HASWELLXEON 3 +.Os +.Sh NAME +.Nm pmc.haswellxeon +.Nd measurement events for +.Tn Intel +.Tn Haswell Xeon +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Haswell" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to two classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Haswell Xeon PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual" +.%T "Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C" +.%N "Order Number: 325462-052US" +.%D September 2014 +.%Q "Intel Corporation" +.Re +.Ss HASWELL FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +.Ss HASWELL PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li REQ_DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership (RFO) +requests generated by a write to data cacheline. Does not count L2 RFO +prefetches. +.It Li REQ_DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline reads. +Does not count L2 code read prefetches. +.It Li REQ_WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li REQ_PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li REQ_PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li REQ_PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li REQ_PF_LLC_DATA_RD +L2 prefetcher to L3 for loads. +.It Li REQ_PF_LLC_RFO +RFO requests generated by L2 prefetcher +.It Li REQ_PF_LLC_IFETCH +L2 prefetcher to L3 for instruction fetches. +.It Li REQ_BUS_LOCKS +Bus lock and split lock requests. +.It Li REQ_STRM_ST +Streaming store requests. +.It Li REQ_OTHER +Any other request that crosses IDI, including I/O. +.It Li RES_ANY +Catch all value for any response types. +.It Li RES_SUPPLIER_NO_SUPP +No Supplier Information available. +.It Li RES_SUPPLIER_LLC_HITM +M-state initial lookup stat in L3. +.It Li RES_SUPPLIER_LLC_HITE +E-state. +.It Li RES_SUPPLIER_LLC_HITS +S-state. +.It Li RES_SUPPLIER_LLC_HITF +F-state. +.It Li RES_SUPPLIER_LOCAL +Local DRAM Controller. +.It Li RES_SNOOP_SNP_NONE +No details on snoop-related information. +.It Li RES_SNOOP_SNP_NO_NEEDED +No snoop was needed to satisfy the request. +.It Li RES_SNOOP_SNP_MISS +A snoop was needed and it missed all snooped caches: +-For LLC Hit, ReslHitl was returned by all cores +-For LLC Miss, Rspl was returned by all sockets and data was returned from +DRAM. +.It Li RES_SNOOP_HIT_NO_FWD +A snoop was needed and it hits in at least one snooped cache. Hit denotes a +cache-line was valid before snoop effect. This includes: +-Snoop Hit w/ Invalidation (LLC Hit, RFO) +-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) +-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) +In the LLC Miss case, data is returned from DRAM. +.It Li RES_SNOOP_HIT_FWD +A snoop was needed and data was forwarded from a remote socket. +This includes: +-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT). +.It Li RES_SNOOP_HITM +A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a +cache-line was in modified state before effect as a results of snoop. This +includes: +-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) +-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) +-Snoop MtoS (LLC Hit, IFetch/Data_RD). +.It Li RES_NON_DRAM +Target was non-DRAM system address. This includes MMIO transactions. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Haswell programmable PMCs support the following events: +.Bl -tag -width indent +.It Li LD_BLOCKS.STORE_FORWARD +.Pq Event 03H , Umask 02H +Loads blocked by overlapping with store buffer that +cannot be forwarded. +.It Li MISALIGN_MEM_REF.LOADS +.Pq Event 05H , Umask 01H +Speculative cache-line split load uops dispatched to +L1D. +.It Li MISALIGN_MEM_REF.STORES +.Pq Event 05H , Umask 02H +Speculative cache-line split Store-address uops +dispatched to L1D. +.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +False dependencies in MOB due to partial compare +on address. +.It Li DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK +.Pq Event 08H , Umask 01H +Misses in all TLB levels that cause a page walk of any +page size. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED_4K +.Pq Event 08H , Umask 02H +Completed page walks due to demand load misses +that caused 4K page walks in any TLB levels. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K +.Pq Event 08H , Umask 02H +Completed page walks due to demand load misses +that caused 2M/4M page walks in any TLB levels. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 0EH +Completed page walks in any TLB of any page size +due to demand load misses +.It Li DTLB_LOAD_MISSES.WALK_DURATION +.Pq Event 08H , Umask 10H +Cycle PMH is busy with a walk. +.It Li DTLB_LOAD_MISSES.STLB_HIT_4K +.Pq Event 08H , Umask 20H +Load misses that missed DTLB but hit STLB (4K). +.It Li DTLB_LOAD_MISSES.STLB_HIT_2M +.Pq Event 08H , Umask 40H +Load misses that missed DTLB but hit STLB (2M). +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 60H +Number of cache load STLB hits. No page walk. +.It Li DTLB_LOAD_MISSES.PDE_CACHE_MISS +.Pq Event 08H , Umask 80H +DTLB demand load misses with low part of linear-to- +physical address translation missed +.It Li INT_MISC.RECOVERY_CYCLES +.Pq Event 0DH , Umask 03H +Cycles waiting to recover after Machine Clears +except JEClear. Set Cmask= 1. +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +ncrements each cycle the # of Uops issued by the +RAT to RS. +Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles +of this core. +.It Li UOPS_ISSUED.FLAGS_MERGE +.Pq Event 0EH , Umask 10H +Number of flags-merge uops allocated. Such uops +adds delay. +.It Li UOPS_ISSUED.SLOW_LEA +.Pq Event 0EH , Umask 20H +Number of slow LEA or similar uops allocated. Such +uop has 3 sources (e.g. 2 sources + immediate) +regardless if as a result of LEA instruction or not. +.It Li UOPS_ISSUED.SiNGLE_MUL +.Pq Event 0EH , Umask 40H +Number of multiply packed/scalar single precision +uops allocated. +.It Li L2_RQSTS.DEMAND_DATA_RD_MISS +.Pq Event 24H , Umask 21H +Demand Data Read requests that missed L2, no +rejects. +.It Li L2_RQSTS.DEMAND_DATA_RD_HIT +.Pq Event 24H , Umask 41H +Demand Data Read requests that hit L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_DATA_RD +.Pq Event 24H , Umask E1H +Counts any demand and L1 HW prefetch data load +requests to L2. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 42H +Counts the number of store RFO requests that hit +the L2 cache. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 22H +Counts the number of store RFO requests that miss +the L2 cache. +.It Li L2_RQSTS.ALL_RFO +.Pq Event 24H , Umask E2H +Counts all L2 store RFO requests. +.It Li L2_RQSTS.CODE_RD_HIT +.Pq Event 24H , Umask 44H +Number of instruction fetches that hit the L2 cache. +.It Li L2_RQSTS.CODE_RD_MISS +.Pq Event 24H , Umask 24H +Number of instruction fetches that missed the L2 +cache. +.It Li L2_RQSTS.ALL_DEMAND_MISS +.Pq Event 24H , Umask 27H +Demand requests that miss L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_REFERENCES +.Pq Event 24H , Umask E7H +Demand requests to L2 cache. +.It Li L2_RQSTS.ALL_CODE_RD +.Pq Event 24H , Umask E4H +Counts all L2 code requests. +.It Li L2_RQSTS.L2_PF_HIT +.Pq Event 24H , Umask 50H +Counts all L2 HW prefetcher requests that hit L2. +.It Li L2_RQSTS.L2_PF_MISS +.Pq Event 24H , Umask 30H +Counts all L2 HW prefetcher requests that missed +L2. +.It Li L2_RQSTS.ALL_PF +.Pq Event 24H , Umask F8H +Counts all L2 HW prefetcher requests. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask 3FH +All requests that missed L2. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +All requests to L2 cache. +.It Li L2_DEMAND_RQSTS.WB_HIT +.Pq Event 27H , Umask 50H +Not rejected writebacks that hit L2 cache +.It Li LONGEST_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core +that reference a cache line in the last level cache. +.It Li LONGEST_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for +references to the last level cache. +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread +is not in a halt state. The thread enters the halt state +when it is running the HLT instruction. The core +frequency may change from time to time due to +power or thermal throttling. +.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK +.Pq Event 3CH , Umask 01H +Increments at the frequency of XCLK (100 MHz) +when not halted. +.It Li L1D_PEND_MISS.PENDING +.Pq Event 48H , Umask 01H +Increments the number of outstanding L1D misses +every cycle. Set Cmaks = 1 and Edge =1 to count +occurrences. +.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK +.Pq Event 49H , Umask 01H +Miss in all TLB levels causes an page walk of any +page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_COMPLETED_4K +.Pq Event 49H , Umask 02H +Completed page walks due to store misses in one or +more TLB levels of 4K page structure. +.It Li DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M +.Pq Event 49H , Umask 04H +Completed page walks due to store misses in one or +more TLB levels of 2M/4M page structure. +.It Li DTLB_STORE_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 0EH +Completed page walks due to store miss in any TLB +levels of any page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_DURATION +.Pq Event 49H , Umask 10H +Cycles PMH is busy with this walk. +.It Li DTLB_STORE_MISSES.STLB_HIT_4K +.Pq Event 49H , Umask 20H +Store misses that missed DTLB but hit STLB (4K). +.It Li DTLB_STORE_MISSES.STLB_HIT_2M +.Pq Event 49H , Umask 40H +Store misses that missed DTLB but hit STLB (2M). +.It Li DTLB_STORE_MISSES.STLB_HIT +.Pq Event 49H , Umask 60H +Store operations that miss the first TLB level but hit +the second and do not cause page walks. +.It Li DTLB_STORE_MISSES.PDE_CACHE_MISS +.Pq Event 49H , Umask 80H +DTLB store misses with low part of linear-to-physical +address translation missed. +.It Li LOAD_HIT_PRE.SW_PF +.Pq Event 4CH , Umask 01H +Non-SW-prefetch load dispatches that hit fill buffer +allocated for S/W prefetch. +.It Li LOAD_HIT_PRE.HW_PF +.Pq Event 4CH , Umask 02H +Non-SW-prefetch load dispatches that hit fill buffer +allocated for H/W prefetch. +.It Li L1D.REPLACEMENT +.Pq Event 51H , Umask 01H +Counts the number of lines brought into the L1 data +cache. +.It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED +.Pq Event 58H , Umask 04H +Number of integer Move Elimination candidate uops +that were not eliminated. +.It Li MOVE_ELIMINATION.SMID_NOT_ELIMINATED +.Pq Event 58H , Umask 08H +Number of SIMD Move Elimination candidate uops +that were not eliminated. +.It Li MOVE_ELIMINATION.INT_ELIMINATED +.Pq Event 58H , Umask 01H +Unhalted core cycles when the thread is in ring 0. +.It Li MOVE_ELIMINATION.SMID_ELIMINATED +.Pq Event 58H , Umask 02H +Number of SIMD Move Elimination candidate uops +that were eliminated. +.It Li CPL_CYCLES.RING0 +.Pq Event 5CH , Umask 02H +Unhalted core cycles when the thread is in ring 0. +.It Li CPL_CYCLES.RING123 +.Pq Event 5CH , Umask 01H +Unhalted core cycles when the thread is not in ring 0. +.It Li RS_EVENTS.EMPTY_CYCLES +.Pq Event 5EH , Umask 01H +Cycles the RS is empty for the thread. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD +.Pq Event 60H , Umask 01H +Offcore outstanding Demand Data Read transactions +in SQ to uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CORE_RD +.Pq Event 60H , Umask 02H +Offcore outstanding Demand code Read transactions +in SQ to uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO +.Pq Event 60H , Umask 04H +Offcore outstanding RFO store transactions in SQ to +uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD +.Pq Event 60H , Umask 08H +Offcore outstanding cacheable data read +transactions in SQ to uncore. Set Cmask=1 to count +cycles. +.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION +.Pq Event 63H , Umask 01H +Cycles in which the L1D and L2 are locked, due to a +UC lock or split lock. +.It Li LOCK_CYCLES.CACHE_LOCK_DURATION +.Pq Event 63H , Umask 02H +Cycles in which the L1D is locked. +.It Li IDQ.EMPTY +.Pq Event 79H , Umask 02H +Counts cycles the IDQ is empty. +.It Li IDQ.MITE_UOPS +.Pq Event 79H , Umask 04H +Increment each cycle # of uops delivered to IDQ from +MITE path. +Set Cmask = 1 to count cycles. +.It Li IDQ.DSB_UOPS +.Pq Event 79H , Umask 08H +Increment each cycle. # of uops delivered to IDQ +from DSB path. +Set Cmask = 1 to count cycles. +.It Li IDQ.MS_DSB_UOPS +.Pq Event 79H , Umask 10H +Increment each cycle # of uops delivered to IDQ +when MS_busy by DSB. Set Cmask = 1 to count +cycles. Add Edge=1 to count # of delivery. +.It Li IDQ.MS_MITE_UOPS +.Pq Event 79H , Umask 20H +ncrement each cycle # of uops delivered to IDQ +when MS_busy by MITE. Set Cmask = 1 to count +cycles. +.It Li IDQ.MS_UOPS +.Pq Event 79H , Umask 30H +Increment each cycle # of uops delivered to IDQ from +MS by either DSB or MITE. Set Cmask = 1 to count +cycles. +.It Li IDQ.ALL_DSB_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered at least one uops. Set +Cmask = 1. +.It Li IDQ.ALL_DSB_CYCLES_4_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered four uops. Set Cmask +=4. +.It Li IDQ.ALL_MITE_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered at least one uops. Set +Cmask = 1. +.It Li IDQ.ALL_MITE_CYCLES_4_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered four uops. Set Cmask +=4. +.It Li IDQ.MITE_ALL_UOPS +.Pq Event 79H , Umask 3CH +# of uops delivered to IDQ from any path. +.It Li ICACHE.MISSES +.Pq Event 80H , Umask 02H +Number of Instruction Cache, Streaming Buffer and +Victim Cache Misses. Includes UC accesses. +.It Li ITLB_MISSES.MISS_CAUSES_A_WALK +.Pq Event 85H , Umask 01H +Misses in ITLB that causes a page walk of any page +size. +.It Li ITLB_MISSES.WALK_COMPLETED_4K +.Pq Event 85H , Umask 02H +Completed page walks due to misses in ITLB 4K page +entries. +.It Li TLB_MISSES.WALK_COMPLETED_2M_4M +.Pq Event 85H , Umask 04H +Completed page walks due to misses in ITLB 2M/4M +page entries. +.It Li ITLB_MISSES.WALK_COMPLETED +.Pq Event 85H , Umask 0EH +Completed page walks in ITLB of any page size. +.It Li ITLB_MISSES.WALK_DURATION +.Pq Event 85H , Umask 10H +Cycle PMH is busy with a walk. +.It Li ITLB_MISSES.STLB_HIT_4K +.Pq Event 85H , Umask 20H +ITLB misses that hit STLB (4K). +.It Li ITLB_MISSES.STLB_HIT_2M +.Pq Event 85H , Umask 40H +ITLB misses that hit STLB (2K). +.It Li ITLB_MISSES.STLB_HIT +.Pq Event 85H , Umask 60H +TLB misses that hit STLB. No page walk. +.It Li ILD_STALL.LCP +.Pq Event 87H , Umask 01H +Stalls caused by changing prefix length of the +instruction. +.It Li ILD_STALL.IQ_FULL +.Pq Event 87H , Umask 04H +Stall cycles due to IQ is full. +.It Li BR_INST_EXEC.COND +.Pq Event 88H , Umask 01H +Qualify conditional near branch instructions +executed, but not necessarily retired. +.It Li BR_INST_EXEC.DIRECT_JMP +.Pq Event 88H , Umask 02H +Qualify all unconditional near branch instructions +excluding calls and indirect branches. +.It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 88H , Umask 04H +Qualify executed indirect near branch instructions +that are not calls nor returns. +.It Li BR_INST_EXEC.RETURN_NEAR +.Pq Event 88H , Umask 08H +Qualify indirect near branches that have a return +mnemonic. +.It Li BR_INST_EXEC.DIRECT_NEAR_CALL +.Pq Event 88H , Umask 10H +Qualify unconditional near call branch instructions, +excluding non call branch, executed. +.It Li BR_INST_EXEC.INDIRECT_NEAR_CALL +.Pq Event 88H , Umask 20H +Qualify indirect near calls, including both register and +memory indirect, executed. +.It Li BR_INST_EXEC.NONTAKEN +.Pq Event 88H , Umask 40H +Qualify non-taken near branches executed. +.It Li BR_INST_EXEC.TAKEN +.Pq Event 88H , Umask 80H +Qualify taken near branches executed. Must combine +with 01H,02H, 04H, 08H, 10H, 20H. +.It Li BR_INST_EXEC.ALL_BRANCHES +.Pq Event 88H , Umask FFH +Counts all near executed branches (not necessarily +retired). +.It Li BR_MISP_EXEC.COND +.Pq Event 89H , Umask 01H +Qualify conditional near branch instructions +mispredicted. +.It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 89H , Umask 04H +Qualify mispredicted indirect near branch +instructions that are not calls nor returns. +.It Li BR_MISP_EXEC.RETURN_NEAR +.Pq Event 89H , Umask 08H +Qualify mispredicted indirect near branches that +have a return mnemonic. +.It Li BR_MISP_EXEC.DIRECT_NEAR_CALL +.Pq Event 89H , Umask 10H +Qualify mispredicted unconditional near call branch +instructions, excluding non call branch, executed. +.It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL +.Pq Event 89H , Umask 20H +Qualify mispredicted indirect near calls, including +both register and memory indirect, executed. +.It Li BR_MISP_EXEC.NONTAKEN +.Pq Event 89H , Umask 40H +Qualify mispredicted non-taken near branches +executed. +.It Li BR_MISP_EXEC.TAKEN +.Pq Event 89H , Umask 80H +Qualify mispredicted taken near branches executed. +Must combine with 01H,02H, 04H, 08H, 10H, 20H. +.It Li BR_MISP_EXEC.ALL_BRANCHES +.Pq Event 89H , Umask FFH +Counts all near executed branches (not necessarily +retired). +.It Li IDQ_UOPS_NOT_DELIVERED.CORE +.Pq Event 9CH , Umask 01H +Count number of non-delivered uops to RAT per +thread. +.It Li UOPS_EXECUTED_PORT.PORT_0 +.Pq Event A1H , Umask 01H +Cycles which a Uop is dispatched on port 0 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_1 +.Pq Event A1H , Umask 02H +Cycles which a Uop is dispatched on port 1 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_2 +.Pq Event A1H , Umask 04H +Cycles which a Uop is dispatched on port 2 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_3 +.Pq Event A1H , Umask 08H +Cycles which a Uop is dispatched on port 3 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_4 +.Pq Event A1H , Umask 10H +Cycles which a Uop is dispatched on port 4 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_5 +.Pq Event A1H , Umask 20H +Cycles which a Uop is dispatched on port 5 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_6 +.Pq Event A1H , Umask 40H +Cycles which a Uop is dispatched on port 6 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_7 +.Pq Event A1H , Umask 80H +Cycles which a Uop is dispatched on port 7 in this +thread. +.It Li RESOURCE_STALLS.ANY +.Pq Event A2H , Umask 01H +Cycles Allocation is stalled due to Resource Related +reason. +.It Li RESOURCE_STALLS.RS +.Pq Event A2H , Umask 04H +Cycles stalled due to no eligible RS entry available. +.It Li RESOURCE_STALLS.SB +.Pq Event A2H , Umask 08H +Cycles stalled due to no store buffers available (not +including draining form sync). +.It Li RESOURCE_STALLS.ROB +.Pq Event A2H , Umask 10H +Cycles stalled due to re-order buffer full. +.It Li CYCLE_ACTIVITY.CYCLES_L2_PENDING +.Pq Event A3H , Umask 01H +Cycles with pending L2 miss loads. Set Cmask=2 to +count cycle. +.It Li CYCLE_ACTIVITY.CYCLES_LDM_PENDING +.Pq Event A3H , Umask 02H +Cycles with pending memory loads. Set Cmask=2 to +count cycle. +.It Li CYCLE_ACTIVITY.STALLS_L2_PENDING +.Pq Event A3H , Umask 05H +Number of loads missed L2. +.It Li CYCLE_ACTIVITY.CYCLES_L1D_PENDING +.Pq Event A3H , Umask 08H +Cycles with pending L1 cache miss loads. Set +Cmask=8 to count cycle. +.It Li ITLB.ITLB_FLUSH +.Pq Event AEH , Umask 01H +Counts the number of ITLB flushes, includes +4k/2M/4M pages. +.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD +.Pq Event B0H , Umask 01H +Demand data read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_CODE_RD +.Pq Event B0H , Umask 02H +Demand code read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_RFO +.Pq Event B0H , Umask 04H +Demand RFO read requests sent to uncore, including +regular RFOs, locks, ItoM. +.It Li OFFCORE_REQUESTS.ALL_DATA_RD +.Pq Event B0H , Umask 08H +Data read requests sent to uncore (demand and +prefetch). +.It Li UOPS_EXECUTED.CORE +.Pq Event B1H , Umask 02H +Counts total number of uops to be executed per-core +each cycle. +.It Li OFF_CORE_RESPONSE_0 +.Pq Event B7H , Umask 01H +Requires MSR 01A6H +.It Li OFF_CORE_RESPONSE_1 +.Pq Event BBH , Umask 01H +Requires MSR 01A7H +.It Li PAGE_WALKER_LOADS.DTLB_L1 +.Pq Event BCH , Umask 11H +Number of DTLB page walker loads that hit in the +L1+FB. +.It Li PAGE_WALKER_LOADS.ITLB_L1 +.Pq Event BCH , Umask 21H +Number of ITLB page walker loads that hit in the +L1+FB. +.It Li PAGE_WALKER_LOADS.DTLB_L2 +.Pq Event BCH , Umask 12H +Number of DTLB page walker loads that hit in the L2. +.It Li PAGE_WALKER_LOADS.ITLB_L2 +.Pq Event BCH , Umask 22H +Number of ITLB page walker loads that hit in the L2. +.It Li PAGE_WALKER_LOADS.DTLB_L3 +.Pq Event BCH , Umask 14H +Number of DTLB page walker loads that hit in the L3. +.It Li PAGE_WALKER_LOADS.ITLB_L3 +.Pq Event BCH , Umask 24H +Number of ITLB page walker loads that hit in the L3. +.It Li PAGE_WALKER_LOADS.DTLB_MEMORY +.Pq Event BCH , Umask 18H +Number of DTLB page walker loads from memory. +.It Li PAGE_WALKER_LOADS.ITLB_MEMORY +.Pq Event BCH , Umask 28H +Number of ITLB page walker loads from memory. +.It Li TLB_FLUSH.DTLB_THREAD +.Pq Event BDH , Umask 01H +DTLB flush attempts of the thread-specific entries. +.It Li TLB_FLUSH.STLB_ANY +.Pq Event BDH , Umask 20H +Count number of STLB flush attempts. +.It Li INST_RETIRED.ANY_P +.Pq Event C0H , Umask 00H +Number of instructions at retirement. +.It Li INST_RETIRED.ALL +.Pq Event C0H , Umask 01H +Precise instruction retired event with HW to reduce +effect of PEBS shadow in IP distribution. +.It Li OTHER_ASSISTS.AVX_TO_SSE +.Pq Event C1H , Umask 08H +Number of transitions from AVX-256 to legacy SSE +when penalty applicable. +.It Li OTHER_ASSISTS.SSE_TO_AVX +.Pq Event C1H , Umask 10H +Number of transitions from SSE to AVX-256 when +penalty applicable. +.It Li OTHER_ASSISTS.ANY_WB_ASSIST +.Pq Event C1H , Umask 40H +Number of microcode assists invoked by HW upon +uop writeback. +.It Li UOPS_RETIRED.ALL +.Pq Event C2H , Umask 01H +Counts the number of micro-ops retired, Use +cmask=1 and invert to count active cycles or stalled +cycles. +.It Li UOPS_RETIRED.RETIRE_SLOTS +.Pq Event C2H , Umask 02H +Counts the number of retirement slots used each +cycle. +.It Li MACHINE_CLEARS.MEMORY_ORDERING +.Pq Event C3H , Umask 02H +Counts the number of machine clears due to memory +order conflicts. +.It Li MACHINE_CLEARS.SMC +.Pq Event C3H , Umask 04H +Number of self-modifying-code machine clears +detected. +.It Li MACHINE_CLEARS.MASKMOV +.Pq Event C3H , Umask 20H +Counts the number of executed AVX masked load +operations that refer to an illegal address range with +the mask bits set to 0. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 00H +Branch instructions at retirement. +.It Li BR_INST_RETIRED.CONDITIONAL +.Pq Event C4H , Umask 01H +Counts the number of conditional branch instructions Supports PEBS +retired. +.It Li BR_INST_RETIRED.NEAR_CALL +.Pq Event C4H , Umask 02H +Direct and indirect near call instructions retired. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 04H +Counts the number of branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_RETURN +.Pq Event C4H , Umask 08H +Counts the number of near return instructions +retired. +.It Li BR_INST_RETIRED.NOT_TAKEN +.Pq Event C4H , Umask 10H +Counts the number of not taken branch instructions +retired. + It Li BR_INST_RETIRED.NEAR_TAKEN +.Pq Event C4H , Umask 20H +Number of near taken branches retired. +.It Li BR_INST_RETIRED.FAR_BRANCH +.Pq Event C4H , Umask 40H +Number of far branches retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 00H +Mispredicted branch instructions at retirement +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 01H +Mispredicted conditional branch instructions retired. +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 04H +Mispredicted macro branch instructions retired. +.It Li FP_ASSIST.X87_OUTPUT +.Pq Event CAH , Umask 02H +Number of X87 FP assists due to Output values. +.It Li FP_ASSIST.X87_INPUT +.Pq Event CAH , Umask 04H +Number of X87 FP assists due to input values. +.It Li FP_ASSIST.SIMD_OUTPUT +.Pq Event CAH , Umask 08H +Number of SIMD FP assists due to Output values. +.It Li FP_ASSIST.SIMD_INPUT +.Pq Event CAH , Umask 10H +Number of SIMD FP assists due to input values. +.It Li FP_ASSIST.ANY +.Pq Event CAH , Umask 1EH +Cycles with any input/output SSE* or FP assists. +.It Li ROB_MISC_EVENTS.LBR_INSERTS +.Pq Event CCH , Umask 20H +Count cases of saving new LBR records by hardware. +.It Li MEM_TRANS_RETIRED.LOAD_LATENCY +.Pq Event CDH , Umask 01H +Randomly sampled loads whose latency is above a +user defined threshold. A small fraction of the overall +loads are sampled due to randomization. +.It Li MEM_UOP_RETIRED.LOADS +.Pq Event D0H , Umask 01H +Qualify retired memory uops that are loads. Combine Supports PEBS and +with umask 10H, 20H, 40H, 80H. +.It Li MEM_UOP_RETIRED.STORES +.Pq Event D0H , Umask 02H +Qualify retired memory uops that are stores. +Combine with umask 10H, 20H, 40H, 80H. +.It Li MEM_UOP_RETIRED.STLB_MISS +.Pq Event D0H , Umask 10H +Qualify retired memory uops with STLB miss. Must +combine with umask 01H, 02H, to produce counts. +.It Li MEM_UOP_RETIRED.LOCK +.Pq Event D0H , Umask 20H +Qualify retired memory uops with lock. Must combine Supports PEBS and +with umask 01H, 02H, to produce counts. +.It Li MEM_UOP_RETIRED.SPLIT +.Pq Event D0H , Umask 40H +Qualify retired memory uops with line split. Must +combine with umask 01H, 02H, to produce counts. +.It Li MEM_UOP_RETIRED.ALL +.Pq Event D0H , Umask 80H +Qualify any retired memory uops. Must combine with Supports PEBS and +umask 01H, 02H, to produce counts. +.It Li MEM_LOAD_UOPS_RETIRED.L1_HIT +.Pq Event D1H , Umask 01H +Retired load uops with L1 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT +.Pq Event D1H , Umask 02H +Retired load uops with L2 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT +.Pq Event D1H , Umask 04H +Retired load uops with LLC cache hits as data +sources. +.It Li MEM_LOAD_UOPS_RETIRED.L2_MISS +.Pq Event D1H , Umask 10H +Retired load uops missed L2. Unknown data source +excluded. +.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB +.Pq Event D1H , Umask 40H +Retired load uops which data sources were load uops +missed L1 but hit FB due to preceding miss to the +same cache line with data not ready. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS +.Pq Event D2H , Umask 01H +Retired load uops which data sources were LLC hit +and cross-core snoop missed in on-pkg core cache. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT +.Pq Event D2H , Umask 02H +Retired load uops which data sources were LLC and +cross-core snoop hits in on-pkg core cache. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM +.Pq Event D2H , Umask 04H +Retired load uops which data sources were HitM +responses from shared LLC. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE +.Pq Event D2H , Umask 08H +Retired load uops which data sources were hits in +LLC without snoops required. +.It Li MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM +.Pq Event D3H , Umask 01H +Retired load uops which data sources missed LLC but +serviced from local dram. +.It Li BACLEARS.ANY +.Pq Event E6H , Umask 1FH +Number of front end re-steers due to BPU +misprediction. +.It Li L2_TRANS.DEMAND_DATA_RD +.Pq Event F0H , Umask 01H +Demand Data Read requests that access L2 cache. +.It Li L2_TRANS.RFO +.Pq Event F0H , Umask 02H +RFO requests that access L2 cache. +.It Li L2_TRANS.CODE_RD +.Pq Event F0H , Umask 04H +L2 cache accesses when fetching instructions. +.It Li L2_TRANS.ALL_PF +.Pq Event F0H , Umask 08H +Any MLC or LLC HW prefetch accessing L2, including +rejects. +.It Li L2_TRANS.L1D_WB +.Pq Event F0H , Umask 10H +L1D writebacks that access L2 cache. +.It Li L2_TRANS.L2_FILL +.Pq Event F0H , Umask 20H +L2 fill requests that access L2 cache. +.It Li L2_TRANS.L2_WB +.Pq Event F0H , Umask 40H +L2 writebacks that access L2 cache. +.It Li L2_TRANS.ALL_REQUESTS +.Pq Event F0H , Umask 80H +Transactions accessing L2 pipe. +.It Li L2_LINES_IN.I +.Pq Event F1H , Umask 01H +L2 cache lines in I state filling L2. +.It Li L2_LINES_IN.S +.Pq Event F1H , Umask 02H +L2 cache lines in S state filling L2. +.It Li L2_LINES_IN.E +.Pq Event F1H , Umask 04H +L2 cache lines in E state filling L2. +.It Li L2_LINES_IN.ALL +.Pq Event F1H , Umask 07H +L2 cache lines filling L2. +.It Li L2_LINES_OUT.DEMAND_CLEAN +.Pq Event F2H , Umask 05H +Clean L2 cache lines evicted by demand. +.It Li L2_LINES_OUT.DEMAND_DIRTY +.Pq Event F2H , Umask 06H +Dirty L2 cache lines evicted by demand. +.El +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmc.atom 3 , +.Xr pmc.core 3 , +.Xr pmc.iaf 3 , +.Xr pmc.ucf 3 , +.Xr pmc.k7 3 , +.Xr pmc.k8 3 , +.Xr pmc.p4 3 , +.Xr pmc.p5 3 , +.Xr pmc.p6 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswell 3 , +.Xr pmc.haswelluc 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , +.Xr pmc.sandybridge 3 , +.Xr pmc.sandybridgeuc 3 , +.Xr pmc.sandybridgexeon 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , +.Xr pmc.soft 3 , +.Xr pmc.tsc 3 , +.Xr pmc_cpuinfo 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 +.Sh HISTORY +Support for the Haswell Xeon microarchitecture first appeared in +.Fx 10.2 . +.Sh AUTHORS +The +.Lb libpmc +library was written by +.An "Joseph Koshy" +.Aq jkoshy@FreeBSD.org . +The support for the Haswell Xeon +microarchitecture was written by +.An "Randall Stewart" +.Aq rrs@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon Jun 19 15:13:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43F46D9EBFC; Mon, 19 Jun 2017 15:13: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 D575C78050; Mon, 19 Jun 2017 15:13: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 v5JFDLUV095432; Mon, 19 Jun 2017 15:13:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFDKEw095424; Mon, 19 Jun 2017 15:13:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191513.v5JFDKEw095424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320106 - in stable/10: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:13:22 -0000 Author: avg Date: Mon Jun 19 15:13:20 2017 New Revision: 320106 URL: https://svnweb.freebsd.org/changeset/base/320106 Log: MFC r279832: Fix Sandy Bridge+ hwpmc branch counters Modified: stable/10/lib/libpmc/pmc.haswell.3 stable/10/lib/libpmc/pmc.haswellxeon.3 stable/10/lib/libpmc/pmc.ivybridge.3 stable/10/lib/libpmc/pmc.ivybridgexeon.3 stable/10/lib/libpmc/pmc.sandybridge.3 stable/10/lib/libpmc/pmc.sandybridgexeon.3 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.haswell.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -529,73 +529,60 @@ instruction. .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions -executed, but not necessarily retired. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions -excluding calls and indirect branches. +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and +indirect branches. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions -that are not calls nor returns. +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor +returns. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return -mnemonic. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, -excluding non call branch, executed. +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call +branch, executed. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and -memory indirect, executed. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must combine -with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, +executed. .It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH -Counts all near executed branches (not necessarily -retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions -mispredicted. +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch -instructions that are not calls nor returns. +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls +nor returns. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that -have a return mnemonic. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch -instructions, excluding non call branch, executed. +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding +non call branch, executed. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including -both register and memory indirect, executed. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches -executed. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory +indirect, executed. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily -retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per Modified: stable/10/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -530,73 +530,60 @@ instruction. .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions -executed, but not necessarily retired. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions -excluding calls and indirect branches. +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and +indirect branches. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions -that are not calls nor returns. +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor +returns. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return -mnemonic. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, -excluding non call branch, executed. +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call +branch, executed. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and -memory indirect, executed. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must combine -with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, +executed. .It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH -Counts all near executed branches (not necessarily -retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions -mispredicted. +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch -instructions that are not calls nor returns. +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls +nor returns. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that -have a return mnemonic. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch -instructions, excluding non call branch, executed. +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding +non call branch, executed. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including -both register and memory indirect, executed. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches -executed. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory +indirect, executed. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily -retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per Modified: stable/10/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -449,80 +449,60 @@ Stalls caused by changing prefix length of the instruc .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions executed, but not necessarily -retired. -Must combine with umask 40H, 80H. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions excluding calls and +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and indirect branches. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions that are not calls nor +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, excluding non call +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and memory indirect, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must combine with 01H,02H, 04H, 08H, -10H, 20H. .It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH Counts all near executed branches (not necessarily retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions mispredicted. -Must combine with umask 40H, 80H. +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch instructions that are not calls +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch instructions, excluding +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including both register and memory +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. Must combine with -01H,02H, 04H, 08H, 10H, 20H. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per thread. Modified: stable/10/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -449,80 +449,60 @@ Stalls caused by changing prefix length of the instruc .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions executed, but not necessarily -retired. -Must combine with umask 40H, 80H. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions excluding calls and +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and indirect branches. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions that are not calls nor +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, excluding non call +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and memory indirect, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must combine with 01H,02H, 04H, 08H, -10H, 20H. .It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH Counts all near executed branches (not necessarily retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions mispredicted. -Must combine with umask 40H, 80H. +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch instructions that are not calls +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch instructions, excluding +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including both register and memory +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. Must combine with -01H,02H, 04H, 08H, 10H, 20H. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per thread. Modified: stable/10/lib/libpmc/pmc.sandybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.sandybridge.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.sandybridge.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -497,80 +497,60 @@ Stalls caused by changing prefix length of the instruc .It Li ILD_STALL.IQ_FULL .Pq Event 87H, Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H, Umask 01H -Qualify conditional near branch instructions executed, but not necessarily -retired. -Must combine with umask 40H, 80H +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H, Umask 02H -Qualify all unconditional near branch instructions excluding calls and indirect -branches. -Must combine with umask 80H +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and +indirect branches. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H, Umask 04H -Qualify executed indirect near branch instructions that are not calls nor +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H, Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H, Umask 10H -Qualify unconditional near call branch instructions, excluding non call branch, -executed. -Must combine with umask 80H +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call +branch, executed. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H, Umask 20H -Qualify indirect near calls, including both register and memory indirect, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H, Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H, Umask 80H -Qualify taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H -.It Li BR_INST_EXE.ALL_BRANCHES -.Pq Event 88H, Umask FFH +.It Li BR_INST_EXEC.ALL_BRANCHES +.Pq Event 88H , Umask FFH Counts all near executed branches (not necessarily retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H, Umask 01H -Qualify conditional near branch instructions mispredicted. -Must combine with umask 40H, 80H +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H, Umask 04H -Qualify mispredicted indirect near branch instructions that are not calls nor -returns. -Must combine with umask 80H +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls +nor returns. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H, Umask 08H -Qualify mispredicted indirect near branches that have a return mnemonic. -Must combine with umask 80H +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H, Umask 10H -Qualify mispredicted unconditional near call branch instructions, excluding non -call branch, executed. -Must combine with umask 80H +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding +non call branch, executed. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H, Umask 20H -Qualify mispredicted indirect near calls, including both register and memory +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H, Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H, Umask 80H -Qualify mispredicted taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H .It Li BR_MISP_EXEC.ALL_BRANCHES -.Pq Event 89H, Umask FFH -Counts all near executed branches (not necessarily retired). +.Pq Event 89H , Umask FFH +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH, Umask 01H Count number of non-delivered uops to RAT per thread. Modified: stable/10/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.sandybridgexeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.sandybridgexeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -543,73 +543,60 @@ instruction. .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions -executed, but not necessarily retired. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions -excluding calls and indirect branches. +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and +indirect branches. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions -that are not calls nor returns. +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor +returns. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return -mnemonic. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, -excluding non call branch, executed. +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call +branch, executed. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register -and memory indirect, executed. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must -combine with 01H,02H, 04H, 08H, 10H, 20H. -.It Li BR_INST_EXE.ALL_BRANCHES +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, +executed. +.It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH -Counts all near executed branches (not necessarily -retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions -mispredicted. +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch -instructions that are not calls nor returns. +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls +nor returns. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that -have a return mnemonic. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch -instructions, excluding non call branch, executed. +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding +non call branch, executed. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including -both register and memory indirect, executed. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches -executed,. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory +indirect, executed. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily -retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:13:20 2017 (r320106) @@ -1193,46 +1193,57 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_80H, 0x88, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_84H, 0x88, 0x84, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_88H, 0x88, 0x88, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_90H, 0x88, 0x90, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_A0H, 0x88, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_80H, 0x89, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_84H, 0x89, 0x84, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_88H, 0x89, 0x88, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_90H, 0x89, 0x90, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_A0H, 0x89, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:13:20 2017 (r320106) @@ -856,7 +856,14 @@ __PMC_EV(IAP, EVENT_88H_10H) \ __PMC_EV(IAP, EVENT_88H_20H) \ __PMC_EV(IAP, EVENT_88H_30H) \ __PMC_EV(IAP, EVENT_88H_40H) \ +__PMC_EV(IAP, EVENT_88H_41H) \ __PMC_EV(IAP, EVENT_88H_80H) \ +__PMC_EV(IAP, EVENT_88H_81H) \ +__PMC_EV(IAP, EVENT_88H_82H) \ +__PMC_EV(IAP, EVENT_88H_84H) \ +__PMC_EV(IAP, EVENT_88H_88H) \ +__PMC_EV(IAP, EVENT_88H_90H) \ +__PMC_EV(IAP, EVENT_88H_A0H) \ __PMC_EV(IAP, EVENT_88H_7FH) \ __PMC_EV(IAP, EVENT_88H_FFH) \ __PMC_EV(IAP, EVENT_89H_00H) \ @@ -869,7 +876,14 @@ __PMC_EV(IAP, EVENT_89H_10H) \ __PMC_EV(IAP, EVENT_89H_20H) \ __PMC_EV(IAP, EVENT_89H_30H) \ __PMC_EV(IAP, EVENT_89H_40H) \ +__PMC_EV(IAP, EVENT_89H_41H) \ __PMC_EV(IAP, EVENT_89H_80H) \ +__PMC_EV(IAP, EVENT_89H_81H) \ +__PMC_EV(IAP, EVENT_89H_82H) \ +__PMC_EV(IAP, EVENT_89H_84H) \ +__PMC_EV(IAP, EVENT_89H_88H) \ +__PMC_EV(IAP, EVENT_89H_90H) \ +__PMC_EV(IAP, EVENT_89H_A0H) \ __PMC_EV(IAP, EVENT_89H_7FH) \ __PMC_EV(IAP, EVENT_89H_FFH) \ __PMC_EV(IAP, EVENT_8AH_00H) \ @@ -2682,24 +2696,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85 __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_EXECUTED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -2911,24 +2923,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85 __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_EXECUTED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3137,24 +3147,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_DISPATCHED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3368,24 +3376,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_DISPATCHED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3604,24 +3610,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ -__PMC_EV_ALIAS("BR_INST_EXE.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 19 15:16:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4B32D9ECC0; Mon, 19 Jun 2017 15:16:48 +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 A2C42781E5; Mon, 19 Jun 2017 15:16:48 +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 v5JFGluv095608; Mon, 19 Jun 2017 15:16:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFGl66095607; Mon, 19 Jun 2017 15:16:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191516.v5JFGl66095607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320107 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:16:48 -0000 Author: avg Date: Mon Jun 19 15:16:47 2017 New Revision: 320107 URL: https://svnweb.freebsd.org/changeset/base/320107 Log: MFC r279834: Support architectural events on Haswell/Ivy Bridge Modified: stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:13:20 2017 (r320106) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:16:47 2017 (r320107) @@ -2597,6 +2597,7 @@ __PMC_EV_ALIAS("SIMD_INT_64.SHUFFLE_MOVE", IAP_EVENT_F * Aliases for Haswell core PMC events */ #define __PMC_EV_ALIAS_HASWELL_XEON() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -2824,6 +2825,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_ #define __PMC_EV_ALIAS_HASWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -3051,6 +3053,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_ #define __PMC_EV_ALIAS_IVYBRIDGE() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -3281,6 +3284,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.PF_DIRTY", IAP_EVENT_F2H_ * Aliases for Ivy Bridge Xeon PMC events (325462-045US January 2013) */ #define __PMC_EV_ALIAS_IVYBRIDGE_XEON() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ From owner-svn-src-all@freebsd.org Mon Jun 19 15:17:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C8BD9ED1B; Mon, 19 Jun 2017 15:17:18 +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 39F0F78318; Mon, 19 Jun 2017 15:17:18 +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 v5JFHHWj095683; Mon, 19 Jun 2017 15:17:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFHHQc095682; Mon, 19 Jun 2017 15:17:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706191517.v5JFHHQc095682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 15:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320108 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:17:18 -0000 Author: kib Date: Mon Jun 19 15:17:17 2017 New Revision: 320108 URL: https://svnweb.freebsd.org/changeset/base/320108 Log: Allow negative aio_offset only for the read and write LIO ops on device nodes. Otherwise, the current check of aio_offset == -1LL makes it possible to pass negative file offsets down to the filesystems. This trips assertions and is even unsafe for e.g. FFS which keeps metadata at negative offsets. Reported and tested by: pho Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D11266 Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Mon Jun 19 15:16:47 2017 (r320107) +++ head/sys/kern/vfs_aio.c Mon Jun 19 15:17:17 2017 (r320108) @@ -1550,7 +1550,9 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, stru goto aqueue_fail; } - if (opcode != LIO_SYNC && job->uaiocb.aio_offset == -1LL) { + if ((opcode == LIO_READ || opcode == LIO_WRITE) && + job->uaiocb.aio_offset < 0 && + (fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) { error = EINVAL; goto aqueue_fail; } From owner-svn-src-all@freebsd.org Mon Jun 19 15:20:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF8CBD9EDAD; Mon, 19 Jun 2017 15:20:31 +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 88C85784DF; Mon, 19 Jun 2017 15:20: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 v5JFKUoZ095867; Mon, 19 Jun 2017 15:20:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFKU0C095861; Mon, 19 Jun 2017 15:20:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191520.v5JFKU0C095861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320109 - in stable/10: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:20:31 -0000 Author: avg Date: Mon Jun 19 15:20:30 2017 New Revision: 320109 URL: https://svnweb.freebsd.org/changeset/base/320109 Log: MFC r279835: Fix Ivy Bridge+ MEM_UOPS_RETIRED counters Modified: stable/10/lib/libpmc/pmc.haswell.3 stable/10/lib/libpmc/pmc.haswellxeon.3 stable/10/lib/libpmc/pmc.ivybridge.3 stable/10/lib/libpmc/pmc.ivybridgexeon.3 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.haswell.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -808,30 +808,24 @@ Count cases of saving new LBR records by hardware. Randomly sampled loads whose latency is above a user defined threshold. A small fraction of the overall loads are sampled due to randomization. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine Supports PEBS and -with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STORES -.Pq Event D0H , Umask 02H -Qualify retired memory uops that are stores. -Combine with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STLB_MISS -.Pq Event D0H , Umask 10H -Qualify retired memory uops with STLB miss. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.LOCK -.Pq Event D0H , Umask 20H -Qualify retired memory uops with lock. Must combine Supports PEBS and -with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.SPLIT -.Pq Event D0H , Umask 40H -Qualify retired memory uops with line split. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.ALL -.Pq Event D0H , Umask 80H -Qualify any retired memory uops. Must combine with Supports PEBS and -umask 01H, 02H, to produce counts. +.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS +.Pq Event D0H , Umask 11H +Count retired load uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES +.Pq Event D0H , Umask 12H +Count retired store uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.SPLIT_LOADS +.Pq Event D0H , Umask 41H +Count retired load uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.SPLIT_STORES +.Pq Event D0H , Umask 42H +Count retired store uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event D0H , Umask 81H +Count all retired load uops. +.It Li MEM_UOPS_RETIRED.ALL_STORES +.Pq Event D0H , Umask 82H +Count all retired store uops. .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT .Pq Event D1H , Umask 01H Retired load uops with L1 cache hits as data sources. Modified: stable/10/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -809,30 +809,24 @@ Count cases of saving new LBR records by hardware. Randomly sampled loads whose latency is above a user defined threshold. A small fraction of the overall loads are sampled due to randomization. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine Supports PEBS and -with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STORES -.Pq Event D0H , Umask 02H -Qualify retired memory uops that are stores. -Combine with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STLB_MISS -.Pq Event D0H , Umask 10H -Qualify retired memory uops with STLB miss. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.LOCK -.Pq Event D0H , Umask 20H -Qualify retired memory uops with lock. Must combine Supports PEBS and -with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.SPLIT -.Pq Event D0H , Umask 40H -Qualify retired memory uops with line split. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.ALL -.Pq Event D0H , Umask 80H -Qualify any retired memory uops. Must combine with Supports PEBS and -umask 01H, 02H, to produce counts. +.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS +.Pq Event D0H , Umask 11H +Count retired load uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES +.Pq Event D0H , Umask 12H +Count retired store uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.SPLIT_LOADS +.Pq Event D0H , Umask 41H +Count retired load uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.SPLIT_STORES +.Pq Event D0H , Umask 42H +Count retired store uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event D0H , Umask 81H +Count all retired load uops. +.It Li MEM_UOPS_RETIRED.ALL_STORES +.Pq Event D0H , Umask 82H +Count all retired store uops. .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT .Pq Event D1H , Umask 01H Retired load uops with L1 cache hits as data sources. Modified: stable/10/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -706,31 +706,24 @@ Specify threshold in MSR 0x3F6. .Pq Event CDH , Umask 02H Sample stores and collect precise store operation via PEBS record. PMC3 only. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine with umask 10H, 20H, -40H, 80H. -Supports PEBS. -.It Li MEM_UOP_RETIRED.STORES -.Pq Event D0H , Umask 02H -Qualify retired memory uops that are stores. Combine with umask 10H, 20H, -40H, 80H. -.It Li MEM_UOP_RETIRED.STLB_MISS -.Pq Event D0H , Umask 10H -Qualify retired memory uops with STLB miss. Must combine with umask 01H, -02H, to produce counts. -.It Li MEM_UOP_RETIRED.LOCK -.Pq Event D0H , Umask 20H -Qualify retired memory uops with lock. Must combine with umask 01H, 02H, to -produce counts. -.It Li MEM_UOP_RETIRED.SPLIT -.Pq Event D0H , Umask 40H -Qualify retired memory uops with line split. Must combine with umask 01H, -02H, to produce counts. -.It Li MEM_UOP_RETIRED.ALL -.Pq Event D0H , Umask 80H -Qualify any retired memory uops. Must combine with umask 01H, 02H, to -produce counts. +.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS +.Pq Event D0H , Umask 11H +Count retired load uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES +.Pq Event D0H , Umask 12H +Count retired store uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.SPLIT_LOADS +.Pq Event D0H , Umask 41H +Count retired load uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.SPLIT_STORES +.Pq Event D0H , Umask 42H +Count retired store uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event D0H , Umask 81H +Count all retired load uops. +.It Li MEM_UOPS_RETIRED.ALL_STORES +.Pq Event D0H , Umask 82H +Count all retired store uops. .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT .Pq Event D1H , Umask 01H Retired load uops with L1 cache hits as data sources. Modified: stable/10/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -718,31 +718,24 @@ Specify threshold in MSR 0x3F6. .Pq Event CDH , Umask 02H Sample stores and collect precise store operation via PEBS record. PMC3 only. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine with umask 10H, 20H, -40H, 80H. -Supports PEBS. -.It Li MEM_UOP_RETIRED.STORES -.Pq Event D0H , Umask 02H -Qualify retired memory uops that are stores. Combine with umask 10H, 20H, -40H, 80H. -.It Li MEM_UOP_RETIRED.STLB_MISS -.Pq Event D0H , Umask 10H -Qualify retired memory uops with STLB miss. Must combine with umask 01H, -02H, to produce counts. -.It Li MEM_UOP_RETIRED.LOCK -.Pq Event D0H , Umask 20H -Qualify retired memory uops with lock. Must combine with umask 01H, 02H, to -produce counts. -.It Li MEM_UOP_RETIRED.SPLIT -.Pq Event D0H , Umask 40H -Qualify retired memory uops with line split. Must combine with umask 01H, -02H, to produce counts. -.It Li MEM_UOP_RETIRED.ALL -.Pq Event D0H , Umask 80H -Qualify any retired memory uops. Must combine with umask 01H, 02H, to -produce counts. +.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS +.Pq Event D0H , Umask 11H +Count retired load uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES +.Pq Event D0H , Umask 12H +Count retired store uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.SPLIT_LOADS +.Pq Event D0H , Umask 41H +Count retired load uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.SPLIT_STORES +.Pq Event D0H , Umask 42H +Count retired store uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event D0H , Umask 81H +Count all retired load uops. +.It Li MEM_UOPS_RETIRED.ALL_STORES +.Pq Event D0H , Umask 82H +Count all retired store uops. .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT .Pq Event D1H , Umask 01H Retired load uops with L1 cache hits as data sources. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:20:30 2017 (r320109) @@ -1602,29 +1602,21 @@ static struct iap_event_descr iap_events[] = { /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:20:30 2017 (r320109) @@ -2780,14 +2780,12 @@ __PMC_EV_ALIAS("FP_ASSIST.SIMD_INPUT", IAP_EVENT_CAH_1 __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3008,14 +3006,12 @@ __PMC_EV_ALIAS("FP_ASSIST.SIMD_INPUT", IAP_EVENT_CAH_1 __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3234,15 +3230,12 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3464,15 +3457,12 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ From owner-svn-src-all@freebsd.org Mon Jun 19 15:22:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B48CCD9EF5D; Mon, 19 Jun 2017 15:22:06 +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 8297F78856; Mon, 19 Jun 2017 15:22:06 +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 v5JFM5qZ095991; Mon, 19 Jun 2017 15:22:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFM5Qh095990; Mon, 19 Jun 2017 15:22:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191522.v5JFM5Qh095990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320110 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:22:06 -0000 Author: avg Date: Mon Jun 19 15:22:05 2017 New Revision: 320110 URL: https://svnweb.freebsd.org/changeset/base/320110 Log: MFC r279836: Add missing counter definitions Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:20:30 2017 (r320109) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:22:05 2017 (r320110) @@ -1131,6 +1131,10 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1277,7 +1281,8 @@ static struct iap_event_descr iap_events[] = { IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_IB | IAP_F_IBX), + IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ From owner-svn-src-all@freebsd.org Mon Jun 19 15:23:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B86D9F00A; Mon, 19 Jun 2017 15:23:09 +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 141B0789FB; Mon, 19 Jun 2017 15:23:09 +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 v5JFN862000177; Mon, 19 Jun 2017 15:23:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFN8tp000176; Mon, 19 Jun 2017 15:23:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191523.v5JFN8tp000176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320111 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:23:09 -0000 Author: avg Date: Mon Jun 19 15:23:07 2017 New Revision: 320111 URL: https://svnweb.freebsd.org/changeset/base/320111 Log: MFC r279939: hwpmc: Fix event number to match enum name Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:22:05 2017 (r320110) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:23:07 2017 (r320111) @@ -1656,9 +1656,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D3H_03H, 0xD0, 0x3, IAP_F_IBX ), + IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_IBX), IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), /* Not defined for IBX */ - IAPDESCR(D3H_0CH, 0xD0, 0x0, IAP_F_IBX ), + IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_IBX), IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX ), IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), From owner-svn-src-all@freebsd.org Mon Jun 19 15:24:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37796D9F076; Mon, 19 Jun 2017 15:24:39 +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 1142F78B43; Mon, 19 Jun 2017 15:24:38 +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 v5JFOcMI000277; Mon, 19 Jun 2017 15:24:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFOcrm000276; Mon, 19 Jun 2017 15:24:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191524.v5JFOcrm000276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320112 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:24:39 -0000 Author: avg Date: Mon Jun 19 15:24:37 2017 New Revision: 320112 URL: https://svnweb.freebsd.org/changeset/base/320112 Log: MFC r281101: Remove whitespace [in hwpmc] Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:23:07 2017 (r320111) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:24:37 2017 (r320112) @@ -414,7 +414,7 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK; - wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); @@ -491,7 +491,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value_t v) /* Turn off fixed counters */ msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; - wrmsr(IAF_CTRL, msr); + wrmsr(IAF_CTRL, msr); wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); @@ -709,7 +709,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1321,7 +1321,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), @@ -1471,7 +1471,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | @@ -1628,10 +1628,10 @@ static struct iap_event_descr iap_events[] = { IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), - IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1721,7 +1721,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), - IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | + IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), @@ -1885,7 +1885,7 @@ iap_is_event_architectural(enum pmc_event pe, enum pmc return (EV_IS_NOTARCH); } - return (((core_architectural_events & (1 << ae)) == 0) ? + return (((core_architectural_events & (1 << ae)) == 0) ? EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP); } From owner-svn-src-all@freebsd.org Mon Jun 19 15:34:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EDC1D9F26D; Mon, 19 Jun 2017 15:34:09 +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 D062A790ED; Mon, 19 Jun 2017 15:34:08 +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 v5JFY7vq004353; Mon, 19 Jun 2017 15:34:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFY7ME004350; Mon, 19 Jun 2017 15:34:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191534.v5JFY7ME004350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320113 - in stable/10: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:34:09 -0000 Author: avg Date: Mon Jun 19 15:34:07 2017 New Revision: 320113 URL: https://svnweb.freebsd.org/changeset/base/320113 Log: MFC r291494: Add support for Intel Skylake and Intel Broadwell PMC's. Modified: stable/10/lib/libpmc/libpmc.c stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Mon Jun 19 15:24:37 2017 (r320112) +++ stable/10/lib/libpmc/libpmc.c Mon Jun 19 15:34:07 2017 (r320113) @@ -205,7 +205,21 @@ static const struct pmc_event_descr haswell_xeon_event __PMC_EV_ALIAS_HASWELL_XEON() }; +static const struct pmc_event_descr broadwell_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL() +}; +static const struct pmc_event_descr broadwell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL_XEON() +}; + +static const struct pmc_event_descr skylake_event_table[] = +{ + __PMC_EV_ALIAS_SKYLAKE() +}; + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -246,6 +260,11 @@ static const struct pmc_event_descr haswelluc_event_ta __PMC_EV_ALIAS_HASWELLUC() }; +static const struct pmc_event_descr broadwelluc_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELLUC() +}; + static const struct pmc_event_descr sandybridgeuc_event_table[] = { __PMC_EV_ALIAS_SANDYBRIDGEUC() @@ -274,6 +293,9 @@ PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_ PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(skylake, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -320,6 +342,9 @@ PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(broadwell, IAP, broadwell, iap); +PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); +PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -329,6 +354,7 @@ PMC_CLASS_TABLE_DESC(westmere_ex, IAP, westmere_ex, ia PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); PMC_CLASS_TABLE_DESC(haswelluc, UCP, haswelluc, ucp); +PMC_CLASS_TABLE_DESC(broadwelluc, UCP, broadwelluc, ucp); PMC_CLASS_TABLE_DESC(sandybridgeuc, UCP, sandybridgeuc, ucp); PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif @@ -636,6 +662,12 @@ static struct pmc_event_alias core2_aliases_without_ia #define haswell_aliases_without_iaf core2_aliases_without_iaf #define haswell_xeon_aliases core2_aliases #define haswell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_aliases core2_aliases +#define broadwell_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_xeon_aliases core2_aliases +#define broadwell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define skylake_aliases core2_aliases +#define skylake_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -796,6 +828,7 @@ static struct pmc_masks iap_rsp_mask_sb_sbx_ib[] = { NULLMASK }; +/* Broadwell is defined to use the same mask as Haswell */ static struct pmc_masks iap_rsp_mask_haswell[] = { PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), PMCMASK(REQ_DMND_RFO, (1ULL << 1)), @@ -811,6 +844,10 @@ static struct pmc_masks iap_rsp_mask_haswell[] = { PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), + /* + * For processor type 06_45H 22 is L4_HIT_LOCAL_L4 + * and 23, 24 and 25 are also defined. + */ PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), @@ -821,6 +858,33 @@ static struct pmc_masks iap_rsp_mask_haswell[] = { NULLMASK }; +static struct pmc_masks iap_rsp_mask_skylake[] = { + PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), + PMCMASK(REQ_DMND_RFO, (1ULL << 1)), + PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)), + PMCMASK(REQ_PF_DATA_RD, (1ULL << 7)), + PMCMASK(REQ_PF_RFO, (1ULL << 8)), + PMCMASK(REQ_STRM_ST, (1ULL << 11)), + PMCMASK(REQ_OTHER, (1ULL << 15)), + PMCMASK(RES_ANY, (1ULL << 16)), + PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)), + PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)), + PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)), + PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), + PMCMASK(RES_SUPPLIER_L4_HIT, (1ULL << 22)), + PMCMASK(RES_SUPPLIER_DRAM, (1ULL << 26)), + PMCMASK(RES_SUPPLIER_SPL_HIT, (1ULL << 30)), + PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), + PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), + PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), + PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)), + PMCMASK(RES_SNOOP_HITM, (1ULL << 36)), + PMCMASK(RES_NON_DRAM, (1ULL << 37)), + NULLMASK +}; + + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) @@ -912,6 +976,20 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { + /* Broadwell is defined to use same mask as haswell */ + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); + } else + return (-1); + + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_skylake, p, &rsp); + } else + return (-1); + } else return (-1); @@ -2803,6 +2881,18 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = haswell_xeon_event_table; count = PMC_EVENT_TABLE_SIZE(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + count = PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -2848,6 +2938,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = haswelluc_event_table; count = PMC_EVENT_TABLE_SIZE(haswelluc); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwelluc_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwelluc); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridgeuc_event_table; count = PMC_EVENT_TABLE_SIZE(sandybridgeuc); @@ -3133,6 +3227,17 @@ pmc_init(void) case PMC_CPU_INTEL_HASWELL_XEON: PMC_MDEP_INIT_INTEL_V2(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &broadwelluc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + PMC_MDEP_INIT_INTEL_V2(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3302,7 +3407,18 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype ev = haswell_xeon_event_table; evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); break; - + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + evfence = broadwell_event_table + PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + evfence = broadwell_xeon_event_table + PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:24:37 2017 (r320112) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:34:07 2017 (r320113) @@ -579,7 +579,9 @@ struct iap_event_descr { #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ #define IAP_F_BW (1 << 13) /* CPU: Broadwell */ -#define IAP_F_FM (1 << 14) /* Fixed mask */ +#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ +#define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_FM (1 << 18) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -623,11 +625,12 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -648,9 +651,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX), IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -664,7 +669,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -672,9 +677,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX), IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), @@ -682,11 +689,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -705,23 +712,25 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | - IAP_F_WM), + IAP_F_WM | IAP_F_SL), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | - IAP_F_IB | IAP_F_IBX | IAP_F_HWX), + IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -771,7 +780,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | @@ -798,7 +808,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -812,29 +822,40 @@ static struct iap_event_descr iap_events[] = { IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_EFH, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), @@ -867,7 +888,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -895,10 +916,10 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -914,11 +935,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -959,22 +980,24 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(49H_10H, 0x49, 0x1, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | @@ -988,9 +1011,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1004,10 +1027,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), - IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1020,15 +1044,15 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_20H, 0x59, 0x1, IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1038,27 +1062,32 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_02H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_04H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_08H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_10H, 0x7, 0x00, IAP_F_SL), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), + IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), @@ -1068,9 +1097,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX ), IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1112,29 +1143,27 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(78H, 0x78, IAP_M_CORE | IAP_M_SNOOPTYPE, IAP_F_CA | IAP_F_CC2), IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_04H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_08H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_10H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_18H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_20H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_24H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_30H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1151,10 +1180,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), - IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_IBX | IAP_F_SL), /* SL may have a spec bug two with same entry no cmask */ IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1167,20 +1197,23 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), - IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL), + IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), @@ -1189,7 +1222,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1197,18 +1231,19 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_80H, 0x88, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1222,21 +1257,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(88H_A0H, 0x88, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_80H, 0x89, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1250,7 +1286,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(89H_A0H, 0x89, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1268,43 +1304,53 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A0H_00H, 0xA0, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A1H_01H, 0xA1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_02H, 0xA1, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_30H, 0xA1, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_40H, 0xA1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1312,17 +1358,30 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX), - IAPDESCR(A3H_0CH, 0xA3, 0x08, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_01H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | + IAP_F_SL), + IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), + IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAPDESCR(A6H_02H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_04H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_08H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_10H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_40H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | - IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1332,35 +1391,40 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_SL), IAPDESCR(ACH_08H, 0xAC, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ACH_0AH, 0xAC, 0x0A, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B1H_02H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1399,7 +1463,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | - IAP_F_HWX), + IAP_F_HWX |IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1410,19 +1474,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_01H, 0xBD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), /* spec bug SL? */ IAPDESCR(BDH_20H, 0xBD, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1430,12 +1495,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(C0H_01H, 0xC0, 0x0a, IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_BW | IAP_F_BWX), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), @@ -1444,22 +1509,23 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C1H_01H, 0xC1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C1H_02H, 0xC1, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C1H_08H, 0xC1, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_10H, 0xC1, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(C1H_3FH, 0xC1, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1469,41 +1535,41 @@ static struct iap_event_descr iap_events[] = { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 19 15:35:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806A4D9F34A; Mon, 19 Jun 2017 15:35:42 +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 2CBE579362; Mon, 19 Jun 2017 15:35:42 +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 v5JFZfpC004648; Mon, 19 Jun 2017 15:35:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFZf3t004647; Mon, 19 Jun 2017 15:35:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191535.v5JFZf3t004647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320114 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:35:42 -0000 Author: avg Date: Mon Jun 19 15:35:41 2017 New Revision: 320114 URL: https://svnweb.freebsd.org/changeset/base/320114 Log: MFC r292070: More fixes in the various intel processors, fixing missing IAP_F_FM's... Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:34:07 2017 (r320113) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:35:41 2017 (r320114) @@ -634,20 +634,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_CAS), - IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_CAS), + IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_CAS), + IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS), IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_CAS), - IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_CAS), - IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_CAS), - IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_CAS), + IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | @@ -690,7 +690,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), @@ -700,7 +700,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), @@ -719,7 +719,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | @@ -830,8 +830,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), - IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | @@ -845,7 +845,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL), IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | @@ -853,7 +853,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(24H_EFH, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_EFH, 0x24, 0xEF, IAP_F_FM | IAP_F_SL), IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | @@ -923,8 +923,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_CAS), - IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_CAS), + IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_FM | IAP_F_CAS), + IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_FM | IAP_F_CAS), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), @@ -993,7 +993,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(49H_10H, 0x49, 0x1, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | @@ -1052,7 +1052,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(59H_20H, 0x59, 0x1, IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1069,22 +1069,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ - IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), + IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ + IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_FM | IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_02H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_04H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_08H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_10H, 0x7, 0x00, IAP_F_SL), + IAPDESCR(60H_10H, 0x60, 0x10, IAP_F_FM | IAP_F_SL), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1114,7 +1114,6 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -1144,22 +1143,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(79H_04H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_08H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), - IAPDESCR(79H_10H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_18H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_20H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_24H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_30H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | @@ -1243,7 +1242,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_80H, 0x88, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_80H, 0x88, 0x80, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1272,7 +1271,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_80H, 0x89, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_80H, 0x89, 0x80, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1358,25 +1357,25 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), - IAPDESCR(A6H_02H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_04H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_08H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_10H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_40H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_40H, 0xA3, 0x40, IAP_F_FM | IAP_F_SL), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | @@ -1459,7 +1458,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(B6H_01H, 0xB6, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), + IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_FM | IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | @@ -1496,7 +1495,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C0H_01H, 0xC0, 0x0a, IAP_F_CA | IAP_F_CC2 | + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1514,9 +1513,9 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_3FH, 0xC1, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_3FH, 0xC1, 0x3F, IAP_F_FM | IAP_F_SL), IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), + IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_FM |IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), @@ -1542,7 +1541,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_CAS), + IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_FM | IAP_F_CAS), IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), IAPDESCR(C3H_20H, 0xC3, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1570,14 +1569,14 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C4H_40H, 0xC4, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_CAS), - IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_CAS), - IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_CAS), - IAPDESCR(C4H_F7H, 0xC4, 0xF7, IAP_F_CAS), - IAPDESCR(C4H_F9H, 0xC4, 0xF9, IAP_F_CAS), - IAPDESCR(C4H_FBH, 0xC4, 0xFB, IAP_F_CAS), - IAPDESCR(C4H_FDH, 0xC4, 0xFD, IAP_F_CAS), - IAPDESCR(C4H_FEH, 0xC4, 0xFE, IAP_F_CAS), + IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_F7H, 0xC4, 0xF7, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_F9H, 0xC4, 0xF9, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FBH, 0xC4, 0xFB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FDH, 0xC4, 0xFD, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FEH, 0xC4, 0xFE, IAP_F_FM | IAP_F_CAS), IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | @@ -1593,14 +1592,14 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_20H, 0xC5, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_CAS), - IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_CAS), - IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_CAS), - IAPDESCR(C5H_F7H, 0xC5, 0xF7, IAP_F_CAS), - IAPDESCR(C5H_F9H, 0xC5, 0xF9, IAP_F_CAS), - IAPDESCR(C5H_FBH, 0xC5, 0xFB, IAP_F_CAS), - IAPDESCR(C5H_FDH, 0xC5, 0xFD, IAP_F_CAS), - IAPDESCR(C5H_FEH, 0xC5, 0xFE, IAP_F_CAS), + IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_F7H, 0xC5, 0xF7, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_F9H, 0xC5, 0xF9, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FBH, 0xC5, 0xFB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FDH, 0xC5, 0xFD, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FEH, 0xC5, 0xFE, IAP_F_FM | IAP_F_CAS), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), /* For SL C6_01 needs EV_SEL? 0x11, 0x12, 0x13, 0x14, 0x15? */ @@ -1619,7 +1618,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SL), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C7H_20H, 0xC7, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL), IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1639,11 +1638,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_BW | IAP_F_BWX), IAPDESCR(CAH_10H, 0xCA, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(CAH_1EH, 0xCA, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(CAH_1EH, 0xCA, 0x1E, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(CAH_20H, 0xCA, 0x0, IAP_F_FM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX), - IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_CAS), - IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_CAS), + IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_FM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX), + IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_FM | IAP_F_CAS), + IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_FM | IAP_F_CAS), IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_SL), @@ -1655,7 +1654,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CBH_1FH, 0xCB, 0x1F, IAP_F_CAS), + IAPDESCR(CBH_1FH, 0xCB, 0x1F, IAP_F_FM | IAP_F_CAS), IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1734,11 +1733,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_IBX), + IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_FM | IAP_F_IBX), IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), /* Not defined for IBX */ - IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_IBX), - IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX ), - IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), + IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_FM | IAP_F_IBX), + IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_FM | IAP_F_IBX ), + IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_FM | IAP_F_IBX ), IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), @@ -1797,12 +1796,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SBX | IAP_F_CAS | IAP_F_SL), IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), - IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), + IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_FM | IAP_F_CAS), + IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_FM | IAP_F_CAS), IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), + IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_FM | IAP_F_CAS), IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), From owner-svn-src-all@freebsd.org Mon Jun 19 15:38:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B78A2D9F40C; Mon, 19 Jun 2017 15:38:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EB079514; Mon, 19 Jun 2017 15:38:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFcMFh004834; Mon, 19 Jun 2017 15:38:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFcMDn004833; Mon, 19 Jun 2017 15:38:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191538.v5JFcMDn004833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320115 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:38:23 -0000 Author: avg Date: Mon Jun 19 15:38:22 2017 New Revision: 320115 URL: https://svnweb.freebsd.org/changeset/base/320115 Log: MFC r311224: Fix PMC architecture check to handle later IPAs including Skylake Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:35:41 2017 (r320114) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:38:22 2017 (r320115) @@ -2857,7 +2857,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, i PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 3 || + if (ipa_version < 1 || ipa_version > 4 || (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", From owner-svn-src-all@freebsd.org Mon Jun 19 15:41:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FFB5D9F4E4; Mon, 19 Jun 2017 15:41:41 +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 D43447984D; Mon, 19 Jun 2017 15:41:40 +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 v5JFfeXl007113; Mon, 19 Jun 2017 15:41:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFfe1v007112; Mon, 19 Jun 2017 15:41:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191541.v5JFfe1v007112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320116 - stable/10/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:41:41 -0000 Author: avg Date: Mon Jun 19 15:41:39 2017 New Revision: 320116 URL: https://svnweb.freebsd.org/changeset/base/320116 Log: MFC r318867: fix vmxnet3 crash when LRO is enabled Sponsored by: Panzura Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 15:38:22 2017 (r320115) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 15:41:39 2017 (r320116) @@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq) } else { KASSERT(rxd->btype == VMXNET3_BTYPE_BODY, ("%s: non start of frame w/o body buffer", __func__)); + + if (m_head == NULL && m_tail == NULL) { + /* + * This is a continuation of a packet that we + * started to drop, but could not drop entirely + * because this segment was still owned by the + * host. So, drop the remainder now. + */ + vmxnet3_rxq_eof_discard(rxq, rxr, idx); + if (!rxcd->eop) + vmxnet3_rxq_discard_chain(rxq); + goto nextp; + } + KASSERT(m_head != NULL, ("%s: frame not started?", __func__)); From owner-svn-src-all@freebsd.org Mon Jun 19 15:56:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 941ADD9FB64; Mon, 19 Jun 2017 15:56:04 +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 63EA07A0BF; Mon, 19 Jun 2017 15: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 v5JFu344012664; Mon, 19 Jun 2017 15:56:03 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFu3tu012663; Mon, 19 Jun 2017 15:56:03 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706191556.v5JFu3tu012663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 19 Jun 2017 15:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320117 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:56:04 -0000 Author: sbruno Date: Mon Jun 19 15:56:03 2017 New Revision: 320117 URL: https://svnweb.freebsd.org/changeset/base/320117 Log: Direct commit to stable/10 to correctly setting the EIAC and IMS registers to the same values when processing interrupts. This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219 PR: 211219 Submitted by: Franco Fitchner Modified: stable/10/sys/dev/e1000/if_em.c Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:41:39 2017 (r320116) +++ stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:56:03 2017 (r320117) @@ -5158,7 +5158,7 @@ em_enable_intr(struct adapter *adapter) if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); - ims_mask |= adapter->ims; + ims_mask |= EM_MSIX_MASK; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); } From owner-svn-src-all@freebsd.org Mon Jun 19 18:08:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D238DA1DBE; Mon, 19 Jun 2017 18:08:03 +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 6B93B7ED18; Mon, 19 Jun 2017 18:08:03 +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 v5JI82V6068856; Mon, 19 Jun 2017 18:08:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JI826U068854; Mon, 19 Jun 2017 18:08:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706191808.v5JI826U068854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Jun 2017 18:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320118 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 18:08:03 -0000 Author: bdrewery Date: Mon Jun 19 18:08:02 2017 New Revision: 320118 URL: https://svnweb.freebsd.org/changeset/base/320118 Log: Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. This fixes the lib32 build from creating all stale .depend files. X-MFC-With: 320061 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.own.mk head/share/mk/local.sys.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Mon Jun 19 15:56:03 2017 (r320117) +++ head/share/mk/bsd.own.mk Mon Jun 19 18:08:02 2017 (r320118) @@ -152,6 +152,11 @@ DTBOWN?= root DTBGRP?= wheel DTBMODE?= 444 +# Use make.conf / environment LIBDIR as default if set... +.if !empty(_PREMK_LIBDIR) +LIBDIR_BASE?= ${_PREMK_LIBDIR} +.endif +# otherwise use our expected default value. LIBDIR_BASE?= /usr/lib LIBDIR?= ${LIBDIR_BASE} LIBCOMPATDIR?= /usr/lib/compat Modified: head/share/mk/local.sys.mk ============================================================================== --- head/share/mk/local.sys.mk Mon Jun 19 15:56:03 2017 (r320117) +++ head/share/mk/local.sys.mk Mon Jun 19 18:08:02 2017 (r320118) @@ -42,6 +42,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} .endif +.if !empty(LIBDIR) +_PREMK_LIBDIR:= ${LIBDIR} +.endif + .include "src.sys.mk" .if ${.MAKE.MODE:Mmeta*} != "" From owner-svn-src-all@freebsd.org Mon Jun 19 18:08:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02283DA1DFD; Mon, 19 Jun 2017 18:08:22 +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 C54AB7EE4F; Mon, 19 Jun 2017 18:08:21 +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 v5JI8Kth068916; Mon, 19 Jun 2017 18:08:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JI8KR5068914; Mon, 19 Jun 2017 18:08:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706191808.v5JI8KR5068914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Jun 2017 18:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320119 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 18:08:22 -0000 Author: bdrewery Date: Mon Jun 19 18:08:20 2017 New Revision: 320119 URL: https://svnweb.freebsd.org/changeset/base/320119 Log: buildworld: Define SYSROOT to WORLDTMP. This is to allow downstream Makefiles to know for sure they are building against a sysroot rather than only depending on ${DESTDIR} or other assumptions. This also exports it into buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jun 19 18:08:02 2017 (r320118) +++ head/Makefile.inc1 Mon Jun 19 18:08:20 2017 (r320119) @@ -563,7 +563,8 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${W # world stage WMAKEENV= ${CROSSENV} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - PATH=${TMPPATH} + PATH=${TMPPATH} \ + SYSROOT=${WORLDTMP} # make hierarchy HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} @@ -722,7 +723,7 @@ IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" .endif # kernel stage -KMAKEENV= ${WMAKEENV} +KMAKEENV= ${WMAKEENV:NSYSROOT=*} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} # Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Mon Jun 19 18:08:02 2017 (r320118) +++ head/Makefile.libcompat Mon Jun 19 18:08:20 2017 (r320119) @@ -111,6 +111,7 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/inclu LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ + SYSROOT=${LIBCOMPATTMP} \ LIBDIR=/usr/lib${libcompat} \ SHLIBDIR=/usr/lib${libcompat} \ DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}" From owner-svn-src-all@freebsd.org Mon Jun 19 19:27:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F8D8DA2FA0; Mon, 19 Jun 2017 19:27:39 +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 F266880F0B; Mon, 19 Jun 2017 19:27:38 +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 v5JJRbnF001603; Mon, 19 Jun 2017 19:27:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JJRbVH001602; Mon, 19 Jun 2017 19:27:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706191927.v5JJRbVH001602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 19:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320120 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 19:27:39 -0000 Author: cy Date: Mon Jun 19 19:27:37 2017 New Revision: 320120 URL: https://svnweb.freebsd.org/changeset/base/320120 Log: poolcommand() (ippool -A and ippool -R) seed takes an argument. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Mon Jun 19 18:08:20 2017 (r320119) +++ head/contrib/ipfilter/tools/ippool.c Mon Jun 19 19:27:37 2017 (r320120) @@ -268,7 +268,7 @@ poolcommand(remove, argc, argv) bzero((char *)&iph, sizeof(iph)); bzero((char *)&pool, sizeof(pool)); - while ((c = getopt(argc, argv, "dm:no:RSv")) != -1) + while ((c = getopt(argc, argv, "dm:no:RS:v")) != -1) switch (c) { case 'd' : From owner-svn-src-all@freebsd.org Mon Jun 19 20:41:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4DBDA4035; Mon, 19 Jun 2017 20:41: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 7B21882D81; Mon, 19 Jun 2017 20:41: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 v5JKexNl032902; Mon, 19 Jun 2017 20:40:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JKex7I032901; Mon, 19 Jun 2017 20:40:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706192040.v5JKex7I032901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 20:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320121 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 20:41:00 -0000 Author: kib Date: Mon Jun 19 20:40:59 2017 New Revision: 320121 URL: https://svnweb.freebsd.org/changeset/base/320121 Log: Ignore the P_SYSTEM process flag, and do not request VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack. System maps do not create auto-grown stack. Any stack we handled, even for P_SYSTEM, must be for user address space. P_SYSTEM processes with mapped user space is either init(8) or an aio worker attached to other user process with aio buffer pointing into stack area. In either case, VM_MAP_WIRE_USER mode should be used. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jun 19 19:27:37 2017 (r320120) +++ head/sys/vm/vm_map.c Mon Jun 19 20:40:59 2017 (r320121) @@ -3891,9 +3891,7 @@ Retry: vm_map_wire(map, (stack_entry == next_entry) ? addr : addr - grow_amount, (stack_entry == next_entry) ? stack_entry->start : addr, - (p->p_flag & P_SYSTEM) - ? VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES - : VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); } out: From owner-svn-src-all@freebsd.org Mon Jun 19 20:47:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A7F0DA4367; Mon, 19 Jun 2017 20:47:28 +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 C8CEB833F7; Mon, 19 Jun 2017 20:47:27 +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 v5JKlQ6w034268; Mon, 19 Jun 2017 20:47:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JKlPs6034248; Mon, 19 Jun 2017 20:47:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706192047.v5JKlPs6034248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Jun 2017 20:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320122 - in head: cddl/usr.sbin/zfsd/tests gnu/usr.bin/grep include lib/librpcsvc lib/libsysdecode sbin/gvinum share/mk sys/boot/efi/loader usr.bin/grep usr.sbin/bootparamd/bootparamd ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 20:47:28 -0000 Author: bdrewery Date: Mon Jun 19 20:47:24 2017 New Revision: 320122 URL: https://svnweb.freebsd.org/changeset/base/320122 Log: Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP. Since buildenv exports SYSROOT all of these uses will now look in WORLDTMP by default. sys/boot/efi/loader/Makefile A LIBSTAND hack is no longer required for buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/cddl/usr.sbin/zfsd/tests/Makefile head/gnu/usr.bin/grep/Makefile head/include/Makefile head/lib/librpcsvc/Makefile head/lib/libsysdecode/Makefile head/sbin/gvinum/Makefile head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk head/sys/boot/efi/loader/Makefile head/usr.bin/grep/Makefile head/usr.sbin/bootparamd/bootparamd/Makefile head/usr.sbin/bootparamd/callbootd/Makefile head/usr.sbin/keyserv/Makefile head/usr.sbin/ntp/ntpdc/Makefile head/usr.sbin/ntp/ntpq/Makefile head/usr.sbin/rpc.lockd/Makefile head/usr.sbin/rpc.statd/Makefile head/usr.sbin/rpc.ypupdated/Makefile head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/cddl/usr.sbin/zfsd/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/zfsd/tests/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/cddl/usr.sbin/zfsd/tests/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -11,16 +11,10 @@ SRCS= # Use #include in test programs. INCFLAGS+= -I${.CURDIR:H:H} -.if defined(DESTDIR) -INCFLAGS+= -I${DESTDIR}/usr/include -LIBRARY_PATH= ${DESTDIR}/lib:${DESTDIR}/usr/lib -LDFLAGS.zfsd_unittest+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -.elif defined(WORLDTMP) -INCFLAGS+= -I${WORLDTMP}/usr/include -LIBRARY_PATH= ${WORLDTMP}/lib:${WORLDTMP}/usr/lib -LDFLAGS.zfsd_unittest+= -L${WORLDTMP}/lib -L${WORLDTMP}/usr/lib -.else -LIBRARY_PATH= +.if defined(DESTDIR) || defined(SYSROOT) +INCFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include +LDFLAGS.zfsd_unittest+= -L${SYSROOT:U${DESTDIR}}/lib \ + -L${SYSROOT:U${DESTDIR}}/usr/lib .endif # Googletest options Modified: head/gnu/usr.bin/grep/Makefile ============================================================================== --- head/gnu/usr.bin/grep/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/gnu/usr.bin/grep/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -14,7 +14,7 @@ SRCS= closeout.c dfa.c error.c exclude.c grep.c grepma xstrtoumax.c CLEANFILES+= gnugrep.1 -CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H +CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H .if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/include/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -133,23 +133,24 @@ _MARCHS+= x86 META_TARGETS+= compat stage_includes: ${SHARED} +SDESTDIR= ${SYSROOT:U${DESTDIR}} # Take care of stale directory-level symlinks. compat: .for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto - if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ - rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ + if [ -L ${SDESTDIR}${INCLUDEDIR}/$i ]; then \ + rm -f ${SDESTDIR}${INCLUDEDIR}/$i; \ fi .endfor mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f ${SRCTOP}/etc/mtree/BSD.include.dist \ - -p ${DESTDIR}${INCLUDEDIR} > /dev/null + -p ${SDESTDIR}${INCLUDEDIR} > /dev/null copies: .PHONY .META .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \ ${_MARCHS} - if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \ - cd ${DESTDIR}${INCLUDEDIR}/$i; \ + if [ -d ${SDESTDIR}${INCLUDEDIR}/$i ]; then \ + cd ${SDESTDIR}${INCLUDEDIR}/$i; \ for h in *.h; do \ if [ -L $$h ]; then rm -f $$h; fi; \ done; \ @@ -158,101 +159,101 @@ copies: .PHONY .META .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} cd ${SRCTOP}/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ - ${DESTDIR}${INCLUDEDIR}/$i + ${SDESTDIR}${INCLUDEDIR}/$i .endfor cd ${SRCTOP}/sys/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \ - ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ + ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \ - ${DESTDIR}${INCLUDEDIR}/dev/acpica + ${SDESTDIR}${INCLUDEDIR}/dev/acpica cd ${SRCTOP}/sys/dev/agp; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ - ${DESTDIR}${INCLUDEDIR}/dev/agp + ${SDESTDIR}${INCLUDEDIR}/dev/agp cd ${SRCTOP}/sys/dev/bktr; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ - ${DESTDIR}${INCLUDEDIR}/dev/bktr + ${SDESTDIR}${INCLUDEDIR}/dev/bktr .if ${MK_NAND} != "no" cd ${SRCTOP}/sys/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \ - ${DESTDIR}${INCLUDEDIR}/dev/nand; \ + ${SDESTDIR}${INCLUDEDIR}/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ - ${DESTDIR}${INCLUDEDIR}/dev/nand + ${SDESTDIR}${INCLUDEDIR}/dev/nand .endif cd ${SRCTOP}/sys/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ - ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ - ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ - ${DESTDIR}${INCLUDEDIR}/dev/evdev + ${SDESTDIR}${INCLUDEDIR}/dev/evdev cd ${SRCTOP}/sys/dev/hyperv/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \ - ${DESTDIR}${INCLUDEDIR}/dev/hyperv + ${SDESTDIR}${INCLUDEDIR}/dev/hyperv cd ${SRCTOP}/sys/dev/hyperv/utilities; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \ - ${DESTDIR}${INCLUDEDIR}/dev/hyperv + ${SDESTDIR}${INCLUDEDIR}/dev/hyperv cd ${SRCTOP}/sys/dev/pci; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ - ${DESTDIR}${INCLUDEDIR}/dev/pci + ${SDESTDIR}${INCLUDEDIR}/dev/pci cd ${SRCTOP}/sys/fs/cd9660/; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/isofs/cd9660 + ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660 .if ${MK_IPFILTER} != "no" cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/netinet + ${SDESTDIR}${INCLUDEDIR}/netinet .endif .if ${MK_PF} != "no" cd ${SRCTOP}/sys/netpfil/pf; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/netpfil/pf + ${SDESTDIR}${INCLUDEDIR}/netpfil/pf .endif cd ${SRCTOP}/sys/crypto; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \ - ${DESTDIR}${INCLUDEDIR}/crypto + ${SDESTDIR}${INCLUDEDIR}/crypto cd ${SRCTOP}/sys/opencrypto; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/crypto + ${SDESTDIR}${INCLUDEDIR}/crypto cd ${SRCTOP}/sys/${MACHINE}/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/machine + ${SDESTDIR}${INCLUDEDIR}/machine .if exists(${SRCTOP}/sys/${MACHINE}/include/pc) cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/machine/pc + ${SDESTDIR}${INCLUDEDIR}/machine/pc .endif .for _MARCH in ${_MARCHS} .if exists(${SRCTOP}/sys/${_MARCH}/include) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${SRCTOP}/sys/${_MARCH}/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH} + ${SDESTDIR}${INCLUDEDIR}/${_MARCH} .if exists(${SRCTOP}/sys/${_MARCH}/include/pc) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc .endif .endif .endfor cd ${SRCTOP}/sys/rpc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ - ${DESTDIR}${INCLUDEDIR}/rpc + ${SDESTDIR}${INCLUDEDIR}/rpc cd ${SRCTOP}/sys/teken; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ - ${DESTDIR}${INCLUDEDIR}/teken + ${SDESTDIR}${INCLUDEDIR}/teken .if ${MK_CDDL} != "no" cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libzfs_core.h \ - ${DESTDIR}${INCLUDEDIR} + ${SDESTDIR}${INCLUDEDIR} cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libnvpair.h \ - ${DESTDIR}${INCLUDEDIR} + ${SDESTDIR}${INCLUDEDIR} cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \ - ${DESTDIR}${INCLUDEDIR}/sys + ${SDESTDIR}${INCLUDEDIR}/sys .endif symlinks: .PHONY .META @@ -260,115 +261,115 @@ symlinks: .PHONY .META .for i in ${LDIRS} cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ - ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ done .endfor .for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ - ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ done .endfor cd ${SRCTOP}/sys/dev/acpica; \ for h in acpiio.h acpi_hpet.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/acpica/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ + ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ done cd ${SRCTOP}/sys/dev/agp; \ for h in agpreg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/agp; \ + ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ done cd ${SRCTOP}/sys/dev/bktr; \ for h in ioctl_*.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/bktr; \ + ${SDESTDIR}${INCLUDEDIR}/dev/bktr; \ done .if ${MK_NAND} != "no" cd ${SRCTOP}/sys/dev/nand; \ for h in nandsim.h nand_dev.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/nand; \ + ${SDESTDIR}${INCLUDEDIR}/dev/nand; \ done .endif cd ${SRCTOP}/sys/dev/evdev; \ for h in input.h input-event-codes.h uinput.h; do \ ln -fs ../../../../sys/dev/evdev/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ done cd ${SRCTOP}/sys/dev/hyperv/include; \ for h in hyperv.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/include/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \ + ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ done cd ${SRCTOP}/sys/dev/hyperv/utilities; \ for h in hv_snapshot.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \ + ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ done cd ${SRCTOP}/sys/dev/pci; \ for h in pcireg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \ - ${DESTDIR}${INCLUDEDIR}/dev/pci; \ + ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ done .for i in ${LSUBSUBDIRS} cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ - ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ done .endfor .if ${MK_IPFILTER} != "no" cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/contrib/ipfilter/netinet/$$h \ - ${DESTDIR}${INCLUDEDIR}/netinet; \ + ${SDESTDIR}${INCLUDEDIR}/netinet; \ done .endif .if ${MK_PF} != "no" cd ${SRCTOP}/sys/netpfil/pf; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/netpfil/pf/$$h \ - ${DESTDIR}${INCLUDEDIR}/netpfil/pf; \ + ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; \ done .endif cd ${SRCTOP}/sys/crypto; \ for h in rijndael/rijndael.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/crypto/$$h \ - ${DESTDIR}${INCLUDEDIR}/crypto; \ + ${SDESTDIR}${INCLUDEDIR}/crypto; \ done cd ${SRCTOP}/sys/opencrypto; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/opencrypto/$$h \ - ${DESTDIR}${INCLUDEDIR}/crypto; \ + ${SDESTDIR}${INCLUDEDIR}/crypto; \ done cd ${SRCTOP}/sys/${MACHINE}/include; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${MACHINE}/include/$$h \ - ${DESTDIR}${INCLUDEDIR}/machine; \ + ${SDESTDIR}${INCLUDEDIR}/machine; \ done .if exists(${SRCTOP}/sys/${MACHINE}/include/pc) cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${MACHINE}/include/pc/$$h \ - ${DESTDIR}${INCLUDEDIR}/machine/pc; \ + ${SDESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif .for _MARCH in ${_MARCHS} .if exists(${SRCTOP}/sys/${_MARCH}/include) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${SRCTOP}/sys/${_MARCH}/include; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${_MARCH}/include/$$h \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ done .if exists(${SRCTOP}/sys/${_MARCH}/include/pc) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${_MARCH}/include/pc/$$h \ - ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ + ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ done .endif .endif @@ -376,12 +377,12 @@ symlinks: .PHONY .META cd ${SRCTOP}/sys/fs/cd9660; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/fs/cd9660/$$h \ - ${DESTDIR}${INCLUDEDIR}/isofs/cd9660; \ + ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ done cd ${SRCTOP}/sys/rpc; \ for h in types.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \ - ${DESTDIR}${INCLUDEDIR}/rpc; \ + ${SDESTDIR}${INCLUDEDIR}/rpc; \ done .include Modified: head/lib/librpcsvc/Makefile ============================================================================== --- head/lib/librpcsvc/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/lib/librpcsvc/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -21,7 +21,7 @@ OTHERSRCS+= yp_passwd.c yp_update.c RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C -INCDIRS= -I${DESTDIR}/usr/include/rpcsvc +INCDIRS= -I${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc CFLAGS+= -DYP ${INCDIRS} Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/lib/libsysdecode/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -114,7 +114,7 @@ CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h tables.h: mktables - sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET} + sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. @@ -123,7 +123,7 @@ ioctl.c: .PHONY .endif ioctl.c: mkioctls .META env CPP="${CPP}" \ - /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} + /bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} beforedepend: ioctl.c tables.h Modified: head/sbin/gvinum/Makefile ============================================================================== --- head/sbin/gvinum/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/sbin/gvinum/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -6,7 +6,7 @@ SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 WARNS?= 2 -CFLAGS+= -I${SRCTOP}/sys -I${DESTDIR}/${INCLUDEDIR}/edit +CFLAGS+= -I${SRCTOP}/sys -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit LIBADD= edit geom Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Mon Jun 19 20:40:59 2017 (r320121) +++ head/share/mk/bsd.libnames.mk Mon Jun 19 20:47:24 2017 (r320122) @@ -8,166 +8,168 @@ .error bsd.libnames.mk cannot be included directly. .endif +LIBDESTDIR= ${SYSROOT:U${DESTDIR}} + .sinclude # Src directory locations are also defined in src.libnames.mk. -LIBCRT0?= ${DESTDIR}${LIBDIR_BASE}/crt0.o +LIBCRT0?= ${LIBDESTDIR}${LIBDIR_BASE}/crt0.o -LIB80211?= ${DESTDIR}${LIBDIR_BASE}/lib80211.a -LIBALIAS?= ${DESTDIR}${LIBDIR_BASE}/libalias.a -LIBARCHIVE?= ${DESTDIR}${LIBDIR_BASE}/libarchive.a -LIBASN1?= ${DESTDIR}${LIBDIR_BASE}/libasn1.a -LIBATM?= ${DESTDIR}${LIBDIR_BASE}/libatm.a -LIBAUDITD?= ${DESTDIR}${LIBDIR_BASE}/libauditd.a -LIBAVL?= ${DESTDIR}${LIBDIR_BASE}/libavl.a -LIBBEGEMOT?= ${DESTDIR}${LIBDIR_BASE}/libbegemot.a -LIBBLACKLIST?= ${DESTDIR}${LIBDIR_BASE}/libblacklist.a -LIBBLUETOOTH?= ${DESTDIR}${LIBDIR_BASE}/libbluetooth.a -LIBBSDXML?= ${DESTDIR}${LIBDIR_BASE}/libbsdxml.a -LIBBSM?= ${DESTDIR}${LIBDIR_BASE}/libbsm.a -LIBBSNMP?= ${DESTDIR}${LIBDIR_BASE}/libbsnmp.a -LIBBZ2?= ${DESTDIR}${LIBDIR_BASE}/libbz2.a -LIBC?= ${DESTDIR}${LIBDIR_BASE}/libc.a -LIBCALENDAR?= ${DESTDIR}${LIBDIR_BASE}/libcalendar.a -LIBCAM?= ${DESTDIR}${LIBDIR_BASE}/libcam.a -LIBCAP_DNS?= ${DESTDIR}${LIBDIR_BASE}/libcap_dns.a -LIBCAP_GRP?= ${DESTDIR}${LIBDIR_BASE}/libcap_grp.a -LIBCAP_PWD?= ${DESTDIR}${LIBDIR_BASE}/libcap_pwd.a -LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR_BASE}/libcap_random.a -LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR_BASE}/libcap_sysctl.a -LIBCASPER?= ${DESTDIR}${LIBDIR_BASE}/libcasper.a -LIBCOMPAT?= ${DESTDIR}${LIBDIR_BASE}/libcompat.a -LIBCOMPILER_RT?=${DESTDIR}${LIBDIR_BASE}/libcompiler_rt.a -LIBCOM_ERR?= ${DESTDIR}${LIBDIR_BASE}/libcom_err.a -LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libc++.a -LIBCRYPT?= ${DESTDIR}${LIBDIR_BASE}/libcrypt.a -LIBCRYPTO?= ${DESTDIR}${LIBDIR_BASE}/libcrypto.a -LIBCTF?= ${DESTDIR}${LIBDIR_BASE}/libctf.a -LIBCURSES?= ${DESTDIR}${LIBDIR_BASE}/libcurses.a -LIBCUSE?= ${DESTDIR}${LIBDIR_BASE}/libcuse.a -LIBCXGB4?= ${DESTDIR}${LIBDIR_BASE}/libcxgb4.a -LIBCXXRT?= ${DESTDIR}${LIBDIR_BASE}/libcxxrt.a -LIBC_PIC?= ${DESTDIR}${LIBDIR_BASE}/libc_pic.a -LIBDEVCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevctl.a -LIBDEVDCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevdctl.a -LIBDEVINFO?= ${DESTDIR}${LIBDIR_BASE}/libdevinfo.a -LIBDEVSTAT?= ${DESTDIR}${LIBDIR_BASE}/libdevstat.a -LIBDIALOG?= ${DESTDIR}${LIBDIR_BASE}/libdialog.a -LIBDNS?= ${DESTDIR}${LIBDIR_BASE}/libdns.a -LIBDPV?= ${DESTDIR}${LIBDIR_BASE}/libdpv.a -LIBDTRACE?= ${DESTDIR}${LIBDIR_BASE}/libdtrace.a -LIBDWARF?= ${DESTDIR}${LIBDIR_BASE}/libdwarf.a -LIBEDIT?= ${DESTDIR}${LIBDIR_BASE}/libedit.a -LIBEFIVAR?= ${DESTDIR}${LIBDIR_BASE}/libefivar.a -LIBELF?= ${DESTDIR}${LIBDIR_BASE}/libelf.a -LIBEXECINFO?= ${DESTDIR}${LIBDIR_BASE}/libexecinfo.a -LIBFETCH?= ${DESTDIR}${LIBDIR_BASE}/libfetch.a -LIBFIGPAR?= ${DESTDIR}${LIBDIR_BASE}/libfigpar.a +LIB80211?= ${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a +LIBALIAS?= ${LIBDESTDIR}${LIBDIR_BASE}/libalias.a +LIBARCHIVE?= ${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a +LIBASN1?= ${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a +LIBATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libatm.a +LIBAUDITD?= ${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a +LIBAVL?= ${LIBDESTDIR}${LIBDIR_BASE}/libavl.a +LIBBEGEMOT?= ${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a +LIBBLACKLIST?= ${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a +LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a +LIBBSDXML?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a +LIBBSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a +LIBBSNMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a +LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a +LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a +LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a +LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a +LIBCAP_DNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_dns.a +LIBCAP_GRP?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_grp.a +LIBCAP_PWD?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_pwd.a +LIBCAP_RANDOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_random.a +LIBCAP_SYSCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_sysctl.a +LIBCASPER?= ${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a +LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a +LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a +LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a +LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a +LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a +LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a +LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a +LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a +LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a +LIBCXGB4?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a +LIBCXXRT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a +LIBC_PIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a +LIBDEVCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a +LIBDEVDCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a +LIBDEVINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a +LIBDEVSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a +LIBDIALOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a +LIBDNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libdns.a +LIBDPV?= ${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a +LIBDTRACE?= ${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a +LIBDWARF?= ${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a +LIBEDIT?= ${LIBDESTDIR}${LIBDIR_BASE}/libedit.a +LIBEFIVAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a +LIBELF?= ${LIBDESTDIR}${LIBDIR_BASE}/libelf.a +LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a +LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a +LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" -LIBFORM?= ${DESTDIR}${LIBDIR_BASE}/libform.a -LIBG2C?= ${DESTDIR}${LIBDIR_BASE}/libg2c.a -LIBGEOM?= ${DESTDIR}${LIBDIR_BASE}/libgeom.a -LIBGNUREGEX?= ${DESTDIR}${LIBDIR_BASE}/libgnuregex.a -LIBGPIO?= ${DESTDIR}${LIBDIR_BASE}/libgpio.a -LIBGSSAPI?= ${DESTDIR}${LIBDIR_BASE}/libgssapi.a -LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a -LIBHDB?= ${DESTDIR}${LIBDIR_BASE}/libhdb.a -LIBHEIMBASE?= ${DESTDIR}${LIBDIR_BASE}/libheimbase.a -LIBHEIMNTLM?= ${DESTDIR}${LIBDIR_BASE}/libheimntlm.a -LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR_BASE}/libheimsqlite.a -LIBHX509?= ${DESTDIR}${LIBDIR_BASE}/libhx509.a -LIBIBCM?= ${DESTDIR}${LIBDIR_BASE}/libibcm.a -LIBIBCOMMON?= ${DESTDIR}${LIBDIR_BASE}/libibcommon.a -LIBIBMAD?= ${DESTDIR}${LIBDIR_BASE}/libibmad.a -LIBIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libibsdp.a -LIBIBUMAD?= ${DESTDIR}${LIBDIR_BASE}/libibumad.a -LIBIBVERBS?= ${DESTDIR}${LIBDIR_BASE}/libibverbs.a -LIBIFCONFIG?= ${DESTDIR}${LIBDIR_BASE}/libifconfig.a -LIBIPSEC?= ${DESTDIR}${LIBDIR_BASE}/libipsec.a -LIBJAIL?= ${DESTDIR}${LIBDIR_BASE}/libjail.a -LIBKADM5CLNT?= ${DESTDIR}${LIBDIR_BASE}/libkadm5clnt.a -LIBKADM5SRV?= ${DESTDIR}${LIBDIR_BASE}/libkadm5srv.a -LIBKAFS5?= ${DESTDIR}${LIBDIR_BASE}/libkafs5.a -LIBKDC?= ${DESTDIR}${LIBDIR_BASE}/libkdc.a -LIBKEYCAP?= ${DESTDIR}${LIBDIR_BASE}/libkeycap.a -LIBKICONV?= ${DESTDIR}${LIBDIR_BASE}/libkiconv.a -LIBKRB5?= ${DESTDIR}${LIBDIR_BASE}/libkrb5.a -LIBKVM?= ${DESTDIR}${LIBDIR_BASE}/libkvm.a -LIBL?= ${DESTDIR}${LIBDIR_BASE}/libl.a +LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a +LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a +LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a +LIBGNUREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a +LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a +LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a +LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a +LIBHDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a +LIBHEIMBASE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a +LIBHEIMNTLM?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a +LIBHEIMSQLITE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a +LIBHX509?= ${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a +LIBIBCM?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a +LIBIBCOMMON?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcommon.a +LIBIBMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a +LIBIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libibsdp.a +LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a +LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a +LIBIFCONFIG?= ${LIBDESTDIR}${LIBDIR_BASE}/libifconfig.a +LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a +LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a +LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a +LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a +LIBKAFS5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a +LIBKDC?= ${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a +LIBKEYCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a +LIBKICONV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a +LIBKRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a +LIBKVM?= ${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a +LIBL?= ${LIBDESTDIR}${LIBDIR_BASE}/libl.a LIBLN?= "don't use LIBLN, use LIBL" -LIBLZMA?= ${DESTDIR}${LIBDIR_BASE}/liblzma.a -LIBM?= ${DESTDIR}${LIBDIR_BASE}/libm.a -LIBMAGIC?= ${DESTDIR}${LIBDIR_BASE}/libmagic.a -LIBMD?= ${DESTDIR}${LIBDIR_BASE}/libmd.a -LIBMEMSTAT?= ${DESTDIR}${LIBDIR_BASE}/libmemstat.a -LIBMENU?= ${DESTDIR}${LIBDIR_BASE}/libmenu.a -LIBMILTER?= ${DESTDIR}${LIBDIR_BASE}/libmilter.a -LIBMLX4?= ${DESTDIR}${LIBDIR_BASE}/libmlx4.a -LIBMP?= ${DESTDIR}${LIBDIR_BASE}/libmp.a -LIBMT?= ${DESTDIR}${LIBDIR_BASE}/libmt.a -LIBMTHCA?= ${DESTDIR}${LIBDIR_BASE}/libmthca.a -LIBNANDFS?= ${DESTDIR}${LIBDIR_BASE}/libnandfs.a -LIBNCURSES?= ${DESTDIR}${LIBDIR_BASE}/libncurses.a -LIBNCURSESW?= ${DESTDIR}${LIBDIR_BASE}/libncursesw.a -LIBNETGRAPH?= ${DESTDIR}${LIBDIR_BASE}/libnetgraph.a -LIBNGATM?= ${DESTDIR}${LIBDIR_BASE}/libngatm.a -LIBNV?= ${DESTDIR}${LIBDIR_BASE}/libnv.a -LIBNVPAIR?= ${DESTDIR}${LIBDIR_BASE}/libnvpair.a -LIBOPENSM?= ${DESTDIR}${LIBDIR_BASE}/libopensm.a -LIBOPIE?= ${DESTDIR}${LIBDIR_BASE}/libopie.a -LIBOSMCOMP?= ${DESTDIR}${LIBDIR_BASE}/libosmcomp.a -LIBOSMVENDOR?= ${DESTDIR}${LIBDIR_BASE}/libosmvendor.a -LIBPAM?= ${DESTDIR}${LIBDIR_BASE}/libpam.a -LIBPANEL?= ${DESTDIR}${LIBDIR_BASE}/libpanel.a -LIBPANELW?= ${DESTDIR}${LIBDIR_BASE}/libpanelw.a -LIBPCAP?= ${DESTDIR}${LIBDIR_BASE}/libpcap.a -LIBPJDLOG?= ${DESTDIR}${LIBDIR_BASE}/libpjdlog.a -LIBPMC?= ${DESTDIR}${LIBDIR_BASE}/libpmc.a -LIBPROC?= ${DESTDIR}${LIBDIR_BASE}/libproc.a -LIBPROCSTAT?= ${DESTDIR}${LIBDIR_BASE}/libprocstat.a -LIBPTHREAD?= ${DESTDIR}${LIBDIR_BASE}/libpthread.a -LIBRADIUS?= ${DESTDIR}${LIBDIR_BASE}/libradius.a -LIBRDMACM?= ${DESTDIR}${LIBDIR_BASE}/librdmacm.a -LIBROKEN?= ${DESTDIR}${LIBDIR_BASE}/libroken.a -LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR_BASE}/librpcsec_gss.a -LIBRPCSVC?= ${DESTDIR}${LIBDIR_BASE}/librpcsvc.a -LIBRT?= ${DESTDIR}${LIBDIR_BASE}/librt.a -LIBRTLD_DB?= ${DESTDIR}${LIBDIR_BASE}/librtld_db.a -LIBSBUF?= ${DESTDIR}${LIBDIR_BASE}/libsbuf.a -LIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libsdp.a -LIBSMB?= ${DESTDIR}${LIBDIR_BASE}/libsmb.a -LIBSSL?= ${DESTDIR}${LIBDIR_BASE}/libssl.a -LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR_BASE}/libssp_nonshared.a -LIBSTAND?= ${DESTDIR}${LIBDIR_BASE}/libstand.a -LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libstdc++.a -LIBSTDTHREADS?= ${DESTDIR}${LIBDIR_BASE}/libstdthreads.a -LIBSYSDECODE?= ${DESTDIR}${LIBDIR_BASE}/libsysdecode.a -LIBTACPLUS?= ${DESTDIR}${LIBDIR_BASE}/libtacplus.a -LIBTERMCAP?= ${DESTDIR}${LIBDIR_BASE}/libtermcap.a -LIBTERMCAPW?= ${DESTDIR}${LIBDIR_BASE}/libtermcapw.a +LIBLZMA?= ${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a +LIBM?= ${LIBDESTDIR}${LIBDIR_BASE}/libm.a +LIBMAGIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a +LIBMD?= ${LIBDESTDIR}${LIBDIR_BASE}/libmd.a +LIBMEMSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a +LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a +LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a +LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a +LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a +LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a +LIBMTHCA?= ${LIBDESTDIR}${LIBDIR_BASE}/libmthca.a +LIBNANDFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a +LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a +LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a +LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a +LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a +LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a +LIBOPENSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a +LIBOPIE?= ${LIBDESTDIR}${LIBDIR_BASE}/libopie.a +LIBOSMCOMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a +LIBOSMVENDOR?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a +LIBPAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libpam.a +LIBPANEL?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a +LIBPANELW?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a +LIBPCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a +LIBPJDLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a +LIBPMC?= ${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a +LIBPROC?= ${LIBDESTDIR}${LIBDIR_BASE}/libproc.a +LIBPROCSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a +LIBPTHREAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a +LIBRADIUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libradius.a +LIBRDMACM?= ${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a +LIBROKEN?= ${LIBDESTDIR}${LIBDIR_BASE}/libroken.a +LIBRPCSEC_GSS?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a +LIBRPCSVC?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a +LIBRT?= ${LIBDESTDIR}${LIBDIR_BASE}/librt.a +LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a +LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a +LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a +LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a +LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a +LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTAND?= ${LIBDESTDIR}${LIBDIR_BASE}/libstand.a +LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a +LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a +LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a +LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a +LIBTERMCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a +LIBTERMCAPW?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES" -LIBUFS?= ${DESTDIR}${LIBDIR_BASE}/libufs.a -LIBUGIDFW?= ${DESTDIR}${LIBDIR_BASE}/libugidfw.a -LIBULOG?= ${DESTDIR}${LIBDIR_BASE}/libulog.a -LIBUMEM?= ${DESTDIR}${LIBDIR_BASE}/libumem.a -LIBUSB?= ${DESTDIR}${LIBDIR_BASE}/libusb.a -LIBUSBHID?= ${DESTDIR}${LIBDIR_BASE}/libusbhid.a -LIBUTIL?= ${DESTDIR}${LIBDIR_BASE}/libutil.a -LIBUUTIL?= ${DESTDIR}${LIBDIR_BASE}/libuutil.a -LIBVGL?= ${DESTDIR}${LIBDIR_BASE}/libvgl.a -LIBVMMAPI?= ${DESTDIR}${LIBDIR_BASE}/libvmmapi.a -LIBWIND?= ${DESTDIR}${LIBDIR_BASE}/libwind.a -LIBWRAP?= ${DESTDIR}${LIBDIR_BASE}/libwrap.a -LIBXO?= ${DESTDIR}${LIBDIR_BASE}/libxo.a -LIBXPG4?= ${DESTDIR}${LIBDIR_BASE}/libxpg4.a -LIBY?= ${DESTDIR}${LIBDIR_BASE}/liby.a -LIBYPCLNT?= ${DESTDIR}${LIBDIR_BASE}/libypclnt.a -LIBZ?= ${DESTDIR}${LIBDIR_BASE}/libz.a -LIBZFS?= ${DESTDIR}${LIBDIR_BASE}/libzfs.a -LIBZFS_CORE?= ${DESTDIR}${LIBDIR_BASE}/libzfs_core.a -LIBZPOOL?= ${DESTDIR}${LIBDIR_BASE}/libzpool.a +LIBUFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libufs.a +LIBUGIDFW?= ${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a +LIBULOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libulog.a +LIBUMEM?= ${LIBDESTDIR}${LIBDIR_BASE}/libumem.a +LIBUSB?= ${LIBDESTDIR}${LIBDIR_BASE}/libusb.a +LIBUSBHID?= ${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a +LIBUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libutil.a +LIBUUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a +LIBVGL?= ${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a +LIBVMMAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a +LIBWIND?= ${LIBDESTDIR}${LIBDIR_BASE}/libwind.a +LIBWRAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a +LIBXO?= ${LIBDESTDIR}${LIBDIR_BASE}/libxo.a +LIBXPG4?= ${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a +LIBY?= ${LIBDESTDIR}${LIBDIR_BASE}/liby.a +LIBYPCLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a +LIBZ?= ${LIBDESTDIR}${LIBDIR_BASE}/libz.a +LIBZFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a +LIBZFS_CORE?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a +LIBZPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a # enforce the 2 -lpthread and -lc to always be the last in that exact order .if defined(LDADD) @@ -184,7 +186,7 @@ LDADD:= ${LDADD:N-lc} -lc .if defined(_LIBRARIES) && defined(LIB) && \ ${_LIBRARIES:M${LIB}} != "" .if !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR_BASE}/lib${LIB}.a +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a .endif .endif Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Jun 19 20:40:59 2017 (r320121) +++ head/share/mk/src.libnames.mk Mon Jun 19 20:47:24 2017 (r320122) @@ -343,13 +343,13 @@ _DP_rdmacm= ibverbs # Define special cases LDADD_supcplusplus= -lsupc++ -LIBATF_C= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c.a -LIBATF_CXX= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a +LIBATF_C= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c.a +LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ .for _l in ${_PRIVATELIBS} -LIB${_l:tu}?= ${DESTDIR}${LIBDIR_BASE}/libprivate${_l}.a +LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor .for _l in ${_LIBRARIES} Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/sys/boot/efi/loader/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -71,12 +71,6 @@ CFLAGS+= -DEFI_ZFS_BOOT .endif CFLAGS+= -DNO_PCI -DEFI -# make buildenv doesn't set DESTDIR, this means LIBSTAND -# will be wrong when crossbuilding. -.if exists(${.OBJDIR}/../../../../lib/libstand/libstand.a) -LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a -.endif - .if !defined(BOOT_HIDE_SERIAL_NUMBERS) # Export serial numbers, UUID, and asset tag from loader. CFLAGS+= -DSMBIOS_SERIAL_NUMBERS Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.bin/grep/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -82,7 +82,7 @@ CFLAGS+= -DWITHOUT_BZIP2 .endif .if ${MK_GNU_GREP_COMPAT} != "no" -CFLAGS+= -I${DESTDIR}/usr/include/gnu -DWITH_GNU +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU LIBADD+= gnuregex .endif Modified: head/usr.sbin/bootparamd/bootparamd/Makefile ============================================================================== --- head/usr.sbin/bootparamd/bootparamd/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/bootparamd/bootparamd/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -15,7 +15,7 @@ CFLAGS+= -DYP CLEANFILES= ${GENSRCS} -RPCSRC= ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x +RPCSRC= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc/bootparam_prot.x bootparam_prot_svc.c: ${RPCSRC} RPCGEN_CPP=${CPP:Q} rpcgen -C -m -o ${.TARGET} ${RPCSRC} Modified: head/usr.sbin/bootparamd/callbootd/Makefile ============================================================================== --- head/usr.sbin/bootparamd/callbootd/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/bootparamd/callbootd/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -10,7 +10,7 @@ CFLAGS+= -I. CLEANFILES= ${GENSRCS} -RPCSRC= ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x +RPCSRC= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc/bootparam_prot.x bootparam_prot_clnt.c: ${RPCSRC} RPCGEN_CPP=${CPP:Q} rpcgen -C -l -o ${.TARGET} ${RPCSRC} Modified: head/usr.sbin/keyserv/Makefile ============================================================================== --- head/usr.sbin/keyserv/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/keyserv/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -10,7 +10,7 @@ LIBADD= mp rpcsvc WARNS?= 1 -RPCDIR= ${DESTDIR}/usr/include/rpcsvc +RPCDIR= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc CLEANFILES= crypt_svc.c crypt.h Modified: head/usr.sbin/ntp/ntpdc/Makefile ============================================================================== --- head/usr.sbin/ntp/ntpdc/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/ntp/ntpdc/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -19,7 +19,7 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ LIBADD= edit ntp m opts pthread CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${DESTDIR}/${INCLUDEDIR}/edit + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit .if ${MK_OPENSSL} != "no" LIBADD+= crypto Modified: head/usr.sbin/ntp/ntpq/Makefile ============================================================================== --- head/usr.sbin/ntp/ntpq/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/ntp/ntpq/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -29,7 +29,7 @@ LIBADD+= md .endif CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${DESTDIR}/${INCLUDEDIR}/edit + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit CLEANFILES+= .version version.c Modified: head/usr.sbin/rpc.lockd/Makefile ============================================================================== --- head/usr.sbin/rpc.lockd/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/rpc.lockd/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -6,14 +6,14 @@ MAN= rpc.lockd.8 MLINKS= rpc.lockd.8 lockd.8 SRCS= kern.c nlm_prot_svc.c lockd.c lock_proc.c lockd_lock.c -CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc +CFLAGS+= -I. -I${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc WARNS?= 3 LIBADD= rpcsvc CLEANFILES= nlm_prot_svc.c nlm_prot.h test -RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nlm_prot.x +RPCSRC= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc/nlm_prot.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C nlm_prot_svc.c: ${RPCSRC} Modified: head/usr.sbin/rpc.statd/Makefile ============================================================================== --- head/usr.sbin/rpc.statd/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/rpc.statd/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -11,7 +11,7 @@ LIBADD= rpcsvc CLEANFILES= sm_inter_svc.c sm_inter.h -RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm_inter.x +RPCSRC= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc/sm_inter.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C sm_inter_svc.c: ${RPCSRC} Modified: head/usr.sbin/rpc.ypupdated/Makefile ============================================================================== --- head/usr.sbin/rpc.ypupdated/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/rpc.ypupdated/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -17,7 +17,7 @@ LIBADD= rpcsvc CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h -RPCDIR= ${DESTDIR}/usr/include/rpcsvc +RPCDIR= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Mon Jun 19 20:40:59 2017 (r320121) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Mon Jun 19 20:47:24 2017 (r320122) @@ -194,7 +194,7 @@ CFLAGS+=-DHAVE_CASPER .endif .if ${MK_OPENSSL} != "no" LIBADD+= crypto -CFLAGS+= -I${DESTDIR}/usr/include/openssl +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/openssl CFLAGS+= -DHAVE_LIBCRYPTO -DHAVE_OPENSSL_EVP_H .endif From owner-svn-src-all@freebsd.org Mon Jun 19 20:48:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2166ADA43C8; Mon, 19 Jun 2017 20:48:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0DA383537; Mon, 19 Jun 2017 20:48:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JKm1nu034347; Mon, 19 Jun 2017 20:48:01 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JKm1tK034346; Mon, 19 Jun 2017 20:48:01 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201706192048.v5JKm1tK034346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 19 Jun 2017 20:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320123 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 20:48:02 -0000 Author: ken Date: Mon Jun 19 20:48:00 2017 New Revision: 320123 URL: https://svnweb.freebsd.org/changeset/base/320123 Log: Fix a potential sleep while holding a mutex in the sa(4) driver. If the user issues a MTIOCEXTGET ioctl, and the tape drive in question has a serial number that is longer than 80 characters, we malloc a buffer in saextget() to hold the output of cam_strvis(). Since a mutex is held in that codepath, doing a M_WAITOK malloc could lead to sleeping while holding a mutex. Change it to a M_NOWAIT malloc and bail out if we fail to allocate the memory. Devices with serial numbers longer than 80 bytes are very rare (I don't recall seeing one), so this should be a very unusual case to hit. But it is a bug that should be fixed. sys/cam/scsi/scsi_sa.c: In saextget(), if we need to malloc a buffer to hold the output of cam_strvis(), don't wait for the memory. Fail and return an error if we can't allocate the memory immediately. PR: kern/220094 Submitted by: Jia-Ju Bai MFC after: 3 days Sponsored by: Spectra Logic Modified: head/sys/cam/scsi/scsi_sa.c Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Mon Jun 19 20:47:24 2017 (r320122) +++ head/sys/cam/scsi/scsi_sa.c Mon Jun 19 20:48:00 2017 (r320123) @@ -4465,7 +4465,18 @@ saextget(struct cdev *dev, struct cam_periph *periph, if (cgd.serial_num_len > sizeof(tmpstr)) { ts2_len = cgd.serial_num_len + 1; ts2_malloc = 1; - tmpstr2 = malloc(ts2_len, M_SCSISA, M_WAITOK | M_ZERO); + tmpstr2 = malloc(ts2_len, M_SCSISA, M_NOWAIT | M_ZERO); + /* + * The 80 characters allocated on the stack above + * will handle the vast majority of serial numbers. + * If we run into one that is larger than that, and + * we can't malloc the length without blocking, + * bail out with an out of memory error. + */ + if (tmpstr2 == NULL) { + error = ENOMEM; + goto extget_bailout; + } } else { ts2_len = sizeof(tmpstr); ts2_malloc = 0; From owner-svn-src-all@freebsd.org Mon Jun 19 21:09:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13314DA4D27; Mon, 19 Jun 2017 21:09:52 +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 E17C3846A3; Mon, 19 Jun 2017 21:09:51 +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 v5JL9oT7043000; Mon, 19 Jun 2017 21:09:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JL9o7f042997; Mon, 19 Jun 2017 21:09:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706192109.v5JL9o7f042997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 19 Jun 2017 21:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320124 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 21:09:52 -0000 Author: markj Date: Mon Jun 19 21:09:50 2017 New Revision: 320124 URL: https://svnweb.freebsd.org/changeset/base/320124 Log: Fix the !TD_IS_IDLETHREAD(curthread) locking assertions. Most of the lock slowpaths assert that the calling thread isn't an idle thread. However, this may not be true if the system has panicked, and in some cases the assertion appears before a SCHEDULER_STOPPED() check. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Jun 19 20:48:00 2017 (r320123) +++ head/sys/kern/kern_mutex.c Mon Jun 19 21:09:50 2017 (r320124) @@ -233,7 +233,8 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, cons m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -390,7 +391,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Mon Jun 19 20:48:00 2017 (r320123) +++ head/sys/kern/kern_rwlock.c Mon Jun 19 21:09:50 2017 (r320124) @@ -269,7 +269,8 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -305,7 +306,7 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -615,7 +616,8 @@ __rw_rlock(volatile uintptr_t *c, const char *file, in td = curthread; rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || + !TD_IS_IDLETHREAD(td), ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", td, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -815,7 +817,6 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char * TD_LOCKS_DEC(curthread); } - /* * This function is called when we are unable to obtain a write lock on the Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Mon Jun 19 20:48:00 2017 (r320123) +++ head/sys/kern/kern_sx.c Mon Jun 19 21:09:50 2017 (r320124) @@ -295,7 +295,8 @@ _sx_xlock(struct sx *sx, int opts, const char *file, i uintptr_t tid, x; int error = 0; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -332,7 +333,7 @@ sx_try_xlock_(struct sx *sx, const char *file, int lin if (SCHEDULER_STOPPED_TD(td)) return (1); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -1030,7 +1031,8 @@ _sx_slock(struct sx *sx, int opts, const char *file, i uintptr_t x; int error; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_slock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, From owner-svn-src-all@freebsd.org Mon Jun 19 21:48:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDB51DA57F8; Mon, 19 Jun 2017 21:48: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 8CAD2DB1; Mon, 19 Jun 2017 21:48: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 v5JLmqfd059228; Mon, 19 Jun 2017 21:48:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JLmqbi059225; Mon, 19 Jun 2017 21:48:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706192148.v5JLmqbi059225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 21:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320125 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 21:48:53 -0000 Author: kib Date: Mon Jun 19 21:48:52 2017 New Revision: 320125 URL: https://svnweb.freebsd.org/changeset/base/320125 Log: Fix batched unload for DMAR busdma in qi mode. Do not queue dmar_map_entries with zeroed gseq to dmar_qi_invalidate_locked(). Zero gseq stops the processing in the qi task. Do not assign possibly uninitialized on-stack gseq to map entries when requeuing them on unit tlb_flush queue. Random garbage in gsec is interpreted as too high invalidation sequence number and again stop the processing in the task. Make the sequence numbers generation completely contained in dmar_qi_invalidate_locked() and dmar_qi_emit_wait_seq(). Upper code directly passes boolean requesting emiting wait command instead of trying to provide hint to avoid it by passing NULL gseq pointer. Microoptimize the requeueing to tlb_flush queue by doing it for the whole queue. Diagnosed and tested by: Brett Gutstein Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_qi.c Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Mon Jun 19 21:09:50 2017 (r320124) +++ head/sys/x86/iommu/intel_ctx.c Mon Jun 19 21:48:52 2017 (r320125) @@ -703,7 +703,7 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry, if (unit->qi_enabled) { DMAR_LOCK(unit); dmar_qi_invalidate_locked(entry->domain, entry->start, - entry->end - entry->start, &entry->gseq); + entry->end - entry->start, &entry->gseq, true); if (!free) entry->flags |= DMAR_MAP_ENTRY_QI_NF; TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link); @@ -715,16 +715,14 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry, } } -static struct dmar_qi_genseq * -dmar_domain_unload_gseq(struct dmar_domain *domain, - struct dmar_map_entry *entry, struct dmar_qi_genseq *gseq) +static bool +dmar_domain_unload_emit_wait(struct dmar_domain *domain, + struct dmar_map_entry *entry) { - if (TAILQ_NEXT(entry, dmamap_link) != NULL) - return (NULL); - if (domain->batch_no++ % dmar_batch_coalesce != 0) - return (NULL); - return (gseq); + if (TAILQ_NEXT(entry, dmamap_link) == NULL) + return (true); + return (domain->batch_no++ % dmar_batch_coalesce == 0); } void @@ -733,7 +731,6 @@ dmar_domain_unload(struct dmar_domain *domain, { struct dmar_unit *unit; struct dmar_map_entry *entry, *entry1; - struct dmar_qi_genseq gseq; int error; unit = domain->dmar; @@ -757,17 +754,11 @@ dmar_domain_unload(struct dmar_domain *domain, KASSERT(unit->qi_enabled, ("loaded entry left")); DMAR_LOCK(unit); TAILQ_FOREACH(entry, entries, dmamap_link) { - entry->gseq.gen = 0; - entry->gseq.seq = 0; dmar_qi_invalidate_locked(domain, entry->start, entry->end - - entry->start, dmar_domain_unload_gseq(domain, entry, - &gseq)); + entry->start, &entry->gseq, + dmar_domain_unload_emit_wait(domain, entry)); } - TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { - entry->gseq = gseq; - TAILQ_REMOVE(entries, entry, dmamap_link); - TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link); - } + TAILQ_CONCAT(&unit->tlb_flush_entries, entries, dmamap_link); DMAR_UNLOCK(unit); } Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Mon Jun 19 21:09:50 2017 (r320124) +++ head/sys/x86/iommu/intel_dmar.h Mon Jun 19 21:48:52 2017 (r320125) @@ -305,7 +305,7 @@ void dmar_disable_qi_intr(struct dmar_unit *unit); int dmar_init_qi(struct dmar_unit *unit); void dmar_fini_qi(struct dmar_unit *unit); void dmar_qi_invalidate_locked(struct dmar_domain *domain, dmar_gaddr_t start, - dmar_gaddr_t size, struct dmar_qi_genseq *pseq); + dmar_gaddr_t size, struct dmar_qi_genseq *psec, bool emit_wait); void dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit); Modified: head/sys/x86/iommu/intel_qi.c ============================================================================== --- head/sys/x86/iommu/intel_qi.c Mon Jun 19 21:09:50 2017 (r320124) +++ head/sys/x86/iommu/intel_qi.c Mon Jun 19 21:48:52 2017 (r320125) @@ -171,7 +171,8 @@ dmar_qi_emit_wait_descr(struct dmar_unit *unit, uint32 } static void -dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct dmar_qi_genseq *pseq) +dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct dmar_qi_genseq *pseq, + bool emit_wait) { struct dmar_qi_genseq gsec; uint32_t seq; @@ -192,7 +193,10 @@ dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct d seq = unit->inv_waitd_seq++; pseq->gen = unit->inv_waitd_gen; pseq->seq = seq; - dmar_qi_emit_wait_descr(unit, seq, true, true, false); + if (emit_wait) { + dmar_qi_ensure(unit, 1); + dmar_qi_emit_wait_descr(unit, seq, true, true, false); + } } static void @@ -215,7 +219,7 @@ dmar_qi_wait_for_seq(struct dmar_unit *unit, const str void dmar_qi_invalidate_locked(struct dmar_domain *domain, dmar_gaddr_t base, - dmar_gaddr_t size, struct dmar_qi_genseq *pseq) + dmar_gaddr_t size, struct dmar_qi_genseq *pseq, bool emit_wait) { struct dmar_unit *unit; dmar_gaddr_t isize; @@ -232,10 +236,7 @@ dmar_qi_invalidate_locked(struct dmar_domain *domain, DMAR_IQ_DESCR_IOTLB_DID(domain->domain), base | am); } - if (pseq != NULL) { - dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, pseq); - } + dmar_qi_emit_wait_seq(unit, pseq, emit_wait); dmar_qi_advance_tail(unit); } @@ -247,7 +248,7 @@ dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *u DMAR_ASSERT_LOCKED(unit); dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_CTX_INV | DMAR_IQ_DESCR_CTX_GLOB, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -261,7 +262,7 @@ dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_IOTLB_INV | DMAR_IQ_DESCR_IOTLB_GLOB | DMAR_IQ_DESCR_IOTLB_DW | DMAR_IQ_DESCR_IOTLB_DR, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -274,7 +275,7 @@ dmar_qi_invalidate_iec_glob(struct dmar_unit *unit) DMAR_ASSERT_LOCKED(unit); dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_IEC_INV, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -298,7 +299,7 @@ dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int s DMAR_IQ_DESCR_IEC_IM(l), 0); } dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); /* @@ -344,8 +345,7 @@ dmar_qi_task(void *arg, int pending __unused) entry = TAILQ_FIRST(&unit->tlb_flush_entries); if (entry == NULL) break; - if ((entry->gseq.gen == 0 && entry->gseq.seq == 0) || - !dmar_qi_seq_processed(unit, &entry->gseq)) + if (!dmar_qi_seq_processed(unit, &entry->gseq)) break; TAILQ_REMOVE(&unit->tlb_flush_entries, entry, dmamap_link); DMAR_UNLOCK(unit); @@ -432,7 +432,7 @@ dmar_fini_qi(struct dmar_unit *unit) DMAR_LOCK(unit); /* quisce */ dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); /* only after the quisce, disable queue */ From owner-svn-src-all@freebsd.org Mon Jun 19 22:07:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA541DA5BD7; Mon, 19 Jun 2017 22:07:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1D81776; Mon, 19 Jun 2017 22:07:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JM7rKM067404; Mon, 19 Jun 2017 22:07:53 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JM7rVn067400; Mon, 19 Jun 2017 22:07:53 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706192207.v5JM7rVn067400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 19 Jun 2017 22:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320126 - in head/sys: fs/nfs fs/nfsclient sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 22:07:54 -0000 Author: rmacklem Date: Mon Jun 19 22:07:53 2017 New Revision: 320126 URL: https://svnweb.freebsd.org/changeset/base/320126 Log: Add the definition of maxbcachebuf to sys/buf.h. r320070 removed the definition of maxbcachebuf from sys/param.h to fix the build for arm. This patch adds the definition of maxbcachebuf to sys/buf.h, which should be ok, since sys/buf.h is not being included in arm/arm/elf_note.S. Suggested by: kib MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/sys/buf.h Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Mon Jun 19 21:48:52 2017 (r320125) +++ head/sys/fs/nfs/nfs_commonkrpc.c Mon Jun 19 22:07:53 2017 (r320126) @@ -96,7 +96,6 @@ extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); extern int nfs_numnfscbd; extern int nfscl_debuglevel; -extern int maxbcachebuf; SVCPOOL *nfscbd_pool; static int nfsrv_gsscallbackson = 0; Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Jun 19 21:48:52 2017 (r320125) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Jun 19 22:07:53 2017 (r320126) @@ -83,7 +83,6 @@ extern int nfscl_debuglevel; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern struct mtx ncl_iod_mutex; -extern int maxbcachebuf; NFSCLSTATEMUTEX; MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "NFS request header"); Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Mon Jun 19 21:48:52 2017 (r320125) +++ head/sys/sys/buf.h Mon Jun 19 22:07:53 2017 (r320126) @@ -472,6 +472,7 @@ buf_track(struct buf *bp, const char *location) extern int nbuf; /* The number of buffer headers */ extern long maxswzone; /* Max KVA for swap structures */ extern long maxbcache; /* Max KVA for buffer cache */ +extern int maxbcachebuf; /* Max buffer cache block size */ extern long runningbufspace; extern long hibufspace; extern int dirtybufthresh; From owner-svn-src-all@freebsd.org Mon Jun 19 22:38:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51F8FDA62EE for ; Mon, 19 Jun 2017 22:38:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08B5B2689 for ; Mon, 19 Jun 2017 22:38:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-vk0-x232.google.com with SMTP id y70so60270183vky.3 for ; Mon, 19 Jun 2017 15:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZWniBZJM86/s2QcywCqWjkANXcJb4hYKKWR/LDF49vo=; b=Cdv8iWkbYwWqC4H8M9po8B9tTtomEVRKKHBjGNInH2iRhoTO5zQqbOFJ/uEBd2CrX5 5OfQUM1ucMmjpbKPNe+JC+Ww8utQ/B9NT9O7nalfnfZmCREF1yIWZ/ACdmAPc1NAIqih F+nHigrVi4BhBDQiN+CivwEl6IMVolGMRL3wNVggdsLYqVMhi6HJdfRtzHJEl9YJeS5a 3jcW9Ano2ig0BTOo6bnQDcGohzcGF8TGIXGqAilqB/g3cyPT16L2qmL1h6yx9B8EOx3X x4cfpr6ofCmBg1AuPITlSsg9f7Mue8A+S2xzKt35UD9S5wQD2OnYGo0Ky2QTH5F2ITgL JqDg== 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=ZWniBZJM86/s2QcywCqWjkANXcJb4hYKKWR/LDF49vo=; b=q5mqptrarFiE6HyBJ643HRTahOkclsjG5cRokRS2InKjBjoots5L9N4Ou+4RmN8Abg 4LZ4LINJnlVbqxzOL0rAck7h+rh8SzEmTSQNc1qlpJF2J7QP6NuZ8UPyf+uOyILqyuFv P6BOWvJMVVaeauaLKziTJxd4NvSzDi7eVjkFk20Jclc9ksoSbCVaRwGD0tZ0rpRLAFJd 6jVo90wiDqMMEO2241nw5rxNoCUsIfw6rhNHI06GuMPbsGzUq/25EUCY3V64yHChFvZL /GNeX/FA4mfeuyUJqujE92hvCGvU0IUXbo7RQIZF+8DAPLUsqK/mYE9PQZxcMIDhs2/O m9lg== X-Gm-Message-State: AKS2vOzt4pdXNwQlX2R0/t+rfYFRnTaJ0euyHw5vpvqMDGh5NLCsZZZs HLW62qhKTC2VfwU/rATKcE5p7ziykvPg X-Received: by 10.31.69.138 with SMTP id s132mr15543476vka.13.1497911878961; Mon, 19 Jun 2017 15:37:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.36.195 with HTTP; Mon, 19 Jun 2017 15:37:58 -0700 (PDT) In-Reply-To: <5514A07B.70302@FreeBSD.org> References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> From: Oliver Pinter Date: Tue, 20 Jun 2017 00:37:58 +0200 Message-ID: Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: John Baldwin , avg@freebsd.org Cc: Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 22:38:00 -0000 On 3/27/15, John Baldwin wrote: > On 3/24/15 1:00 PM, Randall Stewart wrote: >> Author: rrs >> Date: Tue Mar 24 20:00:11 2015 >> New Revision: 280455 >> URL: https://svnweb.freebsd.org/changeset/base/280455 >> >> Log: >> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >> >> Sponsored by: Netflix Inc. >> >> Added: >> stable/10/usr.sbin/pmcstudy/ >> - copied from r277177, head/usr.sbin/pmcstudy/ >> Modified: >> stable/10/lib/libpmc/libpmc.c >> stable/10/sys/amd64/conf/GENERIC Hi! The MFC of 279833 was missing from this commit. I'm CCing avg@, since he made a big bunch of hwpmc related MFCs yesterday. > > The change to GENERIC looks like it slipped in by accident? Neither of the > commits to HEAD enabled hwpmc in GENERIC AFAICT. > > -- > John Baldwin > _______________________________________________ > svn-src-stable-10@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 > To unsubscribe, send any mail to > "svn-src-stable-10-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Tue Jun 20 01:58:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 442F4D88E72; Tue, 20 Jun 2017 01:58:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 17517686F5; Tue, 20 Jun 2017 01:58:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from 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 did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id EC25D613E; Tue, 20 Jun 2017 01:58:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Tue, 20 Jun 2017 01:58:52 +0000 From: Glen Barber To: Jason Evans Cc: Shawn Webb , Jason Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319971 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemalloc Message-ID: <20170620015852.GC34898@FreeBSD.org> References: <201706150715.v5F7F6aT031218@repo.freebsd.org> <20170616224517.td7yiahzv2oxcpts@mutt-hbsd> <20170616171544.9b4a398cac3328f9bd6cd747@canonware.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <20170616171544.9b4a398cac3328f9bd6cd747@canonware.com> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 01:58:55 -0000 --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 16, 2017 at 05:15:44PM -0700, Jason Evans wrote: > I'm going to be AFK for the next couple days, and I do not have > arm64 hardware, so I hope this is enough information for someone > to work out a simple fix. >=20 A simple fix is reverting the offending commit. You do not need arm64 hardware to fix the build, at least. There are Project resources available to ensure the code at least compiles. Glen --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAllIgVYACgkQAxRYpUeP 4pNYRBAAnYh6HyIeUOod2VrXxcAYzpBSDQXdIxRW3llgBT28NDadkFICKSiTVRrN rVppJ5TTM2M4871fe8V3GeM0glNVrVxsc1dKI93Os/1DlihSo05tdaGlQZI85cp6 Dh3MVFkSy6/1E6CrQyvgDitbct26JO9DWdrFe7cTlS0UimOpvs+ZLrvULrnk9wDR KxEFtQQVxBiV56iPYptyxbxoQoXUUgjSfYN2b0kDAyOn1MDGsyjA9QCTSsZMWjns in8bKS7wesfFntuFtnlnZb/8mdXrvT4mJ6GiaFqUZeCrQ9InISUmRTHdP/dK/Yk6 D2c2AmzNl1/ZDl/KfTGpt6tOL6mMtU1nn3r+Mo+8vzzM64Wlf/l3o7qEUd6MZ9Qo UsjE+C0zO7bJevNMgk91iRYLVPEzesQ3bJYJYsi7wm1UOlHg2StrxhSry3sef79o lZg1Z9J8GI0CORoBl8wOn7pEI97i87VmH2CuWWaXCrhS+kfTaskocCqGu3tdxwIa 1wGSGRC34BqQmtq2zWlgVYAeUwe1RZ8mu7t/+umcsISBZI+V9uRZFjUNeGuawJfR zDrWqSr3QcTBc7NmB72T+Bz30909ElosN7mjMa1B3wep+obJHaNV6QSCZK/0nNTK Zh7n36mnkA9iOJEGW+pwOZGoVgb2LKyHeFRPivFHjANQeLgVKKU= =kYgT -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd-- From owner-svn-src-all@freebsd.org Tue Jun 20 02:09:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0825D89524; Tue, 20 Jun 2017 02:09:51 +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 BF52D68D31; Tue, 20 Jun 2017 02:09:51 +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 v5K29otp065615; Tue, 20 Jun 2017 02:09:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K29omh065613; Tue, 20 Jun 2017 02:09:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200209.v5K29omh065613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 02:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320127 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 02:09:52 -0000 Author: manu Date: Tue Jun 20 02:09:50 2017 New Revision: 320127 URL: https://svnweb.freebsd.org/changeset/base/320127 Log: Switch back to the BSDL DTC (Device Tree Compiler). The BSDL dtc has grown the needed features (overlays mostly) and is able to compile all of our base DTS. You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5) to specify an alternate location for the compiler to use. Discussed with: emaste, imp Modified: head/UPDATING head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jun 19 22:07:53 2017 (r320126) +++ head/UPDATING Tue Jun 20 02:09:50 2017 (r320127) @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170620: + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC + if you require the GPL compiler. + 20170618: The internal ABI used for communication between the NFS kernel modules was changed by r320085, so __FreeBSD_version was bumped to Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jun 19 22:07:53 2017 (r320126) +++ head/share/mk/src.opts.mk Tue Jun 20 02:09:50 2017 (r320127) @@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \ GNU_DIFF \ GNU_GREP \ GPIO \ - GPL_DTC \ HAST \ HTML \ HYPERV \ @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ DTRACE_TESTS \ GNU_GREP_COMPAT \ + GPL_DTC \ HESIOD \ LIBSOFT \ NAND \ From owner-svn-src-all@freebsd.org Tue Jun 20 02:28:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDCED89EED; Tue, 20 Jun 2017 02:28: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 ED3936A6F4; Tue, 20 Jun 2017 02:28:20 +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 v5K2SJft073433; Tue, 20 Jun 2017 02:28:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K2SGRb073394; Tue, 20 Jun 2017 02:28:16 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200228.v5K2SGRb073394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 02:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320128 - in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/marvell Bindings/arm/omap Bindings/ata Bindings/bus Bindings/clock Bindi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 02:28:21 -0000 Author: manu Date: Tue Jun 20 02:28:15 2017 New Revision: 320128 URL: https://svnweb.freebsd.org/changeset/base/320128 Log: Update the DTS file from Linux 4.11 Added: vendor/device-tree/dist/Bindings/arm/axentia.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/98dx3236-resume-ctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/98dx3236.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/ahci-da850.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/idt,versaclock5.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/rockchip,rk3328-cru.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/stericsson,abx500.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/sun9i-de.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/sun9i-usb.txt (contents, props changed) vendor/device-tree/dist/Bindings/cpufreq/ti-cpufreq.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/brcm,spu-crypto.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/mediatek-crypto.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/bridge/anx7814.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/bridge/sil-sii8620.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/bridge/ti,ths8135.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/multi-inno,mi0283qt.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/boe,nv101wxmn51.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/netron-dy,e231732.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/panel.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/tianma,tm070jdhg30.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/cortina,gemini-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpu/arm,mali-utgard.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/adc128d818.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/sht15.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/stts751.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-stm32.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/nvidia,tegra186-bpmp-i2c.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/amlogic,meson-saradc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/avia-hx711.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/max11100.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/qcom,pm8xxx-xoadc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/renesas,gyroadc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/ti-ads7950.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/imu/bmi160.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/imu/st_lsm6dsx.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/light/cm3605.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/potentiometer/max5481.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/temperature/tmp007.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/timer/ vendor/device-tree/dist/Bindings/iio/timer/stm32-timer-trigger.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/cypress,tm2-touchkey.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/mpr121-touchkey.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/zet6223.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/cortina,gemini-interrupt-controller.txt (contents, props changed) vendor/device-tree/dist/Bindings/leds/irled/ vendor/device-tree/dist/Bindings/leds/irled/spi-ir-led.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/fsl-vdoa.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/toshiba,et8ek8.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/mtk-cir.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/rc.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/st,st-delta.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/ti,da850-vpif.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/aspeed-gfx.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/aspeed-lpc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/motorola-cpcap.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/stm32-timers.txt (contents, props changed) vendor/device-tree/dist/Bindings/mips/img/pistachio-marduk.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/idt_89hpesx.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/mmc-pwrseq-sd8787.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/zx-dw-mshc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/aspeed-smc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/common.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/cortina,gemini-flash.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/btusb.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/marvell,prestera.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/marvell-bt-8xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/ieee80211.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/qcom,usb-hs-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/qcom,usb-hsic-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-98dx3236-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/ti,iodelay.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/supply/axp20x_ac_power.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/supply/bq27xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/supply/sbs_sbs-charger.txt (contents, props changed) vendor/device-tree/dist/Bindings/power_supply/maxim,max14656.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/opal/power-mgt.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/pwm-stm32.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/cpcap-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/hisilicon,hi3660-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/zte,zx2967-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/cortina,gemini.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/st,stm32-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/slave-device.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/zte/ vendor/device-tree/dist/Bindings/soc/zte/pd-2967xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/nau8540.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/rockchip,rk3288-hdmi-analog.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sun8i-a33-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-lantiq-ssc.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/rcar-gen3-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/zx2967-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/cortina,gemini-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/renesas,ostm.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/ulpi.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/usb251xb.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/cortina,gemin-watchdog.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/zte,zx2967-wdt.txt (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/hi3660-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3328-cru.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/ste-ab8500.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/stm32fx-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sun5i-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sun8i-v3s-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-de.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-usb.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/net/mscc-phy-vsc8531.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32h7-pinfunc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/rk3328-power.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/sun5i-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/sun8i-v3s-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-ccu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-de.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-usb.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/soc/zte,pm_domains.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/thermal/lm90.h (contents, props changed) vendor/device-tree/dist/src/arm/am335x-boneblack-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am335x-boneblack-wireless.dts (contents, props changed) vendor/device-tree/dist/src/arm/am335x-bonegreen-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am335x-bonegreen-wireless.dts (contents, props changed) vendor/device-tree/dist/src/arm/am335x-pcm-953.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am335x-phycore-rdk.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-388-clearfog-base.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-388-clearfog-pro.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-388-clearfog.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-98dx3236.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-98dx3336.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-98dx4251.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-db-dxbc2.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-db-xc3-24g4xg.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-opp-romulus.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91-linea.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91-tse850-3.dts (contents, props changed) vendor/device-tree/dist/src/arm/axp223.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm47081-luxul-xap-1410.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm47081-luxul-xwr-1200.dts (contents, props changed) vendor/device-tree/dist/src/arm/da850-lego-ev3.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-prime.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-icore-rqs.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-savageboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-mccmon6.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-savageboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-savageboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-isiot-emmc.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-isiot-nand.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-isiot.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-opos6ul.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-opos6uldev.dts (contents, props changed) vendor/device-tree/dist/src/arm/sama5d36ek_cmp.dts (contents, props changed) vendor/device-tree/dist/src/arm/sama5d3xcm_cmp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/sama5d3xmb_cmp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/socfpga_arria10_socdk_nand.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun5i-a13-licheepi-one.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h2-plus-orangepi-zero.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h3-beelink-x2.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-v3s-licheepi-zero.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-v3s.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-c.dts (contents, props changed) vendor/device-tree/dist/src/arm/vf610-zii-dev.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-bananapi-m64.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-wetek-hub.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-wetek-play2.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxl-s905x-nexbox-a95x.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-q200.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-q201.dts (contents, props changed) vendor/device-tree/dist/src/arm64/arm/juno-cs-r1r2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/broadcom/ns2-xmc.dts (contents, props changed) vendor/device-tree/dist/src/arm64/exynos/exynos5433-bus.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a-frdm.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a-qds.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a-rdb.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/hisilicon/hi3660-hikey960.dts (contents, props changed) vendor/device-tree/dist/src/arm64/hisilicon/hi3660.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-8040-mcbin.dts (contents, props changed) vendor/device-tree/dist/src/mips/img/ vendor/device-tree/dist/src/mips/img/pistachio.dtsi (contents, props changed) vendor/device-tree/dist/src/mips/img/pistachio_marduk.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/kmcent2.dts (contents, props changed) Deleted: vendor/device-tree/dist/Bindings/arm/bcm/ns2.txt vendor/device-tree/dist/Bindings/ata/brcm,sata-brcmstb.txt vendor/device-tree/dist/Bindings/clock/exynos4415-clock.txt vendor/device-tree/dist/Bindings/clock/hi3519-crg.txt vendor/device-tree/dist/Bindings/clock/maxim,max77802.txt vendor/device-tree/dist/Bindings/clock/st/st,clkgen-divmux.txt vendor/device-tree/dist/Bindings/clock/st/st,clkgen-prediv.txt vendor/device-tree/dist/Bindings/clock/st/st,clkgen-vcc.txt vendor/device-tree/dist/Bindings/display/msm/mdp.txt vendor/device-tree/dist/Bindings/display/ti/ti,tfp410.txt vendor/device-tree/dist/Bindings/dma/xilinx/xilinx_vdma.txt vendor/device-tree/dist/Bindings/gpio/gpio-sx150x.txt vendor/device-tree/dist/Bindings/gpio/gpio-tps65086.txt vendor/device-tree/dist/Bindings/input/touchscreen/focaltech-ft6236.txt vendor/device-tree/dist/Bindings/ipmi.txt vendor/device-tree/dist/Bindings/mmc/brcm,bcm2835-sdhci.txt vendor/device-tree/dist/Bindings/net/marvell-bt-sd8xxx.txt vendor/device-tree/dist/Bindings/net/wireless/marvell-sd8xxx.txt vendor/device-tree/dist/Bindings/power/act8945a-charger.txt vendor/device-tree/dist/Bindings/power/bq2415x.txt vendor/device-tree/dist/Bindings/power/bq24257.txt vendor/device-tree/dist/Bindings/power/bq25890.txt vendor/device-tree/dist/Bindings/power/da9150-charger.txt vendor/device-tree/dist/Bindings/power/da9150-fg.txt vendor/device-tree/dist/Bindings/power/isp1704.txt vendor/device-tree/dist/Bindings/power/ltc2941.txt vendor/device-tree/dist/Bindings/power/qcom,coincell-charger.txt vendor/device-tree/dist/Bindings/power/rt9455_charger.txt vendor/device-tree/dist/Bindings/power/rx51-battery.txt vendor/device-tree/dist/Bindings/power/twl-charger.txt vendor/device-tree/dist/Bindings/power_supply/ab8500/btemp.txt vendor/device-tree/dist/Bindings/power_supply/ab8500/chargalg.txt vendor/device-tree/dist/Bindings/power_supply/ab8500/charger.txt vendor/device-tree/dist/Bindings/power_supply/ab8500/fg.txt vendor/device-tree/dist/Bindings/power_supply/axp20x_usb_power.txt vendor/device-tree/dist/Bindings/power_supply/axxia-reset.txt vendor/device-tree/dist/Bindings/power_supply/charger-manager.txt vendor/device-tree/dist/Bindings/power_supply/gpio-charger.txt vendor/device-tree/dist/Bindings/power_supply/imx-snvs-poweroff.txt vendor/device-tree/dist/Bindings/power_supply/lp8727_charger.txt vendor/device-tree/dist/Bindings/power_supply/max17042_battery.txt vendor/device-tree/dist/Bindings/power_supply/max8925_batter.txt vendor/device-tree/dist/Bindings/power_supply/msm-poweroff.txt vendor/device-tree/dist/Bindings/power_supply/olpc_battery.txt vendor/device-tree/dist/Bindings/power_supply/power_supply.txt vendor/device-tree/dist/Bindings/power_supply/qcom_smbb.txt vendor/device-tree/dist/Bindings/power_supply/qnap-poweroff.txt vendor/device-tree/dist/Bindings/power_supply/restart-poweroff.txt vendor/device-tree/dist/Bindings/power_supply/sbs_sbs-battery.txt vendor/device-tree/dist/Bindings/power_supply/ti,bq24735.txt vendor/device-tree/dist/Bindings/power_supply/tps65090.txt vendor/device-tree/dist/Bindings/power_supply/tps65217_charger.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/cpm.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/cpm/brg.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/cpm/pic.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/cpm/usb.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/gpio.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/network.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe/firmware.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe/par_io.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe/ucc.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/qe/usb.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpm_qe/serial.txt vendor/device-tree/dist/Bindings/powerpc/fsl/guts.txt vendor/device-tree/dist/Bindings/powerpc/fsl/mem-ctrlr.txt vendor/device-tree/dist/Bindings/reset/brcm,bcm21664-resetmgr.txt vendor/device-tree/dist/Bindings/soc/mediatek/auxadc.txt vendor/device-tree/dist/Bindings/sound/renesas,rsrc-card.txt vendor/device-tree/dist/Bindings/sound/samsung,odroidx2-max98090.txt vendor/device-tree/dist/Bindings/timer/ezchip,nps400-timer.txt vendor/device-tree/dist/Bindings/timer/rockchip,rk3288-timer.txt vendor/device-tree/dist/Bindings/video/bridge/anx7814.txt vendor/device-tree/dist/Bindings/video/bridge/sil-sii8620.txt vendor/device-tree/dist/include/dt-bindings/clock/exynos4415.h vendor/device-tree/dist/include/dt-bindings/clock/stih415-clks.h vendor/device-tree/dist/src/arm/arm-realview-eb-11mp-revb.dts vendor/device-tree/dist/src/arm/exynos4212.dtsi vendor/device-tree/dist/src/arm/exynos4415-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4415.dtsi vendor/device-tree/dist/src/arm/exynos4x12-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4x12.dtsi vendor/device-tree/dist/src/arm/exynos5422-cpu-thermal.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c-pins.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c.dts vendor/device-tree/dist/src/arm/rk3228.dtsi vendor/device-tree/dist/src/arm/stih415-b2000.dts vendor/device-tree/dist/src/arm/stih415-b2020.dts vendor/device-tree/dist/src/arm/stih415-clock.dtsi vendor/device-tree/dist/src/arm/stih415-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih415.dtsi vendor/device-tree/dist/src/arm/stih416-b2000.dts vendor/device-tree/dist/src/arm/stih416-b2020.dts vendor/device-tree/dist/src/arm/stih416-b2020e.dts vendor/device-tree/dist/src/arm/stih416-clock.dtsi vendor/device-tree/dist/src/arm/stih416-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih416.dtsi vendor/device-tree/dist/src/arm/stih41x-b2000.dtsi vendor/device-tree/dist/src/arm/stih41x-b2020.dtsi vendor/device-tree/dist/src/arm/stih41x-b2020x.dtsi vendor/device-tree/dist/src/arm/stih41x.dtsi vendor/device-tree/dist/src/arm/sun5i-q8-common.dtsi vendor/device-tree/dist/src/arm/sunxi-q8-common.dtsi vendor/device-tree/dist/src/arm/uniphier-common32.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-ld4-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-ld4.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-ld6b-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-ld6b.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ace.dts vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-sanji.dts vendor/device-tree/dist/src/arm/uniphier-ph1-pro4.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-pro5.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-sld3-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-sld3.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-sld8-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-sld8.dtsi vendor/device-tree/dist/src/arm/uniphier-proxstream2-gentil.dts vendor/device-tree/dist/src/arm/uniphier-proxstream2-vodka.dts vendor/device-tree/dist/src/arm/uniphier-proxstream2.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxl-nexbox-a95x.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-s912-q200.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-s912-q201.dts vendor/device-tree/dist/src/arm64/hisilicon/hip05_hns.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld20-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld20.dtsi vendor/device-tree/dist/src/mips/brcm/bcm96358nb4ser.dts Modified: vendor/device-tree/dist/Bindings/arm/amlogic.txt vendor/device-tree/dist/Bindings/arm/arch_timer.txt vendor/device-tree/dist/Bindings/arm/cpus.txt vendor/device-tree/dist/Bindings/arm/davinci.txt vendor/device-tree/dist/Bindings/arm/fsl.txt vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt vendor/device-tree/dist/Bindings/arm/omap/omap.txt vendor/device-tree/dist/Bindings/arm/shmobile.txt vendor/device-tree/dist/Bindings/arm/sunxi.txt vendor/device-tree/dist/Bindings/bus/qcom,ebi2.txt vendor/device-tree/dist/Bindings/clock/brcm,bcm2835-cprman.txt vendor/device-tree/dist/Bindings/clock/mvebu-corediv-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-cpu-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-gated-clock.txt vendor/device-tree/dist/Bindings/clock/qcom,rpmcc.txt vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt vendor/device-tree/dist/Bindings/clock/renesas,cpg-mssr.txt vendor/device-tree/dist/Bindings/clock/rockchip,rk3399-cru.txt vendor/device-tree/dist/Bindings/clock/st,stm32-rcc.txt vendor/device-tree/dist/Bindings/clock/sunxi-ccu.txt vendor/device-tree/dist/Bindings/clock/ti,cdce925.txt vendor/device-tree/dist/Bindings/clock/zx296718-clk.txt vendor/device-tree/dist/Bindings/devfreq/exynos-bus.txt vendor/device-tree/dist/Bindings/display/arm,pl11x.txt vendor/device-tree/dist/Bindings/display/brcm,bcm-vc4.txt vendor/device-tree/dist/Bindings/display/bridge/adi,adv7511.txt vendor/device-tree/dist/Bindings/display/bridge/analogix_dp.txt vendor/device-tree/dist/Bindings/display/bridge/dw_hdmi.txt vendor/device-tree/dist/Bindings/display/cirrus,clps711x-fb.txt vendor/device-tree/dist/Bindings/display/exynos/exynos7-decon.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt vendor/device-tree/dist/Bindings/display/exynos/samsung-fimd.txt vendor/device-tree/dist/Bindings/display/hisilicon/hisi-ade.txt vendor/device-tree/dist/Bindings/display/imx/fsl,imx-fb.txt vendor/device-tree/dist/Bindings/display/imx/hdmi.txt vendor/device-tree/dist/Bindings/display/imx/ldb.txt vendor/device-tree/dist/Bindings/display/mediatek/mediatek,disp.txt vendor/device-tree/dist/Bindings/display/msm/dsi.txt vendor/device-tree/dist/Bindings/display/msm/edp.txt vendor/device-tree/dist/Bindings/display/msm/gpu.txt vendor/device-tree/dist/Bindings/display/msm/hdmi.txt vendor/device-tree/dist/Bindings/display/panel/panel-dpi.txt vendor/device-tree/dist/Bindings/display/panel/samsung,ld9040.txt vendor/device-tree/dist/Bindings/display/panel/samsung,s6e8aa0.txt vendor/device-tree/dist/Bindings/display/rockchip/analogix_dp-rockchip.txt vendor/device-tree/dist/Bindings/display/rockchip/dw_hdmi-rockchip.txt vendor/device-tree/dist/Bindings/display/ssd1307fb.txt vendor/device-tree/dist/Bindings/display/tilcdc/panel.txt vendor/device-tree/dist/Bindings/display/zte,vou.txt vendor/device-tree/dist/Bindings/dma/stm32-dma.txt vendor/device-tree/dist/Bindings/eeprom/eeprom.txt vendor/device-tree/dist/Bindings/gpio/gpio-pca953x.txt vendor/device-tree/dist/Bindings/gpio/gpio.txt vendor/device-tree/dist/Bindings/hwmon/lm70.txt vendor/device-tree/dist/Bindings/hwmon/lm90.txt vendor/device-tree/dist/Bindings/i2c/i2c-mux-pca954x.txt vendor/device-tree/dist/Bindings/i2c/i2c-sh_mobile.txt vendor/device-tree/dist/Bindings/i2c/trivial-devices.txt vendor/device-tree/dist/Bindings/iio/accel/lis302.txt vendor/device-tree/dist/Bindings/iio/adc/st,stm32-adc.txt vendor/device-tree/dist/Bindings/iio/st-sensors.txt vendor/device-tree/dist/Bindings/input/pwm-beeper.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic.txt vendor/device-tree/dist/Bindings/interrupt-controller/snps,archs-idu-intc.txt vendor/device-tree/dist/Bindings/iommu/arm,smmu.txt vendor/device-tree/dist/Bindings/leds/common.txt vendor/device-tree/dist/Bindings/media/gpio-ir-receiver.txt vendor/device-tree/dist/Bindings/media/hix5hd2-ir.txt vendor/device-tree/dist/Bindings/media/meson-ir.txt vendor/device-tree/dist/Bindings/media/sunxi-ir.txt vendor/device-tree/dist/Bindings/mfd/as3722.txt vendor/device-tree/dist/Bindings/mfd/mfd.txt vendor/device-tree/dist/Bindings/mfd/mt6397.txt vendor/device-tree/dist/Bindings/mfd/omap-usb-host.txt vendor/device-tree/dist/Bindings/mfd/qcom-rpm.txt vendor/device-tree/dist/Bindings/misc/atmel-ssc.txt vendor/device-tree/dist/Bindings/mmc/amlogic,meson-gx.txt vendor/device-tree/dist/Bindings/mmc/mmc.txt vendor/device-tree/dist/Bindings/mmc/rockchip-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/sdhci-st.txt vendor/device-tree/dist/Bindings/mmc/sdhci.txt vendor/device-tree/dist/Bindings/mmc/sunxi-mmc.txt vendor/device-tree/dist/Bindings/mmc/synopsys-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/tmio_mmc.txt vendor/device-tree/dist/Bindings/mtd/jedec,spi-nor.txt vendor/device-tree/dist/Bindings/mtd/mtk-quadspi.txt vendor/device-tree/dist/Bindings/net/brcm,bcm7445-switch-v4.0.txt vendor/device-tree/dist/Bindings/net/brcm,systemport.txt vendor/device-tree/dist/Bindings/net/cpsw.txt vendor/device-tree/dist/Bindings/net/dsa/dsa.txt vendor/device-tree/dist/Bindings/net/dsa/marvell.txt vendor/device-tree/dist/Bindings/net/ethernet.txt vendor/device-tree/dist/Bindings/net/marvell-armada-370-neta.txt vendor/device-tree/dist/Bindings/net/marvell-pp2.txt vendor/device-tree/dist/Bindings/net/meson-dwmac.txt vendor/device-tree/dist/Bindings/net/mscc-phy-vsc8531.txt vendor/device-tree/dist/Bindings/net/phy.txt vendor/device-tree/dist/Bindings/net/rockchip-dwmac.txt vendor/device-tree/dist/Bindings/net/snps,dwc-qos-ethernet.txt vendor/device-tree/dist/Bindings/net/stmmac.txt vendor/device-tree/dist/Bindings/net/wireless/marvell-8xxx.txt vendor/device-tree/dist/Bindings/nvmem/imx-ocotp.txt vendor/device-tree/dist/Bindings/opp/opp.txt vendor/device-tree/dist/Bindings/pci/hisilicon-pcie.txt vendor/device-tree/dist/Bindings/pci/mvebu-pci.txt vendor/device-tree/dist/Bindings/pci/pci-iommu.txt vendor/device-tree/dist/Bindings/pci/rcar-pci.txt vendor/device-tree/dist/Bindings/pci/rockchip-pcie.txt vendor/device-tree/dist/Bindings/pci/samsung,exynos5440-pcie.txt vendor/device-tree/dist/Bindings/phy/samsung-phy.txt vendor/device-tree/dist/Bindings/phy/sun4i-usb-phy.txt vendor/device-tree/dist/Bindings/pinctrl/allwinner,sunxi-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/fsl,imx7d-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,kirkwood-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-aspeed.txt vendor/device-tree/dist/Bindings/pinctrl/samsung-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/st,stm32-pinctrl.txt vendor/device-tree/dist/Bindings/power/pd-samsung.txt vendor/device-tree/dist/Bindings/power/reset/gpio-poweroff.txt vendor/device-tree/dist/Bindings/power/reset/qnap-poweroff.txt vendor/device-tree/dist/Bindings/power/supply/axp20x_usb_power.txt vendor/device-tree/dist/Bindings/power/supply/qcom_smbb.txt vendor/device-tree/dist/Bindings/power/supply/ti,bq24735.txt vendor/device-tree/dist/Bindings/powerpc/4xx/emac.txt vendor/device-tree/dist/Bindings/powerpc/fsl/l2cache.txt vendor/device-tree/dist/Bindings/pwm/imx-pwm.txt vendor/device-tree/dist/Bindings/regulator/anatop-regulator.txt vendor/device-tree/dist/Bindings/regulator/gpio-regulator.txt vendor/device-tree/dist/Bindings/regulator/qcom,smd-rpm-regulator.txt vendor/device-tree/dist/Bindings/regulator/ti-abb-regulator.txt vendor/device-tree/dist/Bindings/remoteproc/qcom,adsp.txt vendor/device-tree/dist/Bindings/remoteproc/qcom,q6v5.txt vendor/device-tree/dist/Bindings/reset/ti-syscon-reset.txt vendor/device-tree/dist/Bindings/reset/uniphier-reset.txt vendor/device-tree/dist/Bindings/rng/omap_rng.txt vendor/device-tree/dist/Bindings/rtc/armada-380-rtc.txt vendor/device-tree/dist/Bindings/rtc/imxdi-rtc.txt vendor/device-tree/dist/Bindings/rtc/maxim,ds3231.txt vendor/device-tree/dist/Bindings/rtc/pcf8563.txt vendor/device-tree/dist/Bindings/rtc/sun6i-rtc.txt vendor/device-tree/dist/Bindings/serial/8250.txt vendor/device-tree/dist/Bindings/serial/fsl-imx-uart.txt vendor/device-tree/dist/Bindings/serial/serial.txt vendor/device-tree/dist/Bindings/soc/fsl/qman-portals.txt vendor/device-tree/dist/Bindings/soc/rockchip/grf.txt vendor/device-tree/dist/Bindings/soc/rockchip/power_domain.txt vendor/device-tree/dist/Bindings/sound/axentia,tse850-pcm5142.txt vendor/device-tree/dist/Bindings/sound/es8328.txt vendor/device-tree/dist/Bindings/sound/mt2701-afe-pcm.txt vendor/device-tree/dist/Bindings/sound/rockchip-i2s.txt vendor/device-tree/dist/Bindings/sound/sun4i-codec.txt vendor/device-tree/dist/Bindings/sound/sun4i-i2s.txt vendor/device-tree/dist/Bindings/sound/sunxi,sun4i-spdif.txt vendor/device-tree/dist/Bindings/sound/zte,zx-i2s.txt vendor/device-tree/dist/Bindings/spi/spi-rockchip.txt vendor/device-tree/dist/Bindings/sram/sram.txt vendor/device-tree/dist/Bindings/thermal/qoriq-thermal.txt vendor/device-tree/dist/Bindings/ufs/ufs-qcom.txt vendor/device-tree/dist/Bindings/usb/allwinner,sun4i-a10-musb.txt vendor/device-tree/dist/Bindings/usb/dwc3-st.txt vendor/device-tree/dist/Bindings/usb/dwc3.txt vendor/device-tree/dist/Bindings/usb/ehci-omap.txt vendor/device-tree/dist/Bindings/usb/ehci-st.txt vendor/device-tree/dist/Bindings/usb/mt8173-mtu3.txt vendor/device-tree/dist/Bindings/usb/mt8173-xhci.txt vendor/device-tree/dist/Bindings/usb/qcom,dwc3.txt vendor/device-tree/dist/Bindings/usb/usb-xhci.txt vendor/device-tree/dist/Bindings/vendor-prefixes.txt vendor/device-tree/dist/Bindings/watchdog/samsung-wdt.txt vendor/device-tree/dist/include/dt-bindings/clock/bcm2835.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5433.h vendor/device-tree/dist/include/dt-bindings/clock/gxbb-clkc.h vendor/device-tree/dist/include/dt-bindings/clock/imx7d-clock.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq4019.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-mdm9615.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8994.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8996.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,rpmcc.h vendor/device-tree/dist/include/dt-bindings/clock/r7s72100-clock.h vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h vendor/device-tree/dist/include/dt-bindings/clock/rk3288-cru.h vendor/device-tree/dist/include/dt-bindings/mfd/stm32f4-rcc.h vendor/device-tree/dist/include/dt-bindings/pinctrl/omap.h vendor/device-tree/dist/include/dt-bindings/pinctrl/samsung.h vendor/device-tree/dist/include/dt-bindings/sound/cs42l42.h vendor/device-tree/dist/src/arc/axc003_idu.dtsi vendor/device-tree/dist/src/arc/haps_hs_idu.dts vendor/device-tree/dist/src/arc/nsim_hs_idu.dts vendor/device-tree/dist/src/arc/nsimosci_hs_idu.dts vendor/device-tree/dist/src/arc/skeleton.dtsi vendor/device-tree/dist/src/arc/skeleton_hs.dtsi vendor/device-tree/dist/src/arc/skeleton_hs_idu.dtsi vendor/device-tree/dist/src/arc/vdk_axc003_idu.dtsi vendor/device-tree/dist/src/arc/vdk_axs10x_mb.dtsi vendor/device-tree/dist/src/arm/alpine.dtsi vendor/device-tree/dist/src/arm/am335x-baltos.dtsi vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi vendor/device-tree/dist/src/arm/am335x-boneblack.dts vendor/device-tree/dist/src/arm/am335x-bonegreen.dts vendor/device-tree/dist/src/arm/am335x-chiliboard.dts vendor/device-tree/dist/src/arm/am335x-chilisom.dtsi vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-evmsk.dts vendor/device-tree/dist/src/arm/am335x-icev2.dts vendor/device-tree/dist/src/arm/am335x-nano.dts vendor/device-tree/dist/src/arm/am335x-phycore-som.dtsi vendor/device-tree/dist/src/arm/am335x-sl50.dts vendor/device-tree/dist/src/arm/am335x-wega.dtsi vendor/device-tree/dist/src/arm/am33xx.dtsi vendor/device-tree/dist/src/arm/am4372.dtsi vendor/device-tree/dist/src/arm/am437x-gp-evm.dts vendor/device-tree/dist/src/arm/am437x-idk-evm.dts vendor/device-tree/dist/src/arm/am437x-sk-evm.dts vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/am57xx-beagle-x15-common.dtsi vendor/device-tree/dist/src/arm/am57xx-beagle-x15-revb1.dts vendor/device-tree/dist/src/arm/am57xx-beagle-x15.dts vendor/device-tree/dist/src/arm/am57xx-idk-common.dtsi vendor/device-tree/dist/src/arm/armada-370-db.dts vendor/device-tree/dist/src/arm/armada-370-dlink-dns327l.dts vendor/device-tree/dist/src/arm/armada-370-mirabox.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn102.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn104.dts vendor/device-tree/dist/src/arm/armada-370-rd.dts vendor/device-tree/dist/src/arm/armada-370-synology-ds213j.dts vendor/device-tree/dist/src/arm/armada-370-xp.dtsi vendor/device-tree/dist/src/arm/armada-370.dtsi vendor/device-tree/dist/src/arm/armada-375-db.dts vendor/device-tree/dist/src/arm/armada-375.dtsi vendor/device-tree/dist/src/arm/armada-380.dtsi vendor/device-tree/dist/src/arm/armada-385-linksys.dtsi vendor/device-tree/dist/src/arm/armada-385-turris-omnia.dts vendor/device-tree/dist/src/arm/armada-385.dtsi vendor/device-tree/dist/src/arm/armada-388-clearfog.dts vendor/device-tree/dist/src/arm/armada-388-db.dts vendor/device-tree/dist/src/arm/armada-388-rd.dts vendor/device-tree/dist/src/arm/armada-38x-solidrun-microsom.dtsi vendor/device-tree/dist/src/arm/armada-38x.dtsi vendor/device-tree/dist/src/arm/armada-390-db.dts vendor/device-tree/dist/src/arm/armada-390.dtsi vendor/device-tree/dist/src/arm/armada-395.dtsi vendor/device-tree/dist/src/arm/armada-398-db.dts vendor/device-tree/dist/src/arm/armada-398.dtsi vendor/device-tree/dist/src/arm/armada-39x.dtsi vendor/device-tree/dist/src/arm/armada-xp-axpwifiap.dts vendor/device-tree/dist/src/arm/armada-xp-db.dts vendor/device-tree/dist/src/arm/armada-xp-gp.dts vendor/device-tree/dist/src/arm/armada-xp-lenovo-ix4-300d.dts vendor/device-tree/dist/src/arm/armada-xp-linksys-mamba.dts vendor/device-tree/dist/src/arm/armada-xp-matrix.dts vendor/device-tree/dist/src/arm/armada-xp-mv78230.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78260.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78460.dtsi vendor/device-tree/dist/src/arm/armada-xp-netgear-rn2120.dts vendor/device-tree/dist/src/arm/armada-xp-openblocks-ax3-4.dts vendor/device-tree/dist/src/arm/armada-xp-synology-ds414.dts vendor/device-tree/dist/src/arm/armada-xp.dtsi vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts vendor/device-tree/dist/src/arm/aspeed-g4.dtsi vendor/device-tree/dist/src/arm/aspeed-g5.dtsi vendor/device-tree/dist/src/arm/at91-sama5d2_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d4_xplained.dts vendor/device-tree/dist/src/arm/axm55xx.dtsi vendor/device-tree/dist/src/arm/bcm-nsp.dtsi vendor/device-tree/dist/src/arm/bcm2835-rpi.dtsi vendor/device-tree/dist/src/arm/bcm283x.dtsi vendor/device-tree/dist/src/arm/bcm4708-asus-rt-ac56u.dts vendor/device-tree/dist/src/arm/bcm4708-asus-rt-ac68u.dts vendor/device-tree/dist/src/arm/bcm4708-buffalo-wzr-1750dhp.dts vendor/device-tree/dist/src/arm/bcm4708-luxul-xap-1510.dts vendor/device-tree/dist/src/arm/bcm4708-luxul-xwc-1000.dts vendor/device-tree/dist/src/arm/bcm4708-netgear-r6250.dts vendor/device-tree/dist/src/arm/bcm4708-netgear-r6300-v2.dts vendor/device-tree/dist/src/arm/bcm4708-smartrg-sr400ac.dts vendor/device-tree/dist/src/arm/bcm4708.dtsi vendor/device-tree/dist/src/arm/bcm47081-asus-rt-n18u.dts vendor/device-tree/dist/src/arm/bcm47081-buffalo-wzr-600dhp2.dts vendor/device-tree/dist/src/arm/bcm47081-buffalo-wzr-900dhp.dts vendor/device-tree/dist/src/arm/bcm47081.dtsi vendor/device-tree/dist/src/arm/bcm4709-asus-rt-ac87u.dts vendor/device-tree/dist/src/arm/bcm4709-buffalo-wxr-1900dhp.dts vendor/device-tree/dist/src/arm/bcm4709-netgear-r7000.dts vendor/device-tree/dist/src/arm/bcm4709-netgear-r8000.dts vendor/device-tree/dist/src/arm/bcm4709-tplink-archer-c9-v1.dts vendor/device-tree/dist/src/arm/bcm4709.dtsi vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-xwr-3100.dts vendor/device-tree/dist/src/arm/bcm47094-netgear-r8500.dts vendor/device-tree/dist/src/arm/bcm47094.dtsi vendor/device-tree/dist/src/arm/bcm5301x.dtsi vendor/device-tree/dist/src/arm/bcm53573.dtsi vendor/device-tree/dist/src/arm/bcm94708.dts vendor/device-tree/dist/src/arm/bcm94709.dts vendor/device-tree/dist/src/arm/bcm953012er.dts vendor/device-tree/dist/src/arm/bcm953012k.dts vendor/device-tree/dist/src/arm/bcm958522er.dts vendor/device-tree/dist/src/arm/bcm958525er.dts vendor/device-tree/dist/src/arm/bcm958525xmc.dts vendor/device-tree/dist/src/arm/bcm958622hr.dts vendor/device-tree/dist/src/arm/bcm958623hr.dts vendor/device-tree/dist/src/arm/bcm958625hr.dts vendor/device-tree/dist/src/arm/bcm958625k.dts vendor/device-tree/dist/src/arm/bcm988312hr.dts vendor/device-tree/dist/src/arm/da850-evm.dts vendor/device-tree/dist/src/arm/da850-lcdk.dts vendor/device-tree/dist/src/arm/da850.dtsi vendor/device-tree/dist/src/arm/dm814x.dtsi vendor/device-tree/dist/src/arm/dm816x.dtsi vendor/device-tree/dist/src/arm/dove-cm-a510.dtsi vendor/device-tree/dist/src/arm/dove-sbc-a510.dts vendor/device-tree/dist/src/arm/dra7-evm.dts vendor/device-tree/dist/src/arm/dra7.dtsi vendor/device-tree/dist/src/arm/dra71-evm.dts vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi vendor/device-tree/dist/src/arm/dra72-evm-revc.dts vendor/device-tree/dist/src/arm/ecx-2000.dts vendor/device-tree/dist/src/arm/exynos-mfc-reserved-memory.dtsi vendor/device-tree/dist/src/arm/exynos3250.dtsi vendor/device-tree/dist/src/arm/exynos4.dtsi vendor/device-tree/dist/src/arm/exynos4210.dtsi vendor/device-tree/dist/src/arm/exynos4412-itop-elite.dts vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidu3.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx2.dts vendor/device-tree/dist/src/arm/exynos4412.dtsi vendor/device-tree/dist/src/arm/exynos5.dtsi vendor/device-tree/dist/src/arm/exynos5250.dtsi vendor/device-tree/dist/src/arm/exynos5260.dtsi vendor/device-tree/dist/src/arm/exynos5410.dtsi vendor/device-tree/dist/src/arm/exynos5420.dtsi vendor/device-tree/dist/src/arm/exynos5440.dtsi vendor/device-tree/dist/src/arm/imx1-ads.dts vendor/device-tree/dist/src/arm/imx1.dtsi vendor/device-tree/dist/src/arm/imx23.dtsi vendor/device-tree/dist/src/arm/imx25.dtsi vendor/device-tree/dist/src/arm/imx27-apf27dev.dts vendor/device-tree/dist/src/arm/imx27-eukrea-mbimxsd27-baseboard.dts vendor/device-tree/dist/src/arm/imx27-pdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-som.dtsi vendor/device-tree/dist/src/arm/imx27-phytec-phycore-rdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-som.dtsi vendor/device-tree/dist/src/arm/imx27.dtsi vendor/device-tree/dist/src/arm/imx28.dtsi vendor/device-tree/dist/src/arm/imx31.dtsi vendor/device-tree/dist/src/arm/imx35.dtsi vendor/device-tree/dist/src/arm/imx50-evk.dts vendor/device-tree/dist/src/arm/imx51-apf51dev.dts vendor/device-tree/dist/src/arm/imx51-babbage.dts vendor/device-tree/dist/src/arm/imx51-digi-connectcore-som.dtsi vendor/device-tree/dist/src/arm/imx51-eukrea-mbimxsd51-baseboard.dts vendor/device-tree/dist/src/arm/imx53-qsb-common.dtsi vendor/device-tree/dist/src/arm/imx53-qsb.dts vendor/device-tree/dist/src/arm/imx53-qsrb.dts vendor/device-tree/dist/src/arm/imx53-smd.dts vendor/device-tree/dist/src/arm/imx53-tqma53.dtsi vendor/device-tree/dist/src/arm/imx53-tx53.dtsi vendor/device-tree/dist/src/arm/imx53-voipac-dmm-668.dtsi vendor/device-tree/dist/src/arm/imx6dl-aristainetos2_4.dts vendor/device-tree/dist/src/arm/imx6dl-aristainetos2_7.dts vendor/device-tree/dist/src/arm/imx6dl-aristainetos_4.dts vendor/device-tree/dist/src/arm/imx6dl-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/imx6dl-cubox-i.dts vendor/device-tree/dist/src/arm/imx6dl-hummingboard.dts vendor/device-tree/dist/src/arm/imx6dl-icore.dts vendor/device-tree/dist/src/arm/imx6dl-nit6xlite.dts vendor/device-tree/dist/src/arm/imx6dl-nitrogen6x.dts vendor/device-tree/dist/src/arm/imx6dl-sabrelite.dts vendor/device-tree/dist/src/arm/imx6dl-ts4900.dts vendor/device-tree/dist/src/arm/imx6q-apalis-ixora.dts vendor/device-tree/dist/src/arm/imx6q-b450v3.dts vendor/device-tree/dist/src/arm/imx6q-b650v3.dts vendor/device-tree/dist/src/arm/imx6q-b850v3.dts vendor/device-tree/dist/src/arm/imx6q-ba16.dtsi vendor/device-tree/dist/src/arm/imx6q-bx50v3.dtsi vendor/device-tree/dist/src/arm/imx6q-cm-fx6.dts vendor/device-tree/dist/src/arm/imx6q-cubox-i.dts vendor/device-tree/dist/src/arm/imx6q-dmo-edmqmx6.dts vendor/device-tree/dist/src/arm/imx6q-evi.dts vendor/device-tree/dist/src/arm/imx6q-gw5400-a.dts vendor/device-tree/dist/src/arm/imx6q-h100.dts vendor/device-tree/dist/src/arm/imx6q-hummingboard.dts vendor/device-tree/dist/src/arm/imx6q-icore-rqs.dts vendor/device-tree/dist/src/arm/imx6q-icore.dts vendor/device-tree/dist/src/arm/imx6q-marsboard.dts vendor/device-tree/dist/src/arm/imx6q-nitrogen6_max.dts vendor/device-tree/dist/src/arm/imx6q-nitrogen6_som2.dts vendor/device-tree/dist/src/arm/imx6q-nitrogen6x.dts vendor/device-tree/dist/src/arm/imx6q-novena.dts vendor/device-tree/dist/src/arm/imx6q-sabrelite.dts vendor/device-tree/dist/src/arm/imx6q-ts4900.dts vendor/device-tree/dist/src/arm/imx6q-utilite-pro.dts vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi vendor/device-tree/dist/src/arm/imx6qdl-apf6dev.dtsi vendor/device-tree/dist/src/arm/imx6qdl-aristainetos.dtsi vendor/device-tree/dist/src/arm/imx6qdl-aristainetos2.dtsi vendor/device-tree/dist/src/arm/imx6qdl-colibri.dtsi vendor/device-tree/dist/src/arm/imx6qdl-cubox-i.dtsi vendor/device-tree/dist/src/arm/imx6qdl-dfi-fs700-m60.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw51xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw52xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw53xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw54xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw551x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw552x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw553x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-hummingboard.dtsi vendor/device-tree/dist/src/arm/imx6qdl-icore-rqs.dtsi vendor/device-tree/dist/src/arm/imx6qdl-icore.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom-ar8035.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nit6xlite.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6_max.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6_som2.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-phytec-pfla02.dtsi vendor/device-tree/dist/src/arm/imx6qdl-rex.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabreauto.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabrelite.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabresd.dtsi vendor/device-tree/dist/src/arm/imx6qdl-ts4900.dtsi vendor/device-tree/dist/src/arm/imx6qdl-tx6.dtsi vendor/device-tree/dist/src/arm/imx6qdl.dtsi vendor/device-tree/dist/src/arm/imx6qp.dtsi vendor/device-tree/dist/src/arm/imx6sl-evk.dts vendor/device-tree/dist/src/arm/imx6sx-nitrogen6sx.dts vendor/device-tree/dist/src/arm/imx6sx-sdb-sai.dts vendor/device-tree/dist/src/arm/imx6sx-udoo-neo.dtsi vendor/device-tree/dist/src/arm/imx6ul-geam-kit.dts vendor/device-tree/dist/src/arm/imx6ul-geam.dtsi vendor/device-tree/dist/src/arm/imx6ul-liteboard.dts vendor/device-tree/dist/src/arm/imx6ul-litesom.dtsi vendor/device-tree/dist/src/arm/imx6ul-pico-hobbit.dts vendor/device-tree/dist/src/arm/imx6ul-tx6ul.dtsi vendor/device-tree/dist/src/arm/imx6ul.dtsi vendor/device-tree/dist/src/arm/imx6ull-14x14-evk.dts vendor/device-tree/dist/src/arm/imx6ull.dtsi vendor/device-tree/dist/src/arm/imx7-colibri.dtsi vendor/device-tree/dist/src/arm/imx7d-cl-som-imx7.dts vendor/device-tree/dist/src/arm/imx7d-nitrogen7.dts vendor/device-tree/dist/src/arm/imx7d-pinfunc.h vendor/device-tree/dist/src/arm/imx7d-sdb.dts vendor/device-tree/dist/src/arm/imx7s-warp.dts vendor/device-tree/dist/src/arm/imx7s.dtsi vendor/device-tree/dist/src/arm/keystone-k2e-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2e.dtsi vendor/device-tree/dist/src/arm/keystone-k2g.dtsi vendor/device-tree/dist/src/arm/keystone-k2hk-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2hk.dtsi vendor/device-tree/dist/src/arm/keystone-k2l-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2l.dtsi vendor/device-tree/dist/src/arm/keystone.dtsi vendor/device-tree/dist/src/arm/kirkwood-dir665.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation-6282.dtsi vendor/device-tree/dist/src/arm/kirkwood-linkstation-duo-6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsqvl.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsvl.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswsxl.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswvl.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswxl.dts vendor/device-tree/dist/src/arm/kirkwood-linkstation.dtsi vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts vendor/device-tree/dist/src/arm/kirkwood-mv88f6281gtw-ge.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-z0.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281.dtsi vendor/device-tree/dist/src/arm/logicpd-torpedo-som.dtsi vendor/device-tree/dist/src/arm/ls1021a.dtsi vendor/device-tree/dist/src/arm/mt2701-evb.dts vendor/device-tree/dist/src/arm/mt2701.dtsi vendor/device-tree/dist/src/arm/mt6580.dtsi vendor/device-tree/dist/src/arm/mt6589.dtsi vendor/device-tree/dist/src/arm/mt7623-evb.dts vendor/device-tree/dist/src/arm/mt7623.dtsi vendor/device-tree/dist/src/arm/mt8127.dtsi vendor/device-tree/dist/src/arm/mt8135.dtsi vendor/device-tree/dist/src/arm/mvebu-linkstation-fan.dtsi vendor/device-tree/dist/src/arm/mvebu-linkstation-gpio-simple.dtsi vendor/device-tree/dist/src/arm/omap3-beagle-xm.dts vendor/device-tree/dist/src/arm/omap3-igep.dtsi vendor/device-tree/dist/src/arm/omap3-n900.dts vendor/device-tree/dist/src/arm/omap4-panda-common.dtsi vendor/device-tree/dist/src/arm/omap5-igep0050.dts vendor/device-tree/dist/src/arm/omap5-uevm.dts vendor/device-tree/dist/src/arm/omap5.dtsi vendor/device-tree/dist/src/arm/orion5x-kuroboxpro.dts vendor/device-tree/dist/src/arm/orion5x-linkstation-lschl.dts vendor/device-tree/dist/src/arm/orion5x-linkstation-lsgl.dts vendor/device-tree/dist/src/arm/orion5x-linkstation-lswtgl.dts vendor/device-tree/dist/src/arm/orion5x-linkstation.dtsi vendor/device-tree/dist/src/arm/orion5x-lswsgl.dts vendor/device-tree/dist/src/arm/ox810se.dtsi vendor/device-tree/dist/src/arm/ox820.dtsi vendor/device-tree/dist/src/arm/qcom-apq8060-dragonboard.dts vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-sd-600eval.dts vendor/device-tree/dist/src/arm/qcom-apq8064-ifc6410.dts vendor/device-tree/dist/src/arm/qcom-apq8064-pins.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064-sony-xperia-yuga.dts vendor/device-tree/dist/src/arm/qcom-apq8064.dtsi vendor/device-tree/dist/src/arm/qcom-ipq8064.dtsi vendor/device-tree/dist/src/arm/qcom-msm8660-surf.dts vendor/device-tree/dist/src/arm/qcom-msm8660.dtsi vendor/device-tree/dist/src/arm/qcom-msm8974-sony-xperia-honami.dts vendor/device-tree/dist/src/arm/qcom-msm8974.dtsi vendor/device-tree/dist/src/arm/r7s72100-rskrza1.dts vendor/device-tree/dist/src/arm/r7s72100.dtsi vendor/device-tree/dist/src/arm/r8a73a4.dtsi vendor/device-tree/dist/src/arm/r8a7743.dtsi vendor/device-tree/dist/src/arm/r8a7745.dtsi vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779-marzen.dts vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790.dtsi vendor/device-tree/dist/src/arm/r8a7791.dtsi vendor/device-tree/dist/src/arm/r8a7792.dtsi vendor/device-tree/dist/src/arm/r8a7793-gose.dts vendor/device-tree/dist/src/arm/r8a7793.dtsi vendor/device-tree/dist/src/arm/r8a7794.dtsi vendor/device-tree/dist/src/arm/rk1108.dtsi vendor/device-tree/dist/src/arm/rk3036-evb.dts vendor/device-tree/dist/src/arm/rk3036-kylin.dts vendor/device-tree/dist/src/arm/rk3036.dtsi vendor/device-tree/dist/src/arm/rk3066a-bqcurie2.dts vendor/device-tree/dist/src/arm/rk3066a-marsboard.dts vendor/device-tree/dist/src/arm/rk3066a-mk808.dts vendor/device-tree/dist/src/arm/rk3066a-rayeager.dts vendor/device-tree/dist/src/arm/rk3066a.dtsi vendor/device-tree/dist/src/arm/rk3188-px3-evb.dts vendor/device-tree/dist/src/arm/rk3188-radxarock.dts vendor/device-tree/dist/src/arm/rk3188.dtsi vendor/device-tree/dist/src/arm/rk3229-evb.dts vendor/device-tree/dist/src/arm/rk322x.dtsi vendor/device-tree/dist/src/arm/rk3288-evb-act8846.dts vendor/device-tree/dist/src/arm/rk3288-evb-rk808.dts vendor/device-tree/dist/src/arm/rk3288-evb.dtsi vendor/device-tree/dist/src/arm/rk3288-fennec.dts vendor/device-tree/dist/src/arm/rk3288-firefly-beta.dts vendor/device-tree/dist/src/arm/rk3288-firefly-reload-core.dtsi vendor/device-tree/dist/src/arm/rk3288-firefly-reload.dts vendor/device-tree/dist/src/arm/rk3288-firefly.dts vendor/device-tree/dist/src/arm/rk3288-firefly.dtsi vendor/device-tree/dist/src/arm/rk3288-miqi.dts vendor/device-tree/dist/src/arm/rk3288-popmetal.dts vendor/device-tree/dist/src/arm/rk3288-r89.dts vendor/device-tree/dist/src/arm/rk3288-rock2-som.dtsi vendor/device-tree/dist/src/arm/rk3288-rock2-square.dts vendor/device-tree/dist/src/arm/rk3288-veyron-analog-audio.dtsi vendor/device-tree/dist/src/arm/rk3288-veyron-brain.dts vendor/device-tree/dist/src/arm/rk3288-veyron-chromebook.dtsi vendor/device-tree/dist/src/arm/rk3288-veyron-jaq.dts vendor/device-tree/dist/src/arm/rk3288-veyron-jerry.dts vendor/device-tree/dist/src/arm/rk3288-veyron-mickey.dts vendor/device-tree/dist/src/arm/rk3288-veyron-minnie.dts vendor/device-tree/dist/src/arm/rk3288-veyron-pinky.dts vendor/device-tree/dist/src/arm/rk3288-veyron-sdmmc.dtsi vendor/device-tree/dist/src/arm/rk3288-veyron-speedy.dts vendor/device-tree/dist/src/arm/rk3288-veyron.dtsi vendor/device-tree/dist/src/arm/rk3288.dtsi vendor/device-tree/dist/src/arm/sama5d2.dtsi vendor/device-tree/dist/src/arm/sama5d3_uart.dtsi vendor/device-tree/dist/src/arm/sama5d4.dtsi vendor/device-tree/dist/src/arm/sh73a0.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10_socdk.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5_socdk.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5_socdk.dts vendor/device-tree/dist/src/arm/ste-dbx5x0.dtsi vendor/device-tree/dist/src/arm/ste-href.dtsi vendor/device-tree/dist/src/arm/ste-hrefprev60.dtsi vendor/device-tree/dist/src/arm/ste-hrefv60plus.dtsi vendor/device-tree/dist/src/arm/ste-snowball.dts vendor/device-tree/dist/src/arm/stih407-family.dtsi vendor/device-tree/dist/src/arm/stih407-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih410-b2120.dts vendor/device-tree/dist/src/arm/stih410-b2260.dts vendor/device-tree/dist/src/arm/stih410.dtsi vendor/device-tree/dist/src/arm/stm32429i-eval.dts vendor/device-tree/dist/src/arm/stm32f429-disco.dts vendor/device-tree/dist/src/arm/stm32f429.dtsi vendor/device-tree/dist/src/arm/stm32f469-disco.dts vendor/device-tree/dist/src/arm/sun4i-a10-a1000.dts vendor/device-tree/dist/src/arm/sun4i-a10-ba10-tvbox.dts vendor/device-tree/dist/src/arm/sun4i-a10-chuwi-v7-cw0825.dts vendor/device-tree/dist/src/arm/sun4i-a10-cubieboard.dts vendor/device-tree/dist/src/arm/sun4i-a10-dserve-dsrv9703c.dts vendor/device-tree/dist/src/arm/sun4i-a10-gemei-g9.dts vendor/device-tree/dist/src/arm/sun4i-a10-hackberry.dts vendor/device-tree/dist/src/arm/sun4i-a10-hyundai-a7hd.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet1.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet97fv2.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet9f-rev03.dts vendor/device-tree/dist/src/arm/sun4i-a10-jesurun-q5.dts vendor/device-tree/dist/src/arm/sun4i-a10-marsboard.dts vendor/device-tree/dist/src/arm/sun4i-a10-mini-xplus.dts vendor/device-tree/dist/src/arm/sun4i-a10-mk802.dts vendor/device-tree/dist/src/arm/sun4i-a10-olinuxino-lime.dts vendor/device-tree/dist/src/arm/sun4i-a10-pcduino.dts vendor/device-tree/dist/src/arm/sun4i-a10-pcduino2.dts vendor/device-tree/dist/src/arm/sun4i-a10-pov-protab2-ips9.dts vendor/device-tree/dist/src/arm/sun4i-a10.dtsi vendor/device-tree/dist/src/arm/sun5i-a10s-auxtek-t003.dts vendor/device-tree/dist/src/arm/sun5i-a10s-auxtek-t004.dts vendor/device-tree/dist/src/arm/sun5i-a10s-mk802.dts vendor/device-tree/dist/src/arm/sun5i-a10s-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a10s-r7-tv-dongle.dts vendor/device-tree/dist/src/arm/sun5i-a10s-wobo-i5.dts vendor/device-tree/dist/src/arm/sun5i-a10s.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-empire-electronix-d709.dts vendor/device-tree/dist/src/arm/sun5i-a13-hsg-h702.dts vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino.dts vendor/device-tree/dist/src/arm/sun5i-a13-utoo-p66.dts vendor/device-tree/dist/src/arm/sun5i-a13.dtsi vendor/device-tree/dist/src/arm/sun5i-gr8-chip-pro.dts vendor/device-tree/dist/src/arm/sun5i-gr8-evb.dts vendor/device-tree/dist/src/arm/sun5i-gr8.dtsi vendor/device-tree/dist/src/arm/sun5i-r8-chip.dts vendor/device-tree/dist/src/arm/sun5i-r8.dtsi vendor/device-tree/dist/src/arm/sun5i-reference-design-tablet.dtsi vendor/device-tree/dist/src/arm/sun5i.dtsi vendor/device-tree/dist/src/arm/sun6i-a31-app4-evb1.dts vendor/device-tree/dist/src/arm/sun6i-a31-colombus.dts vendor/device-tree/dist/src/arm/sun6i-a31-hummingbird.dts vendor/device-tree/dist/src/arm/sun6i-a31-i7.dts vendor/device-tree/dist/src/arm/sun6i-a31-m9.dts vendor/device-tree/dist/src/arm/sun6i-a31-mele-a1000g-quad.dts vendor/device-tree/dist/src/arm/sun6i-a31.dtsi vendor/device-tree/dist/src/arm/sun6i-a31s-primo81.dts vendor/device-tree/dist/src/arm/sun6i-a31s-sina31s.dts vendor/device-tree/dist/src/arm/sun6i-a31s-sinovoip-bpi-m2.dts vendor/device-tree/dist/src/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts vendor/device-tree/dist/src/arm/sun6i-reference-design-tablet.dtsi vendor/device-tree/dist/src/arm/sun7i-a20-bananapi-m1-plus.dts vendor/device-tree/dist/src/arm/sun7i-a20-bananapi.dts vendor/device-tree/dist/src/arm/sun7i-a20-bananapro.dts vendor/device-tree/dist/src/arm/sun7i-a20-cubieboard2.dts vendor/device-tree/dist/src/arm/sun7i-a20-cubietruck.dts vendor/device-tree/dist/src/arm/sun7i-a20-hummingbird.dts vendor/device-tree/dist/src/arm/sun7i-a20-i12-tvbox.dts vendor/device-tree/dist/src/arm/sun7i-a20-itead-ibox.dts vendor/device-tree/dist/src/arm/sun7i-a20-lamobo-r1.dts vendor/device-tree/dist/src/arm/sun7i-a20-m3.dts vendor/device-tree/dist/src/arm/sun7i-a20-mk808c.dts vendor/device-tree/dist/src/arm/sun7i-a20-olimex-som-evb.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime2-emmc.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime2.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun7i-a20-orangepi-mini.dts vendor/device-tree/dist/src/arm/sun7i-a20-orangepi.dts vendor/device-tree/dist/src/arm/sun7i-a20-pcduino3-nano.dts vendor/device-tree/dist/src/arm/sun7i-a20-pcduino3.dts vendor/device-tree/dist/src/arm/sun7i-a20-wexler-tab7200.dts vendor/device-tree/dist/src/arm/sun7i-a20-wits-pro-a20-dkt.dts vendor/device-tree/dist/src/arm/sun7i-a20.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-a33.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-evb.dts vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v1.2.dts vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v5.dts vendor/device-tree/dist/src/arm/sun8i-a23-polaroid-mid2407pxe03.dts vendor/device-tree/dist/src/arm/sun8i-a23-polaroid-mid2809pxe04.dts vendor/device-tree/dist/src/arm/sun8i-a23-q8-tablet.dts vendor/device-tree/dist/src/arm/sun8i-a23.dtsi vendor/device-tree/dist/src/arm/sun8i-a33-inet-d978-rev2.dts vendor/device-tree/dist/src/arm/sun8i-a33-olinuxino.dts vendor/device-tree/dist/src/arm/sun8i-a33-sinlinx-sina33.dts vendor/device-tree/dist/src/arm/sun8i-a33.dtsi vendor/device-tree/dist/src/arm/sun8i-a83t.dtsi vendor/device-tree/dist/src/arm/sun8i-h3-bananapi-m2-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3-nanopi.dtsi vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-2.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-lite.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-one.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-pc-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-pc.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3.dtsi vendor/device-tree/dist/src/arm/sun8i-q8-common.dtsi vendor/device-tree/dist/src/arm/sun8i-r16-parrot.dts vendor/device-tree/dist/src/arm/sun8i-reference-design-tablet.dtsi vendor/device-tree/dist/src/arm/sun9i-a80-cubieboard4.dts vendor/device-tree/dist/src/arm/sun9i-a80-optimus.dts vendor/device-tree/dist/src/arm/sun9i-a80.dtsi vendor/device-tree/dist/src/arm/sunxi-common-regulators.dtsi vendor/device-tree/dist/src/arm/tango4-common.dtsi vendor/device-tree/dist/src/arm/tango4-vantage-1172.dts vendor/device-tree/dist/src/arm/tegra124-apalis-eval.dts vendor/device-tree/dist/src/arm/tegra124-apalis.dtsi vendor/device-tree/dist/src/arm/tegra124-nyan-big.dts vendor/device-tree/dist/src/arm/tegra124-nyan-blaze.dts vendor/device-tree/dist/src/arm/tegra124-nyan.dtsi vendor/device-tree/dist/src/arm/tegra20-paz00.dts vendor/device-tree/dist/src/arm/tegra20-trimslice.dts vendor/device-tree/dist/src/arm/uniphier-pinctrl.dtsi vendor/device-tree/dist/src/arm/vf-colibri-eval-v3.dtsi vendor/device-tree/dist/src/arm/vf-colibri.dtsi vendor/device-tree/dist/src/arm/vf500-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/vf500-colibri.dtsi vendor/device-tree/dist/src/arm/vf500.dtsi vendor/device-tree/dist/src/arm/vf610-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/vf610-colibri.dtsi vendor/device-tree/dist/src/arm/vf610-twr.dts vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-b.dts vendor/device-tree/dist/src/arm/vf610.dtsi vendor/device-tree/dist/src/arm/vf610m4-colibri.dts vendor/device-tree/dist/src/arm/vf610m4-cosmic.dts vendor/device-tree/dist/src/arm/vf610m4.dtsi vendor/device-tree/dist/src/arm/vfxxx.dtsi vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-pine64.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gx.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-p200.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxl.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxm.dtsi vendor/device-tree/dist/src/arm64/arm/juno-base.dtsi vendor/device-tree/dist/src/arm64/arm/juno-clocks.dtsi vendor/device-tree/dist/src/arm64/arm/juno-motherboard.dtsi vendor/device-tree/dist/src/arm64/arm/juno-r1.dts vendor/device-tree/dist/src/arm64/arm/juno-r2.dts vendor/device-tree/dist/src/arm64/arm/juno.dts vendor/device-tree/dist/src/arm64/broadcom/bcm2835-rpi.dtsi vendor/device-tree/dist/src/arm64/broadcom/bcm283x.dtsi vendor/device-tree/dist/src/arm64/broadcom/ns2-svk.dts vendor/device-tree/dist/src/arm64/broadcom/ns2.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-pinctrl.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2.dts vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2e.dts vendor/device-tree/dist/src/arm64/exynos/exynos5433.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7-espresso.dts vendor/device-tree/dist/src/arm64/exynos/exynos7-pinctrl.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1046a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls2080a-rdb.dts vendor/device-tree/dist/src/arm64/marvell/armada-371x.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-3720-db.dts vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin.dts vendor/device-tree/dist/src/arm64/marvell/armada-372x.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-37xx.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-cp110-master.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-cp110-slave.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt8173.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra186.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc-pmic-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc-soc-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8096-db820c-pmic-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8096-db820c.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8996.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7795-h3ulcb.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7796-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7796.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-evb.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-geekbox.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-orion-r68-meta.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-px5-evb.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-r88.dts vendor/device-tree/dist/src/arm64/rockchip/rk3399-evb.dts vendor/device-tree/dist/src/arm64/rockchip/rk3399.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld11.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld20.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-pinctrl.dtsi vendor/device-tree/dist/src/arm64/zte/zx296718.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7125.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7346.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7358.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7360.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7362.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7420.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7425.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7435.dtsi vendor/device-tree/dist/src/mips/brcm/bcm97125cbmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97346dbsmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97358svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97360svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97362svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97420c.dts vendor/device-tree/dist/src/mips/brcm/bcm97425svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97435svmb.dts vendor/device-tree/dist/src/mips/xilfpga/nexys4ddr.dts vendor/device-tree/dist/src/powerpc/fsl/kmcoge4.dts vendor/device-tree/dist/src/powerpc/fsl/mpc8569mds.dts vendor/device-tree/dist/src/powerpc/fsl/t1023si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/t1040si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/t2081si-post.dtsi Modified: vendor/device-tree/dist/Bindings/arm/amlogic.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/amlogic.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/amlogic.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -40,6 +40,8 @@ Board compatible values: - "hardkernel,odroid-c2" (Meson gxbb) - "amlogic,p200" (Meson gxbb) - "amlogic,p201" (Meson gxbb) + - "wetek,hub" (Meson gxbb) + - "wetek,play2" (Meson gxbb) - "amlogic,p212" (Meson gxl s905x) - "amlogic,p230" (Meson gxl s905d) - "amlogic,p231" (Meson gxl s905d) Modified: vendor/device-tree/dist/Bindings/arm/arch_timer.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/arch_timer.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/arch_timer.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -31,6 +31,12 @@ to deliver its interrupts via SPIs. This also affects writes to the tval register, due to the implicit counter read. +- hisilicon,erratum-161010101 : A boolean property. Indicates the + presence of Hisilicon erratum 161010101, which says that reading the + counters is unreliable in some cases, and reads may return a value 32 + beyond the correct value. This also affects writes to the tval + registers, due to the implicit counter read. + ** Optional properties: - arm,cpu-registers-not-fw-configured : Firmware does not initialize Added: vendor/device-tree/dist/Bindings/arm/axentia.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/axentia.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,19 @@ +Device tree bindings for Axentia ARM devices +============================================ + +Linea CPU module +---------------- + +Required root node properties: +compatible = "axentia,linea", + "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; +and following the rules from atmel-at91.txt for a sama5d31 SoC. + + +TSE-850 v3 board +---------------- + +Required root node properties: +compatible = "axentia,tse850v3", "axentia,linea", + "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; +and following the rules from above for the axentia,linea CPU module. Modified: vendor/device-tree/dist/Bindings/arm/cpus.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cpus.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/cpus.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -158,6 +158,7 @@ nodes to be present and contain the properties describ "arm,cortex-a53" "arm,cortex-a57" "arm,cortex-a72" + "arm,cortex-a73" "arm,cortex-m0" "arm,cortex-m0+" "arm,cortex-m1" @@ -202,6 +203,7 @@ nodes to be present and contain the properties describ "marvell,armada-380-smp" "marvell,armada-390-smp" "marvell,armada-xp-smp" + "marvell,98dx3236-smp" "mediatek,mt6589-smp" "mediatek,mt81xx-tz-smp" "qcom,gcc-msm8660" Modified: vendor/device-tree/dist/Bindings/arm/davinci.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/davinci.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/davinci.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -13,6 +13,10 @@ EnBW AM1808 based CMC board Required root node properties: - compatible = "enbw,cmc", "ti,da850; +LEGO MINDSTORMS EV3 (AM1808 based) +Required root node properties: + - compatible = "lego,ev3", "ti,da850"; + Generic DaVinci Boards ---------------------- Modified: vendor/device-tree/dist/Bindings/arm/fsl.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/fsl.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/fsl.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -108,7 +108,7 @@ status. - compatible: Should contain a chip-specific compatible string, Chip-specific strings are of the form "fsl,-scfg", The following s are known to be supported: - ls1021a, ls1043a, ls1046a, ls2080a. + ls1012a, ls1021a, ls1043a, ls1046a, ls2080a. - reg: should contain base address and length of SCFG memory-mapped registers @@ -126,7 +126,7 @@ core start address and release the secondary core from - compatible: Should contain a chip-specific compatible string, Chip-specific strings are of the form "fsl,-dcfg", The following s are known to be supported: - ls1021a, ls1043a, ls1046a, ls2080a. + ls1012a, ls1021a, ls1043a, ls1046a, ls2080a. - reg : should contain base address and length of DCFG memory-mapped registers @@ -138,6 +138,22 @@ Example: Freescale ARMv8 based Layerscape SoC family Device Tree Bindings ---------------------------------------------------------------- + +LS1012A SoC +Required root node properties: + - compatible = "fsl,ls1012a"; + +LS1012A ARMv8 based RDB Board +Required root node properties: + - compatible = "fsl,ls1012a-rdb", "fsl,ls1012a"; + +LS1012A ARMv8 based FRDM Board +Required root node properties: + - compatible = "fsl,ls1012a-frdm", "fsl,ls1012a"; + +LS1012A ARMv8 based QDS Board +Required root node properties: + - compatible = "fsl,ls1012a-qds", "fsl,ls1012a"; LS1043A SoC Required root node properties: Modified: vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -1,5 +1,9 @@ Hisilicon Platforms Device Tree Bindings ---------------------------------------------------- +Hi3660 SoC +Required root node properties: + - compatible = "hisilicon,hi3660"; + Hi4511 Board Required root node properties: - compatible = "hisilicon,hi3620-hi4511"; Added: vendor/device-tree/dist/Bindings/arm/marvell/98dx3236-resume-ctrl.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/98dx3236-resume-ctrl.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,16 @@ +Resume Control +-------------- +Available on Marvell SOCs: 98DX3336 and 98DX4251 + +Required properties: + +- compatible: must be "marvell,98dx3336-resume-ctrl" + +- reg: Should contain resume control registers location and length + +Example: + +resume@20980 { + compatible = "marvell,98dx3336-resume-ctrl"; + reg = <0x20980 0x10>; +}; Added: vendor/device-tree/dist/Bindings/arm/marvell/98dx3236.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/98dx3236.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,23 @@ +Marvell 98DX3236, 98DX3336 and 98DX4251 Platforms Device Tree Bindings +---------------------------------------------------------------------- + +Boards with a SoC of the Marvell 98DX3236, 98DX3336 and 98DX4251 families +shall have the following property: + +Required root node property: + +compatible: must contain "marvell,armadaxp-98dx3236" + +In addition, boards using the Marvell 98DX3336 SoC shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armadaxp-98dx3336" + +In addition, boards using the Marvell 98DX4251 SoC shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armadaxp-98dx4251" Modified: vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -45,7 +45,7 @@ The following clocks are available: - 1 15 SATA - 1 16 SATA USB - 1 17 Main - - 1 18 SD/MMC + - 1 18 SD/MMC/GOP - 1 21 Slow IO (SPI, NOR, BootROM, I2C, UART) - 1 22 USB3H0 - 1 23 USB3H1 @@ -65,7 +65,7 @@ Required properties: "cpm-audio", "cpm-communit", "cpm-nand", "cpm-ppv2", "cpm-sdio", "cpm-mg-domain", "cpm-mg-core", "cpm-xor1", "cpm-xor0", "cpm-gop-dp", "none", "cpm-pcie_x10", "cpm-pcie_x11", "cpm-pcie_x4", "cpm-pcie-xor", "cpm-sata", - "cpm-sata-usb", "cpm-main", "cpm-sd-mmc", "none", "none", "cpm-slow-io", + "cpm-sata-usb", "cpm-main", "cpm-sd-mmc-gop", "none", "none", "cpm-slow-io", "cpm-usb3h0", "cpm-usb3h1", "cpm-usb3dev", "cpm-eip150", "cpm-eip197"; Example: @@ -78,6 +78,6 @@ Example: gate-clock-output-names = "cpm-audio", "cpm-communit", "cpm-nand", "cpm-ppv2", "cpm-sdio", "cpm-mg-domain", "cpm-mg-core", "cpm-xor1", "cpm-xor0", "cpm-gop-dp", "none", "cpm-pcie_x10", "cpm-pcie_x11", "cpm-pcie_x4", "cpm-pcie-xor", "cpm-sata", - "cpm-sata-usb", "cpm-main", "cpm-sd-mmc", "none", "none", "cpm-slow-io", + "cpm-sata-usb", "cpm-main", "cpm-sd-mmc-gop", "none", "none", "cpm-slow-io", "cpm-usb3h0", "cpm-usb3h1", "cpm-usb3dev", "cpm-eip150", "cpm-eip197"; }; Modified: vendor/device-tree/dist/Bindings/arm/omap/omap.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/omap/omap.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/omap/omap.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -151,6 +151,9 @@ Boards: - AM335X SBC-T335 : single board computer, built around the Sitara AM3352/4 compatible = "compulab,sbc-t335", "compulab,cm-t335", "ti,am33xx" +- AM335X phyCORE-AM335x: Development kit + compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx" + - OMAP5 EVM : Evaluation Module compatible = "ti,omap5-evm", "ti,omap5" Modified: vendor/device-tree/dist/Bindings/arm/shmobile.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/shmobile.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/shmobile.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -75,7 +75,7 @@ Boards: compatible = "renesas,rskrza1", "renesas,r7s72100" - Salvator-X (RTP0RC7795SIPB0010S) compatible = "renesas,salvator-x", "renesas,r8a7795"; - - Salvator-X + - Salvator-X (RTP0RC7796SIPB0011S) compatible = "renesas,salvator-x", "renesas,r8a7796"; - SILK (RTP0RC7794LCB00011S) compatible = "renesas,silk", "renesas,r8a7794" Modified: vendor/device-tree/dist/Bindings/arm/sunxi.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/sunxi.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/arm/sunxi.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -12,6 +12,7 @@ using one of the following compatible strings: allwinner,sun8i-a23 allwinner,sun8i-a33 allwinner,sun8i-a83t + allwinner,sun8i-h2-plus allwinner,sun8i-h3 allwinner,sun9i-a80 allwinner,sun50i-a64 Added: vendor/device-tree/dist/Bindings/ata/ahci-da850.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/ata/ahci-da850.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,18 @@ +Device tree binding for the TI DA850 AHCI SATA Controller +--------------------------------------------------------- + +Required properties: + - compatible: must be "ti,da850-ahci" + - reg: physical base addresses and sizes of the two register regions + used by the controller: the register map as defined by the + AHCI 1.1 standard and the Power Down Control Register (PWRDN) + for enabling/disabling the SATA clock receiver + - interrupts: interrupt specifier (refer to the interrupt binding) + +Example: + + sata: sata@218000 { + compatible = "ti,da850-ahci"; + reg = <0x218000 0x2000>, <0x22c018 0x4>; + interrupts = <67>; + }; Modified: vendor/device-tree/dist/Bindings/bus/qcom,ebi2.txt ============================================================================== --- vendor/device-tree/dist/Bindings/bus/qcom,ebi2.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/bus/qcom,ebi2.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -51,7 +51,7 @@ Required properties: - compatible: should be one of: "qcom,msm8660-ebi2" "qcom,apq8060-ebi2" -- #address-cells: shoule be <2>: the first cell is the chipselect, +- #address-cells: should be <2>: the first cell is the chipselect, the second cell is the offset inside the memory range - #size-cells: should be <1> - ranges: should be set to: @@ -64,7 +64,7 @@ Required properties: - reg: two ranges of registers: EBI2 config and XMEM config areas - reg-names: should be "ebi2", "xmem" - clocks: two clocks, EBI_2X and EBI -- clock-names: shoule be "ebi2x", "ebi2" +- clock-names: should be "ebi2x", "ebi2" Optional subnodes: - Nodes inside the EBI2 will be considered device nodes. @@ -100,7 +100,7 @@ Optional properties arrays for FAST chip selects: assertion, with respect to the cycle where ADV (address valid) is asserted. 2 means 2 cycles between ADV and OE. Valid values 0, 1, 2 or 3. - qcom,xmem-read-hold-cycles: the length in cycles of the first segment of a - read transfer. For a single read trandfer this will be the time from CS + read transfer. For a single read transfer this will be the time from CS assertion to OE assertion. Valid values 0 thru 15. Modified: vendor/device-tree/dist/Bindings/clock/brcm,bcm2835-cprman.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/brcm,bcm2835-cprman.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/brcm,bcm2835-cprman.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -16,7 +16,20 @@ Required properties: - #clock-cells: Should be <1>. The permitted clock-specifier values can be found in include/dt-bindings/clock/bcm2835.h - reg: Specifies base physical address and size of the registers -- clocks: The external oscillator clock phandle +- clocks: phandles to the parent clocks used as input to the module, in + the following order: + + - External oscillator + - DSI0 byte clock + - DSI0 DDR2 clock + - DSI0 DDR clock + - DSI1 byte clock + - DSI1 DDR2 clock + - DSI1 DDR clock + + Only external oscillator is required. The DSI clocks may + not be present, in which case their children will be + unusable. Example: Added: vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,42 @@ +* Hisilicon Hi3660 Clock Controller + +The Hi3660 clock controller generates and supplies clock to various +controllers within the Hi3660 SoC. + +Required Properties: + +- compatible: the compatible should be one of the following strings to + indicate the clock controller functionality. + + - "hisilicon,hi3660-crgctrl" + - "hisilicon,hi3660-pctrl" + - "hisilicon,hi3660-pmuctrl" + - "hisilicon,hi3660-sctrl" + - "hisilicon,hi3660-iomcu" + +- reg: physical base address of the controller and length of memory mapped + region. + +- #clock-cells: should be 1. + +Each clock is assigned an identifier and client nodes use this identifier +to specify the clock which they consume. + +All these identifier could be found in . + +Examples: + crg_ctrl: clock-controller@fff35000 { + compatible = "hisilicon,hi3660-crgctrl", "syscon"; + reg = <0x0 0xfff35000 0x0 0x1000>; + #clock-cells = <1>; + }; + + uart0: serial@fdf02000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0 0xfdf02000 0x0 0x1000>; + interrupts = ; + clocks = <&crg_ctrl HI3660_CLK_MUX_UART0>, + <&crg_ctrl HI3660_PCLK>; + clock-names = "uartclk", "apb_pclk"; + status = "disabled"; + }; Added: vendor/device-tree/dist/Bindings/clock/idt,versaclock5.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/idt,versaclock5.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,65 @@ +Binding for IDT VersaClock5 programmable i2c clock generator. + +The IDT VersaClock5 are programmable i2c clock generators providing +from 3 to 12 output clocks. + +==I2C device node== + +Required properties: +- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5933". +- reg: i2c device address, shall be 0x68 or 0x6a. +- #clock-cells: from common clock binding; shall be set to 1. +- clocks: from common clock binding; list of parent clock handles, + - 5p49v5923: (required) either or both of XTAL or CLKIN + reference clock. + - 5p49v5933: (optional) property not present (internal + Xtal used) or CLKIN reference + clock. +- clock-names: from common clock binding; clock input names, can be + - 5p49v5923: (required) either or both of "xin", "clkin". + - 5p49v5933: (optional) property not present or "clkin". + +==Mapping between clock specifier and physical pins== + +When referencing the provided clock in the DT using phandle and +clock specifier, the following mapping applies: + +5P49V5923: + 0 -- OUT0_SEL_I2CB + 1 -- OUT1 + 2 -- OUT2 + +5P49V5933: + 0 -- OUT0_SEL_I2CB + 1 -- OUT1 + 2 -- OUT4 + +==Example== + +/* 25MHz reference crystal */ +ref25: ref25m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; +}; + +i2c-master-node { + + /* IDT 5P49V5923 i2c clock generator */ + vc5: clock-generator@6a { + compatible = "idt,5p49v5923"; + reg = <0x6a>; + #clock-cells = <1>; + + /* Connect XIN input to 25MHz reference */ + clocks = <&ref25m>; + clock-names = "xin"; + }; +}; + +/* Consumer referencing the 5P49V5923 pin OUT1 */ +consumer { + ... + clocks = <&vc5 1>; + ... +} Modified: vendor/device-tree/dist/Bindings/clock/mvebu-corediv-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/mvebu-corediv-clock.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/mvebu-corediv-clock.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -7,6 +7,7 @@ Required properties: - compatible : must be "marvell,armada-370-corediv-clock", "marvell,armada-375-corediv-clock", "marvell,armada-380-corediv-clock", + "marvell,mv98dx3236-corediv-clock", - reg : must be the register address of Core Divider control register - #clock-cells : from common clock binding; shall be set to 1 Modified: vendor/device-tree/dist/Bindings/clock/mvebu-cpu-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/mvebu-cpu-clock.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/mvebu-cpu-clock.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -3,6 +3,7 @@ Device Tree Clock bindings for cpu clock of Marvell EB Required properties: - compatible : shall be one of the following: "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP + "marvell,mv98dx3236-cpu-clock" - cpu clocks for 98DX3236 SoC - reg : Address and length of the clock complex register set, followed by address and length of the PMU DFS registers - #clock-cells : should be set to 1. Modified: vendor/device-tree/dist/Bindings/clock/mvebu-gated-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/mvebu-gated-clock.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/mvebu-gated-clock.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -117,7 +117,7 @@ ID Clock Peripheral 25 tdm Time Division Mplx 28 xor1 XOR DMA 1 29 sata1lnk -30 sata1 SATA Host 0 +30 sata1 SATA Host 1 The following is a list of provided IDs for Dove: ID Clock Peripheral Modified: vendor/device-tree/dist/Bindings/clock/qcom,rpmcc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/qcom,rpmcc.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/qcom,rpmcc.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -11,6 +11,7 @@ Required properties : compatible "qcom,rpmcc" should be also included. "qcom,rpmcc-msm8916", "qcom,rpmcc" + "qcom,rpmcc-msm8974", "qcom,rpmcc" "qcom,rpmcc-apq8064", "qcom,rpmcc" - #clock-cells : shall contain 1 Modified: vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -31,6 +31,7 @@ Required properties: * "fsl,t4240-clockgen" * "fsl,b4420-clockgen" * "fsl,b4860-clockgen" + * "fsl,ls1012a-clockgen" * "fsl,ls1021a-clockgen" * "fsl,ls1043a-clockgen" * "fsl,ls1046a-clockgen" Modified: vendor/device-tree/dist/Bindings/clock/renesas,cpg-mssr.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/renesas,cpg-mssr.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/renesas,cpg-mssr.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -42,7 +42,11 @@ Required Properties: Domain bindings in Documentation/devicetree/bindings/power/power_domain.txt. + - #reset-cells: Must be 1 + - The single reset specifier cell must be the module number, as defined + in the datasheet. + Examples -------- @@ -55,6 +59,7 @@ Examples clock-names = "extal", "extalr"; #clock-cells = <2>; #power-domain-cells = <0>; + #reset-cells = <1>; }; @@ -69,5 +74,6 @@ Examples dmas = <&dmac1 0x13>, <&dmac1 0x12>; dma-names = "tx", "rx"; power-domains = <&cpg>; + resets = <&cpg 310>; status = "disabled"; }; Added: vendor/device-tree/dist/Bindings/clock/rockchip,rk3328-cru.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/rockchip,rk3328-cru.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,57 @@ +* Rockchip RK3328 Clock and Reset Unit + +The RK3328 clock controller generates and supplies clock to various +controllers within the SoC and also implements a reset controller for SoC +peripherals. + +Required Properties: + +- compatible: should be "rockchip,rk3328-cru" +- reg: physical base address of the controller and length of memory mapped + region. +- #clock-cells: should be 1. +- #reset-cells: should be 1. + +Optional Properties: + +- rockchip,grf: phandle to the syscon managing the "general register files" + If missing pll rates are not changeable, due to the missing pll lock status. + +Each clock is assigned an identifier and client nodes can use this identifier +to specify the clock which they consume. All available clocks are defined as +preprocessor macros in the dt-bindings/clock/rk3328-cru.h headers and can be +used in device tree sources. Similar macros exist for the reset sources in +these files. + +External clocks: + +There are several clocks that are generated outside the SoC. It is expected +that they are defined using standard clock bindings with following +clock-output-names: + - "xin24m" - crystal input - required, + - "clkin_i2s" - external I2S clock - optional, + - "gmac_clkin" - external GMAC clock - optional + - "phy_50m_out" - output clock of the pll in the mac phy + +Example: Clock controller node: + + cru: clock-controller@ff440000 { + compatible = "rockchip,rk3328-cru"; + reg = <0x0 0xff440000 0x0 0x1000>; + rockchip,grf = <&grf>; + + #clock-cells = <1>; + #reset-cells = <1>; + }; + +Example: UART controller node that consumes the clock generated by the clock + controller: + + uart0: serial@ff120000 { + compatible = "snps,dw-apb-uart"; + reg = <0xff120000 0x100>; + interrupts = ; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&cru SCLK_UART0>; + }; Modified: vendor/device-tree/dist/Bindings/clock/rockchip,rk3399-cru.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/rockchip,rk3399-cru.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/rockchip,rk3399-cru.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -13,6 +13,12 @@ Required Properties: - #clock-cells: should be 1. - #reset-cells: should be 1. +Optional Properties: + +- rockchip,grf: phandle to the syscon managing the "general register files". + It is used for GRF muxes, if missing any muxes present in the GRF will not + be available. + Each clock is assigned an identifier and client nodes can use this identifier to specify the clock which they consume. All available clocks are defined as preprocessor macros in the dt-bindings/clock/rk3399-cru.h headers and can be Modified: vendor/device-tree/dist/Bindings/clock/st,stm32-rcc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/st,stm32-rcc.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/st,stm32-rcc.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -10,6 +10,7 @@ Required properties: - compatible: Should be: "st,stm32f42xx-rcc" "st,stm32f469-rcc" + "st,stm32f746-rcc" - reg: should be register base and length as documented in the datasheet - #reset-cells: 1, see below @@ -17,6 +18,9 @@ Required properties: property, containing a phandle to the clock device node, an index selecting between gated clocks and other clocks and an index specifying the clock to use. +- clocks: External oscillator clock phandle + - high speed external clock signal (HSE) + - external I2S clock (I2S_CKIN) Example: @@ -25,6 +29,7 @@ Example: #clock-cells = <2> compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; reg = <0x40023800 0x400>; + clocks = <&clk_hse>, <&clk_i2s_ckin>; }; Specifying gated clocks @@ -66,6 +71,38 @@ The secondary index is bound with the following magic 0 SYSTICK 1 FCLK + 2 CLK_LSI (low-power clock source) + 3 CLK_LSE (generated from a 32.768 kHz low-speed external + crystal or ceramic resonator) + 4 CLK_HSE_RTC (HSE division factor for RTC clock) + 5 CLK_RTC (real-time clock) + 6 PLL_VCO_I2S (vco frequency of I2S pll) + 7 PLL_VCO_SAI (vco frequency of SAI pll) + 8 CLK_LCD (LCD-TFT) + 9 CLK_I2S (I2S clocks) + 10 CLK_SAI1 (audio clocks) + 11 CLK_SAI2 + 12 CLK_I2SQ_PDIV (post divisor of pll i2s q divisor) + 13 CLK_SAIQ_PDIV (post divisor of pll sai q divisor) + + 14 CLK_HSI (Internal ocscillator clock) + 15 CLK_SYSCLK (System Clock) + 16 CLK_HDMI_CEC (HDMI-CEC clock) + 17 CLK_SPDIF (SPDIF-Rx clock) + 18 CLK_USART1 (U(s)arts clocks) + 19 CLK_USART2 + 20 CLK_USART3 + 21 CLK_UART4 + 22 CLK_UART5 + 23 CLK_USART6 + 24 CLK_UART7 + 25 CLK_UART8 + 26 CLK_I2C1 (I2S clocks) + 27 CLK_I2C2 + 28 CLK_I2C3 + 29 CLK_I2C4 + 30 CLK_LPTIMER (LPTimer1 clock) +) Example: Added: vendor/device-tree/dist/Bindings/clock/stericsson,abx500.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/stericsson,abx500.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,20 @@ +Clock bindings for ST-Ericsson ABx500 clocks + +Required properties : +- compatible : shall contain the following: + "stericsson,ab8500-clk" +- #clock-cells should be <1> + +The ABx500 clocks need to be placed as a subnode of an AB8500 +device node, see mfd/ab8500.txt + +All available clocks are defined as preprocessor macros in +dt-bindings/clock/ste-ab8500.h header and can be used in device +tree sources. + +Example: + +clock-controller { + compatible = "stericsson,ab8500-clk"; + #clock-cells = <1>; +}; Added: vendor/device-tree/dist/Bindings/clock/sun9i-de.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/sun9i-de.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,28 @@ +Allwinner A80 Display Engine Clock Control Binding +-------------------------------------------------- + +Required properties : +- compatible: must contain one of the following compatibles: + - "allwinner,sun9i-a80-de-clks" + +- reg: Must contain the registers base address and length +- clocks: phandle to the clocks feeding the display engine subsystem. + Three are needed: + - "mod": the display engine module clock + - "dram": the DRAM bus clock for the system + - "bus": the bus clock for the whole display engine subsystem +- clock-names: Must contain the clock names described just above +- resets: phandle to the reset control for the display engine subsystem. +- #clock-cells : must contain 1 +- #reset-cells : must contain 1 + +Example: +de_clocks: clock@3000000 { + compatible = "allwinner,sun9i-a80-de-clks"; + reg = <0x03000000 0x30>; + clocks = <&ccu CLK_DE>, <&ccu CLK_SDRAM>, <&ccu CLK_BUS_DE>; + clock-names = "mod", "dram", "bus"; + resets = <&ccu RST_BUS_DE>; + #clock-cells = <1>; + #reset-cells = <1>; +}; Added: vendor/device-tree/dist/Bindings/clock/sun9i-usb.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/sun9i-usb.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,24 @@ +Allwinner A80 USB Clock Control Binding +--------------------------------------- + +Required properties : +- compatible: must contain one of the following compatibles: + - "allwinner,sun9i-a80-usb-clocks" + +- reg: Must contain the registers base address and length +- clocks: phandle to the clocks feeding the USB subsystem. Two are needed: + - "bus": the bus clock for the whole USB subsystem + - "hosc": the high frequency oscillator (usually at 24MHz) +- clock-names: Must contain the clock names described just above +- #clock-cells : must contain 1 +- #reset-cells : must contain 1 + +Example: +usb_clocks: clock@a08000 { + compatible = "allwinner,sun9i-a80-usb-clks"; + reg = <0x00a08000 0x8>; + clocks = <&ccu CLK_BUS_USB>, <&osc24M>; + clock-names = "bus", "hosc"; + #clock-cells = <1>; + #reset-cells = <1>; +}; Modified: vendor/device-tree/dist/Bindings/clock/sunxi-ccu.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/sunxi-ccu.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/sunxi-ccu.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -7,6 +7,8 @@ Required properties : - "allwinner,sun8i-a23-ccu" - "allwinner,sun8i-a33-ccu" - "allwinner,sun8i-h3-ccu" + - "allwinner,sun8i-v3s-ccu" + - "allwinner,sun9i-a80-ccu" - "allwinner,sun50i-a64-ccu" - reg: Must contain the registers base address and length Modified: vendor/device-tree/dist/Bindings/clock/ti,cdce925.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/ti,cdce925.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/ti,cdce925.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -1,15 +1,22 @@ -Binding for TO CDCE925 programmable I2C clock synthesizers. +Binding for TI CDCE913/925/937/949 programmable I2C clock synthesizers. Reference This binding uses the common clock binding[1]. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt -[2] http://www.ti.com/product/cdce925 +[2] http://www.ti.com/product/cdce913 +[3] http://www.ti.com/product/cdce925 +[4] http://www.ti.com/product/cdce937 +[5] http://www.ti.com/product/cdce949 The driver provides clock sources for each output Y1 through Y5. Required properties: - - compatible: Shall be "ti,cdce925" + - compatible: Shall be one of the following: + - "ti,cdce913": 1-PLL, 3 Outputs + - "ti,cdce925": 2-PLL, 5 Outputs + - "ti,cdce937": 3-PLL, 7 Outputs + - "ti,cdce949": 4-PLL, 9 Outputs - reg: I2C device address. - clocks: Points to a fixed parent clock that provides the input frequency. - #clock-cells: From common clock bindings: Shall be 1. @@ -18,7 +25,7 @@ Optional properties: - xtal-load-pf: Crystal load-capacitor value to fine-tune performance on a board, or to compensate for external influences. -For both PLL1 and PLL2 an optional child node can be used to specify spread +For all PLL1, PLL2, ... an optional child node can be used to specify spread spectrum clocking parameters for a board. - spread-spectrum: SSC mode as defined in the data sheet. - spread-spectrum-center: Use "centered" mode instead of "max" mode. When Modified: vendor/device-tree/dist/Bindings/clock/zx296718-clk.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/zx296718-clk.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/clock/zx296718-clk.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -13,6 +13,9 @@ Required properties: "zte,zx296718-lsp1crm": zx296718 device level clock selection and gating + "zte,zx296718-audiocrm": + zx296718 audio clock selection, divider and gating + - reg: Address and length of the register set The clock consumer should specify the desired clock by having the clock Added: vendor/device-tree/dist/Bindings/cpufreq/ti-cpufreq.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/cpufreq/ti-cpufreq.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,128 @@ +TI CPUFreq and OPP bindings +================================ + +Certain TI SoCs, like those in the am335x, am437x, am57xx, and dra7xx +families support different OPPs depending on the silicon variant in use. +The ti-cpufreq driver can use revision and an efuse value from the SoC to +provide the OPP framework with supported hardware information. This is +used to determine which OPPs from the operating-points-v2 table get enabled +when it is parsed by the OPP framework. + +Required properties: +-------------------- +In 'cpus' nodes: +- operating-points-v2: Phandle to the operating-points-v2 table to use. + +In 'operating-points-v2' table: +- compatible: Should be + - 'operating-points-v2-ti-cpu' for am335x, am43xx, and dra7xx/am57xx SoCs +- syscon: A phandle pointing to a syscon node representing the control module + register space of the SoC. + +Optional properties: +-------------------- +For each opp entry in 'operating-points-v2' table: +- opp-supported-hw: Two bitfields indicating: + 1. Which revision of the SoC the OPP is supported by + 2. Which eFuse bits indicate this OPP is available + + A bitwise AND is performed against these values and if any bit + matches, the OPP gets enabled. + +Example: +-------- + +/* From arch/arm/boot/dts/am33xx.dtsi */ +cpus { + #address-cells = <1>; + #size-cells = <0>; + cpu@0 { + compatible = "arm,cortex-a8"; + device_type = "cpu"; + reg = <0>; + + operating-points-v2 = <&cpu0_opp_table>; + + clocks = <&dpll_mpu_ck>; + clock-names = "cpu"; + + clock-latency = <300000>; /* From omap-cpufreq driver */ + }; +}; + +/* + * cpu0 has different OPPs depending on SoC revision and some on revisions + * 0x2 and 0x4 have eFuse bits that indicate if they are available or not + */ +cpu0_opp_table: opp-table { + compatible = "operating-points-v2-ti-cpu"; + syscon = <&scm_conf>; + + /* + * The three following nodes are marked with opp-suspend + * because they can not be enabled simultaneously on a + * single SoC. + */ + opp50@300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <950000 931000 969000>; + opp-supported-hw = <0x06 0x0010>; + opp-suspend; + }; + + opp100@275000000 { + opp-hz = /bits/ 64 <275000000>; + opp-microvolt = <1100000 1078000 1122000>; + opp-supported-hw = <0x01 0x00FF>; + opp-suspend; + }; + + opp100@300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1100000 1078000 1122000>; + opp-supported-hw = <0x06 0x0020>; + opp-suspend; + }; + + opp100@500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <1100000 1078000 1122000>; + opp-supported-hw = <0x01 0xFFFF>; + }; + + opp100@600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1100000 1078000 1122000>; + opp-supported-hw = <0x06 0x0040>; + }; + + opp120@600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1200000 1176000 1224000>; + opp-supported-hw = <0x01 0xFFFF>; + }; + + opp120@720000000 { + opp-hz = /bits/ 64 <720000000>; + opp-microvolt = <1200000 1176000 1224000>; + opp-supported-hw = <0x06 0x0080>; + }; + + oppturbo@720000000 { + opp-hz = /bits/ 64 <720000000>; + opp-microvolt = <1260000 1234800 1285200>; + opp-supported-hw = <0x01 0xFFFF>; + }; + + oppturbo@800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1260000 1234800 1285200>; + opp-supported-hw = <0x06 0x0100>; + }; + + oppnitro@1000000000 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <1325000 1298500 1351500>; + opp-supported-hw = <0x04 0x0200>; + }; +}; Added: vendor/device-tree/dist/Bindings/crypto/brcm,spu-crypto.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/crypto/brcm,spu-crypto.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,22 @@ +The Broadcom Secure Processing Unit (SPU) hardware supports symmetric +cryptographic offload for Broadcom SoCs. A SoC may have multiple SPU hardware +blocks. + +Required properties: +- compatible: Should be one of the following: + brcm,spum-crypto - for devices with SPU-M hardware + brcm,spu2-crypto - for devices with SPU2 hardware + brcm,spu2-v2-crypto - for devices with enhanced SPU2 hardware features like SHA3 + and Rabin Fingerprint support + brcm,spum-nsp-crypto - for the Northstar Plus variant of the SPU-M hardware + +- reg: Should contain SPU registers location and length. +- mboxes: The mailbox channel to be used to communicate with the SPU. + Mailbox channels correspond to DMA rings on the device. + +Example: + crypto@612d0000 { + compatible = "brcm,spum-crypto"; + reg = <0 0x612d0000 0 0x900>; + mboxes = <&pdc0 0>; + }; Added: vendor/device-tree/dist/Bindings/crypto/mediatek-crypto.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/crypto/mediatek-crypto.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -0,0 +1,27 @@ +MediaTek cryptographic accelerators + +Required properties: +- compatible: Should be "mediatek,eip97-crypto" +- reg: Address and length of the register set for the device +- interrupts: Should contain the five crypto engines interrupts in numeric + order. These are global system and four descriptor rings. +- clocks: the clock used by the core +- clock-names: the names of the clock listed in the clocks property. These are + "ethif", "cryp" +- power-domains: Must contain a reference to the PM domain. + + +Example: + crypto: crypto@1b240000 { + compatible = "mediatek,eip97-crypto"; + reg = <0 0x1b240000 0 0x20000>; + interrupts = , + , + , + , + ; + clocks = <&topckgen CLK_TOP_ETHIF_SEL>, + <ðsys CLK_ETHSYS_CRYPTO>; + clock-names = "ethif","cryp"; + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; + }; Modified: vendor/device-tree/dist/Bindings/devfreq/exynos-bus.txt ============================================================================== --- vendor/device-tree/dist/Bindings/devfreq/exynos-bus.txt Tue Jun 20 02:09:50 2017 (r320127) +++ vendor/device-tree/dist/Bindings/devfreq/exynos-bus.txt Tue Jun 20 02:28:15 2017 (r320128) @@ -123,6 +123,20 @@ Detailed correlation between sub-blocks and power line |--- FSYS |--- FSYS2 +- In case of Exynos5433, there is VDD_INT power line as following: + VDD_INT |--- G2D (parent device) + |--- MSCL + |--- GSCL + |--- JPEG + |--- MFC + |--- HEVC + |--- BUS0 + |--- BUS1 + |--- BUS2 + |--- PERIS (Fixed clock rate) + |--- PERIC (Fixed clock rate) + |--- FSYS (Fixed clock rate) + Example1: Show the AXI buses of Exynos3250 SoC. Exynos3250 divides the buses to power line (regulator). The MIF (Memory Interface) AXI bus is used to Modified: vendor/device-tree/dist/Bindings/display/arm,pl11x.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/arm,pl11x.txt Tue Jun 20 02:09:50 2017 (r320127) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 20 02:29:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2688D89F9B; Tue, 20 Jun 2017 02:29:04 +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 AAABC6A83E; Tue, 20 Jun 2017 02:29:04 +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 v5K2T3dI073508; Tue, 20 Jun 2017 02:29:03 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K2T3c4073507; Tue, 20 Jun 2017 02:29:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200229.v5K2T3c4073507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 02:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320129 - vendor/device-tree/4.11 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 02:29:05 -0000 Author: manu Date: Tue Jun 20 02:29:03 2017 New Revision: 320129 URL: https://svnweb.freebsd.org/changeset/base/320129 Log: Tag import of DTS files from Linux 4.11 Added: vendor/device-tree/4.11/ - copied from r320128, vendor/device-tree/dist/ From owner-svn-src-all@freebsd.org Tue Jun 20 03:06:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A106FD8BAE2; Tue, 20 Jun 2017 03:06:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::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 694BA6F2BA; Tue, 20 Jun 2017 03:06:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id f127so19119885pgc.2; Mon, 19 Jun 2017 20:06:40 -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=qbKjkDUUeKMfVErNSgUJOzyNOkKrDyzuTgyZ19bPJw4=; b=Q/xMj0uuQVbD3r9dVHuB18aqGASt/HR7MuvzcOWvrgLKjRWRLnQz1LWiEv4eDxTZT7 yOD9bcaWolSFoG0DhvdqlY3Ol3El0MXAsHkD/MWGSeC7qFBoow3pr1tObn/QHrbmjDEl 3tc2SH4KD4BtarzgQaEtERY2BhlKC7dimGNAYwGEvRwYSFuXHjX6f0RHQALD8LxnWXgT nOoz+cr4jK326LX3eSHBOlkZ3zI182g/MC1UOZEMAGbPrSmR93HLwkTPqcXjtA4VNar9 xDI0C3q+4q/jAZDebwZY4Rk4+PjyQZ75NzerO2qS+U4PFFEi2kFEGhuA6ttAdPd2hQEy 9ZJg== 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=qbKjkDUUeKMfVErNSgUJOzyNOkKrDyzuTgyZ19bPJw4=; b=sWxvSpCMW0R0CIHeW/TNzH/dOWhZ3xNhpKOL6HsmQ7X6NoZ5aafoh0QUZlfInI5KrE Ey9lW7B6ZZEEy8UriRp3cg+MWSgk3scevBMzYMp+9IJZI3R7ktWMyXa+sf8MfAUURGt6 17GN6KqJCjJciCbRdijityVN1ubXSx+n6lGWfyOLK1I15iXCsv0gkuj2BWnfeE6z0h1x VneXUFrh+esQsZjI7A3+pXR/jAzFaeFKBTLe22UYlTJsaRZ4FAMfyRvlywv55Rxg8hkl 3hrFGfB3VlFd+AIqlcwGdv1vBQBJCoJlMk3XLYjBpu73hxrAFJLUgYrh9piceMnPz5eT WZaA== X-Gm-Message-State: AKS2vOyf24WX8aVJJ64zRsxq3qFfeAzCka60hJD2rnkjsVBVfkOWViFX wkoifDDTbyGMnfvtSZw= X-Received: by 10.84.232.71 with SMTP id f7mr13560928pln.18.1497927999541; Mon, 19 Jun 2017 20:06:39 -0700 (PDT) Received: from ?IPv6:2607:fb90:834a:9ac8:dc52:1234:858b:2934? ([2607:fb90:834a:9ac8:dc52:1234:858b:2934]) by smtp.gmail.com with ESMTPSA id y29sm24626518pff.50.2017.06.19.20.06.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 20:06:38 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320127 - in head: . share/mk From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <201706200209.v5K29omh065613@repo.freebsd.org> Date: Mon, 19 Jun 2017 20:06:37 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <00B8D5A3-7877-479E-B952-3CD5B3D88593@gmail.com> References: <201706200209.v5K29omh065613@repo.freebsd.org> To: Emmanuel Vadot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:06:40 -0000 > On Jun 19, 2017, at 19:09, Emmanuel Vadot wrote: >=20 > Author: manu > Date: Tue Jun 20 02:09:50 2017 > New Revision: 320127 > URL: https://svnweb.freebsd.org/changeset/base/320127 >=20 > Log: > Switch back to the BSDL DTC (Device Tree Compiler). > The BSDL dtc has grown the needed features (overlays mostly) and is able t= o > compile all of our base DTS. > You can use WITH_GPL_DTC is you need the GPL one or DTC=3D in make.conf(5= ) > to specify an alternate location for the compiler to use. >=20 > Discussed with: emaste, imp >=20 > Modified: > head/UPDATING > head/share/mk/src.opts.mk >=20 > Modified: head/UPDATING > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/UPDATING Mon Jun 19 22:07:53 2017 (r320126) > +++ head/UPDATING Tue Jun 20 02:09:50 2017 (r320127) > @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: >=20 > ****************************** SPECIAL WARNING: **************************= **** >=20 > +20170620: > + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC > + if you require the GPL compiler. > + > 20170618: > The internal ABI used for communication between the NFS kernel modules > was changed by r320085, so __FreeBSD_version was bumped to >=20 > Modified: head/share/mk/src.opts.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/mk/src.opts.mk Mon Jun 19 22:07:53 2017 (r320126) > +++ head/share/mk/src.opts.mk Tue Jun 20 02:09:50 2017 (r320127) > @@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS =3D \ > GNU_DIFF \ > GNU_GREP \ > GPIO \ > - GPL_DTC \ > HAST \ > HTML \ > HYPERV \ > @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS =3D \ > CLANG_EXTRAS \ > DTRACE_TESTS \ > GNU_GREP_COMPAT \ > + GPL_DTC \ > HESIOD \ > LIBSOFT \ > NAND \ >=20 From owner-svn-src-all@freebsd.org Tue Jun 20 03:08:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52100D8BC8F; Tue, 20 Jun 2017 03:08:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 217396F491; Tue, 20 Jun 2017 03:08:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id w12so20490396pfk.0; Mon, 19 Jun 2017 20:08:10 -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=4Q0vYY7VlCu/elLR0Xlikdsr4BsNS7+ly9r2yaYCAMo=; b=a/JTaVZiEAMZZQCcf36DW9mU3AxzvaohZpyhR58J4MHkFGG7cWVuOw7kniEf5pAYfd GSHQELn+Ll43rZl3OLVJwv+xXEPrzsJVEBv0PXy3b18j7RxrNhVO3pAFIhGl4HHDNzO7 cReglOD/jGFe6Ss20gvd5TdRyrioj6Ci6dIdY5eKL857H2KD33HjMTOP9p1bjN9v9sHq JTyZYJHQ0HxStqtFpQXj/TJRNisRsFw26V1rBfvHV0duhyrZY4AU3A8eqDSsBxo7K0FQ GjqAb0GcCUrVx1pKPyHJqiEh5nd+HE0YFKUGmluOuM8s9YEJVY21Dbh9y7iKaHOsohLG lp4g== 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=4Q0vYY7VlCu/elLR0Xlikdsr4BsNS7+ly9r2yaYCAMo=; b=Q6OQBLaQb8817o7XbL3JWXLD27R3RlAF1Z1PyOGCNPrFXCPGiK1d6CHOZX84E3hvVX o+u1zJM8Qm513q5mBUffPtrSv2hJPk1ivHWmajr6lT5z335Ck/z/NEG8qmMEloWrEnzP xk63lQ9QYb4BNGRso7SoQ+Euqu1riwVMrFK7PpG1nquFP4Z+j6yMrgsXEztsTpMgMB3G xlbidvTwKwlTftZlPYpxDh6rT24AWEDJJcHgW8fy8P7Dt6DhetU7ZCWbrwVUa/Ti635n UOX/1u0/BI4BGAb6Yx/rBZWYSpLj4h46dMnKLmiKYtveJcCdSKxAWCwY1wuMOD7bHVLY VMNQ== X-Gm-Message-State: AKS2vOx2ND3CTNpuGrEco2sItCueh/xXBQK+i0Vvh4OliwXu0+R9p5/E hZ0Oi1rrprw84rA9WvA= X-Received: by 10.84.140.133 with SMTP id 5mr33670098plt.224.1497928089532; Mon, 19 Jun 2017 20:08:09 -0700 (PDT) Received: from ?IPv6:2607:fb90:834a:9ac8:dc52:1234:858b:2934? ([2607:fb90:834a:9ac8:dc52:1234:858b:2934]) by smtp.gmail.com with ESMTPSA id t9sm24025739pfj.77.2017.06.19.20.08.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 20:08:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320127 - in head: . share/mk From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <201706200209.v5K29omh065613@repo.freebsd.org> Date: Mon, 19 Jun 2017 20:08:08 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <548AD276-E8A8-426B-81A2-FEE207D5D6FA@gmail.com> References: <201706200209.v5K29omh065613@repo.freebsd.org> To: Emmanuel Vadot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:08:10 -0000 > On Jun 19, 2017, at 19:09, Emmanuel Vadot wrote: >=20 > Author: manu > Date: Tue Jun 20 02:09:50 2017 > New Revision: 320127 > URL: https://svnweb.freebsd.org/changeset/base/320127 >=20 > Log: > Switch back to the BSDL DTC (Device Tree Compiler). > The BSDL dtc has grown the needed features (overlays mostly) and is able t= o > compile all of our base DTS. > You can use WITH_GPL_DTC is you need the GPL one or DTC=3D in make.conf(5= ) > to specify an alternate location for the compiler to use. ... > +20170620: > + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC > + if you require the GPL compiler. "," should be "." src.conf should also be regenerated after this change. Cheers, -Ngie= From owner-svn-src-all@freebsd.org Tue Jun 20 03:13:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B45D5D8C2C0; Tue, 20 Jun 2017 03:13:52 +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 3C2C96FBA8; Tue, 20 Jun 2017 03:13:52 +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 v5K3Dpb1094875; Tue, 20 Jun 2017 03:13:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K3DoTS094858; Tue, 20 Jun 2017 03:13:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200313.v5K3DoTS094858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 03:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320130 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/display include/dt-bindings/gpio include/dt-bindings/leds include/dt-bindings/mailbox include/dt-binding... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:13:52 -0000 Author: manu Date: Tue Jun 20 03:13:49 2017 New Revision: 320130 URL: https://svnweb.freebsd.org/changeset/base/320130 Log: Update the GNU DTS file from Linux 4.11 Added: - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-common.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-wireless.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-common.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-wireless.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-pcm-953.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/am335x-phycore-rdk.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-388-clearfog-base.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-388-clearfog-pro.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-388-clearfog.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-xp-98dx3236.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-xp-98dx3336.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-xp-98dx4251.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-xp-db-dxbc2.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/armada-xp-db-xc3-24g4xg.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-romulus.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/at91-linea.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/at91-tse850-3.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/axp223.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/bcm47081-luxul-xap-1410.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/bcm47081-luxul-xwr-1200.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/da850-lego-ev3.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/exynos4412-pinctrl.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/exynos4412-prime.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6dl-icore-rqs.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6dl-savageboard.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6q-mccmon6.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6q-savageboard.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6qdl-savageboard.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6ul-isiot-emmc.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6ul-isiot-nand.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6ul-isiot.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6ul-opos6ul.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/imx6ul-opos6uldev.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sama5d36ek_cmp.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sama5d3xcm_cmp.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sama5d3xmb_cmp.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/socfpga_arria10_socdk_nand.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sun5i-a13-licheepi-one.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sun8i-h2-plus-orangepi-zero.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sun8i-h3-beelink-x2.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sun8i-v3s-licheepi-zero.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/sun8i-v3s.dtsi - copied unchanged from r320128, vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-c.dts - copied unchanged from r320128, vendor/device-tree/dist/src/arm/vf610-zii-dev.dtsi - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/hi3660-clock.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/rk3328-cru.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/ste-ab8500.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/stm32fx-clock.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/sun5i-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/sun8i-v3s-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-de.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/clock/sun9i-a80-usb.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/net/mscc-phy-vsc8531.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32h7-pinfunc.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/power/rk3328-power.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/reset/sun5i-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/reset/sun8i-v3s-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-ccu.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-de.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/reset/sun9i-a80-usb.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/soc/zte,pm_domains.h - copied unchanged from r320128, vendor/device-tree/dist/include/dt-bindings/thermal/lm90.h Directory Properties: head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi (props changed) head/sys/gnu/dts/arm/am335x-boneblack-wireless.dts (props changed) head/sys/gnu/dts/arm/am335x-bonegreen-common.dtsi (props changed) head/sys/gnu/dts/arm/am335x-bonegreen-wireless.dts (props changed) head/sys/gnu/dts/arm/am335x-pcm-953.dtsi (props changed) head/sys/gnu/dts/arm/am335x-phycore-rdk.dts (props changed) head/sys/gnu/dts/arm/armada-388-clearfog-base.dts (props changed) head/sys/gnu/dts/arm/armada-388-clearfog-pro.dts (props changed) head/sys/gnu/dts/arm/armada-388-clearfog.dtsi (props changed) head/sys/gnu/dts/arm/armada-xp-98dx3236.dtsi (props changed) head/sys/gnu/dts/arm/armada-xp-98dx3336.dtsi (props changed) head/sys/gnu/dts/arm/armada-xp-98dx4251.dtsi (props changed) head/sys/gnu/dts/arm/armada-xp-db-dxbc2.dts (props changed) head/sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts (props changed) head/sys/gnu/dts/arm/at91-linea.dtsi (props changed) head/sys/gnu/dts/arm/at91-tse850-3.dts (props changed) head/sys/gnu/dts/arm/axp223.dtsi (props changed) head/sys/gnu/dts/arm/bcm47081-luxul-xap-1410.dts (props changed) head/sys/gnu/dts/arm/bcm47081-luxul-xwr-1200.dts (props changed) head/sys/gnu/dts/arm/da850-lego-ev3.dts (props changed) head/sys/gnu/dts/arm/exynos4412-pinctrl.dtsi (props changed) head/sys/gnu/dts/arm/exynos4412-prime.dtsi (props changed) head/sys/gnu/dts/arm/imx6dl-icore-rqs.dts (props changed) head/sys/gnu/dts/arm/imx6dl-savageboard.dts (props changed) head/sys/gnu/dts/arm/imx6q-mccmon6.dts (props changed) head/sys/gnu/dts/arm/imx6q-savageboard.dts (props changed) head/sys/gnu/dts/arm/imx6qdl-savageboard.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-isiot-emmc.dts (props changed) head/sys/gnu/dts/arm/imx6ul-isiot-nand.dts (props changed) head/sys/gnu/dts/arm/imx6ul-isiot.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-opos6ul.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-opos6uldev.dts (props changed) head/sys/gnu/dts/arm/sama5d36ek_cmp.dts (props changed) head/sys/gnu/dts/arm/sama5d3xcm_cmp.dtsi (props changed) head/sys/gnu/dts/arm/sama5d3xmb_cmp.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_arria10_socdk_nand.dts (props changed) head/sys/gnu/dts/arm/sun5i-a13-licheepi-one.dts (props changed) head/sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-beelink-x2.dts (props changed) head/sys/gnu/dts/arm/sun8i-v3s-licheepi-zero.dts (props changed) head/sys/gnu/dts/arm/sun8i-v3s.dtsi (props changed) head/sys/gnu/dts/arm/vf610-zii-dev-rev-c.dts (props changed) head/sys/gnu/dts/arm/vf610-zii-dev.dtsi (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi3660-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3328-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/ste-ab8500.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/stm32fx-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun5i-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-v3s-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun9i-a80-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun9i-a80-de.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun9i-a80-usb.h (props changed) head/sys/gnu/dts/include/dt-bindings/net/mscc-phy-vsc8531.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32h7-pinfunc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/rk3328-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun5i-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-v3s-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun9i-a80-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun9i-a80-de.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun9i-a80-usb.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/zte,pm_domains.h (props changed) head/sys/gnu/dts/include/dt-bindings/thermal/lm90.h (props changed) Modified: head/sys/gnu/dts/arm/alpine.dtsi head/sys/gnu/dts/arm/am335x-baltos.dtsi head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-boneblack.dts head/sys/gnu/dts/arm/am335x-bonegreen.dts head/sys/gnu/dts/arm/am335x-chiliboard.dts head/sys/gnu/dts/arm/am335x-chilisom.dtsi head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am335x-evmsk.dts head/sys/gnu/dts/arm/am335x-icev2.dts head/sys/gnu/dts/arm/am335x-nano.dts head/sys/gnu/dts/arm/am335x-phycore-som.dtsi head/sys/gnu/dts/arm/am335x-sl50.dts head/sys/gnu/dts/arm/am335x-wega.dtsi head/sys/gnu/dts/arm/am33xx.dtsi head/sys/gnu/dts/arm/am4372.dtsi head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am437x-idk-evm.dts head/sys/gnu/dts/arm/am437x-sk-evm.dts head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi (contents, props changed) head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts (contents, props changed) head/sys/gnu/dts/arm/am57xx-beagle-x15.dts head/sys/gnu/dts/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/armada-370-db.dts head/sys/gnu/dts/arm/armada-370-dlink-dns327l.dts head/sys/gnu/dts/arm/armada-370-mirabox.dts head/sys/gnu/dts/arm/armada-370-netgear-rn102.dts head/sys/gnu/dts/arm/armada-370-netgear-rn104.dts head/sys/gnu/dts/arm/armada-370-rd.dts head/sys/gnu/dts/arm/armada-370-synology-ds213j.dts head/sys/gnu/dts/arm/armada-370-xp.dtsi head/sys/gnu/dts/arm/armada-370.dtsi head/sys/gnu/dts/arm/armada-375-db.dts head/sys/gnu/dts/arm/armada-375.dtsi head/sys/gnu/dts/arm/armada-380.dtsi head/sys/gnu/dts/arm/armada-385-linksys.dtsi head/sys/gnu/dts/arm/armada-385-turris-omnia.dts (contents, props changed) head/sys/gnu/dts/arm/armada-385.dtsi head/sys/gnu/dts/arm/armada-388-clearfog.dts head/sys/gnu/dts/arm/armada-388-db.dts head/sys/gnu/dts/arm/armada-388-rd.dts head/sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi head/sys/gnu/dts/arm/armada-38x.dtsi head/sys/gnu/dts/arm/armada-390-db.dts (contents, props changed) head/sys/gnu/dts/arm/armada-390.dtsi head/sys/gnu/dts/arm/armada-395.dtsi (contents, props changed) head/sys/gnu/dts/arm/armada-398-db.dts head/sys/gnu/dts/arm/armada-398.dtsi head/sys/gnu/dts/arm/armada-39x.dtsi head/sys/gnu/dts/arm/armada-xp-axpwifiap.dts head/sys/gnu/dts/arm/armada-xp-db.dts head/sys/gnu/dts/arm/armada-xp-gp.dts head/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts head/sys/gnu/dts/arm/armada-xp-linksys-mamba.dts head/sys/gnu/dts/arm/armada-xp-matrix.dts head/sys/gnu/dts/arm/armada-xp-mv78230.dtsi head/sys/gnu/dts/arm/armada-xp-mv78260.dtsi head/sys/gnu/dts/arm/armada-xp-mv78460.dtsi head/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts head/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts head/sys/gnu/dts/arm/armada-xp-synology-ds414.dts head/sys/gnu/dts/arm/armada-xp.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts head/sys/gnu/dts/arm/at91-sama5d4_xplained.dts head/sys/gnu/dts/arm/axm55xx.dtsi head/sys/gnu/dts/arm/bcm-nsp.dtsi head/sys/gnu/dts/arm/bcm2835-rpi.dtsi head/sys/gnu/dts/arm/bcm283x.dtsi head/sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts head/sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts head/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts head/sys/gnu/dts/arm/bcm4708-luxul-xap-1510.dts (contents, props changed) head/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts head/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts head/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts head/sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts head/sys/gnu/dts/arm/bcm4708.dtsi head/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts head/sys/gnu/dts/arm/bcm47081.dtsi head/sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts head/sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts head/sys/gnu/dts/arm/bcm4709-netgear-r7000.dts head/sys/gnu/dts/arm/bcm4709-netgear-r8000.dts head/sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts (contents, props changed) head/sys/gnu/dts/arm/bcm4709.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts head/sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts (contents, props changed) head/sys/gnu/dts/arm/bcm47094-netgear-r8500.dts (contents, props changed) head/sys/gnu/dts/arm/bcm47094.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm5301x.dtsi head/sys/gnu/dts/arm/bcm53573.dtsi (contents, props changed) head/sys/gnu/dts/arm/bcm94708.dts head/sys/gnu/dts/arm/bcm94709.dts head/sys/gnu/dts/arm/bcm953012er.dts (contents, props changed) head/sys/gnu/dts/arm/bcm953012k.dts head/sys/gnu/dts/arm/bcm958522er.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958525er.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958525xmc.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958622hr.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958623hr.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958625hr.dts (contents, props changed) head/sys/gnu/dts/arm/bcm958625k.dts head/sys/gnu/dts/arm/bcm988312hr.dts (contents, props changed) head/sys/gnu/dts/arm/da850-evm.dts head/sys/gnu/dts/arm/da850-lcdk.dts (contents, props changed) head/sys/gnu/dts/arm/da850.dtsi head/sys/gnu/dts/arm/dm814x.dtsi head/sys/gnu/dts/arm/dm816x.dtsi head/sys/gnu/dts/arm/dove-cm-a510.dtsi head/sys/gnu/dts/arm/dove-sbc-a510.dts head/sys/gnu/dts/arm/dra7-evm.dts head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/dra71-evm.dts (contents, props changed) head/sys/gnu/dts/arm/dra72-evm-common.dtsi head/sys/gnu/dts/arm/dra72-evm-revc.dts head/sys/gnu/dts/arm/ecx-2000.dts head/sys/gnu/dts/arm/exynos-mfc-reserved-memory.dtsi (contents, props changed) head/sys/gnu/dts/arm/exynos3250.dtsi head/sys/gnu/dts/arm/exynos4.dtsi head/sys/gnu/dts/arm/exynos4210.dtsi head/sys/gnu/dts/arm/exynos4412-itop-elite.dts (contents, props changed) head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi head/sys/gnu/dts/arm/exynos4412-odroidu3.dts head/sys/gnu/dts/arm/exynos4412-odroidx.dts head/sys/gnu/dts/arm/exynos4412-odroidx2.dts head/sys/gnu/dts/arm/exynos4412.dtsi head/sys/gnu/dts/arm/exynos5.dtsi head/sys/gnu/dts/arm/exynos5250.dtsi head/sys/gnu/dts/arm/exynos5260.dtsi head/sys/gnu/dts/arm/exynos5410.dtsi head/sys/gnu/dts/arm/exynos5420.dtsi head/sys/gnu/dts/arm/exynos5440.dtsi head/sys/gnu/dts/arm/imx1-ads.dts head/sys/gnu/dts/arm/imx1.dtsi head/sys/gnu/dts/arm/imx23.dtsi head/sys/gnu/dts/arm/imx25.dtsi head/sys/gnu/dts/arm/imx27-apf27dev.dts head/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts head/sys/gnu/dts/arm/imx27-pdk.dts head/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi head/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts head/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi head/sys/gnu/dts/arm/imx27.dtsi head/sys/gnu/dts/arm/imx28.dtsi head/sys/gnu/dts/arm/imx31.dtsi head/sys/gnu/dts/arm/imx35.dtsi head/sys/gnu/dts/arm/imx50-evk.dts head/sys/gnu/dts/arm/imx51-apf51dev.dts head/sys/gnu/dts/arm/imx51-babbage.dts head/sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi head/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts head/sys/gnu/dts/arm/imx53-qsb-common.dtsi head/sys/gnu/dts/arm/imx53-qsb.dts head/sys/gnu/dts/arm/imx53-qsrb.dts head/sys/gnu/dts/arm/imx53-smd.dts head/sys/gnu/dts/arm/imx53-tqma53.dtsi head/sys/gnu/dts/arm/imx53-tx53.dtsi head/sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi head/sys/gnu/dts/arm/imx6dl-aristainetos2_4.dts head/sys/gnu/dts/arm/imx6dl-aristainetos2_7.dts head/sys/gnu/dts/arm/imx6dl-aristainetos_4.dts head/sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts (contents, props changed) head/sys/gnu/dts/arm/imx6dl-cubox-i.dts head/sys/gnu/dts/arm/imx6dl-hummingboard.dts head/sys/gnu/dts/arm/imx6dl-icore.dts (contents, props changed) head/sys/gnu/dts/arm/imx6dl-nit6xlite.dts head/sys/gnu/dts/arm/imx6dl-nitrogen6x.dts head/sys/gnu/dts/arm/imx6dl-sabrelite.dts head/sys/gnu/dts/arm/imx6dl-ts4900.dts (contents, props changed) head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-b450v3.dts head/sys/gnu/dts/arm/imx6q-b650v3.dts head/sys/gnu/dts/arm/imx6q-b850v3.dts head/sys/gnu/dts/arm/imx6q-ba16.dtsi head/sys/gnu/dts/arm/imx6q-bx50v3.dtsi head/sys/gnu/dts/arm/imx6q-cm-fx6.dts head/sys/gnu/dts/arm/imx6q-cubox-i.dts head/sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts head/sys/gnu/dts/arm/imx6q-evi.dts head/sys/gnu/dts/arm/imx6q-gw5400-a.dts head/sys/gnu/dts/arm/imx6q-h100.dts (contents, props changed) head/sys/gnu/dts/arm/imx6q-hummingboard.dts head/sys/gnu/dts/arm/imx6q-icore-rqs.dts head/sys/gnu/dts/arm/imx6q-icore.dts (contents, props changed) head/sys/gnu/dts/arm/imx6q-marsboard.dts head/sys/gnu/dts/arm/imx6q-nitrogen6_max.dts head/sys/gnu/dts/arm/imx6q-nitrogen6_som2.dts (contents, props changed) head/sys/gnu/dts/arm/imx6q-nitrogen6x.dts head/sys/gnu/dts/arm/imx6q-novena.dts head/sys/gnu/dts/arm/imx6q-sabrelite.dts head/sys/gnu/dts/arm/imx6q-ts4900.dts (contents, props changed) head/sys/gnu/dts/arm/imx6q-utilite-pro.dts (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi head/sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi head/sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi head/sys/gnu/dts/arm/imx6qdl-colibri.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi head/sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi head/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw551x.dtsi head/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi head/sys/gnu/dts/arm/imx6qdl-gw553x.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi head/sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi head/sys/gnu/dts/arm/imx6qdl-icore.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi head/sys/gnu/dts/arm/imx6qdl-microsom.dtsi head/sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6_som2.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi head/sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi head/sys/gnu/dts/arm/imx6qdl-rex.dtsi head/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi head/sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi head/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi head/sys/gnu/dts/arm/imx6qdl-ts4900.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6qdl-tx6.dtsi head/sys/gnu/dts/arm/imx6qdl.dtsi head/sys/gnu/dts/arm/imx6qp.dtsi head/sys/gnu/dts/arm/imx6sl-evk.dts head/sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts head/sys/gnu/dts/arm/imx6sx-sdb-sai.dts head/sys/gnu/dts/arm/imx6sx-udoo-neo.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul-geam-kit.dts (contents, props changed) head/sys/gnu/dts/arm/imx6ul-geam.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul-liteboard.dts (contents, props changed) head/sys/gnu/dts/arm/imx6ul-litesom.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul-pico-hobbit.dts head/sys/gnu/dts/arm/imx6ul-tx6ul.dtsi head/sys/gnu/dts/arm/imx6ul.dtsi head/sys/gnu/dts/arm/imx6ull-14x14-evk.dts (contents, props changed) head/sys/gnu/dts/arm/imx6ull.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx7-colibri.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx7d-cl-som-imx7.dts head/sys/gnu/dts/arm/imx7d-nitrogen7.dts head/sys/gnu/dts/arm/imx7d-pinfunc.h head/sys/gnu/dts/arm/imx7d-sdb.dts head/sys/gnu/dts/arm/imx7s-warp.dts (contents, props changed) head/sys/gnu/dts/arm/imx7s.dtsi (contents, props changed) head/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2e.dtsi head/sys/gnu/dts/arm/keystone-k2g.dtsi head/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2hk.dtsi head/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2l.dtsi head/sys/gnu/dts/arm/keystone.dtsi head/sys/gnu/dts/arm/kirkwood-dir665.dts head/sys/gnu/dts/arm/kirkwood-linkstation-6282.dtsi head/sys/gnu/dts/arm/kirkwood-linkstation-duo-6281.dtsi head/sys/gnu/dts/arm/kirkwood-linkstation-lsqvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lsvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswsxl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswvl.dts head/sys/gnu/dts/arm/kirkwood-linkstation-lswxl.dts head/sys/gnu/dts/arm/kirkwood-linkstation.dtsi head/sys/gnu/dts/arm/kirkwood-linksys-viper.dts head/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts head/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi head/sys/gnu/dts/arm/ls1021a.dtsi head/sys/gnu/dts/arm/mt2701-evb.dts head/sys/gnu/dts/arm/mt2701.dtsi head/sys/gnu/dts/arm/mt6580.dtsi head/sys/gnu/dts/arm/mt6589.dtsi head/sys/gnu/dts/arm/mt7623-evb.dts head/sys/gnu/dts/arm/mt7623.dtsi head/sys/gnu/dts/arm/mt8127.dtsi head/sys/gnu/dts/arm/mt8135.dtsi head/sys/gnu/dts/arm/mvebu-linkstation-fan.dtsi head/sys/gnu/dts/arm/mvebu-linkstation-gpio-simple.dtsi head/sys/gnu/dts/arm/omap3-beagle-xm.dts head/sys/gnu/dts/arm/omap3-igep.dtsi head/sys/gnu/dts/arm/omap3-n900.dts head/sys/gnu/dts/arm/omap4-panda-common.dtsi head/sys/gnu/dts/arm/omap5-igep0050.dts head/sys/gnu/dts/arm/omap5-uevm.dts head/sys/gnu/dts/arm/omap5.dtsi head/sys/gnu/dts/arm/orion5x-kuroboxpro.dts head/sys/gnu/dts/arm/orion5x-linkstation-lschl.dts (contents, props changed) head/sys/gnu/dts/arm/orion5x-linkstation-lsgl.dts head/sys/gnu/dts/arm/orion5x-linkstation-lswtgl.dts head/sys/gnu/dts/arm/orion5x-linkstation.dtsi head/sys/gnu/dts/arm/orion5x-lswsgl.dts head/sys/gnu/dts/arm/ox810se.dtsi head/sys/gnu/dts/arm/ox820.dtsi (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8060-dragonboard.dts (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8064-arrow-sd-600eval.dts (contents, props changed) head/sys/gnu/dts/arm/qcom-apq8064-ifc6410.dts head/sys/gnu/dts/arm/qcom-apq8064-pins.dtsi head/sys/gnu/dts/arm/qcom-apq8064-sony-xperia-yuga.dts head/sys/gnu/dts/arm/qcom-apq8064.dtsi head/sys/gnu/dts/arm/qcom-ipq8064.dtsi head/sys/gnu/dts/arm/qcom-msm8660-surf.dts head/sys/gnu/dts/arm/qcom-msm8660.dtsi head/sys/gnu/dts/arm/qcom-msm8974-sony-xperia-honami.dts head/sys/gnu/dts/arm/qcom-msm8974.dtsi head/sys/gnu/dts/arm/r7s72100-rskrza1.dts (contents, props changed) head/sys/gnu/dts/arm/r7s72100.dtsi head/sys/gnu/dts/arm/r8a73a4.dtsi head/sys/gnu/dts/arm/r8a7743.dtsi (contents, props changed) head/sys/gnu/dts/arm/r8a7745.dtsi (contents, props changed) head/sys/gnu/dts/arm/r8a7778.dtsi head/sys/gnu/dts/arm/r8a7779-marzen.dts head/sys/gnu/dts/arm/r8a7779.dtsi head/sys/gnu/dts/arm/r8a7790.dtsi head/sys/gnu/dts/arm/r8a7791.dtsi head/sys/gnu/dts/arm/r8a7792.dtsi (contents, props changed) head/sys/gnu/dts/arm/r8a7793-gose.dts head/sys/gnu/dts/arm/r8a7793.dtsi head/sys/gnu/dts/arm/r8a7794.dtsi head/sys/gnu/dts/arm/rk1108.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3036-evb.dts head/sys/gnu/dts/arm/rk3036-kylin.dts head/sys/gnu/dts/arm/rk3036.dtsi head/sys/gnu/dts/arm/rk3066a-bqcurie2.dts head/sys/gnu/dts/arm/rk3066a-marsboard.dts head/sys/gnu/dts/arm/rk3066a-mk808.dts (contents, props changed) head/sys/gnu/dts/arm/rk3066a-rayeager.dts head/sys/gnu/dts/arm/rk3066a.dtsi head/sys/gnu/dts/arm/rk3188-px3-evb.dts (contents, props changed) head/sys/gnu/dts/arm/rk3188-radxarock.dts head/sys/gnu/dts/arm/rk3188.dtsi head/sys/gnu/dts/arm/rk3229-evb.dts (contents, props changed) head/sys/gnu/dts/arm/rk322x.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-evb-act8846.dts head/sys/gnu/dts/arm/rk3288-evb-rk808.dts head/sys/gnu/dts/arm/rk3288-evb.dtsi head/sys/gnu/dts/arm/rk3288-fennec.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-firefly-beta.dts head/sys/gnu/dts/arm/rk3288-firefly-reload-core.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-firefly-reload.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288-firefly.dts head/sys/gnu/dts/arm/rk3288-firefly.dtsi head/sys/gnu/dts/arm/rk3288-miqi.dts head/sys/gnu/dts/arm/rk3288-popmetal.dts head/sys/gnu/dts/arm/rk3288-r89.dts head/sys/gnu/dts/arm/rk3288-rock2-som.dtsi head/sys/gnu/dts/arm/rk3288-rock2-square.dts head/sys/gnu/dts/arm/rk3288-veyron-analog-audio.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-brain.dts head/sys/gnu/dts/arm/rk3288-veyron-chromebook.dtsi head/sys/gnu/dts/arm/rk3288-veyron-jaq.dts head/sys/gnu/dts/arm/rk3288-veyron-jerry.dts head/sys/gnu/dts/arm/rk3288-veyron-mickey.dts head/sys/gnu/dts/arm/rk3288-veyron-minnie.dts head/sys/gnu/dts/arm/rk3288-veyron-pinky.dts head/sys/gnu/dts/arm/rk3288-veyron-sdmmc.dtsi head/sys/gnu/dts/arm/rk3288-veyron-speedy.dts head/sys/gnu/dts/arm/rk3288-veyron.dtsi head/sys/gnu/dts/arm/rk3288.dtsi head/sys/gnu/dts/arm/sama5d2.dtsi head/sys/gnu/dts/arm/sama5d3_uart.dtsi head/sys/gnu/dts/arm/sama5d4.dtsi head/sys/gnu/dts/arm/sh73a0.dtsi head/sys/gnu/dts/arm/socfpga.dtsi head/sys/gnu/dts/arm/socfpga_arria5.dtsi head/sys/gnu/dts/arm/socfpga_arria5_socdk.dts head/sys/gnu/dts/arm/socfpga_cyclone5_socdk.dts head/sys/gnu/dts/arm/ste-dbx5x0.dtsi head/sys/gnu/dts/arm/ste-href.dtsi head/sys/gnu/dts/arm/ste-hrefprev60.dtsi head/sys/gnu/dts/arm/ste-hrefv60plus.dtsi head/sys/gnu/dts/arm/ste-snowball.dts head/sys/gnu/dts/arm/stih407-family.dtsi head/sys/gnu/dts/arm/stih407-pinctrl.dtsi head/sys/gnu/dts/arm/stih410-b2120.dts head/sys/gnu/dts/arm/stih410-b2260.dts (contents, props changed) head/sys/gnu/dts/arm/stih410.dtsi head/sys/gnu/dts/arm/stm32429i-eval.dts head/sys/gnu/dts/arm/stm32f429-disco.dts head/sys/gnu/dts/arm/stm32f429.dtsi head/sys/gnu/dts/arm/stm32f469-disco.dts head/sys/gnu/dts/arm/sun4i-a10-a1000.dts head/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts head/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts head/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts head/sys/gnu/dts/arm/sun4i-a10-dserve-dsrv9703c.dts head/sys/gnu/dts/arm/sun4i-a10-gemei-g9.dts head/sys/gnu/dts/arm/sun4i-a10-hackberry.dts head/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts head/sys/gnu/dts/arm/sun4i-a10-inet1.dts head/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts head/sys/gnu/dts/arm/sun4i-a10-inet9f-rev03.dts head/sys/gnu/dts/arm/sun4i-a10-jesurun-q5.dts head/sys/gnu/dts/arm/sun4i-a10-marsboard.dts head/sys/gnu/dts/arm/sun4i-a10-mini-xplus.dts head/sys/gnu/dts/arm/sun4i-a10-mk802.dts head/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts head/sys/gnu/dts/arm/sun4i-a10-pcduino.dts head/sys/gnu/dts/arm/sun4i-a10-pcduino2.dts head/sys/gnu/dts/arm/sun4i-a10-pov-protab2-ips9.dts head/sys/gnu/dts/arm/sun4i-a10.dtsi head/sys/gnu/dts/arm/sun5i-a10s-auxtek-t003.dts head/sys/gnu/dts/arm/sun5i-a10s-auxtek-t004.dts head/sys/gnu/dts/arm/sun5i-a10s-mk802.dts head/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts head/sys/gnu/dts/arm/sun5i-a10s-r7-tv-dongle.dts head/sys/gnu/dts/arm/sun5i-a10s-wobo-i5.dts head/sys/gnu/dts/arm/sun5i-a10s.dtsi head/sys/gnu/dts/arm/sun5i-a13-empire-electronix-d709.dts head/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts head/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts head/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts head/sys/gnu/dts/arm/sun5i-a13-utoo-p66.dts head/sys/gnu/dts/arm/sun5i-a13.dtsi head/sys/gnu/dts/arm/sun5i-gr8-chip-pro.dts (contents, props changed) head/sys/gnu/dts/arm/sun5i-gr8-evb.dts (contents, props changed) head/sys/gnu/dts/arm/sun5i-gr8.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun5i-r8-chip.dts head/sys/gnu/dts/arm/sun5i-r8.dtsi head/sys/gnu/dts/arm/sun5i-reference-design-tablet.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun5i.dtsi head/sys/gnu/dts/arm/sun6i-a31-app4-evb1.dts head/sys/gnu/dts/arm/sun6i-a31-colombus.dts head/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts head/sys/gnu/dts/arm/sun6i-a31-i7.dts head/sys/gnu/dts/arm/sun6i-a31-m9.dts head/sys/gnu/dts/arm/sun6i-a31-mele-a1000g-quad.dts head/sys/gnu/dts/arm/sun6i-a31.dtsi head/sys/gnu/dts/arm/sun6i-a31s-primo81.dts head/sys/gnu/dts/arm/sun6i-a31s-sina31s.dts head/sys/gnu/dts/arm/sun6i-a31s-sinovoip-bpi-m2.dts head/sys/gnu/dts/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts head/sys/gnu/dts/arm/sun6i-reference-design-tablet.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun7i-a20-bananapi-m1-plus.dts (contents, props changed) head/sys/gnu/dts/arm/sun7i-a20-bananapi.dts head/sys/gnu/dts/arm/sun7i-a20-bananapro.dts head/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts head/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts head/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts head/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts head/sys/gnu/dts/arm/sun7i-a20-itead-ibox.dts head/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts head/sys/gnu/dts/arm/sun7i-a20-m3.dts head/sys/gnu/dts/arm/sun7i-a20-mk808c.dts head/sys/gnu/dts/arm/sun7i-a20-olimex-som-evb.dts head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2-emmc.dts head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts head/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts head/sys/gnu/dts/arm/sun7i-a20-orangepi-mini.dts head/sys/gnu/dts/arm/sun7i-a20-orangepi.dts head/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts head/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts head/sys/gnu/dts/arm/sun7i-a20-wexler-tab7200.dts head/sys/gnu/dts/arm/sun7i-a20-wits-pro-a20-dkt.dts head/sys/gnu/dts/arm/sun7i-a20.dtsi head/sys/gnu/dts/arm/sun8i-a23-a33.dtsi head/sys/gnu/dts/arm/sun8i-a23-evb.dts head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts head/sys/gnu/dts/arm/sun8i-a23-polaroid-mid2407pxe03.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-a23-polaroid-mid2809pxe04.dts head/sys/gnu/dts/arm/sun8i-a23-q8-tablet.dts head/sys/gnu/dts/arm/sun8i-a23.dtsi head/sys/gnu/dts/arm/sun8i-a33-inet-d978-rev2.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-a33-olinuxino.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-a33-sinlinx-sina33.dts head/sys/gnu/dts/arm/sun8i-a33.dtsi head/sys/gnu/dts/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3-bananapi-m2-plus.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3-nanopi.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-2.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-lite.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-one.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-pc-plus.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-pc.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-plus.dts head/sys/gnu/dts/arm/sun8i-h3.dtsi head/sys/gnu/dts/arm/sun8i-q8-common.dtsi head/sys/gnu/dts/arm/sun8i-r16-parrot.dts (contents, props changed) head/sys/gnu/dts/arm/sun8i-reference-design-tablet.dtsi (contents, props changed) head/sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts head/sys/gnu/dts/arm/sun9i-a80-optimus.dts head/sys/gnu/dts/arm/sun9i-a80.dtsi head/sys/gnu/dts/arm/sunxi-common-regulators.dtsi head/sys/gnu/dts/arm/tango4-common.dtsi head/sys/gnu/dts/arm/tango4-vantage-1172.dts head/sys/gnu/dts/arm/tegra124-apalis-eval.dts (contents, props changed) head/sys/gnu/dts/arm/tegra124-apalis.dtsi (contents, props changed) head/sys/gnu/dts/arm/tegra124-nyan-big.dts head/sys/gnu/dts/arm/tegra124-nyan-blaze.dts head/sys/gnu/dts/arm/tegra124-nyan.dtsi head/sys/gnu/dts/arm/tegra20-paz00.dts head/sys/gnu/dts/arm/tegra20-trimslice.dts head/sys/gnu/dts/arm/uniphier-pinctrl.dtsi head/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/vf-colibri.dtsi head/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts head/sys/gnu/dts/arm/vf500-colibri.dtsi head/sys/gnu/dts/arm/vf500.dtsi head/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts head/sys/gnu/dts/arm/vf610-colibri.dtsi head/sys/gnu/dts/arm/vf610-twr.dts head/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts head/sys/gnu/dts/arm/vf610.dtsi head/sys/gnu/dts/arm/vf610m4-colibri.dts head/sys/gnu/dts/arm/vf610m4-cosmic.dts head/sys/gnu/dts/arm/vf610m4.dtsi head/sys/gnu/dts/arm/vfxxx.dtsi head/sys/gnu/dts/include/dt-bindings/clock/bcm2835.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5433.h head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx7d-clock.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq4019.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-mdm9615.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8994.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8996.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,rpmcc.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/r7s72100-clock.h head/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h head/sys/gnu/dts/include/dt-bindings/clock/rk3288-cru.h head/sys/gnu/dts/include/dt-bindings/mfd/stm32f4-rcc.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h head/sys/gnu/dts/include/dt-bindings/pinctrl/samsung.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/sound/cs42l42.h (contents, props changed) Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm/am571x-idk.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-11mp-bbrevd-ctrevb.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-11mp-bbrevd.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-11mp-ctrevb.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-a9mp-bbrevd.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-bbrevd.dts (props changed) head/sys/gnu/dts/arm/arm-realview-eb-bbrevd.dtsi (props changed) head/sys/gnu/dts/arm/armada-395-gp.dts (props changed) head/sys/gnu/dts/arm/at91-sam9_l9260.dts (props changed) head/sys/gnu/dts/arm/at91sam9260ek.dts (props changed) head/sys/gnu/dts/arm/axp809.dtsi (props changed) head/sys/gnu/dts/arm/bcm23550-sparrow.dts (props changed) head/sys/gnu/dts/arm/bcm23550.dtsi (props changed) head/sys/gnu/dts/arm/bcm2835-rpi-zero.dts (props changed) head/sys/gnu/dts/arm/bcm283x-rpi-smsc9512.dtsi (props changed) head/sys/gnu/dts/arm/bcm283x-rpi-smsc9514.dtsi (props changed) head/sys/gnu/dts/arm/bcm283x-rpi-usb-host.dtsi (props changed) head/sys/gnu/dts/arm/bcm47189-tenda-ac9.dts (props changed) head/sys/gnu/dts/arm/bcm5301x-nand-cs0-bch1.dtsi (props changed) head/sys/gnu/dts/arm/bcm5301x-nand-cs0-bch4.dtsi (props changed) head/sys/gnu/dts/arm/bcm5301x-nand-cs0.dtsi (props changed) head/sys/gnu/dts/arm/cloudengines-pogoplug-series-3.dts (props changed) head/sys/gnu/dts/arm/dra72-evm-tps65917.dtsi (props changed) head/sys/gnu/dts/arm/ep7209.dtsi (props changed) head/sys/gnu/dts/arm/ep7211-edb7211.dts (props changed) head/sys/gnu/dts/arm/ep7211.dtsi (props changed) head/sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi (props changed) head/sys/gnu/dts/arm/exynos5410-odroidxu.dts (props changed) head/sys/gnu/dts/arm/exynos54xx-odroidxu-leds.dtsi (props changed) head/sys/gnu/dts/arm/exynos54xx.dtsi (props changed) head/sys/gnu/dts/arm/hi3519-demb.dts (props changed) head/sys/gnu/dts/arm/hi3519.dtsi (props changed) head/sys/gnu/dts/arm/imx23-sansa.dts (props changed) head/sys/gnu/dts/arm/imx23-xfi3.dts (props changed) head/sys/gnu/dts/arm/imx53-usbarmory.dts (props changed) head/sys/gnu/dts/arm/imx6dl-gw553x.dts (props changed) head/sys/gnu/dts/arm/imx6q-gw553x.dts (props changed) head/sys/gnu/dts/arm/imx6sx-udoo-neo-basic.dts (props changed) head/sys/gnu/dts/arm/imx6sx-udoo-neo-extended.dts (props changed) head/sys/gnu/dts/arm/imx6sx-udoo-neo-full.dts (props changed) head/sys/gnu/dts/arm/imx7-colibri-eval-v3.dtsi (props changed) head/sys/gnu/dts/arm/imx7d-colibri-eval-v3.dts (props changed) head/sys/gnu/dts/arm/imx7d-colibri.dtsi (props changed) head/sys/gnu/dts/arm/imx7s-colibri-eval-v3.dts (props changed) head/sys/gnu/dts/arm/imx7s-colibri.dtsi (props changed) head/sys/gnu/dts/arm/omap4-droid4-xt894.dts (props changed) head/sys/gnu/dts/arm/orion5x-mv88f5181.dtsi (props changed) head/sys/gnu/dts/arm/orion5x-netgear-wnr854t.dts (props changed) head/sys/gnu/dts/arm/pxa25x.dtsi (props changed) head/sys/gnu/dts/arm/qcom-apq8064-arrow-sd-600eval-pins.dtsi (props changed) head/sys/gnu/dts/arm/qcom-mdm9615-wp8548-mangoh-green.dts (props changed) head/sys/gnu/dts/arm/qcom-mdm9615-wp8548.dtsi (props changed) head/sys/gnu/dts/arm/qcom-mdm9615.dtsi (props changed) head/sys/gnu/dts/arm/qcom-msm8974-lge-nexus5-hammerhead.dts (props changed) head/sys/gnu/dts/arm/r8a7743-sk-rzg1m.dts (props changed) head/sys/gnu/dts/arm/r8a7745-sk-rzg1e.dts (props changed) head/sys/gnu/dts/arm/r8a7792-blanche.dts (props changed) head/sys/gnu/dts/arm/r8a7792-wheat.dts (props changed) head/sys/gnu/dts/arm/rk1108-evb.dts (props changed) head/sys/gnu/dts/arm/sama5d3xmb_emac.dtsi (props changed) head/sys/gnu/dts/arm/sama5d3xmb_gmac.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_arria10_socdk_qspi.dts (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_sodia.dts (props changed) head/sys/gnu/dts/arm/stm32746g-eval.dts (props changed) head/sys/gnu/dts/arm/stm32f746.dtsi (props changed) head/sys/gnu/dts/arm/sun5i-a13-empire-electronix-m712.dts (props changed) head/sys/gnu/dts/arm/sun6i-a31s-inet-q972.dts (props changed) head/sys/gnu/dts/arm/sun8i-a23-inet86dz.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-nanopi-m1.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-nanopi-neo.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-plus2e.dts (props changed) head/sys/gnu/dts/arm/sunxi-reference-design-tablet.dtsi (props changed) head/sys/gnu/dts/arm/tegra124-apalis-emc.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-ld4-ref.dts (props changed) head/sys/gnu/dts/arm/uniphier-ld4.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-ld6b-ref.dts (props changed) head/sys/gnu/dts/arm/uniphier-ld6b.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-pro4-ace.dts (props changed) head/sys/gnu/dts/arm/uniphier-pro4-ref.dts (props changed) head/sys/gnu/dts/arm/uniphier-pro4-sanji.dts (props changed) head/sys/gnu/dts/arm/uniphier-pro4.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-pro5.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-pxs2-gentil.dts (props changed) head/sys/gnu/dts/arm/uniphier-pxs2-vodka.dts (props changed) head/sys/gnu/dts/arm/uniphier-pxs2.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-sld3-ref.dts (props changed) head/sys/gnu/dts/arm/uniphier-sld3.dtsi (props changed) head/sys/gnu/dts/arm/uniphier-sld8-ref.dts (props changed) head/sys/gnu/dts/arm/uniphier-sld8.dtsi (props changed) head/sys/gnu/dts/arm/zynq-microzed.dts (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/clock/gxbb-aoclkc.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi3516cv300-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/histb-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/maxim,max77620.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/mt2701-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/oxsemi,ox810se.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/oxsemi,ox820.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-mdm9615.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7743-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7745-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7792-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7796-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk1108-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun50i-a64-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun6i-a31-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-a23-a33-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-h3-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra186-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/zx296718-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/display/tda998x.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson-gxl-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/leds/leds-pca9532.h (props changed) head/sys/gnu/dts/include/dt-bindings/mailbox/tegra186-hsp.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/mt2701-larb-port.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/keystone.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32f746-pinfunc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/mt2701-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7743-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7745-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7792-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7796-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/tegra186-powergate.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/gxbb-aoclkc.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/mt2701-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/oxsemi,ox810se.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/oxsemi,ox820.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-mdm9615.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun50i-a64-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun6i-a31-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-a23-a33-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-h3-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/tegra186-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/ti-syscon.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/rockchip,boot-mode.h (props changed) Modified: head/sys/gnu/dts/arm/alpine.dtsi ============================================================================== --- head/sys/gnu/dts/arm/alpine.dtsi Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/alpine.dtsi Tue Jun 20 03:13:49 2017 (r320130) @@ -93,7 +93,7 @@ interrupt-controller; reg = <0x0 0xfb001000 0x0 0x1000>, <0x0 0xfb002000 0x0 0x2000>, - <0x0 0xfb004000 0x0 0x1000>, + <0x0 0xfb004000 0x0 0x2000>, <0x0 0xfb006000 0x0 0x2000>; interrupts = ; Modified: head/sys/gnu/dts/arm/am335x-baltos.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-baltos.dtsi Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-baltos.dtsi Tue Jun 20 03:13:49 2017 (r320130) @@ -371,6 +371,8 @@ phy1: ethernet-phy@1 { reg = <7>; + eee-broken-100tx; + eee-broken-1000t; }; }; Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-bone-common.dtsi Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-bone-common.dtsi Tue Jun 20 03:13:49 2017 (r320130) @@ -207,6 +207,8 @@ &usb0 { status = "okay"; dr_mode = "peripheral"; + interrupts-extended = <&intc 18 &tps 0>; + interrupt-names = "mc", "vbus"; }; &usb1 { Copied: head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi (from r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Tue Jun 20 03:13:49 2017 (r320130, copy of r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-common.dtsi) @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&vmmcsd_fixed>; +}; + +&mmc2 { + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins>; + bus-width = <8>; + status = "okay"; +}; + +&am33xx_pinmux { + nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ + AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */ + AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */ + AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */ + AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */ + AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */ + AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */ + AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */ + AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */ + AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */ + AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */ + AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */ + AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */ + AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */ + AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */ + AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */ + AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */ + AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */ + AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */ + AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */ + AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */ + >; + }; + + nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ + >; + }; + + mcasp0_pins: mcasp0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */ + AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/ + AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */ + AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */ + AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */ + >; + }; +}; + +&lcdc { + status = "okay"; + + /* If you want to get 24 bit RGB and 16 BGR mode instead of + * current 16 bit RGB and 24 BGR modes, set the propety + * below to "crossed" and uncomment the video-ports -property + * in tda19988 node. + */ + blue-and-red-wiring = "straight"; + + port { + lcdc_0: endpoint@0 { + remote-endpoint = <&hdmi_0>; + }; + }; +}; + +&i2c0 { + tda19988: tda19988 { + compatible = "nxp,tda998x"; + reg = <0x70>; + + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_bonelt_pins>; + pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + + /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */ + /* video-ports = <0x234501>; */ + + #sound-dai-cells = <0>; + audio-ports = < TDA998x_I2S 0x03>; + + ports { + port@0 { + hdmi_0: endpoint@0 { + remote-endpoint = <&lcdc_0>; + }; + }; + }; + }; +}; + +&rtc { + system-power-controller; +}; + +&mcasp0 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcasp0_pins>; + status = "okay"; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 0 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +}; + +/ { + clk_mcasp0_fixed: clk_mcasp0_fixed { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24576000>; + }; + + clk_mcasp0: clk_mcasp0 { + #clock-cells = <0>; + compatible = "gpio-gate-clock"; + clocks = <&clk_mcasp0_fixed>; + enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */ + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "TI BeagleBone Black"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink0_master>; + simple-audio-card,frame-master = <&dailink0_master>; + + dailink0_master: simple-audio-card,cpu { + sound-dai = <&mcasp0>; + clocks = <&clk_mcasp0>; + }; + + simple-audio-card,codec { + sound-dai = <&tda19988>; + }; + }; +}; Copied: head/sys/gnu/dts/arm/am335x-boneblack-wireless.dts (from r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-wireless.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-boneblack-wireless.dts Tue Jun 20 03:13:49 2017 (r320130, copy of r320128, vendor/device-tree/dist/src/arm/am335x-boneblack-wireless.dts) @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" +#include "am335x-boneblack-common.dtsi" +#include + +/ { + model = "TI AM335x BeagleBone Black Wireless"; + compatible = "ti,am335x-bone-black-wireless", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + + wlan_en_reg: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "wlan-en-regulator"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + startup-delay-us= <70000>; + + /* WL_EN */ + gpio = <&gpio3 9 0>; + enable-active-high; + }; +}; + +&am33xx_pinmux { + bt_pins: pinmux_bt_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_txd0.gpio0_28 - BT_EN */ + >; + }; + + mmc3_pins: pinmux_mmc3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE6 ) /* (L15) gmii1_rxd1.mmc2_clk */ + AM33XX_IOPAD(0x914, PIN_INPUT_PULLUP | MUX_MODE6 ) /* (J16) gmii1_txen.mmc2_cmd */ + AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (J17) gmii1_rxdv.mmc2_dat0 */ + AM33XX_IOPAD(0x91c, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (J18) gmii1_txd3.mmc2_dat1 */ + AM33XX_IOPAD(0x920, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (K15) gmii1_txd2.mmc2_dat2 */ + AM33XX_IOPAD(0x908, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (H16) gmii1_col.mmc2_dat3 */ + >; + }; + + uart3_pins: pinmux_uart3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* gmii1_rxd3.uart3_rxd */ + AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gmii1_rxd2.uart3_txd */ + AM33XX_IOPAD(0x948, PIN_INPUT | MUX_MODE3) /* mdio_data.uart3_ctsn */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mdio_clk.uart3_rtsn */ + >; + }; + + wl18xx_pins: pinmux_wl18xx_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) /* rmii1_refclk.gpio0_29 WL_IRQ */ + AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_rxclk.gpio3_10 LS_BUF_EN */ + >; + }; +}; + +&mac { + status = "disabled"; +}; + +&mmc3 { + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; + dma-names = "tx", "rx"; + status = "okay"; + vmmc-supply = <&wlan_en_reg>; + bus-width = <4>; + non-removable; + cap-power-off-card; + ti,needs-special-hs-handling; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins &wl18xx_pins>; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@2 { + compatible = "ti,wl1835"; + reg = <2>; + interrupt-parent = <&gpio0>; + interrupts = <29 IRQ_TYPE_EDGE_RISING>; + }; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins &bt_pins>; + status = "okay"; +}; + +&gpio3 { + ls_buf_en { + gpio-hog; + gpios = <10 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "LS_BUF_EN"; + }; +}; Modified: head/sys/gnu/dts/arm/am335x-boneblack.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-boneblack.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-boneblack.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -9,162 +9,9 @@ #include "am33xx.dtsi" #include "am335x-bone-common.dtsi" -#include +#include "am335x-boneblack-common.dtsi" / { model = "TI AM335x BeagleBone Black"; compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; -}; - -&ldo3_reg { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; -}; - -&mmc1 { - vmmc-supply = <&vmmcsd_fixed>; -}; - -&mmc2 { - vmmc-supply = <&vmmcsd_fixed>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_pins>; - bus-width = <8>; - status = "okay"; -}; - -&am33xx_pinmux { - nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ - AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */ - AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */ - AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */ - AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */ - AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */ - AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */ - AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */ - AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */ - AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */ - AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */ - AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */ - AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */ - AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */ - AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */ - AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */ - AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */ - AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */ - AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */ - AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */ - >; - }; - nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ - >; - }; - - mcasp0_pins: mcasp0_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */ - AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/ - AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */ - AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */ - AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */ - >; - }; -}; - -&lcdc { - status = "okay"; - - /* If you want to get 24 bit RGB and 16 BGR mode instead of - * current 16 bit RGB and 24 BGR modes, set the propety - * below to "crossed" and uncomment the video-ports -property - * in tda19988 node. - */ - blue-and-red-wiring = "straight"; - - port { - lcdc_0: endpoint@0 { - remote-endpoint = <&hdmi_0>; - }; - }; -}; - -&i2c0 { - tda19988: tda19988 { - compatible = "nxp,tda998x"; - reg = <0x70>; - - pinctrl-names = "default", "off"; - pinctrl-0 = <&nxp_hdmi_bonelt_pins>; - pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; - - /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */ - /* video-ports = <0x234501>; */ - - #sound-dai-cells = <0>; - audio-ports = < TDA998x_I2S 0x03>; - - ports { - port@0 { - hdmi_0: endpoint@0 { - remote-endpoint = <&lcdc_0>; - }; - }; - }; - }; -}; - -&rtc { - system-power-controller; -}; - -&mcasp0 { - #sound-dai-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&mcasp0_pins>; - status = "okay"; - op-mode = <0>; /* MCASP_IIS_MODE */ - tdm-slots = <2>; - serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ - 0 0 1 0 - >; - tx-num-evt = <32>; - rx-num-evt = <32>; -}; - -/ { - clk_mcasp0_fixed: clk_mcasp0_fixed { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <24576000>; - }; - - clk_mcasp0: clk_mcasp0 { - #clock-cells = <0>; - compatible = "gpio-gate-clock"; - clocks = <&clk_mcasp0_fixed>; - enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */ - }; - - sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "TI BeagleBone Black"; - simple-audio-card,format = "i2s"; - simple-audio-card,bitclock-master = <&dailink0_master>; - simple-audio-card,frame-master = <&dailink0_master>; - - dailink0_master: simple-audio-card,cpu { - sound-dai = <&mcasp0>; - clocks = <&clk_mcasp0>; - }; - - simple-audio-card,codec { - sound-dai = <&tda19988>; - }; - }; }; Copied: head/sys/gnu/dts/arm/am335x-bonegreen-common.dtsi (from r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-bonegreen-common.dtsi Tue Jun 20 03:13:49 2017 (r320130, copy of r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-common.dtsi) @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&vmmcsd_fixed>; +}; + +&mmc2 { + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins>; + bus-width = <8>; + status = "okay"; +}; + +&am33xx_pinmux { + uart2_pins: uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd */ + AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd */ + >; + }; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "okay"; +}; + +&rtc { + system-power-controller; +}; Copied: head/sys/gnu/dts/arm/am335x-bonegreen-wireless.dts (from r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-wireless.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-bonegreen-wireless.dts Tue Jun 20 03:13:49 2017 (r320130, copy of r320128, vendor/device-tree/dist/src/arm/am335x-bonegreen-wireless.dts) @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" +#include "am335x-bonegreen-common.dtsi" +#include + +/ { + model = "TI AM335x BeagleBone Green Wireless"; + compatible = "ti,am335x-bone-green-wireless", "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + + wlan_en_reg: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "wlan-en-regulator"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + startup-delay-us= <70000>; + + /* WL_EN */ + gpio = <&gpio0 26 0>; + enable-active-high; + }; +}; + +&am33xx_pinmux { + bt_pins: pinmux_bt_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x878, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_ad12.gpio1_28 BT_EN */ + >; + }; + + mmc3_pins: pinmux_mmc3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */ + AM33XX_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */ + AM33XX_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */ + AM33XX_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */ + AM33XX_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd */ + AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_clk.mmc2_clk */ + >; + }; + + uart3_pins: pinmux_uart3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* gmii1_rxd3.uart3_rxd */ + AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gmii1_rxd2.uart3_txd */ + AM33XX_IOPAD(0x948, PIN_INPUT | MUX_MODE3) /* mdio_data.uart3_ctsn */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mdio_clk.uart3_rtsn */ + >; + }; + + wl18xx_pins: pinmux_wl18xx_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x828, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad10.gpio0_26 WL_EN */ + AM33XX_IOPAD(0x82C, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad11.gpio0_27 WL_IRQ */ + AM33XX_IOPAD(0x87C, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_csn0.gpio1_29 LS_BUF_EN */ + >; + }; +}; + +&mac { + status = "disabled"; +}; + +&mmc3 { + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; + dma-names = "tx", "rx"; + status = "okay"; + vmmc-supply = <&wlan_en_reg>; + bus-width = <4>; + non-removable; + cap-power-off-card; + ti,needs-special-hs-handling; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins &wl18xx_pins>; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@2 { + compatible = "ti,wl1835"; + reg = <2>; + interrupt-parent = <&gpio0>; + interrupts = <27 IRQ_TYPE_EDGE_RISING>; + }; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins &bt_pins>; + status = "okay"; +}; + +&gpio1 { + ls_buf_en { + gpio-hog; + gpios = <29 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "LS_BUF_EN"; + }; +}; + +/* BT_AUD_OUT from wl1835 has to be pulled low when WL_EN is activated.*/ +/* in case it isn't, wilink8 ends up in one of the test modes that */ +/* intruces various issues (elp wkaeup timeouts etc.) */ +/* On the BBGW this pin is routed through the level shifter (U21) that */ +/* introduces a pullup on the line and wilink8 ends up in a bad state. */ +/* use a gpio hog to force this pin low. An alternative may be adding */ +/* an external pulldown on U21 pin 4. */ + +&gpio3 { + bt_aud_in { + gpio-hog; + gpios = <16 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "MCASP0_AHCLKR"; + }; +}; Modified: head/sys/gnu/dts/arm/am335x-bonegreen.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-bonegreen.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-bonegreen.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -9,45 +9,9 @@ #include "am33xx.dtsi" #include "am335x-bone-common.dtsi" +#include "am335x-bonegreen-common.dtsi" / { model = "TI AM335x BeagleBone Green"; compatible = "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; -}; - -&ldo3_reg { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; -}; - -&mmc1 { - vmmc-supply = <&vmmcsd_fixed>; -}; - -&mmc2 { - vmmc-supply = <&vmmcsd_fixed>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_pins>; - bus-width = <8>; - status = "okay"; -}; - -&am33xx_pinmux { - uart2_pins: uart2_pins { - pinctrl-single,pins = < - AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd */ - AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd */ - >; - }; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2_pins>; - status = "okay"; -}; - -&rtc { - system-power-controller; }; Modified: head/sys/gnu/dts/arm/am335x-chiliboard.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-chiliboard.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-chiliboard.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -185,3 +185,19 @@ cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; status = "okay"; }; + +&tps { + interrupt-parent = <&intc>; + interrupts = <7>; /* NNMI */ + + charger { + interrupts = <0>, <1>; + interrupt-names = "USB", "AC"; + status = "okay"; + }; + + pwrbutton { + interrupts = <2>; + status = "okay"; + }; +}; Modified: head/sys/gnu/dts/arm/am335x-chilisom.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-chilisom.dtsi Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-chilisom.dtsi Tue Jun 20 03:13:49 2017 (r320130) @@ -124,6 +124,14 @@ &rtc { system-power-controller; + + pinctrl-0 = <&ext_wakeup>; + pinctrl-names = "default"; + + ext_wakeup: ext-wakeup { + pins = "ext_wakeup0"; + input-enable; + }; }; /* NAND Flash */ Modified: head/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evm.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-evm.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -25,6 +25,10 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + chosen { + stdout-path = &uart0; + }; + vbat: fixedregulator0 { compatible = "regulator-fixed"; regulator-name = "vbat"; Modified: head/sys/gnu/dts/arm/am335x-evmsk.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evmsk.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-evmsk.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -32,6 +32,10 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + chosen { + stdout-path = &uart0; + }; + vbat: fixedregulator0 { compatible = "regulator-fixed"; regulator-name = "vbat"; @@ -668,6 +672,7 @@ ti,non-removable; bus-width = <4>; cap-power-off-card; + keep-power-in-suspend; pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; Modified: head/sys/gnu/dts/arm/am335x-icev2.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-icev2.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-icev2.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -24,6 +24,10 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + chosen { + stdout-path = &uart3; + }; + vbat: fixedregulator0 { compatible = "regulator-fixed"; regulator-name = "vbat"; Modified: head/sys/gnu/dts/arm/am335x-nano.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-nano.dts Tue Jun 20 02:29:03 2017 (r320129) +++ head/sys/gnu/dts/arm/am335x-nano.dts Tue Jun 20 03:13:49 2017 (r320130) @@ -249,7 +249,8 @@ #address-cells = <2>; #size-cells = <1>; - ranges = <0 0 0x08000000 0x08000000>; /* CS0: NOR 128M */ + ranges = <0 0 0x08000000 0x08000000>, /* CS0: NOR 128M */ + <1 0 0x1c000000 0x01000000>; /* CS1: FRAM 16M */ nor@0,0 { reg = <0 0x00000000 0x08000000>; @@ -341,6 +342,34 @@ label = "data"; reg = <0x04000000 0x04000000>; /* 64MB */ }; + }; + + fram@1,0 { + reg = <1 0x00000000 0x01000000>; + bank-width = <2>; + + gpmc,mux-add-data = <2>; + + gpmc,sync-clk-ps = <0>; + gpmc,cs-on-ns = <0>; + gpmc,cs-rd-off-ns = <160>; + gpmc,cs-wr-off-ns = <160>; + gpmc,adv-on-ns = <10>; + gpmc,adv-rd-off-ns = <20>; + gpmc,adv-wr-off-ns = <20>; + gpmc,oe-on-ns = <30>; + gpmc,oe-off-ns = <150>; + gpmc,we-on-ns = <30>; + gpmc,we-off-ns = <150>; + gpmc,rd-cycle-ns = <160>; + gpmc,wr-cycle-ns = <160>; + gpmc,access-ns = <130>; + gpmc,page-burst-access-ns = <10>; + gpmc,cycle2cycle-samecsen; + gpmc,cycle2cycle-diffcsen; + gpmc,cycle2cycle-delay-ns = <10>; + gpmc,wr-data-mux-bus-ns = <30>; + gpmc,wr-access-ns = <0>; }; }; Copied: head/sys/gnu/dts/arm/am335x-pcm-953.dtsi (from r320128, vendor/device-tree/dist/src/arm/am335x-pcm-953.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-pcm-953.dtsi Tue Jun 20 03:13:49 2017 (r320130, copy of r320128, vendor/device-tree/dist/src/arm/am335x-pcm-953.dtsi) @@ -0,0 +1,288 @@ +/* + * Copyright (C) 2014-2017 Phytec Messtechnik GmbH + * Author: Wadim Egorov + * Teresa Remmet + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +/ { + model = "Phytec AM335x PCM-953"; + compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"; + + /* Power */ + regulators { + vcc3v3: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + vcc1v8: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + }; + + /* User IO */ + user_leds: user_leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_pins>; + + green { + label = "green:user"; + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "on"; + }; + + yellow { + label = "yellow:user"; + gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; + linux,default-trigger = "gpio"; + default-state = "on"; + }; + }; + + user_buttons: user_buttons { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&user_buttons_pins>; + + button@0 { + label = "home"; + linux,code = ; + gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>; + wakeup-source; + }; + + button@1 { + label = "menu"; + linux,code = ; + gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; + wakeup-source; + }; + + }; +}; + +&am33xx_pinmux { + user_buttons_pins: pinmux_user_buttons { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* emu0.gpio3_7 */ + AM33XX_IOPAD(0x9e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* emu1.gpio3_8 */ + >; + }; + + user_leds_pins: pinmux_user_leds { + pinctrl-single,pins = < + AM33XX_IOPAD(0x880, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.gpio1_30 */ + AM33XX_IOPAD(0x884, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.gpio1_31 */ + >; + }; +}; + +/* CAN */ +&am33xx_pinmux { + dcan1_pins: pinmux_dcan1 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_OUTPUT_PULLUP | MUX_MODE2) /* uart1_rxd.dcan1_tx_mux2 */ + AM33XX_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE2) /* uart1_txd.dcan1_rx_mux2 */ + >; + }; +}; + +&dcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&dcan1_pins>; + status = "okay"; +}; + +/* Ethernet */ +&am33xx_pinmux { + ethernet1_pins: pinmux_ethernet1 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ + AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ + AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ + AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ + AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ + AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ + AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ + AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ + >; + }; +}; + +&cpsw_emac1 { + phy-handle = <&phy1>; + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + status = "okay"; +}; + +&davinci_mdio { + phy1: ethernet-phy@2 { + reg = <2>; + + /* Register 260 (104h) – RGMII Clock and Control Pad Skew */ + rxc-skew-ps = <1400>; + rxdv-skew-ps = <0>; + txc-skew-ps = <1400>; + txen-skew-ps = <0>; + /* Register 261 (105h) – RGMII RX Data Pad Skew */ + rxd3-skew-ps = <0>; + rxd2-skew-ps = <0>; + rxd1-skew-ps = <0>; + rxd0-skew-ps = <0>; + /* Register 262 (106h) – RGMII TX Data Pad Skew */ + txd3-skew-ps = <0>; + txd2-skew-ps = <0>; + txd1-skew-ps = <0>; + txd0-skew-ps = <0>; + }; +}; + +&mac { + slaves = <2>; + pinctrl-names = "default"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 20 03:19:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F18EDD8C72D; Tue, 20 Jun 2017 03:19:55 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DFD436FF89; Tue, 20 Jun 2017 03:19:54 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id c0666cd9; Tue, 20 Jun 2017 05:19:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=i2g6vPF2o9w7gxc36SLMiQWa06g=; b=MliTg+maBno/1kR4q0/ATlttAEjn zeaqTTifd5BWrjEBoih6iwJoZbCCFb03ziHJlG1hYeetFrF4LIlWa4CU8St212Xj NOl6ZaCGohoB+BBb/fiWjbnM0UgNnyMJckSlHi4hUAp8KSB9V7Fr27oxXUl3z9Ps xIaKJTvKTyCYHss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=LzyVhvZL8IiFSiq850+60Vfav3Y/zqfaM/Azkdf/yPItEF1LbJ1bULHh 7TvD+cvkUeR8PnlvGziVMoGKAWlNqTT3ouWsNjASbV45LUPo1gLl8VR0g7N1X+cz dXAHuSJFMCbGcLdJm8x11Qx33CZ/a+lwhp44GE4igXyiC7pxXRA= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 5e2d8637 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 20 Jun 2017 05:19:45 +0200 (CEST) Date: Tue, 20 Jun 2017 05:19:42 +0200 From: Emmanuel Vadot To: Ngie Cooper Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320127 - in head: . share/mk Message-Id: <20170620051942.43ecc24549fd731bd3953c30@bidouilliste.com> In-Reply-To: <548AD276-E8A8-426B-81A2-FEE207D5D6FA@gmail.com> References: <201706200209.v5K29omh065613@repo.freebsd.org> <548AD276-E8A8-426B-81A2-FEE207D5D6FA@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:19:56 -0000 On Mon, 19 Jun 2017 20:08:08 -0700 Ngie Cooper wrote: > > > On Jun 19, 2017, at 19:09, Emmanuel Vadot wrote: > > > > Author: manu > > Date: Tue Jun 20 02:09:50 2017 > > New Revision: 320127 > > URL: https://svnweb.freebsd.org/changeset/base/320127 > > > > Log: > > Switch back to the BSDL DTC (Device Tree Compiler). > > The BSDL dtc has grown the needed features (overlays mostly) and is able to > > compile all of our base DTS. > > You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5) > > to specify an alternate location for the compiler to use. > > ... > > > +20170620: > > + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC > > + if you require the GPL compiler. > > "," should be "." > > src.conf should also be regenerated after this change. > > Cheers, > -Ngie Ah right, Should I do one commit or commiting src.conf.5 change should be in a separate commit ? -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Jun 20 03:35:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C3DD8D153; Tue, 20 Jun 2017 03:35:31 +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 C258B70E67; Tue, 20 Jun 2017 03:35:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id u62so13579992pgb.0; Mon, 19 Jun 2017 20:35:30 -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=mKMLMaq1uXbW1MkeEZTEBXsBUbvluAHhnNGx0Sjb9yg=; b=IZKSx3Me8I9/n84i53+laxya1LVMul7wnS+O2ZyZq0DBMrRq/DKCNMC2G3/PrWiH5G bzp4PVcrttDPJD/ub7MBSqYt+nj40nKC1A3HHBGv9QfzmRupI7NwTRdUbB5v8yfYmRqy Z9d8c1/orZbZrpMJq1cN1PVKdStLy+Xrw7XGC4Ydu0co1r4AUYoM4Eze/fABOYooV/i0 vv50VyQMtZ81Eo9FQrCZpdmtROLoVF/GbENQ2BfeRQoe26x6qE1ku0lrZX7kRZ40byki rBnNTlQLD7XuT+k7jT6AQqo4dr46thyPcl+u4/XZr3sADpbNhX342uml3qb2GlQfxrvd svvw== 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=mKMLMaq1uXbW1MkeEZTEBXsBUbvluAHhnNGx0Sjb9yg=; b=e/5L1wibpJ8OZJ4mSBkvX+r/0sI4+VmsESmJIrNMwdd/40I3mrOhpb+RAV4SKB0Nqt 4Gb3jcBzsbNR4qO3eZ5eUT9xrWfZ3zu2jJuL1B4HjayP5IJk5iqHcBbm7vGLY3pRRjNZ A9NBxMlRwtiEhmroaUKSWP1ld6AGEXI6XrptujEqE/nbsbObQWOO2x4tpsuIKtb83G3L 85kJjAtOcwFxr9LATs0Pt15b7qbNhYU0U8GrdvCfnAW9sQHqy4HlmYeoq8hvQFD4f5T/ fEjMw2dtgcB8BQOGkLyTSF6oZvey8vOYWrai0cjMBR7NkvxWthJgxH3i+5bONzHRguNp Mm/g== X-Gm-Message-State: AKS2vOw8TLRKgCcs3EHcDniOeLghtrrak2TaTRcsNWvEiBBIcW7z/9Je iWqlCzBhs3AuPFVyNzw= X-Received: by 10.101.72.207 with SMTP id o15mr29062371pgs.133.1497929730354; Mon, 19 Jun 2017 20:35:30 -0700 (PDT) Received: from ?IPv6:2607:fb90:834a:9ac8:dc52:1234:858b:2934? ([2607:fb90:834a:9ac8:dc52:1234:858b:2934]) by smtp.gmail.com with ESMTPSA id n26sm25506953pfj.114.2017.06.19.20.35.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 20:35:29 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320127 - in head: . share/mk From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <20170620051942.43ecc24549fd731bd3953c30@bidouilliste.com> Date: Mon, 19 Jun 2017 20:35:29 -0700 Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1B67B4F3-97BB-457D-BEA4-FFE07C7C588D@gmail.com> References: <201706200209.v5K29omh065613@repo.freebsd.org> <548AD276-E8A8-426B-81A2-FEE207D5D6FA@gmail.com> <20170620051942.43ecc24549fd731bd3953c30@bidouilliste.com> To: Emmanuel Vadot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:35:31 -0000 > On Jun 19, 2017, at 20:19, Emmanuel Vadot wrote: >=20 > On Mon, 19 Jun 2017 20:08:08 -0700 > Ngie Cooper wrote: >=20 >>=20 >>> On Jun 19, 2017, at 19:09, Emmanuel Vadot wrote: >>>=20 >>> Author: manu >>> Date: Tue Jun 20 02:09:50 2017 >>> New Revision: 320127 >>> URL: https://svnweb.freebsd.org/changeset/base/320127 >>>=20 >>> Log: >>> Switch back to the BSDL DTC (Device Tree Compiler). >>> The BSDL dtc has grown the needed features (overlays mostly) and is able= to >>> compile all of our base DTS. >>> You can use WITH_GPL_DTC is you need the GPL one or DTC=3D in make.conf(= 5) >>> to specify an alternate location for the compiler to use. >>=20 >> ... >>=20 >>> +20170620: >>> + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DT= C >>> + if you require the GPL compiler. >>=20 >> "," should be "." >>=20 >> src.conf should also be regenerated after this change. >>=20 >> Cheers, >> -Ngie >=20 > Ah right, > Should I do one commit or commiting src.conf.5 change should be in a > separate commit ? Same commit's fine :).. src.conf(5) is pretty much impossible to MFC without= dragging in unnecessary commits, so.. there's no real need to separate out t= he changes :).. > --=20 > Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Jun 20 03:41:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E5A6D8D536; Tue, 20 Jun 2017 03:41:07 +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 2EEBC71547; Tue, 20 Jun 2017 03:41:07 +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 v5K3f6lB007332; Tue, 20 Jun 2017 03:41:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K3f6HO007331; Tue, 20 Jun 2017 03:41:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200341.v5K3f6HO007331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 03:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320131 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:41:07 -0000 Author: manu Date: Tue Jun 20 03:41:06 2017 New Revision: 320131 URL: https://svnweb.freebsd.org/changeset/base/320131 Log: Remove some custom DTS files as we are using upstream ones. Deleted: head/sys/boot/fdt/dts/arm/bananapi.dts head/sys/boot/fdt/dts/arm/bananapim2.dts head/sys/boot/fdt/dts/arm/beaglebone-black.dts head/sys/boot/fdt/dts/arm/beaglebone-common.dtsi head/sys/boot/fdt/dts/arm/beaglebone.dts head/sys/boot/fdt/dts/arm/cubieboard.dts head/sys/boot/fdt/dts/arm/cubieboard2.dts head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts head/sys/boot/fdt/dts/arm/olinuxino-lime.dts head/sys/boot/fdt/dts/arm/pcduino3.dts From owner-svn-src-all@freebsd.org Tue Jun 20 03:44:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AE65D8D646; Tue, 20 Jun 2017 03:44:23 +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 CF53D717DC; Tue, 20 Jun 2017 03:44:22 +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 v5K3iLKm008366; Tue, 20 Jun 2017 03:44:21 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K3iLvA008363; Tue, 20 Jun 2017 03:44:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200344.v5K3iLvA008363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 03:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320132 - in head: . share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:44:23 -0000 Author: manu Date: Tue Jun 20 03:44:21 2017 New Revision: 320132 URL: https://svnweb.freebsd.org/changeset/base/320132 Log: Fix punctionation in UPDATING and regen src.conf after r320127 Reported by: ngie Modified: head/UPDATING head/share/man/man5/src.conf.5 Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jun 20 03:41:06 2017 (r320131) +++ head/UPDATING Tue Jun 20 03:44:21 2017 (r320132) @@ -52,7 +52,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** 20170620: - Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC + Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC if you require the GPL compiler. 20170618: Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Jun 20 03:41:06 2017 (r320131) +++ head/share/man/man5/src.conf.5 Tue Jun 20 03:44:21 2017 (r320132) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 8, 2017 +.Dd June 20, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -764,9 +764,9 @@ by linking against libgnuregex. Set to not build .Xr gpioctl 8 as part of the base system. -.It Va WITHOUT_GPL_DTC -Set to build the BSD licensed version of the device tree compiler rather -than the GPLed one from elinux.org. +.It Va WITH_GPL_DTC +Set to build the GPL'd version of the device tree compiler from elinux.org, +instead of the BSD licensed one. .It Va WITHOUT_GSSAPI Set to not build libgssapi. .It Va WITHOUT_HAST From owner-svn-src-all@freebsd.org Tue Jun 20 03:55:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59AD4D8DA75; Tue, 20 Jun 2017 03:55:23 +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 26FAB71DBA; Tue, 20 Jun 2017 03:55:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id e187so10522816pgc.3; Mon, 19 Jun 2017 20:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=nuev1KNtzEIfqteuEmZX4LeFauvXsr6Vfj9SELEmmbI=; b=OSeQBqXCW45wBKyZgDOxnsXXlkaaS3b+L4VUGU0Z+WCeeb2AtqM8YVs43O723hbqTz UJDLFyJNdX2+FG7gjPMVN5BfUbdo1T3tapYgXal1SlXoG3pw/ZbpaJ1hB2m1r5R1KlT3 t/cv25QbDnXVF3opLP3fl+IkoEZ2VEJAjAKtiFdq+b84FpkYPrHlaRfT6KbQPP2ZLZ+9 FSXxWe3rkXRsZGkDZQlILiogYJS/e0oGNC4j6jOpnokFZ8xM6h9/7QRAaF3msd26u/7V gCqTTJJ31Xs3dIYfFCV3pEXlhiv9SXEpYyMpRCxO0BbY6A/g7eVGihjKMcjU9FyaoxYR XO8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=nuev1KNtzEIfqteuEmZX4LeFauvXsr6Vfj9SELEmmbI=; b=lV8kFKgQuYNj1mAxIkZo4BTU079HabPPEFfVEfBs95XCgLbHAueBfK7cd7NRwyxF/h xD7R0eDJ78E7CW3PqiL+nZJeOEeXNYgbBkZczfUt48iz705BCZlcqdDBv9IQJ6+w9pyQ LSYqRFZssSN1CUbXRk3V5fo75zvpYY79o4G8DDoJ8fKl9w0XjaPl4cZFkNSploFPCbre IZUic/7E+/qX+cZEnklDbQIyLBXNfH2DHpJ3vu3fMOaBUrwDwrUes7nxdt2gg86Q4ops 6akSfA4B4DT9ZgQfpwR093DRIB7U+4OUNA8KjgMTOLsITHu9rgXQ4QXQCxBSvVxsyva3 MYKw== X-Gm-Message-State: AKS2vOxM8jmNQAeTPwxslZDvQhFpO3FESlAKCW07p8oabX7I1EXe3pqr r1Vlaj7jplPjrE53E1U= X-Received: by 10.98.202.210 with SMTP id y79mr29237767pfk.230.1497930922507; Mon, 19 Jun 2017 20:55:22 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f22sm23701922pfk.104.2017.06.19.20.55.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 20:55:21 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: <19F295CE-903C-42B7-BEC4-885CABA138C0@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_F9690D44-051C-41A0-A222-9700C6A13343"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320132 - in head: . share/man/man5 Date: Mon, 19 Jun 2017 20:55:17 -0700 In-Reply-To: <201706200344.v5K3iLvA008363@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Emmanuel Vadot References: <201706200344.v5K3iLvA008363@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 03:55:23 -0000 --Apple-Mail=_F9690D44-051C-41A0-A222-9700C6A13343 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 19, 2017, at 8:44 PM, Emmanuel Vadot wrote: > > Author: manu > Date: Tue Jun 20 03:44:21 2017 > New Revision: 320132 > URL: https://svnweb.freebsd.org/changeset/base/320132 > > Log: > Fix punctionation in UPDATING and regen src.conf after r320127 > > Reported by: ngie Thanks :)! -Ngie --Apple-Mail=_F9690D44-051C-41A0-A222-9700C6A13343 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZSJylAAoJEPWDqSZpMIYVm3gP/3WdJd8q39Fgzsm94BS7/51t gFyAX/zba0szGcTJOUsJyt8UKyodZvt4Ifp7AsbYZmFU1f2Vd6cpwUI85VnMDlsA K+lrge8gAQrcPReBmT9Oh0LM12pX/QQjXX54G6XBxKbYhlmXyrc5JRCMJu3WlJI7 PyMb/+Av5cH8GIn2Wr/9+VbE7br6XioHn+Vegw9UNsObB9ogLDOD/H69E1OLuyLy tNXvRgVNnkLSe8aSqCHvEJV6BJStmDu7HRMuS22tW5a7RcfLQYUaUOsncLU5lCPA 2MCiFTFtXL4Ct98ftXIAYi+X4gSCeR5ght3tehb+9LyPgvvTPD9pJFbDsS8rRK3r sesEimv3FdmxlADqCEdcg3vlAkguuW4Ylhg8+BIUxDEfY8pX6PTUMr8TcFr0Qikn r7F1CJ04sW5uqIVxkCOCXZpjwnGU8r8O5sSV+aRKUW8AZNzgH8PbvkqNeNRZJUCm VRxSuuIR1JmC18I0JOsIQzK+mc6FH67oMHqZYCqnszMMW1+kmCUTXOcqOVOOwk4n t0EdBVzt/YqinrwmKxHQGoNdUGPVEM3iTOmZ2Eg+AW54o2JZu723uaRtoGbS/OEe wGz1eDp6vJrSiMii4aHdcood0FGZxEtTZBTuBYSZ23tWJQyFiUTkE04WXdJRM/La cqHZGcHwGbwfDE1UJMd5 =qYlC -----END PGP SIGNATURE----- --Apple-Mail=_F9690D44-051C-41A0-A222-9700C6A13343-- From owner-svn-src-all@freebsd.org Tue Jun 20 04:58:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D1C2D8F7FD; Tue, 20 Jun 2017 04:58:14 +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 1D42773AE1; Tue, 20 Jun 2017 04:58:14 +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 v5K4wD8W037208; Tue, 20 Jun 2017 04:58:13 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K4wDss037207; Tue, 20 Jun 2017 04:58:13 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706200458.v5K4wDss037207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 04:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320133 - head/sys/modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 04:58:14 -0000 Author: manu Date: Tue Jun 20 04:58:12 2017 New Revision: 320133 URL: https://svnweb.freebsd.org/changeset/base/320133 Log: Add sun8i-h3-orangepi-one.dts to the build We support the board and have a u-boot port for it. Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Jun 20 03:44:21 2017 (r320132) +++ head/sys/modules/dtb/allwinner/Makefile Tue Jun 20 04:58:12 2017 (r320133) @@ -12,7 +12,8 @@ DTS= \ sun7i-a20-bananapi.dts \ sun7i-a20-cubieboard2.dts \ sun7i-a20-olimex-som-evb.dts \ - sun7i-a20-pcduino3.dts + sun7i-a20-pcduino3.dts \ + sun8i-h3-orangepi-one.dts LINKS= \ ${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \ From owner-svn-src-all@freebsd.org Tue Jun 20 05:57:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADBC2D9093C; Tue, 20 Jun 2017 05:57:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86B2175118; Tue, 20 Jun 2017 05:57:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K5vSZU061276; Tue, 20 Jun 2017 05:57:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K5vS9Z061274; Tue, 20 Jun 2017 05:57:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706200557.v5K5vS9Z061274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 20 Jun 2017 05:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320134 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 05:57:29 -0000 Author: ae Date: Tue Jun 20 05:57:28 2017 New Revision: 320134 URL: https://svnweb.freebsd.org/changeset/base/320134 Log: MFC r319895: Resurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib() with acquired RIB lock. This fixes a possible panic due to trying to acquire RIB rlock when it is already exclusive locked. PR: 215963, 215122 Sponsored by: Yandex LLC Approved by: re (delphij) Modified: stable/11/sys/net/route.c stable/11/sys/net/route.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/route.c ============================================================================== --- stable/11/sys/net/route.c Tue Jun 20 04:58:12 2017 (r320133) +++ stable/11/sys/net/route.c Tue Jun 20 05:57:28 2017 (r320134) @@ -454,18 +454,23 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long /* * Look up the address in the table for that Address Family */ - RIB_RLOCK(rh); + if ((ignflags & RTF_RNH_LOCKED) == 0) + RIB_RLOCK(rh); +#ifdef INVARIANTS + else + RIB_LOCK_ASSERT(rh); +#endif rn = rh->rnh_matchaddr(dst, &rh->head); if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { newrt = RNTORT(rn); RT_LOCK(newrt); RT_ADDREF(newrt); - RIB_RUNLOCK(rh); + if ((ignflags & RTF_RNH_LOCKED) == 0) + RIB_RUNLOCK(rh); return (newrt); - } else + } else if ((ignflags & RTF_RNH_LOCKED) == 0) RIB_RUNLOCK(rh); - /* * Either we hit the root or could not find any match, * which basically means: "cannot get there from here". @@ -748,7 +753,9 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst, if (ifa == NULL) ifa = ifa_ifwithnet(gateway, 0, fibnum); if (ifa == NULL) { - struct rtentry *rt = rtalloc1_fib(gateway, 0, 0, fibnum); + struct rtentry *rt; + + rt = rtalloc1_fib(gateway, 0, flags, fibnum); if (rt == NULL) return (NULL); /* @@ -1838,8 +1845,13 @@ rtrequest1_fib_change(struct rib_head *rnh, struct rt_ info->rti_info[RTAX_IFP] != NULL || (info->rti_info[RTAX_IFA] != NULL && !sa_equal(info->rti_info[RTAX_IFA], rt->rt_ifa->ifa_addr))) { - + /* + * XXX: Temporarily set RTF_RNH_LOCKED flag in the rti_flags + * to avoid rlock in the ifa_ifwithroute(). + */ + info->rti_flags |= RTF_RNH_LOCKED; error = rt_getifa_fib(info, fibnum); + info->rti_flags &= ~RTF_RNH_LOCKED; if (info->rti_ifa != NULL) free_ifa = 1; Modified: stable/11/sys/net/route.h ============================================================================== --- stable/11/sys/net/route.h Tue Jun 20 04:58:12 2017 (r320133) +++ stable/11/sys/net/route.h Tue Jun 20 05:57:28 2017 (r320134) @@ -189,7 +189,7 @@ struct rtentry { /* 0x8000000 and up unassigned */ #define RTF_STICKY 0x10000000 /* always route dst->src */ -#define RTF_RNH_LOCKED 0x40000000 /* unused */ +#define RTF_RNH_LOCKED 0x40000000 /* radix node head is locked */ #define RTF_GWFLAG_COMPAT 0x80000000 /* a compatibility bit for interacting with existing routing apps */ From owner-svn-src-all@freebsd.org Tue Jun 20 06:20:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13565D90EA7; Tue, 20 Jun 2017 06:20:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D296F75928; Tue, 20 Jun 2017 06:20:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K6K9Ol069631; Tue, 20 Jun 2017 06:20:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K6K96V069630; Tue, 20 Jun 2017 06:20:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706200620.v5K6K96V069630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Jun 2017 06:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320135 - head/usr.sbin/periodic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 06:20:11 -0000 Author: ngie Date: Tue Jun 20 06:20:09 2017 New Revision: 320135 URL: https://svnweb.freebsd.org/changeset/base/320135 Log: periodic(8): delete trailing whitespace MFC after: 1 month Modified: head/usr.sbin/periodic/periodic.sh Modified: head/usr.sbin/periodic/periodic.sh ============================================================================== --- head/usr.sbin/periodic/periodic.sh Tue Jun 20 05:57:28 2017 (r320134) +++ head/usr.sbin/periodic/periodic.sh Tue Jun 20 06:20:09 2017 (r320135) @@ -30,7 +30,7 @@ if [ $# -lt 1 ] ; then usage fi -# If possible, check the global system configuration file, +# If possible, check the global system configuration file, # to see if there are additional dirs to check if [ -r /etc/defaults/periodic.conf ]; then . /etc/defaults/periodic.conf @@ -43,7 +43,7 @@ export host # If we were called normally, then create a lock file for each argument # in turn and reinvoke ourselves with the LOCKED argument. This prevents # very long running jobs from being overlapped by another run as this is -# will lead the system running progressivly slower and more and more jobs +# will lead the system running progressivly slower and more and more jobs # are run at once. if [ $1 != "LOCKED" ]; then ret=0 @@ -102,7 +102,7 @@ case $arg in /*) if [ -d "$arg" ]; then dirlist="$arg" else - echo "$0: $arg not found" >&2 + echo "$0: $arg not found" >&2 continue fi ;; From owner-svn-src-all@freebsd.org Tue Jun 20 07:25:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 675D1D91AD9; Tue, 20 Jun 2017 07:25:39 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37527771BA; Tue, 20 Jun 2017 07:25:39 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K7PcWH097938; Tue, 20 Jun 2017 07:25:38 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K7PcmQ097937; Tue, 20 Jun 2017 07:25:38 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201706200725.v5K7PcmQ097937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Tue, 20 Jun 2017 07:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320136 - head/lib/libc/aarch64/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 07:25:39 -0000 Author: jasone Date: Tue Jun 20 07:25:38 2017 New Revision: 320136 URL: https://svnweb.freebsd.org/changeset/base/320136 Log: Decrease relative branch brittleness. Replace conditional branches with trampolines to unconditional branches when jumping to labels within other compilation units. This increases the offset range from +-1 MiB to +-128 MiB. Modified: head/lib/libc/aarch64/gen/sigsetjmp.S Modified: head/lib/libc/aarch64/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/aarch64/gen/sigsetjmp.S Tue Jun 20 06:20:09 2017 (r320135) +++ head/lib/libc/aarch64/gen/sigsetjmp.S Tue Jun 20 07:25:38 2017 (r320136) @@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$"); ENTRY(sigsetjmp) cmp x1, #0 - b.eq _C_LABEL(_setjmp) + b.eq 1f b _C_LABEL(setjmp) +1: + b _C_LABEL(_setjmp) END(sigsetjmp) ENTRY(siglongjmp) @@ -45,8 +47,10 @@ ENTRY(siglongjmp) /* Check the magic */ cmp x2, x3 - b.eq _C_LABEL(_longjmp) + b.eq 1f b _C_LABEL(longjmp) +1: + b _C_LABEL(_longjmp) .align 3 .Lmagic: .quad _JB_MAGIC__SETJMP From owner-svn-src-all@freebsd.org Tue Jun 20 07:36:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51446D91C74; Tue, 20 Jun 2017 07:36:25 +0000 (UTC) (envelope-from jasone@canonware.com) Received: from canonware.com (canonware.com [204.109.63.53]) (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 28AF577601; Tue, 20 Jun 2017 07:36:24 +0000 (UTC) (envelope-from jasone@canonware.com) Received: from maple (unknown [208.67.62.115]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTPSA id 170FC28A2C; Tue, 20 Jun 2017 00:36:18 -0700 (PDT) Date: Tue, 20 Jun 2017 00:36:16 -0700 From: Jason Evans To: Jason Evans Cc: Shawn Webb , Jason Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319971 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemalloc Message-Id: <20170620003616.d85c2fd028d40f2961282222@canonware.com> In-Reply-To: <20170616171544.9b4a398cac3328f9bd6cd747@canonware.com> References: <201706150715.v5F7F6aT031218@repo.freebsd.org> <20170616224517.td7yiahzv2oxcpts@mutt-hbsd> <20170616171544.9b4a398cac3328f9bd6cd747@canonware.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 07:36:25 -0000 On Fri, 16 Jun 2017 17:15:44 -0700 Jason Evans wrote: > On Fri, 16 Jun 2017 18:45:17 -0400 > Shawn Webb wrote: > > On Thu, Jun 15, 2017 at 07:15:06AM +0000, Jason Evans wrote: > > > Author: jasone > > > Date: Thu Jun 15 07:15:05 2017 > > > New Revision: 319971 > > > URL: https://svnweb.freebsd.org/changeset/base/319971 > > > > > > Log: > > > Update jemalloc to 5.0.0. > > > > This breaks buildworld for arm64: > > > > /usr/obj/arm64.aarch64/scratch/fbsd/tmp/usr/bin/ld: error: sigsetjmp.pico:(function sigsetjmp): relocation R_AARCH64_CONDBR19 out of range > > /usr/obj/arm64.aarch64/scratch/fbsd/tmp/usr/bin/ld: error: sigsetjmp.pico:(function siglongjmp): relocation R_AARCH64_CONDBR19 out of range > > cc: error: linker command failed with exit code 1 (use -v to see invocation) > > --- libc.so.7.full --- > > *** [libc.so.7.full] Error code 1 > > > > make[4]: stopped in /scratch/fbsd/lib/libc > > Indeed, this happens for me too with TARGET=arm64 TARGET_ARCH=aarch64. I haven't found anything specifically about this error message, but it looks vaguely like the amd64-specific messages that happen when trying to link non-PIC object files into a shared library. In src/lib/libc/aarch64/gen/sigsetjmp.S, we have two conditional jumps > > b.eq C_LABEL(_setjmp) > [...] > b.eq C_LABEL(_longjmp) > > Maybe there's a simple macro change that can make these relocatable jumps. Alternatively, we could probably simplify the code by merging setjmp.S and sigsetjmp.S, so that PC-relative jumps could be used. Given how arm handles similar branches, it seems like the correct fix would be to change these (and probably other branches) from e.g. b.eq _C_LABEL(_setjmp) to b.eq PIC_SYM(_C_LABEL(_setjmp), PLT) However, doing so triggers a clang crash. PIC_SYM is explicitly defined for aarch64, but is otherwise unused. It appears that we don't actually generate relocations, at least during initial linking. As a side effect, we have an implicit dependency on all of libc's dependent symbols serendipitously being within some limited range of each other. When using conditional branches, that range is +-1 MiB; for unconditional branches it is +-128 MiB. The jemalloc update changed libc's layout, and the conditional branches exceeded the +-1 MiB range. This latent bug is worked around in r320136, though it seems likely we have broader problems with how we build PIC libraries for arm64. Jason From owner-svn-src-all@freebsd.org Tue Jun 20 08:01:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C280ED923C2; Tue, 20 Jun 2017 08:01:14 +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 8E449780CA; Tue, 20 Jun 2017 08:01:14 +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 v5K81DS6012509; Tue, 20 Jun 2017 08:01:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K81DZ0012508; Tue, 20 Jun 2017 08:01:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706200801.v5K81DZ0012508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 08:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320137 - stable/10/lib/libpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:01:14 -0000 Author: avg Date: Tue Jun 20 08:01:13 2017 New Revision: 320137 URL: https://svnweb.freebsd.org/changeset/base/320137 Log: MFC r279833: Use the correct event table for Haswell Xeon events Modified: stable/10/lib/libpmc/libpmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Tue Jun 20 07:25:38 2017 (r320136) +++ stable/10/lib/libpmc/libpmc.c Tue Jun 20 08:01:13 2017 (r320137) @@ -341,7 +341,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); -PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell_xeon, iap); PMC_CLASS_TABLE_DESC(broadwell, IAP, broadwell, iap); PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap); From owner-svn-src-all@freebsd.org Tue Jun 20 08:03:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE09D92534; Tue, 20 Jun 2017 08:03:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 763E3782D8; Tue, 20 Jun 2017 08:03:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA17596; Tue, 20 Jun 2017 11:03:06 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dNE7u-000NPq-Ny; Tue, 20 Jun 2017 11:03:06 +0300 Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: Oliver Pinter , John Baldwin Cc: Randall Stewart , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> From: Andriy Gapon Message-ID: <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> Date: Tue, 20 Jun 2017 11:02:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:03:17 -0000 On 20/06/2017 01:37, Oliver Pinter wrote: > On 3/27/15, John Baldwin wrote: >> On 3/24/15 1:00 PM, Randall Stewart wrote: >>> Author: rrs >>> Date: Tue Mar 24 20:00:11 2015 >>> New Revision: 280455 >>> URL: https://svnweb.freebsd.org/changeset/base/280455 >>> >>> Log: >>> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >>> >>> Sponsored by: Netflix Inc. >>> >>> Added: >>> stable/10/usr.sbin/pmcstudy/ >>> - copied from r277177, head/usr.sbin/pmcstudy/ >>> Modified: >>> stable/10/lib/libpmc/libpmc.c >>> stable/10/sys/amd64/conf/GENERIC > > Hi! > > The MFC of 279833 was missing from this commit. I'm CCing avg@, since > he made a big bunch of hwpmc related MFCs yesterday. I've just merged that commit. Thank you all. >> >> The change to GENERIC looks like it slipped in by accident? Neither of the >> commits to HEAD enabled hwpmc in GENERIC AFAICT. -- Andriy Gapon From owner-svn-src-all@freebsd.org Tue Jun 20 08:03:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F83FD92594; Tue, 20 Jun 2017 08:03:52 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC5A78403; Tue, 20 Jun 2017 08:03:51 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K83pBm014230; Tue, 20 Jun 2017 08:03:51 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K83o6P014228; Tue, 20 Jun 2017 08:03:50 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201706200803.v5K83o6P014228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 20 Jun 2017 08:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320138 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:03:52 -0000 Author: smh Date: Tue Jun 20 08:03:50 2017 New Revision: 320138 URL: https://svnweb.freebsd.org/changeset/base/320138 Log: Fixed bsdinstall location of vfs.zfs.min_auto_ashift vfs.zfs.min_auto_ashift is a sysctl only not a tunable so updated bsdinstall to use the correct location /etc/sysctl.conf instead of /boot/loader.conf Reported by: Aaron Caza Reviewed by: allanjude MFC after: 2 days Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D11278 Modified: head/usr.sbin/bsdinstall/scripts/config head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Tue Jun 20 08:01:13 2017 (r320137) +++ head/usr.sbin/bsdinstall/scripts/config Tue Jun 20 08:03:50 2017 (r320138) @@ -32,7 +32,7 @@ cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* -cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.hardening >> $BSDINSTALL_TMPETC/sysctl.conf +cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.* >> $BSDINSTALL_TMPETC/sysctl.conf rm $BSDINSTALL_TMPETC/sysctl.conf.* cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Tue Jun 20 08:01:13 2017 (r320137) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Tue Jun 20 08:03:50 2017 (r320138) @@ -1446,7 +1446,7 @@ zfs_create_boot() if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then f_eval_catch $funcname echo "$ECHO_APPEND" \ 'vfs.zfs.min_auto_ashift=12' \ - $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE + $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE fi if [ "$ZFSBOOT_SWAP_MIRROR" ]; then From owner-svn-src-all@freebsd.org Tue Jun 20 11:09:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB34D95A07; Tue, 20 Jun 2017 11:09:39 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADC87D41E; Tue, 20 Jun 2017 11:09:39 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KB9cBk086956; Tue, 20 Jun 2017 11:09:38 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KB9cmU086955; Tue, 20 Jun 2017 11:09:38 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706201109.v5KB9cmU086955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 20 Jun 2017 11:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320141 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:09:39 -0000 Author: zbb Date: Tue Jun 20 11:09:38 2017 New Revision: 320141 URL: https://svnweb.freebsd.org/changeset/base/320141 Log: Implement workaround for Armada 38X family HW issue between CPU and devices There is a hardware problem between Cortex-A9 CPUs and on-chip devices in Armada 38X SoCs that may cause hang on heavy load. This can be however worked around by mapping all registers and PCI IO as strongly ordered instead of device memory. Submitted by: Zbigniew Bodek Reviewed by: mmel Tested by: mw_semihalf.com Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D10218 Modified: head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Tue Jun 20 08:44:03 2017 (r320140) +++ head/sys/arm/mv/mv_machdep.c Tue Jun 20 11:09:38 2017 (r320141) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #else #include +#include #endif #include /* XXX */ @@ -257,6 +258,15 @@ platform_late_init(void) #endif #if defined(SOC_MV_ARMADA38X) + /* + * Workaround for Marvell Armada38X family HW issue + * between Cortex-A9 CPUs and on-chip devices that may + * cause hang on heavy load. + * To avoid that, map all registers including PCIe IO + * as strongly ordered instead of device memory. + */ + pmap_remap_vm_attr(PTE2_ATTR_DEVICE, PTE2_ATTR_SO); + /* Set IO Sync Barrier bit for all Mbus devices */ if (armada38x_win_set_iosync_barrier() != 0) printf("WARNING: could not map CPU Subsystem registers\n"); From owner-svn-src-all@freebsd.org Tue Jun 20 11:11:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC9C3D95BDB; Tue, 20 Jun 2017 11:11:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C1DF7D826; Tue, 20 Jun 2017 11:11:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KBBgHQ088704; Tue, 20 Jun 2017 11:11:42 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KBBg3i088703; Tue, 20 Jun 2017 11:11:42 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706201111.v5KBBg3i088703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 20 Jun 2017 11:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320142 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:11:43 -0000 Author: zbb Date: Tue Jun 20 11:11:42 2017 New Revision: 320142 URL: https://svnweb.freebsd.org/changeset/base/320142 Log: Disable PL310 outer cache sync for IO coherent platforms When a PL310 cache is used on a system that provides hardware coherency, the outer cache sync operation is useless, and can be skipped. Moreover, on some systems, it is harmful as it causes deadlocks between the Marvell coherency mechanism, the Marvell PCIe or Crypto controllers and the Cortex-A9. To avoid this, this commit introduces a new Device Tree property 'arm,io-coherent' for the L2 cache controller node, valid only for the PL310 cache. It identifies the usage of the PL310 cache in an I/O coherent configuration. Internally, it makes the driver disable the outer cache sync operation. Note, that other outer-cache operations are not removed, as they may be needed for certain situations, such as booting secondary CPUs. Moreover, in order to enable IO coherent operation, the decision whether to use L2 cache maintenance callbacks is done in busdma layer, which was enabled in one of the previous commits. Submitted by: Michal Mazur Marcin Wojtas Reviewed by: mmel Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D11245 Modified: head/sys/arm/arm/pl310.c head/sys/arm/include/pl310.h Modified: head/sys/arm/arm/pl310.c ============================================================================== --- head/sys/arm/arm/pl310.c Tue Jun 20 11:09:38 2017 (r320141) +++ head/sys/arm/arm/pl310.c Tue Jun 20 11:11:42 2017 (r320142) @@ -206,6 +206,10 @@ pl310_cache_sync(void) if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) return; + /* Do not sync outer cache on IO coherent platform */ + if (pl310_softc->sc_io_coherent) + return; + #ifdef PL310_ERRATA_753970 if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) /* Write uncached PL310 register */ @@ -444,6 +448,7 @@ pl310_attach(device_t dev) struct pl310_softc *sc = device_get_softc(dev); int rid; uint32_t cache_id, debug_ctrl; + phandle_t node; sc->sc_dev = dev; rid = 0; @@ -469,6 +474,15 @@ pl310_attach(device_t dev) device_printf(dev, "Part number: 0x%x, release: 0x%x\n", (cache_id >> CACHE_ID_PARTNUM_SHIFT) & CACHE_ID_PARTNUM_MASK, (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK); + + /* + * Test for "arm,io-coherent" property and disable sync operation if + * platform is I/O coherent. Outer sync operations are not needed + * on coherent platform and may be harmful in certain situations. + */ + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "arm,io-coherent")) + sc->sc_io_coherent = true; /* * If L2 cache is already enabled then something has violated the rules, Modified: head/sys/arm/include/pl310.h ============================================================================== --- head/sys/arm/include/pl310.h Tue Jun 20 11:09:38 2017 (r320141) +++ head/sys/arm/include/pl310.h Tue Jun 20 11:11:42 2017 (r320142) @@ -148,6 +148,7 @@ struct pl310_softc { struct mtx sc_mtx; u_int sc_rtl_revision; struct intr_config_hook *sc_ich; + boolean_t sc_io_coherent; }; /** From owner-svn-src-all@freebsd.org Tue Jun 20 12:31:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70C96D97A6A; Tue, 20 Jun 2017 12:31:59 +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 3F7007FE9C; Tue, 20 Jun 2017 12:31:59 +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 v5KCVwqM023348; Tue, 20 Jun 2017 12:31:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KCVw9H023347; Tue, 20 Jun 2017 12:31:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706201231.v5KCVw9H023347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 20 Jun 2017 12:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320143 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 12:31:59 -0000 Author: cy Date: Tue Jun 20 12:31:58 2017 New Revision: 320143 URL: https://svnweb.freebsd.org/changeset/base/320143 Log: Flag poolnodecommand() (ippool -a and ippool -r) command line syntax errors. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Tue Jun 20 11:11:42 2017 (r320142) +++ head/contrib/ipfilter/tools/ippool.c Tue Jun 20 12:31:58 2017 (r320143) @@ -210,7 +210,13 @@ poolnodecommand(remove, argc, argv) case 'v' : opts |= OPT_VERBOSE; break; + default : + usage(argv[0]); + break; /* keep compiler happy */ } + + if (argc - 1 - optind > 0) + usage(argv[0]); if (argv[optind] != NULL && ipset == 0) { if (setnodeaddr(type, role, ptr, argv[optind]) == 0) From owner-svn-src-all@freebsd.org Tue Jun 20 12:40:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2B41D97C89; Tue, 20 Jun 2017 12:40:26 +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 AFF89800F2; Tue, 20 Jun 2017 12:40:26 +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 v5KCePcf023686; Tue, 20 Jun 2017 12:40:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KCePoR023685; Tue, 20 Jun 2017 12:40:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706201240.v5KCePoR023685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Jun 2017 12:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320144 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 12:40:27 -0000 Author: kib Date: Tue Jun 20 12:40:25 2017 New Revision: 320144 URL: https://svnweb.freebsd.org/changeset/base/320144 Log: MFC r319916: Remove stray return. Approved by: re (marius) Modified: stable/11/sys/kern/subr_prf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_prf.c ============================================================================== --- stable/11/sys/kern/subr_prf.c Tue Jun 20 12:31:58 2017 (r320143) +++ stable/11/sys/kern/subr_prf.c Tue Jun 20 12:40:25 2017 (r320144) @@ -377,7 +377,6 @@ log_console(struct uio *uio) msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); - return; } int From owner-svn-src-all@freebsd.org Tue Jun 20 14:28:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43524D99E08; Tue, 20 Jun 2017 14:28:53 +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 0BCD684CCF; Tue, 20 Jun 2017 14:28:52 +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 v5KESqVW071740; Tue, 20 Jun 2017 14:28:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KESpZe071732; Tue, 20 Jun 2017 14:28:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706201428.v5KESpZe071732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 20 Jun 2017 14:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320145 - in head/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 14:28:53 -0000 Author: pfg Date: Tue Jun 20 14:28:51 2017 New Revision: 320145 URL: https://svnweb.freebsd.org/changeset/base/320145 Log: ext2fs: Add uninit_bg feature support. From the linux tune2fs(8) manpage: "Allow the kernel to initialize bitmaps and inode tables and keep a high watermark for the unused inodes in a filesystem, to reduce e2fsck(8) time. This first e2fsck run after enabling this feature will take the full time, but subsequent e2fsck runs will take only a fraction of the original time, depending on how full the file system is." Submitted by: Fedor Uporov Differential Revision: https://reviews.freebsd.org/D11211 Added: head/sys/fs/ext2fs/ext2_csum.c (contents, props changed) Modified: head/sys/conf/files head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_extern.h head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2fs.h head/sys/modules/ext2fs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/conf/files Tue Jun 20 14:28:51 2017 (r320145) @@ -3532,6 +3532,7 @@ fs/ext2fs/ext2_acl.c optional ext2fs fs/ext2fs/ext2_alloc.c optional ext2fs fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs +fs/ext2fs/ext2_csum.c optional ext2fs fs/ext2fs/ext2_extattr.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/fs/ext2fs/ext2_alloc.c Tue Jun 20 14:28:51 2017 (r320145) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -657,6 +658,135 @@ ext2_hashalloc(struct inode *ip, int cg, long pref, in return (0); } +static unsigned long +ext2_cg_num_gdb(struct m_ext2fs *fs, int cg) +{ + int gd_per_block, metagroup, first, last; + + gd_per_block = fs->e2fs_bsize / sizeof(struct ext2_gd); + metagroup = cg / gd_per_block; + first = metagroup * gd_per_block; + last = first + gd_per_block - 1; + + if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_META_BG) || + metagroup < fs->e2fs->e3fs_first_meta_bg) { + if (!ext2_cg_has_sb(fs, cg)) + return (0); + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_META_BG)) + return (fs->e2fs->e3fs_first_meta_bg); + return (fs->e2fs_gdbcount); + } + + if (cg == first || cg == first + 1 || cg == last) + return (1); + return (0); + +} + +static int +ext2_num_base_meta_blocks(struct m_ext2fs *fs, int cg) +{ + int num, gd_per_block; + + gd_per_block = fs->e2fs_bsize / sizeof(struct ext2_gd); + num = ext2_cg_has_sb(fs, cg); + + if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_META_BG) || + cg < fs->e2fs->e3fs_first_meta_bg * gd_per_block) { + if (num) { + num += ext2_cg_num_gdb(fs, cg); + num += fs->e2fs->e2fs_reserved_ngdb; + } + } else { + num += ext2_cg_num_gdb(fs, cg); + } + + return (num); +} + +static int +ext2_get_cg_number(struct m_ext2fs *fs, daddr_t blk) +{ + int cg; + + if (fs->e2fs->e2fs_bpg == fs->e2fs_bsize * 8) + cg = (blk - fs->e2fs->e2fs_first_dblock) / (fs->e2fs_bsize * 8); + else + cg = blk - fs->e2fs->e2fs_first_dblock; + + return (cg); +} + +static void +ext2_mark_bitmap_end(int start_bit, int end_bit, char *bitmap) +{ + int i; + + if (start_bit >= end_bit) + return; + + for (i = start_bit; i < ((start_bit + 7) & ~7UL); i++) + setbit(bitmap, i); + if (i < end_bit) + memset(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3); +} + +static int +ext2_cg_block_bitmap_init(struct m_ext2fs *fs, int cg, struct buf *bp) +{ + int bit, bit_max, inodes_per_block; + uint32_t start, tmp; + + if (!EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) || + !(fs->e2fs_gd[cg].ext4bgd_flags & EXT2_BG_BLOCK_UNINIT)) + return (0); + + memset(bp->b_data, 0, fs->e2fs_bsize); + + bit_max = ext2_num_base_meta_blocks(fs, cg); + if ((bit_max >> 3) >= fs->e2fs_bsize) + return (EINVAL); + + for (bit = 0; bit < bit_max; bit++) + setbit(bp->b_data, bit); + + start = cg * fs->e2fs->e2fs_bpg + fs->e2fs->e2fs_first_dblock; + + /* Set bits for block and inode bitmaps, and inode table */ + tmp = fs->e2fs_gd[cg].ext2bgd_b_bitmap; + if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || + tmp == ext2_get_cg_number(fs, cg)) + setbit(bp->b_data, tmp - start); + + tmp = fs->e2fs_gd[cg].ext2bgd_i_bitmap; + if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || + tmp == ext2_get_cg_number(fs, cg)) + setbit(bp->b_data, tmp - start); + + tmp = fs->e2fs_gd[cg].ext2bgd_i_tables; + inodes_per_block = fs->e2fs_bsize/EXT2_INODE_SIZE(fs); + while( tmp < fs->e2fs_gd[cg].ext2bgd_i_tables + + fs->e2fs->e2fs_ipg / inodes_per_block ) { + if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || + tmp == ext2_get_cg_number(fs, cg)) + setbit(bp->b_data, tmp - start); + tmp++; + } + + /* + * Also if the number of blocks within the group is less than + * the blocksize * 8 ( which is the size of bitmap ), set rest + * of the block bitmap to 1 + */ + ext2_mark_bitmap_end(fs->e2fs->e2fs_bpg, fs->e2fs_bsize * 8, + bp->b_data); + + /* Clean the flag */ + fs->e2fs_gd[cg].ext4bgd_flags &= ~EXT2_BG_BLOCK_UNINIT; + + return (0); +} + /* * Determine whether a block can be allocated. * @@ -686,6 +816,14 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, EXT2_LOCK(ump); return (0); } + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) { + error = ext2_cg_block_bitmap_init(fs, cg, bp); + if (error) { + brelse(bp); + EXT2_LOCK(ump); + return (0); + } + } if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0) { /* * Another thread allocated the last block in this @@ -899,6 +1037,41 @@ fail: return (0); } +static int +ext2_zero_inode_table(struct inode *ip, int cg) +{ + struct m_ext2fs *fs; + struct buf *bp; + int i, all_blks, used_blks; + + fs = ip->i_e2fs; + + if (fs->e2fs_gd[cg].ext4bgd_flags & EXT2_BG_INODE_ZEROED) + return (0); + + all_blks = fs->e2fs->e2fs_inode_size * fs->e2fs->e2fs_ipg / + fs->e2fs_bsize; + + used_blks = howmany(fs->e2fs->e2fs_ipg - + fs->e2fs_gd[cg].ext4bgd_i_unused, + fs->e2fs_bsize / EXT2_INODE_SIZE(fs)); + + for (i = 0; i < all_blks - used_blks; i++) { + bp = getblk(ip->i_devvp, fsbtodb(fs, + fs->e2fs_gd[cg].ext2bgd_i_tables + used_blks + i), + fs->e2fs_bsize, 0, 0, 0); + if (!bp) + return (EIO); + + vfs_bio_bzero_buf(bp, 0, fs->e2fs_bsize); + bawrite(bp); + } + + fs->e2fs_gd[cg].ext4bgd_flags |= EXT2_BG_INODE_ZEROED; + + return (0); +} + /* * Determine whether an inode can be allocated. * @@ -930,6 +1103,18 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr EXT2_LOCK(ump); return (0); } + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) { + if (fs->e2fs_gd[cg].ext4bgd_flags & EXT2_BG_INODE_UNINIT) { + memset(bp->b_data, 0, fs->e2fs_bsize); + fs->e2fs_gd[cg].ext4bgd_flags &= ~EXT2_BG_INODE_UNINIT; + } + error = ext2_zero_inode_table(ip, cg); + if (error) { + brelse(bp); + EXT2_LOCK(ump); + return (0); + } + } if (fs->e2fs_gd[cg].ext2bgd_nifree == 0) { /* * Another thread allocated the last i-node in this @@ -964,6 +1149,8 @@ gotit: setbit(ibp, ipref); EXT2_LOCK(ump); fs->e2fs_gd[cg].ext2bgd_nifree--; + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) + fs->e2fs_gd[cg].ext4bgd_i_unused--; fs->e2fs->e2fs_ficount--; fs->e2fs_fmod = 1; if ((mode & IFMT) == IFDIR) { @@ -1062,6 +1249,8 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) EXT2_LOCK(ump); fs->e2fs->e2fs_ficount++; fs->e2fs_gd[cg].ext2bgd_nifree++; + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) + fs->e2fs_gd[cg].ext4bgd_i_unused++; if ((mode & IFMT) == IFDIR) { fs->e2fs_gd[cg].ext2bgd_ndirs--; fs->e2fs_total_dir--; @@ -1122,16 +1311,31 @@ ext2_fserr(struct m_ext2fs *fs, uid_t uid, char *cp) } int -cg_has_sb(int i) +ext2_cg_has_sb(struct m_ext2fs *fs, int cg) { int a3, a5, a7; - if (i == 0 || i == 1) - return 1; + if (cg == 0) + return (1); + + if (EXT2_HAS_COMPAT_FEATURE(fs, EXT2F_COMPAT_SPARSESUPER2)) { + if (cg == fs->e2fs->e4fs_backup_bgs[0] || + cg == fs->e2fs->e4fs_backup_bgs[1]) + return (1); + return (0); + } + + if ((cg <= 1) || + !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_SPARSESUPER)) + return (1); + + if (!(cg & 1)) + return (0); + for (a3 = 3, a5 = 5, a7 = 7; - a3 <= i || a5 <= i || a7 <= i; + a3 <= cg || a5 <= cg || a7 <= cg; a3 *= 3, a5 *= 5, a7 *= 7) - if (i == a3 || i == a5 || i == a7) - return 1; - return 0; + if (cg == a3 || cg == a5 || cg == a7) + return (1); + return (0); } Added: head/sys/fs/ext2fs/ext2_csum.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/ext2fs/ext2_csum.c Tue Jun 20 14:28:51 2017 (r320145) @@ -0,0 +1,147 @@ +/*- + * Copyright (c) 2017, Fedor Uporov + * 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static uint16_t +ext2_crc16(uint16_t crc, const void *buffer, unsigned int len) +{ + const unsigned char *cp = buffer; + /* CRC table for the CRC-16. The poly is 0x8005 (x16 + x15 + x2 + 1). */ + static uint16_t const crc16_table[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + }; + + while (len--) + crc = (((crc >> 8) & 0xffU) ^ + crc16_table[(crc ^ *cp++) & 0xffU]) & 0x0000ffffU; + return crc; +} + +static uint16_t +ext2_gd_csum(struct m_ext2fs *fs, uint32_t block_group, struct ext2_gd *gd) +{ + size_t offset; + uint16_t crc; + + offset = offsetof(struct ext2_gd, ext4bgd_csum); + + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) { + crc = ext2_crc16(~0, fs->e2fs->e2fs_uuid, + sizeof(fs->e2fs->e2fs_uuid)); + crc = ext2_crc16(crc, (uint8_t *)&block_group, + sizeof(block_group)); + crc = ext2_crc16(crc, (uint8_t *)gd, offset); + offset += sizeof(gd->ext4bgd_csum); /* skip checksum */ + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT) && + offset < fs->e2fs->e3fs_desc_size) + crc = ext2_crc16(crc, (uint8_t *)gd + offset, + fs->e2fs->e3fs_desc_size - offset); + return (crc); + } + + return (0); +} + +int +ext2_gd_csum_verify(struct m_ext2fs *fs, struct cdev *dev) +{ + unsigned int i; + int error = 0; + + for (i = 0; i < fs->e2fs_gcount; i++) { + if (fs->e2fs_gd[i].ext4bgd_csum != + ext2_gd_csum(fs, i, &fs->e2fs_gd[i])) { + printf( +"WARNING: mount of %s denied due bad gd=%d csum=0x%x, expected=0x%x - run fsck\n", + devtoname(dev), i, fs->e2fs_gd[i].ext4bgd_csum, + ext2_gd_csum(fs, i, &fs->e2fs_gd[i])); + error = EINVAL; + break; + } + } + + return (error); +} + +void +ext2_gd_csum_set(struct m_ext2fs *fs) +{ + unsigned int i; + + for (i = 0; i < fs->e2fs_gcount; i++) + fs->e2fs_gd[i].ext4bgd_csum = + ext2_gd_csum(fs, i, &fs->e2fs_gd[i]); +} Modified: head/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extern.h Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/fs/ext2fs/ext2_extern.h Tue Jun 20 14:28:51 2017 (r320145) @@ -85,7 +85,7 @@ int ext2_dirrewrite(struct inode *, struct inode *, struct componentname *); int ext2_dirempty(struct inode *, ino_t, struct ucred *); int ext2_checkpath(struct inode *, struct inode *, struct ucred *); -int cg_has_sb(int i); +int ext2_cg_has_sb(struct m_ext2fs *fs, int cg); int ext2_inactive(struct vop_inactive_args *); int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *, struct componentname *); @@ -98,6 +98,8 @@ int ext2_htree_lookup(struct inode *, const char *, in int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); +int ext2_gd_csum_verify(struct m_ext2fs *fs, struct cdev *dev); +void ext2_gd_csum_set(struct m_ext2fs *fs); /* Flags to low-level allocation routines. Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/fs/ext2fs/ext2_vfsops.c Tue Jun 20 14:28:51 2017 (r320145) @@ -349,6 +349,13 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es printf("ext2fs: no space for extra inode timestamps\n"); return (EINVAL); } + /* Check for group descriptor size */ + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT) && + (es->e3fs_desc_size != sizeof(struct ext2_gd))) { + printf("ext2fs: group descriptor size unsupported %d\n", + es->e3fs_desc_size); + return (EINVAL); + } fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs); fs->e2fs_itpg = fs->e2fs_ipg / fs->e2fs_ipb; @@ -387,6 +394,12 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es brelse(bp); bp = NULL; } + /* Verify cg csum */ + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) { + error = ext2_gd_csum_verify(fs, devvp->v_rdev); + if (error) + return (error); + } /* Initialization for the ext2 Orlov allocator variant. */ fs->e2fs_total_dir = 0; for (i = 0; i < fs->e2fs_gcount; i++) @@ -781,7 +794,7 @@ ext2_statfs(struct mount *mp, struct statfs *sbp) if (fs->e2fs->e2fs_rev > E2FS_REV0 && fs->e2fs->e2fs_features_rocompat & EXT2F_ROCOMPAT_SPARSESUPER) { for (i = 0, ngroups = 0; i < fs->e2fs_gcount; i++) { - if (cg_has_sb(i)) + if (ext2_cg_has_sb(fs, i)) ngroups++; } } else { @@ -1062,6 +1075,11 @@ ext2_cgupdate(struct ext2mount *mp, int waitfor) int i, error = 0, allerror = 0; allerror = ext2_sbupdate(mp, waitfor); + + /* Update gd csums */ + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) + ext2_gd_csum_set(fs); + for (i = 0; i < fs->e2fs_gdbcount; i++) { bp = getblk(mp->um_devvp, fsbtodb(fs, fs->e2fs->e2fs_first_dblock + Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:28:51 2017 (r320145) @@ -259,6 +259,7 @@ struct csum { #define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ + EXT2F_ROCOMPAT_GDT_CSUM | \ EXT2F_ROCOMPAT_HUGE_FILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE @@ -293,6 +294,10 @@ struct csum { */ #define E2FS_SIGNED_HASH 0x0001 #define E2FS_UNSIGNED_HASH 0x0002 + +#define EXT2_BG_INODE_UNINIT 0x0001 /* Inode table/bitmap not in use */ +#define EXT2_BG_BLOCK_UNINIT 0x0002 /* Block bitmap not in use */ +#define EXT2_BG_INODE_ZEROED 0x0004 /* On-disk itable initialized to zero */ /* ext2 file system block group descriptor */ Modified: head/sys/modules/ext2fs/Makefile ============================================================================== --- head/sys/modules/ext2fs/Makefile Tue Jun 20 12:40:25 2017 (r320144) +++ head/sys/modules/ext2fs/Makefile Tue Jun 20 14:28:51 2017 (r320145) @@ -3,8 +3,9 @@ .PATH: ${SRCTOP}/sys/fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ - ext2_acl.c ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extattr.c \ - ext2_extents.c ext2_hash.c ext2_htree.c ext2_inode.c ext2_inode_cnv.c \ - ext2_lookup.c ext2_subr.c ext2_vfsops.c ext2_vnops.c + ext2_acl.c ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_csum.c \ + ext2_extattr.c ext2_extents.c ext2_hash.c ext2_htree.c \ + ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ + ext2_vfsops.c ext2_vnops.c .include From owner-svn-src-all@freebsd.org Tue Jun 20 14:35:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F274D9A0CC; Tue, 20 Jun 2017 14:35:20 +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 5F8B15FA; Tue, 20 Jun 2017 14:35:20 +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 v5KEZJdo075724; Tue, 20 Jun 2017 14:35:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KEZJdr075723; Tue, 20 Jun 2017 14:35:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706201435.v5KEZJdr075723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 20 Jun 2017 14:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320146 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 14:35:20 -0000 Author: pfg Date: Tue Jun 20 14:35:19 2017 New Revision: 320146 URL: https://svnweb.freebsd.org/changeset/base/320146 Log: Improve grammar concerning "metadata". Remove unnecessary space while here. Modified: head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:28:51 2017 (r320145) +++ head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:35:19 2017 (r320146) @@ -316,9 +316,8 @@ struct ext2_gd { uint16_t ext4bgd_csum; /* group descriptor checksum */ }; - -/* EXT2FS metadatas are stored in little-endian byte order. These macros - * helps reading these metadatas +/* EXT2FS metadata is stored in little-endian byte order. These macros + * helps reading them. */ #define e2fs_cgload(old, new, size) memcpy((new), (old), (size)); From owner-svn-src-all@freebsd.org Tue Jun 20 15:03:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB614D9A9FC; Tue, 20 Jun 2017 15:03: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 7B2E41A08; Tue, 20 Jun 2017 15:03: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 v5KF2xw8088506; Tue, 20 Jun 2017 15:02:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KF2xVt088505; Tue, 20 Jun 2017 15:02:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706201502.v5KF2xVt088505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Jun 2017 15:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320147 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:03:00 -0000 Author: kib Date: Tue Jun 20 15:02:59 2017 New Revision: 320147 URL: https://svnweb.freebsd.org/changeset/base/320147 Log: MFC r319916: Remove stray return. Modified: stable/10/sys/kern/subr_prf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Tue Jun 20 14:35:19 2017 (r320146) +++ stable/10/sys/kern/subr_prf.c Tue Jun 20 15:02:59 2017 (r320147) @@ -374,7 +374,6 @@ log_console(struct uio *uio) msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); - return; } int From owner-svn-src-all@freebsd.org Tue Jun 20 15:10:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D47D9AB11; Tue, 20 Jun 2017 15:10:15 +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 263451D87; Tue, 20 Jun 2017 15:10:15 +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 v5KFAEIF089064; Tue, 20 Jun 2017 15:10:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFAE9g089063; Tue, 20 Jun 2017 15:10:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201510.v5KFAE9g089063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320148 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:10:15 -0000 Author: jhb Date: Tue Jun 20 15:10:14 2017 New Revision: 320148 URL: https://svnweb.freebsd.org/changeset/base/320148 Log: MFC 318996: Add descriptions for AES-GCM IPSec authentication (AH) counters. Approved by: re (gjb) Sponsored by: Chelsio Communications Modified: stable/11/usr.bin/netstat/ipsec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/ipsec.c ============================================================================== --- stable/11/usr.bin/netstat/ipsec.c Tue Jun 20 15:02:59 2017 (r320147) +++ stable/11/usr.bin/netstat/ipsec.c Tue Jun 20 15:10:14 2017 (r320148) @@ -141,6 +141,15 @@ static struct val2str ipsec_ahnames[] = { #ifdef SADB_X_AALG_AES_XCBC_MAC { SADB_X_AALG_AES_XCBC_MAC, "aes-xcbc-mac", }, #endif +#ifdef SADB_X_AALG_AES128GMAC + { SADB_X_AALG_AES128GMAC, "aes-gmac-128", }, +#endif +#ifdef SADB_X_AALG_AES192GMAC + { SADB_X_AALG_AES192GMAC, "aes-gmac-192", }, +#endif +#ifdef SADB_X_AALG_AES256GMAC + { SADB_X_AALG_AES256GMAC, "aes-gmac-256", }, +#endif { -1, NULL }, }; From owner-svn-src-all@freebsd.org Tue Jun 20 15:37:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EF76D9B3E3; Tue, 20 Jun 2017 15:37:40 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::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 EE2432F37; Tue, 20 Jun 2017 15:37:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qt0-x22d.google.com with SMTP id u19so136465957qta.3; Tue, 20 Jun 2017 08:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=EXQ2NlJEphWWI0j/ir11YUa87Zm1gmwyaVm5kWN7vQg=; b=Z5eBqlVDjCVMr6OtPoBNwTXOEKTyqPddDFlcgeypYcgxKIt7IeAwSTrDhmcBqRuEh7 DKcuiOAq6HFsWifbY/1UD3hxvBEugB9/tulhmp8bf+rRdmiHs6Hm75Y6w0haz144j4uo qRqH2pyN8VRsFuFoSH+D3v3Jv8vpYKU8KyVlylxg6F/dtZ42nI61sL82+1aFHimGbubi CzNhHW0C4zdg3+j0WYh5xIMzmM13J9VZXjkjQNCYZiUYB/voIaq8cLDzp2nvR+4elqRm KTuwTUmJPknCHqSDergFj0IaCJVUuizYSsUI/0FM3oq7ltbvi70is3ql8/x8jk6+0SJR 1k5w== 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=EXQ2NlJEphWWI0j/ir11YUa87Zm1gmwyaVm5kWN7vQg=; b=tFpn+T5MQ4JcCADPh86Xjc/YOcRKW6cMSt3ZAW0Mw1fyAgjpjQuZF7renhAdjV1tu0 xW0KvQg4mMCPef+YBc8cVf3G/IYWsX9A7M+oYyhbXlvERIZFQLobaGySkAZU+jq7D9BH 3F4RUKXkaw5+xfg+GtQSL7XjEtLTSkIXJ21szd88DkSf9d9QiJoHMq+hXjaYCincUoTF HeOBfWXKyS/PFdvpAkfJs4T/7Z8xvfoFxSXGxf3gQRd2xz1drI2hDicfVx9kw7FeVWQ8 osuS4Mves4HwDnIRKtN7tY72ub5PKI051Hs6zWFl6QiIvcamIpg3AAHtCJ0I4qycbLMJ +QIw== X-Gm-Message-State: AKS2vOz0hWcia+ZfQ+AwtLe7OXGbCb8WwEqhDxywJ6SlbO4kRmZBtdsx hZwoe+1JewYRJlaQlkPtIA+09bWevA== X-Received: by 10.200.42.121 with SMTP id l54mr37780731qtl.32.1497973058881; Tue, 20 Jun 2017 08:37:38 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.12.183.143 with HTTP; Tue, 20 Jun 2017 08:37:38 -0700 (PDT) In-Reply-To: <201706200209.v5K29omh065613@repo.freebsd.org> References: <201706200209.v5K29omh065613@repo.freebsd.org> From: Justin Hibbits Date: Tue, 20 Jun 2017 10:37:38 -0500 X-Google-Sender-Auth: 9FaZYsOixPWnnln4dfTVG2R4WH4 Message-ID: Subject: Re: svn commit: r320127 - in head: . share/mk To: Emmanuel Vadot Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:37:40 -0000 On Mon, Jun 19, 2017 at 9:09 PM, Emmanuel Vadot wrote: > Author: manu > Date: Tue Jun 20 02:09:50 2017 > New Revision: 320127 > URL: https://svnweb.freebsd.org/changeset/base/320127 > > Log: > Switch back to the BSDL DTC (Device Tree Compiler). > The BSDL dtc has grown the needed features (overlays mostly) and is able to > compile all of our base DTS. > You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5) > to specify an alternate location for the compiler to use. > > Discussed with: emaste, imp > > Modified: > head/UPDATING > head/share/mk/src.opts.mk > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Mon Jun 19 22:07:53 2017 (r320126) > +++ head/UPDATING Tue Jun 20 02:09:50 2017 (r320127) > @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > > ****************************** SPECIAL WARNING: ****************************** > > +20170620: > + Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC > + if you require the GPL compiler. > + > 20170618: > The internal ABI used for communication between the NFS kernel modules > was changed by r320085, so __FreeBSD_version was bumped to > > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Mon Jun 19 22:07:53 2017 (r320126) > +++ head/share/mk/src.opts.mk Tue Jun 20 02:09:50 2017 (r320127) > @@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \ > GNU_DIFF \ > GNU_GREP \ > GPIO \ > - GPL_DTC \ > HAST \ > HTML \ > HYPERV \ > @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ > CLANG_EXTRAS \ > DTRACE_TESTS \ > GNU_GREP_COMPAT \ > + GPL_DTC \ > HESIOD \ > LIBSOFT \ > NAND \ > Given that usr.bin/Makefile wrapps dtc in a .if ${COMPILER_FEATURES:Mc++11} block, you just disabled dtc on powerpc (powerpc currently does not build clang, and relies instead on base gcc. This will change in the future, hopefully the near future, but for now, it's reliant on gcc) - Justin From owner-svn-src-all@freebsd.org Tue Jun 20 15:49:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFCB4D9B952 for ; Tue, 20 Jun 2017 15:49:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm23-vm5.bullet.mail.ne1.yahoo.com (nm23-vm5.bullet.mail.ne1.yahoo.com [98.138.91.245]) (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 7A79F37E5 for ; Tue, 20 Jun 2017 15:49:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1497973733; bh=8EaudZKqHFd58wnp3hOtclDshbJtQGzG7MRiEqYe7Xw=; h=Subject:From:To:References:Date:In-Reply-To:From:Subject; b=ukfDV3SHqhjDm39t0YO/tnaFMnhqKwPa1sMH0MFB+MU6wqMTHDxxFn9TvGvXv/lgqHnrDlIcClP0B3t51uFp4u/17RNM9m5Doo/aYH4xz/Rhdxwr/OYXlCrfgluWL9ecsQUWXRgnKkSFKZkglzqmuNBp9oTvH3b/WVICBqFyVaiyeJWzLWLSOsSVf2JS3TEcuUxXcDZWSFhWH+67Q11VAEWxxQ4o5nHoC0LA8h3CkeGoqdePFYm+q9kIQMW61fXMC7bmEs7KB75US9P8TbPemR7wFQFLXIUe0EeXWxkFcGHPSbWM3pVGl+bq7K4JgRCNQIrUnmFd3FyQoehy+Go+Rg== Received: from [98.138.100.102] by nm23.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jun 2017 15:48:53 -0000 Received: from [98.138.226.30] by tm101.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jun 2017 15:48:53 -0000 Received: from [127.0.0.1] by smtp201.mail.ne1.yahoo.com with NNFMP; 20 Jun 2017 15:48:53 -0000 X-Yahoo-Newman-Id: 631986.85995.bm@smtp201.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: htxceFEVM1ksKNK10FQAmx9YatAVL9CfivEbKotmyrYUEUt f9vYDxmEOaCIkDdSvJBfMrAD.fhTTuNmcI4XFIskJtuP5mXXloemZjTDNPhT HayF8PNeYrlvtluqCqbZK1VWZaUM_6D0VyUxx_yJgpupSi8GD2V_sGzF2LbN jID6z1xchtvvWDEc7mamVJNtpD7ubAtIgcBCj.VJpE2H5kTUioeGpZ2Az9HB O0VlDvKX5LLQHHT2dY0tJIL.TgNBIKC3wmQJ212kLRsjx4Ehlozna1R2TQSV 0G1o1zY5HJbtzFs2gy2UGkz0uqj1ZYChKDNC0B3FDGV1.oUHFd0prcGJXBet y7Ybv8SVOE3CFmm_ycQUjJCx85leclebAnTWuEEwrfrIbtT3bdD2Z78qX.9C RHlJtvQ1tt0PZZhG6YJ_LNfggRCbebpcEH5wfvf03DDvJBYKS3XMs3F_NfI8 Ph8H5G_STGRQlxiC0xTJLPFNoTM5mRC66LTKXs1.1uQ8c42Qu9epT.NPZKNl eODVdj7HvPWw1oyufGmqMyysOmrWv3ftEypIYL2f0fQfM X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320146 - head/sys/fs/ext2fs From: Pedro Giffuni To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706201435.v5KEZJdr075723@repo.freebsd.org> Organization: FreeBSD Project Message-ID: <10f2e743-7b55-4a8d-1479-b5b3de9b4fe2@FreeBSD.org> Date: Tue, 20 Jun 2017 10:48:42 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706201435.v5KEZJdr075723@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:49:00 -0000 ... On 20/06/2017 09:35, Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Jun 20 14:35:19 2017 > New Revision: 320146 > URL: https://svnweb.freebsd.org/changeset/base/320146 > > Log: > Improve grammar concerning "metadata". > > Remove unnecessary space while here. > > Modified: > head/sys/fs/ext2fs/ext2fs.h > > Modified: head/sys/fs/ext2fs/ext2fs.h > ============================================================================== > --- head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:28:51 2017 (r320145) > +++ head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:35:19 2017 (r320146) > @@ -316,9 +316,8 @@ struct ext2_gd { > uint16_t ext4bgd_csum; /* group descriptor checksum */ > }; > > - > -/* EXT2FS metadatas are stored in little-endian byte order. These macros > - * helps reading these metadatas > +/* EXT2FS metadata is stored in little-endian byte order. These macros > + * helps reading them. > */ > For the record: "metadata" is tricky as it can be addressed to either plural or singular, what is wrong the use of "metadatas". Pedro. From owner-svn-src-all@freebsd.org Tue Jun 20 15:51:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6341ED9BAA0; Tue, 20 Jun 2017 15:51:10 +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 31B5E3B3F; Tue, 20 Jun 2017 15:51:10 +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 v5KFp9lc008597; Tue, 20 Jun 2017 15:51:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFp9ha008596; Tue, 20 Jun 2017 15:51:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706201551.v5KFp9ha008596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Jun 2017 15:51:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320149 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:51:10 -0000 Author: emaste Date: Tue Jun 20 15:51:09 2017 New Revision: 320149 URL: https://svnweb.freebsd.org/changeset/base/320149 Log: Fall back to GPL dtc(1) when we lack a C++11 compiler The BSD licensed device tree compiler is written in C++11. Reported by: jhibbits Reviewed by: jhibbits, manu Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Jun 20 15:10:14 2017 (r320148) +++ head/share/mk/src.opts.mk Tue Jun 20 15:51:09 2017 (r320149) @@ -180,7 +180,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ DTRACE_TESTS \ GNU_GREP_COMPAT \ - GPL_DTC \ HESIOD \ LIBSOFT \ NAND \ @@ -222,16 +221,16 @@ __TT=${MACHINE} ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD -__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX +__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC .elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64" # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD +__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC GPL_DTC LLD .else # Everything else disables Clang, and uses GCC instead. -__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX +__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD .endif # In-tree binutils/gcc are older versions without modern architecture support. From owner-svn-src-all@freebsd.org Tue Jun 20 15:53:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7474BD9BD54 for ; Tue, 20 Jun 2017 15:53:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132963FAE for ; Tue, 20 Jun 2017 15:53:15 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 8e234e65-55d0-11e7-8f51-6f1fdf31063e 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.eu.mailhop.org (Halon) with ESMTPSA id 8e234e65-55d0-11e7-8f51-6f1fdf31063e; Tue, 20 Jun 2017 15:53:09 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v5KFr8Em003706; Tue, 20 Jun 2017 09:53:08 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1497973988.81013.78.camel@freebsd.org> Subject: Re: svn commit: r320146 - head/sys/fs/ext2fs From: Ian Lepore To: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 20 Jun 2017 09:53:08 -0600 In-Reply-To: <10f2e743-7b55-4a8d-1479-b5b3de9b4fe2@FreeBSD.org> References: <201706201435.v5KEZJdr075723@repo.freebsd.org> <10f2e743-7b55-4a8d-1479-b5b3de9b4fe2@FreeBSD.org> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:53:16 -0000 On Tue, 2017-06-20 at 10:48 -0500, Pedro Giffuni wrote: > ... > > On 20/06/2017 09:35, Pedro F. Giffuni wrote: > > > > Author: pfg > > Date: Tue Jun 20 14:35:19 2017 > > New Revision: 320146 > > URL: https://svnweb.freebsd.org/changeset/base/320146 > > > > Log: > >    Improve grammar concerning "metadata". > >     > >    Remove unnecessary space while here. > > > > Modified: > >    head/sys/fs/ext2fs/ext2fs.h > > > > Modified: head/sys/fs/ext2fs/ext2fs.h > > =================================================================== > > =========== > > --- head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:28:51 2017 > > (r320145) > > +++ head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 14:35:19 2017 > > (r320146) > > @@ -316,9 +316,8 @@ struct ext2_gd { > >    uint16_t ext4bgd_csum; /* group descriptor > > checksum */ > >   }; > >    > > - > > -/* EXT2FS metadatas are stored in little-endian byte order. These > > macros > > - * helps reading these metadatas > > +/* EXT2FS metadata is stored in little-endian byte order. These > > macros > > + * helps reading them. > >    */ > >    > For the record: "metadata" is tricky as it can be addressed to > either  > plural or singular, what is wrong the use of "metadatas". > > Pedro. > Metadata can be treated as if singular or plural for purposes of making an associated verb match in number.  That's a different issue from the fact that "metadatas" just isn't a word at all. Speaking of making subject and verb match in number, the verb in the 3rd sentence needs to be "help". -- Ian From owner-svn-src-all@freebsd.org Tue Jun 20 15:55:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B858D9BE07; Tue, 20 Jun 2017 15:55:16 +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 28EFF6412F; Tue, 20 Jun 2017 15: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 v5KFtFEh009661; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFtFVr009659; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201555.v5KFtFVr009659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320150 - in stable: 10 10/lib/libc/sys 11 11/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:55:16 -0000 Author: jhb Date: Tue Jun 20 15:55:15 2017 New Revision: 320150 URL: https://svnweb.freebsd.org/changeset/base/320150 Log: MFC 319490: Remove stale cap_rights_get(2) manpage. The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). Approved by: re (gjb) Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/ObsoleteFiles.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/10/ObsoleteFiles.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170620: remove stale manpage +OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170322: rename to _test to match the FreeBSD test suite name scheme OLD_FILES+=usr/tests/usr.bin/col/col OLD_FILES+=usr/tests/usr.sbin/pw/pw_config Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/10/lib/libc/sys/Makefile.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -340,7 +340,6 @@ MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 -MLINKS+=cap_rights_limit.2 cap_rights_get.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 chflagsat.2 \ chflags.2 fchflags.2 \ From owner-svn-src-all@freebsd.org Tue Jun 20 15:55:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC287D9BE0B; Tue, 20 Jun 2017 15:55:16 +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 7975A64130; Tue, 20 Jun 2017 15: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 v5KFtFx8009668; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFtFWE009666; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201555.v5KFtFWE009666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320150 - in stable: 10 10/lib/libc/sys 11 11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:55:16 -0000 Author: jhb Date: Tue Jun 20 15:55:15 2017 New Revision: 320150 URL: https://svnweb.freebsd.org/changeset/base/320150 Log: MFC 319490: Remove stale cap_rights_get(2) manpage. The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). Approved by: re (gjb) Modified: stable/11/ObsoleteFiles.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/11/ObsoleteFiles.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170620: remove stale manpage +OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170531: remove pcap-int.h OLD_FILES+=usr/include/pcap-int.h # 20170402: new libc++ import which bumps version from 3.9.1 to 4.0.0. Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/11/lib/libc/sys/Makefile.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -337,7 +337,6 @@ MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 -MLINKS+=cap_rights_limit.2 cap_rights_get.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 chflagsat.2 \ chflags.2 fchflags.2 \ From owner-svn-src-all@freebsd.org Tue Jun 20 16:13:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7E1D9C35D; Tue, 20 Jun 2017 16:13:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A8F64DAB; Tue, 20 Jun 2017 16:13:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v5KGDBJv089742; Tue, 20 Jun 2017 09:13:11 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v5KGDBuv089741; Tue, 20 Jun 2017 09:13:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201706201613.v5KGDBuv089741@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320099 - stable/11/sys/dev/vmware/vmxnet3 In-Reply-To: <201706191445.v5JEjKHE082982@repo.freebsd.org> To: Andriy Gapon Date: Tue, 20 Jun 2017 09:13:11 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:13:13 -0000 > Author: avg > Date: Mon Jun 19 14:45:20 2017 > New Revision: 320099 > URL: https://svnweb.freebsd.org/changeset/base/320099 > > Log: > MFC r318867: fix vmxnet3 crash when LRO is enabled > > The crash can occur when all of the following conditions are true: > - a packet consists of multiple segments (requires LRO enabled) > - there has been a failure to allocate an mbuf for the packet and > the packet has to be dropped > - a host (vmware) still owned at least one segment of the packet, > so the driver had to wait for another interrupt to proceed to > discarding the remaining segment(s) > > Reviewed by: rstone > Approved by: re (gjb) > Sponsored by: Panzura Does this same bug exist in 10.x? If so does it make since to merge this back to 10.x? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Jun 20 16:14:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7AAD9C3F8; Tue, 20 Jun 2017 16:14:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0B664EF6; Tue, 20 Jun 2017 16:14:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v5KGEvsv089755; Tue, 20 Jun 2017 09:14:57 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v5KGEvrY089754; Tue, 20 Jun 2017 09:14:57 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201706201614.v5KGEvrY089754@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320116 - stable/10/sys/dev/vmware/vmxnet3 In-Reply-To: <201706191541.v5JFfe1v007112@repo.freebsd.org> To: Andriy Gapon Date: Tue, 20 Jun 2017 09:14:57 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:14:59 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: avg > Date: Mon Jun 19 15:41:39 2017 > New Revision: 320116 > URL: https://svnweb.freebsd.org/changeset/base/320116 > > Log: > MFC r318867: fix vmxnet3 crash when LRO is enabled > > Sponsored by: Panzura Ignore my other email, I see it does and you did, thank you! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Jun 20 16:40:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23CBDD9CB1D; Tue, 20 Jun 2017 16:40: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 E5E9665C56; Tue, 20 Jun 2017 16:40: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 v5KGeWS8026760; Tue, 20 Jun 2017 16:40:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KGeWMd026759; Tue, 20 Jun 2017 16:40:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706201640.v5KGeWMd026759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 16:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320151 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:40:33 -0000 Author: avg Date: Tue Jun 20 16:40:31 2017 New Revision: 320151 URL: https://svnweb.freebsd.org/changeset/base/320151 Log: remove bogus declaration of malloc from tcp_wrappers The declaration was already inactive when INET6 was enabled and it causes a build error in the other case because of a conflict with the correct definition in stdlib.h. Discussed with: dim, ume MFC after: 2 weeks Modified: head/contrib/tcp_wrappers/scaffold.c Modified: head/contrib/tcp_wrappers/scaffold.c ============================================================================== --- head/contrib/tcp_wrappers/scaffold.c Tue Jun 20 15:55:15 2017 (r320150) +++ head/contrib/tcp_wrappers/scaffold.c Tue Jun 20 16:40:31 2017 (r320151) @@ -28,10 +28,6 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ #endif -#ifndef INET6 -extern char *malloc(); -#endif - /* Application-specific. */ #include "tcpd.h" From owner-svn-src-all@freebsd.org Tue Jun 20 16:45:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B143D9CCA0; Tue, 20 Jun 2017 16:45: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 093626606E; Tue, 20 Jun 2017 16:45:49 +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 v5KGjnV3030668; Tue, 20 Jun 2017 16:45:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KGjnel030667; Tue, 20 Jun 2017 16:45:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706201645.v5KGjnel030667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 16:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320152 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:45:50 -0000 Author: avg Date: Tue Jun 20 16:45:48 2017 New Revision: 320152 URL: https://svnweb.freebsd.org/changeset/base/320152 Log: fstyp: move sys/ include path after zfs include paths The reason is that FreeBSD refcount.h shadows ZFS refcount.h and that will lead to a build error after a planned import of the ARC buf data scatter-ization. It's possible that some day we will have an opposite problem where a ZFS header would shadow an essential FreeBSD header. So, we need to think about a better long term solution. Discussed with: allanjude MFC after: 17 days Modified: head/usr.sbin/fstyp/Makefile Modified: head/usr.sbin/fstyp/Makefile ============================================================================== --- head/usr.sbin/fstyp/Makefile Tue Jun 20 16:40:31 2017 (r320151) +++ head/usr.sbin/fstyp/Makefile Tue Jun 20 16:45:48 2017 (r320152) @@ -19,8 +19,6 @@ WARNS?= 2 SUBDIR+= tests .endif -CFLAGS+=-I${SRCTOP}/sys - .if ${MK_ZFS} != "no" IGNORE_PRAGMA= YES @@ -35,6 +33,8 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head .endif + +CFLAGS+=-I${SRCTOP}/sys LIBADD= geom md From owner-svn-src-all@freebsd.org Tue Jun 20 16:55:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22CC3D9CED9; Tue, 20 Jun 2017 16:55: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 F08EE66586; Tue, 20 Jun 2017 16:55: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 v5KGtV7x034792; Tue, 20 Jun 2017 16:55:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KGtUDS034789; Tue, 20 Jun 2017 16:55:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706201655.v5KGtUDS034789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 16:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320153 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:55:32 -0000 Author: avg Date: Tue Jun 20 16:55:30 2017 New Revision: 320153 URL: https://svnweb.freebsd.org/changeset/base/320153 Log: revert r315852 which introduced zio_buf_alloc_nowait for use in vdev_queue_aggregate I think that the change is still good, but reconciling it with a planned merge of the ARC buf data scatter-ization is a bit more tedious than I can handle. MFC after: 17 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jun 20 16:45:48 2017 (r320152) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jun 20 16:55:30 2017 (r320153) @@ -555,7 +555,6 @@ extern zio_t *zio_unique_parent(zio_t *cio); extern void zio_add_child(zio_t *pio, zio_t *cio); extern void *zio_buf_alloc(size_t size); -extern void *zio_buf_alloc_nowait(size_t size); extern void zio_buf_free(void *buf, size_t size); extern void *zio_data_buf_alloc(size_t size); extern void zio_data_buf_free(void *buf, size_t size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jun 20 16:45:48 2017 (r320152) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jun 20 16:55:30 2017 (r320153) @@ -647,7 +647,6 @@ static zio_t * vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) { zio_t *first, *last, *aio, *dio, *mandatory, *nio; - void *abuf; uint64_t maxgap = 0; uint64_t size; boolean_t stretch; @@ -766,12 +765,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) size = IO_SPAN(first, last); ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); - abuf = zio_buf_alloc_nowait(size); - if (abuf == NULL) - return (NULL); - aio = zio_vdev_delegated_io(first->io_vd, first->io_offset, - abuf, size, first->io_type, zio->io_priority, + zio_buf_alloc(size), size, first->io_type, zio->io_priority, flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE, vdev_queue_agg_io_done, NULL); aio->io_timestamp = first->io_timestamp; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 16:45:48 2017 (r320152) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 16:55:30 2017 (r320153) @@ -272,33 +272,18 @@ zio_fini(void) * useful to inspect ZFS metadata, but if possible, we should avoid keeping * excess / transient data in-core during a crashdump. */ -static void * -zio_buf_alloc_impl(size_t size, boolean_t canwait) +void * +zio_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; int flags = zio_exclude_metadata ? KM_NODEBUG : 0; VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); - if (zio_use_uma) { - return (kmem_cache_alloc(zio_buf_cache[c], - canwait ? KM_PUSHPAGE : KM_NOSLEEP)); - } else { - return (kmem_alloc(size, - (canwait ? KM_SLEEP : KM_NOSLEEP) | flags)); - } -} - -void * -zio_buf_alloc(size_t size) -{ - return (zio_buf_alloc_impl(size, B_TRUE)); -} - -void * -zio_buf_alloc_nowait(size_t size) -{ - return (zio_buf_alloc_impl(size, B_FALSE)); + if (zio_use_uma) + return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); + else + return (kmem_alloc(size, KM_SLEEP|flags)); } /* From owner-svn-src-all@freebsd.org Tue Jun 20 17:03:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD45BD9D2C8; Tue, 20 Jun 2017 17:03:07 +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 86E4766B70; Tue, 20 Jun 2017 17:03:07 +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 v5KH3648038867; Tue, 20 Jun 2017 17:03:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KH36Z1038866; Tue, 20 Jun 2017 17:03:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706201703.v5KH36Z1038866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Jun 2017 17:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320154 - stable/10/sys/dev/md X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:03:07 -0000 Author: markj Date: Tue Jun 20 17:03:06 2017 New Revision: 320154 URL: https://svnweb.freebsd.org/changeset/base/320154 Log: MFC r319932: Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs. Modified: stable/10/sys/dev/md/md.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Tue Jun 20 16:55:30 2017 (r320153) +++ stable/10/sys/dev/md/md.c Tue Jun 20 17:03:06 2017 (r320154) @@ -963,6 +963,16 @@ unmapped_step: return (error); } +static void +md_swap_page_free(vm_page_t m) +{ + + vm_page_xunbusy(m); + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); +} + static int mdstart_swap(struct md_s *sc, struct bio *bp) { @@ -1034,14 +1044,16 @@ mdstart_swap(struct md_s *sc, struct bio *bp) cpu_flush_dcache(p, len); } } else if (bp->bio_cmd == BIO_WRITE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(sc->object, &m, 1, 0); - else + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; + else + rv = vm_pager_get_pages(sc->object, &m, 1, 0); if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } + } else if (rv == VM_PAGER_FAIL) + pmap_zero_page(m); + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { pmap_copy_pages(bp->bio_ma, ma_offs, &m, offs, len); @@ -1051,33 +1063,39 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } else { physcopyin(p, VM_PAGE_TO_PHYS(m) + offs, len); } + m->valid = VM_PAGE_BITS_ALL; + vm_page_dirty(m); + vm_pager_page_unswapped(m); } else if (bp->bio_cmd == BIO_DELETE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(sc->object, &m, 1, 0); - else + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; + else + rv = vm_pager_get_pages(sc->object, &m, 1, 0); if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } - if (len != PAGE_SIZE) { - pmap_zero_page_area(m, offs, len); - vm_page_clear_dirty(m, offs, len); - m->valid = VM_PAGE_BITS_ALL; - } else + } else if (rv == VM_PAGER_FAIL) { + md_swap_page_free(m); + m = NULL; + } else { + /* Page is valid. */ + if (len != PAGE_SIZE) { + pmap_zero_page_area(m, offs, len); + vm_page_dirty(m); + } vm_pager_page_unswapped(m); + if (len == PAGE_SIZE) { + md_swap_page_free(m); + m = NULL; + } + } } - vm_page_xunbusy(m); - vm_page_lock(m); - if (bp->bio_cmd == BIO_DELETE && len == PAGE_SIZE) - vm_page_free(m); - else + if (m != NULL) { + vm_page_xunbusy(m); + vm_page_lock(m); vm_page_activate(m); - vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) { - vm_page_dirty(m); - vm_pager_page_unswapped(m); + vm_page_unlock(m); } /* Actions on further pages start at offset 0 */ From owner-svn-src-all@freebsd.org Tue Jun 20 17:38:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61466D9DBF8; Tue, 20 Jun 2017 17:38:27 +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 25AE367BC6; Tue, 20 Jun 2017 17:38:27 +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 v5KHcQ5a051183; Tue, 20 Jun 2017 17:38:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KHcQPm051182; Tue, 20 Jun 2017 17:38:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706201738.v5KHcQPm051182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Jun 2017 17:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320155 - stable/11/sys/dev/md X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:38:27 -0000 Author: markj Date: Tue Jun 20 17:38:25 2017 New Revision: 320155 URL: https://svnweb.freebsd.org/changeset/base/320155 Log: MFC r319932: Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs. Approved by: re (gjb) Modified: stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Tue Jun 20 17:03:06 2017 (r320154) +++ stable/11/sys/dev/md/md.c Tue Jun 20 17:38:25 2017 (r320155) @@ -969,6 +969,16 @@ unmapped_step: return (error); } +static void +md_swap_page_free(vm_page_t m) +{ + + vm_page_xunbusy(m); + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); +} + static int mdstart_swap(struct md_s *sc, struct bio *bp) { @@ -1041,15 +1051,17 @@ mdstart_swap(struct md_s *sc, struct bio *bp) cpu_flush_dcache(p, len); } } else if (bp->bio_cmd == BIO_WRITE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) + rv = VM_PAGER_OK; + else rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); - else - rv = VM_PAGER_OK; if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } + } else if (rv == VM_PAGER_FAIL) + pmap_zero_page(m); + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { pmap_copy_pages(bp->bio_ma, ma_offs, &m, offs, len); @@ -1059,34 +1071,40 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } else { physcopyin(p, VM_PAGE_TO_PHYS(m) + offs, len); } + m->valid = VM_PAGE_BITS_ALL; + vm_page_dirty(m); + vm_pager_page_unswapped(m); } else if (bp->bio_cmd == BIO_DELETE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) + rv = VM_PAGER_OK; + else rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); - else - rv = VM_PAGER_OK; if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } - if (len != PAGE_SIZE) { - pmap_zero_page_area(m, offs, len); - vm_page_clear_dirty(m, offs, len); - m->valid = VM_PAGE_BITS_ALL; - } else + } else if (rv == VM_PAGER_FAIL) { + md_swap_page_free(m); + m = NULL; + } else { + /* Page is valid. */ + if (len != PAGE_SIZE) { + pmap_zero_page_area(m, offs, len); + vm_page_dirty(m); + } vm_pager_page_unswapped(m); + if (len == PAGE_SIZE) { + md_swap_page_free(m); + m = NULL; + } + } } - vm_page_xunbusy(m); - vm_page_lock(m); - if (bp->bio_cmd == BIO_DELETE && len == PAGE_SIZE) - vm_page_free(m); - else + if (m != NULL) { + vm_page_xunbusy(m); + vm_page_lock(m); vm_page_activate(m); - vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) { - vm_page_dirty(m); - vm_pager_page_unswapped(m); + vm_page_unlock(m); } /* Actions on further pages start at offset 0 */ From owner-svn-src-all@freebsd.org Tue Jun 20 17:39:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20614D9DC60; Tue, 20 Jun 2017 17:39:27 +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 CAA5667D03; Tue, 20 Jun 2017 17:39:26 +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 v5KHdQEp051267; Tue, 20 Jun 2017 17:39:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KHdPhO051256; Tue, 20 Jun 2017 17:39:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706201739.v5KHdPhO051256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 17:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:39:27 -0000 Author: avg Date: Tue Jun 20 17:39:24 2017 New Revision: 320156 URL: https://svnweb.freebsd.org/changeset/base/320156 Log: MFV r318946: 8021 ARC buf data scatter-ization illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad18d93383 https://www.illumos.org/issues/8021 The ARC buf data project (known simply as "ABD" since its genesis in the ZoL community) changes the way the ARC allocates `b_pdata` memory from using linear `void *` buffers to using scatter/gather lists of fixed-size 1KB chunks. This improves ZFS's performance by helping to defragment the address space occupied by the ARC, in particular for cases where compressed ARC is enabled. It could also ease future work to allocate pages directly from `segkpm` for minimal- overhead memory allocations, bypassing the `kmem` subsystem. This is essentially the same change as the one which recently landed in ZFS on Linux, although they made some platform-specific changes while adapting this work to their codebase: 1. Implemented the equivalent of the `segkpm` suggestion for future work mentioned above to bypass issues that they've had with the Linux kernel memory allocator. 2. Changed the internal representation of the ABD's scatter/gather list so it could be used to pass I/O directly into Linux block device drivers. (This feature is not available in the illumos block device interface yet.) FreeBSD notes: - the actual (default) chunk size is 4KB (despite the text above saying 1KB) - we can try to reimplement ABDs, so that they are not permanently mapped into the KVA unless explicitly requested, especially on platforms with scarce KVA - we can try to use unmapped I/O and avoid intermediate allocation of a linear, virtual memory mapped buffer - we can try to avoid extra data copying by referring to chunks / pages in the original ABD Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: John Kennedy Reviewed by: Prakash Surya Reviewed by: Prashanth Sreenivasa Reviewed by: Pavel Zakharov Reviewed by: Chris Williamson Approved by: Richard Lowe Author: Dan Kimmel MFC after: 3 weeks Added: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c - copied, changed from r318946, vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h - copied, changed from r318946, vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c head/sys/conf/files Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 20 17:39:24 2017 (r320156) @@ -59,6 +59,7 @@ #include #include #include +#include #include #undef verify #include @@ -2410,7 +2411,7 @@ zdb_blkptr_done(zio_t *zio) zdb_cb_t *zcb = zio->io_private; zbookmark_phys_t *zb = &zio->io_bookmark; - zio_data_buf_free(zio->io_data, zio->io_size); + abd_free(zio->io_abd); mutex_enter(&spa->spa_scrub_lock); spa->spa_scrub_inflight--; @@ -2477,7 +2478,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr if (!BP_IS_EMBEDDED(bp) && (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) { size_t size = BP_GET_PSIZE(bp); - void *data = zio_data_buf_alloc(size); + abd_t *abd = abd_alloc(size, B_FALSE); int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW; /* If it's an intent log block, failure is expected. */ @@ -2490,7 +2491,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr spa->spa_scrub_inflight++; mutex_exit(&spa->spa_scrub_lock); - zio_nowait(zio_read(NULL, spa, bp, data, size, + zio_nowait(zio_read(NULL, spa, bp, abd, size, zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb)); } @@ -3270,6 +3271,13 @@ name: return (NULL); } +/* ARGSUSED */ +static int +random_get_pseudo_bytes_cb(void *buf, size_t len, void *unused) +{ + return (random_get_pseudo_bytes(buf, len)); +} + /* * Read a block from a pool and print it out. The syntax of the * block descriptor is: @@ -3301,7 +3309,8 @@ zdb_read_block(char *thing, spa_t *spa) uint64_t offset = 0, size = 0, psize = 0, lsize = 0, blkptr_offset = 0; zio_t *zio; vdev_t *vd; - void *pbuf, *lbuf, *buf; + abd_t *pabd; + void *lbuf, *buf; char *s, *p, *dup, *vdev, *flagstr; int i, error; @@ -3373,7 +3382,7 @@ zdb_read_block(char *thing, spa_t *spa) psize = size; lsize = size; - pbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); + pabd = abd_alloc_linear(SPA_MAXBLOCKSIZE, B_FALSE); lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); BP_ZERO(bp); @@ -3401,15 +3410,15 @@ zdb_read_block(char *thing, spa_t *spa) /* * Treat this as a normal block read. */ - zio_nowait(zio_read(zio, spa, bp, pbuf, psize, NULL, NULL, + zio_nowait(zio_read(zio, spa, bp, pabd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL)); } else { /* * Treat this as a vdev child I/O. */ - zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pbuf, psize, - ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, + zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pabd, + psize, ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY | ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL)); @@ -3432,21 +3441,21 @@ zdb_read_block(char *thing, spa_t *spa) void *pbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); void *lbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); - bcopy(pbuf, pbuf2, psize); + abd_copy_to_buf(pbuf2, pabd, psize); - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf + psize, - SPA_MAXBLOCKSIZE - psize) == 0); + VERIFY0(abd_iterate_func(pabd, psize, SPA_MAXBLOCKSIZE - psize, + random_get_pseudo_bytes_cb, NULL)); - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize, - SPA_MAXBLOCKSIZE - psize) == 0); + VERIFY0(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize, + SPA_MAXBLOCKSIZE - psize)); for (lsize = SPA_MAXBLOCKSIZE; lsize > psize; lsize -= SPA_MINBLOCKSIZE) { for (c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++) { - if (zio_decompress_data(c, pbuf, lbuf, - psize, lsize) == 0 && - zio_decompress_data(c, pbuf2, lbuf2, - psize, lsize) == 0 && + if (zio_decompress_data(c, pabd, + lbuf, psize, lsize) == 0 && + zio_decompress_data_buf(c, pbuf2, + lbuf2, psize, lsize) == 0 && bcmp(lbuf, lbuf2, lsize) == 0) break; } @@ -3465,7 +3474,7 @@ zdb_read_block(char *thing, spa_t *spa) buf = lbuf; size = lsize; } else { - buf = pbuf; + buf = abd_to_buf(pabd); size = psize; } @@ -3483,7 +3492,7 @@ zdb_read_block(char *thing, spa_t *spa) zdb_dump_block(thing, buf, size, flags); out: - umem_free(pbuf, SPA_MAXBLOCKSIZE); + abd_free(pabd); umem_free(lbuf, SPA_MAXBLOCKSIZE); free(dup); } Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jun 20 17:39:24 2017 (r320156) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. */ /* @@ -41,6 +41,7 @@ #include #include #include +#include extern uint8_t dump_opt[256]; @@ -117,13 +118,27 @@ zil_prt_rec_rename(zilog_t *zilog, int txtype, lr_rena } /* ARGSUSED */ +static int +zil_prt_rec_write_cb(void *data, size_t len, void *unused) +{ + char *cdata = data; + for (int i = 0; i < len; i++) { + if (isprint(*cdata)) + (void) printf("%c ", *cdata); + else + (void) printf("%2X", *cdata); + cdata++; + } + return (0); +} + +/* ARGSUSED */ static void zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr) { - char *data, *dlimit; + abd_t *data; blkptr_t *bp = &lr->lr_blkptr; zbookmark_phys_t zb; - char buf[SPA_MAXBLOCKSIZE]; int verbose = MAX(dump_opt['d'], dump_opt['i']); int error; @@ -144,7 +159,6 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write if (BP_IS_HOLE(bp)) { (void) printf("\t\t\tLSIZE 0x%llx\n", (u_longlong_t)BP_GET_LSIZE(bp)); - bzero(buf, sizeof (buf)); (void) printf("%s\n", prefix); return; } @@ -157,28 +171,26 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write lr->lr_foid, ZB_ZIL_LEVEL, lr->lr_offset / BP_GET_LSIZE(bp)); + data = abd_alloc(BP_GET_LSIZE(bp), B_FALSE); error = zio_wait(zio_read(NULL, zilog->zl_spa, - bp, buf, BP_GET_LSIZE(bp), NULL, NULL, + bp, data, BP_GET_LSIZE(bp), NULL, NULL, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &zb)); if (error) - return; - data = buf; + goto out; } else { - data = (char *)(lr + 1); + /* data is stored after the end of the lr_write record */ + data = abd_alloc(lr->lr_length, B_FALSE); + abd_copy_from_buf(data, lr + 1, lr->lr_length); } - dlimit = data + MIN(lr->lr_length, - (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)); - (void) printf("%s", prefix); - while (data < dlimit) { - if (isprint(*data)) - (void) printf("%c ", *data); - else - (void) printf("%2X", *data); - data++; - } + (void) abd_iterate_func(data, + 0, MIN(lr->lr_length, (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)), + zil_prt_rec_write_cb, NULL); (void) printf("\n"); + +out: + abd_free(data); } /* ARGSUSED */ Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 20 17:39:24 2017 (r320156) @@ -112,6 +112,7 @@ #include #include #include +#include #include #include #include @@ -190,6 +191,7 @@ extern uint64_t metaslab_df_alloc_threshold; extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; extern boolean_t zfs_compressed_arc_enabled; +extern boolean_t zfs_abd_scatter_enabled; static ztest_shared_opts_t *ztest_shared_opts; static ztest_shared_opts_t ztest_opts; @@ -5042,7 +5044,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) enum zio_checksum checksum = spa_dedup_checksum(spa); dmu_buf_t *db; dmu_tx_t *tx; - void *buf; + abd_t *abd; blkptr_t blk; int copies = 2 * ZIO_DEDUPDITTO_MIN; @@ -5122,14 +5124,14 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) * Damage the block. Dedup-ditto will save us when we read it later. */ psize = BP_GET_PSIZE(&blk); - buf = zio_buf_alloc(psize); - ztest_pattern_set(buf, psize, ~pattern); + abd = abd_alloc_linear(psize, B_TRUE); + ztest_pattern_set(abd_to_buf(abd), psize, ~pattern); (void) zio_wait(zio_rewrite(NULL, spa, 0, &blk, - buf, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, + abd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL | ZIO_FLAG_INDUCE_DAMAGE, NULL)); - zio_buf_free(buf, psize); + abd_free(abd); (void) rw_unlock(&ztest_name_lock); } @@ -5413,6 +5415,12 @@ ztest_resume_thread(void *arg) */ if (ztest_random(10) == 0) zfs_compressed_arc_enabled = ztest_random(2); + + /* + * Periodically change the zfs_abd_scatter_enabled setting. + */ + if (ztest_random(10) == 0) + zfs_abd_scatter_enabled = ztest_random(2); } return (NULL); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jun 20 17:39:24 2017 (r320156) @@ -199,19 +199,19 @@ dump_record(dmu_replay_record_t *drr, void *payload, i { ASSERT3U(offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), ==, sizeof (dmu_replay_record_t) - sizeof (zio_cksum_t)); - fletcher_4_incremental_native(drr, + (void) fletcher_4_incremental_native(drr, offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), zc); if (drr->drr_type != DRR_BEGIN) { ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u. drr_checksum.drr_checksum)); drr->drr_u.drr_checksum.drr_checksum = *zc; } - fletcher_4_incremental_native(&drr->drr_u.drr_checksum.drr_checksum, - sizeof (zio_cksum_t), zc); + (void) fletcher_4_incremental_native( + &drr->drr_u.drr_checksum.drr_checksum, sizeof (zio_cksum_t), zc); if (write(outfd, drr, sizeof (*drr)) == -1) return (errno); if (payload_len != 0) { - fletcher_4_incremental_native(payload, payload_len, zc); + (void) fletcher_4_incremental_native(payload, payload_len, zc); if (write(outfd, payload, payload_len) == -1) return (errno); } @@ -2096,9 +2096,9 @@ recv_read(libzfs_handle_t *hdl, int fd, void *buf, int if (zc) { if (byteswap) - fletcher_4_incremental_byteswap(buf, ilen, zc); + (void) fletcher_4_incremental_byteswap(buf, ilen, zc); else - fletcher_4_incremental_native(buf, ilen, zc); + (void) fletcher_4_incremental_native(buf, ilen, zc); } return (0); } @@ -3688,7 +3688,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tos * recv_read() above; do it again correctly. */ bzero(&zcksum, sizeof (zio_cksum_t)); - fletcher_4_incremental_byteswap(&drr, sizeof (drr), &zcksum); + (void) fletcher_4_incremental_byteswap(&drr, + sizeof (drr), &zcksum); flags->byteswap = B_TRUE; drr.drr_type = BSWAP_32(drr.drr_type); Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c Tue Jun 20 17:39:24 2017 (r320156) @@ -24,6 +24,7 @@ */ /* * Copyright 2013 Saso Kiselkov. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. */ /* @@ -133,17 +134,29 @@ #include #include #include +#include -/*ARGSUSED*/ void -fletcher_2_native(const void *buf, uint64_t size, - const void *ctx_template, zio_cksum_t *zcp) +fletcher_init(zio_cksum_t *zcp) { + ZIO_SET_CHECKSUM(zcp, 0, 0, 0, 0); +} + +int +fletcher_2_incremental_native(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); uint64_t a0, b0, a1, b1; - for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2) { + a0 = zcp->zc_word[0]; + a1 = zcp->zc_word[1]; + b0 = zcp->zc_word[2]; + b1 = zcp->zc_word[3]; + + for (; ip < ipend; ip += 2) { a0 += ip[0]; a1 += ip[1]; b0 += a0; @@ -151,18 +164,33 @@ fletcher_2_native(const void *buf, uint64_t size, } ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); + return (0); } /*ARGSUSED*/ void -fletcher_2_byteswap(const void *buf, uint64_t size, +fletcher_2_native(const void *buf, size_t size, const void *ctx_template, zio_cksum_t *zcp) { + fletcher_init(zcp); + (void) fletcher_2_incremental_native((void *) buf, size, zcp); +} + +int +fletcher_2_incremental_byteswap(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); uint64_t a0, b0, a1, b1; - for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2) { + a0 = zcp->zc_word[0]; + a1 = zcp->zc_word[1]; + b0 = zcp->zc_word[2]; + b1 = zcp->zc_word[3]; + + for (; ip < ipend; ip += 2) { a0 += BSWAP_64(ip[0]); a1 += BSWAP_64(ip[1]); b0 += a0; @@ -170,50 +198,23 @@ fletcher_2_byteswap(const void *buf, uint64_t size, } ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); + return (0); } /*ARGSUSED*/ void -fletcher_4_native(const void *buf, uint64_t size, +fletcher_2_byteswap(const void *buf, size_t size, const void *ctx_template, zio_cksum_t *zcp) { - const uint32_t *ip = buf; - const uint32_t *ipend = ip + (size / sizeof (uint32_t)); - uint64_t a, b, c, d; - - for (a = b = c = d = 0; ip < ipend; ip++) { - a += ip[0]; - b += a; - c += b; - d += c; - } - - ZIO_SET_CHECKSUM(zcp, a, b, c, d); + fletcher_init(zcp); + (void) fletcher_2_incremental_byteswap((void *) buf, size, zcp); } -/*ARGSUSED*/ -void -fletcher_4_byteswap(const void *buf, uint64_t size, - const void *ctx_template, zio_cksum_t *zcp) +int +fletcher_4_incremental_native(void *buf, size_t size, void *data) { - const uint32_t *ip = buf; - const uint32_t *ipend = ip + (size / sizeof (uint32_t)); - uint64_t a, b, c, d; + zio_cksum_t *zcp = data; - for (a = b = c = d = 0; ip < ipend; ip++) { - a += BSWAP_32(ip[0]); - b += a; - c += b; - d += c; - } - - ZIO_SET_CHECKSUM(zcp, a, b, c, d); -} - -void -fletcher_4_incremental_native(const void *buf, uint64_t size, - zio_cksum_t *zcp) -{ const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); uint64_t a, b, c, d; @@ -231,12 +232,23 @@ fletcher_4_incremental_native(const void *buf, uint64_ } ZIO_SET_CHECKSUM(zcp, a, b, c, d); + return (0); } +/*ARGSUSED*/ void -fletcher_4_incremental_byteswap(const void *buf, uint64_t size, - zio_cksum_t *zcp) +fletcher_4_native(const void *buf, size_t size, + const void *ctx_template, zio_cksum_t *zcp) { + fletcher_init(zcp); + (void) fletcher_4_incremental_native((void *) buf, size, zcp); +} + +int +fletcher_4_incremental_byteswap(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); uint64_t a, b, c, d; @@ -254,4 +266,14 @@ fletcher_4_incremental_byteswap(const void *buf, uint6 } ZIO_SET_CHECKSUM(zcp, a, b, c, d); + return (0); +} + +/*ARGSUSED*/ +void +fletcher_4_byteswap(const void *buf, size_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + fletcher_init(zcp); + (void) fletcher_4_incremental_byteswap((void *) buf, size, zcp); } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h Tue Jun 20 17:38:25 2017 (r320155) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h Tue Jun 20 17:39:24 2017 (r320156) @@ -24,6 +24,7 @@ */ /* * Copyright 2013 Saso Kiselkov. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. */ #ifndef _ZFS_FLETCHER_H @@ -40,12 +41,15 @@ extern "C" { * fletcher checksum functions */ -void fletcher_2_native(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_2_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_native(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_incremental_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_incremental_byteswap(const void *, uint64_t, zio_cksum_t *); +void fletcher_init(zio_cksum_t *); +void fletcher_2_native(const void *, size_t, const void *, zio_cksum_t *); +void fletcher_2_byteswap(const void *, size_t, const void *, zio_cksum_t *); +int fletcher_2_incremental_native(void *, size_t, void *); +int fletcher_2_incremental_byteswap(void *, size_t, void *); +void fletcher_4_native(const void *, size_t, const void *, zio_cksum_t *); +void fletcher_4_byteswap(const void *, size_t, const void *, zio_cksum_t *); +int fletcher_4_incremental_native(void *, size_t, void *); +int fletcher_4_incremental_byteswap(void *, size_t, void *); #ifdef __cplusplus } Modified: head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Tue Jun 20 17:38:25 2017 (r320155) +++ head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Tue Jun 20 17:39:24 2017 (r320156) @@ -33,6 +33,7 @@ # common to all SunOS systems. ZFS_COMMON_OBJS += \ + abd.o \ arc.o \ bplist.o \ blkptr.o \ Copied and modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c (from r318946, vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c) ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c Fri May 26 12:13:27 2017 (r318946, copy source) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Jun 20 17:39:24 2017 (r320156) @@ -174,6 +174,7 @@ abd_free_chunk(void *c) void abd_init(void) { +#ifdef illumos vmem_t *data_alloc_arena = NULL; #ifdef _KERNEL @@ -186,7 +187,10 @@ abd_init(void) */ abd_chunk_cache = kmem_cache_create("abd_chunk", zfs_abd_chunk_size, 0, NULL, NULL, NULL, NULL, data_alloc_arena, KMC_NOTOUCH); - +#else + abd_chunk_cache = kmem_cache_create("abd_chunk", zfs_abd_chunk_size, 0, + NULL, NULL, NULL, NULL, 0, KMC_NOTOUCH | KMC_NODEBUG); +#endif abd_ksp = kstat_create("zfs", 0, "abdstats", "misc", KSTAT_TYPE_NAMED, sizeof (abd_stats) / sizeof (kstat_named_t), KSTAT_FLAG_VIRTUAL); if (abd_ksp != NULL) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 20 17:38:25 2017 (r320155) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 20 17:39:24 2017 (r320156) @@ -128,14 +128,14 @@ * the arc_buf_hdr_t that will point to the data block in memory. A block can * only be read by a consumer if it has an l1arc_buf_hdr_t. The L1ARC * caches data in two ways -- in a list of ARC buffers (arc_buf_t) and - * also in the arc_buf_hdr_t's private physical data block pointer (b_pdata). + * also in the arc_buf_hdr_t's private physical data block pointer (b_pabd). * * The L1ARC's data pointer may or may not be uncompressed. The ARC has the - * ability to store the physical data (b_pdata) associated with the DVA of the - * arc_buf_hdr_t. Since the b_pdata is a copy of the on-disk physical block, + * ability to store the physical data (b_pabd) associated with the DVA of the + * arc_buf_hdr_t. Since the b_pabd is a copy of the on-disk physical block, * it will match its on-disk compression characteristics. This behavior can be * disabled by setting 'zfs_compressed_arc_enabled' to B_FALSE. When the - * compressed ARC functionality is disabled, the b_pdata will point to an + * compressed ARC functionality is disabled, the b_pabd will point to an * uncompressed version of the on-disk data. * * Data in the L1ARC is not accessed by consumers of the ARC directly. Each @@ -174,7 +174,7 @@ * | l1arc_buf_hdr_t * | | arc_buf_t * | b_buf +------------>+-----------+ arc_buf_t - * | b_pdata +-+ |b_next +---->+-----------+ + * | b_pabd +-+ |b_next +---->+-----------+ * +-----------+ | |-----------| |b_next +-->NULL * | |b_comp = T | +-----------+ * | |b_data +-+ |b_comp = F | @@ -191,8 +191,8 @@ * When a consumer reads a block, the ARC must first look to see if the * arc_buf_hdr_t is cached. If the hdr is cached then the ARC allocates a new * arc_buf_t and either copies uncompressed data into a new data buffer from an - * existing uncompressed arc_buf_t, decompresses the hdr's b_pdata buffer into a - * new data buffer, or shares the hdr's b_pdata buffer, depending on whether the + * existing uncompressed arc_buf_t, decompresses the hdr's b_pabd buffer into a + * new data buffer, or shares the hdr's b_pabd buffer, depending on whether the * hdr is compressed and the desired compression characteristics of the * arc_buf_t consumer. If the arc_buf_t ends up sharing data with the * arc_buf_hdr_t and both of them are uncompressed then the arc_buf_t must be @@ -216,7 +216,7 @@ * | | arc_buf_t (shared) * | b_buf +------------>+---------+ arc_buf_t * | | |b_next +---->+---------+ - * | b_pdata +-+ |---------| |b_next +-->NULL + * | b_pabd +-+ |---------| |b_next +-->NULL * +-----------+ | | | +---------+ * | |b_data +-+ | | * | +---------+ | |b_data +-+ @@ -230,19 +230,19 @@ * | +------+ | * +---------------------------------+ * - * Writing to the ARC requires that the ARC first discard the hdr's b_pdata + * Writing to the ARC requires that the ARC first discard the hdr's b_pabd * since the physical block is about to be rewritten. The new data contents * will be contained in the arc_buf_t. As the I/O pipeline performs the write, * it may compress the data before writing it to disk. The ARC will be called * with the transformed data and will bcopy the transformed on-disk block into - * a newly allocated b_pdata. Writes are always done into buffers which have + * a newly allocated b_pabd. Writes are always done into buffers which have * either been loaned (and hence are new and don't have other readers) or * buffers which have been released (and hence have their own hdr, if there * were originally other readers of the buf's original hdr). This ensures that * the ARC only needs to update a single buf and its hdr after a write occurs. * - * When the L2ARC is in use, it will also take advantage of the b_pdata. The - * L2ARC will always write the contents of b_pdata to the L2ARC. This means + * When the L2ARC is in use, it will also take advantage of the b_pabd. The + * L2ARC will always write the contents of b_pabd to the L2ARC. This means * that when compressed ARC is enabled that the L2ARC blocks are identical * to the on-disk block in the main data pool. This provides a significant * advantage since the ARC can leverage the bp's checksum when reading from the @@ -263,7 +263,9 @@ #include #include #include +#include #include +#include #ifdef _KERNEL #include #include @@ -307,7 +309,7 @@ int zfs_arc_evict_batch_limit = 10; /* number of seconds before growing cache again */ static int arc_grow_retry = 60; -/* shift of arc_c for calculating overflow limit in arc_get_data_buf */ +/* shift of arc_c for calculating overflow limit in arc_get_data_impl */ int zfs_arc_overflow_shift = 8; /* shift of arc_c for calculating both min and max arc_p */ @@ -543,13 +545,13 @@ typedef struct arc_stats { kstat_named_t arcstat_c_max; kstat_named_t arcstat_size; /* - * Number of compressed bytes stored in the arc_buf_hdr_t's b_pdata. + * Number of compressed bytes stored in the arc_buf_hdr_t's b_pabd. * Note that the compressed bytes may match the uncompressed bytes * if the block is either not compressed or compressed arc is disabled. */ kstat_named_t arcstat_compressed_size; /* - * Uncompressed size of the data stored in b_pdata. If compressed + * Uncompressed size of the data stored in b_pabd. If compressed * arc is disabled then this value will be identical to the stat * above. */ @@ -988,7 +990,7 @@ typedef struct l1arc_buf_hdr { refcount_t b_refcnt; arc_callback_t *b_acb; - void *b_pdata; + abd_t *b_pabd; } l1arc_buf_hdr_t; typedef struct l2arc_dev l2arc_dev_t; @@ -1341,7 +1343,7 @@ typedef struct l2arc_read_callback { blkptr_t l2rcb_bp; /* original blkptr */ zbookmark_phys_t l2rcb_zb; /* original bookmark */ int l2rcb_flags; /* original flags */ - void *l2rcb_data; /* temporary buffer */ + void *l2rcb_abd; /* temporary buffer */ } l2arc_read_callback_t; typedef struct l2arc_write_callback { @@ -1351,7 +1353,7 @@ typedef struct l2arc_write_callback { typedef struct l2arc_data_free { /* protected by l2arc_free_on_write_mtx */ - void *l2df_data; + abd_t *l2df_abd; size_t l2df_size; arc_buf_contents_t l2df_type; list_node_t l2df_list_node; @@ -1361,10 +1363,14 @@ static kmutex_t l2arc_feed_thr_lock; static kcondvar_t l2arc_feed_thr_cv; static uint8_t l2arc_thread_exit; +static abd_t *arc_get_data_abd(arc_buf_hdr_t *, uint64_t, void *); static void *arc_get_data_buf(arc_buf_hdr_t *, uint64_t, void *); +static void arc_get_data_impl(arc_buf_hdr_t *, uint64_t, void *); +static void arc_free_data_abd(arc_buf_hdr_t *, abd_t *, uint64_t, void *); static void arc_free_data_buf(arc_buf_hdr_t *, void *, uint64_t, void *); -static void arc_hdr_free_pdata(arc_buf_hdr_t *hdr); -static void arc_hdr_alloc_pdata(arc_buf_hdr_t *); +static void arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, void *tag); +static void arc_hdr_free_pabd(arc_buf_hdr_t *); +static void arc_hdr_alloc_pabd(arc_buf_hdr_t *); static void arc_access(arc_buf_hdr_t *, kmutex_t *); static boolean_t arc_is_overflowing(); static void arc_buf_watch(arc_buf_t *); @@ -1718,7 +1724,9 @@ static inline boolean_t arc_buf_is_shared(arc_buf_t *buf) { boolean_t shared = (buf->b_data != NULL && - buf->b_data == buf->b_hdr->b_l1hdr.b_pdata); + buf->b_hdr->b_l1hdr.b_pabd != NULL && + abd_is_linear(buf->b_hdr->b_l1hdr.b_pabd) && + buf->b_data == abd_to_buf(buf->b_hdr->b_l1hdr.b_pabd)); IMPLY(shared, HDR_SHARED_DATA(buf->b_hdr)); IMPLY(shared, ARC_BUF_SHARED(buf)); IMPLY(shared, ARC_BUF_COMPRESSED(buf) || ARC_BUF_LAST(buf)); @@ -1822,7 +1830,8 @@ arc_cksum_is_equal(arc_buf_hdr_t *hdr, zio_t *zio) uint64_t csize; void *cbuf = zio_buf_alloc(HDR_GET_PSIZE(hdr)); - csize = zio_compress_data(compress, zio->io_data, cbuf, lsize); + csize = zio_compress_data(compress, zio->io_abd, cbuf, lsize); + ASSERT3U(csize, <=, HDR_GET_PSIZE(hdr)); if (csize < HDR_GET_PSIZE(hdr)) { /* @@ -1857,7 +1866,7 @@ arc_cksum_is_equal(arc_buf_hdr_t *hdr, zio_t *zio) * logical I/O size and not just a gang fragment. */ valid_cksum = (zio_checksum_error_impl(zio->io_spa, zio->io_bp, - BP_GET_CHECKSUM(zio->io_bp), zio->io_data, zio->io_size, + BP_GET_CHECKSUM(zio->io_bp), zio->io_abd, zio->io_size, zio->io_offset, NULL) == 0); zio_pop_transforms(zio); return (valid_cksum); @@ -2161,7 +2170,7 @@ arc_buf_fill(arc_buf_t *buf, boolean_t compressed) if (hdr_compressed == compressed) { if (!arc_buf_is_shared(buf)) { - bcopy(hdr->b_l1hdr.b_pdata, buf->b_data, + abd_copy_to_buf(buf->b_data, hdr->b_l1hdr.b_pabd, arc_buf_size(buf)); } } else { @@ -2213,7 +2222,7 @@ arc_buf_fill(arc_buf_t *buf, boolean_t compressed) return (0); } else { int error = zio_decompress_data(HDR_GET_COMPRESS(hdr), - hdr->b_l1hdr.b_pdata, buf->b_data, + hdr->b_l1hdr.b_pabd, buf->b_data, HDR_GET_PSIZE(hdr), HDR_GET_LSIZE(hdr)); /* @@ -2250,7 +2259,7 @@ arc_decompress(arc_buf_t *buf) } /* - * Return the size of the block, b_pdata, that is stored in the arc_buf_hdr_t. + * Return the size of the block, b_pabd, that is stored in the arc_buf_hdr_t. */ static uint64_t arc_hdr_size(arc_buf_hdr_t *hdr) @@ -2282,14 +2291,14 @@ arc_evictable_space_increment(arc_buf_hdr_t *hdr, arc_ if (GHOST_STATE(state)) { ASSERT0(hdr->b_l1hdr.b_bufcnt); ASSERT3P(hdr->b_l1hdr.b_buf, ==, NULL); - ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, ==, NULL); (void) refcount_add_many(&state->arcs_esize[type], HDR_GET_LSIZE(hdr), hdr); return; } ASSERT(!GHOST_STATE(state)); - if (hdr->b_l1hdr.b_pdata != NULL) { + if (hdr->b_l1hdr.b_pabd != NULL) { (void) refcount_add_many(&state->arcs_esize[type], arc_hdr_size(hdr), hdr); } @@ -2317,14 +2326,14 @@ arc_evictable_space_decrement(arc_buf_hdr_t *hdr, arc_ if (GHOST_STATE(state)) { ASSERT0(hdr->b_l1hdr.b_bufcnt); ASSERT3P(hdr->b_l1hdr.b_buf, ==, NULL); - ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, ==, NULL); (void) refcount_remove_many(&state->arcs_esize[type], HDR_GET_LSIZE(hdr), hdr); return; } ASSERT(!GHOST_STATE(state)); - if (hdr->b_l1hdr.b_pdata != NULL) { + if (hdr->b_l1hdr.b_pabd != NULL) { (void) refcount_remove_many(&state->arcs_esize[type], arc_hdr_size(hdr), hdr); } @@ -2421,7 +2430,7 @@ arc_change_state(arc_state_t *new_state, arc_buf_hdr_t old_state = hdr->b_l1hdr.b_state; refcnt = refcount_count(&hdr->b_l1hdr.b_refcnt); bufcnt = hdr->b_l1hdr.b_bufcnt; - update_old = (bufcnt > 0 || hdr->b_l1hdr.b_pdata != NULL); + update_old = (bufcnt > 0 || hdr->b_l1hdr.b_pabd != NULL); } else { old_state = arc_l2c_only; refcnt = 0; @@ -2491,7 +2500,7 @@ arc_change_state(arc_state_t *new_state, arc_buf_hdr_t */ (void) refcount_add_many(&new_state->arcs_size, HDR_GET_LSIZE(hdr), hdr); - ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, ==, NULL); } else { uint32_t buffers = 0; @@ -2520,7 +2529,7 @@ arc_change_state(arc_state_t *new_state, arc_buf_hdr_t } ASSERT3U(bufcnt, ==, buffers); - if (hdr->b_l1hdr.b_pdata != NULL) { + if (hdr->b_l1hdr.b_pabd != NULL) { (void) refcount_add_many(&new_state->arcs_size, arc_hdr_size(hdr), hdr); } else { @@ -2533,7 +2542,7 @@ arc_change_state(arc_state_t *new_state, arc_buf_hdr_t ASSERT(HDR_HAS_L1HDR(hdr)); if (GHOST_STATE(old_state)) { ASSERT0(bufcnt); - ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, ==, NULL); /* * When moving a header off of a ghost state, @@ -2573,7 +2582,7 @@ arc_change_state(arc_state_t *new_state, arc_buf_hdr_t buf); } ASSERT3U(bufcnt, ==, buffers); - ASSERT3P(hdr->b_l1hdr.b_pdata, !=, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, !=, NULL); (void) refcount_remove_many( &old_state->arcs_size, arc_hdr_size(hdr), hdr); } @@ -2655,7 +2664,7 @@ arc_space_return(uint64_t space, arc_space_type_t type /* * Given a hdr and a buf, returns whether that buf can share its b_data buffer - * with the hdr's b_pdata. + * with the hdr's b_pabd. */ static boolean_t arc_can_share(arc_buf_hdr_t *hdr, arc_buf_t *buf) @@ -2732,20 +2741,23 @@ arc_buf_alloc_impl(arc_buf_hdr_t *hdr, void *tag, bool /* * If the hdr's data can be shared then we share the data buffer and * set the appropriate bit in the hdr's b_flags to indicate the hdr is - * sharing it's b_pdata with the arc_buf_t. Otherwise, we allocate a new + * sharing it's b_pabd with the arc_buf_t. Otherwise, we allocate a new * buffer to store the buf's data. * - * There is one additional restriction here because we're sharing - * hdr -> buf instead of the usual buf -> hdr: the hdr can't be actively - * involved in an L2ARC write, because if this buf is used by an - * arc_write() then the hdr's data buffer will be released when the + * There are two additional restrictions here because we're sharing + * hdr -> buf instead of the usual buf -> hdr. First, the hdr can't be + * actively involved in an L2ARC write, because if this buf is used by + * an arc_write() then the hdr's data buffer will be released when the * write completes, even though the L2ARC write might still be using it. + * Second, the hdr's ABD must be linear so that the buf's user doesn't + * need to be ABD-aware. */ - boolean_t can_share = arc_can_share(hdr, buf) && !HDR_L2_WRITING(hdr); + boolean_t can_share = arc_can_share(hdr, buf) && !HDR_L2_WRITING(hdr) && + abd_is_linear(hdr->b_l1hdr.b_pabd); /* Set up b_data and sharing */ if (can_share) { - buf->b_data = hdr->b_l1hdr.b_pdata; + buf->b_data = abd_to_buf(hdr->b_l1hdr.b_pabd); buf->b_flags |= ARC_BUF_FLAG_SHARED; arc_hdr_set_flags(hdr, ARC_FLAG_SHARED_DATA); } else { @@ -2841,11 +2853,11 @@ arc_loan_inuse_buf(arc_buf_t *buf, void *tag) } static void -l2arc_free_data_on_write(void *data, size_t size, arc_buf_contents_t type) +l2arc_free_abd_on_write(abd_t *abd, size_t size, arc_buf_contents_t type) { l2arc_data_free_t *df = kmem_alloc(sizeof (*df), KM_SLEEP); - df->l2df_data = data; + df->l2df_abd = abd; df->l2df_size = size; df->l2df_type = type; mutex_enter(&l2arc_free_on_write_mtx); @@ -2876,7 +2888,7 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr) arc_space_return(size, ARC_SPACE_DATA); } - l2arc_free_data_on_write(hdr->b_l1hdr.b_pdata, size, type); + l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type); } /* @@ -2890,7 +2902,7 @@ arc_share_buf(arc_buf_hdr_t *hdr, arc_buf_t *buf) arc_state_t *state = hdr->b_l1hdr.b_state; ASSERT(arc_can_share(hdr, buf)); - ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, ==, NULL); ASSERT(MUTEX_HELD(HDR_LOCK(hdr)) || HDR_EMPTY(hdr)); /* @@ -2899,7 +2911,9 @@ arc_share_buf(arc_buf_hdr_t *hdr, arc_buf_t *buf) * the refcount whenever an arc_buf_t is shared. */ refcount_transfer_ownership(&state->arcs_size, buf, hdr); - hdr->b_l1hdr.b_pdata = buf->b_data; + hdr->b_l1hdr.b_pabd = abd_get_from_buf(buf->b_data, arc_buf_size(buf)); + abd_take_ownership_of_buf(hdr->b_l1hdr.b_pabd, + HDR_ISTYPE_METADATA(hdr)); arc_hdr_set_flags(hdr, ARC_FLAG_SHARED_DATA); buf->b_flags |= ARC_BUF_FLAG_SHARED; @@ -2919,7 +2933,7 @@ arc_unshare_buf(arc_buf_hdr_t *hdr, arc_buf_t *buf) arc_state_t *state = hdr->b_l1hdr.b_state; ASSERT(arc_buf_is_shared(buf)); - ASSERT3P(hdr->b_l1hdr.b_pdata, !=, NULL); + ASSERT3P(hdr->b_l1hdr.b_pabd, !=, NULL); ASSERT(MUTEX_HELD(HDR_LOCK(hdr)) || HDR_EMPTY(hdr)); /* @@ -2928,7 +2942,9 @@ arc_unshare_buf(arc_buf_hdr_t *hdr, arc_buf_t *buf) */ refcount_transfer_ownership(&state->arcs_size, hdr, buf); arc_hdr_clear_flags(hdr, ARC_FLAG_SHARED_DATA); - hdr->b_l1hdr.b_pdata = NULL; + abd_release_ownership_of_buf(hdr->b_l1hdr.b_pabd); + abd_put(hdr->b_l1hdr.b_pabd); + hdr->b_l1hdr.b_pabd = NULL; buf->b_flags &= ~ARC_BUF_FLAG_SHARED; /* @@ -3025,7 +3041,7 @@ arc_buf_destroy_impl(arc_buf_t *buf) if (ARC_BUF_SHARED(buf) && !ARC_BUF_COMPRESSED(buf)) { /* * If the current arc_buf_t is sharing its data buffer with the - * hdr, then reassign the hdr's b_pdata to share it with the new + * hdr, then reassign the hdr's b_pabd to share it with the new * buffer at the end of the list. The shared buffer is always * the last one on the hdr's buffer list. * @@ -3040,8 +3056,8 @@ arc_buf_destroy_impl(arc_buf_t *buf) /* hdr is uncompressed so can't have compressed buf */ VERIFY(!ARC_BUF_COMPRESSED(lastbuf)); - ASSERT3P(hdr->b_l1hdr.b_pdata, !=, NULL); - arc_hdr_free_pdata(hdr); + ASSERT3P(hdr->b_l1hdr.b_pabd, !=, NULL); + arc_hdr_free_pabd(hdr); /* * We must setup a new shared block between the @@ -3079,26 +3095,26 @@ arc_buf_destroy_impl(arc_buf_t *buf) } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 20 17:50:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2D9BD9DEEF; Tue, 20 Jun 2017 17:50:30 +0000 (UTC) (envelope-from David.Somayajulu@cavium.com) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0082.outbound.protection.outlook.com [104.47.36.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49F37683A1; Tue, 20 Jun 2017 17:50:29 +0000 (UTC) (envelope-from David.Somayajulu@cavium.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YeIHDaoCSelipa3mZ6ueKA/HZBQ/i9VdDzv05I9jbwc=; b=ViqJLST5tSfujyFXA1JXAAq7knOqEHhsvwGg1K5VFQO2LCJaubjXcERBl1nWOcvhxgBwSZilwIJBM0F/bDB0Janmr/tAslFAdiafhE7uy5H8SIS6ANurqmTdwwGeua/5YpA2dZ1TgWxzD0/AQD7sZoP+zjiMXROOUDiNyceD/ew= Received: from BY2PR07MB1474.namprd07.prod.outlook.com (10.162.76.152) by BY2PR07MB1473.namprd07.prod.outlook.com (10.162.76.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 20 Jun 2017 17:50:22 +0000 Received: from BY2PR07MB1474.namprd07.prod.outlook.com ([10.162.76.152]) by BY2PR07MB1474.namprd07.prod.outlook.com ([10.162.76.152]) with mapi id 15.01.1157.022; Tue, 20 Jun 2017 17:50:22 +0000 From: "Somayajulu, David" To: Cy Schubert , David C Somayajulu CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: RE: svn commit: r319964 - head/sys/dev/qlnx/qlnxe Thread-Topic: svn commit: r319964 - head/sys/dev/qlnx/qlnxe Thread-Index: AQHS5YSXzsISCNMeOkiL6TMucLqxDaIuD0gg Date: Tue, 20 Jun 2017 17:50:22 +0000 Message-ID: References: Message from David C Somayajulu of "Thu, 15 Jun 2017 02:45:43 -0000." <201706150245.v5F2jhna021469@repo.freebsd.org> <201706150307.v5F37wLG052878@slippy.cwsent.com> In-Reply-To: <201706150307.v5F37wLG052878@slippy.cwsent.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: komquats.com; dkim=none (message not signed) header.d=none;komquats.com; dmarc=none action=none header.from=cavium.com; x-originating-ip: [198.186.0.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BY2PR07MB1473; 7:MgAtHkwDsckT6wCZB/kEFeDce5pQ46IPNOcxPq06CMoWXGsD7pDUCh8t3HhRLpiI7VhYBn9JvBNBLsc/f7Zhv+xIkAPIXf7/AUJqZqSEDWGYAX3iyWBLafCHoCOUcHT11VBYM/w0Vn2tY1td2ndvIsVZr5qkxsbWXrzmfbYYus9LBl/vqNv64EYl8QG5BYB1DIf6fRrGYJ7E+l/HqpTcOAC9fWygyJDQERONxJHX10JJ4GvRWsy8Vt8hq7+aXpRHYnseigo/n9McEfAA8DUL7l9ETVbiVhuWyBV9HT3r2jDiJIkUR7E+F7dmOYRMuvDqzprfVmVKzIETGVjknbcpmmKJj2uAlqQU1CvNoZVi9Qe+dblFTRRv4l/JvpLU0et8tjEeuVlmw7WaUz9A9Ww7R9d/cqiwvH/LL8iVOxGHzvMtNDM7fJ0OBUtYdI0+Oa2BgI2SLj18d3Bga9KlBE3IfmrNMM8XVElvwm/i6+O0dGxXGcJUNVW9QDevYU69r7ZON9uW69luIkjBZYwiFitZwpo97epKnfxmtvEx2clBD7VSvawteDMjgFer81Hi9Ee4u+X4V+UY3eRs1AoUEKY/rR4gFJAqYiOtSlLX8I7NLI5Fc/XwIRn9VoGbQpXHCLa8RjgHOVETNB8HPs1rV5nia/O8VrtuctSiyWuY7dyoco8B/t9nmYMIopUN/lUCNlCZDfwBk5OT+PkBlJMLs/91tphnE6kaSE19im505Q2rUHTwE0b+/ydbPy5c0pJmB1YwjYBzkNTz4DthpAMpxerw0QVBlW5ZS4WZM3AQzPmQrxs= x-ms-office365-filtering-correlation-id: 50048ceb-37d1-4bc0-c06b-08d4b804d2dd x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR07MB1473; x-ms-traffictypediagnostic: BY2PR07MB1473: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6041248)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR07MB1473; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR07MB1473; x-forefront-prvs: 03449D5DD1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39850400002)(39450400003)(39410400002)(39400400002)(377454003)(13464003)(86362001)(6436002)(74316002)(8676002)(33656002)(6306002)(53936002)(76176999)(9686003)(50986999)(81166006)(55016002)(99286003)(305945005)(2950100002)(54906002)(72206003)(7736002)(966005)(54356999)(77096006)(14454004)(229853002)(6506006)(2906002)(66066001)(3660700001)(3280700002)(189998001)(122556002)(2900100001)(4326008)(5660300001)(53386004)(102836003)(478600001)(6116002)(8936002)(25786009)(3846002)(53546009)(6246003)(38730400002)(7696004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB1473; H:BY2PR07MB1474.namprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2017 17:50:22.0241 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB1473 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:50:30 -0000 Hi Cy, > Tell me if I'm off base here but this driver comes directly from Cavium, = right?=20 Yes >Why was it never imported into vendor-sys and MFVed into head like other v= endor source? Not sure what vendor-sys is but the driver was reviewed in phabricator (ple= ase see link below) prior to committing to head. https://reviews.freebsd.org/D10134 thanks david S. -----Original Message----- From: Cy Schubert [mailto:Cy.Schubert@komquats.com]=20 Sent: Wednesday, June 14, 2017 8:08 PM To: David C Somayajulu Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r319964 - head/sys/dev/qlnx/qlnxe In message <201706150245.v5F2jhna021469@repo.freebsd.org>, David C Somayaju= lu w rites: > Author: davidcs > Date: Thu Jun 15 02:45:43 2017 > New Revision: 319964 > URL: https://svnweb.freebsd.org/changeset/base/319964 >=20 > Log: > Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 > Add support for pci deviceID 0x8070 for QLE41xxx product line which > supports 10GbE/25GbE/40GbE > =20 > MFC after:5 days >=20 > Modified: > head/sys/dev/qlnx/qlnxe/bcm_osal.h > head/sys/dev/qlnx/qlnxe/common_hsi.h > head/sys/dev/qlnx/qlnxe/ecore.h > head/sys/dev/qlnx/qlnxe/ecore_chain.h > head/sys/dev/qlnx/qlnxe/ecore_cxt.c > head/sys/dev/qlnx/qlnxe/ecore_cxt.h > head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c > head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h > head/sys/dev/qlnx/qlnxe/ecore_dbg_values.h > head/sys/dev/qlnx/qlnxe/ecore_dcbx.c > head/sys/dev/qlnx/qlnxe/ecore_dcbx.h > head/sys/dev/qlnx/qlnxe/ecore_dev.c > head/sys/dev/qlnx/qlnxe/ecore_dev_api.h > head/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h > head/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_common.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h > head/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h > head/sys/dev/qlnx/qlnxe/ecore_hw.c > head/sys/dev/qlnx/qlnxe/ecore_hw.h > head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c > head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h > head/sys/dev/qlnx/qlnxe/ecore_init_ops.c > head/sys/dev/qlnx/qlnxe/ecore_init_ops.h > head/sys/dev/qlnx/qlnxe/ecore_init_values.h > head/sys/dev/qlnx/qlnxe/ecore_int.c > head/sys/dev/qlnx/qlnxe/ecore_int.h > head/sys/dev/qlnx/qlnxe/ecore_int_api.h > head/sys/dev/qlnx/qlnxe/ecore_iov_api.h > head/sys/dev/qlnx/qlnxe/ecore_iro.h > head/sys/dev/qlnx/qlnxe/ecore_iro_values.h > head/sys/dev/qlnx/qlnxe/ecore_iscsi.h > head/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h > head/sys/dev/qlnx/qlnxe/ecore_l2.c > head/sys/dev/qlnx/qlnxe/ecore_l2.h > head/sys/dev/qlnx/qlnxe/ecore_l2_api.h > head/sys/dev/qlnx/qlnxe/ecore_ll2.h > head/sys/dev/qlnx/qlnxe/ecore_ll2_api.h > head/sys/dev/qlnx/qlnxe/ecore_mcp.c > head/sys/dev/qlnx/qlnxe/ecore_mcp.h > head/sys/dev/qlnx/qlnxe/ecore_mcp_api.h > head/sys/dev/qlnx/qlnxe/ecore_ooo.h > head/sys/dev/qlnx/qlnxe/ecore_proto_if.h > head/sys/dev/qlnx/qlnxe/ecore_roce.h > head/sys/dev/qlnx/qlnxe/ecore_roce_api.h > head/sys/dev/qlnx/qlnxe/ecore_rt_defs.h > head/sys/dev/qlnx/qlnxe/ecore_sp_api.h > head/sys/dev/qlnx/qlnxe/ecore_sp_commands.c > head/sys/dev/qlnx/qlnxe/ecore_sp_commands.h > head/sys/dev/qlnx/qlnxe/ecore_spq.c > head/sys/dev/qlnx/qlnxe/ecore_sriov.h > head/sys/dev/qlnx/qlnxe/ecore_vf.h > head/sys/dev/qlnx/qlnxe/ecore_vf_api.h > head/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h > head/sys/dev/qlnx/qlnxe/eth_common.h > head/sys/dev/qlnx/qlnxe/fcoe_common.h > head/sys/dev/qlnx/qlnxe/iscsi_common.h > head/sys/dev/qlnx/qlnxe/mcp_private.h > head/sys/dev/qlnx/qlnxe/mcp_public.h > head/sys/dev/qlnx/qlnxe/mfw_hsi.h > head/sys/dev/qlnx/qlnxe/nvm_cfg.h > head/sys/dev/qlnx/qlnxe/nvm_map.h > head/sys/dev/qlnx/qlnxe/pcics_reg_driver.h > head/sys/dev/qlnx/qlnxe/qlnx_def.h > head/sys/dev/qlnx/qlnxe/qlnx_os.c > head/sys/dev/qlnx/qlnxe/qlnx_ver.h > head/sys/dev/qlnx/qlnxe/rdma_common.h > head/sys/dev/qlnx/qlnxe/reg_addr.h > head/sys/dev/qlnx/qlnxe/spad_layout.h > head/sys/dev/qlnx/qlnxe/storage_common.h > head/sys/dev/qlnx/qlnxe/tcp_common.h >=20 [...] Hi David, Tell me if I'm off base here but this driver comes directly from Cavium, ri= ght? Why was it never imported into vendor-sys and MFVed into head like oth= er vendor source? -- 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-all@freebsd.org Tue Jun 20 18:11:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32684D9E5B4; Tue, 20 Jun 2017 18:11:25 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D34868E48; Tue, 20 Jun 2017 18:11:24 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIBOlO064196; Tue, 20 Jun 2017 18:11:24 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIBO8c064194; Tue, 20 Jun 2017 18:11:24 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706201811.v5KIBO8c064194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Jun 2017 18:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320157 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:11:25 -0000 Author: loos Date: Tue Jun 20 18:11:23 2017 New Revision: 320157 URL: https://svnweb.freebsd.org/changeset/base/320157 Log: Add support to 2.5G uplink for the MV88E6141 and MV88E6341 switches. Force the switch port settings for fixed media types. Tested with: 88E6176, 88E6141 Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Jun 20 17:39:24 2017 (r320156) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Jun 20 18:11:23 2017 (r320157) @@ -71,8 +71,10 @@ typedef struct e6000sw_softc { device_t miibus[E6000SW_MAX_PORTS]; struct proc *kproc; + uint32_t swid; uint32_t cpuports_mask; uint32_t fixed_mask; + uint32_t fixed25_mask; uint32_t ports_mask; int phy_base; int sw_addr; @@ -126,6 +128,7 @@ static int e6000sw_get_pvid(e6000sw_softc_t *, int, in static int e6000sw_set_pvid(e6000sw_softc_t *, int, int); static __inline bool e6000sw_is_cpuport(e6000sw_softc_t *, int); static __inline bool e6000sw_is_fixedport(e6000sw_softc_t *, int); +static __inline bool e6000sw_is_fixed25port(e6000sw_softc_t *, int); static __inline bool e6000sw_is_phyport(e6000sw_softc_t *, int); static __inline bool e6000sw_is_portenabled(e6000sw_softc_t *, int); static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *, @@ -198,7 +201,6 @@ e6000sw_probe(device_t dev) e6000sw_softc_t *sc; const char *description; phandle_t dsa_node, switch_node; - uint32_t id; dsa_node = fdt_find_compatible(OF_finddevice("/"), "marvell,dsa", 0); @@ -223,35 +225,35 @@ e6000sw_probe(device_t dev) */ sx_init(&sc->sx, "e6000sw_tmp"); E6000SW_LOCK(sc); - id = e6000sw_readreg(sc, REG_PORT(0), SWITCH_ID); + sc->swid = e6000sw_readreg(sc, REG_PORT(0), SWITCH_ID) & 0xfff0; E6000SW_UNLOCK(sc); sx_destroy(&sc->sx); - switch (id & 0xfff0) { - case 0x3400: + switch (sc->swid) { + case MV88E6141: description = "Marvell 88E6141"; sc->phy_base = 0x10; sc->num_ports = 6; break; - case 0x3410: + case MV88E6341: description = "Marvell 88E6341"; sc->phy_base = 0x10; sc->num_ports = 6; break; - case 0x3520: + case MV88E6352: description = "Marvell 88E6352"; sc->num_ports = 7; break; - case 0x1720: + case MV88E6172: description = "Marvell 88E6172"; sc->num_ports = 7; break; - case 0x1760: + case MV88E6176: description = "Marvell 88E6176"; sc->num_ports = 7; break; default: - device_printf(dev, "Unrecognized device, id 0x%x.\n", id); + device_printf(dev, "Unrecognized device, id 0x%x.\n", sc->swid); return (ENXIO); } @@ -261,18 +263,22 @@ e6000sw_probe(device_t dev) } static int -e6000sw_parse_child_fdt(e6000sw_softc_t *sc, phandle_t child, - uint32_t *fixed_mask, uint32_t *cpu_mask, int *pport, int *pvlangroup) +e6000sw_parse_child_fdt(e6000sw_softc_t *sc, phandle_t child, int *pport, + int *pvlangroup) { - boolean_t fixed_link; - char portlabel[100]; + char *name, *portlabel; + int speed; + phandle_t fixed_link; uint32_t port, vlangroup; - if (fixed_mask == NULL || cpu_mask == NULL || pport == NULL) + if (pport == NULL || pvlangroup == NULL) return (ENXIO); - OF_getprop(child, "label", (void *)portlabel, sizeof(portlabel)); - OF_getencprop(child, "reg", (void *)&port, sizeof(port)); + if (OF_getencprop(child, "reg", (void *)&port, sizeof(port)) < 0) + return (ENXIO); + if (port >= sc->num_ports) + return (ENXIO); + *pport = port; if (OF_getencprop(child, "vlangroup", (void *)&vlangroup, sizeof(vlangroup)) > 0) { @@ -283,22 +289,36 @@ e6000sw_parse_child_fdt(e6000sw_softc_t *sc, phandle_t *pvlangroup = -1; } - if (port >= sc->num_ports) - return (ENXIO); - *pport = port; - - if (strncmp(portlabel, "cpu", 3) == 0) { - device_printf(sc->dev, "CPU port at %d\n", port); - *cpu_mask |= (1 << port); + if (OF_getprop_alloc(child, "label", 1, (void **)&portlabel) > 0) { + if (strncmp(portlabel, "cpu", 3) == 0) { + device_printf(sc->dev, "CPU port at %d\n", port); + sc->cpuports_mask |= (1 << port); + sc->fixed_mask |= (1 << port); + } + free(portlabel, M_OFWPROP); } fixed_link = OF_child(child); - if (fixed_link) { - *fixed_mask |= (1 << port); + if (fixed_link != 0 && + OF_getprop_alloc(fixed_link, "name", 1, (void **)&name) > 0) { + if (strncmp(name, "fixed-link", 10) == 0) { + /* Assume defaults: 1g - full-duplex. */ + sc->fixed_mask |= (1 << port); + if (OF_getencprop(fixed_link, "speed", &speed, + sizeof(speed)) > 0) { + if (speed == 2500 && + (MVSWITCH(sc, MV88E6141) || + MVSWITCH(sc, MV88E6341))) { + sc->fixed25_mask |= (1 << port); + } + } + } + free(name, M_OFWPROP); + } + if ((sc->fixed_mask & (1 << port)) != 0) device_printf(sc->dev, "fixed port at %d\n", port); - } else { + else device_printf(sc->dev, "PHY at port %d\n", port); - } return (0); } @@ -344,11 +364,12 @@ e6000sw_attach_miibus(e6000sw_softc_t *sc, int port) static int e6000sw_attach(device_t dev) { + etherswitch_vlangroup_t vg; e6000sw_softc_t *sc; phandle_t child; int err, port, vlangroup; int member_ports[E6000SW_NUM_VGROUPS]; - etherswitch_vlangroup_t vg; + uint32_t reg; err = 0; sc = device_get_softc(dev); @@ -365,8 +386,7 @@ e6000sw_attach(device_t dev) bzero(member_ports, sizeof(member_ports)); for (child = OF_child(sc->node); child != 0; child = OF_peer(child)) { - err = e6000sw_parse_child_fdt(sc, child, &sc->fixed_mask, - &sc->cpuports_mask, &port, &vlangroup); + err = e6000sw_parse_child_fdt(sc, child, &port, &vlangroup); if (err != 0) { device_printf(sc->dev, "failed to parse DTS\n"); goto out_fail; @@ -384,6 +404,30 @@ e6000sw_attach(device_t dev) goto out_fail; } + if (e6000sw_is_fixedport(sc, port)) { + /* Link must be down to change speed force value. */ + reg = e6000sw_readreg(sc, REG_PORT(port), PSC_CONTROL); + reg &= ~PSC_CONTROL_LINK_UP; + reg |= PSC_CONTROL_FORCED_LINK; + e6000sw_writereg(sc, REG_PORT(port), PSC_CONTROL, reg); + + /* + * Force speed, full-duplex, EEE off and flow-control + * on. + */ + if (e6000sw_is_fixed25port(sc, port)) + reg = PSC_CONTROL_SPD2500; + else + reg = PSC_CONTROL_SPD1000; + reg |= PSC_CONTROL_FORCED_DPX | PSC_CONTROL_FULLDPX | + PSC_CONTROL_FORCED_LINK | PSC_CONTROL_LINK_UP | + PSC_CONTROL_FORCED_FC | PSC_CONTROL_FC_ON | + PSC_CONTROL_FORCED_SPD; + if (MVSWITCH(sc, MV88E6141) || MVSWITCH(sc, MV88E6341)) + reg |= PSC_CONTROL_FORCED_EEE; + e6000sw_writereg(sc, REG_PORT(port), PSC_CONTROL, reg); + } + /* Don't attach miibus at CPU/fixed ports */ if (!e6000sw_is_phyport(sc, port)) continue; @@ -604,21 +648,19 @@ e6000sw_getport(device_t dev, etherswitch_port_t *p) E6000SW_LOCK(sc); e6000sw_get_pvid(sc, p->es_port, &p->es_pvid); - if (e6000sw_is_cpuport(sc, p->es_port)) { - p->es_flags |= ETHERSWITCH_PORT_CPU; + if (e6000sw_is_fixedport(sc, p->es_port)) { + if (e6000sw_is_cpuport(sc, p->es_port)) + p->es_flags |= ETHERSWITCH_PORT_CPU; ifmr = &p->es_ifmr; ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; ifmr->ifm_count = 0; - ifmr->ifm_current = ifmr->ifm_active = - IFM_ETHER | IFM_1000_T | IFM_FDX; + if (e6000sw_is_fixed25port(sc, p->es_port)) + ifmr->ifm_active = IFM_2500_T; + else + ifmr->ifm_active = IFM_1000_T; + ifmr->ifm_active |= IFM_ETHER | IFM_FDX; + ifmr->ifm_current = ifmr->ifm_active; ifmr->ifm_mask = 0; - } else if (e6000sw_is_fixedport(sc, p->es_port)) { - ifmr = &p->es_ifmr; - ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; - ifmr->ifm_count = 0; - ifmr->ifm_current = ifmr->ifm_active = - IFM_ETHER | IFM_1000_T | IFM_FDX; - ifmr->ifm_mask = 0; } else { mii = e6000sw_miiforphy(sc, p->es_port); err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, @@ -648,8 +690,7 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) E6000SW_LOCK(sc); if (p->es_pvid != 0) e6000sw_set_pvid(sc, p->es_port, p->es_pvid); - if (!e6000sw_is_cpuport(sc, p->es_port) && - !e6000sw_is_fixedport(sc, p->es_port)) { + if (e6000sw_is_phyport(sc, p->es_port)) { mii = e6000sw_miiforphy(sc, p->es_port); err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, &mii->mii_media, SIOCSIFMEDIA); @@ -964,6 +1005,13 @@ e6000sw_is_fixedport(e6000sw_softc_t *sc, int port) { return ((sc->fixed_mask & (1 << port)) ? true : false); +} + +static __inline bool +e6000sw_is_fixed25port(e6000sw_softc_t *sc, int port) +{ + + return ((sc->fixed25_mask & (1 << port)) ? true : false); } static __inline bool Modified: head/sys/dev/etherswitch/e6000sw/e6000swreg.h ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000swreg.h Tue Jun 20 17:39:24 2017 (r320156) +++ head/sys/dev/etherswitch/e6000sw/e6000swreg.h Tue Jun 20 18:11:23 2017 (r320157) @@ -42,6 +42,15 @@ struct atu_opt { * Definitions for the Marvell 88E6000 series Ethernet Switch. */ +/* Switch IDs. */ +#define MV88E6141 0x3400 +#define MV88E6341 0x3410 +#define MV88E6352 0x3520 +#define MV88E6172 0x1720 +#define MV88E6176 0x1760 + +#define MVSWITCH(_sc, id) ((_sc)->swid == (id)) + /* * Switch Registers */ @@ -64,6 +73,17 @@ struct atu_opt { #define PORT_STATUS_PHY_DETECT_MASK (1 << 12) #define PSC_CONTROL 0x1 +#define PSC_CONTROL_FORCED_SPD (1 << 13) +#define PSC_CONTROL_EEE_ON (1 << 9) +#define PSC_CONTROL_FORCED_EEE (1 << 8) +#define PSC_CONTROL_FC_ON (1 << 7) +#define PSC_CONTROL_FORCED_FC (1 << 6) +#define PSC_CONTROL_LINK_UP (1 << 5) +#define PSC_CONTROL_FORCED_LINK (1 << 4) +#define PSC_CONTROL_FULLDPX (1 << 3) +#define PSC_CONTROL_FORCED_DPX (1 << 2) +#define PSC_CONTROL_SPD2500 0x3 +#define PSC_CONTROL_SPD1000 0x2 #define SWITCH_ID 0x3 #define PORT_CONTROL 0x4 #define PORT_CONTROL_1 0x5 From owner-svn-src-all@freebsd.org Tue Jun 20 18:14:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70541D9E7E7; Tue, 20 Jun 2017 18:14:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ED186A1E4; Tue, 20 Jun 2017 18:14:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIEutO067124; Tue, 20 Jun 2017 18:14:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIEuS4067123; Tue, 20 Jun 2017 18:14:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706201814.v5KIEuS4067123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Jun 2017 18:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320158 - head/sys/dev/neta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:14:57 -0000 Author: loos Date: Tue Jun 20 18:14:56 2017 New Revision: 320158 URL: https://svnweb.freebsd.org/changeset/base/320158 Log: Allow the use of extended media types with if_mvneta, so it can report 2.5G speeds properly. While here remove a couple of stray white spaces. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/neta/if_mvneta.c Modified: head/sys/dev/neta/if_mvneta.c ============================================================================== --- head/sys/dev/neta/if_mvneta.c Tue Jun 20 18:11:23 2017 (r320157) +++ head/sys/dev/neta/if_mvneta.c Tue Jun 20 18:14:56 2017 (r320158) @@ -2100,6 +2100,7 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t da break; } case SIOCGIFMEDIA: /* FALLTHROUGH */ + case SIOCGIFXMEDIA: if (!sc->phy_attached) error = ifmedia_ioctl(ifp, ifr, &sc->mvneta_ifmedia, cmd); @@ -2469,7 +2470,7 @@ mvneta_adjust_link(struct mvneta_softc *sc) mvneta_linkupdate(sc, phy_linkup); /* Don't update media on disabled link */ - if (!phy_linkup ) + if (!phy_linkup) return; /* Check for media type change */ @@ -3547,7 +3548,7 @@ mvneta_update_mib(struct mvneta_softc *sc) if_inc_counter(sc->ifp, IFCOUNTER_IQDROPS, reg); /* TX watchdog. */ - if (sc->counter_watchdog_mib > 0 ) { + if (sc->counter_watchdog_mib > 0) { if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, sc->counter_watchdog_mib); sc->counter_watchdog_mib = 0; } From owner-svn-src-all@freebsd.org Tue Jun 20 18:25:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1D7BD9EC2D; Tue, 20 Jun 2017 18:25:28 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A084D6A8CA; Tue, 20 Jun 2017 18:25:28 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIPRRx071488; Tue, 20 Jun 2017 18:25:27 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIPRng071486; Tue, 20 Jun 2017 18:25:27 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706201825.v5KIPRng071486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Jun 2017 18:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320159 - in head/sys/dev/iicbus: . twsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:25:28 -0000 Author: loos Date: Tue Jun 20 18:25:27 2017 New Revision: 320159 URL: https://svnweb.freebsd.org/changeset/base/320159 Log: Make ofw_iicbus attach to twsi I2C controllers. Add the ofw_bus_get_node() callback in mv_twsi, it is mandatory for the ofw_iicbus usage. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/iicbus/ofw_iicbus.c head/sys/dev/iicbus/twsi/mv_twsi.c Modified: head/sys/dev/iicbus/ofw_iicbus.c ============================================================================== --- head/sys/dev/iicbus/ofw_iicbus.c Tue Jun 20 18:14:56 2017 (r320158) +++ head/sys/dev/iicbus/ofw_iicbus.c Tue Jun 20 18:25:27 2017 (r320159) @@ -84,6 +84,8 @@ EARLY_DRIVER_MODULE(ofw_iicbus, iicbb, ofw_iicbus_driv 0, 0, BUS_PASS_BUS); EARLY_DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0, BUS_PASS_BUS); +EARLY_DRIVER_MODULE(ofw_iicbus, twsi, ofw_iicbus_driver, ofwiicbus_devclass, + 0, 0, BUS_PASS_BUS); MODULE_VERSION(ofw_iicbus, 1); MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); Modified: head/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/mv_twsi.c Tue Jun 20 18:14:56 2017 (r320158) +++ head/sys/dev/iicbus/twsi/mv_twsi.c Tue Jun 20 18:25:27 2017 (r320159) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif +static phandle_t mv_twsi_get_node(device_t, device_t); static int mv_twsi_probe(device_t); static int mv_twsi_attach(device_t); @@ -105,7 +106,10 @@ static device_method_t mv_twsi_methods[] = { DEVMETHOD(device_probe, mv_twsi_probe), DEVMETHOD(device_attach, mv_twsi_attach), - { 0, 0 } + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, mv_twsi_get_node), + + DEVMETHOD_END }; DEFINE_CLASS_1(twsi, mv_twsi_driver, mv_twsi_methods, @@ -116,6 +120,14 @@ static devclass_t mv_twsi_devclass; DRIVER_MODULE(twsi, simplebus, mv_twsi_driver, mv_twsi_devclass, 0, 0); DRIVER_MODULE(iicbus, twsi, iicbus_driver, iicbus_devclass, 0, 0); MODULE_DEPEND(twsi, iicbus, 1, 1, 1); + +static phandle_t +mv_twsi_get_node(device_t bus, device_t dev) +{ + + /* Used by ofw_iicbus. */ + return (ofw_bus_get_node(bus)); +} static int mv_twsi_probe(device_t dev) From owner-svn-src-all@freebsd.org Tue Jun 20 18:29:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EC88D9ED77; Tue, 20 Jun 2017 18:29:03 +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 F18926AB0D; Tue, 20 Jun 2017 18:29:02 +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 v5KIT2S7071655; Tue, 20 Jun 2017 18:29:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIT2gm071654; Tue, 20 Jun 2017 18:29:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706201829.v5KIT2gm071654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 20 Jun 2017 18:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320160 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:29:03 -0000 Author: manu Date: Tue Jun 20 18:29:01 2017 New Revision: 320160 URL: https://svnweb.freebsd.org/changeset/base/320160 Log: dtc: Update to upstream 917526 - Add missing "typename" in divmod's "using" of binary_operator_base::result. Modified: head/usr.bin/dtc/input_buffer.cc Modified: head/usr.bin/dtc/input_buffer.cc ============================================================================== --- head/usr.bin/dtc/input_buffer.cc Tue Jun 20 18:25:27 2017 (r320159) +++ head/usr.bin/dtc/input_buffer.cc Tue Jun 20 18:29:01 2017 (r320160) @@ -654,7 +654,7 @@ template struct divmod : public binary_operator<5, T> { using binary_operator<5, T>::binary_operator; - using binary_operator_base::result; + using typename binary_operator_base::result; result operator()() override { result r = (*binary_operator_base::rhs)(); From owner-svn-src-all@freebsd.org Tue Jun 20 18:38:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07C79D9F1B1; Tue, 20 Jun 2017 18:38:53 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA7326E2BF; Tue, 20 Jun 2017 18:38:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIcqPJ075531; Tue, 20 Jun 2017 18:38:52 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIcqek075530; Tue, 20 Jun 2017 18:38:52 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706201838.v5KIcqek075530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Jun 2017 18:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320161 - head/sys/dev/iicbus/twsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:38:53 -0000 Author: loos Date: Tue Jun 20 18:38:51 2017 New Revision: 320161 URL: https://svnweb.freebsd.org/changeset/base/320161 Log: Always ignore the START and STOP bits whenever the control register is being overwritten, they are set only bits (cleared by hardware). Disable the Acknowledge of the controller slave address. The slave mode is not supported. Make sure the interrupt flag bit is being cleared as recommended, add a delay() _after_ clear the interrupt bit. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.c Tue Jun 20 18:29:01 2017 (r320160) +++ head/sys/dev/iicbus/twsi/twsi.c Tue Jun 20 18:38:51 2017 (r320161) @@ -114,6 +114,7 @@ twsi_control_clear(struct twsi_softc *sc, uint32_t mas uint32_t val; val = TWSI_READ(sc, sc->reg_control); + val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val &= ~mask; TWSI_WRITE(sc, sc->reg_control, val); } @@ -124,6 +125,7 @@ twsi_control_set(struct twsi_softc *sc, uint32_t mask) uint32_t val; val = TWSI_READ(sc, sc->reg_control); + val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val |= mask; TWSI_WRITE(sc, sc->reg_control, val); } @@ -204,8 +206,8 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, } TWSI_WRITE(sc, sc->reg_data, slave); - DELAY(1000); twsi_clear_iflg(sc); + DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { debugf("timeout sending slave address\n"); @@ -251,7 +253,7 @@ twsi_reset(device_t dev, u_char speed, u_char addr, u_ TWSI_WRITE(sc, sc->reg_soft_reset, 0x0); DELAY(2000); TWSI_WRITE(sc, sc->reg_baud_rate, param); - TWSI_WRITE(sc, sc->reg_control, TWSI_CONTROL_TWSIEN | TWSI_CONTROL_ACK); + TWSI_WRITE(sc, sc->reg_control, TWSI_CONTROL_TWSIEN); DELAY(1000); mtx_unlock(&sc->mutex); @@ -266,9 +268,10 @@ twsi_stop(device_t dev) sc = device_get_softc(dev); mtx_lock(&sc->mutex); + twsi_control_clear(sc, TWSI_CONTROL_ACK); twsi_control_set(sc, TWSI_CONTROL_STOP); - DELAY(1000); twsi_clear_iflg(sc); + DELAY(1000); mtx_unlock(&sc->mutex); return (IIC_NOERR); @@ -341,8 +344,8 @@ twsi_read(device_t dev, char *buf, int len, int *read, else twsi_control_set(sc, TWSI_CONTROL_ACK); - DELAY (1000); twsi_clear_iflg(sc); + DELAY(1000); if (twsi_poll_ctrl(sc, delay, TWSI_CONTROL_IFLG)) { debugf("timeout reading data\n"); @@ -382,6 +385,7 @@ twsi_write(device_t dev, const char *buf, int len, int TWSI_WRITE(sc, sc->reg_data, *buf++); twsi_clear_iflg(sc); + DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { debugf("timeout writing data\n"); rv = IIC_ETIMEOUT; From owner-svn-src-all@freebsd.org Tue Jun 20 18:52:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7F11D9F68E; Tue, 20 Jun 2017 18:52:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CBE36EB71; Tue, 20 Jun 2017 18:52:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIqaZ0083331; Tue, 20 Jun 2017 18:52:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIqZ7f083322; Tue, 20 Jun 2017 18:52:35 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706201852.v5KIqZ7f083322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Jun 2017 18:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320162 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:52:37 -0000 Author: davidcs Date: Tue Jun 20 18:52:35 2017 New Revision: 320162 URL: https://svnweb.freebsd.org/changeset/base/320162 Log: MFC r319964 Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 Add support for pci deviceID 0x8070 for QLE41xxx product line which supports 10GbE/25GbE/40GbE Modified: stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h stable/10/sys/dev/qlnx/qlnxe/common_hsi.h stable/10/sys/dev/qlnx/qlnxe/ecore.h stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_dcbx.c stable/10/sys/dev/qlnx/qlnxe/ecore_dcbx.h stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c stable/10/sys/dev/qlnx/qlnxe/ecore_dev_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_common.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h stable/10/sys/dev/qlnx/qlnxe/ecore_hw.c stable/10/sys/dev/qlnx/qlnxe/ecore_hw.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c stable/10/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_ops.c stable/10/sys/dev/qlnx/qlnxe/ecore_init_ops.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_int.c stable/10/sys/dev/qlnx/qlnxe/ecore_int.h stable/10/sys/dev/qlnx/qlnxe/ecore_int_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_iov_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_iro.h stable/10/sys/dev/qlnx/qlnxe/ecore_iro_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_iscsi.h stable/10/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_l2.c stable/10/sys/dev/qlnx/qlnxe/ecore_l2.h stable/10/sys/dev/qlnx/qlnxe/ecore_l2_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_ll2.h stable/10/sys/dev/qlnx/qlnxe/ecore_ll2_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_mcp.c stable/10/sys/dev/qlnx/qlnxe/ecore_mcp.h stable/10/sys/dev/qlnx/qlnxe/ecore_mcp_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_ooo.h stable/10/sys/dev/qlnx/qlnxe/ecore_proto_if.h stable/10/sys/dev/qlnx/qlnxe/ecore_roce.h stable/10/sys/dev/qlnx/qlnxe/ecore_roce_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_rt_defs.h stable/10/sys/dev/qlnx/qlnxe/ecore_sp_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_sp_commands.c stable/10/sys/dev/qlnx/qlnxe/ecore_sp_commands.h stable/10/sys/dev/qlnx/qlnxe/ecore_spq.c stable/10/sys/dev/qlnx/qlnxe/ecore_sriov.h stable/10/sys/dev/qlnx/qlnxe/ecore_vf.h stable/10/sys/dev/qlnx/qlnxe/ecore_vf_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h stable/10/sys/dev/qlnx/qlnxe/eth_common.h stable/10/sys/dev/qlnx/qlnxe/fcoe_common.h stable/10/sys/dev/qlnx/qlnxe/iscsi_common.h stable/10/sys/dev/qlnx/qlnxe/mcp_private.h stable/10/sys/dev/qlnx/qlnxe/mcp_public.h stable/10/sys/dev/qlnx/qlnxe/mfw_hsi.h stable/10/sys/dev/qlnx/qlnxe/nvm_cfg.h stable/10/sys/dev/qlnx/qlnxe/nvm_map.h stable/10/sys/dev/qlnx/qlnxe/pcics_reg_driver.h stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c stable/10/sys/dev/qlnx/qlnxe/qlnx_ver.h stable/10/sys/dev/qlnx/qlnxe/rdma_common.h stable/10/sys/dev/qlnx/qlnxe/reg_addr.h stable/10/sys/dev/qlnx/qlnxe/spad_layout.h stable/10/sys/dev/qlnx/qlnxe/storage_common.h stable/10/sys/dev/qlnx/qlnxe/tcp_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 18:52:35 2017 (r320162) @@ -34,12 +34,17 @@ #include "ecore_status.h" #include +#if __FreeBSD_version >= 1200000 +#include +#else #if __FreeBSD_version >= 1100090 #include #else #include #endif +#endif +#define OSAL_NUM_CPUS() mp_ncpus /* * prototypes of freebsd specific functions required by ecore */ @@ -60,6 +65,7 @@ extern int qlnx_pci_find_capability(void *ecore_dev, i extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr); extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value); +extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value); extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr); extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value); @@ -129,6 +135,8 @@ rounddown_pow_of_two(unsigned long x) #endif /* #ifndef QLNX_RDMA */ +#define OSAL_UNUSED + #define OSAL_CPU_TO_BE64(val) htobe64(val) #define OSAL_BE64_TO_CPU(val) be64toh(val) @@ -199,6 +207,8 @@ typedef struct osal_list_t #define REG_WR(hwfn, addr, val) qlnx_reg_wr32(hwfn, addr, val) #define REG_WR16(hwfn, addr, val) qlnx_reg_wr16(hwfn, addr, val) #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value) +#define DIRECT_REG_WR64(p_hwfn, addr, value) \ + qlnx_direct_reg_wr64(p_hwfn, addr, value) #define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr) #define REG_RD(hwfn, addr) qlnx_reg_rd32(hwfn, addr) #define DOORBELL(hwfn, addr, value) \ Modified: stable/10/sys/dev/qlnx/qlnxe/common_hsi.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 18:52:35 2017 (r320162) @@ -88,7 +88,7 @@ #define CORE_SPQE_PAGE_SIZE_BYTES 4096 /* - * Usually LL2 queues are opened in pairs TX-RX. + * Usually LL2 queues are opened in pairs – TX-RX. * There is a hard restriction on number of RX queues (limited by Tstorm RAM) and TX counters (Pstorm RAM). * Number of TX queues is almost unlimited. * The constants are different so as to allow asymmetric LL2 connections @@ -99,13 +99,13 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// -// Include firmware version number only- do not add constants here to avoid redundunt compilations +// Include firmware verison number only- do not add constants here to avoid redundunt compilations /////////////////////////////////////////////////////////////////////////////////////////////////// #define FW_MAJOR_VERSION 8 -#define FW_MINOR_VERSION 18 -#define FW_REVISION_VERSION 14 +#define FW_MINOR_VERSION 30 +#define FW_REVISION_VERSION 0 #define FW_ENGINEERING_VERSION 0 /***********************/ @@ -113,60 +113,60 @@ /***********************/ /* PCI functions */ -#define MAX_NUM_PORTS_K2 (4) #define MAX_NUM_PORTS_BB (2) -#define MAX_NUM_PORTS (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS_K2 (4) +#define MAX_NUM_PORTS_E5 (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) -#define MAX_NUM_PFS_K2 (16) #define MAX_NUM_PFS_BB (8) -#define MAX_NUM_PFS (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS_K2 (16) +#define MAX_NUM_PFS_E5 (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS (MAX_NUM_PFS_E5) #define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ #define MAX_NUM_VFS_BB (120) #define MAX_NUM_VFS_K2 (192) -#define E4_MAX_NUM_VFS (MAX_NUM_VFS_K2) -#define E5_MAX_NUM_VFS (240) -#define COMMON_MAX_NUM_VFS (E5_MAX_NUM_VFS) +#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) +#define MAX_NUM_VFS_E5 (240) +#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) #define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) /* in both BB and K2, the VF number starts from 16. so for arrays containing all */ /* possible PFs and VFs - we need a constant for this size */ #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) #define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) -#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) #define MAX_NUM_VPORTS_K2 (208) #define MAX_NUM_VPORTS_BB (160) -#define MAX_NUM_VPORTS (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E5 (256) +#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) #define MAX_NUM_L2_QUEUES_K2 (320) #define MAX_NUM_L2_QUEUES_BB (256) #define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_K2) /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */ -// 4-Port K2. #define NUM_PHYS_TCS_4PORT_K2 (4) +#define NUM_PHYS_TCS_4PORT_E5 (6) #define NUM_OF_PHYS_TCS (8) - +#define PURE_LB_TC NUM_OF_PHYS_TCS #define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) +#define NUM_TCS_4PORT_E5 (NUM_PHYS_TCS_4PORT_E5 + 1) #define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) -#define LB_TC (NUM_OF_PHYS_TCS) - /* Num of possible traffic priority values */ #define NUM_OF_PRIO (8) -#define MAX_NUM_VOQS_K2 (NUM_TCS_4PORT_K2 * MAX_NUM_PORTS_K2) -#define MAX_NUM_VOQS_BB (NUM_OF_TCS * MAX_NUM_PORTS_BB) -#define MAX_NUM_VOQS (MAX_NUM_VOQS_K2) -#define MAX_PHYS_VOQS (NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB) - /* CIDs */ -#define E4_NUM_OF_CONNECTION_TYPES (8) -#define E5_NUM_OF_CONNECTION_TYPES (16) +#define NUM_OF_CONNECTION_TYPES_E4 (8) +#define NUM_OF_CONNECTION_TYPES_E5 (16) #define NUM_OF_TASK_TYPES (8) #define NUM_OF_LCIDS (320) #define NUM_OF_LTIDS (320) @@ -375,11 +375,13 @@ /* number of TX queues in the QM */ #define MAX_QM_TX_QUEUES_K2 512 #define MAX_QM_TX_QUEUES_BB 448 +#define MAX_QM_TX_QUEUES_E5 MAX_QM_TX_QUEUES_K2 #define MAX_QM_TX_QUEUES MAX_QM_TX_QUEUES_K2 /* number of Other queues in the QM */ #define MAX_QM_OTHER_QUEUES_BB 64 #define MAX_QM_OTHER_QUEUES_K2 128 +#define MAX_QM_OTHER_QUEUES_E5 MAX_QM_OTHER_QUEUES_K2 #define MAX_QM_OTHER_QUEUES MAX_QM_OTHER_QUEUES_K2 /* number of queues in a PF queue group */ @@ -413,7 +415,9 @@ #define CAU_FSM_ETH_TX 1 /* Number of Protocol Indices per Status Block */ -#define PIS_PER_SB 12 +#define PIS_PER_SB_E4 12 +#define PIS_PER_SB_E5 8 +#define MAX_PIS_PER_SB OSAL_MAX_T(u8, PIS_PER_SB_E4, PIS_PER_SB_E5) #define CAU_HC_STOPPED_STATE 3 /* fsm is stopped or not valid for this sb */ @@ -427,7 +431,8 @@ #define MAX_SB_PER_PATH_K2 (368) #define MAX_SB_PER_PATH_BB (288) -#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_K2 +#define MAX_SB_PER_PATH_E5 (512) +#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_E5 #define MAX_SB_PER_PF_MIMD 129 #define MAX_SB_PER_PF_SIMD 64 @@ -588,7 +593,7 @@ // ILT Records #define PXP_NUM_ILT_RECORDS_BB 7600 #define PXP_NUM_ILT_RECORDS_K2 11000 -#define MAX_NUM_ILT_RECORDS MAX(PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(u16, PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) // Host Interface @@ -633,7 +638,8 @@ /******************/ /* Number of PBF command queue lines. Each line is 32B. */ -#define PBF_MAX_CMD_LINES 3328 +#define PBF_MAX_CMD_LINES_E4 3328 +#define PBF_MAX_CMD_LINES_E5 5280 /* Number of BTB blocks. Each block is 256B. */ #define BTB_MAX_BLOCKS 1440 @@ -737,8 +743,8 @@ union rdma_eqe_data */ struct malicious_vf_eqe_data { - u8 vfId /* Malicious VF ID */; - u8 errId /* Malicious VF error */; + u8 vf_id /* Malicious VF ID */; + u8 err_id /* Malicious VF error */; __le16 reserved[3]; }; @@ -747,7 +753,7 @@ struct malicious_vf_eqe_data */ struct initial_cleanup_eqe_data { - u8 vfId /* VF ID */; + u8 vf_id /* VF ID */; u8 reserved[7]; }; @@ -1059,7 +1065,7 @@ struct db_rdma_dpm_data { __le16 icid /* internal CID */; __le16 prod_val /* aggregated value to update */; - struct db_rdma_dpm_params params /* parameters passed to RDMA firmware */; + struct db_rdma_dpm_params params /* parametes passed to RDMA firmware */; }; @@ -1113,25 +1119,25 @@ enum igu_seg_access /* - * Enumeration for L3 type field of parsing_and_err_flags_union. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) + * Enumeration for L3 type field of parsing_and_err_flags. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) */ enum l3_type { - e_l3Type_unknown, - e_l3Type_ipv4, - e_l3Type_ipv6, + e_l3_type_unknown, + e_l3_type_ipv4, + e_l3_type_ipv6, MAX_L3_TYPE }; /* - * Enumeration for l4Protocol field of parsing_and_err_flags_union. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. + * Enumeration for l4Protocol field of parsing_and_err_flags. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. */ enum l4_protocol { - e_l4Protocol_none, - e_l4Protocol_tcp, - e_l4Protocol_udp, + e_l4_protocol_none, + e_l4_protocol_tcp, + e_l4_protocol_udp, MAX_L4_PROTOCOL }; @@ -1146,11 +1152,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT 0 #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK 0x3 /* L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. (use enum l4_protocol) */ #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT 2 -#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4 fragment. */ +#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4/IPv6 fragment. */ #define PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT 4 -#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* Set if VLAN tag exists. Invalid if tunnel type are IP GRE or IP GENEVE. */ +#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* corresponds to the same 8021q tag that is selected for 8021q-tag fiel. This flag should be set if the tag appears in the packet, regardless of its value. */ #define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT 5 -#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_SHIFT 6 #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_MASK 0x1 /* Set for PTP packet. */ #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_SHIFT 7 @@ -1162,11 +1168,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L4CHKSMERROR_SHIFT 10 #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_MASK 0x1 /* Set if GRE/VXLAN/GENEVE tunnel detected. */ #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_SHIFT 11 -#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* Set if VLAN tag exists in tunnel header. */ +#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* This flag should be set if the tag appears in the packet tunnel header, regardless of its value.. */ #define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_SHIFT 12 #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_MASK 0x1 /* Set if either tunnel-ipv4-version-mismatch or tunnel-ipv4-hdr-len-error or tunnel-ipv4-cksm is set or tunneling ipv6 ver mismatch */ #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_SHIFT 13 -#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* Set if GRE or VXLAN/GENEVE UDP checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_SHIFT 14 #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_MASK 0x1 /* Set if tunnel L4 checksum validation failed. Valid only if tunnel L4 checksum was calculated. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_SHIFT 15 @@ -1419,21 +1425,42 @@ enum rss_hash_type /* * status block structure */ -struct status_block +struct status_block_e4 { - __le16 pi_array[PIS_PER_SB]; + __le16 pi_array[PIS_PER_SB_E4]; __le32 sb_num; -#define STATUS_BLOCK_SB_NUM_MASK 0x1FF -#define STATUS_BLOCK_SB_NUM_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD_MASK 0x7F -#define STATUS_BLOCK_ZERO_PAD_SHIFT 9 -#define STATUS_BLOCK_ZERO_PAD2_MASK 0xFFFF -#define STATUS_BLOCK_ZERO_PAD2_SHIFT 16 +#define STATUS_BLOCK_E4_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E4_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E4_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT 16 __le32 prod_index; -#define STATUS_BLOCK_PROD_INDEX_MASK 0xFFFFFF -#define STATUS_BLOCK_PROD_INDEX_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD3_MASK 0xFF -#define STATUS_BLOCK_ZERO_PAD3_SHIFT 24 +#define STATUS_BLOCK_E4_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT 24 +}; + + +/* + * status block structure + */ +struct status_block_e5 +{ + __le16 pi_array[PIS_PER_SB_E5]; + __le32 sb_num; +#define STATUS_BLOCK_E5_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E5_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E5_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT 16 + __le32 prod_index; +#define STATUS_BLOCK_E5_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT 24 }; Modified: stable/10/sys/dev/qlnx/qlnxe/ecore.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 18:52:35 2017 (r320162) @@ -39,8 +39,8 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 18 -#define ECORE_REVISION_VERSION 13 +#define ECORE_MINOR_VERSION 30 +#define ECORE_REVISION_VERSION 0 #define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ @@ -110,13 +110,13 @@ do { \ #define GET_FIELD(value, name) \ (((value) >> (name##_SHIFT)) & name##_MASK) -#define ECORE_MFW_GET_FIELD(name, field) \ - (((name) & (field ## _MASK)) >> (field ## _SHIFT)) +#define GET_MFW_FIELD(name, field) \ + (((name) & (field ## _MASK)) >> (field ## _OFFSET)) -#define ECORE_MFW_SET_FIELD(name, field, value) \ +#define SET_MFW_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ - (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK)); \ + (name) &= ~((field ## _MASK) << (field ## _OFFSET)); \ + (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK)); \ } while (0) static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS) @@ -401,6 +401,11 @@ enum ecore_wol_support { ECORE_WOL_SUPPORT_PME, }; +enum ecore_db_rec_exec { + DB_REC_DRY_RUN, + DB_REC_REAL_DEAL, +}; + struct ecore_hw_info { /* PCI personality */ enum ecore_pci_personality personality; @@ -450,10 +455,7 @@ struct ecore_hw_info { #ifndef ETH_ALEN #define ETH_ALEN 6 /* @@@ TBD - define somewhere else for Windows */ #endif - unsigned char hw_mac_addr[ETH_ALEN]; - u64 node_wwn; /* For FCoE only */ - u64 port_wwn; /* For FCoE only */ u16 num_iscsi_conns; u16 num_fcoe_conns; @@ -537,6 +539,12 @@ struct ecore_qm_info { u8 num_pf_rls; }; +struct ecore_db_recovery_info { + osal_list_t list; + osal_spinlock_t lock; + u32 db_recovery_counter; +}; + struct storm_stats { u32 address; u32 len; @@ -605,6 +613,11 @@ struct ecore_hwfn { struct ecore_ptt *p_main_ptt; struct ecore_ptt *p_dpc_ptt; + /* PTP will be used only by the leading funtion. + * Usage of all PTP-apis should be synchronized as result. + */ + struct ecore_ptt *p_ptp_ptt; + struct ecore_sb_sp_info *p_sp_sb; struct ecore_sb_attn_info *p_sb_attn; @@ -661,6 +674,9 @@ struct ecore_hwfn { /* L2-related */ struct ecore_l2_info *p_l2_info; + + /* Mechanism for recovering from doorbell drop */ + struct ecore_db_recovery_info db_recovery_info; }; enum ecore_mf_mode { @@ -694,7 +710,7 @@ struct ecore_dev { #define ECORE_IS_AH(dev) ((dev)->type == ECORE_DEV_TYPE_AH) #define ECORE_IS_K2(dev) ECORE_IS_AH(dev) -#define ECORE_IS_E5(dev) false +#define ECORE_IS_E5(dev) ((dev)->type == ECORE_DEV_TYPE_E5) #define ECORE_E5_MISSING_CODE OSAL_BUILD_BUG_ON(false) @@ -703,6 +719,7 @@ struct ecore_dev { #define ECORE_DEV_ID_MASK 0xff00 #define ECORE_DEV_ID_MASK_BB 0x1600 #define ECORE_DEV_ID_MASK_AH 0x8000 +#define ECORE_DEV_ID_MASK_E5 0x8100 u16 chip_num; #define CHIP_NUM_MASK 0xffff @@ -746,7 +763,7 @@ struct ecore_dev { #define CHIP_BOND_ID_SHIFT 0 u8 num_engines; - u8 num_ports_in_engines; + u8 num_ports_in_engine; u8 num_funcs_in_port; u8 path_id; @@ -836,6 +853,9 @@ struct ecore_dev { : MAX_SB_PER_PATH_K2) #define NUM_OF_ENG_PFS(dev) (ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \ : MAX_NUM_PFS_K2) + +#define CRC8_TABLE_SIZE 256 + /** * @brief ecore_concrete_to_sw_fid - get the sw function id from * the concrete value. @@ -844,8 +864,7 @@ struct ecore_dev { * * @return OSAL_INLINE u8 */ -static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct ecore_dev *p_dev, - u32 concrete_fid) +static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid) { u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); @@ -860,8 +879,8 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct return sw_fid; } -#define PURE_LB_TC 8 #define PKT_LB_TC 9 +#define MAX_NUM_VOQS_E4 20 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate); void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev, @@ -873,6 +892,7 @@ int ecore_configure_pf_min_bandwidth(struct ecore_dev void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); int ecore_device_num_engines(struct ecore_dev *p_dev); int ecore_device_num_ports(struct ecore_dev *p_dev); +int ecore_device_get_port_id(struct ecore_dev *p_dev); void ecore_set_fw_mac_addr(__le16 *fw_msb, __le16 *fw_mid, __le16 *fw_lsb, u8 *mac); @@ -892,6 +912,13 @@ u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf); u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid); +const char *ecore_hw_get_resc_name(enum ecore_resources res_id); + +/* doorbell recovery mechanism */ +void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn); +void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn, + enum ecore_db_rec_exec); + /* amount of resources used in qm init */ u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn); u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn); @@ -900,7 +927,5 @@ u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_ u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn); #define ECORE_LEADING_HWFN(dev) (&dev->hwfns[0]) - -const char *ecore_hw_get_resc_name(enum ecore_resources res_id); #endif /* __ECORE_H */ Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 18:52:35 2017 (r320162) @@ -214,6 +214,11 @@ static OSAL_INLINE u32 ecore_chain_get_cons_idx_u32(st return p_chain->u.chain32.cons_idx; } +/* FIXME: + * Should create OSALs for the below definitions. + * For Linux, replace them with the existing U16_MAX and U32_MAX, and handle + * kernel versions that lack them. + */ #define ECORE_U16_MAX ((u16)~0U) #define ECORE_U32_MAX ((u32)~0U) Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 18:52:35 2017 (r320162) @@ -72,17 +72,7 @@ __FBSDID("$FreeBSD$"); #define TM_ELEM_SIZE 4 /* ILT constants */ -/* If for some reason, HW P size is modified to be less than 32K, - * special handling needs to be made for CDU initialization - */ -#ifdef CONFIG_ECORE_ROCE -/* For RoCE we configure to 64K to cover for RoCE max tasks 256K purpose. Can be - * optimized with resource management scheme - */ #define ILT_DEFAULT_HW_P_SIZE 4 -#else -#define ILT_DEFAULT_HW_P_SIZE 3 -#endif #define ILT_PAGE_IN_BYTES(hw_p_size) (1U << ((hw_p_size) + 12)) #define ILT_CFG_REG(cli, reg) PSWRQ2_REG_##cli##_##reg##_RT_OFFSET @@ -97,22 +87,22 @@ __FBSDID("$FreeBSD$"); /* connection context union */ union conn_context { - struct core_conn_context core_ctx; - struct eth_conn_context eth_ctx; - struct iscsi_conn_context iscsi_ctx; - struct fcoe_conn_context fcoe_ctx; - struct roce_conn_context roce_ctx; + struct e4_core_conn_context core_ctx; + struct e4_eth_conn_context eth_ctx; + struct e4_iscsi_conn_context iscsi_ctx; + struct e4_fcoe_conn_context fcoe_ctx; + struct e4_roce_conn_context roce_ctx; }; /* TYPE-0 task context - iSCSI, FCOE */ union type0_task_context { - struct iscsi_task_context iscsi_ctx; - struct fcoe_task_context fcoe_ctx; + struct e4_iscsi_task_context iscsi_ctx; + struct e4_fcoe_task_context fcoe_ctx; }; /* TYPE-1 task context - ROCE */ union type1_task_context { - struct rdma_task_context roce_ctx; + struct e4_rdma_task_context roce_ctx; }; struct src_ent { @@ -274,12 +264,10 @@ struct ecore_cxt_mngr { }; /* check if resources/configuration is required according to protocol type */ -static bool src_proto(struct ecore_hwfn *p_hwfn, - enum protocol_type type) +static bool src_proto(enum protocol_type type) { return type == PROTOCOLID_ISCSI || type == PROTOCOLID_FCOE || - type == PROTOCOLID_TOE || type == PROTOCOLID_IWARP; } @@ -319,14 +307,13 @@ struct ecore_src_iids { u32 per_vf_cids; }; -static void ecore_cxt_src_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_src_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_src_iids *iids) { u32 i; for (i = 0; i < MAX_CONN_TYPES; i++) { - if (!src_proto(p_hwfn, i)) + if (!src_proto(i)) continue; iids->pf_cids += p_mngr->conn_cfg[i].cid_count; @@ -346,8 +333,7 @@ struct ecore_tm_iids { u32 per_vf_tids; }; -static void ecore_cxt_tm_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_tm_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_tm_iids *iids) { bool tm_vf_required = false; @@ -454,6 +440,20 @@ static struct ecore_tid_seg *ecore_cxt_tid_seg_info(st return OSAL_NULL; } +static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + p_mgr->srq_count = num_srqs; +} + +u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + return p_mgr->srq_count; +} + /* set the iids (cid/tid) count per protocol */ static void ecore_cxt_set_proto_cid_count(struct ecore_hwfn *p_hwfn, enum protocol_type type, @@ -779,7 +779,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); ecore_cxt_qm_iids(p_hwfn, &qm_iids); - total = ecore_qm_pf_mem_size(p_hwfn->rel_pf_id, qm_iids.cids, + total = ecore_qm_pf_mem_size(qm_iids.cids, qm_iids.vf_cids, qm_iids.tids, p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs); @@ -797,7 +797,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* SRC */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_SRC]); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); /* Both the PF and VFs searcher connections are stored in the per PF * database. Thus sum the PF searcher cids and all the VFs searcher @@ -822,7 +822,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* TM PF */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_TM]); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); total = tm_iids.pf_cids + tm_iids.pf_tids_total; if (total) { p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); @@ -952,7 +952,7 @@ static enum _ecore_status_t ecore_cxt_src_t2_alloc(str if (!p_src->active) return ECORE_SUCCESS; - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; total_size = conn_num * sizeof(struct src_ent); @@ -1287,7 +1287,7 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore clients[ILT_CLI_TSDM].last.reg = ILT_CFG_REG(TSDM, LAST_ILT); clients[ILT_CLI_TSDM].p_size.reg = ILT_CFG_REG(TSDM, P_SIZE); - /* default ILT page size for all clients is 32K */ + /* default ILT page size for all clients is 64K */ for (i = 0; i < ILT_CLI_MAX; i++) p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; @@ -1299,7 +1299,9 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore p_mngr->vf_count = p_hwfn->p_dev->p_iov_info->total_vfs; /* Initialize the dynamic ILT allocation mutex */ +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_ALLOC(p_hwfn, &p_mngr->mutex); +#endif OSAL_MUTEX_INIT(&p_mngr->mutex); /* Set the cxt mangr pointer priori to further allocations */ @@ -1347,7 +1349,9 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn) ecore_cid_map_free(p_hwfn); ecore_cxt_src_t2_free(p_hwfn); ecore_ilt_shadow_free(p_hwfn); +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex); +#endif OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr); p_hwfn->p_cxt_mngr = OSAL_NULL; @@ -1555,7 +1559,7 @@ static void ecore_cdu_init_pf(struct ecore_hwfn *p_hwf } } -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { struct ecore_qm_info *qm_info = &p_hwfn->qm_info; struct ecore_qm_iids iids; @@ -1563,9 +1567,8 @@ void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) OSAL_MEM_ZERO(&iids, sizeof(iids)); ecore_cxt_qm_iids(p_hwfn, &iids); - ecore_qm_pf_rt_init(p_hwfn, p_hwfn->p_main_ptt, p_hwfn->port_id, + ecore_qm_pf_rt_init(p_hwfn, p_ptt, p_hwfn->port_id, p_hwfn->rel_pf_id, qm_info->max_phys_tcs_per_port, - p_hwfn->first_on_engine, iids.cids, iids.vf_cids, iids.tids, qm_info->start_pq, qm_info->num_pqs - qm_info->num_vf_pqs, @@ -1749,7 +1752,7 @@ static void ecore_ilt_init_pf(struct ecore_hwfn *p_hwf if (p_shdw[line].p_virt != OSAL_NULL) { SET_FIELD(ilt_hw_entry, ILT_ENTRY_VALID, 1ULL); SET_FIELD(ilt_hw_entry, ILT_ENTRY_PHY_ADDR, - (p_shdw[line].p_phys >> 12)); + (unsigned long long)(p_shdw[line].p_phys >> 12)); DP_VERBOSE( p_hwfn, ECORE_MSG_ILT, @@ -1771,7 +1774,7 @@ static void ecore_src_init_pf(struct ecore_hwfn *p_hwf struct ecore_src_iids src_iids; OSAL_MEM_ZERO(&src_iids, sizeof(src_iids)); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; if (!conn_num) return; @@ -1817,7 +1820,7 @@ static void ecore_tm_init_pf(struct ecore_hwfn *p_hwfn u8 i; OSAL_MEM_ZERO(&tm_iids, sizeof(tm_iids)); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); /* @@@TBD No pre-scan for now */ @@ -1908,9 +1911,11 @@ static void ecore_prs_init_common(struct ecore_hwfn *p static void ecore_prs_init_pf(struct ecore_hwfn *p_hwfn) { struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_conn_type_cfg *p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + struct ecore_conn_type_cfg *p_fcoe; struct ecore_tid_seg *p_tid; + p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + /* If FCoE is active set the MAX OX_ID (tid) in the Parser */ if (!p_fcoe->cid_count) return; @@ -1934,9 +1939,9 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf ecore_prs_init_common(p_hwfn); } -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { - ecore_qm_init_pf(p_hwfn); + ecore_qm_init_pf(p_hwfn, p_ptt); ecore_cm_init_pf(p_hwfn); ecore_dq_init_pf(p_hwfn); ecore_cdu_init_pf(p_hwfn); @@ -2119,20 +2124,6 @@ enum _ecore_status_t ecore_cxt_get_cid_info(struct eco return ECORE_SUCCESS; } -static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - p_mgr->srq_count = num_srqs; -} - -u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - return p_mgr->srq_count; -} - static void ecore_rdma_set_pf_params(struct ecore_hwfn *p_hwfn, struct ecore_rdma_pf_params *p_params, u32 num_tasks) @@ -2143,7 +2134,7 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn /* Override personality with rdma flavor */ num_srqs = OSAL_MIN_T(u32, ECORE_RDMA_MAX_SRQS, p_params->num_srqs); - /* The only case RDMA personality can be overridden is if NVRAM is + /* The only case RDMA personality can be overriden is if NVRAM is * configured with ETH_RDMA or if no rdma protocol was requested */ switch (p_params->rdma_protocol) { @@ -2170,8 +2161,12 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn switch (p_hwfn->hw_info.personality) { case ECORE_PCI_ETH_IWARP: - num_qps = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); - num_cons = num_qps; + /* Each QP requires one connection */ + num_cons = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); +#ifdef CONFIG_ECORE_IWARP /* required for the define */ + /* additional connections required for passive tcp handling */ + num_cons += ECORE_IWARP_PREALLOC_CNT; +#endif proto = PROTOCOLID_IWARP; p_params->roce_edpm_mode = false; break; @@ -2576,14 +2571,14 @@ enum _ecore_status_t ecore_cxt_get_task_ctx(struct eco u8 ctx_type, void **pp_task_ctx) { - struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_ilt_client_cfg *p_cli; - struct ecore_ilt_cli_blk *p_seg; - struct ecore_tid_seg *p_seg_info; - u32 proto, seg; - u32 total_lines; - u32 tid_size, ilt_idx; - u32 num_tids_per_block; + struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; + struct ecore_ilt_client_cfg *p_cli; + struct ecore_tid_seg *p_seg_info; + struct ecore_ilt_cli_blk *p_seg; + u32 num_tids_per_block; + u32 tid_size, ilt_idx; + u32 total_lines; + u32 proto, seg; /* Verify the personality */ switch (p_hwfn->hw_info.personality) { Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 18:52:35 2017 (r320162) @@ -28,7 +28,6 @@ * */ - #ifndef _ECORE_CID_ #define _ECORE_CID_ @@ -130,15 +129,17 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf * @brief ecore_cxt_hw_init_pf - Initailze ILT and DQ, PF phase, per path. * * @param p_hwfn + * @param p_ptt */ -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief ecore_qm_init_pf - Initailze the QM PF phase, per path * * @param p_hwfn + * @param p_ptt */ -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief Reconfigures QM pf on the fly Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 18:52:35 2017 (r320162) @@ -31,7 +31,6 @@ #include __FBSDID("$FreeBSD$"); - #include "bcm_osal.h" #include "ecore.h" #include "ecore_hw.h" @@ -62,9 +61,6 @@ enum mem_groups { MEM_GROUP_IOR, MEM_GROUP_RAM, MEM_GROUP_BTB_RAM, - MEM_GROUP_RDIF_CTX, - MEM_GROUP_TDIF_CTX, - MEM_GROUP_CFC_MEM, MEM_GROUP_CONN_CFC_MEM, MEM_GROUP_TASK_CFC_MEM, MEM_GROUP_CAU_PI, @@ -73,6 +69,9 @@ enum mem_groups { MEM_GROUP_PBUF, MEM_GROUP_MULD_MEM, MEM_GROUP_BTB_MEM, + MEM_GROUP_RDIF_CTX, + MEM_GROUP_TDIF_CTX, + MEM_GROUP_CFC_MEM, MEM_GROUP_IGU_MEM, MEM_GROUP_IGU_MSIX, MEM_GROUP_CAU_SB, @@ -95,9 +94,6 @@ static const char* s_mem_group_names[] = { "IOR", "RAM", "BTB_RAM", - "RDIF_CTX", - "TDIF_CTX", - "CFC_MEM", "CONN_CFC_MEM", "TASK_CFC_MEM", "CAU_PI", @@ -106,6 +102,9 @@ static const char* s_mem_group_names[] = { "PBUF", "MULD_MEM", "BTB_MEM", + "RDIF_CTX", + "TDIF_CTX", + "CFC_MEM", "IGU_MEM", "IGU_MSIX", "CAU_SB", @@ -161,7 +160,7 @@ static u32 cond12(const u32 *r, const u32 *imm) { return (r[0] != r[1] && r[2] > imm[0]); } -static u32 cond3(const u32 *r, const u32 *imm) { +static u32 cond3(const u32 *r, const u32 OSAL_UNUSED *imm) { return (r[0] != r[1]); } @@ -256,7 +255,7 @@ struct storm_defs { /* Block constant definitions */ struct block_defs { const char *name; - bool has_dbg_bus[MAX_CHIP_IDS]; + bool exists[MAX_CHIP_IDS]; bool associated_to_storm; /* Valid only if associated_to_storm is true */ @@ -280,8 +279,8 @@ struct block_defs { /* Reset register definitions */ struct reset_reg_defs { u32 addr; - u32 unreset_val; bool exists[MAX_CHIP_IDS]; + u32 unreset_val[MAX_CHIP_IDS]; }; /* Debug Bus Constraint operation constant definitions */ @@ -311,8 +310,8 @@ struct rss_mem_defs { const char *mem_name; const char *type_name; u32 addr; + u32 entry_width; u32 num_entries[MAX_CHIP_IDS]; - u32 entry_width[MAX_CHIP_IDS]; }; struct vfc_ram_defs { @@ -550,7 +549,7 @@ static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFE static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFER_TYPE] = { /* BIN_BUF_DBG_MODE_TREE */ - { (const u32 *)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, + { (const u32*)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, /* BIN_BUF_DBG_DUMP_REG */ { dump_reg, OSAL_ARRAY_SIZE(dump_reg) }, @@ -615,7 +614,7 @@ static struct chip_defs s_chip_defs[MAX_CHIP_IDS] = { /* FPGA */ { MAX_NUM_PORTS_BB, MAX_NUM_PFS_BB, MAX_NUM_VFS_BB } } }, - { "k2", + { "ah", /* ASIC */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 20 18:55:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C607D9F7CB; Tue, 20 Jun 2017 18:55:13 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5F566EE38; Tue, 20 Jun 2017 18:55:11 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.225.8.42]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M54L0-1diuV71o0U-00zDfB; Tue, 20 Jun 2017 20:55:03 +0200 Date: Tue, 20 Jun 2017 20:55:02 +0200 From: "O. Hartmann" To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320153 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <20170620205502.443284f7@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201706201655.v5KGtUDS034789@repo.freebsd.org> References: <201706201655.v5KGtUDS034789@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/y/6PUfwYjouMG3Jbe0Sa7Vf"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:2jnjTyOkKhfup1pWmCsDp8bGB+KanvTz+3MrSEHhCtOPjp+2Al6 wBMY3bbTH1zgeqtvj9ZFpWhgoVccv8prL1KCzX9F1DsiIZkrD2EloAwoCW2vqSPOqtdEgtO G5DGmrQbuasrGpS2alRBvjRc95Swq36w74/QQtWXN7YRWtWoCwv/CaYgNWVrmK33BuFg8tG w0+0loSGNNrBNwhPSXukA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ccppYQ3xW0o=:vPNmCJE8GOFlvrmnUG6aI5 IddEaaAoKmGktXKCNx05rBpDF4O63rd/c158JweMFD6VA9DuRrSc93RRgNLGwJihaSfAqyM7h BsvPMdeB949ekz5EGguMpqDu8dXOnhMLFWrOz7YcX0eUHioF36mjdtXtlknW4tzZPBflhNDh1 ebqgKiSMDdKTsQpL/2NsypbSk/ViSdp8HD0bwhyjwIdYrnWKDAmCzXZfKN0jz845O5BKRx+nC RZW9yTZeDpjD5SCSkm0O8JRsIqF7vUwCjxtLIVCv9vFeczBB7vX+TT0jwA1ZGKssSfO9Id1VE 7CkFQ2MKHyAXydtDuViR02bPEnMwe65VhGKz3jGxELaOQ+Vn8YSMuk98reWArMSvI6SUiM9sz rGL0Dln4KNgT7W6SwzngjIbapuOR+EOCdGPn30RRx4MjcLic+U38d5Fz0mCB1B/tyJX6vDndC RvqOftxOhgryDk/Nl3hkYGLFtdar5rE+ZFr6ajsqcY6lglYZ00KrqilInQjsFdCazbVNCXZwB 7gNZ7sJfnLm6+j4tsS6tAUPvM92J9LZwfiqJrU+k2VJiMh/d+kp1ia7+fQOCg0CVZwb/GmfWo EQMbxe+l0g2g2h3g9P4ijPVLxoCAGoGja//qiBvP1l5VYCzmGKqxWjyDYMtWndIMfGLkVQdJn J2ket1aKqqsDcjQW4uCD+oHIuUDYZoFSqAW/cCtykUzGTZRUHFpkqR3igmvcTkBIaeu0RMYW4 6jjzn6XZ95EfFbu+F6QRYMJx90cZh6bVsqpZT7OSeOF1FalTHX6Jl9lUAqU= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:55:13 -0000 --Sig_/y/6PUfwYjouMG3Jbe0Sa7Vf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Tue, 20 Jun 2017 16:55:30 +0000 (UTC) Andriy Gapon schrieb: > Author: avg > Date: Tue Jun 20 16:55:30 2017 > New Revision: 320153 > URL: https://svnweb.freebsd.org/changeset/base/320153 >=20 > Log: > revert r315852 which introduced zio_buf_alloc_nowait for use in vdev_qu= eue_aggregate > =20 > I think that the change is still good, but reconciling it with a planned > merge of the ARC buf data scatter-ization is a bit more tedious > than I can handle. > =20 > MFC after: 17 days >=20 > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jun= 20 > 16:45:48 2017 (r320152) +++ > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jun 20 > 16:55:30 2017 (r320153) @@ -555,7 +555,6 @@ extern zio_t > *zio_unique_parent(zio_t *cio); extern void zio_add_child(zio_t *pio, zio= _t *cio);=20 > extern void *zio_buf_alloc(size_t size); > -extern void *zio_buf_alloc_nowait(size_t size); > extern void zio_buf_free(void *buf, size_t size); > extern void *zio_data_buf_alloc(size_t size); > extern void zio_data_buf_free(void *buf, size_t size); >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue = Jun 20 > 16:45:48 2017 (r320152) +++ > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jun = 20 > 16:55:30 2017 (r320153) @@ -647,7 +647,6 @@ static zio_t * > vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) { > zio_t *first, *last, *aio, *dio, *mandatory, *nio; > - void *abuf; > uint64_t maxgap =3D 0; > uint64_t size; > boolean_t stretch; > @@ -766,12 +765,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) > size =3D IO_SPAN(first, last); > ASSERT3U(size, <=3D, SPA_MAXBLOCKSIZE); > =20 > - abuf =3D zio_buf_alloc_nowait(size); > - if (abuf =3D=3D NULL) > - return (NULL); > - > aio =3D zio_vdev_delegated_io(first->io_vd, first->io_offset, > - abuf, size, first->io_type, zio->io_priority, > + zio_buf_alloc(size), size, first->io_type, zio->io_priority, > flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE, > vdev_queue_agg_io_done, NULL); > aio->io_timestamp =3D first->io_timestamp; >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 > 16:45:48 2017 (r320152) +++ > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 16:5= 5:30 > 2017 (r320153) @@ -272,33 +272,18 @@ zio_fini(void) > * useful to inspect ZFS metadata, but if possible, we should avoid keep= ing > * excess / transient data in-core during a crashdump. > */ > -static void * > -zio_buf_alloc_impl(size_t size, boolean_t canwait) > +void * > +zio_buf_alloc(size_t size) > { > size_t c =3D (size - 1) >> SPA_MINBLOCKSHIFT; > int flags =3D zio_exclude_metadata ? KM_NODEBUG : 0; > =20 > VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); > =20 > - if (zio_use_uma) { > - return (kmem_cache_alloc(zio_buf_cache[c], > - canwait ? KM_PUSHPAGE : KM_NOSLEEP)); > - } else { > - return (kmem_alloc(size, > - (canwait ? KM_SLEEP : KM_NOSLEEP) | flags)); > - } > -} > - > -void * > -zio_buf_alloc(size_t size) > -{ > - return (zio_buf_alloc_impl(size, B_TRUE)); > -} > - > -void * > -zio_buf_alloc_nowait(size_t size) > -{ > - return (zio_buf_alloc_impl(size, B_FALSE)); > + if (zio_use_uma) > + return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); > + else > + return (kmem_alloc(size, KM_SLEEP|flags)); > } > =20 > /* > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Running r320138, which is stable for me, My systems crash immediately when = booting with r320158. Since I use ZFS compiled into the kernel and it seems to be the on= ly change so far of importance involving the kernel, I suspect the ZFS changes to be the= source of the crash. At the moment, I have no debugging kernel running, so this guess is more ou= t of the blue. Kind regards, Oliver --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/y/6PUfwYjouMG3Jbe0Sa7Vf Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWUlvhgAKCRDS528fyFhY lJ8EAfsHVgmuWR4InfxI8yz+2WS8IJV80W6zoIr463NfiIVinBI8bCcYn9eRsApJ ozc7aRl9zYfr2f4VhHEpYWKIFgBEAf9YdU3Kg5vWjfPMNzGlqfXXbUNeJQjnaizE 1U+DrSNENKjXMWin+4IwU4O3h4aYs5CHf/6LqHGTqybdf7RPUIbj =2D9a -----END PGP SIGNATURE----- --Sig_/y/6PUfwYjouMG3Jbe0Sa7Vf-- From owner-svn-src-all@freebsd.org Tue Jun 20 18:57:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A15FD9F89B; Tue, 20 Jun 2017 18:57:38 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E066EFBB; Tue, 20 Jun 2017 18:57:37 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.225.8.42]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MI5rO-1dMrAt3NJm-003u2h; Tue, 20 Jun 2017 20:57:29 +0200 Date: Tue, 20 Jun 2017 20:57:28 +0200 From: "O. Hartmann" To: "O. Hartmann" Cc: Andriy Gapon , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r320153 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <20170620205728.55f7d1f3@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170620205502.443284f7@thor.intern.walstatt.dynvpn.de> References: <201706201655.v5KGtUDS034789@repo.freebsd.org> <20170620205502.443284f7@thor.intern.walstatt.dynvpn.de> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/.PRtHx7.aeeXLmQSlJSCFMO"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:BULexW/Jk/IG6bNTAlSkQjDNseRtG2wbJhCXZC9/8d7Yx2bTocf pcWDKn4gCZDojfm0HJZ19hR8GNP77wl4BBD7ZycKvrSwy6wi8jgQKJ6QdjkyJlk7biqCJUG VQ1UzlQnspUaGNr3IWdeXmk1s4udxZhnPxJHkZPepVyR9GvlpL1A7siuPXPYmWcjGe4Ytrp arJoeLU6cHX2/CeZ4SqBQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:kI0IfNwvKXc=:0iKxvPVGqB2HdUCGI0gLgX uqTgU9oQv2VhhI4bUx3GZvqSZ1eflGIvSQw3bRzxMsswvvrKHcxtKImtYQofhh2GkCoaclai3 6I7WnsFRZFpWs38h4JUgcwgT1gkoj9T9gAMcZYWJkzvUZdQ/8+XOvBvs740+LTGis0O0V+tEh U5pxWiDlzsQmpzu8eZEtOuE1JfGZFko477YFkJI57yN3dbB/F8uM3ZvW7iPxQhviASg3W+9Vd qrhSU3b/7hI8CcdVop5xJGt4TaB+c7fOGefDIXjAyk8wC7/M1Z6lHhcEnebW9q/Ohr6Ni/WMr EQIxcC85r/nNDZ5soyDiaG6Rdmg3bfhjYTsEjdo5853a5UaL5TB5Thhzn+3m37EQ2+gJGYWk/ WsjgzLjQn74HsiDNRJ9ZDAp7xyUKe015I+w7Gwk9uaiEN/SkpWyCe6muosyvJAr35MK2uHttc +tmfGe9ZXBaEmUW0S+AnZ0TLohN+cbuaAvQXlUi8OmZHWiY5AQStkhvibiiD6QPzTXoJPyCj+ XYQ3xzm8xwz0wLAl9UEMnUe+L52l/aAlRJ27iqpjL9opur4ST5N+ctssGftK+40GNNH5xGdvJ 5pK45UOYNXCC9IboZ2SSoSljFLHzAsrW18tVrQJSX/IiQGOaQ2JU/Att8WyxtDQsupDX6YflE RTL5ra7LEowEsR04edGGKZNaQ12IagsJJXm2Q/Il6tCpxQBOK2BISyGbuHN+lNJKFH9nbZMRp 9E9ee/j72zNoZNXCx8gc5uOjaw16CTMAXEvCQqNGrw99KHnhCZQ0AdSPV48= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:57:38 -0000 --Sig_/.PRtHx7.aeeXLmQSlJSCFMO Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Tue, 20 Jun 2017 20:55:02 +0200 "O. Hartmann" schrieb: > Am Tue, 20 Jun 2017 16:55:30 +0000 (UTC) > Andriy Gapon schrieb: >=20 > > Author: avg > > Date: Tue Jun 20 16:55:30 2017 > > New Revision: 320153 > > URL: https://svnweb.freebsd.org/changeset/base/320153 > >=20 > > Log: > > revert r315852 which introduced zio_buf_alloc_nowait for use in vdev_= queue_aggregate > > =20 > > I think that the change is still good, but reconciling it with a plan= ned > > merge of the ARC buf data scatter-ization is a bit more tedious > > than I can handle. > > =20 > > MFC after: 17 days > >=20 > > Modified: > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > >=20 > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue J= un 20 > > 16:45:48 2017 (r320152) +++ > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jun 20 > > 16:55:30 2017 (r320153) @@ -555,7 +555,6 @@ extern zio_t > > *zio_unique_parent(zio_t *cio); extern void zio_add_child(zio_t *pio, z= io_t *cio);=20 > > extern void *zio_buf_alloc(size_t size); > > -extern void *zio_buf_alloc_nowait(size_t size); > > extern void zio_buf_free(void *buf, size_t size); > > extern void *zio_data_buf_alloc(size_t size); > > extern void zio_data_buf_free(void *buf, size_t size); > >=20 > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queu= e.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tu= e Jun 20 > > 16:45:48 2017 (r320152) +++ > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Ju= n 20 > > 16:55:30 2017 (r320153) @@ -647,7 +647,6 @@ static zio_t * > > vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) { > > zio_t *first, *last, *aio, *dio, *mandatory, *nio; > > - void *abuf; > > uint64_t maxgap =3D 0; > > uint64_t size; > > boolean_t stretch; > > @@ -766,12 +765,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) > > size =3D IO_SPAN(first, last); > > ASSERT3U(size, <=3D, SPA_MAXBLOCKSIZE); > > =20 > > - abuf =3D zio_buf_alloc_nowait(size); > > - if (abuf =3D=3D NULL) > > - return (NULL); > > - > > aio =3D zio_vdev_delegated_io(first->io_vd, first->io_offset, > > - abuf, size, first->io_type, zio->io_priority, > > + zio_buf_alloc(size), size, first->io_type, zio->io_priority, > > flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE, > > vdev_queue_agg_io_done, NULL); > > aio->io_timestamp =3D first->io_timestamp; > >=20 > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 > > 16:45:48 2017 (r320152) +++ > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 20 16= :55:30 > > 2017 (r320153) @@ -272,33 +272,18 @@ zio_fini(void) > > * useful to inspect ZFS metadata, but if possible, we should avoid ke= eping > > * excess / transient data in-core during a crashdump. > > */ > > -static void * > > -zio_buf_alloc_impl(size_t size, boolean_t canwait) > > +void * > > +zio_buf_alloc(size_t size) > > { > > size_t c =3D (size - 1) >> SPA_MINBLOCKSHIFT; > > int flags =3D zio_exclude_metadata ? KM_NODEBUG : 0; > > =20 > > VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); > > =20 > > - if (zio_use_uma) { > > - return (kmem_cache_alloc(zio_buf_cache[c], > > - canwait ? KM_PUSHPAGE : KM_NOSLEEP)); > > - } else { > > - return (kmem_alloc(size, > > - (canwait ? KM_SLEEP : KM_NOSLEEP) | flags)); > > - } > > -} > > - > > -void * > > -zio_buf_alloc(size_t size) > > -{ > > - return (zio_buf_alloc_impl(size, B_TRUE)); > > -} > > - > > -void * > > -zio_buf_alloc_nowait(size_t size) > > -{ > > - return (zio_buf_alloc_impl(size, B_FALSE)); > > + if (zio_use_uma) > > + return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); > > + else > > + return (kmem_alloc(size, KM_SLEEP|flags)); > > } > > =20 > > /* > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"= =20 >=20 > Running r320138, which is stable for me, My systems crash immediately whe= n booting with > r320158. Since I use ZFS compiled into the kernel and it seems to be the = only change so > far of importance involving the kernel, I suspect the ZFS changes to be t= he source of > the crash. >=20 > At the moment, I have no debugging kernel running, so this guess is more = out of the > blue. >=20 > Kind regards, > Oliver >=20 I meant r320156, not this one 9r320153) :-( Sorry. Hit the wrong line. --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/.PRtHx7.aeeXLmQSlJSCFMO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWUlwGAAKCRDS528fyFhY lF+TAgCTduvR692gA5twjOTDwV3nKycgrS/XY5yt/q0rRYywjC7BW+aGZdRCorCv PoL2t6rgRoQNGciCa5Lt/+xgvDANAf9/aNGMkvshViP4twitq+6SaVbHaOZdDine kHtLoBp9R/AybK8bZk9gfyOpcuNZuNPr3W4TEk80ydTuGYfXiGsb =abtP -----END PGP SIGNATURE----- --Sig_/.PRtHx7.aeeXLmQSlJSCFMO-- From owner-svn-src-all@freebsd.org Tue Jun 20 19:00:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5812FD9F951; Tue, 20 Jun 2017 19:00:56 +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 26A556F16A; Tue, 20 Jun 2017 19:00:56 +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 v5KJ0tju085383; Tue, 20 Jun 2017 19:00:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJ0tHp085382; Tue, 20 Jun 2017 19:00:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706201900.v5KJ0tHp085382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 20 Jun 2017 19:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320163 - head/usr.sbin/makefs/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:00:56 -0000 Author: asomers Date: Tue Jun 20 19:00:55 2017 New Revision: 320163 URL: https://svnweb.freebsd.org/changeset/base/320163 Log: Fix usr.sbin/makefs/makefs_ffs_tests when /etc/fstab does not exist dumpfs prints a harmless warning message (via ufs_disk_fillout(3) and getfsfile(3)), when /etc/fstab does not exist. We can ignore it. PR: 220165 Reported by: gjb MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Tue Jun 20 18:52:35 2017 (r320162) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Tue Jun 20 19:00:55 2017 (r320163) @@ -182,7 +182,7 @@ o_flag_version_1_body() $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR mount_image - atf_check -e empty -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR + atf_check -e ignore -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR check_ffs_image_contents } o_flag_version_1_cleanup() @@ -214,7 +214,7 @@ o_flag_version_2_body() $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR mount_image - atf_check -e empty -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR + atf_check -e ignore -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR check_ffs_image_contents } o_flag_version_2_cleanup() From owner-svn-src-all@freebsd.org Tue Jun 20 19:16:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7FB6D9FCC3; Tue, 20 Jun 2017 19:16:08 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98BFF6F8F5; Tue, 20 Jun 2017 19:16:08 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KJG7if091775; Tue, 20 Jun 2017 19:16:07 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJG7Tk091767; Tue, 20 Jun 2017 19:16:07 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706201916.v5KJG7Tk091767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Jun 2017 19:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320164 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:16:09 -0000 Author: davidcs Date: Tue Jun 20 19:16:06 2017 New Revision: 320164 URL: https://svnweb.freebsd.org/changeset/base/320164 Log: MFC r319964 Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 Add support for pci deviceID 0x8070 for QLE41xxx product line which supports 10GbE/25GbE/40GbE Approved by: re(gjb) Modified: stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h stable/11/sys/dev/qlnx/qlnxe/common_hsi.h stable/11/sys/dev/qlnx/qlnxe/ecore.h stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_dcbx.c stable/11/sys/dev/qlnx/qlnxe/ecore_dcbx.h stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c stable/11/sys/dev/qlnx/qlnxe/ecore_dev_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_common.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h stable/11/sys/dev/qlnx/qlnxe/ecore_hw.c stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c stable/11/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_ops.c stable/11/sys/dev/qlnx/qlnxe/ecore_init_ops.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_int.c stable/11/sys/dev/qlnx/qlnxe/ecore_int.h stable/11/sys/dev/qlnx/qlnxe/ecore_int_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_iov_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_iro.h stable/11/sys/dev/qlnx/qlnxe/ecore_iro_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_iscsi.h stable/11/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_l2.c stable/11/sys/dev/qlnx/qlnxe/ecore_l2.h stable/11/sys/dev/qlnx/qlnxe/ecore_l2_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_ll2.h stable/11/sys/dev/qlnx/qlnxe/ecore_ll2_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_mcp.c stable/11/sys/dev/qlnx/qlnxe/ecore_mcp.h stable/11/sys/dev/qlnx/qlnxe/ecore_mcp_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_ooo.h stable/11/sys/dev/qlnx/qlnxe/ecore_proto_if.h stable/11/sys/dev/qlnx/qlnxe/ecore_roce.h stable/11/sys/dev/qlnx/qlnxe/ecore_roce_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_rt_defs.h stable/11/sys/dev/qlnx/qlnxe/ecore_sp_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_sp_commands.c stable/11/sys/dev/qlnx/qlnxe/ecore_sp_commands.h stable/11/sys/dev/qlnx/qlnxe/ecore_spq.c stable/11/sys/dev/qlnx/qlnxe/ecore_sriov.h stable/11/sys/dev/qlnx/qlnxe/ecore_vf.h stable/11/sys/dev/qlnx/qlnxe/ecore_vf_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h stable/11/sys/dev/qlnx/qlnxe/eth_common.h stable/11/sys/dev/qlnx/qlnxe/fcoe_common.h stable/11/sys/dev/qlnx/qlnxe/iscsi_common.h stable/11/sys/dev/qlnx/qlnxe/mcp_private.h stable/11/sys/dev/qlnx/qlnxe/mcp_public.h stable/11/sys/dev/qlnx/qlnxe/mfw_hsi.h stable/11/sys/dev/qlnx/qlnxe/nvm_cfg.h stable/11/sys/dev/qlnx/qlnxe/nvm_map.h stable/11/sys/dev/qlnx/qlnxe/pcics_reg_driver.h stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c stable/11/sys/dev/qlnx/qlnxe/qlnx_ver.h stable/11/sys/dev/qlnx/qlnxe/rdma_common.h stable/11/sys/dev/qlnx/qlnxe/reg_addr.h stable/11/sys/dev/qlnx/qlnxe/spad_layout.h stable/11/sys/dev/qlnx/qlnxe/storage_common.h stable/11/sys/dev/qlnx/qlnxe/tcp_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 19:16:06 2017 (r320164) @@ -34,12 +34,17 @@ #include "ecore_status.h" #include +#if __FreeBSD_version >= 1200000 +#include +#else #if __FreeBSD_version >= 1100090 #include #else #include #endif +#endif +#define OSAL_NUM_CPUS() mp_ncpus /* * prototypes of freebsd specific functions required by ecore */ @@ -60,6 +65,7 @@ extern int qlnx_pci_find_capability(void *ecore_dev, i extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr); extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value); +extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value); extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr); extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value); @@ -129,6 +135,8 @@ rounddown_pow_of_two(unsigned long x) #endif /* #ifndef QLNX_RDMA */ +#define OSAL_UNUSED + #define OSAL_CPU_TO_BE64(val) htobe64(val) #define OSAL_BE64_TO_CPU(val) be64toh(val) @@ -199,6 +207,8 @@ typedef struct osal_list_t #define REG_WR(hwfn, addr, val) qlnx_reg_wr32(hwfn, addr, val) #define REG_WR16(hwfn, addr, val) qlnx_reg_wr16(hwfn, addr, val) #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value) +#define DIRECT_REG_WR64(p_hwfn, addr, value) \ + qlnx_direct_reg_wr64(p_hwfn, addr, value) #define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr) #define REG_RD(hwfn, addr) qlnx_reg_rd32(hwfn, addr) #define DOORBELL(hwfn, addr, value) \ Modified: stable/11/sys/dev/qlnx/qlnxe/common_hsi.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 19:16:06 2017 (r320164) @@ -88,7 +88,7 @@ #define CORE_SPQE_PAGE_SIZE_BYTES 4096 /* - * Usually LL2 queues are opened in pairs TX-RX. + * Usually LL2 queues are opened in pairs – TX-RX. * There is a hard restriction on number of RX queues (limited by Tstorm RAM) and TX counters (Pstorm RAM). * Number of TX queues is almost unlimited. * The constants are different so as to allow asymmetric LL2 connections @@ -99,13 +99,13 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// -// Include firmware version number only- do not add constants here to avoid redundunt compilations +// Include firmware verison number only- do not add constants here to avoid redundunt compilations /////////////////////////////////////////////////////////////////////////////////////////////////// #define FW_MAJOR_VERSION 8 -#define FW_MINOR_VERSION 18 -#define FW_REVISION_VERSION 14 +#define FW_MINOR_VERSION 30 +#define FW_REVISION_VERSION 0 #define FW_ENGINEERING_VERSION 0 /***********************/ @@ -113,60 +113,60 @@ /***********************/ /* PCI functions */ -#define MAX_NUM_PORTS_K2 (4) #define MAX_NUM_PORTS_BB (2) -#define MAX_NUM_PORTS (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS_K2 (4) +#define MAX_NUM_PORTS_E5 (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) -#define MAX_NUM_PFS_K2 (16) #define MAX_NUM_PFS_BB (8) -#define MAX_NUM_PFS (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS_K2 (16) +#define MAX_NUM_PFS_E5 (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS (MAX_NUM_PFS_E5) #define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ #define MAX_NUM_VFS_BB (120) #define MAX_NUM_VFS_K2 (192) -#define E4_MAX_NUM_VFS (MAX_NUM_VFS_K2) -#define E5_MAX_NUM_VFS (240) -#define COMMON_MAX_NUM_VFS (E5_MAX_NUM_VFS) +#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) +#define MAX_NUM_VFS_E5 (240) +#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) #define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) /* in both BB and K2, the VF number starts from 16. so for arrays containing all */ /* possible PFs and VFs - we need a constant for this size */ #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) #define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) -#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) #define MAX_NUM_VPORTS_K2 (208) #define MAX_NUM_VPORTS_BB (160) -#define MAX_NUM_VPORTS (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E5 (256) +#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) #define MAX_NUM_L2_QUEUES_K2 (320) #define MAX_NUM_L2_QUEUES_BB (256) #define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_K2) /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */ -// 4-Port K2. #define NUM_PHYS_TCS_4PORT_K2 (4) +#define NUM_PHYS_TCS_4PORT_E5 (6) #define NUM_OF_PHYS_TCS (8) - +#define PURE_LB_TC NUM_OF_PHYS_TCS #define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) +#define NUM_TCS_4PORT_E5 (NUM_PHYS_TCS_4PORT_E5 + 1) #define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) -#define LB_TC (NUM_OF_PHYS_TCS) - /* Num of possible traffic priority values */ #define NUM_OF_PRIO (8) -#define MAX_NUM_VOQS_K2 (NUM_TCS_4PORT_K2 * MAX_NUM_PORTS_K2) -#define MAX_NUM_VOQS_BB (NUM_OF_TCS * MAX_NUM_PORTS_BB) -#define MAX_NUM_VOQS (MAX_NUM_VOQS_K2) -#define MAX_PHYS_VOQS (NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB) - /* CIDs */ -#define E4_NUM_OF_CONNECTION_TYPES (8) -#define E5_NUM_OF_CONNECTION_TYPES (16) +#define NUM_OF_CONNECTION_TYPES_E4 (8) +#define NUM_OF_CONNECTION_TYPES_E5 (16) #define NUM_OF_TASK_TYPES (8) #define NUM_OF_LCIDS (320) #define NUM_OF_LTIDS (320) @@ -375,11 +375,13 @@ /* number of TX queues in the QM */ #define MAX_QM_TX_QUEUES_K2 512 #define MAX_QM_TX_QUEUES_BB 448 +#define MAX_QM_TX_QUEUES_E5 MAX_QM_TX_QUEUES_K2 #define MAX_QM_TX_QUEUES MAX_QM_TX_QUEUES_K2 /* number of Other queues in the QM */ #define MAX_QM_OTHER_QUEUES_BB 64 #define MAX_QM_OTHER_QUEUES_K2 128 +#define MAX_QM_OTHER_QUEUES_E5 MAX_QM_OTHER_QUEUES_K2 #define MAX_QM_OTHER_QUEUES MAX_QM_OTHER_QUEUES_K2 /* number of queues in a PF queue group */ @@ -413,7 +415,9 @@ #define CAU_FSM_ETH_TX 1 /* Number of Protocol Indices per Status Block */ -#define PIS_PER_SB 12 +#define PIS_PER_SB_E4 12 +#define PIS_PER_SB_E5 8 +#define MAX_PIS_PER_SB OSAL_MAX_T(u8, PIS_PER_SB_E4, PIS_PER_SB_E5) #define CAU_HC_STOPPED_STATE 3 /* fsm is stopped or not valid for this sb */ @@ -427,7 +431,8 @@ #define MAX_SB_PER_PATH_K2 (368) #define MAX_SB_PER_PATH_BB (288) -#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_K2 +#define MAX_SB_PER_PATH_E5 (512) +#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_E5 #define MAX_SB_PER_PF_MIMD 129 #define MAX_SB_PER_PF_SIMD 64 @@ -588,7 +593,7 @@ // ILT Records #define PXP_NUM_ILT_RECORDS_BB 7600 #define PXP_NUM_ILT_RECORDS_K2 11000 -#define MAX_NUM_ILT_RECORDS MAX(PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(u16, PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) // Host Interface @@ -633,7 +638,8 @@ /******************/ /* Number of PBF command queue lines. Each line is 32B. */ -#define PBF_MAX_CMD_LINES 3328 +#define PBF_MAX_CMD_LINES_E4 3328 +#define PBF_MAX_CMD_LINES_E5 5280 /* Number of BTB blocks. Each block is 256B. */ #define BTB_MAX_BLOCKS 1440 @@ -737,8 +743,8 @@ union rdma_eqe_data */ struct malicious_vf_eqe_data { - u8 vfId /* Malicious VF ID */; - u8 errId /* Malicious VF error */; + u8 vf_id /* Malicious VF ID */; + u8 err_id /* Malicious VF error */; __le16 reserved[3]; }; @@ -747,7 +753,7 @@ struct malicious_vf_eqe_data */ struct initial_cleanup_eqe_data { - u8 vfId /* VF ID */; + u8 vf_id /* VF ID */; u8 reserved[7]; }; @@ -1059,7 +1065,7 @@ struct db_rdma_dpm_data { __le16 icid /* internal CID */; __le16 prod_val /* aggregated value to update */; - struct db_rdma_dpm_params params /* parameters passed to RDMA firmware */; + struct db_rdma_dpm_params params /* parametes passed to RDMA firmware */; }; @@ -1113,25 +1119,25 @@ enum igu_seg_access /* - * Enumeration for L3 type field of parsing_and_err_flags_union. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) + * Enumeration for L3 type field of parsing_and_err_flags. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) */ enum l3_type { - e_l3Type_unknown, - e_l3Type_ipv4, - e_l3Type_ipv6, + e_l3_type_unknown, + e_l3_type_ipv4, + e_l3_type_ipv6, MAX_L3_TYPE }; /* - * Enumeration for l4Protocol field of parsing_and_err_flags_union. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. + * Enumeration for l4Protocol field of parsing_and_err_flags. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. */ enum l4_protocol { - e_l4Protocol_none, - e_l4Protocol_tcp, - e_l4Protocol_udp, + e_l4_protocol_none, + e_l4_protocol_tcp, + e_l4_protocol_udp, MAX_L4_PROTOCOL }; @@ -1146,11 +1152,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT 0 #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK 0x3 /* L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. (use enum l4_protocol) */ #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT 2 -#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4 fragment. */ +#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4/IPv6 fragment. */ #define PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT 4 -#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* Set if VLAN tag exists. Invalid if tunnel type are IP GRE or IP GENEVE. */ +#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* corresponds to the same 8021q tag that is selected for 8021q-tag fiel. This flag should be set if the tag appears in the packet, regardless of its value. */ #define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT 5 -#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_SHIFT 6 #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_MASK 0x1 /* Set for PTP packet. */ #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_SHIFT 7 @@ -1162,11 +1168,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L4CHKSMERROR_SHIFT 10 #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_MASK 0x1 /* Set if GRE/VXLAN/GENEVE tunnel detected. */ #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_SHIFT 11 -#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* Set if VLAN tag exists in tunnel header. */ +#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* This flag should be set if the tag appears in the packet tunnel header, regardless of its value.. */ #define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_SHIFT 12 #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_MASK 0x1 /* Set if either tunnel-ipv4-version-mismatch or tunnel-ipv4-hdr-len-error or tunnel-ipv4-cksm is set or tunneling ipv6 ver mismatch */ #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_SHIFT 13 -#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* Set if GRE or VXLAN/GENEVE UDP checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_SHIFT 14 #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_MASK 0x1 /* Set if tunnel L4 checksum validation failed. Valid only if tunnel L4 checksum was calculated. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_SHIFT 15 @@ -1419,21 +1425,42 @@ enum rss_hash_type /* * status block structure */ -struct status_block +struct status_block_e4 { - __le16 pi_array[PIS_PER_SB]; + __le16 pi_array[PIS_PER_SB_E4]; __le32 sb_num; -#define STATUS_BLOCK_SB_NUM_MASK 0x1FF -#define STATUS_BLOCK_SB_NUM_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD_MASK 0x7F -#define STATUS_BLOCK_ZERO_PAD_SHIFT 9 -#define STATUS_BLOCK_ZERO_PAD2_MASK 0xFFFF -#define STATUS_BLOCK_ZERO_PAD2_SHIFT 16 +#define STATUS_BLOCK_E4_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E4_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E4_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT 16 __le32 prod_index; -#define STATUS_BLOCK_PROD_INDEX_MASK 0xFFFFFF -#define STATUS_BLOCK_PROD_INDEX_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD3_MASK 0xFF -#define STATUS_BLOCK_ZERO_PAD3_SHIFT 24 +#define STATUS_BLOCK_E4_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT 24 +}; + + +/* + * status block structure + */ +struct status_block_e5 +{ + __le16 pi_array[PIS_PER_SB_E5]; + __le32 sb_num; +#define STATUS_BLOCK_E5_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E5_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E5_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT 16 + __le32 prod_index; +#define STATUS_BLOCK_E5_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT 24 }; Modified: stable/11/sys/dev/qlnx/qlnxe/ecore.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 19:16:06 2017 (r320164) @@ -39,8 +39,8 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 18 -#define ECORE_REVISION_VERSION 13 +#define ECORE_MINOR_VERSION 30 +#define ECORE_REVISION_VERSION 0 #define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ @@ -110,13 +110,13 @@ do { \ #define GET_FIELD(value, name) \ (((value) >> (name##_SHIFT)) & name##_MASK) -#define ECORE_MFW_GET_FIELD(name, field) \ - (((name) & (field ## _MASK)) >> (field ## _SHIFT)) +#define GET_MFW_FIELD(name, field) \ + (((name) & (field ## _MASK)) >> (field ## _OFFSET)) -#define ECORE_MFW_SET_FIELD(name, field, value) \ +#define SET_MFW_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ - (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK)); \ + (name) &= ~((field ## _MASK) << (field ## _OFFSET)); \ + (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK)); \ } while (0) static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS) @@ -401,6 +401,11 @@ enum ecore_wol_support { ECORE_WOL_SUPPORT_PME, }; +enum ecore_db_rec_exec { + DB_REC_DRY_RUN, + DB_REC_REAL_DEAL, +}; + struct ecore_hw_info { /* PCI personality */ enum ecore_pci_personality personality; @@ -450,10 +455,7 @@ struct ecore_hw_info { #ifndef ETH_ALEN #define ETH_ALEN 6 /* @@@ TBD - define somewhere else for Windows */ #endif - unsigned char hw_mac_addr[ETH_ALEN]; - u64 node_wwn; /* For FCoE only */ - u64 port_wwn; /* For FCoE only */ u16 num_iscsi_conns; u16 num_fcoe_conns; @@ -537,6 +539,12 @@ struct ecore_qm_info { u8 num_pf_rls; }; +struct ecore_db_recovery_info { + osal_list_t list; + osal_spinlock_t lock; + u32 db_recovery_counter; +}; + struct storm_stats { u32 address; u32 len; @@ -605,6 +613,11 @@ struct ecore_hwfn { struct ecore_ptt *p_main_ptt; struct ecore_ptt *p_dpc_ptt; + /* PTP will be used only by the leading funtion. + * Usage of all PTP-apis should be synchronized as result. + */ + struct ecore_ptt *p_ptp_ptt; + struct ecore_sb_sp_info *p_sp_sb; struct ecore_sb_attn_info *p_sb_attn; @@ -661,6 +674,9 @@ struct ecore_hwfn { /* L2-related */ struct ecore_l2_info *p_l2_info; + + /* Mechanism for recovering from doorbell drop */ + struct ecore_db_recovery_info db_recovery_info; }; enum ecore_mf_mode { @@ -694,7 +710,7 @@ struct ecore_dev { #define ECORE_IS_AH(dev) ((dev)->type == ECORE_DEV_TYPE_AH) #define ECORE_IS_K2(dev) ECORE_IS_AH(dev) -#define ECORE_IS_E5(dev) false +#define ECORE_IS_E5(dev) ((dev)->type == ECORE_DEV_TYPE_E5) #define ECORE_E5_MISSING_CODE OSAL_BUILD_BUG_ON(false) @@ -703,6 +719,7 @@ struct ecore_dev { #define ECORE_DEV_ID_MASK 0xff00 #define ECORE_DEV_ID_MASK_BB 0x1600 #define ECORE_DEV_ID_MASK_AH 0x8000 +#define ECORE_DEV_ID_MASK_E5 0x8100 u16 chip_num; #define CHIP_NUM_MASK 0xffff @@ -746,7 +763,7 @@ struct ecore_dev { #define CHIP_BOND_ID_SHIFT 0 u8 num_engines; - u8 num_ports_in_engines; + u8 num_ports_in_engine; u8 num_funcs_in_port; u8 path_id; @@ -836,6 +853,9 @@ struct ecore_dev { : MAX_SB_PER_PATH_K2) #define NUM_OF_ENG_PFS(dev) (ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \ : MAX_NUM_PFS_K2) + +#define CRC8_TABLE_SIZE 256 + /** * @brief ecore_concrete_to_sw_fid - get the sw function id from * the concrete value. @@ -844,8 +864,7 @@ struct ecore_dev { * * @return OSAL_INLINE u8 */ -static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct ecore_dev *p_dev, - u32 concrete_fid) +static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid) { u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); @@ -860,8 +879,8 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct return sw_fid; } -#define PURE_LB_TC 8 #define PKT_LB_TC 9 +#define MAX_NUM_VOQS_E4 20 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate); void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev, @@ -873,6 +892,7 @@ int ecore_configure_pf_min_bandwidth(struct ecore_dev void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); int ecore_device_num_engines(struct ecore_dev *p_dev); int ecore_device_num_ports(struct ecore_dev *p_dev); +int ecore_device_get_port_id(struct ecore_dev *p_dev); void ecore_set_fw_mac_addr(__le16 *fw_msb, __le16 *fw_mid, __le16 *fw_lsb, u8 *mac); @@ -892,6 +912,13 @@ u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf); u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid); +const char *ecore_hw_get_resc_name(enum ecore_resources res_id); + +/* doorbell recovery mechanism */ +void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn); +void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn, + enum ecore_db_rec_exec); + /* amount of resources used in qm init */ u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn); u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn); @@ -900,7 +927,5 @@ u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_ u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn); #define ECORE_LEADING_HWFN(dev) (&dev->hwfns[0]) - -const char *ecore_hw_get_resc_name(enum ecore_resources res_id); #endif /* __ECORE_H */ Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 19:16:06 2017 (r320164) @@ -214,6 +214,11 @@ static OSAL_INLINE u32 ecore_chain_get_cons_idx_u32(st return p_chain->u.chain32.cons_idx; } +/* FIXME: + * Should create OSALs for the below definitions. + * For Linux, replace them with the existing U16_MAX and U32_MAX, and handle + * kernel versions that lack them. + */ #define ECORE_U16_MAX ((u16)~0U) #define ECORE_U32_MAX ((u32)~0U) Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 19:16:06 2017 (r320164) @@ -72,17 +72,7 @@ __FBSDID("$FreeBSD$"); #define TM_ELEM_SIZE 4 /* ILT constants */ -/* If for some reason, HW P size is modified to be less than 32K, - * special handling needs to be made for CDU initialization - */ -#ifdef CONFIG_ECORE_ROCE -/* For RoCE we configure to 64K to cover for RoCE max tasks 256K purpose. Can be - * optimized with resource management scheme - */ #define ILT_DEFAULT_HW_P_SIZE 4 -#else -#define ILT_DEFAULT_HW_P_SIZE 3 -#endif #define ILT_PAGE_IN_BYTES(hw_p_size) (1U << ((hw_p_size) + 12)) #define ILT_CFG_REG(cli, reg) PSWRQ2_REG_##cli##_##reg##_RT_OFFSET @@ -97,22 +87,22 @@ __FBSDID("$FreeBSD$"); /* connection context union */ union conn_context { - struct core_conn_context core_ctx; - struct eth_conn_context eth_ctx; - struct iscsi_conn_context iscsi_ctx; - struct fcoe_conn_context fcoe_ctx; - struct roce_conn_context roce_ctx; + struct e4_core_conn_context core_ctx; + struct e4_eth_conn_context eth_ctx; + struct e4_iscsi_conn_context iscsi_ctx; + struct e4_fcoe_conn_context fcoe_ctx; + struct e4_roce_conn_context roce_ctx; }; /* TYPE-0 task context - iSCSI, FCOE */ union type0_task_context { - struct iscsi_task_context iscsi_ctx; - struct fcoe_task_context fcoe_ctx; + struct e4_iscsi_task_context iscsi_ctx; + struct e4_fcoe_task_context fcoe_ctx; }; /* TYPE-1 task context - ROCE */ union type1_task_context { - struct rdma_task_context roce_ctx; + struct e4_rdma_task_context roce_ctx; }; struct src_ent { @@ -274,12 +264,10 @@ struct ecore_cxt_mngr { }; /* check if resources/configuration is required according to protocol type */ -static bool src_proto(struct ecore_hwfn *p_hwfn, - enum protocol_type type) +static bool src_proto(enum protocol_type type) { return type == PROTOCOLID_ISCSI || type == PROTOCOLID_FCOE || - type == PROTOCOLID_TOE || type == PROTOCOLID_IWARP; } @@ -319,14 +307,13 @@ struct ecore_src_iids { u32 per_vf_cids; }; -static void ecore_cxt_src_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_src_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_src_iids *iids) { u32 i; for (i = 0; i < MAX_CONN_TYPES; i++) { - if (!src_proto(p_hwfn, i)) + if (!src_proto(i)) continue; iids->pf_cids += p_mngr->conn_cfg[i].cid_count; @@ -346,8 +333,7 @@ struct ecore_tm_iids { u32 per_vf_tids; }; -static void ecore_cxt_tm_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_tm_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_tm_iids *iids) { bool tm_vf_required = false; @@ -454,6 +440,20 @@ static struct ecore_tid_seg *ecore_cxt_tid_seg_info(st return OSAL_NULL; } +static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + p_mgr->srq_count = num_srqs; +} + +u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + return p_mgr->srq_count; +} + /* set the iids (cid/tid) count per protocol */ static void ecore_cxt_set_proto_cid_count(struct ecore_hwfn *p_hwfn, enum protocol_type type, @@ -779,7 +779,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); ecore_cxt_qm_iids(p_hwfn, &qm_iids); - total = ecore_qm_pf_mem_size(p_hwfn->rel_pf_id, qm_iids.cids, + total = ecore_qm_pf_mem_size(qm_iids.cids, qm_iids.vf_cids, qm_iids.tids, p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs); @@ -797,7 +797,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* SRC */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_SRC]); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); /* Both the PF and VFs searcher connections are stored in the per PF * database. Thus sum the PF searcher cids and all the VFs searcher @@ -822,7 +822,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* TM PF */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_TM]); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); total = tm_iids.pf_cids + tm_iids.pf_tids_total; if (total) { p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); @@ -952,7 +952,7 @@ static enum _ecore_status_t ecore_cxt_src_t2_alloc(str if (!p_src->active) return ECORE_SUCCESS; - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; total_size = conn_num * sizeof(struct src_ent); @@ -1287,7 +1287,7 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore clients[ILT_CLI_TSDM].last.reg = ILT_CFG_REG(TSDM, LAST_ILT); clients[ILT_CLI_TSDM].p_size.reg = ILT_CFG_REG(TSDM, P_SIZE); - /* default ILT page size for all clients is 32K */ + /* default ILT page size for all clients is 64K */ for (i = 0; i < ILT_CLI_MAX; i++) p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; @@ -1299,7 +1299,9 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore p_mngr->vf_count = p_hwfn->p_dev->p_iov_info->total_vfs; /* Initialize the dynamic ILT allocation mutex */ +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_ALLOC(p_hwfn, &p_mngr->mutex); +#endif OSAL_MUTEX_INIT(&p_mngr->mutex); /* Set the cxt mangr pointer priori to further allocations */ @@ -1347,7 +1349,9 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn) ecore_cid_map_free(p_hwfn); ecore_cxt_src_t2_free(p_hwfn); ecore_ilt_shadow_free(p_hwfn); +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex); +#endif OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr); p_hwfn->p_cxt_mngr = OSAL_NULL; @@ -1555,7 +1559,7 @@ static void ecore_cdu_init_pf(struct ecore_hwfn *p_hwf } } -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { struct ecore_qm_info *qm_info = &p_hwfn->qm_info; struct ecore_qm_iids iids; @@ -1563,9 +1567,8 @@ void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) OSAL_MEM_ZERO(&iids, sizeof(iids)); ecore_cxt_qm_iids(p_hwfn, &iids); - ecore_qm_pf_rt_init(p_hwfn, p_hwfn->p_main_ptt, p_hwfn->port_id, + ecore_qm_pf_rt_init(p_hwfn, p_ptt, p_hwfn->port_id, p_hwfn->rel_pf_id, qm_info->max_phys_tcs_per_port, - p_hwfn->first_on_engine, iids.cids, iids.vf_cids, iids.tids, qm_info->start_pq, qm_info->num_pqs - qm_info->num_vf_pqs, @@ -1749,7 +1752,7 @@ static void ecore_ilt_init_pf(struct ecore_hwfn *p_hwf if (p_shdw[line].p_virt != OSAL_NULL) { SET_FIELD(ilt_hw_entry, ILT_ENTRY_VALID, 1ULL); SET_FIELD(ilt_hw_entry, ILT_ENTRY_PHY_ADDR, - (p_shdw[line].p_phys >> 12)); + (unsigned long long)(p_shdw[line].p_phys >> 12)); DP_VERBOSE( p_hwfn, ECORE_MSG_ILT, @@ -1771,7 +1774,7 @@ static void ecore_src_init_pf(struct ecore_hwfn *p_hwf struct ecore_src_iids src_iids; OSAL_MEM_ZERO(&src_iids, sizeof(src_iids)); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; if (!conn_num) return; @@ -1817,7 +1820,7 @@ static void ecore_tm_init_pf(struct ecore_hwfn *p_hwfn u8 i; OSAL_MEM_ZERO(&tm_iids, sizeof(tm_iids)); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); /* @@@TBD No pre-scan for now */ @@ -1908,9 +1911,11 @@ static void ecore_prs_init_common(struct ecore_hwfn *p static void ecore_prs_init_pf(struct ecore_hwfn *p_hwfn) { struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_conn_type_cfg *p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + struct ecore_conn_type_cfg *p_fcoe; struct ecore_tid_seg *p_tid; + p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + /* If FCoE is active set the MAX OX_ID (tid) in the Parser */ if (!p_fcoe->cid_count) return; @@ -1934,9 +1939,9 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf ecore_prs_init_common(p_hwfn); } -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { - ecore_qm_init_pf(p_hwfn); + ecore_qm_init_pf(p_hwfn, p_ptt); ecore_cm_init_pf(p_hwfn); ecore_dq_init_pf(p_hwfn); ecore_cdu_init_pf(p_hwfn); @@ -2119,20 +2124,6 @@ enum _ecore_status_t ecore_cxt_get_cid_info(struct eco return ECORE_SUCCESS; } -static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - p_mgr->srq_count = num_srqs; -} - -u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - return p_mgr->srq_count; -} - static void ecore_rdma_set_pf_params(struct ecore_hwfn *p_hwfn, struct ecore_rdma_pf_params *p_params, u32 num_tasks) @@ -2143,7 +2134,7 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn /* Override personality with rdma flavor */ num_srqs = OSAL_MIN_T(u32, ECORE_RDMA_MAX_SRQS, p_params->num_srqs); - /* The only case RDMA personality can be overridden is if NVRAM is + /* The only case RDMA personality can be overriden is if NVRAM is * configured with ETH_RDMA or if no rdma protocol was requested */ switch (p_params->rdma_protocol) { @@ -2170,8 +2161,12 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn switch (p_hwfn->hw_info.personality) { case ECORE_PCI_ETH_IWARP: - num_qps = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); - num_cons = num_qps; + /* Each QP requires one connection */ + num_cons = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); +#ifdef CONFIG_ECORE_IWARP /* required for the define */ + /* additional connections required for passive tcp handling */ + num_cons += ECORE_IWARP_PREALLOC_CNT; +#endif proto = PROTOCOLID_IWARP; p_params->roce_edpm_mode = false; break; @@ -2576,14 +2571,14 @@ enum _ecore_status_t ecore_cxt_get_task_ctx(struct eco u8 ctx_type, void **pp_task_ctx) { - struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_ilt_client_cfg *p_cli; - struct ecore_ilt_cli_blk *p_seg; - struct ecore_tid_seg *p_seg_info; - u32 proto, seg; - u32 total_lines; - u32 tid_size, ilt_idx; - u32 num_tids_per_block; + struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; + struct ecore_ilt_client_cfg *p_cli; + struct ecore_tid_seg *p_seg_info; + struct ecore_ilt_cli_blk *p_seg; + u32 num_tids_per_block; + u32 tid_size, ilt_idx; + u32 total_lines; + u32 proto, seg; /* Verify the personality */ switch (p_hwfn->hw_info.personality) { Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 19:16:06 2017 (r320164) @@ -28,7 +28,6 @@ * */ - #ifndef _ECORE_CID_ #define _ECORE_CID_ @@ -130,15 +129,17 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf * @brief ecore_cxt_hw_init_pf - Initailze ILT and DQ, PF phase, per path. * * @param p_hwfn + * @param p_ptt */ -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief ecore_qm_init_pf - Initailze the QM PF phase, per path * * @param p_hwfn + * @param p_ptt */ -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief Reconfigures QM pf on the fly Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 19:16:06 2017 (r320164) @@ -31,7 +31,6 @@ #include __FBSDID("$FreeBSD$"); - #include "bcm_osal.h" #include "ecore.h" #include "ecore_hw.h" @@ -62,9 +61,6 @@ enum mem_groups { MEM_GROUP_IOR, MEM_GROUP_RAM, MEM_GROUP_BTB_RAM, - MEM_GROUP_RDIF_CTX, - MEM_GROUP_TDIF_CTX, - MEM_GROUP_CFC_MEM, MEM_GROUP_CONN_CFC_MEM, MEM_GROUP_TASK_CFC_MEM, MEM_GROUP_CAU_PI, @@ -73,6 +69,9 @@ enum mem_groups { MEM_GROUP_PBUF, MEM_GROUP_MULD_MEM, MEM_GROUP_BTB_MEM, + MEM_GROUP_RDIF_CTX, + MEM_GROUP_TDIF_CTX, + MEM_GROUP_CFC_MEM, MEM_GROUP_IGU_MEM, MEM_GROUP_IGU_MSIX, MEM_GROUP_CAU_SB, @@ -95,9 +94,6 @@ static const char* s_mem_group_names[] = { "IOR", "RAM", "BTB_RAM", - "RDIF_CTX", - "TDIF_CTX", - "CFC_MEM", "CONN_CFC_MEM", "TASK_CFC_MEM", "CAU_PI", @@ -106,6 +102,9 @@ static const char* s_mem_group_names[] = { "PBUF", "MULD_MEM", "BTB_MEM", + "RDIF_CTX", + "TDIF_CTX", + "CFC_MEM", "IGU_MEM", "IGU_MSIX", "CAU_SB", @@ -161,7 +160,7 @@ static u32 cond12(const u32 *r, const u32 *imm) { return (r[0] != r[1] && r[2] > imm[0]); } -static u32 cond3(const u32 *r, const u32 *imm) { +static u32 cond3(const u32 *r, const u32 OSAL_UNUSED *imm) { return (r[0] != r[1]); } @@ -256,7 +255,7 @@ struct storm_defs { /* Block constant definitions */ struct block_defs { const char *name; - bool has_dbg_bus[MAX_CHIP_IDS]; + bool exists[MAX_CHIP_IDS]; bool associated_to_storm; /* Valid only if associated_to_storm is true */ @@ -280,8 +279,8 @@ struct block_defs { /* Reset register definitions */ struct reset_reg_defs { u32 addr; - u32 unreset_val; bool exists[MAX_CHIP_IDS]; + u32 unreset_val[MAX_CHIP_IDS]; }; /* Debug Bus Constraint operation constant definitions */ @@ -311,8 +310,8 @@ struct rss_mem_defs { const char *mem_name; const char *type_name; u32 addr; + u32 entry_width; u32 num_entries[MAX_CHIP_IDS]; - u32 entry_width[MAX_CHIP_IDS]; }; struct vfc_ram_defs { @@ -550,7 +549,7 @@ static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFE static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFER_TYPE] = { /* BIN_BUF_DBG_MODE_TREE */ - { (const u32 *)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, + { (const u32*)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, /* BIN_BUF_DBG_DUMP_REG */ { dump_reg, OSAL_ARRAY_SIZE(dump_reg) }, @@ -615,7 +614,7 @@ static struct chip_defs s_chip_defs[MAX_CHIP_IDS] = { /* FPGA */ { MAX_NUM_PORTS_BB, MAX_NUM_PFS_BB, MAX_NUM_VFS_BB } } }, - { "k2", + { "ah", /* ASIC */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 20 19:32:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97663DA053C; Tue, 20 Jun 2017 19:32:41 +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 582FB704C8; Tue, 20 Jun 2017 19:32:41 +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 v5KJWeqf099583; Tue, 20 Jun 2017 19:32:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJWenJ099582; Tue, 20 Jun 2017 19:32:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706201932.v5KJWenJ099582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 20 Jun 2017 19:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320165 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:32:41 -0000 Author: asomers Date: Tue Jun 20 19:32:39 2017 New Revision: 320165 URL: https://svnweb.freebsd.org/changeset/base/320165 Log: devd(8): Remove pidfile on shutdown MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Tue Jun 20 19:16:06 2017 (r320164) +++ head/sbin/devd/devd.cc Tue Jun 20 19:32:39 2017 (r320165) @@ -1108,6 +1108,7 @@ event_loop(void) if (FD_ISSET(seqpacket_fd, &fds)) new_client(seqpacket_fd, SOCK_SEQPACKET); } + cfg.remove_pidfile(); close(seqpacket_fd); close(stream_fd); close(fd); From owner-svn-src-all@freebsd.org Tue Jun 20 19:34:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28EA0DA06EA; Tue, 20 Jun 2017 19:34:23 +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 ED60D7086A; Tue, 20 Jun 2017 19:34:22 +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 v5KJYMXL099741; Tue, 20 Jun 2017 19:34:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJYMeD099740; Tue, 20 Jun 2017 19:34:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706201934.v5KJYMeD099740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 20 Jun 2017 19:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320166 - head/sbin/devd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:34:23 -0000 Author: asomers Date: Tue Jun 20 19:34:21 2017 New Revision: 320166 URL: https://svnweb.freebsd.org/changeset/base/320166 Log: Require devd to be running for its ATF tests to run The ATF tests communicate with the system's running devd PR: 220169 Reported by: gjb MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sbin/devd/tests/Makefile Modified: head/sbin/devd/tests/Makefile ============================================================================== --- head/sbin/devd/tests/Makefile Tue Jun 20 19:32:39 2017 (r320165) +++ head/sbin/devd/tests/Makefile Tue Jun 20 19:34:21 2017 (r320166) @@ -1,7 +1,8 @@ # $FreeBSD$ ATF_TESTS_C= client_test -TEST_METADATA.client_test= required_programs="devd" +TEST_METADATA.client_test= required_files="/var/run/devd.pid" +TEST_METADATA.client_test+= required_programs="devd" TEST_METADATA.client_test+= required_user="root" TEST_METADATA.client_test+= timeout=15 From owner-svn-src-all@freebsd.org Tue Jun 20 19:45:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47B64DA0B10; Tue, 20 Jun 2017 19:45:04 +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 166CA70EBE; Tue, 20 Jun 2017 19:45:04 +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 v5KJj3bU004068; Tue, 20 Jun 2017 19:45:03 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJj3vx004067; Tue, 20 Jun 2017 19:45:03 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706201945.v5KJj3vx004067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 20 Jun 2017 19:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320167 - head/cddl/usr.sbin/zfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:45:04 -0000 Author: asomers Date: Tue Jun 20 19:45:02 2017 New Revision: 320167 URL: https://svnweb.freebsd.org/changeset/base/320167 Log: zfsd(8): Remove pidfile on shutdown MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/cddl/usr.sbin/zfsd/zfsd.cc Modified: head/cddl/usr.sbin/zfsd/zfsd.cc ============================================================================== --- head/cddl/usr.sbin/zfsd/zfsd.cc Tue Jun 20 19:34:21 2017 (r320166) +++ head/cddl/usr.sbin/zfsd/zfsd.cc Tue Jun 20 19:45:02 2017 (r320167) @@ -437,7 +437,7 @@ void ZfsDaemon::ClosePIDFile() { if (s_pidFH != NULL) - pidfile_close(s_pidFH); + pidfile_remove(s_pidFH); } void From owner-svn-src-all@freebsd.org Tue Jun 20 19:59:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD627DA0F45; Tue, 20 Jun 2017 19:59:58 +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 A800D714C9; Tue, 20 Jun 2017 19:59:58 +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 v5KJxvPs008284; Tue, 20 Jun 2017 19:59:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJxvtI008283; Tue, 20 Jun 2017 19:59:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201706201959.v5KJxvtI008283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 20 Jun 2017 19:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320168 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:59:59 -0000 Author: marius Date: Tue Jun 20 19:59:57 2017 New Revision: 320168 URL: https://svnweb.freebsd.org/changeset/base/320168 Log: The GEOM KPI in stable/10 requires Giant to be unacquired (a requirement dropped in r300287). So wrap calling into GEOM in {DROP,PICKUP}_GIANT(), similar to what as been done prio to r300288. This fixes a "Giant owned" panic with r318159 in place and INVARIANTS enabled. Reported by: Oliver Pinter Modified: stable/10/sys/geom/geom_flashmap.c Modified: stable/10/sys/geom/geom_flashmap.c ============================================================================== --- stable/10/sys/geom/geom_flashmap.c Tue Jun 20 19:45:02 2017 (r320167) +++ stable/10/sys/geom/geom_flashmap.c Tue Jun 20 19:59:57 2017 (r320168) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -230,10 +231,12 @@ g_flashmap_load(device_t dev, struct g_provider *pp, f void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) { + DROP_GIANT(); g_topology_lock(); if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) g_flashmap_slicers[type].slicer = slicer; g_topology_unlock(); + PICKUP_GIANT(); } static struct g_class g_flashmap_class = { From owner-svn-src-all@freebsd.org Tue Jun 20 20:19:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A5FDA1387; Tue, 20 Jun 2017 20:19:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E564F71E69; Tue, 20 Jun 2017 20:19:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KKJwF1016508; Tue, 20 Jun 2017 20:19:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKJv39016506; Tue, 20 Jun 2017 20:19:57 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201706202019.v5KKJv39016506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 20 Jun 2017 20:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320169 - stable/11/usr.bin/procstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:19:59 -0000 Author: brooks Date: Tue Jun 20 20:19:57 2017 New Revision: 320169 URL: https://svnweb.freebsd.org/changeset/base/320169 Log: MFC r318968: Add missing usage and getopt(3) options - Add the missing option 'n' to the getopt(3) string - Add the missing options 'libxo' and 'N' to the usage message - Add the missing options 'M' and 'N' to the man-page Submitted by: Keegan Drake H.P. Differential Revision: https://reviews.freebsd.org/D10915 Approved by: re (gjb) Modified: stable/11/usr.bin/procstat/procstat.1 stable/11/usr.bin/procstat/procstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/procstat/procstat.1 ============================================================================== --- stable/11/usr.bin/procstat/procstat.1 Tue Jun 20 19:59:57 2017 (r320168) +++ stable/11/usr.bin/procstat/procstat.1 Tue Jun 20 20:19:57 2017 (r320169) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 11, 2017 +.Dd June 20, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl -libxo .Op Fl CHhn +.Op Fl M Ar core +.Op Fl N Ar system .Op Fl w Ar interval .Op Fl b | c | e | f | i | j | k | l | r | s | S | t | v | x .Op Fl a | Ar pid | Ar core ... Modified: stable/11/usr.bin/procstat/procstat.c ============================================================================== --- stable/11/usr.bin/procstat/procstat.c Tue Jun 20 19:59:57 2017 (r320168) +++ stable/11/usr.bin/procstat/procstat.c Tue Jun 20 20:19:57 2017 (r320169) @@ -49,10 +49,11 @@ static void usage(void) { - xo_error("usage: procstat [-CHhn] [-M core] [-N system] " - "[-w interval]\n" + xo_error("usage: procstat [--libxo] [-CHhn] [-M core] " + "[-N system] [-w interval]\n" " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -r | -s | -S | -t | -v | -x]\n" + "-l | -r | -s | \n" + " -S | -t | -v | -x]\n" " [-a | pid | core ...]\n"); xo_finish(); exit(EX_USAGE); @@ -161,7 +162,7 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); xocontainer = "basic"; - while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrsStvw:x")) != -1) { + while ((ch = getopt(argc, argv, "abCcefHhijklM:N:nrSstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; From owner-svn-src-all@freebsd.org Tue Jun 20 20:22:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43733DA15AD; Tue, 20 Jun 2017 20:22:36 +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 1256A723A7; Tue, 20 Jun 2017 20:22:36 +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 v5KKMZOP026293; Tue, 20 Jun 2017 20:22:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKMZlE026292; Tue, 20 Jun 2017 20:22:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706202022.v5KKMZlE026292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 20 Jun 2017 20:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320170 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:22:36 -0000 Author: pfg Date: Tue Jun 20 20:22:34 2017 New Revision: 320170 URL: https://svnweb.freebsd.org/changeset/base/320170 Log: Attempt to treat "metadata" as a collectively singular noun. Or at least more consistent. Input from: matteo, ian Modified: head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 20:19:57 2017 (r320169) +++ head/sys/fs/ext2fs/ext2fs.h Tue Jun 20 20:22:34 2017 (r320170) @@ -317,7 +317,7 @@ struct ext2_gd { }; /* EXT2FS metadata is stored in little-endian byte order. These macros - * helps reading them. + * help reading it. */ #define e2fs_cgload(old, new, size) memcpy((new), (old), (size)); From owner-svn-src-all@freebsd.org Tue Jun 20 20:29:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B383DA18D8; Tue, 20 Jun 2017 20:29:56 +0000 (UTC) (envelope-from ken@freebsd.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BBC13729FA; Tue, 20 Jun 2017 20:29:55 +0000 (UTC) (envelope-from ken@freebsd.org) Received: from [10.0.0.26] (mbp2013.int.kdm.org [10.0.0.26]) (authenticated bits=0) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPSA id v5KKTluL029917 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 20 Jun 2017 16:29:48 -0400 (EDT) (envelope-from ken@freebsd.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... From: Ken Merry In-Reply-To: <201706201739.v5KHdPhO051256@repo.freebsd.org> Date: Tue, 20 Jun 2017 16:29:47 -0400 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> To: Andriy Gapon X-Mailer: Apple Mail (2.3273) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [96.89.93.250]); Tue, 20 Jun 2017 16:29:48 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:29:56 -0000 I don=E2=80=99t know for sure that this commit is the cause, but it (and = r320153) are the only ZFS commits between a version of head from June = 14th that boots off a ZFS mirror, and one that panics. Here=E2=80=99s the stack trace: Fatal trap 12: page fault while in kernel mode cpuid =3D 22;=20 Fatal trap 12: page fault while in kernel mode cpuid =3D 9; apic id =3D 09 fault virtual address =3D 0x0 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff81e47f21 stack pointer =3D 0x28:0xfffffe08b37f8810 frame pointer =3D 0x28:0xfffffe08b37f8860 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 0 (zio_free_issue_0_3) [ thread pid 0 tid 100478 ] Stopped at 0xffffffff81e47f21 =3D zio_vdev_io_start+0x1f1: testb = $0x1,(%rax) db> bt Tracing pid 0 tid 100478 td 0xfffff80193156000 zio_vdev_io_start() at 0xffffffff81e47f21 =3D = zio_vdev_io_start+0x1f1/frame 0xfffffe08b37f8860 zio_execute() at 0xffffffff81e4312c =3D zio_execute+0x36c/frame = 0xfffffe08b37f88b0 zio_nowait() at 0xffffffff81e422b8 =3D zio_nowait+0xb8/frame = 0xfffffe08b37f88e0 vdev_mirror_io_start() at 0xffffffff81e224fc =3D = vdev_mirror_io_start+0x38c/frame 0xfffffe08b37f8930 zio_vdev_io_start() at 0xffffffff81e48030 =3D = zio_vdev_io_start+0x300/frame 0xfffffe08b37f8990 zio_execute() at 0xffffffff81e4312c =3D zio_execute+0x36c/frame = 0xfffffe08b37f89e0 taskqueue_run_locked() at 0xffffffff809a9d6d =3D = taskqueue_run_locked+0x13d/frame 0xfffffe08b37f8a40 taskqueue_thread_loop() at 0xffffffff809aab28 =3D = taskqueue_thread_loop+0x88/frame 0xfffffe08b37f8a70 fork_exit() at 0xffffffff8091e3e4 =3D fork_exit+0x84/frame = 0xfffffe08b37f8ab0 fork_trampoline() at 0xffffffff80d930fe =3D fork_trampoline+0xe/frame = 0xfffffe08b37f8ab0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- db>=20 (kgdb) list *(zio_vdev_io_start+0x1f1) 0xd9f21 is in zio_vdev_io_start = (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/u= ts/common/fs/zfs/zio.c:350). 345 346 /* 347 * Ensure that anyone expecting this zio to contain a = linear ABD isn't 348 * going to get a nasty surprise when they try to access = the data. 349 */ 350 IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data)); 351 352 zt->zt_orig_abd =3D zio->io_abd; 353 zt->zt_orig_size =3D zio->io_size; 354 zt->zt_bufsize =3D bufsize; I=E2=80=99ll try rebooting and see if the problem goes away. If not, = I=E2=80=99ll roll back the ABD change and see if the problem goes away. Ken =E2=80=94=20 Ken Merry ken@FreeBSD.ORG > On Jun 20, 2017, at 1:39 PM, Andriy Gapon wrote: >=20 > Author: avg > Date: Tue Jun 20 17:39:24 2017 > New Revision: 320156 > URL: https://svnweb.freebsd.org/changeset/base/320156 >=20 > Log: > MFV r318946: 8021 ARC buf data scatter-ization >=20 > illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 > = https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc= 626ad18d93383 >=20 > https://www.illumos.org/issues/8021 > The ARC buf data project (known simply as "ABD" since its genesis = in the ZoL > community) changes the way the ARC allocates `b_pdata` memory from = using linear > `void *` buffers to using scatter/gather lists of fixed-size 1KB = chunks. This > improves ZFS's performance by helping to defragment the address = space occupied > by the ARC, in particular for cases where compressed ARC is = enabled. It could > also ease future work to allocate pages directly from `segkpm` for = minimal- > overhead memory allocations, bypassing the `kmem` subsystem. > This is essentially the same change as the one which recently = landed in ZFS on > Linux, although they made some platform-specific changes while = adapting this > work to their codebase: > 1. Implemented the equivalent of the `segkpm` suggestion for future = work > mentioned above to bypass issues that they've had with the Linux = kernel memory > allocator. > 2. Changed the internal representation of the ABD's scatter/gather = list so it > could be used to pass I/O directly into Linux block device drivers. = (This > feature is not available in the illumos block device interface = yet.) >=20 > FreeBSD notes: > - the actual (default) chunk size is 4KB (despite the text above = saying 1KB) > - we can try to reimplement ABDs, so that they are not permanently > mapped into the KVA unless explicitly requested, especially on > platforms with scarce KVA > - we can try to use unmapped I/O and avoid intermediate allocation of = a > linear, virtual memory mapped buffer > - we can try to avoid extra data copying by referring to chunks / = pages > in the original ABD >=20 > Reviewed by: Matthew Ahrens > Reviewed by: George Wilson > Reviewed by: Paul Dagnelie > Reviewed by: John Kennedy > Reviewed by: Prakash Surya > Reviewed by: Prashanth Sreenivasa > Reviewed by: Pavel Zakharov > Reviewed by: Chris Williamson > Approved by: Richard Lowe > Author: Dan Kimmel >=20 > MFC after: 3 weeks >=20 > Added: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > - copied, changed from r318946, = vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h > - copied, changed from r318946, = vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h > Modified: > head/cddl/contrib/opensolaris/cmd/zdb/zdb.c > head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c > head/cddl/contrib/opensolaris/cmd/ztest/ztest.c > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h > head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > = head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h > = head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c > head/sys/conf/files > Directory Properties: > head/cddl/contrib/opensolaris/ (props changed) > head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) > head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) > head/sys/cddl/contrib/opensolaris/ (props changed) >=20 > Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 20 = 17:38:25 2017 (r320155) > +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 20 = 17:39:24 2017 (r320156) > @@ -59,6 +59,7 @@ > #include > #include > #include > +#include > #include > #undef verify > #include > @@ -2410,7 +2411,7 @@ zdb_blkptr_done(zio_t *zio) > zdb_cb_t *zcb =3D zio->io_private; > zbookmark_phys_t *zb =3D &zio->io_bookmark; >=20 > - zio_data_buf_free(zio->io_data, zio->io_size); > + abd_free(zio->io_abd); >=20 > mutex_enter(&spa->spa_scrub_lock); > spa->spa_scrub_inflight--; > @@ -2477,7 +2478,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const = blkptr > if (!BP_IS_EMBEDDED(bp) && > (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) { > size_t size =3D BP_GET_PSIZE(bp); > - void *data =3D zio_data_buf_alloc(size); > + abd_t *abd =3D abd_alloc(size, B_FALSE); > int flags =3D ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | = ZIO_FLAG_RAW; >=20 > /* If it's an intent log block, failure is expected. */ > @@ -2490,7 +2491,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const = blkptr > spa->spa_scrub_inflight++; > mutex_exit(&spa->spa_scrub_lock); >=20 > - zio_nowait(zio_read(NULL, spa, bp, data, size, > + zio_nowait(zio_read(NULL, spa, bp, abd, size, > zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, = flags, zb)); > } >=20 > @@ -3270,6 +3271,13 @@ name: > return (NULL); > } >=20 > +/* ARGSUSED */ > +static int > +random_get_pseudo_bytes_cb(void *buf, size_t len, void *unused) > +{ > + return (random_get_pseudo_bytes(buf, len)); > +} > + > /* > * Read a block from a pool and print it out. The syntax of the > * block descriptor is: > @@ -3301,7 +3309,8 @@ zdb_read_block(char *thing, spa_t *spa) > uint64_t offset =3D 0, size =3D 0, psize =3D 0, lsize =3D 0, = blkptr_offset =3D 0; > zio_t *zio; > vdev_t *vd; > - void *pbuf, *lbuf, *buf; > + abd_t *pabd; > + void *lbuf, *buf; > char *s, *p, *dup, *vdev, *flagstr; > int i, error; >=20 > @@ -3373,7 +3382,7 @@ zdb_read_block(char *thing, spa_t *spa) > psize =3D size; > lsize =3D size; >=20 > - pbuf =3D umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); > + pabd =3D abd_alloc_linear(SPA_MAXBLOCKSIZE, B_FALSE); > lbuf =3D umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); >=20 > BP_ZERO(bp); > @@ -3401,15 +3410,15 @@ zdb_read_block(char *thing, spa_t *spa) > /* > * Treat this as a normal block read. > */ > - zio_nowait(zio_read(zio, spa, bp, pbuf, psize, NULL, = NULL, > + zio_nowait(zio_read(zio, spa, bp, pabd, psize, NULL, = NULL, > ZIO_PRIORITY_SYNC_READ, > ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL)); > } else { > /* > * Treat this as a vdev child I/O. > */ > - zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pbuf, = psize, > - ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, > + zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pabd, > + psize, ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, > ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE | > ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY | > ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL)); > @@ -3432,21 +3441,21 @@ zdb_read_block(char *thing, spa_t *spa) > void *pbuf2 =3D umem_alloc(SPA_MAXBLOCKSIZE, = UMEM_NOFAIL); > void *lbuf2 =3D umem_alloc(SPA_MAXBLOCKSIZE, = UMEM_NOFAIL); >=20 > - bcopy(pbuf, pbuf2, psize); > + abd_copy_to_buf(pbuf2, pabd, psize); >=20 > - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf + psize, > - SPA_MAXBLOCKSIZE - psize) =3D=3D 0); > + VERIFY0(abd_iterate_func(pabd, psize, SPA_MAXBLOCKSIZE - = psize, > + random_get_pseudo_bytes_cb, NULL)); >=20 > - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize, > - SPA_MAXBLOCKSIZE - psize) =3D=3D 0); > + VERIFY0(random_get_pseudo_bytes((uint8_t *)pbuf2 + = psize, > + SPA_MAXBLOCKSIZE - psize)); >=20 > for (lsize =3D SPA_MAXBLOCKSIZE; lsize > psize; > lsize -=3D SPA_MINBLOCKSIZE) { > for (c =3D 0; c < ZIO_COMPRESS_FUNCTIONS; c++) { > - if (zio_decompress_data(c, pbuf, lbuf, > - psize, lsize) =3D=3D 0 && > - zio_decompress_data(c, pbuf2, lbuf2, > - psize, lsize) =3D=3D 0 && > + if (zio_decompress_data(c, pabd, > + lbuf, psize, lsize) =3D=3D 0 && > + zio_decompress_data_buf(c, pbuf2, > + lbuf2, psize, lsize) =3D=3D 0 && > bcmp(lbuf, lbuf2, lsize) =3D=3D 0) > break; > } > @@ -3465,7 +3474,7 @@ zdb_read_block(char *thing, spa_t *spa) > buf =3D lbuf; > size =3D lsize; > } else { > - buf =3D pbuf; > + buf =3D abd_to_buf(pabd); > size =3D psize; > } >=20 > @@ -3483,7 +3492,7 @@ zdb_read_block(char *thing, spa_t *spa) > zdb_dump_block(thing, buf, size, flags); >=20 > out: > - umem_free(pbuf, SPA_MAXBLOCKSIZE); > + abd_free(pabd); > umem_free(lbuf, SPA_MAXBLOCKSIZE); > free(dup); > } >=20 > Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jun 20 = 17:38:25 2017 (r320155) > +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jun 20 = 17:39:24 2017 (r320156) > @@ -24,7 +24,7 @@ > */ >=20 > /* > - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. > + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. > */ >=20 > /* > @@ -41,6 +41,7 @@ > #include > #include > #include > +#include >=20 > extern uint8_t dump_opt[256]; >=20 > @@ -117,13 +118,27 @@ zil_prt_rec_rename(zilog_t *zilog, int txtype, = lr_rena > } >=20 > /* ARGSUSED */ > +static int > +zil_prt_rec_write_cb(void *data, size_t len, void *unused) > +{ > + char *cdata =3D data; > + for (int i =3D 0; i < len; i++) { > + if (isprint(*cdata)) > + (void) printf("%c ", *cdata); > + else > + (void) printf("%2X", *cdata); > + cdata++; > + } > + return (0); > +} > + > +/* ARGSUSED */ > static void > zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr) > { > - char *data, *dlimit; > + abd_t *data; > blkptr_t *bp =3D &lr->lr_blkptr; > zbookmark_phys_t zb; > - char buf[SPA_MAXBLOCKSIZE]; > int verbose =3D MAX(dump_opt['d'], dump_opt['i']); > int error; >=20 > @@ -144,7 +159,6 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, = lr_write > if (BP_IS_HOLE(bp)) { > (void) printf("\t\t\tLSIZE 0x%llx\n", > (u_longlong_t)BP_GET_LSIZE(bp)); > - bzero(buf, sizeof (buf)); > (void) printf("%s\n", prefix); > return; > } > @@ -157,28 +171,26 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, = lr_write > lr->lr_foid, ZB_ZIL_LEVEL, > lr->lr_offset / BP_GET_LSIZE(bp)); >=20 > + data =3D abd_alloc(BP_GET_LSIZE(bp), B_FALSE); > error =3D zio_wait(zio_read(NULL, zilog->zl_spa, > - bp, buf, BP_GET_LSIZE(bp), NULL, NULL, > + bp, data, BP_GET_LSIZE(bp), NULL, NULL, > ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &zb)); > if (error) > - return; > - data =3D buf; > + goto out; > } else { > - data =3D (char *)(lr + 1); > + /* data is stored after the end of the lr_write record = */ > + data =3D abd_alloc(lr->lr_length, B_FALSE); > + abd_copy_from_buf(data, lr + 1, lr->lr_length); > } >=20 > - dlimit =3D data + MIN(lr->lr_length, > - (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)); > - > (void) printf("%s", prefix); > - while (data < dlimit) { > - if (isprint(*data)) > - (void) printf("%c ", *data); > - else > - (void) printf("%2X", *data); > - data++; > - } > + (void) abd_iterate_func(data, > + 0, MIN(lr->lr_length, (verbose < 6 ? 20 : = SPA_MAXBLOCKSIZE)), > + zil_prt_rec_write_cb, NULL); > (void) printf("\n"); > + > +out: > + abd_free(data); > } >=20 > /* ARGSUSED */ >=20 > Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 20 = 17:38:25 2017 (r320155) > +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 20 = 17:39:24 2017 (r320156) > @@ -112,6 +112,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -190,6 +191,7 @@ extern uint64_t metaslab_df_alloc_threshold; > extern uint64_t zfs_deadman_synctime_ms; > extern int metaslab_preload_limit; > extern boolean_t zfs_compressed_arc_enabled; > +extern boolean_t zfs_abd_scatter_enabled; >=20 > static ztest_shared_opts_t *ztest_shared_opts; > static ztest_shared_opts_t ztest_opts; > @@ -5042,7 +5044,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) > enum zio_checksum checksum =3D spa_dedup_checksum(spa); > dmu_buf_t *db; > dmu_tx_t *tx; > - void *buf; > + abd_t *abd; > blkptr_t blk; > int copies =3D 2 * ZIO_DEDUPDITTO_MIN; >=20 > @@ -5122,14 +5124,14 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) > * Damage the block. Dedup-ditto will save us when we read it = later. > */ > psize =3D BP_GET_PSIZE(&blk); > - buf =3D zio_buf_alloc(psize); > - ztest_pattern_set(buf, psize, ~pattern); > + abd =3D abd_alloc_linear(psize, B_TRUE); > + ztest_pattern_set(abd_to_buf(abd), psize, ~pattern); >=20 > (void) zio_wait(zio_rewrite(NULL, spa, 0, &blk, > - buf, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, > + abd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, > ZIO_FLAG_CANFAIL | ZIO_FLAG_INDUCE_DAMAGE, NULL)); >=20 > - zio_buf_free(buf, psize); > + abd_free(abd); >=20 > (void) rw_unlock(&ztest_name_lock); > } > @@ -5413,6 +5415,12 @@ ztest_resume_thread(void *arg) > */ > if (ztest_random(10) =3D=3D 0) > zfs_compressed_arc_enabled =3D ztest_random(2); > + > + /* > + * Periodically change the zfs_abd_scatter_enabled = setting. > + */ > + if (ztest_random(10) =3D=3D 0) > + zfs_abd_scatter_enabled =3D ztest_random(2); > } > return (NULL); > } >=20 > Modified: = head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c = Tue Jun 20 17:38:25 2017 (r320155) > +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c = Tue Jun 20 17:39:24 2017 (r320156) > @@ -199,19 +199,19 @@ dump_record(dmu_replay_record_t *drr, void = *payload, i > { > ASSERT3U(offsetof(dmu_replay_record_t, = drr_u.drr_checksum.drr_checksum), > =3D=3D, sizeof (dmu_replay_record_t) - sizeof = (zio_cksum_t)); > - fletcher_4_incremental_native(drr, > + (void) fletcher_4_incremental_native(drr, > offsetof(dmu_replay_record_t, = drr_u.drr_checksum.drr_checksum), zc); > if (drr->drr_type !=3D DRR_BEGIN) { > ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u. > drr_checksum.drr_checksum)); > drr->drr_u.drr_checksum.drr_checksum =3D *zc; > } > - = fletcher_4_incremental_native(&drr->drr_u.drr_checksum.drr_checksum, > - sizeof (zio_cksum_t), zc); > + (void) fletcher_4_incremental_native( > + &drr->drr_u.drr_checksum.drr_checksum, sizeof (zio_cksum_t), = zc); > if (write(outfd, drr, sizeof (*drr)) =3D=3D -1) > return (errno); > if (payload_len !=3D 0) { > - fletcher_4_incremental_native(payload, payload_len, zc); > + (void) fletcher_4_incremental_native(payload, = payload_len, zc); > if (write(outfd, payload, payload_len) =3D=3D -1) > return (errno); > } > @@ -2096,9 +2096,9 @@ recv_read(libzfs_handle_t *hdl, int fd, void = *buf, int >=20 > if (zc) { > if (byteswap) > - fletcher_4_incremental_byteswap(buf, ilen, zc); > + (void) fletcher_4_incremental_byteswap(buf, = ilen, zc); > else > - fletcher_4_incremental_native(buf, ilen, zc); > + (void) fletcher_4_incremental_native(buf, ilen, = zc); > } > return (0); > } > @@ -3688,7 +3688,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, const = char *tos > * recv_read() above; do it again correctly. > */ > bzero(&zcksum, sizeof (zio_cksum_t)); > - fletcher_4_incremental_byteswap(&drr, sizeof (drr), = &zcksum); > + (void) fletcher_4_incremental_byteswap(&drr, > + sizeof (drr), &zcksum); > flags->byteswap =3D B_TRUE; >=20 > drr.drr_type =3D BSWAP_32(drr.drr_type); >=20 > Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c = Tue Jun 20 17:38:25 2017 (r320155) > +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c = Tue Jun 20 17:39:24 2017 (r320156) > @@ -24,6 +24,7 @@ > */ > /* > * Copyright 2013 Saso Kiselkov. All rights reserved. > + * Copyright (c) 2016 by Delphix. All rights reserved. > */ >=20 > /* > @@ -133,17 +134,29 @@ > #include > #include > #include > +#include >=20 > -/*ARGSUSED*/ > void > -fletcher_2_native(const void *buf, uint64_t size, > - const void *ctx_template, zio_cksum_t *zcp) > +fletcher_init(zio_cksum_t *zcp) > { > + ZIO_SET_CHECKSUM(zcp, 0, 0, 0, 0); > +} > + > +int > +fletcher_2_incremental_native(void *buf, size_t size, void *data) > +{ > + zio_cksum_t *zcp =3D data; > + > const uint64_t *ip =3D buf; > const uint64_t *ipend =3D ip + (size / sizeof (uint64_t)); > uint64_t a0, b0, a1, b1; >=20 > - for (a0 =3D b0 =3D a1 =3D b1 =3D 0; ip < ipend; ip +=3D 2) { > + a0 =3D zcp->zc_word[0]; > + a1 =3D zcp->zc_word[1]; > + b0 =3D zcp->zc_word[2]; > + b1 =3D zcp->zc_word[3]; > + > + for (; ip < ipend; ip +=3D 2) { > a0 +=3D ip[0]; > a1 +=3D ip[1]; > b0 +=3D a0; > @@ -151,18 +164,33 @@ fletcher_2_native(const void *buf, uint64_t = size, > } >=20 > ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); > + return (0); > } >=20 > /*ARGSUSED*/ > void > -fletcher_2_byteswap(const void *buf, uint64_t size, > +fletcher_2_native(const void *buf, size_t size, > const void *ctx_template, zio_cksum_t *zcp) > { > + fletcher_init(zcp); > + (void) fletcher_2_incremental_native((void *) buf, size, zcp); > +} > + > +int > +fletcher_2_incremental_byteswap(void *buf, size_t size, void *data) > +{ > + zio_cksum_t *zcp =3D data; > + > const uint64_t *ip =3D buf; > const uint64_t *ipend =3D ip + (size / sizeof (uint64_t)); > uint64_t a0, b0, a1, b1; >=20 > - for (a0 =3D b0 =3D a1 =3D b1 =3D 0; ip < ipend; ip +=3D 2) { > + a0 =3D zcp->zc_word[0]; > + a1 =3D zcp->zc_word[1]; > + b0 =3D zcp->zc_word[2]; > + b1 =3D zcp->zc_word[3]; > + > + for (; ip < ipend; ip +=3D 2) { > a0 +=3D BSWAP_64(ip[0]); > a1 +=3D BSWAP_64(ip[1]); > b0 +=3D a0; > @@ -170,50 +198,23 @@ fletcher_2_byteswap(const void *buf, uint64_t = size, > } >=20 > ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); > + return (0); > } >=20 > /*ARGSUSED*/ > void > -fletcher_4_native(const void *buf, uint64_t size, > +fletcher_2_byteswap(const void *buf, size_t size, > const void *ctx_template, zio_cksum_t *zcp) > { > - const uint32_t *ip =3D buf; > - const uint32_t *ipend =3D ip + (size / sizeof (uint32_t)); > - uint64_t a, b, c, d; > - > - for (a =3D b =3D c =3D d =3D 0; ip < ipend; ip++) { > - a +=3D ip[0]; > - b +=3D a; > - c +=3D b; > - d +=3D c; > - } > - > - ZIO_SET_CHECKSUM(zcp, a, b, c, d); > + fletcher_init(zcp); > + (void) fletcher_2_incremental_byteswap((void *) buf, size, zcp); > } >=20 > -/*ARGSUSED*/ > -void > -fletcher_4_byteswap(const void *buf, uint64_t size, > - const void *ctx_template, zio_cksum_t *zcp) > +int > +fletcher_4_incremental_native(void *buf, size_t size, void *data) > { > - const uint32_t *ip =3D buf; > - const uint32_t *ipend =3D ip + (size / sizeof (uint32_t)); > - uint64_t a, b, c, d; > + zio_cksum_t *zcp =3D data; >=20 > - for (a =3D b =3D c =3D d =3D 0; ip < ipend; ip++) { > - a +=3D BSWAP_32(ip[0]); > - b +=3D a; > - c +=3D b; > - d +=3D c; > - } > - > - ZIO_SET_CHECKSUM(zcp, a, b, c, d); > -} > - > -void > -fletcher_4_incremental_native(const void *buf, uint64_t size, > - zio_cksum_t *zcp) > -{ > const uint32_t *ip =3D buf; > const uint32_t *ipend =3D ip + (size / sizeof (uint32_t)); > uint64_t a, b, c, d; > @@ -231,12 +232,23 @@ fletcher_4_incremental_native(const void *buf, = uint64_ > } >=20 > ZIO_SET_CHECKSUM(zcp, a, b, c, d); > + return (0); > } >=20 > +/*ARGSUSED*/ > void > -fletcher_4_incremental_byteswap(const void *buf, uint64_t size, > - zio_cksum_t *zcp) > +fletcher_4_native(const void *buf, size_t size, > + const void *ctx_template, zio_cksum_t *zcp) > { > + fletcher_init(zcp); > + (void) fletcher_4_incremental_native((void *) buf, size, zcp); > +} > + > +int > +fletcher_4_incremental_byteswap(void *buf, size_t size, void *data) > +{ > + zio_cksum_t *zcp =3D data; > + > const uint32_t *ip =3D buf; > const uint32_t *ipend =3D ip + (size / sizeof (uint32_t)); > uint64_t a, b, c, d; > @@ -254,4 +266,14 @@ fletcher_4_incremental_byteswap(const void *buf, = uint6 > } >=20 > ZIO_SET_CHECKSUM(zcp, a, b, c, d); > + return (0); > +} > + > +/*ARGSUSED*/ > +void > +fletcher_4_byteswap(const void *buf, size_t size, > + const void *ctx_template, zio_cksum_t *zcp) > +{ > + fletcher_init(zcp); > + (void) fletcher_4_incremental_byteswap((void *) buf, size, zcp); > } >=20 > Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h = Tue Jun 20 17:38:25 2017 (r320155) > +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h = Tue Jun 20 17:39:24 2017 (r320156) > @@ -24,6 +24,7 @@ > */ > /* > * Copyright 2013 Saso Kiselkov. All rights reserved. > + * Copyright (c) 2016 by Delphix. All rights reserved. > */ >=20 > #ifndef _ZFS_FLETCHER_H > @@ -40,12 +41,15 @@ extern "C" { > * fletcher checksum functions > */ >=20 > -void fletcher_2_native(const void *, uint64_t, const void *, = zio_cksum_t *); > -void fletcher_2_byteswap(const void *, uint64_t, const void *, = zio_cksum_t *); > -void fletcher_4_native(const void *, uint64_t, const void *, = zio_cksum_t *); > -void fletcher_4_byteswap(const void *, uint64_t, const void *, = zio_cksum_t *); > -void fletcher_4_incremental_native(const void *, uint64_t, = zio_cksum_t *); > -void fletcher_4_incremental_byteswap(const void *, uint64_t, = zio_cksum_t *); > +void fletcher_init(zio_cksum_t *); > +void fletcher_2_native(const void *, size_t, const void *, = zio_cksum_t *); > +void fletcher_2_byteswap(const void *, size_t, const void *, = zio_cksum_t *); > +int fletcher_2_incremental_native(void *, size_t, void *); > +int fletcher_2_incremental_byteswap(void *, size_t, void *); > +void fletcher_4_native(const void *, size_t, const void *, = zio_cksum_t *); > +void fletcher_4_byteswap(const void *, size_t, const void *, = zio_cksum_t *); > +int fletcher_4_incremental_native(void *, size_t, void *); > +int fletcher_4_incremental_byteswap(void *, size_t, void *); >=20 > #ifdef __cplusplus > } >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files = Tue Jun 20 17:38:25 2017 (r320155) > +++ head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files = Tue Jun 20 17:39:24 2017 (r320156) > @@ -33,6 +33,7 @@ > # common to all SunOS systems. >=20 > ZFS_COMMON_OBJS +=3D \ > + abd.o \ > arc.o \ > bplist.o \ > blkptr.o \ >=20 > Copied and modified: = head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c (from r318946, = vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c Fri May 26 = 12:13:27 2017 (r318946, copy source) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Jun = 20 17:39:24 2017 (r320156) > @@ -174,6 +174,7 @@ abd_free_chunk(void *c) > void > abd_init(void) > { > +#ifdef illumos > vmem_t *data_alloc_arena =3D NULL; >=20 > #ifdef _KERNEL > @@ -186,7 +187,10 @@ abd_init(void) > */ > abd_chunk_cache =3D kmem_cache_create("abd_chunk", = zfs_abd_chunk_size, 0, > NULL, NULL, NULL, NULL, data_alloc_arena, KMC_NOTOUCH); > - > +#else > + abd_chunk_cache =3D kmem_cache_create("abd_chunk", = zfs_abd_chunk_size, 0, > + NULL, NULL, NULL, NULL, 0, KMC_NOTOUCH | KMC_NODEBUG); > +#endif > abd_ksp =3D kstat_create("zfs", 0, "abdstats", "misc", = KSTAT_TYPE_NAMED, > sizeof (abd_stats) / sizeof (kstat_named_t), = KSTAT_FLAG_VIRTUAL); > if (abd_ksp !=3D NULL) { >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun = 20 17:38:25 2017 (r320155) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun = 20 17:39:24 2017 (r320156) > @@ -128,14 +128,14 @@ > * the arc_buf_hdr_t that will point to the data block in memory. A = block can > * only be read by a consumer if it has an l1arc_buf_hdr_t. The L1ARC > * caches data in two ways -- in a list of ARC buffers (arc_buf_t) and > - * also in the arc_buf_hdr_t's private physical data block pointer = (b_pdata). > + * also in the arc_buf_hdr_t's private physical data block pointer = (b_pabd). > * > * The L1ARC's data pointer may or may not be uncompressed. The ARC = has the > - * ability to store the physical data (b_pdata) associated with the = DVA of the > - * arc_buf_hdr_t. Since the b_pdata is a copy of the on-disk physical = block, > + * ability to store the physical data (b_pabd) associated with the = DVA of the > + * arc_buf_hdr_t. Since the b_pabd is a copy of the on-disk physical = block, > * it will match its on-disk compression characteristics. This = behavior can be > * disabled by setting 'zfs_compressed_arc_enabled' to B_FALSE. When = the > - * compressed ARC functionality is disabled, the b_pdata will point = to an > + * compressed ARC functionality is disabled, the b_pabd will point to = an > * uncompressed version of the on-disk data. > * > * Data in the L1ARC is not accessed by consumers of the ARC directly. = Each > @@ -174,7 +174,7 @@ > * | l1arc_buf_hdr_t > * | | arc_buf_t > * | b_buf +------------>+-----------+ arc_buf_t > - * | b_pdata +-+ |b_next +---->+-----------+ > + * | b_pabd +-+ |b_next +---->+-----------+ > * +-----------+ | |-----------| |b_next +-->NULL > * | |b_comp =3D T | +-----------+ > * | |b_data +-+ |b_comp =3D F | > @@ -191,8 +191,8 @@ > * When a consumer reads a block, the ARC must first look to see if = the > * arc_buf_hdr_t is cached. If the hdr is cached then the ARC = allocates a new > * arc_buf_t and either copies uncompressed data into a new data = buffer from an > - * existing uncompressed arc_buf_t, decompresses the hdr's b_pdata = buffer into a > - * new data buffer, or shares the hdr's b_pdata buffer, depending on = whether the > + * existing uncompressed arc_buf_t, decompresses the hdr's b_pabd = buffer into a > + * new data buffer, or shares the hdr's b_pabd buffer, depending on = whether the > * hdr is compressed and the desired compression characteristics of = the > * arc_buf_t consumer. If the arc_buf_t ends up sharing data with the > * arc_buf_hdr_t and both of them are uncompressed then the arc_buf_t = must be > @@ -216,7 +216,7 @@ > * | | arc_buf_t (shared) > * | b_buf +------------>+---------+ arc_buf_t > * | | |b_next = +---->+---------+ > - * | b_pdata +-+ |---------| |b_next = +-->NULL > + * | b_pabd +-+ |---------| |b_next = +-->NULL > * +-----------+ | | | = +---------+ > * | |b_data +-+ | = | > * | +---------+ | |b_data = +-+ > @@ -230,19 +230,19 @@ > * | +------+ = | > * = +---------------------------------+ > * > - * Writing to the ARC requires that the ARC first discard the hdr's = b_pdata > + * Writing to the ARC requires that the ARC first discard the hdr's = b_pabd > * since the physical block is about to be rewritten. The new data = contents > * will be contained in the arc_buf_t. As the I/O pipeline performs = the write, > * it may compress the data before writing it to disk. The ARC will be = called > * with the transformed data and will bcopy the transformed on-disk = block into > - * a newly allocated b_pdata. Writes are always done into buffers = which have > + * a newly allocated b_pabd. Writes are always done into buffers = which have > * either been loaned (and hence are new and don't have other readers) = or > * buffers which have been released (and hence have their own hdr, if = there > * were originally other readers of the buf's original hdr). This = ensures that > * the ARC only needs to update a single buf and its hdr after a write = occurs. > * > - * When the L2ARC is in use, it will also take advantage of the = b_pdata. The > - * L2ARC will always write the contents of b_pdata to the L2ARC. This = means > + * When the L2ARC is in use, it will also take advantage of the = b_pabd. The > + * L2ARC will always write the contents of b_pabd to the L2ARC. This = means > * that when compressed ARC is enabled that the L2ARC blocks are = identical > * to the on-disk block in the main data pool. This provides a = significant > * advantage since the ARC can leverage the bp's checksum when reading = from the > @@ -263,7 +263,9 @@ > #include > #include > #include > +#include > #include > +#include > #ifdef _KERNEL > #include > #include > @@ -307,7 +309,7 @@ int zfs_arc_evict_batch_limit =3D 10; > /* number of seconds before growing cache again */ > static int arc_grow_retry =3D 60; >=20 > -/* shift of arc_c for calculating overflow limit in arc_get_data_buf = */ > +/* shift of arc_c for calculating overflow limit in arc_get_data_impl = */ > int zfs_arc_overflow_shift =3D 8; >=20 > /* shift of arc_c for calculating both min and max arc_p */ > @@ -543,13 +545,13 @@ typedef struct arc_stats { > kstat_named_t arcstat_c_max; > kstat_named_t arcstat_size; > /* > - * Number of compressed bytes stored in the arc_buf_hdr_t's = b_pdata. > + * Number of compressed bytes stored in the arc_buf_hdr_t's = b_pabd. > * Note that the compressed bytes may match the uncompressed = bytes > * if the block is either not compressed or compressed arc is = disabled. > */ > kstat_named_t arcstat_compressed_size; > /* > - * Uncompressed size of the data stored in b_pdata. If = compressed > + * Uncompressed size of the data stored in b_pabd. If compressed > * arc is disabled then this value will be identical to the stat > * above. > */ > @@ -988,7 +990,7 @@ typedef struct l1arc_buf_hdr { > refcount_t b_refcnt; >=20 > arc_callback_t *b_acb; > - void *b_pdata; > + abd_t *b_pabd; > } l1arc_buf_hdr_t; >=20 > typedef struct l2arc_dev l2arc_dev_t; > @@ -1341,7 +1343,7 @@ typedef struct l2arc_read_callback { > blkptr_t l2rcb_bp; /* original = blkptr */ > zbookmark_phys_t l2rcb_zb; /* original = bookmark */ > int l2rcb_flags; /* original = flags */ > - void *l2rcb_data; /* temporary = buffer */ > + void *l2rcb_abd; /* temporary = buffer */ > } l2arc_read_callback_t; >=20 > typedef struct l2arc_write_callback { > @@ -1351,7 +1353,7 @@ typedef struct l2arc_write_callback { >=20 > typedef struct l2arc_data_free { > /* protected by l2arc_free_on_write_mtx */ > - void *l2df_data; > + abd_t *l2df_abd; > size_t l2df_size; > arc_buf_contents_t l2df_type; > list_node_t l2df_list_node; > @@ -1361,10 +1363,14 @@ static kmutex_t l2arc_feed_thr_lock; > static kcondvar_t l2arc_feed_thr_cv; > static uint8_t l2arc_thread_exit; >=20 > +static abd_t *arc_get_data_abd(arc_buf_hdr_t *, uint64_t, void *); > static void *arc_get_data_buf(arc_buf_hdr_t *, uint64_t, void *); > +static void arc_get_data_impl(arc_buf_hdr_t *, uint64_t, void *); > +static void arc_free_data_abd(arc_buf_hdr_t *, abd_t *, uint64_t, = void *); > static void arc_free_data_buf(arc_buf_hdr_t *, void *, uint64_t, void = *); > -static void arc_hdr_free_pdata(arc_buf_hdr_t *hdr); > -static void arc_hdr_alloc_pdata(arc_buf_hdr_t *); > +static void arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, = void *tag); > +static void arc_hdr_free_pabd(arc_buf_hdr_t *); > +static void arc_hdr_alloc_pabd(arc_buf_hdr_t *); > static void arc_access(arc_buf_hdr_t *, kmutex_t *); > static boolean_t arc_is_overflowing(); > static void arc_buf_watch(arc_buf_t *); > @@ -1718,7 +1724,9 @@ static inline boolean_t > arc_buf_is_shared(arc_buf_t *buf) > { > boolean_t shared =3D (buf->b_data !=3D NULL && > - buf->b_data =3D=3D buf->b_hdr->b_l1hdr.b_pdata); > + buf->b_hdr->b_l1hdr.b_pabd !=3D NULL && > + abd_is_linear(buf->b_hdr->b_l1hdr.b_pabd) && > + buf->b_data =3D=3D abd_to_buf(buf->b_hdr->b_l1hdr.b_pabd)); > IMPLY(shared, HDR_SHARED_DATA(buf->b_hdr)); > IMPLY(shared, ARC_BUF_SHARED(buf)); > IMPLY(shared, ARC_BUF_COMPRESSED(buf) || ARC_BUF_LAST(buf)); > @@ -1822,7 +1830,8 @@ arc_cksum_is_equal(arc_buf_hdr_t *hdr, zio_t = *zio) > uint64_t csize; >=20 > void *cbuf =3D zio_buf_alloc(HDR_GET_PSIZE(hdr)); > - csize =3D zio_compress_data(compress, zio->io_data, = cbuf, lsize); > + csize =3D zio_compress_data(compress, zio->io_abd, cbuf, = lsize); > + > ASSERT3U(csize, <=3D, HDR_GET_PSIZE(hdr)); > if (csize < HDR_GET_PSIZE(hdr)) { > /* > @@ -1857,7 +1866,7 @@ arc_cksum_is_equal(arc_buf_hdr_t *hdr, zio_t = *zio) > * logical I/O size and not just a gang fragment. > */ > valid_cksum =3D (zio_checksum_error_impl(zio->io_spa, = zio->io_bp, > - BP_GET_CHECKSUM(zio->io_bp), zio->io_data, zio->io_size, > + BP_GET_CHECKSUM(zio->io_bp), zio->io_abd, zio->io_size, > zio->io_offset, NULL) =3D=3D 0); > zio_pop_transforms(zio); > return (valid_cksum); > @@ -2161,7 +2170,7 @@ arc_buf_fill(arc_buf_t *buf, boolean_t = compressed) >=20 > if (hdr_compressed =3D=3D compressed) { > if (!arc_buf_is_shared(buf)) { > - bcopy(hdr->b_l1hdr.b_pdata, buf->b_data, > + abd_copy_to_buf(buf->b_data, = hdr->b_l1hdr.b_pabd, > arc_buf_size(buf)); > } > } else { > @@ -2213,7 +2222,7 @@ arc_buf_fill(arc_buf_t *buf, boolean_t = compressed) > return (0); > } else { > int error =3D = zio_decompress_data(HDR_GET_COMPRESS(hdr), > - hdr->b_l1hdr.b_pdata, buf->b_data, > + hdr->b_l1hdr.b_pabd, buf->b_data, > HDR_GET_PSIZE(hdr), HDR_GET_LSIZE(hdr)); >=20 > /* > @@ -2250,7 +2259,7 @@ arc_decompress(arc_buf_t *buf) > } >=20 > /* > - * Return the size of the block, b_pdata, that is stored in the = arc_buf_hdr_t. > + * Return the size of the block, b_pabd, that is stored in the = arc_buf_hdr_t. > */ > static uint64_t > arc_hdr_size(arc_buf_hdr_t *hdr) > @@ -2282,14 +2291,14 @@ arc_evictable_space_increment(arc_buf_hdr_t = *hdr, arc_ > if (GHOST_STATE(state)) { > ASSERT0(hdr->b_l1hdr.b_bufcnt); > ASSERT3P(hdr->b_l1hdr.b_buf, =3D=3D, NULL); > - ASSERT3P(hdr->b_l1hdr.b_pdata, =3D=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, =3D=3D, NULL); > (void) refcount_add_many(&state->arcs_esize[type], > HDR_GET_LSIZE(hdr), hdr); > return; > } >=20 > ASSERT(!GHOST_STATE(state)); > - if (hdr->b_l1hdr.b_pdata !=3D NULL) { > + if (hdr->b_l1hdr.b_pabd !=3D NULL) { > (void) refcount_add_many(&state->arcs_esize[type], > arc_hdr_size(hdr), hdr); > } > @@ -2317,14 +2326,14 @@ arc_evictable_space_decrement(arc_buf_hdr_t = *hdr, arc_ > if (GHOST_STATE(state)) { > ASSERT0(hdr->b_l1hdr.b_bufcnt); > ASSERT3P(hdr->b_l1hdr.b_buf, =3D=3D, NULL); > - ASSERT3P(hdr->b_l1hdr.b_pdata, =3D=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, =3D=3D, NULL); > (void) refcount_remove_many(&state->arcs_esize[type], > HDR_GET_LSIZE(hdr), hdr); > return; > } >=20 > ASSERT(!GHOST_STATE(state)); > - if (hdr->b_l1hdr.b_pdata !=3D NULL) { > + if (hdr->b_l1hdr.b_pabd !=3D NULL) { > (void) refcount_remove_many(&state->arcs_esize[type], > arc_hdr_size(hdr), hdr); > } > @@ -2421,7 +2430,7 @@ arc_change_state(arc_state_t *new_state, = arc_buf_hdr_t > old_state =3D hdr->b_l1hdr.b_state; > refcnt =3D refcount_count(&hdr->b_l1hdr.b_refcnt); > bufcnt =3D hdr->b_l1hdr.b_bufcnt; > - update_old =3D (bufcnt > 0 || hdr->b_l1hdr.b_pdata !=3D = NULL); > + update_old =3D (bufcnt > 0 || hdr->b_l1hdr.b_pabd !=3D = NULL); > } else { > old_state =3D arc_l2c_only; > refcnt =3D 0; > @@ -2491,7 +2500,7 @@ arc_change_state(arc_state_t *new_state, = arc_buf_hdr_t > */ > (void) refcount_add_many(&new_state->arcs_size, > HDR_GET_LSIZE(hdr), hdr); > - ASSERT3P(hdr->b_l1hdr.b_pdata, =3D=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, =3D=3D, NULL); > } else { > uint32_t buffers =3D 0; >=20 > @@ -2520,7 +2529,7 @@ arc_change_state(arc_state_t *new_state, = arc_buf_hdr_t > } > ASSERT3U(bufcnt, =3D=3D, buffers); >=20 > - if (hdr->b_l1hdr.b_pdata !=3D NULL) { > + if (hdr->b_l1hdr.b_pabd !=3D NULL) { > (void) = refcount_add_many(&new_state->arcs_size, > arc_hdr_size(hdr), hdr); > } else { > @@ -2533,7 +2542,7 @@ arc_change_state(arc_state_t *new_state, = arc_buf_hdr_t > ASSERT(HDR_HAS_L1HDR(hdr)); > if (GHOST_STATE(old_state)) { > ASSERT0(bufcnt); > - ASSERT3P(hdr->b_l1hdr.b_pdata, =3D=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, =3D=3D, NULL); >=20 > /* > * When moving a header off of a ghost state, > @@ -2573,7 +2582,7 @@ arc_change_state(arc_state_t *new_state, = arc_buf_hdr_t > buf); > } > ASSERT3U(bufcnt, =3D=3D, buffers); > - ASSERT3P(hdr->b_l1hdr.b_pdata, !=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, !=3D, NULL); > (void) refcount_remove_many( > &old_state->arcs_size, arc_hdr_size(hdr), = hdr); > } > @@ -2655,7 +2664,7 @@ arc_space_return(uint64_t space, = arc_space_type_t type >=20 > /* > * Given a hdr and a buf, returns whether that buf can share its = b_data buffer > - * with the hdr's b_pdata. > + * with the hdr's b_pabd. > */ > static boolean_t > arc_can_share(arc_buf_hdr_t *hdr, arc_buf_t *buf) > @@ -2732,20 +2741,23 @@ arc_buf_alloc_impl(arc_buf_hdr_t *hdr, void = *tag, bool > /* > * If the hdr's data can be shared then we share the data buffer = and > * set the appropriate bit in the hdr's b_flags to indicate the = hdr is > - * sharing it's b_pdata with the arc_buf_t. Otherwise, we = allocate a new > + * sharing it's b_pabd with the arc_buf_t. Otherwise, we = allocate a new > * buffer to store the buf's data. > * > - * There is one additional restriction here because we're = sharing > - * hdr -> buf instead of the usual buf -> hdr: the hdr can't be = actively > - * involved in an L2ARC write, because if this buf is used by an > - * arc_write() then the hdr's data buffer will be released when = the > + * There are two additional restrictions here because we're = sharing > + * hdr -> buf instead of the usual buf -> hdr. First, the hdr = can't be > + * actively involved in an L2ARC write, because if this buf is = used by > + * an arc_write() then the hdr's data buffer will be released = when the > * write completes, even though the L2ARC write might still be = using it. > + * Second, the hdr's ABD must be linear so that the buf's user = doesn't > + * need to be ABD-aware. > */ > - boolean_t can_share =3D arc_can_share(hdr, buf) && = !HDR_L2_WRITING(hdr); > + boolean_t can_share =3D arc_can_share(hdr, buf) && = !HDR_L2_WRITING(hdr) && > + abd_is_linear(hdr->b_l1hdr.b_pabd); >=20 > /* Set up b_data and sharing */ > if (can_share) { > - buf->b_data =3D hdr->b_l1hdr.b_pdata; > + buf->b_data =3D abd_to_buf(hdr->b_l1hdr.b_pabd); > buf->b_flags |=3D ARC_BUF_FLAG_SHARED; > arc_hdr_set_flags(hdr, ARC_FLAG_SHARED_DATA); > } else { > @@ -2841,11 +2853,11 @@ arc_loan_inuse_buf(arc_buf_t *buf, void *tag) > } >=20 > static void > -l2arc_free_data_on_write(void *data, size_t size, arc_buf_contents_t = type) > +l2arc_free_abd_on_write(abd_t *abd, size_t size, arc_buf_contents_t = type) > { > l2arc_data_free_t *df =3D kmem_alloc(sizeof (*df), KM_SLEEP); >=20 > - df->l2df_data =3D data; > + df->l2df_abd =3D abd; > df->l2df_size =3D size; > df->l2df_type =3D type; > mutex_enter(&l2arc_free_on_write_mtx); > @@ -2876,7 +2888,7 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr) > arc_space_return(size, ARC_SPACE_DATA); > } >=20 > - l2arc_free_data_on_write(hdr->b_l1hdr.b_pdata, size, type); > + l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type); > } >=20 > /* > @@ -2890,7 +2902,7 @@ arc_share_buf(arc_buf_hdr_t *hdr, arc_buf_t = *buf) > arc_state_t *state =3D hdr->b_l1hdr.b_state; >=20 > ASSERT(arc_can_share(hdr, buf)); > - ASSERT3P(hdr->b_l1hdr.b_pdata, =3D=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, =3D=3D, NULL); > ASSERT(MUTEX_HELD(HDR_LOCK(hdr)) || HDR_EMPTY(hdr)); >=20 > /* > @@ -2899,7 +2911,9 @@ arc_share_buf(arc_buf_hdr_t *hdr, arc_buf_t = *buf) > * the refcount whenever an arc_buf_t is shared. > */ > refcount_transfer_ownership(&state->arcs_size, buf, hdr); > - hdr->b_l1hdr.b_pdata =3D buf->b_data; > + hdr->b_l1hdr.b_pabd =3D abd_get_from_buf(buf->b_data, = arc_buf_size(buf)); > + abd_take_ownership_of_buf(hdr->b_l1hdr.b_pabd, > + HDR_ISTYPE_METADATA(hdr)); > arc_hdr_set_flags(hdr, ARC_FLAG_SHARED_DATA); > buf->b_flags |=3D ARC_BUF_FLAG_SHARED; >=20 > @@ -2919,7 +2933,7 @@ arc_unshare_buf(arc_buf_hdr_t *hdr, arc_buf_t = *buf) > arc_state_t *state =3D hdr->b_l1hdr.b_state; >=20 > ASSERT(arc_buf_is_shared(buf)); > - ASSERT3P(hdr->b_l1hdr.b_pdata, !=3D, NULL); > + ASSERT3P(hdr->b_l1hdr.b_pabd, !=3D, NULL); > ASSERT(MUTEX_HELD(HDR_LOCK(hdr)) || HDR_EMPTY(hdr)); >=20 > /* > @@ -2928,7 +2942,9 @@ arc_unshare_buf(arc_buf_hdr_t *hdr, arc_buf_t = *buf) > */ > refcount_transfer_ownership(&state->arcs_size, hdr, buf); > arc_hdr_clear_flags(hdr, ARC_FLAG_SHARED_DATA); > - hdr->b_l1hdr.b_pdata =3D NULL; > + abd_release_ownership_of_buf(hdr->b_l1hdr.b_pabd); > + abd_put(hdr->b_l1hdr.b_pabd); > + hdr->b_l1hdr.b_pabd =3D NULL; > buf->b_flags &=3D ~ARC_BUF_FLAG_SHARED; >=20 > /* > @@ -3025,7 +3041,7 @@ arc_buf_destroy_impl(arc_buf_t *buf) > if (ARC_BUF_SHARED(buf) && !ARC_BUF_COMPRESSED(buf)) { > /* > * If the current arc_buf_t is sharing its data buffer = with the > - * hdr, then reassign the hdr's b_pdata to share it with = the new > + * hdr, then reassign the hdr's b_pabd to share it with = the new > * buffer at the end of the list. The shared buffer is = always > * the last one on the hdr's buffer list. > * > @@ -3040,8 +3056,8 @@ arc_buf_destroy_impl(arc_buf_t *buf) > /* hdr is uncompressed so can't have compressed = buf */ > VERIFY(!ARC_BUF_COMPRESSED(lastbuf)); >=20 > - ASSERT3P(hdr->b_l1hdr.b_pdata, !=3D, NULL); > - arc_hdr_free_pdata(hdr); > + ASSERT3P(hdr->b_l1hdr.b_pabd, !=3D, NULL); > + arc_hdr_free_pabd(hdr); >=20 > /* > * We must setup a new shared block between the > @@ -3079,26 +3095,26 @@ arc_buf_destroy_impl(arc_buf_t *buf) > } >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >=20 From owner-svn-src-all@freebsd.org Tue Jun 20 20:34:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84393DA1D09; Tue, 20 Jun 2017 20:34:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5284872F3F; Tue, 20 Jun 2017 20:34:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KKYUFC030465; Tue, 20 Jun 2017 20:34:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKYU2F030464; Tue, 20 Jun 2017 20:34:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706202034.v5KKYU2F030464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Jun 2017 20:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320171 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:34:31 -0000 Author: bdrewery Date: Tue Jun 20 20:34:30 2017 New Revision: 320171 URL: https://svnweb.freebsd.org/changeset/base/320171 Log: LIBADD: Try to support partial tree checkouts in some limited cases. LIBADD is only supported for in-tree builds because we do not install share/mk/src.libnames.mk (which provides LIBADD support) into /usr/share/mk. So if a partial checkout is done then the LIBADDs are ignored and no LDADD is ever added. Provide limited support for this case for when LIBADD is composed entirely of base libraries. This is to avoid clashes with ports and other out-of-tree LIBADD uses that should not be mapped to LDADD and because we do not want to support LIBADD out-of-tree right now. Reported by: mckusick, kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Jun 20 20:22:34 2017 (r320170) +++ head/share/mk/bsd.libnames.mk Tue Jun 20 20:34:30 2017 (r320171) @@ -194,4 +194,26 @@ LDADD:= ${LDADD:N-lc} -lc .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor +.else + +# Out of tree builds + +# There are LIBADD defined in an out-of-tree build. Are they *all* +# in-tree libraries? If so convert them to LDADD to support +# partial checkouts. +.if !empty(LIBADD) +_convert_libadd= 1 +.for l in ${LIBADD} +.if empty(LIB${l:tu}) +_convert_libadd= 0 .endif +.endfor +.if ${_convert_libadd} == 1 +.warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported. +.for l in ${LIBADD} +LDADD+= -l${l} +.endfor +.endif +.endif + +.endif # defined(SRCTOP) From owner-svn-src-all@freebsd.org Tue Jun 20 20:37:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 554ECDA1DC2; Tue, 20 Jun 2017 20:37:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E7730730BC; Tue, 20 Jun 2017 20:37:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA19088; Tue, 20 Jun 2017 23:37:46 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dNPuE-000O3o-Oe; Tue, 20 Jun 2017 23:37:46 +0300 Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... To: Ken Merry Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201706201739.v5KHdPhO051256@repo.freebsd.org> <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> From: Andriy Gapon Message-ID: Date: Tue, 20 Jun 2017 23:37:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:37:50 -0000 On 20/06/2017 23:29, Ken Merry wrote: > I don’t know for sure that this commit is the cause, but it (and r320153) are the only ZFS commits between a version of head from June 14th that boots off a ZFS mirror, and one that panics. > > Here’s the stack trace: > > Fatal trap 12: page fault while in kernel mode > cpuid = 22; > > Fatal trap 12: page fault while in kernel mode > cpuid = 9; apic id = 09 > fault virtual address = 0x0 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff81e47f21 > stack pointer = 0x28:0xfffffe08b37f8810 > frame pointer = 0x28:0xfffffe08b37f8860 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (zio_free_issue_0_3) > [ thread pid 0 tid 100478 ] > Stopped at 0xffffffff81e47f21 = zio_vdev_io_start+0x1f1: testb $0x1,(%rax) > db> bt > Tracing pid 0 tid 100478 td 0xfffff80193156000 > zio_vdev_io_start() at 0xffffffff81e47f21 = zio_vdev_io_start+0x1f1/frame 0xfffffe08b37f8860 > zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b37f88b0 > zio_nowait() at 0xffffffff81e422b8 = zio_nowait+0xb8/frame 0xfffffe08b37f88e0 > vdev_mirror_io_start() at 0xffffffff81e224fc = vdev_mirror_io_start+0x38c/frame 0xfffffe08b37f8930 > zio_vdev_io_start() at 0xffffffff81e48030 = zio_vdev_io_start+0x300/frame 0xfffffe08b37f8990 > zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b37f89e0 > taskqueue_run_locked() at 0xffffffff809a9d6d = taskqueue_run_locked+0x13d/frame 0xfffffe08b37f8a40 > taskqueue_thread_loop() at 0xffffffff809aab28 = taskqueue_thread_loop+0x88/frame 0xfffffe08b37f8a70 > fork_exit() at 0xffffffff8091e3e4 = fork_exit+0x84/frame 0xfffffe08b37f8ab0 > fork_trampoline() at 0xffffffff80d930fe = fork_trampoline+0xe/frame 0xfffffe08b37f8ab0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > db> > > (kgdb) list *(zio_vdev_io_start+0x1f1) > 0xd9f21 is in zio_vdev_io_start (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:350). > 345 > 346 /* > 347 * Ensure that anyone expecting this zio to contain a linear ABD isn't > 348 * going to get a nasty surprise when they try to access the data. > 349 */ > 350 IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data)); > 351 > 352 zt->zt_orig_abd = zio->io_abd; > 353 zt->zt_orig_size = zio->io_size; > 354 zt->zt_bufsize = bufsize; > > I’ll try rebooting and see if the problem goes away. If not, I’ll roll back the ABD change and see if the problem goes away. Judging from the thread that panic-ed the problem may have to do with our TRIM support. Unfortunately, I didn't have a chance to test the change on a system with working TRIM and, so, I missed it. I will look into this further, but it's almost obvious that the problem is caused by zio->io_abd being NULL for a zio of type ZIO_TYPE_FREE. -- Andriy Gapon From owner-svn-src-all@freebsd.org Tue Jun 20 20:46:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42BAEDA1FF9; Tue, 20 Jun 2017 20:46:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09D6A73691; Tue, 20 Jun 2017 20:46:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KKk8iu034738; Tue, 20 Jun 2017 20:46:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKk8Zd034737; Tue, 20 Jun 2017 20:46:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706202046.v5KKk8Zd034737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Jun 2017 20:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320172 - head/bin/ln X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:46:10 -0000 Author: ngie Date: Tue Jun 20 20:46:08 2017 New Revision: 320172 URL: https://svnweb.freebsd.org/changeset/base/320172 Log: ln(1): fix -F behavior When '-F' option is used, the target directory needs to be unlinked. Currently, the modified target ("target/source") is being unlinked, and since it doesn't yet exist, the original target isn't removed. This is fixed by skipping the block where target is modified to "target/source" when '-F' option is set. Hence, a symbolic link (with the same name as of the original target) to the source_file is produced. Update the test for ln(1) to reflect fix for option '-F' MFC after: 1 month PR: 219943 Differential Revision: D11167 Submitted by: shivansh Sponsored by: Google (GSoC 2017) Modified: head/bin/ln/ln.c Modified: head/bin/ln/ln.c ============================================================================== --- head/bin/ln/ln.c Tue Jun 20 20:34:30 2017 (r320171) +++ head/bin/ln/ln.c Tue Jun 20 20:46:08 2017 (r320172) @@ -245,11 +245,11 @@ linkit(const char *source, const char *target, int isd /* * If the target is a directory (and not a symlink if hflag), - * append the source's name. + * append the source's name, unless Fflag is set. */ - if (isdir || + if (!Fflag && (isdir || (lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) || - (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode))) { + (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode)))) { if (strlcpy(bbuf, source, sizeof(bbuf)) >= sizeof(bbuf) || (p = basename(bbuf)) == NULL || snprintf(path, sizeof(path), "%s/%s", target, p) >= From owner-svn-src-all@freebsd.org Tue Jun 20 20:50:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A37A1DA20B2; Tue, 20 Jun 2017 20:50:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7196673964; Tue, 20 Jun 2017 20:50:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KKosLf035726; Tue, 20 Jun 2017 20:50:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKosB6035724; Tue, 20 Jun 2017 20:50:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706202050.v5KKosB6035724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 20 Jun 2017 20:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320173 - head/bin/ln/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:50:55 -0000 Author: ngie Date: Tue Jun 20 20:50:54 2017 New Revision: 320173 URL: https://svnweb.freebsd.org/changeset/base/320173 Log: Don't expect :sF_flag to fail anymore While here, also add a check to verify that the link target is updated in the testcase MFC after: 1 month MFC with: r320172 PR: 219943 Differential Revision: D11167 Submitted by: shivansh Sponsored by: Google (GSoC 2017) Modified: head/bin/ln/tests/ln_test.sh Modified: head/bin/ln/tests/ln_test.sh ============================================================================== --- head/bin/ln/tests/ln_test.sh Tue Jun 20 20:46:08 2017 (r320172) +++ head/bin/ln/tests/ln_test.sh Tue Jun 20 20:50:54 2017 (r320173) @@ -160,10 +160,10 @@ sF_flag_head() sF_flag_body() { - atf_expect_fail "B isn't being unlinked (bug 219943)" atf_check mkdir A B atf_check ln -sF A B atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case sf_flag From owner-svn-src-all@freebsd.org Tue Jun 20 20:52:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C543DA221F; Tue, 20 Jun 2017 20:52:08 +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 DF0A973CA7; Tue, 20 Jun 2017 20:52:07 +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 v5KKq7t3038654; Tue, 20 Jun 2017 20:52:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKq6AD038653; Tue, 20 Jun 2017 20:52:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706202052.v5KKq6AD038653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Jun 2017 20:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320174 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:52:08 -0000 Author: bdrewery Date: Tue Jun 20 20:52:06 2017 New Revision: 320174 URL: https://svnweb.freebsd.org/changeset/base/320174 Log: Fix 'make clean all' to work again. This likely broke completely with r308599. Apply the same fix for 'make destroy' which is a DIRDEPS_BUILD thing. PR: 219819 Reported by: trasz MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.init.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Jun 20 20:50:54 2017 (r320173) +++ head/share/mk/bsd.dep.mk Tue Jun 20 20:52:06 2017 (r320174) @@ -90,7 +90,7 @@ _meta_filemon= 1 .if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ - make(obj) || make(clean*) || make(destroy*) + make(obj) || (!make(all) && (make(clean*) || make(destroy*))) .MAKE.DEPENDFILE= /dev/null .endif .endif Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Tue Jun 20 20:50:54 2017 (r320173) +++ head/share/mk/bsd.init.mk Tue Jun 20 20:52:06 2017 (r320174) @@ -50,8 +50,9 @@ $xGRP= ${_gid} _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ - make(destroy*) + ${.TARGETS:Mclean*} == ${.TARGETS} || \ + ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ + make(obj) || make(analyze) || make(print-dir) # Skip building, but don't show a warning. _SKIP_BUILD= .endif From owner-svn-src-all@freebsd.org Tue Jun 20 21:11:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE10DA282E for ; Tue, 20 Jun 2017 21:11:04 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com [IPv6:2607:f8b0:400c:c08::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 34CE27459B for ; Tue, 20 Jun 2017 21:11:04 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x230.google.com with SMTP id j53so80731777uaa.2 for ; Tue, 20 Jun 2017 14:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DYDEUtwJDJeCqO8g8ZqXE7fcj7oc+M/TpPCEi+egM9o=; b=qRMd1ooSmCwVBNku8ijGG7kBcZ1uJyz8ZwL2RRrG0rVSXHsXw0yEmOyJRlk2gnf3Oa SbLub1z7z20+eusJlV8XLzrAkeOEfqhndITz+jDSekOViWuzEnIpAev9IhEZ32aePrrW eLhyFdyFYxqCQCe9yUZ06jrQRsoGSTx07IO1ZfU3sLCJInvPMdO9W9NJcHIT8uGTAidL +j5Nw6GGjNQJ0d5E7JCHdVne1wHBtm2uBNWLErx7FrfoslT9h6meYSN2aeAsLxTEY6s6 hZ11+F6keKi454BL/nlOj8PzIugkL/3GBbee+SREcILRZp1ToQ+xOcSIBX5kgjC5Ghnd 44hQ== 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=DYDEUtwJDJeCqO8g8ZqXE7fcj7oc+M/TpPCEi+egM9o=; b=fKC6LpYnj+B8T9POmjY09eacYhfAoFk5qwi4sw/dgjKGXXh9XcqDyRerEfmawB2Zlu rz9Te/HPnM8LkBySVpE14gI9cztYt2+rtExkVvrOwz/a1j4ielk0J36WcaKhFYchvT7u u1qPDsyRFlybUcct2Z2N7gYDgCM4SBzXGEwJzP0uS/UgazOaDpPt6DH0MFKjJNdHuKGZ zGkj6uA626CA4iJOn2kh88ShPLjh15juiVNBQq3bxgBiw0831qf9cCKr7JiAvdGC2pnm wPmkpZSr2D7dW4m6ZgzrDbj1wP9HEOjP7CFOTZ5H9pGX4JPO+9msZb7PH8aGxVSEDC5O PVfw== X-Gm-Message-State: AKS2vOwKh074pJuYVt5oJa4z/MEBtgZ79ZmY/qYjJ6cftyz09/AM5s6n 7daxvrEHd1xvOTYElkQlDYv/dN3zwZlo X-Received: by 10.159.40.3 with SMTP id c3mr20852422uac.95.1497993063134; Tue, 20 Jun 2017 14:11:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.36.195 with HTTP; Tue, 20 Jun 2017 14:11:02 -0700 (PDT) In-Reply-To: <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> From: Oliver Pinter Date: Tue, 20 Jun 2017 23:11:02 +0200 Message-ID: Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: Andriy Gapon Cc: John Baldwin , Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 21:11:04 -0000 On 6/20/17, Andriy Gapon wrote: > On 20/06/2017 01:37, Oliver Pinter wrote: >> On 3/27/15, John Baldwin wrote: >>> On 3/24/15 1:00 PM, Randall Stewart wrote: >>>> Author: rrs >>>> Date: Tue Mar 24 20:00:11 2015 >>>> New Revision: 280455 >>>> URL: https://svnweb.freebsd.org/changeset/base/280455 >>>> >>>> Log: >>>> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >>>> >>>> Sponsored by: Netflix Inc. >>>> >>>> Added: >>>> stable/10/usr.sbin/pmcstudy/ >>>> - copied from r277177, head/usr.sbin/pmcstudy/ >>>> Modified: >>>> stable/10/lib/libpmc/libpmc.c >>>> stable/10/sys/amd64/conf/GENERIC >> >> Hi! >> >> The MFC of 279833 was missing from this commit. I'm CCing avg@, since >> he made a big bunch of hwpmc related MFCs yesterday. > > I've just merged that commit. > Thank you all. Thanks for the fast response and the MFC of all these things. (I was already MFCd of these commits in HardenedBSD, and it's conflicted on this line, and I observed in this way...) > >>> >>> The change to GENERIC looks like it slipped in by accident? Neither of >>> the >>> commits to HEAD enabled hwpmc in GENERIC AFAICT. > > > -- > Andriy Gapon > From owner-svn-src-all@freebsd.org Tue Jun 20 21:17:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D578DA2929; Tue, 20 Jun 2017 21:17:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F190474982; Tue, 20 Jun 2017 21:17:06 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KLH6aD047101; Tue, 20 Jun 2017 21:17:06 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KLH5Qx047099; Tue, 20 Jun 2017 21:17:05 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706202117.v5KLH5Qx047099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Jun 2017 21:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320175 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 21:17:07 -0000 Author: davidcs Date: Tue Jun 20 21:17:05 2017 New Revision: 320175 URL: https://svnweb.freebsd.org/changeset/base/320175 Log: Add pkts_cnt_oversized to stats. Modified: head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_hw.h Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Tue Jun 20 20:52:06 2017 (r320174) +++ head/sys/dev/qlxgbe/ql_hw.c Tue Jun 20 21:17:05 2017 (r320175) @@ -1554,6 +1554,8 @@ qla_rcv_stats(qla_host_t *ha, q80_rcv_stats_t *rstat) rstat->lro_flows_active); device_printf(dev, "%s: pkts_droped_unknown\t\t%" PRIu64 "\n", __func__, rstat->pkts_droped_unknown); + device_printf(dev, "%s: pkts_cnt_oversized\t\t%" PRIu64 "\n", + __func__, rstat->pkts_cnt_oversized); } static void Modified: head/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.h Tue Jun 20 20:52:06 2017 (r320174) +++ head/sys/dev/qlxgbe/ql_hw.h Tue Jun 20 21:17:05 2017 (r320175) @@ -748,6 +748,7 @@ typedef struct _q80_rcv_stats { uint64_t lro_flows_deleted; uint64_t lro_flows_active; uint64_t pkts_droped_unknown; + uint64_t pkts_cnt_oversized; } __packed q80_rcv_stats_t; typedef struct _q80_xmt_stats { From owner-svn-src-all@freebsd.org Tue Jun 20 21:25:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8049DA2AD7; Tue, 20 Jun 2017 21:25:56 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AFDF074DB9; Tue, 20 Jun 2017 21:25:56 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id v5KLPrgS030844 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 20 Jun 2017 17:25:54 -0400 (EDT) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id v5KLPrVR030843; Tue, 20 Jun 2017 17:25:53 -0400 (EDT) (envelope-from ken) Date: Tue, 20 Jun 2017 17:25:53 -0400 From: "Kenneth D. Merry" To: Andriy Gapon Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... Message-ID: <20170620212553.GA30559@mithlond.kdm.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Tue, 20 Jun 2017 17:25:54 -0400 (EDT) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 21:25:57 -0000 On Tue, Jun 20, 2017 at 23:37:10 +0300, Andriy Gapon wrote: > On 20/06/2017 23:29, Ken Merry wrote: > > I don???t know for sure that this commit is the cause, but it (and r320153) are the only ZFS commits between a version of head from June 14th that boots off a ZFS mirror, and one that panics. > > > > Here???s the stack trace: > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 22; > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 9; apic id = 09 > > fault virtual address = 0x0 > > fault code = supervisor read data, page not present > > instruction pointer = 0x20:0xffffffff81e47f21 > > stack pointer = 0x28:0xfffffe08b37f8810 > > frame pointer = 0x28:0xfffffe08b37f8860 > > code segment = base 0x0, limit 0xfffff, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags = interrupt enabled, resume, IOPL = 0 > > current process = 0 (zio_free_issue_0_3) > > [ thread pid 0 tid 100478 ] > > Stopped at 0xffffffff81e47f21 = zio_vdev_io_start+0x1f1: testb $0x1,(%rax) > > db> bt > > Tracing pid 0 tid 100478 td 0xfffff80193156000 > > zio_vdev_io_start() at 0xffffffff81e47f21 = zio_vdev_io_start+0x1f1/frame 0xfffffe08b37f8860 > > zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b37f88b0 > > zio_nowait() at 0xffffffff81e422b8 = zio_nowait+0xb8/frame 0xfffffe08b37f88e0 > > vdev_mirror_io_start() at 0xffffffff81e224fc = vdev_mirror_io_start+0x38c/frame 0xfffffe08b37f8930 > > zio_vdev_io_start() at 0xffffffff81e48030 = zio_vdev_io_start+0x300/frame 0xfffffe08b37f8990 > > zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b37f89e0 > > taskqueue_run_locked() at 0xffffffff809a9d6d = taskqueue_run_locked+0x13d/frame 0xfffffe08b37f8a40 > > taskqueue_thread_loop() at 0xffffffff809aab28 = taskqueue_thread_loop+0x88/frame 0xfffffe08b37f8a70 > > fork_exit() at 0xffffffff8091e3e4 = fork_exit+0x84/frame 0xfffffe08b37f8ab0 > > fork_trampoline() at 0xffffffff80d930fe = fork_trampoline+0xe/frame 0xfffffe08b37f8ab0 > > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > db> > > > > (kgdb) list *(zio_vdev_io_start+0x1f1) > > 0xd9f21 is in zio_vdev_io_start (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:350). > > 345 > > 346 /* > > 347 * Ensure that anyone expecting this zio to contain a linear ABD isn't > > 348 * going to get a nasty surprise when they try to access the data. > > 349 */ > > 350 IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data)); > > 351 > > 352 zt->zt_orig_abd = zio->io_abd; > > 353 zt->zt_orig_size = zio->io_size; > > 354 zt->zt_bufsize = bufsize; > > > > I???ll try rebooting and see if the problem goes away. If not, I???ll roll back the ABD change and see if the problem goes away. > > Judging from the thread that panic-ed the problem may have to do with our TRIM > support. Unfortunately, I didn't have a chance to test the change on a system > with working TRIM and, so, I missed it. > I will look into this further, but it's almost obvious that the problem is > caused by zio->io_abd being NULL for a zio of type ZIO_TYPE_FREE. FWIW, avg sent me a patch for this particular problem (by checking for NULL before dereferencing the pointer), and although it got me past the above problem, I hit another related panic: Fatal trap 12: page fault while in kernel mode cpuid = 6; Fatal trap 12: page fault while in kernel mode cpuid = 14; apic id = 22 fault virtual address = 0x4 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff81d92a2d stack pointer = 0x0:0xfffffe08b36e0710 frame pointer = 0x0:0xfffffe08b36e0730 code segment = base 0x0, limit 0xfffff, type 0x1b Fatal trap 12: page fault while in kernel mode cpuid = 11; apic id = 0b fault virtual address = 0x4 Fatal trap 12: page fault while in kernel mode cpuid = 8; apic id = 08 = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 0 (zio_free_issue_4_1) [ thread pid 0 tid 100799 ] Stopped at 0xffffffff81d92a2d = abd_verify+0xd: movl 0x4(%r14),%eax db> bt Tracing pid 0 tid 100799 td 0xfffff801931b8560 abd_verify() at 0xffffffff81d92a2d = abd_verify+0xd/frame 0xfffffe08b36e0730 abd_put() at 0xffffffff81d92eff = abd_put+0xf/frame 0xfffffe08b36e0750 vdev_raidz_map_free() at 0xffffffff81e26312 = vdev_raidz_map_free+0x82/frame 0xfffffe08b36e0780 zio_vdev_io_assess() at 0xffffffff81e48646 = zio_vdev_io_assess+0x116/frame 0xfffffe08b36e07b0 zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b36e0800 zio_vdev_io_start() at 0xffffffff81e48184 = zio_vdev_io_start+0x454/frame 0xfffffe08b36e0860 zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b36e08b0 zio_nowait() at 0xffffffff81e422b8 = zio_nowait+0xb8/frame 0xfffffe08b36e08e0 vdev_mirror_io_start() at 0xffffffff81e224fc = vdev_mirror_io_start+0x38c/frame 0xfffffe08b36e0930 zio_vdev_io_start() at 0xffffffff81e48030 = zio_vdev_io_start+0x300/frame 0xfffffe08b36e0990 zio_execute() at 0xffffffff81e4312c = zio_execute+0x36c/frame 0xfffffe08b36e09e0 taskqueue_run_locked() at 0xffffffff809a9d6d = taskqueue_run_locked+0x13d/frame 0xfffffe08b36e0a40 taskqueue_thread_loop() at 0xffffffff809aab28 = taskqueue_thread_loop+0x88/frame 0xfffffe08b36e0a70 fork_exit() at 0xffffffff8091e3e4 = fork_exit+0x84/frame 0xfffffe08b36e0ab0 fork_trampoline() at 0xffffffff80d930fe = fork_trampoline+0xe/frame 0xfffffe08b36e0ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- db> (kgdb) list *(abd_verify+0xd) 0x24a2d is in abd_verify (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:231). 226 } 227 228 static inline void 229 abd_verify(abd_t *abd) 230 { 231 ASSERT3U(abd->abd_size, >, 0); 232 ASSERT3U(abd->abd_size, <=, SPA_MAXBLOCKSIZE); 233 ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR | 234 ABD_FLAG_OWNER | ABD_FLAG_META)); 235 IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER)); (kgdb) list *(abd_put+0xf) 0x24eff is in abd_put (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:514). 509 */ 510 void 511 abd_put(abd_t *abd) 512 { 513 abd_verify(abd); 514 ASSERT(!(abd->abd_flags & ABD_FLAG_OWNER)); 515 516 if (abd->abd_parent != NULL) { 517 (void) refcount_remove_many(&abd->abd_parent->abd_children, 518 abd->abd_size, abd); (kgdb) list *(vdev_raidz_map_free+0x82) 0xb8312 is in vdev_raidz_map_free (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c:281). 276 zio_buf_free(rm->rm_col[c].rc_gdata, 277 rm->rm_col[c].rc_size); 278 } 279 280 size = 0; 281 for (c = rm->rm_firstdatacol; c < rm->rm_cols; c++) { 282 abd_put(rm->rm_col[c].rc_abd); 283 size += rm->rm_col[c].rc_size; 284 } 285 (kgdb) list *(zio_vdev_io_assess+0x116) 0xda646 is in zio_vdev_io_assess (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:3315). 3310 if (vd == NULL && !(zio->io_flags & ZIO_FLAG_CONFIG_WRITER)) 3311 spa_config_exit(zio->io_spa, SCL_ZIO, zio); 3312 3313 if (zio->io_vsd != NULL) { 3314 zio->io_vsd_ops->vsd_free(zio); 3315 zio->io_vsd = NULL; 3316 } 3317 3318 if (zio_injection_enabled && zio->io_error == 0) 3319 zio->io_error = zio_handle_fault_injection(zio, EIO); (kgdb) So, I disabled trim by setting vfs.zfs.trim.enabled=0 in the loader, and I can boot now. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Tue Jun 20 21:26:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5BACDA2B35; Tue, 20 Jun 2017 21:26:43 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84D8E74EF6; Tue, 20 Jun 2017 21:26:43 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KLQgNO051183; Tue, 20 Jun 2017 21:26:42 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KLQgAF051182; Tue, 20 Jun 2017 21:26:42 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201706202126.v5KLQgAF051182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 20 Jun 2017 21:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320176 - head/sbin/newfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 21:26:43 -0000 Author: mckusick Date: Tue Jun 20 21:26:42 2017 New Revision: 320176 URL: https://svnweb.freebsd.org/changeset/base/320176 Log: Allow '_' in labels when specifying -L to newfs. Reported by: Keve Nagy Reviewed by: kib PR: 220163 MFC after: 5 days Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Tue Jun 20 21:17:05 2017 (r320175) +++ head/sbin/newfs/newfs.c Tue Jun 20 21:26:42 2017 (r320176) @@ -150,7 +150,8 @@ main(int argc, char *argv[]) case 'L': volumelabel = optarg; i = -1; - while (isalnum(volumelabel[++i])); + while (isalnum(volumelabel[++i]) || + volumelabel[i] == '_'); if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters are alphanumerics."); } From owner-svn-src-all@freebsd.org Tue Jun 20 22:08:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46B7BDA387F; Tue, 20 Jun 2017 22:08:04 +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 149CD764F4; Tue, 20 Jun 2017 22:08:04 +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 v5KM8301067527; Tue, 20 Jun 2017 22:08:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KM83MK067525; Tue, 20 Jun 2017 22:08:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706202208.v5KM83MK067525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Jun 2017 22:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320177 - in head: . targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 22:08:04 -0000 Author: bdrewery Date: Tue Jun 20 22:08:02 2017 New Revision: 320177 URL: https://svnweb.freebsd.org/changeset/base/320177 Log: buildworld: Pass which world phase the build is in down to submakes. This is useful for having directories behave differently depending on the phase - such as enabling SUBDIR_PARALLEL or disabling redundant building of library directories already done by earlier 'make _libraries'. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/targets/pseudo/bootstrap-tools/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jun 20 21:26:42 2017 (r320176) +++ head/Makefile.inc1 Tue Jun 20 22:08:02 2017 (r320177) @@ -518,6 +518,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile BSARGS= DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ @@ -536,6 +537,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ @@ -689,7 +691,9 @@ NO_META_IGNORE_HOST_HEADERS= 1 host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here @cp -f /usr/include/osreldate.h ${.TARGET} -WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} +WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + BWPHASE=${.TARGET:C,^_,,} \ + DESTDIR=${WORLDTMP} IMAKEENV= ${CROSSENV} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Tue Jun 20 21:26:42 2017 (r320176) +++ head/targets/pseudo/bootstrap-tools/Makefile Tue Jun 20 22:08:02 2017 (r320177) @@ -35,6 +35,7 @@ OSRELDATE?= 0 # need to keep this in sync with src/Makefile.inc1 BSARGS= DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET} \ SSP_CFLAGS= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ From owner-svn-src-all@freebsd.org Wed Jun 21 00:30:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 305B9DA5710; Wed, 21 Jun 2017 00:30:59 +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 D94B979637; Wed, 21 Jun 2017 00:30:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5L0UwKF023990; Wed, 21 Jun 2017 00:30:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L0UvSA023988; Wed, 21 Jun 2017 00:30:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706210030.v5L0UvSA023988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Jun 2017 00:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320178 - in head/sys/dev: ahci usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 00:30:59 -0000 Author: mav Date: Wed Jun 21 00:30:57 2017 New Revision: 320178 URL: https://svnweb.freebsd.org/changeset/base/320178 Log: Add some device IDs for Intel Denverton SoCs. Modified: head/sys/dev/ahci/ahci_pci.c head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Jun 20 22:08:02 2017 (r320177) +++ head/sys/dev/ahci/ahci_pci.c Wed Jun 21 00:30:57 2017 (r320178) @@ -117,6 +117,26 @@ static const struct { {0x3b298086, 0x00, "Intel 5 Series/3400 Series", 0}, {0x3b2c8086, 0x00, "Intel 5 Series/3400 Series", 0}, {0x3b2f8086, 0x00, "Intel 5 Series/3400 Series", 0}, + {0x19b08086, 0x00, "Intel Denverton", 0}, + {0x19b18086, 0x00, "Intel Denverton", 0}, + {0x19b28086, 0x00, "Intel Denverton", 0}, + {0x19b38086, 0x00, "Intel Denverton", 0}, + {0x19b48086, 0x00, "Intel Denverton", 0}, + {0x19b58086, 0x00, "Intel Denverton", 0}, + {0x19b68086, 0x00, "Intel Denverton", 0}, + {0x19b78086, 0x00, "Intel Denverton", 0}, + {0x19be8086, 0x00, "Intel Denverton", 0}, + {0x19bf8086, 0x00, "Intel Denverton", 0}, + {0x19c08086, 0x00, "Intel Denverton", 0}, + {0x19c18086, 0x00, "Intel Denverton", 0}, + {0x19c28086, 0x00, "Intel Denverton", 0}, + {0x19c38086, 0x00, "Intel Denverton", 0}, + {0x19c48086, 0x00, "Intel Denverton", 0}, + {0x19c58086, 0x00, "Intel Denverton", 0}, + {0x19c68086, 0x00, "Intel Denverton", 0}, + {0x19c78086, 0x00, "Intel Denverton", 0}, + {0x19ce8086, 0x00, "Intel Denverton", 0}, + {0x19cf8086, 0x00, "Intel Denverton", 0}, {0x1c028086, 0x00, "Intel Cougar Point", 0}, {0x1c038086, 0x00, "Intel Cougar Point", 0}, {0x1c048086, 0x00, "Intel Cougar Point", 0}, Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Tue Jun 20 22:08:02 2017 (r320177) +++ head/sys/dev/usb/controller/xhci_pci.c Wed Jun 21 00:30:57 2017 (r320178) @@ -113,6 +113,8 @@ xhci_pci_match(device_t self) case 0x0f358086: return ("Intel BayTrail USB 3.0 controller"); + case 0x19d08086: + return ("Intel Denverton USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); From owner-svn-src-all@freebsd.org Wed Jun 21 00:33:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F11A7DA58F1; Wed, 21 Jun 2017 00:33:17 +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 BF3EB798B9; Wed, 21 Jun 2017 00:33:17 +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 v5L0XGE9027942; Wed, 21 Jun 2017 00:33:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L0XGVc027941; Wed, 21 Jun 2017 00:33:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706210033.v5L0XGVc027941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Jun 2017 00:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320179 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 00:33:18 -0000 Author: emaste Date: Wed Jun 21 00:33:16 2017 New Revision: 320179 URL: https://svnweb.freebsd.org/changeset/base/320179 Log: add -znotext to kernel module link invocation ARM kernel modules require .text relocations (DT_TEXTREL) in shared object ouptut, which is not allowed by default by lld. Add the -znotext option to enable this. For simplicity add it unconditionally: it is already default and thus either redundant (GNU BFD ld and gold from ports) or ignored as an unknown option (GNU BFD ld 2.17.50 in the base system). Reviewed by: kib MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11250 Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Jun 21 00:30:57 2017 (r320178) +++ head/sys/conf/kmod.mk Wed Jun 21 00:33:16 2017 (r320179) @@ -210,8 +210,8 @@ ${PROG}.debug: ${FULLPROG} .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld .if ${MACHINE_CPUARCH} != "aarch64" - ${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} \ - ${KMOD}.kld + ${LD} -m ${LD_EMULATION} -Bshareable -znotext ${_LDFLAGS} \ + -o ${.TARGET} ${KMOD}.kld .else #XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does # not work. The linker corrupts the references to the external From owner-svn-src-all@freebsd.org Wed Jun 21 03:55:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4E0ADA8884; Wed, 21 Jun 2017 03:55:46 +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 AAF677EDFD; Wed, 21 Jun 2017 03:55:46 +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 v5L3tjHj010364; Wed, 21 Jun 2017 03:55:45 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L3tjIL010363; Wed, 21 Jun 2017 03:55:45 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706210355.v5L3tjIL010363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 21 Jun 2017 03:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320181 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 03:55:47 -0000 Author: alc Date: Wed Jun 21 03:55:45 2017 New Revision: 320181 URL: https://svnweb.freebsd.org/changeset/base/320181 Log: Eliminate an unused macro. MFC after: 3 days Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Wed Jun 21 03:40:34 2017 (r320180) +++ head/sys/vm/swap_pager.c Wed Jun 21 03:55:45 2017 (r320181) @@ -134,7 +134,6 @@ __FBSDID("$FreeBSD$"); * Unused disk addresses within a swap area are allocated and managed * using a blist. */ -#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) #define SWAP_META_PAGES (SWB_NPAGES * 2) #define SWAP_META_MASK (SWAP_META_PAGES - 1) From owner-svn-src-all@freebsd.org Wed Jun 21 06:34:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65651D87AC9; Wed, 21 Jun 2017 06:34:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 413B482392; Wed, 21 Jun 2017 06:34:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5L6Y6SW074934; Wed, 21 Jun 2017 06:34:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L6Y6KO074933; Wed, 21 Jun 2017 06:34:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706210634.v5L6Y6KO074933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 21 Jun 2017 06:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320183 - head/usr.sbin/rpc.lockd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 06:34:07 -0000 Author: delphij Date: Wed Jun 21 06:34:06 2017 New Revision: 320183 URL: https://svnweb.freebsd.org/changeset/base/320183 Log: Reduce code duplication in rpc.lockd. Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM. As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter. Reviewed by: kevlo MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D11259 Modified: head/usr.sbin/rpc.lockd/lockd.c Modified: head/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- head/usr.sbin/rpc.lockd/lockd.c Wed Jun 21 04:36:46 2017 (r320182) +++ head/usr.sbin/rpc.lockd/lockd.c Wed Jun 21 06:34:06 2017 (r320183) @@ -99,9 +99,8 @@ char localhost[] = "localhost"; static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); -void lookup_addresses(struct netconfig *nconf); +static void out_of_mem(void) __dead2; void init_nsm(void); -void out_of_mem(void); void usage(void); void sigalarm_handler(void); @@ -144,7 +143,6 @@ main(int argc, char **argv) break; case 'h': ++nhosts; - hosts_bak = hosts; hosts_bak = realloc(hosts, nhosts * sizeof(char *)); if (hosts_bak == NULL) { if (hosts != NULL) { @@ -172,7 +170,6 @@ main(int argc, char **argv) svcport_str = strdup(optarg); break; default: - case '?': usage(); /* NOTREACHED */ } @@ -227,7 +224,6 @@ main(int argc, char **argv) hosts[0] = strdup("*"); nhosts = 1; } else { - hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * sizeof(char *)); @@ -309,7 +305,7 @@ main(int argc, char **argv) if (have_v6 == 0 && strcmp(nconf->nc_protofmly, "inet6") == 0) { /* DO NOTHING */ } else { - lookup_addresses(nconf); + create_service(nconf); } } } @@ -482,9 +478,14 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate - * addresses. It gets called one time for each transport. + * addresses if lockd for user NLM, or perform a lookup of + * addresses for the kernel to create transports. + * + * It gets called one time for each transport. + * * It returns 0 upon success, 1 for ingore the call and -1 to indicate * bind failed with EADDRINUSE. + * * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. */ @@ -528,20 +529,23 @@ create_service(struct netconfig *nconf) nhostsbak = nhosts; while (nhostsbak > 0) { --nhostsbak; - sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); - if (sock_fd == NULL) - out_of_mem(); - sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; hints.ai_flags = AI_PASSIVE; - /* - * XXX - using RPC library internal functions. - */ - if ((fd = __rpc_nconf2fd(nconf)) < 0) { - syslog(LOG_ERR, "cannot create socket for %s", - nconf->nc_netid); - continue; + if (!kernel_lockd) { + sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); + if (sock_fd == NULL) + out_of_mem(); + sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ + + /* + * XXX - using RPC library internal functions. + */ + if ((fd = __rpc_nconf2fd(nconf)) < 0) { + syslog(LOG_ERR, "cannot create socket for %s", + nconf->nc_netid); + continue; + } } switch (hints.ai_family) { @@ -555,7 +559,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -570,7 +575,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -584,8 +590,7 @@ create_service(struct netconfig *nconf) */ if (strcmp("*", hosts[nhostsbak]) == 0) { if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) + if ((res = malloc(sizeof(struct addrinfo))) == NULL) out_of_mem(); mallocd_res = 1; res->ai_flags = hints.ai_flags; @@ -616,7 +621,7 @@ create_service(struct netconfig *nconf) break; default: syslog(LOG_ERR, - "bad addr fam %d", + "bad address family %d", res->ai_family); exit(1); } @@ -627,7 +632,8 @@ create_service(struct netconfig *nconf) "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -637,42 +643,62 @@ create_service(struct netconfig *nconf) syslog(LOG_ERR, "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } + if (kernel_lockd) { + struct netbuf servaddr; + char *uaddr; - /* Store the fd. */ - sock_fd[sock_fdcnt - 1] = fd; + /* + * Look up addresses for the kernel to create transports for. + */ + servaddr.len = servaddr.maxlen = res->ai_addrlen; + servaddr.buf = res->ai_addr; + uaddr = taddr2uaddr(nconf, &servaddr); - /* Now, attempt the bind. */ - r = bindresvport_sa(fd, res->ai_addr); - if (r != 0) { - if (errno == EADDRINUSE && mallocd_svcport != 0) { - if (mallocd_res != 0) { - free(res->ai_addr); - free(res); - } else - freeaddrinfo(res); - return (-1); + addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); + if (!addrs) + out_of_mem(); + addrs[2 * naddrs] = strdup(nconf->nc_netid); + addrs[2 * naddrs + 1] = uaddr; + naddrs++; + } else { + /* Store the fd. */ + sock_fd[sock_fdcnt - 1] = fd; + + /* Now, attempt the bind. */ + r = bindresvport_sa(fd, res->ai_addr); + if (r != 0) { + if (errno == EADDRINUSE && mallocd_svcport != 0) { + if (mallocd_res != 0) { + free(res->ai_addr); + free(res); + } else + freeaddrinfo(res); + return (-1); + } + syslog(LOG_ERR, "bindresvport_sa: %m"); + exit(1); } - syslog(LOG_ERR, "bindresvport_sa: %m"); - exit(1); - } - if (svcport_str == NULL) { - svcport_str = malloc(NI_MAXSERV * sizeof(char)); - if (svcport_str == NULL) - out_of_mem(); - mallocd_svcport = 1; + if (svcport_str == NULL) { + svcport_str = malloc(NI_MAXSERV * sizeof(char)); + if (svcport_str == NULL) + out_of_mem(); + mallocd_svcport = 1; - if (getnameinfo(res->ai_addr, - res->ai_addr->sa_len, NULL, NI_MAXHOST, - svcport_str, NI_MAXSERV * sizeof(char), - NI_NUMERICHOST | NI_NUMERICSERV)) - errx(1, "Cannot get port number"); + if (getnameinfo(res->ai_addr, + res->ai_addr->sa_len, NULL, NI_MAXHOST, + svcport_str, NI_MAXSERV * sizeof(char), + NI_NUMERICHOST | NI_NUMERICSERV)) + errx(1, "Cannot get port number"); + } } + if (mallocd_res != 0) { free(res->ai_addr); free(res); @@ -803,151 +829,6 @@ clearout_service(void) close(sock_fd[i]); } } -} - -/* - * Look up addresses for the kernel to create transports for. - */ -void -lookup_addresses(struct netconfig *nconf) -{ - struct addrinfo hints, *res = NULL; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; - struct __rpc_sockinfo si; - struct netbuf servaddr; - int aicode; - int nhostsbak; - u_int32_t host_addr[4]; /* IPv4 or IPv6 */ - char *uaddr; - - if ((nconf->nc_semantics != NC_TPI_CLTS) && - (nconf->nc_semantics != NC_TPI_COTS) && - (nconf->nc_semantics != NC_TPI_COTS_ORD)) - return; /* not my type */ - - /* - * XXX - using RPC library internal functions. - */ - if (!__rpc_nconf2sockinfo(nconf, &si)) { - syslog(LOG_ERR, "cannot get information for %s", - nconf->nc_netid); - return; - } - - /* Get rpc.statd's address on this transport */ - memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = si.si_af; - hints.ai_socktype = si.si_socktype; - hints.ai_protocol = si.si_proto; - - /* - * Bind to specific IPs if asked to - */ - nhostsbak = nhosts; - while (nhostsbak > 0) { - --nhostsbak; - - switch (hints.ai_family) { - case AF_INET: - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET6 address. - */ - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - case AF_INET6: - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET address. - */ - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - default: - break; - } - - /* - * If no hosts were specified, just bind to INADDR_ANY - */ - if (strcmp("*", hosts[nhostsbak]) == 0) { - if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) - out_of_mem(); - res->ai_flags = hints.ai_flags; - res->ai_family = hints.ai_family; - res->ai_protocol = hints.ai_protocol; - switch (res->ai_family) { - case AF_INET: - sin = malloc(sizeof(struct sockaddr_in)); - if (sin == NULL) - out_of_mem(); - sin->sin_family = AF_INET; - sin->sin_port = htons(0); - sin->sin_addr.s_addr = htonl(INADDR_ANY); - res->ai_addr = (struct sockaddr*) sin; - res->ai_addrlen = sizeof(struct sockaddr_in); - break; - case AF_INET6: - sin6 = malloc(sizeof(struct sockaddr_in6)); - if (sin6 == NULL) - out_of_mem(); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = htons(0); - sin6->sin6_addr = in6addr_any; - res->ai_addr = (struct sockaddr*) sin6; - res->ai_addrlen = sizeof(struct sockaddr_in6); - break; - default: - break; - } - } else { - if ((aicode = getaddrinfo(NULL, svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, - gai_strerror(aicode)); - continue; - } - } - } else { - if ((aicode = getaddrinfo(hosts[nhostsbak], svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); - continue; - } - } - - servaddr.len = servaddr.maxlen = res->ai_addrlen; - servaddr.buf = res->ai_addr; - uaddr = taddr2uaddr(nconf, &servaddr); - - addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); - if (!addrs) - out_of_mem(); - addrs[2 * naddrs] = strdup(nconf->nc_netid); - addrs[2 * naddrs + 1] = uaddr; - naddrs++; - } /* end while */ } void From owner-svn-src-all@freebsd.org Wed Jun 21 06:44:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90335D87D6D; Wed, 21 Jun 2017 06:44:57 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F86F827D7; Wed, 21 Jun 2017 06:44:57 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5L6iuib079056; Wed, 21 Jun 2017 06:44:56 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L6iuFc079055; Wed, 21 Jun 2017 06:44:56 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201706210644.v5L6iuFc079055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 21 Jun 2017 06:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320184 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 06:44:57 -0000 Author: sephe Date: Wed Jun 21 06:44:56 2017 New Revision: 320184 URL: https://svnweb.freebsd.org/changeset/base/320184 Log: hyperv/storvsc: Reduce log verbosity On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors. PR: 219973 Submitted by: Hongjiang Zhang MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Jun 21 06:34:06 2017 (r320183) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Jun 21 06:44:56 2017 (r320184) @@ -2095,6 +2095,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) struct vmscsi_req *vm_srb = &reqp->vstor_packet.u.vm_srb; bus_dma_segment_t *ori_sglist = NULL; int ori_sg_count = 0; + const struct scsi_generic *cmd; /* destroy bounce buffer if it is used */ if (reqp->bounce_sgl_count) { @@ -2145,16 +2146,14 @@ storvsc_io_done(struct hv_storvsc_request *reqp) callout_drain(&reqp->callout); } #endif + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.status &= ~CAM_STATUS_MASK; int srb_status = SRB_STATUS(vm_srb->srb_status); if (vm_srb->scsi_status == SCSI_STATUS_OK) { - const struct scsi_generic *cmd; - - cmd = (const struct scsi_generic *) - ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? - csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (srb_status != SRB_STATUS_SUCCESS) { /* * If there are errors, for example, invalid LUN, @@ -2252,11 +2251,23 @@ storvsc_io_done(struct hv_storvsc_request *reqp) } } } else { - mtx_lock(&sc->hs_lock); - xpt_print(ccb->ccb_h.path, - "storvsc scsi_status = %d\n", - vm_srb->scsi_status); - mtx_unlock(&sc->hs_lock); + /** + * On Some Windows hosts TEST_UNIT_READY command can return + * SRB_STATUS_ERROR and sense data, for example, asc=0x3a,1 + * "(Medium not present - tray closed)". This error can be + * ignored since it will be sent to host periodically. + */ + boolean_t unit_not_ready = \ + vm_srb->scsi_status == SCSI_STATUS_CHECK_COND && + cmd->opcode == TEST_UNIT_READY && + srb_status == SRB_STATUS_ERROR; + if (!unit_not_ready && bootverbose) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc scsi_status = %d, srb_status = %d\n", + vm_srb->scsi_status, srb_status); + mtx_unlock(&sc->hs_lock); + } ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; } From owner-svn-src-all@freebsd.org Wed Jun 21 07:59:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4A0BD89116; Wed, 21 Jun 2017 07:59:24 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB2684516; Wed, 21 Jun 2017 07:59:23 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.225.8.42]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3u86-1deqFO2ERG-00rc5K; Wed, 21 Jun 2017 09:59:20 +0200 Date: Wed, 21 Jun 2017 09:59:14 +0200 From: "O. Hartmann" To: "Kenneth D. Merry" Cc: Andriy Gapon , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... Message-ID: <20170621095903.4fefe0b5@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170620212553.GA30559@mithlond.kdm.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> <20170620212553.GA30559@mithlond.kdm.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/OqF89_4IuMou85Cqd.VGkTp"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:ZG5KygyYmNTXoYz9o0RTJZLby+xLczug/8aOgceNgtezPQlHsGj f7nPuVwMhVUKra29Sem5+HW3lEwvaTdqX9I0DleU072GK0kvg4OKHJ5DrNOlJRzyynXLUFV NrsTipSSGgKMxwGIVZXs1hKwtHFnrSbtStVTnkwiuvVmi2JvMoR5RVI4q32aLCIXzcM3iju N5qS4u76pD0Rgx5yUvxcQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:OFJCq0t8wxU=:nhE2hadSEM2m+4JXneT8Tb N7uiqjc8QT9xX4RLC7AdvfgWml4Whrb2MWuL8M1OniNpwW6dvJh7OrUWRYQM5y91JaSWzuQNo DF1AhyZpREx6oQk9G+4u/iUBHo2W7rLKW5LgD8znRmfevRKLAuGpokZ1HXOuqkDGP36513L5y 1JEesTx8fL94EEIgVG0CLQ9Iqpl3jS/AhK7e6bx88v4iwzTmLtWWw64cTMSXWdzNMUPej63+0 ROAVYlB9itFI+k2b4HUumZtih0cLbz4943m9jcIO5fwuPGt1iDiP8259p8ujb/jncwlxeFhFV +M036KXHohj2qXMwBcPIVHR+kmZlEXHhoXY9NkI7W7dLmS6gXCN1kZWBfrtNtdKnREXspfVT2 xLEkyIJ1nmcPmj9MEUnfNEg6nproiZF1d2DFPcIsD87I5mLNICvvqd/eK7cTy1Av5dQzYatBC 6EExpiAf5Ai6Wskx4AHiX2UUJFLjJ60+mhgKjurtIF8qU8PDCZ3KTn9Os4FZ62XdAWo0UUWPN Z481o0jguM5ACVvCl5/a9x2cNkqyHCwncDdohVcWQ2b0lY3Wv41mA7DiTqnV9hPsbHlcbZRuE I/dtxSIsjvQov+qGscD/TNn1oP9cRhFR4ZMqR5Dg62iA4r5aPdxZkarEZzQ41vu/hoI0D3Scd cATBhfa9A9deDQ+rhw96r0dPTmkj7mKNgXlda5fw9K6GGk4Auf1gtxIzl8pJAYeb/e2j05xxG M8Izi+90hQhE2KN+cqUlQc1oGGVZuKr6TQzzpmIvr26+AYzK42CQ752wZB8= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 07:59:24 -0000 --Sig_/OqF89_4IuMou85Cqd.VGkTp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Tue, 20 Jun 2017 17:25:53 -0400 "Kenneth D. Merry" schrieb: > On Tue, Jun 20, 2017 at 23:37:10 +0300, Andriy Gapon wrote: > > On 20/06/2017 23:29, Ken Merry wrote: =20 > > > I don???t know for sure that this commit is the cause, but it (and r3= 20153) are the > > > only ZFS commits between a version of head from June 14th that boots = off a ZFS > > > mirror, and one that panics. r320153 is running well here and stable, but with r320156, my kernel(s) on = all ZFS machines panic immediately (they have ZFS built in into the kernel, not a m= odule). This moment, I went back to r320153. I'm sorry for not having debugging inf= ormations, the boxes are w/o debugging options this moment. > > >=20 > > > Here???s the stack trace: > > >=20 > > > Fatal trap 12: page fault while in kernel mode > > > cpuid =3D 22;=20 > > >=20 > > > Fatal trap 12: page fault while in kernel mode > > > cpuid =3D 9; apic id =3D 09 > > > fault virtual address =3D 0x0 > > > fault code =3D supervisor read data, page not present > > > instruction pointer =3D 0x20:0xffffffff81e47f21 > > > stack pointer =3D 0x28:0xfffffe08b37f8810 > > > frame pointer =3D 0x28:0xfffffe08b37f8860 > > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > > current process =3D 0 (zio_free_issue_0_3) > > > [ thread pid 0 tid 100478 ] > > > Stopped at 0xffffffff81e47f21 =3D zio_vdev_io_start+0x1f1: tes= tb > > > $0x1,(%rax) =20 > > > db> bt =20 > > > Tracing pid 0 tid 100478 td 0xfffff80193156000 > > > zio_vdev_io_start() at 0xffffffff81e47f21 =3D zio_vdev_io_start+0x1f1= /frame > > > 0xfffffe08b37f8860 zio_execute() at 0xffffffff81e4312c =3D zio_execut= e+0x36c/frame > > > 0xfffffe08b37f88b0 zio_nowait() at 0xffffffff81e422b8 =3D zio_nowait+= 0xb8/frame > > > 0xfffffe08b37f88e0 vdev_mirror_io_start() at 0xffffffff81e224fc =3D > > > vdev_mirror_io_start+0x38c/frame 0xfffffe08b37f8930 zio_vdev_io_start= () at > > > 0xffffffff81e48030 =3D zio_vdev_io_start+0x300/frame 0xfffffe08b37f89= 90 zio_execute() > > > at 0xffffffff81e4312c =3D zio_execute+0x36c/frame 0xfffffe08b37f89e0 > > > taskqueue_run_locked() at 0xffffffff809a9d6d =3D taskqueue_run_locked= +0x13d/frame > > > 0xfffffe08b37f8a40 taskqueue_thread_loop() at 0xffffffff809aab28 =3D > > > taskqueue_thread_loop+0x88/frame 0xfffffe08b37f8a70 fork_exit() at > > > 0xffffffff8091e3e4 =3D fork_exit+0x84/frame 0xfffffe08b37f8ab0 fork_t= rampoline() at > > > 0xffffffff80d930fe =3D fork_trampoline+0xe/frame 0xfffffe08b37f8ab0 -= -- trap 0, rip =3D > > > 0, rsp =3D 0, rbp =3D 0 --- =20 > > > db> =20 > > >=20 > > > (kgdb) list *(zio_vdev_io_start+0x1f1) > > > 0xd9f21 is in zio_vdev_io_start > > > (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensola= ris/uts/common/fs/zfs/zio.c:350). > > > 345 346 /* > > > 347 * Ensure that anyone expecting this zio to contain a= linear ABD > > > isn't 348 * going to get a nasty surprise when they try = to access the > > > data. 349 */ > > > 350 IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data)= ); > > > 351 > > > 352 zt->zt_orig_abd =3D zio->io_abd; > > > 353 zt->zt_orig_size =3D zio->io_size; > > > 354 zt->zt_bufsize =3D bufsize; > > >=20 > > > I???ll try rebooting and see if the problem goes away. If not, I???l= l roll back > > > the ABD change and see if the problem goes away. =20 > >=20 > > Judging from the thread that panic-ed the problem may have to do with o= ur TRIM > > support. Unfortunately, I didn't have a chance to test the change on = a system > > with working TRIM and, so, I missed it. > > I will look into this further, but it's almost obvious that the problem= is > > caused by zio->io_abd being NULL for a zio of type ZIO_TYPE_FREE. =20 >=20 > FWIW, avg sent me a patch for this particular problem (by checking for NU= LL > before dereferencing the pointer), and although it got me past the above > problem, I hit another related panic: >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 6;=20 >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 14; apic id =3D 22 > fault virtual address =3D 0x4 > fault code =3D supervisor read data, page not present > instruction pointer =3D 0x20:0xffffffff81d92a2d > stack pointer =3D 0x0:0xfffffe08b36e0710 > frame pointer =3D 0x0:0xfffffe08b36e0730 > code segment =3D base 0x0, limit 0xfffff, type 0x1b >=20 >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 11; apic id =3D 0b > fault virtual address =3D 0x4 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 8; apic id =3D 08 > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > current process =3D 0 (zio_free_issue_4_1) > [ thread pid 0 tid 100799 ] > Stopped at 0xffffffff81d92a2d =3D abd_verify+0xd: movl 0x4(%r1= 4),%eax > db> bt =20 > Tracing pid 0 tid 100799 td 0xfffff801931b8560 > abd_verify() at 0xffffffff81d92a2d =3D abd_verify+0xd/frame 0xfffffe08b36= e0730 > abd_put() at 0xffffffff81d92eff =3D abd_put+0xf/frame 0xfffffe08b36e0750 > vdev_raidz_map_free() at 0xffffffff81e26312 =3D vdev_raidz_map_free+0x82/= frame > 0xfffffe08b36e0780 zio_vdev_io_assess() at 0xffffffff81e48646 =3D > zio_vdev_io_assess+0x116/frame 0xfffffe08b36e07b0 zio_execute() at 0xffff= ffff81e4312c =3D > zio_execute+0x36c/frame 0xfffffe08b36e0800 zio_vdev_io_start() at 0xfffff= fff81e48184 =3D > zio_vdev_io_start+0x454/frame 0xfffffe08b36e0860 zio_execute() at 0xfffff= fff81e4312c =3D > zio_execute+0x36c/frame 0xfffffe08b36e08b0 zio_nowait() at 0xffffffff81e4= 22b8 =3D > zio_nowait+0xb8/frame 0xfffffe08b36e08e0 vdev_mirror_io_start() at 0xffff= ffff81e224fc =3D > vdev_mirror_io_start+0x38c/frame 0xfffffe08b36e0930 zio_vdev_io_start() at > 0xffffffff81e48030 =3D zio_vdev_io_start+0x300/frame 0xfffffe08b36e0990 z= io_execute() at > 0xffffffff81e4312c =3D zio_execute+0x36c/frame 0xfffffe08b36e09e0 taskque= ue_run_locked() > at 0xffffffff809a9d6d =3D taskqueue_run_locked+0x13d/frame 0xfffffe08b36e= 0a40 > taskqueue_thread_loop() at 0xffffffff809aab28 =3D taskqueue_thread_loop+0= x88/frame > 0xfffffe08b36e0a70 fork_exit() at 0xffffffff8091e3e4 =3D fork_exit+0x84/f= rame > 0xfffffe08b36e0ab0 fork_trampoline() at 0xffffffff80d930fe =3D fork_tramp= oline+0xe/frame > 0xfffffe08b36e0ab0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- > db> =20 >=20 > (kgdb) list *(abd_verify+0xd) >=20 > 0x24a2d is in abd_verify > (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/= uts/common/fs/zfs/abd.c:231). > 226 } 227 > 228 static inline void > 229 abd_verify(abd_t *abd) > 230 { > 231 ASSERT3U(abd->abd_size, >, 0); > 232 ASSERT3U(abd->abd_size, <=3D, SPA_MAXBLOCKSIZE); > 233 ASSERT3U(abd->abd_flags, =3D=3D, abd->abd_flags & (ABD_FL= AG_LINEAR | > 234 ABD_FLAG_OWNER | ABD_FLAG_META)); > 235 IMPLY(abd->abd_parent !=3D NULL, !(abd->abd_flags & ABD_F= LAG_OWNER)); > (kgdb) list *(abd_put+0xf) > 0x24eff is in abd_put > (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/= uts/common/fs/zfs/abd.c:514). > 509 */ 510 void > 511 abd_put(abd_t *abd) > 512 { > 513 abd_verify(abd); > 514 ASSERT(!(abd->abd_flags & ABD_FLAG_OWNER)); > 515 > 516 if (abd->abd_parent !=3D NULL) { > 517 (void) refcount_remove_many(&abd->abd_parent->abd= _children, > 518 abd->abd_size, abd); > (kgdb) list *(vdev_raidz_map_free+0x82) > 0xb8312 is in vdev_raidz_map_free > (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/= uts/common/fs/zfs/vdev_raidz.c:281). > 276 zio_buf_free(rm->rm_col[c].rc_gdata, > 277 rm->rm_col[c].rc_size); 278 = } > 279 > 280 size =3D 0; > 281 for (c =3D rm->rm_firstdatacol; c < rm->rm_cols; c++) { > 282 abd_put(rm->rm_col[c].rc_abd); > 283 size +=3D rm->rm_col[c].rc_size; > 284 } > 285 > (kgdb) list *(zio_vdev_io_assess+0x116) > 0xda646 is in zio_vdev_io_assess > (/usr/home/kenm/perforce4/kenm/FreeBSD-test/sys/cddl/contrib/opensolaris/= uts/common/fs/zfs/zio.c:3315). > 3310 if (vd =3D=3D NULL && !(zio->io_flags & ZIO_FLAG_CONFIG_W= RITER)) > 3311 spa_config_exit(zio->io_spa, SCL_ZIO, zio); 3312 > 3313 if (zio->io_vsd !=3D NULL) { > 3314 zio->io_vsd_ops->vsd_free(zio); > 3315 zio->io_vsd =3D NULL; > 3316 } > 3317 > 3318 if (zio_injection_enabled && zio->io_error =3D=3D 0) > 3319 zio->io_error =3D zio_handle_fault_injection(zio,= EIO); > (kgdb)=20 >=20 > So, I disabled trim by setting vfs.zfs.trim.enabled=3D0 in the loader, an= d I > can boot now. >=20 > Ken --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/OqF89_4IuMou85Cqd.VGkTp Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWUonUgAKCRDS528fyFhY lHQ+Af0Zs5JJEHGPnD9+ae/VKtOa3hEsYh1mQJI+oDA9ni80NQ+a33cMDfjGk/Dc iFTQM/8ckRwwgpPQPODf05oRHhRmAf4xk8L5wXKUAF+5nQBVhgApX38egAK0uAYz aR1spEDIBsWB1stG5wt7uNdqCFbT2CJV1Wn/oQ4DNtTqgGEHwWIw =KaKf -----END PGP SIGNATURE----- --Sig_/OqF89_4IuMou85Cqd.VGkTp-- From owner-svn-src-all@freebsd.org Wed Jun 21 08:10:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E6D4D895AA; Wed, 21 Jun 2017 08:10:47 +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 0484184A58; Wed, 21 Jun 2017 08:10:46 +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 v5L8AkhH012598; Wed, 21 Jun 2017 08:10:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L8Ak75012596; Wed, 21 Jun 2017 08:10:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706210810.v5L8Ak75012596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Jun 2017 08:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320185 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 08:10:47 -0000 Author: avg Date: Wed Jun 21 08:10:45 2017 New Revision: 320185 URL: https://svnweb.freebsd.org/changeset/base/320185 Log: fix several fallouts from r320156, ZFS ABD import All of the problems were related to the FreeBSD-only features. One was caused by a mismerge in the zfsbootcfg support code. All others were in the TRIM support code. Reported by: ken, O. Hartmann , Trond Endrestøl MFC after: 1 week X-MFC with: r320156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Wed Jun 21 06:44:56 2017 (r320184) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Wed Jun 21 08:10:45 2017 (r320185) @@ -279,7 +279,8 @@ vdev_raidz_map_free(raidz_map_t *rm) size = 0; for (c = rm->rm_firstdatacol; c < rm->rm_cols; c++) { - abd_put(rm->rm_col[c].rc_abd); + if (rm->rm_col[c].rc_abd != NULL) + abd_put(rm->rm_col[c].rc_abd); size += rm->rm_col[c].rc_size; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Jun 21 06:44:56 2017 (r320184) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Jun 21 08:10:45 2017 (r320185) @@ -347,7 +347,12 @@ zio_push_transform(zio_t *zio, abd_t *data, uint64_t s * Ensure that anyone expecting this zio to contain a linear ABD isn't * going to get a nasty surprise when they try to access the data. */ +#ifdef illumos IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data)); +#else + IMPLY(zio->io_abd != NULL && abd_is_linear(zio->io_abd), + abd_is_linear(data)); +#endif zt->zt_orig_abd = zio->io_abd; zt->zt_orig_size = zio->io_size; @@ -3132,7 +3137,7 @@ zio_vdev_io_start(zio_t *zio) P2PHASE(zio->io_size, align) != 0) { /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align); - abd_t *abuf; + abd_t *abuf = NULL; if (zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE) abuf = abd_alloc_sametype(zio->io_abd, asize); From owner-svn-src-all@freebsd.org Wed Jun 21 08:12:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43543D89763; Wed, 21 Jun 2017 08:12:09 +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 13E5584E7E; Wed, 21 Jun 2017 08:12:09 +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 v5L8C8EY014937; Wed, 21 Jun 2017 08:12:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L8C8ep014936; Wed, 21 Jun 2017 08:12:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706210812.v5L8C8ep014936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Jun 2017 08:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320186 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 08:12:09 -0000 Author: avg Date: Wed Jun 21 08:12:07 2017 New Revision: 320186 URL: https://svnweb.freebsd.org/changeset/base/320186 Log: fix several fallouts from r320156, ZFS ABD import All of the problems were related to the FreeBSD-only features. One was caused by a mismerge in the zfsbootcfg support code. All others were in the TRIM support code. MFC after: 1 week X-MFC with: r320156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Jun 21 08:10:45 2017 (r320185) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Jun 21 08:12:07 2017 (r320186) @@ -912,7 +912,7 @@ retry: goto retry; } - zio_buf_free(pad2, VDEV_PAD_SIZE); + abd_free(pad2); return (error); } From owner-svn-src-all@freebsd.org Wed Jun 21 08:17:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43510D89A20; Wed, 21 Jun 2017 08:17:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B2F1218F; Wed, 21 Jun 2017 08:17:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA20469; Wed, 21 Jun 2017 11:17:44 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dNapc-000Ofr-7W; Wed, 21 Jun 2017 11:17:44 +0300 Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... To: "Kenneth D. Merry" Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, ohartmann@walstatt.org References: <201706201739.v5KHdPhO051256@repo.freebsd.org> <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> <20170620212553.GA30559@mithlond.kdm.org> From: Andriy Gapon Message-ID: Date: Wed, 21 Jun 2017 11:16:23 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170620212553.GA30559@mithlond.kdm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 08:17:50 -0000 On 21/06/2017 00:25, Kenneth D. Merry wrote: > FWIW, avg sent me a patch for this particular problem (by checking for NULL > before dereferencing the pointer), and although it got me past the above > problem, I hit another related panic: Could you please re-enable ZFS TRIM support and test r320186 or later? Thank you for all your help with the testing and debugging. -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed Jun 21 12:19:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 837EBD8E29F; Wed, 21 Jun 2017 12:19:06 +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 521FE66D8E; Wed, 21 Jun 2017 12:19:06 +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 v5LCJ5Sq014083; Wed, 21 Jun 2017 12:19:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LCJ55v014082; Wed, 21 Jun 2017 12:19:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706211219.v5LCJ55v014082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 21 Jun 2017 12:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320187 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 12:19:06 -0000 Author: cy Date: Wed Jun 21 12:19:05 2017 New Revision: 320187 URL: https://svnweb.freebsd.org/changeset/base/320187 Log: Fix -S handling within poolcommand(). Specifying a seed (-S) is only valid when adding a pool (ippool -A), not when removing a pool (ippool -R). It is a command line syntax error if specifying a seed (-S) is specified when emoving a pool (-R). Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Wed Jun 21 08:12:07 2017 (r320186) +++ head/contrib/ipfilter/tools/ippool.c Wed Jun 21 12:19:05 2017 (r320187) @@ -298,7 +298,10 @@ poolcommand(remove, argc, argv) opts |= OPT_NORESOLVE; break; case 'S' : - iph.iph_seed = atoi(optarg); + if (remove == 0) + iph.iph_seed = atoi(optarg); + else + usage(argv[0]); break; case 'v' : opts |= OPT_VERBOSE; From owner-svn-src-all@freebsd.org Wed Jun 21 13:35:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05DF4D8FDA7; Wed, 21 Jun 2017 13:35:30 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B976E6A2F9; Wed, 21 Jun 2017 13:35:29 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id v5LDZQvV044121 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jun 2017 09:35:26 -0400 (EDT) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id v5LDZQ2C044120; Wed, 21 Jun 2017 09:35:26 -0400 (EDT) (envelope-from ken) Date: Wed, 21 Jun 2017 09:35:26 -0400 From: "Kenneth D. Merry" To: Andriy Gapon Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, ohartmann@walstatt.org Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... Message-ID: <20170621133525.GB30559@mithlond.kdm.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> <81F84BCA-E973-4D78-B81C-1D398ADFA47E@freebsd.org> <20170620212553.GA30559@mithlond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Wed, 21 Jun 2017 09:35:26 -0400 (EDT) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 13:35:30 -0000 On Wed, Jun 21, 2017 at 11:16:23 +0300, Andriy Gapon wrote: > On 21/06/2017 00:25, Kenneth D. Merry wrote: > > FWIW, avg sent me a patch for this particular problem (by checking for NULL > > before dereferencing the pointer), and although it got me past the above > > problem, I hit another related panic: > > Could you please re-enable ZFS TRIM support and test r320186 or later? > Thank you for all your help with the testing and debugging. That fixed it, thank you! Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Wed Jun 21 13:37:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37C6FD8FE57; Wed, 21 Jun 2017 13:37:33 +0000 (UTC) (envelope-from danfe@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 18F896A465; Wed, 21 Jun 2017 13:37:33 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6A7CF1300; Wed, 21 Jun 2017 13:37:32 +0000 (UTC) Date: Wed, 21 Jun 2017 13:37:32 +0000 From: Alexey Dokuchaev To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320172 - head/bin/ln Message-ID: <20170621133732.GA44693@FreeBSD.org> References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706202046.v5KKk8Zd034737@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 13:37:33 -0000 On Tue, Jun 20, 2017 at 08:46:08PM +0000, Ngie Cooper wrote: > New Revision: 320172 > URL: https://svnweb.freebsd.org/changeset/base/320172 > > Log: > ln(1): fix -F behavior > > When '-F' option is used, the target directory needs to be unlinked. > Currently, the modified target ("target/source") is being unlinked, and > since it doesn't yet exist, the original target isn't removed. > This is fixed by skipping the block where target is modified to > "target/source" when '-F' option is set. > Hence, a symbolic link (with the same name as of the original target) to > the source_file is produced. Is this about the same problem I've asked asked on -hackers@ back in 2015 (and never got any answer)? https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046939.html ./danfe From owner-svn-src-all@freebsd.org Wed Jun 21 14:31:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E80FAD90CE5; Wed, 21 Jun 2017 14:31:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5AA56EDA4; Wed, 21 Jun 2017 14:31:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x22e.google.com with SMTP id 63so65072639ywr.0; Wed, 21 Jun 2017 07:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PVc52FWA9x39b4uSnEBPGH4mnwf7v17e3UjmfodttNs=; b=hOyPcSXykOdMZzpGl9oNT27kmmrmygqrH6zxtGjL6uR0MWC/gpJbWlWZhwLoTremjT +H6kGdvrBaq8wWjAmK3T5jYvVeYyVdZymTK7YSX6bg2NZGXcteWbFVYbB+6JR3fluaoP Nx7EmE14o0jdktdoT1CF0pveWGuAobA4Esqd3kTN54hU17wj6Kref4pm8H4bPW3GF+t1 XLUZEJneuOwFs0Tzye7eCH486ddYtgU8+NBbOgI7KHrdmsTWX+2KCHGJL3NrH21Xjv30 MK6g+ZSH7x+MBoTIuMWdmntBAz0ubmOO3VqJyMiz40Bo8YF3m3VkHoUblYKSq0bItUMI 1v8g== 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=PVc52FWA9x39b4uSnEBPGH4mnwf7v17e3UjmfodttNs=; b=aEq0qpWP+GtZU33NADz0wRXRjdjyskATYdwPgLJp6fKLGzHGkgG5dWQ/bcKazULcFY WSXxLFBBg/aQxs43oJc9lQg6gAORrCwcrvM74ShMpoL+5FqWaTQ5FCmN70hwboWSH6dN uG44VHuwYaJsE+UJVq2rNT9aF+Xl35SHlySvNa1IvBXgFwyuMnUEFupQLfnwu4C9PSLx Cs8IIDCHjbeLz4ySMjIp6hTw6fAxr9a6dFcn52FM3XirtCf7L8D5rdBBJf4F88gUbqml lcf7bsXr0qosqn4AY1nGSikDSRbqN06/RlHe0F+mbmmYDOoQNl6+Ob3Qd7pEon2zSsUB a/zg== X-Gm-Message-State: AKS2vOwm+M+byhl2IQPmdCV5BUjrgy20ZtYcTYg9iSsoa6afk7fXmNWW 8xBmgbY86NQ/XmvcoQ9kwcebmMnenA== X-Received: by 10.129.175.33 with SMTP id n33mr27422237ywh.279.1498055470633; Wed, 21 Jun 2017 07:31:10 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.13.206.199 with HTTP; Wed, 21 Jun 2017 07:31:10 -0700 (PDT) In-Reply-To: <20170621133732.GA44693@FreeBSD.org> References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> <20170621133732.GA44693@FreeBSD.org> From: Alan Somers Date: Wed, 21 Jun 2017 08:31:10 -0600 X-Google-Sender-Auth: vA8B-3AJc9qze3vBTO5giXMVs5I Message-ID: Subject: Re: svn commit: r320172 - head/bin/ln To: Alexey Dokuchaev Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:31:12 -0000 On Wed, Jun 21, 2017 at 7:37 AM, Alexey Dokuchaev wrote: > On Tue, Jun 20, 2017 at 08:46:08PM +0000, Ngie Cooper wrote: >> New Revision: 320172 >> URL: https://svnweb.freebsd.org/changeset/base/320172 >> >> Log: >> ln(1): fix -F behavior >> >> When '-F' option is used, the target directory needs to be unlinked. >> Currently, the modified target ("target/source") is being unlinked, and >> since it doesn't yet exist, the original target isn't removed. >> This is fixed by skipping the block where target is modified to >> "target/source" when '-F' option is set. >> Hence, a symbolic link (with the same name as of the original target) to >> the source_file is produced. > > Is this about the same problem I've asked asked on -hackers@ back in 2015 > (and never got any answer)? > > https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046939.html > > ./danfe Yep, shivansh rediscovered the same problem. Sorry nobody noticed your original post. -Alan From owner-svn-src-all@freebsd.org Wed Jun 21 14:36:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EFE2D90F79; Wed, 21 Jun 2017 14:36:26 +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 68F9B6F0A2; Wed, 21 Jun 2017 14:36:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LEaPas070410; Wed, 21 Jun 2017 14:36:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LEaP5A070409; Wed, 21 Jun 2017 14:36:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706211436.v5LEaP5A070409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Jun 2017 14:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320188 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:36:26 -0000 Author: jhb Date: Wed Jun 21 14:36:25 2017 New Revision: 320188 URL: https://svnweb.freebsd.org/changeset/base/320188 Log: MFC 319702: Fix an off-by-one error in the VM page array on some systems. r313186 changed how the size of the VM page array was calculated to be less wasteful. For most systems, the amount of memory is divided by the overhead required by each page (a page of data plus a struct vm_page) to determine the maximum number of available pages. However, if the remainder for the first non-available page was at least a page of data (so that the only memory missing was a struct vm_page), this last page was left in phys_avail[] but was not allocated an entry in the VM page array. Handle this case by explicitly excluding the page from phys_avail[]. Approved by: re (kib) Modified: stable/11/sys/vm/vm_page.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Wed Jun 21 12:19:05 2017 (r320187) +++ stable/11/sys/vm/vm_page.c Wed Jun 21 14:36:25 2017 (r320188) @@ -561,8 +561,13 @@ vm_page_startup(vm_offset_t vaddr) size += vm_phys_segs[i].end - vm_phys_segs[i].start; for (i = 0; phys_avail[i + 1] != 0; i += 2) size += phys_avail[i + 1] - phys_avail[i]; - page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); #elif defined(VM_PHYSSEG_DENSE) + size = high_avail - low_avail; +#else +#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." +#endif + +#ifdef VM_PHYSSEG_DENSE /* * In the VM_PHYSSEG_DENSE case, the number of pages can account for * the overhead of a page structure per page only if vm_page_array is @@ -570,14 +575,27 @@ vm_page_startup(vm_offset_t vaddr) * allocate page structures representing the physical memory * underlying vm_page_array, even though they will not be used. */ - if (new_end == high_avail) - page_range = (high_avail - low_avail) / (PAGE_SIZE + - sizeof(struct vm_page)); + if (new_end != high_avail) + page_range = size / PAGE_SIZE; else - page_range = high_avail / PAGE_SIZE - first_page; -#else -#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." #endif + { + page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); + + /* + * If the partial bytes remaining are large enough for + * a page (PAGE_SIZE) without a corresponding + * 'struct vm_page', then new_end will contain an + * extra page after subtracting the length of the VM + * page array. Compensate by subtracting an extra + * page from new_end. + */ + if (size % (PAGE_SIZE + sizeof(struct vm_page)) >= PAGE_SIZE) { + if (new_end == high_avail) + high_avail -= PAGE_SIZE; + new_end -= PAGE_SIZE; + } + } end = new_end; /* From owner-svn-src-all@freebsd.org Wed Jun 21 14:38:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAC3CD91029; Wed, 21 Jun 2017 14:38:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ABD56F236; Wed, 21 Jun 2017 14:38:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LEcqbG070526; Wed, 21 Jun 2017 14:38:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LEcqFZ070525; Wed, 21 Jun 2017 14:38:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706211438.v5LEcqFZ070525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 21 Jun 2017 14:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320189 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:38:53 -0000 Author: hselasky Date: Wed Jun 21 14:38:52 2017 New Revision: 320189 URL: https://svnweb.freebsd.org/changeset/base/320189 Log: Allow the VM fault handler to be NULL in the LinuxKPI when handling a memory map request. When the VM fault handler is NULL a return code of VM_PAGER_BAD is returned from the character device's pager populate handler. This fixes compatibility with Linux. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 21 14:36:25 2017 (r320188) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 21 14:38:52 2017 (r320189) @@ -497,7 +497,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pinde VM_OBJECT_WUNLOCK(vm_obj); down_write(&vmap->vm_mm->mmap_sem); - if (unlikely(vmap->vm_ops == NULL)) { + if (unlikely(vmap->vm_ops == NULL || vmap->vm_ops->fault == NULL)) { err = VM_FAULT_SIGBUS; } else { vmap->vm_pfn_count = 0; @@ -1173,8 +1173,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * if (vmap->vm_ops != NULL) { void *vm_private_data; - if (vmap->vm_ops->fault == NULL || - vmap->vm_ops->open == NULL || + if (vmap->vm_ops->open == NULL || vmap->vm_ops->close == NULL || vmap->vm_private_data == NULL) { linux_cdev_handle_free(vmap); From owner-svn-src-all@freebsd.org Wed Jun 21 14:39:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5B0D9108B; Wed, 21 Jun 2017 14:39: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 3B91C6F371; Wed, 21 Jun 2017 14:39:32 +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 v5LEdVdb070592; Wed, 21 Jun 2017 14:39:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LEdVYq070591; Wed, 21 Jun 2017 14:39:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706211439.v5LEdVYq070591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Jun 2017 14:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320190 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:39:32 -0000 Author: jhb Date: Wed Jun 21 14:39:31 2017 New Revision: 320190 URL: https://svnweb.freebsd.org/changeset/base/320190 Log: MFC 313186, 319702: Account for overhead of page structures when sizing page array. 313186: Over the years, the code and comments in vm_page_startup() have diverged in one respect. When determining how many page structures to allocate, contrary to what the comments say, the code does not account for the overhead of a page structure per page of physical memory. This revision changes the code to match the comments. 319702: Fix an off-by-one error in the VM page array on some systems. r313186 changed how the size of the VM page array was calculated to be less wasteful. For most systems, the amount of memory is divided by the overhead required by each page (a page of data plus a struct vm_page) to determine the maximum number of available pages. However, if the remainder for the first non-available page was at least a page of data (so that the only memory missing was a struct vm_page), this last page was left in phys_avail[] but was not allocated an entry in the VM page array. Handle this case by explicitly excluding the page from phys_avail[]. Requested by: alc Modified: stable/10/sys/vm/vm_page.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Wed Jun 21 14:38:52 2017 (r320189) +++ stable/10/sys/vm/vm_page.c Wed Jun 21 14:39:31 2017 (r320190) @@ -275,17 +275,16 @@ vm_page_domain_init(struct vm_domain *vmd) /* * vm_page_startup: * - * Initializes the resident memory module. - * - * Allocates memory for the page cells, and - * for the object/offset-to-page hash table headers. - * Each page cell is initialized and placed on the free list. + * Initializes the resident memory module. Allocates physical memory for + * bootstrapping UMA and some data structures that are used to manage + * physical pages. Initializes these structures, and populates the free + * page queues. */ vm_offset_t vm_page_startup(vm_offset_t vaddr) { vm_offset_t mapped; - vm_paddr_t page_range; + vm_paddr_t high_avail, low_avail, page_range, size; vm_paddr_t new_end; int i; vm_paddr_t pa; @@ -295,7 +294,6 @@ vm_page_startup(vm_offset_t vaddr) /* the biggest memory array is the second group of pages */ vm_paddr_t end; vm_paddr_t biggestsize; - vm_paddr_t low_water, high_water; int biggestone; biggestsize = 0; @@ -315,26 +313,12 @@ vm_page_startup(vm_offset_t vaddr) vm_phys_add_seg(0, phys_avail[0]); #endif - low_water = phys_avail[0]; - high_water = phys_avail[1]; - - for (i = 0; i < vm_phys_nsegs; i++) { - if (vm_phys_segs[i].start < low_water) - low_water = vm_phys_segs[i].start; - if (vm_phys_segs[i].end > high_water) - high_water = vm_phys_segs[i].end; - } for (i = 0; phys_avail[i + 1]; i += 2) { - vm_paddr_t size = phys_avail[i + 1] - phys_avail[i]; - + size = phys_avail[i + 1] - phys_avail[i]; if (size > biggestsize) { biggestone = i; biggestsize = size; } - if (phys_avail[i] < low_water) - low_water = phys_avail[i]; - if (phys_avail[i + 1] > high_water) - high_water = phys_avail[i + 1]; } end = phys_avail[biggestone+1]; @@ -383,6 +367,16 @@ vm_page_startup(vm_offset_t vaddr) new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); #endif +#if defined(__amd64__) || defined(__mips__) + /* + * Include the UMA bootstrap pages and vm_page_dump in a crash dump. + * When pmap_map() uses the direct map, they are not automatically + * included. + */ + for (pa = new_end; pa < end; pa += PAGE_SIZE) + dump_add_page(pa); +#endif + phys_avail[biggestone + 1] = new_end; #ifdef __amd64__ /* * Request that the physical pages underlying the message buffer be @@ -398,33 +392,80 @@ vm_page_startup(vm_offset_t vaddr) #endif /* * Compute the number of pages of memory that will be available for - * use (taking into account the overhead of a page structure per - * page). + * use, taking into account the overhead of a page structure per page. + * In other words, solve + * "available physical memory" - round_page(page_range * + * sizeof(struct vm_page)) = page_range * PAGE_SIZE + * for page_range. */ - first_page = low_water / PAGE_SIZE; -#ifdef VM_PHYSSEG_SPARSE - page_range = 0; + low_avail = phys_avail[0]; + high_avail = phys_avail[1]; for (i = 0; i < vm_phys_nsegs; i++) { - page_range += atop(vm_phys_segs[i].end - - vm_phys_segs[i].start); + if (vm_phys_segs[i].start < low_avail) + low_avail = vm_phys_segs[i].start; + if (vm_phys_segs[i].end > high_avail) + high_avail = vm_phys_segs[i].end; } + /* Skip the first chunk. It is already accounted for. */ + for (i = 2; phys_avail[i + 1] != 0; i += 2) { + if (phys_avail[i] < low_avail) + low_avail = phys_avail[i]; + if (phys_avail[i + 1] > high_avail) + high_avail = phys_avail[i + 1]; + } + first_page = low_avail / PAGE_SIZE; +#ifdef VM_PHYSSEG_SPARSE + size = 0; + for (i = 0; i < vm_phys_nsegs; i++) + size += vm_phys_segs[i].end - vm_phys_segs[i].start; for (i = 0; phys_avail[i + 1] != 0; i += 2) - page_range += atop(phys_avail[i + 1] - phys_avail[i]); + size += phys_avail[i + 1] - phys_avail[i]; #elif defined(VM_PHYSSEG_DENSE) - page_range = high_water / PAGE_SIZE - first_page; + size = high_avail - low_avail; #else #error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." #endif + +#ifdef VM_PHYSSEG_DENSE + /* + * In the VM_PHYSSEG_DENSE case, the number of pages can account for + * the overhead of a page structure per page only if vm_page_array is + * allocated from the last physical memory chunk. Otherwise, we must + * allocate page structures representing the physical memory + * underlying vm_page_array, even though they will not be used. + */ + if (new_end != high_avail) + page_range = size / PAGE_SIZE; + else +#endif + { + page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); + + /* + * If the partial bytes remaining are large enough for + * a page (PAGE_SIZE) without a corresponding + * 'struct vm_page', then new_end will contain an + * extra page after subtracting the length of the VM + * page array. Compensate by subtracting an extra + * page from new_end. + */ + if (size % (PAGE_SIZE + sizeof(struct vm_page)) >= PAGE_SIZE) { + if (new_end == high_avail) + high_avail -= PAGE_SIZE; + new_end -= PAGE_SIZE; + } + } end = new_end; /* * Reserve an unmapped guard page to trap access to vm_page_array[-1]. + * However, because this page is allocated from KVM, out-of-bounds + * accesses using the direct map will not be trapped. */ vaddr += PAGE_SIZE; /* - * Initialize the mem entry structures now, and put them in the free - * queue. + * Allocate physical memory for the page structures, and map it. */ new_end = trunc_page(end - page_range * sizeof(struct vm_page)); mapped = pmap_map(&vaddr, new_end, end, @@ -432,19 +473,18 @@ vm_page_startup(vm_offset_t vaddr) vm_page_array = (vm_page_t) mapped; #if VM_NRESERVLEVEL > 0 /* - * Allocate memory for the reservation management system's data - * structures. + * Allocate physical memory for the reservation management system's + * data structures, and map it. */ - new_end = vm_reserv_startup(&vaddr, new_end, high_water); + if (high_avail == end) + high_avail = new_end; + new_end = vm_reserv_startup(&vaddr, new_end, high_avail); #endif #if defined(__amd64__) || defined(__mips__) /* - * pmap_map on amd64 and mips can come out of the direct-map, not kvm - * like i386, so the pages must be tracked for a crashdump to include - * this data. This includes the vm_page_array and the early UMA - * bootstrap pages. + * Include vm_page_array and vm_reserv_array in a crash dump. */ - for (pa = new_end; pa < phys_avail[biggestone + 1]; pa += PAGE_SIZE) + for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); #endif phys_avail[biggestone + 1] = new_end; From owner-svn-src-all@freebsd.org Wed Jun 21 16:00:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 148E7D92BEA; Wed, 21 Jun 2017 16:00:54 +0000 (UTC) (envelope-from danfe@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 DBA2071D61; Wed, 21 Jun 2017 16:00:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 7BEEB3113; Wed, 21 Jun 2017 16:00:51 +0000 (UTC) Date: Wed, 21 Jun 2017 16:00:51 +0000 From: Alexey Dokuchaev To: Alan Somers Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r320172 - head/bin/ln Message-ID: <20170621160051.GB36934@FreeBSD.org> References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> <20170621133732.GA44693@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 16:00:54 -0000 On Wed, Jun 21, 2017 at 08:31:10AM -0600, Alan Somers wrote: > On Wed, Jun 21, 2017 at 7:37 AM, Alexey Dokuchaev wrote: > > On Tue, Jun 20, 2017 at 08:46:08PM +0000, Ngie Cooper wrote: > >> New Revision: 320172 > >> URL: https://svnweb.freebsd.org/changeset/base/320172 > >> > >> Log: > >> ln(1): fix -F behavior > >> > >> When '-F' option is used, the target directory needs to be unlinked. > >> Currently, the modified target ("target/source") is being unlinked, > >> and since it doesn't yet exist, the original target isn't removed. > >> This is fixed by skipping the block where target is modified to > >> "target/source" when '-F' option is set. > >> Hence, a symbolic link (with the same name as of the original target) > >> to the source_file is produced. > > > > Is this about the same problem I've asked on -hackers@ back in 2015 > > (and never got any answer)? > > > > https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046939.html > > Yep, shivansh rediscovered the same problem. Sorry nobody noticed > your original post. Yeah, I vaguely recall someone mentioned that -hackers@ is not the best place to talk about technical problems these days. :-( Do we have a -hackers-who-care@ ML now, when -arch@ would be too gross yet lack of immediate patch would prevent one from opening a PR? ./danfe From owner-svn-src-all@freebsd.org Wed Jun 21 17:11:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 722F3D941FF; Wed, 21 Jun 2017 17:11:51 +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 3DAE9744F5; Wed, 21 Jun 2017 17:11:51 +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 v5LHBoLw034065; Wed, 21 Jun 2017 17:11:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LHBoPY034064; Wed, 21 Jun 2017 17:11:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706211711.v5LHBoPY034064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 17:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320191 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 17:11:51 -0000 Author: bdrewery Date: Wed Jun 21 17:11:49 2017 New Revision: 320191 URL: https://svnweb.freebsd.org/changeset/base/320191 Log: objwarn should be .PHONY. Otherwise in META_MODE it may create an objwarn.meta if only bsd.obj.mk is included; bsd.sys.mk already had .PHONY: objwarn. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Wed Jun 21 14:39:31 2017 (r320190) +++ head/share/mk/bsd.obj.mk Wed Jun 21 17:11:49 2017 (r320191) @@ -102,7 +102,7 @@ OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} # case 2 (using MAKEOBJDIR), don't issue a warning. Otherwise, # issue a warning differentiating between cases 6 and (3 or 4). # -objwarn: +objwarn: .PHONY .if !defined(NO_OBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} && \ !(defined(MAKEOBJDIRPREFIX) && exists(${CANONICALOBJDIR}/)) && \ !(defined(MAKEOBJDIR) && exists(${MAKEOBJDIR}/)) From owner-svn-src-all@freebsd.org Wed Jun 21 17:13:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C691BD94286; Wed, 21 Jun 2017 17:13:01 +0000 (UTC) (envelope-from bdrewery@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 986CC747A7; Wed, 21 Jun 2017 17:13:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id C8CE74296; Wed, 21 Jun 2017 17:13:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 8C58E9FA5; Wed, 21 Jun 2017 17:12:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id P5XIZTn6AqDT; Wed, 21 Jun 2017 17:12:55 +0000 (UTC) Subject: Re: svn commit: r320172 - head/bin/ln DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7CE589F9E To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 21 Jun 2017 10:12:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706202046.v5KKk8Zd034737@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LAipFnno8Ts6IOFjUtMBxLwL5lb3nMHoi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 17:13:01 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LAipFnno8Ts6IOFjUtMBxLwL5lb3nMHoi Content-Type: multipart/mixed; boundary="9RK4UkFFQMcbKO84gGXESwA0mt0md2W32"; protected-headers="v1" From: Bryan Drewery To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r320172 - head/bin/ln References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> In-Reply-To: <201706202046.v5KKk8Zd034737@repo.freebsd.org> --9RK4UkFFQMcbKO84gGXESwA0mt0md2W32 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/20/2017 1:46 PM, Ngie Cooper wrote: > Author: ngie > Date: Tue Jun 20 20:46:08 2017 > New Revision: 320172 > URL: https://svnweb.freebsd.org/changeset/base/320172 >=20 > Log: > ln(1): fix -F behavior > =20 > When '-F' option is used, the target directory needs to be unlinked. > Currently, the modified target ("target/source") is being unlinked, a= nd > since it doesn't yet exist, the original target isn't removed. > This is fixed by skipping the block where target is modified to > "target/source" when '-F' option is set. > Hence, a symbolic link (with the same name as of the original target)= to > the source_file is produced. > =20 =3D=3D=3D=3D=3D> Update the test for ln(1) to reflect fix for option '-= F' I don't see a test update here. > =20 > MFC after: 1 month > PR: 219943 > Differential Revision: D11167 > Submitted by: shivansh > Sponsored by: Google (GSoC 2017) >=20 > Modified: > head/bin/ln/ln.c >=20 > Modified: head/bin/ln/ln.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/bin/ln/ln.c Tue Jun 20 20:34:30 2017 (r320171) > +++ head/bin/ln/ln.c Tue Jun 20 20:46:08 2017 (r320172) > @@ -245,11 +245,11 @@ linkit(const char *source, const char *target, in= t isd > =20 > /* > * If the target is a directory (and not a symlink if hflag), > - * append the source's name. > + * append the source's name, unless Fflag is set. > */ > - if (isdir || > + if (!Fflag && (isdir || > (lstat(target, &sb) =3D=3D 0 && S_ISDIR(sb.st_mode)) || > - (!hflag && stat(target, &sb) =3D=3D 0 && S_ISDIR(sb.st_mode))) { > + (!hflag && stat(target, &sb) =3D=3D 0 && S_ISDIR(sb.st_mode)))) {= > if (strlcpy(bbuf, source, sizeof(bbuf)) >=3D sizeof(bbuf) || > (p =3D basename(bbuf)) =3D=3D NULL || > snprintf(path, sizeof(path), "%s/%s", target, p) >=3D >=20 --=20 Regards, Bryan Drewery --9RK4UkFFQMcbKO84gGXESwA0mt0md2W32-- --LAipFnno8Ts6IOFjUtMBxLwL5lb3nMHoi 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 iQEcBAEBAgAGBQJZSqkWAAoJEDXXcbtuRpfPhmkH/jYM9VQ3HI+OiqanK95VhwJG ybqky+T18ANmewb2WJdaEoznDHb95mryvVtWl+0EgIPb6ohsFcF+IsTXpYVErRjg TvKkJQ7Oc3t26g5gmxnOO3AELTf5Cp7zrhaEa/TqIaiRe3+oS3xhUB0ZsMBN5YoD 4ty0GD5cX7zU5b1HwlC46MkfV88gf+hjWwFF+UHvfQ86Nz8Aw+9n+AG+BGDbllpr neMEjSEom0NcRoL6qiL9ozksJjfJYC0U2ujRK1eVM1+VdXLtHJ+I4kL7OPpWwGa6 9lT2qq50gOWUkBpe+gzE4G+3v+U9sxZDuH4PwO75wpzN29MjZROpmmLVHPMllkM= =/Efy -----END PGP SIGNATURE----- --LAipFnno8Ts6IOFjUtMBxLwL5lb3nMHoi-- From owner-svn-src-all@freebsd.org Wed Jun 21 17:59:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0221AD951EA; Wed, 21 Jun 2017 17:59:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::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 B10C776379; Wed, 21 Jun 2017 17:59:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x236.google.com with SMTP id f92so24482997qtb.2; Wed, 21 Jun 2017 10:59:34 -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=bpFphgRXxBT1vTz3fzztVP6d6dZTPQqH4W+vc6RITEE=; b=eZCkiNEzv/XuLQZtyfcEJ+ph2u7YlViCIPi/ez1wvNX+ofNN62cTGzTW20tQrVGtXM 43HiBjxquhxy4tZc2/84OmzhIwmEnnZgbAXIlyD8PCLMvcGisv4XUE3q4RWWbzJYQfck 2jQozeH380MJ3ENmvAY0QfRKe3cOTSCOVu29hscFALUVcvzNEoPg6IofLVA8lTzzhGmQ R2DkHlA24zcBbOY4T402ZY6LcBz50h6Yfv3Co6Fr+Fdx3nbDPKAChDO7otLm1OLQ6591 s1aU097dxMuAdnqSHnPNdN/nA8OY1aPsDb3WuG1ndgMSl/mRsTeQ8qcACpfVZ274dDjZ 1Kww== 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=bpFphgRXxBT1vTz3fzztVP6d6dZTPQqH4W+vc6RITEE=; b=JiHXVxf9FU+xWd9Fxdg+kukuVOwAsptse2N2cn0SBMis2+5JOX8BA8rTJM4cA9NQjB 9Bgf/pDVtC7EZKWEO3wITpl5xArjsyIw8IIZb3suT2u0iw8Gu0LvW6h8aeX1V2KAWiav ji++owesT2MXx96vT7LZ/NAcRebYRoDUXCk56OS2x4lv39a4ouxhLVCOM1X4ycSpa/BL Yy2VosNcMHiDELMHpzGq6iMwSI4ejwBOOC22sZ9WqWBwhSe7dM5D+5fmR4OQ70WX+2d/ 8HJtIgC7IcOfVGbfcIj89bH8FFlOqbvDJHFcLCE0dwNB0fLC6hvzupGaknJly+paCcCt Nxgg== X-Gm-Message-State: AKS2vOxmzGzEKnuBEKmI/uxFVH2/McrOv+s9gUEBIdZQemiH79M3jwZ4 vOvnX9l3EhgsSjOSxR1ftGApcdudOGpK X-Received: by 10.237.39.68 with SMTP id n62mr40993539qtd.136.1498067973682; Wed, 21 Jun 2017 10:59:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.92.214 with HTTP; Wed, 21 Jun 2017 10:59:33 -0700 (PDT) In-Reply-To: References: <201706202046.v5KKk8Zd034737@repo.freebsd.org> From: Ngie Cooper Date: Wed, 21 Jun 2017 10:59:33 -0700 Message-ID: Subject: Re: svn commit: r320172 - head/bin/ln To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 17:59:35 -0000 On Wed, Jun 21, 2017 at 10:12 AM, Bryan Drewery wrote: ... > I don't see a test update here. Sorry :/.. I blindly copy-pasted the CR text. r320173 has the test update. Thanks! -Ngie From owner-svn-src-all@freebsd.org Wed Jun 21 18:08:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46110D954E3; Wed, 21 Jun 2017 18:08: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 166AA76A22; Wed, 21 Jun 2017 18:08: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 v5LI8ani057556; Wed, 21 Jun 2017 18:08:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LI8aEa057555; Wed, 21 Jun 2017 18:08:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706211808.v5LI8aEa057555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 21 Jun 2017 18:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320192 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:08:37 -0000 Author: markj Date: Wed Jun 21 18:08:36 2017 New Revision: 320192 URL: https://svnweb.freebsd.org/changeset/base/320192 Log: Add a lockdep macro to the LinuxKPI. Also fix some nearby style issues. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/lockdep.h Wed Jun 21 17:11:49 2017 (r320191) +++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h Wed Jun 21 18:08:36 2017 (r320192) @@ -28,14 +28,18 @@ * * $FreeBSD$ */ -#ifndef _LINUX_LOCKDEP_H_ + +#ifndef _LINUX_LOCKDEP_H_ #define _LINUX_LOCKDEP_H_ struct lock_class_key { }; -#define lockdep_set_class(lock, key) +#define lockdep_set_class(lock, key) -#define lockdep_set_class_and_name(lock, key, name) +#define lockdep_set_class_and_name(lock, key, name) -#endif /* _LINUX_LOCKDEP_H_ */ +#define lockdep_assert_held_once(m) \ + sx_assert(&(m)->sx, SA_XLOCKED | SA_NOTRECURSED) + +#endif /* _LINUX_LOCKDEP_H_ */ From owner-svn-src-all@freebsd.org Wed Jun 21 18:15:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 010C1D95865; Wed, 21 Jun 2017 18:15:49 +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 C3E927707B; Wed, 21 Jun 2017 18:15:48 +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 v5LIFlj5061472; Wed, 21 Jun 2017 18:15:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIFlu9061471; Wed, 21 Jun 2017 18:15:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706211815.v5LIFlu9061471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 21 Jun 2017 18:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320193 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:15:49 -0000 Author: markj Date: Wed Jun 21 18:15:47 2017 New Revision: 320193 URL: https://svnweb.freebsd.org/changeset/base/320193 Log: Include kmod.h from the LinuxKPI's module.h. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/module.h Modified: head/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/module.h Wed Jun 21 18:08:36 2017 (r320192) +++ head/sys/compat/linuxkpi/common/include/linux/module.h Wed Jun 21 18:15:47 2017 (r320193) @@ -37,6 +37,7 @@ #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Wed Jun 21 18:17:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF8C6D958D8; Wed, 21 Jun 2017 18:17:33 +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 9E2CA771E0; Wed, 21 Jun 2017 18:17:33 +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 v5LIHW49061580; Wed, 21 Jun 2017 18:17:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIHWPV061579; Wed, 21 Jun 2017 18:17:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706211817.v5LIHWPV061579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 21 Jun 2017 18:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320194 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:17:33 -0000 Author: markj Date: Wed Jun 21 18:17:32 2017 New Revision: 320194 URL: https://svnweb.freebsd.org/changeset/base/320194 Log: Add missing lock destructor invocations to the LinuxKPI unload handler. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 21 18:15:47 2017 (r320193) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 21 18:17:32 2017 (r320194) @@ -2026,6 +2026,8 @@ linux_compat_uninit(void *arg) linux_kobject_kfree_name(&linux_root_device.kobj); linux_kobject_kfree_name(&linux_class_misc.kobj); + mtx_destroy(&vmmaplock); + spin_lock_destroy(&pci_lock); rw_destroy(&linux_vma_lock); } SYSUNINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_uninit, NULL); From owner-svn-src-all@freebsd.org Wed Jun 21 18:19:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8F21D95954; Wed, 21 Jun 2017 18:19:28 +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 999CC77353; Wed, 21 Jun 2017 18:19:28 +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 v5LIJRC3061685; Wed, 21 Jun 2017 18:19:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIJR2u061684; Wed, 21 Jun 2017 18:19:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706211819.v5LIJR2u061684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Jun 2017 18:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320195 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:19:28 -0000 Author: avg Date: Wed Jun 21 18:19:27 2017 New Revision: 320195 URL: https://svnweb.freebsd.org/changeset/base/320195 Log: bhyveload: correctly query size of disks On FreeBSD fstat(2) works fine for querying sizes of plain files, but not so much for character devices. So, use DIOCGMEDIASIZE to try to get the correct size for disks and disk-like devices (e.g. zvols). PR: 220186 Reviewed by: tsoome, grehan MFC after: 1 week Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Jun 21 18:17:32 2017 (r320194) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Jun 21 18:19:27 2017 (r320195) @@ -311,10 +311,12 @@ cb_diskioctl(void *arg, int unit, u_long cmd, void *da *(u_int *)data = 512; break; case DIOCGMEDIASIZE: - if (fstat(disk_fd[unit], &sb) == 0) - *(off_t *)data = sb.st_size; - else + if (fstat(disk_fd[unit], &sb) != 0) return (ENOTTY); + if (S_ISCHR(sb.st_mode) && + ioctl(disk_fd[unit], DIOCGMEDIASIZE, &sb.st_size) != 0) + return (ENOTTY); + *(off_t *)data = sb.st_size; break; default: return (ENOTTY); From owner-svn-src-all@freebsd.org Wed Jun 21 18:20:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D2DD959DE; Wed, 21 Jun 2017 18:20:19 +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 0E88F77501; Wed, 21 Jun 2017 18:20:18 +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 v5LIKIFj061800; Wed, 21 Jun 2017 18:20:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIKHo5061797; Wed, 21 Jun 2017 18:20:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706211820.v5LIKHo5061797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 21 Jun 2017 18:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320196 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core dev/mlx5/mlx5_core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:20:19 -0000 Author: markj Date: Wed Jun 21 18:20:17 2017 New Revision: 320196 URL: https://svnweb.freebsd.org/changeset/base/320196 Log: Update io-mapping.h in the LinuxKPI. Add io_mapping_init_wc() and add a third (unused) parameter to io_mapping_map_wc(). Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11286 Modified: head/sys/compat/linuxkpi/common/include/linux/io-mapping.h head/sys/dev/mlx4/mlx4_core/mlx4_pd.c head/sys/dev/mlx5/mlx5_core/mlx5_uar.c Modified: head/sys/compat/linuxkpi/common/include/linux/io-mapping.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io-mapping.h Wed Jun 21 18:19:27 2017 (r320195) +++ head/sys/compat/linuxkpi/common/include/linux/io-mapping.h Wed Jun 21 18:20:17 2017 (r320196) @@ -28,52 +28,85 @@ * * $FreeBSD$ */ -#ifndef _LINUX_IO_MAPPING_H_ + +#ifndef _LINUX_IO_MAPPING_H_ #define _LINUX_IO_MAPPING_H_ +#include +#include + #include #include +#include -struct io_mapping; +struct io_mapping { + unsigned long base; + unsigned long size; + void *mem; + vm_memattr_t attr; +}; static inline struct io_mapping * +io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base, + unsigned long size) +{ + + mapping->base = base; + mapping->size = size; + mapping->mem = ioremap_wc(base, size); + mapping->attr = VM_MEMATTR_WRITE_COMBINING; + return (mapping); +} + +static inline struct io_mapping * io_mapping_create_wc(resource_size_t base, unsigned long size) { + struct io_mapping *mapping; - return ioremap_wc(base, size); + mapping = kmalloc(sizeof(*mapping), GFP_KERNEL); + if (mapping == NULL) + return (NULL); + return (io_mapping_init_wc(mapping, base, size)); } static inline void +io_mapping_fini(struct io_mapping *mapping) +{ + + iounmap(mapping->mem); +} + +static inline void io_mapping_free(struct io_mapping *mapping) { - iounmap(mapping); + io_mapping_fini(mapping->mem); + kfree(mapping); } static inline void * io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) { - return (((char *)mapping) + offset); + return ((char *)mapping->mem + offset); } static inline void io_mapping_unmap_atomic(void *vaddr) { - } static inline void * -io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) +io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset, + unsigned long size) { - return (((char *) mapping) + offset); + return ((char *)mapping->mem + offset); } static inline void io_mapping_unmap(void *vaddr) { - } -#endif /* _LINUX_IO_MAPPING_H_ */ +#endif /* _LINUX_IO_MAPPING_H_ */ Modified: head/sys/dev/mlx4/mlx4_core/mlx4_pd.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_pd.c Wed Jun 21 18:19:27 2017 (r320195) +++ head/sys/dev/mlx4/mlx4_core/mlx4_pd.c Wed Jun 21 18:20:17 2017 (r320196) @@ -204,7 +204,7 @@ int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf goto free_uar; } - uar->bf_map = io_mapping_map_wc(priv->bf_mapping, uar->index << PAGE_SHIFT); + uar->bf_map = io_mapping_map_wc(priv->bf_mapping, uar->index << PAGE_SHIFT, PAGE_SIZE); if (!uar->bf_map) { err = -ENOMEM; goto unamp_uar; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_uar.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_uar.c Wed Jun 21 18:19:27 2017 (r320195) +++ head/sys/dev/mlx5/mlx5_core/mlx5_uar.c Wed Jun 21 18:20:17 2017 (r320196) @@ -189,7 +189,8 @@ int mlx5_alloc_map_uar(struct mlx5_core_dev *mdev, str if (mdev->priv.bf_mapping) uar->bf_map = io_mapping_map_wc(mdev->priv.bf_mapping, - uar->index << PAGE_SHIFT); + uar->index << PAGE_SHIFT, + PAGE_SIZE); return 0; From owner-svn-src-all@freebsd.org Wed Jun 21 18:23:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F644D95B82; Wed, 21 Jun 2017 18:23:29 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 456C6778E9; Wed, 21 Jun 2017 18:23:29 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LINSH0065648; Wed, 21 Jun 2017 18:23:28 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LINScf065647; Wed, 21 Jun 2017 18:23:28 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706211823.v5LINScf065647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 21 Jun 2017 18:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320197 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:23:29 -0000 Author: zbb Date: Wed Jun 21 18:23:28 2017 New Revision: 320197 URL: https://svnweb.freebsd.org/changeset/base/320197 Log: Introduce support for DMA coherent ARM platforms - Inherit BUS_DMA_COHERENT flag from parent buses - Use cacheable memory attributes on dma coherent platform - Disable cache synchronization on coherent platform Changes are based on ARMv8 busdma code and commit r299683. Submitted by: Michal Mazur Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: ian Differential revision: https://reviews.freebsd.org/D11201 Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Wed Jun 21 18:20:17 2017 (r320196) +++ head/sys/arm/arm/busdma_machdep-v6.c Wed Jun 21 18:23:28 2017 (r320197) @@ -491,6 +491,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); newtag->alignment = MAX(parent->alignment, newtag->alignment); newtag->flags |= parent->flags & BUS_DMA_COULD_BOUNCE; + newtag->flags |= parent->flags & BUS_DMA_COHERENT; if (newtag->boundary == 0) newtag->boundary = parent->boundary; else if (parent->boundary != 0) @@ -755,11 +756,19 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int } map->flags = DMAMAP_DMAMEM_ALLOC; - /* Choose a busdma buffer allocator based on memory type flags. */ - if (flags & BUS_DMA_COHERENT) { + /* For coherent memory, set the map flag that disables sync ops. */ + if (flags & BUS_DMA_COHERENT) + map->flags |= DMAMAP_COHERENT; + + /* + * Choose a busdma buffer allocator based on memory type flags. + * If the tag's COHERENT flag is set, that means normal memory + * is already coherent, use the normal allocator. + */ + if ((flags & BUS_DMA_COHERENT) && + ((dmat->flags & BUS_DMA_COHERENT) == 0)) { memattr = VM_MEMATTR_UNCACHEABLE; ba = coherent_allocator; - map->flags |= DMAMAP_COHERENT; } else { memattr = VM_MEMATTR_DEFAULT; ba = standard_allocator; @@ -829,7 +838,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_d struct busdma_bufzone *bufzone; busdma_bufalloc_t ba; - if (map->flags & DMAMAP_COHERENT) + if ((map->flags & DMAMAP_COHERENT) && + ((dmat->flags & BUS_DMA_COHERENT) == 0)) ba = coherent_allocator; else ba = standard_allocator; @@ -1030,7 +1040,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); - } else { + } else if ((dmat->flags & BUS_DMA_COHERENT) == 0) { if (map->sync_count > 0) sl_end = sl->paddr + sl->datacount; @@ -1144,7 +1154,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap sgsize)) { curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); - } else { + } else if ((dmat->flags & BUS_DMA_COHERENT) == 0) { if (map->sync_count > 0) { sl_pend = sl->paddr + sl->datacount; sl_vend = sl->vaddr + sl->datacount; @@ -1353,8 +1363,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bpage->datacount); if (tempvaddr != 0) pmap_quick_remove_page(tempvaddr); - dcache_wb_poc(bpage->vaddr, bpage->busaddr, - bpage->datacount); + if ((dmat->flags & BUS_DMA_COHERENT) == 0) + dcache_wb_poc(bpage->vaddr, + bpage->busaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } dmat->bounce_zone->total_bounced++; @@ -1374,8 +1385,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { - dcache_inv_poc_dma(bpage->vaddr, bpage->busaddr, - bpage->datacount); + if ((dmat->flags & BUS_DMA_COHERENT) == 0) + dcache_inv_poc_dma(bpage->vaddr, + bpage->busaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } } @@ -1391,8 +1403,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, */ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { - dcache_inv_poc(bpage->vaddr, bpage->busaddr, - bpage->datacount); + if ((dmat->flags & BUS_DMA_COHERENT) == 0) + dcache_inv_poc(bpage->vaddr, + bpage->busaddr, bpage->datacount); tempvaddr = 0; datavaddr = bpage->datavaddr; if (datavaddr == 0) { @@ -1421,7 +1434,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, if (map->flags & DMAMAP_COHERENT) { if (op & BUS_DMASYNC_PREWRITE) { dsb(); - cpu_l2cache_drain_writebuf(); + if ((dmat->flags & BUS_DMA_COHERENT) == 0) + cpu_l2cache_drain_writebuf(); } return; } From owner-svn-src-all@freebsd.org Wed Jun 21 18:25:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A89CD95C03; Wed, 21 Jun 2017 18:25:36 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54DA777A64; Wed, 21 Jun 2017 18:25:36 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LIPZU0065773; Wed, 21 Jun 2017 18:25:35 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIPZXQ065771; Wed, 21 Jun 2017 18:25:35 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706211825.v5LIPZXQ065771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 21 Jun 2017 18:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320198 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:25:36 -0000 Author: zbb Date: Wed Jun 21 18:25:35 2017 New Revision: 320198 URL: https://svnweb.freebsd.org/changeset/base/320198 Log: Enable setting the dma tag at the nexus level Allow to set the dma tag for nexus in the platform init code, so that all busses and devices would be able to inherit it. This change is useful e.g. for setting coherent dma tag for the platforms with hardware IO cache coherency. Submitted by: ian Michal Mazur Reviewed by: ian Differential revision: https://reviews.freebsd.org/D11202 Added: head/sys/arm/arm/nexusvar.h (contents, props changed) Modified: head/sys/arm/arm/nexus.c Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Wed Jun 21 18:23:28 2017 (r320197) +++ head/sys/arm/arm/nexus.c Wed Jun 21 18:25:35 2017 (r320198) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifdef FDT #include #include @@ -87,6 +89,7 @@ static struct resource *nexus_alloc_resource(device_t, static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); +static bus_dma_tag_t nexus_get_dma_tag(device_t dev, device_t child); #ifdef INTRNG #ifdef SMP static int nexus_bind_intr(device_t, device_t, struct resource *, int); @@ -112,6 +115,13 @@ static int nexus_ofw_map_intr(device_t dev, device_t c int icells, pcell_t *intr); #endif +/* + * Normally NULL (which results in defaults which are handled in + * busdma_machdep), platform init code can use nexus_set_dma_tag() to set this + * to a tag that will be inherited by all busses and devices on the platform. + */ +static bus_dma_tag_t nexus_dma_tag; + static device_method_t nexus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, nexus_probe), @@ -127,6 +137,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), + DEVMETHOD(bus_get_dma_tag, nexus_get_dma_tag), #ifdef INTRNG DEVMETHOD(bus_describe_intr, nexus_describe_intr), #ifdef SMP @@ -273,6 +284,20 @@ nexus_get_bus_tag(device_t bus __unused, device_t chil #else return((void *)1); #endif +} + +static bus_dma_tag_t +nexus_get_dma_tag(device_t dev, device_t child) +{ + + return nexus_dma_tag; +} + +void +nexus_set_dma_tag(bus_dma_tag_t tag) +{ + + nexus_dma_tag = tag; } static int Added: head/sys/arm/arm/nexusvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/nexusvar.h Wed Jun 21 18:25:35 2017 (r320198) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ARM_ARM_NEXUSVAR_H_ +#define _ARM_ARM_NEXUSVAR_H_ + +/* Set a platform busdma tag to be inherited by all busses and devices. */ +void nexus_set_dma_tag(bus_dma_tag_t _tag); + +#endif + From owner-svn-src-all@freebsd.org Wed Jun 21 18:27:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64B36D95C79; Wed, 21 Jun 2017 18:27:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BC3877BCA; Wed, 21 Jun 2017 18:27:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LIR5SY065870; Wed, 21 Jun 2017 18:27:05 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIR5vg065868; Wed, 21 Jun 2017 18:27:05 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706211827.v5LIR5vg065868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 21 Jun 2017 18:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320199 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:27:06 -0000 Author: zbb Date: Wed Jun 21 18:27:05 2017 New Revision: 320199 URL: https://svnweb.freebsd.org/changeset/base/320199 Log: Create root DMA tag and fix MBUS windows on DMA coherent platforms Armada 38x SoCs, in order to work properly in IO-coherent mode, requires an update of the MBUS windows attributesd. This patch also configures nexus coherent dma tag, because all busses and children devices have to inherit this setting in runtime. The latter has to be executed as a sysinit (SI_SUB_DRIVERS type), so that bus_dma_tag_create() can be executed properly. Submitted by: Michal Mazur Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: ian Differential revision: https://reviews.freebsd.org/D11203 Modified: head/sys/arm/mv/mv_common.c head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Wed Jun 21 18:25:35 2017 (r320198) +++ head/sys/arm/mv/mv_common.c Wed Jun 21 18:27:05 2017 (r320199) @@ -128,6 +128,7 @@ static uint32_t dev_mask = 0; static int cpu_wins_no = 0; static int eth_port = 0; static int usb_port = 0; +static boolean_t platform_io_coherent = false; static struct decode_win cpu_win_tbl[MAX_CPU_WIN]; @@ -1064,7 +1065,7 @@ ddr_size(int i) uint32_t ddr_attr(int i) { - uint32_t dev, rev; + uint32_t dev, rev, attr; soc_id(&dev, &rev); if (dev == MV_DEV_88RC8180) @@ -1072,10 +1073,14 @@ ddr_attr(int i) if (dev == MV_DEV_88F6781) return (0); - return (i == 0 ? 0xe : + attr = (i == 0 ? 0xe : (i == 1 ? 0xd : (i == 2 ? 0xb : (i == 3 ? 0x7 : 0xff)))); + if (platform_io_coherent) + attr |= 0x10; + + return (attr); } uint32_t @@ -2478,6 +2483,10 @@ fdt_win_setup(void) node = OF_finddevice("/"); if (node == -1) panic("fdt_win_setup: no root node"); + + /* Allow for coherent transactions on the A38x MBUS */ + if (ofw_bus_node_is_compatible(node, "marvell,armada380")) + platform_io_coherent = true; /* * Traverse through all children of root and simple-bus nodes. Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Wed Jun 21 18:25:35 2017 (r320198) +++ head/sys/arm/mv/mv_machdep.c Wed Jun 21 18:27:05 2017 (r320199) @@ -46,10 +46,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include + #include #include #include @@ -86,6 +89,39 @@ int armada38x_mbus_optimization(void); #define MPP_PINS_PER_REG 8 #define MPP_SEL(pin,func) (((func) & 0xf) << \ (((pin) % MPP_PINS_PER_REG) * 4)) + +static void +mv_busdma_tag_init(void *arg __unused) +{ + phandle_t node; + bus_dma_tag_t dmat; + + /* + * If this platform has coherent DMA, create the parent DMA tag to pass + * down the coherent flag to all busses and devices on the platform, + * otherwise return without doing anything. By default create tag + * for all A38x-based platforms only. + */ + if ((node = OF_finddevice("/")) == -1) + return; + if (ofw_bus_node_is_compatible(node, "marvell,armada380") == 0) + return; + + bus_dma_tag_create(NULL, /* No parent tag */ + 1, 0, /* alignment, bounds */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ + BUS_DMA_COHERENT, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &dmat); + + nexus_set_dma_tag(dmat); +} +SYSINIT(mv_busdma_tag, SI_SUB_DRIVERS, SI_ORDER_ANY, mv_busdma_tag_init, NULL); static int platform_mpp_init(void) From owner-svn-src-all@freebsd.org Wed Jun 21 18:28:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C7ED95DBC; Wed, 21 Jun 2017 18:28:38 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3898B77EE3; Wed, 21 Jun 2017 18:28:38 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LISbSo066085; Wed, 21 Jun 2017 18:28:37 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LISbxU066084; Wed, 21 Jun 2017 18:28:37 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706211828.v5LISbxU066084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 21 Jun 2017 18:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320200 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:28:38 -0000 Author: zbb Date: Wed Jun 21 18:28:37 2017 New Revision: 320200 URL: https://svnweb.freebsd.org/changeset/base/320200 Log: Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platforms This patch disables outer cache sync in PL310 driver by adding "arm,io-coherent" property. In addition to the previous patches it was the last bit needed for enabling proper operation of Armada 38x SoCs with the IO cache coherency. Submitted by: Michal Mazur Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: mmel Differential revision: https://reviews.freebsd.org/D11204 Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi Wed Jun 21 18:27:05 2017 (r320199) +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi Wed Jun 21 18:28:37 2017 (r320200) @@ -177,6 +177,7 @@ reg = <0x8000 0x1000>; cache-unified; cache-level = <2>; + arm,io-coherent; }; scu@c000 { From owner-svn-src-all@freebsd.org Wed Jun 21 18:51:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35289D96B2F; Wed, 21 Jun 2017 18:51:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01AF378FDF; Wed, 21 Jun 2017 18:51:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LIpVQP074846; Wed, 21 Jun 2017 18:51:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIpVKD074845; Wed, 21 Jun 2017 18:51:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706211851.v5LIpVKD074845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Jun 2017 18:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320201 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:51:32 -0000 Author: kib Date: Wed Jun 21 18:51:30 2017 New Revision: 320201 URL: https://svnweb.freebsd.org/changeset/base/320201 Log: Assert that the protection of a new map entry is a subset of the max protection. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jun 21 18:28:37 2017 (r320200) +++ head/sys/vm/vm_map.c Wed Jun 21 18:51:30 2017 (r320201) @@ -1190,6 +1190,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof ("vm_map_insert: kmem or kernel object and COW")); KASSERT(object == NULL || (cow & MAP_NOFAULT) == 0, ("vm_map_insert: paradoxical MAP_NOFAULT request")); + KASSERT((prot & ~max) == 0, + ("prot %#x is not subset of max_prot %#x", prot, max)); /* * Check that the start and end points are not bogus. From owner-svn-src-all@freebsd.org Wed Jun 21 18:54:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14ED4D9706B; Wed, 21 Jun 2017 18:54:30 +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 D46E179FAE; Wed, 21 Jun 2017 18:54:29 +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 v5LIsTGt081094; Wed, 21 Jun 2017 18:54:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIsTup081093; Wed, 21 Jun 2017 18:54:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706211854.v5LIsTup081093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Jun 2017 18:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320202 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:54:30 -0000 Author: kib Date: Wed Jun 21 18:54:28 2017 New Revision: 320202 URL: https://svnweb.freebsd.org/changeset/base/320202 Log: Call pmap_copy() only for map entries which have the backing object instantiated. Calling pmap_copy() on non-faulted anonymous memory entries is useless. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jun 21 18:51:30 2017 (r320201) +++ head/sys/vm/vm_map.c Wed Jun 21 18:54:28 2017 (r320202) @@ -3239,6 +3239,10 @@ vm_map_copy_entry( fake_entry->next = curthread->td_map_def_user; curthread->td_map_def_user = fake_entry; } + + pmap_copy(dst_map->pmap, src_map->pmap, + dst_entry->start, dst_entry->end - dst_entry->start, + src_entry->start); } else { dst_entry->object.vm_object = NULL; dst_entry->offset = 0; @@ -3248,9 +3252,6 @@ vm_map_copy_entry( *fork_charge += size; } } - - pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start, - dst_entry->end - dst_entry->start, src_entry->start); } else { /* * We don't want to make writeable wired pages copy-on-write. From owner-svn-src-all@freebsd.org Wed Jun 21 18:56:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A1CDD97151; Wed, 21 Jun 2017 18:56:55 +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 ECB507A6B5; Wed, 21 Jun 2017 18:56:54 +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 v5LIusDF081374; Wed, 21 Jun 2017 18:56:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LIusZu081373; Wed, 21 Jun 2017 18:56:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706211856.v5LIusZu081373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 18:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320203 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 18:56:55 -0000 Author: bdrewery Date: Wed Jun 21 18:56:53 2017 New Revision: 320203 URL: https://svnweb.freebsd.org/changeset/base/320203 Log: Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Jun 21 18:54:28 2017 (r320202) +++ head/share/mk/bsd.subdir.mk Wed Jun 21 18:56:53 2017 (r320203) @@ -53,7 +53,7 @@ STANDALONE_SUBDIR_TARGETS+= \ maninstall manlint obj objlink # It is safe to install in parallel when staging. -.if defined(NO_ROOT) +.if defined(NO_ROOT) || !empty(SYSROOT) STANDALONE_SUBDIR_TARGETS+= realinstall .endif From owner-svn-src-all@freebsd.org Wed Jun 21 19:03:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4AA3D97407; Wed, 21 Jun 2017 19:03:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5E17ABE9; Wed, 21 Jun 2017 19:03:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA21745; Wed, 21 Jun 2017 22:03:15 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dNkuJ-000PBK-QP; Wed, 21 Jun 2017 22:03:15 +0300 Subject: Re: svn commit: r317591 - head/sys/dev/drm2/radeon To: TAKAHASHI Yoshihiro Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201704290947.v3T9lF0r075921@repo.freebsd.org> <03e500d5-76b1-fd38-04c6-90d85a2ddfa8@FreeBSD.org> <20170611.000714.2063715294250192258.nyan@FreeBSD.org> From: Andriy Gapon Message-ID: <61cac4d7-0710-1f5e-8268-42b441b3b6ba@FreeBSD.org> Date: Wed, 21 Jun 2017 22:02:19 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170611.000714.2063715294250192258.nyan@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 19:03:24 -0000 On 10/06/2017 18:07, TAKAHASHI Yoshihiro wrote: > In article <03e500d5-76b1-fd38-04c6-90d85a2ddfa8@FreeBSD.org> > Andriy Gapon writes: > >> On 29/04/2017 12:47, Takahashi Yoshihiro wrote: >>> Author: nyan >>> Date: Sat Apr 29 09:47:15 2017 >>> New Revision: 317591 >>> URL: https://svnweb.freebsd.org/changeset/base/317591 >>> >>> Log: >>> Add TUNABLE_INT to radeonkms driver parameters. >>> They are required by PowerMac G5 DP. >>> >>> PR: 217852 >>> Submitted by: Hiroo Ono >>> MFC after: 1 week >> >> I think that this solution that I had in my private tree is a little bit more >> powerful: >> https://people.freebsd.org/~avg/radeon_drv-knobs.diff >> >> The advantage is that it is less intrusive and also provides read-only sysctl in >> addition to the tunables. >> Also, hw.drm.radeon seems like a better place for the knobs than just drm.radeon. >> >> Do you mind if I commit this? > > Sorry for late. > > I don't mind that your suggestion. But if you will commit the patch, > I think that you should apply the same way to the i915 driver. Ooh, I didn't realize that there was a precedent and that "drm" was already used as a root for tunables. So, not sure if I want to pursue this further... Thank you! -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed Jun 21 19:55:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B447D97FD6; Wed, 21 Jun 2017 19:55:27 +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 2BCE57C4CA; Wed, 21 Jun 2017 19:55:27 +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 v5LJtQgD005847; Wed, 21 Jun 2017 19:55:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LJtQXr005846; Wed, 21 Jun 2017 19:55:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706211955.v5LJtQXr005846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 19:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320204 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 19:55:27 -0000 Author: bdrewery Date: Wed Jun 21 19:55:26 2017 New Revision: 320204 URL: https://svnweb.freebsd.org/changeset/base/320204 Log: Fix various 'make *clean *all *install' combinations. This follows commits like r320174 in share/mk/bsd.dep.mk. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Jun 21 18:56:53 2017 (r320203) +++ head/sys/conf/kern.post.mk Wed Jun 21 19:55:26 2017 (r320204) @@ -200,10 +200,10 @@ _meta_filemon= 1 # lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ +.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \ + ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(kernel-obj) || make(kernel-clean*) || \ - make(kernel-install*) || defined(_meta_filemon) + defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null .endif From owner-svn-src-all@freebsd.org Wed Jun 21 20:10:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EA95D98581; Wed, 21 Jun 2017 20:10:59 +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 24C567CBD0; Wed, 21 Jun 2017 20:10:59 +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 v5LKAw3H010264; Wed, 21 Jun 2017 20:10:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LKAw8I010263; Wed, 21 Jun 2017 20:10:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706212010.v5LKAw8I010263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 20:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320205 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 20:10:59 -0000 Author: bdrewery Date: Wed Jun 21 20:10:58 2017 New Revision: 320205 URL: https://svnweb.freebsd.org/changeset/base/320205 Log: Remove logic for setting .MAKE.DEPENDFILE=/dev/null already covered by _SKIP_BUILD. _SKIP_BUILD is defined in bsd.init.mk. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Jun 21 19:55:26 2017 (r320204) +++ head/share/mk/bsd.dep.mk Wed Jun 21 20:10:58 2017 (r320205) @@ -89,8 +89,7 @@ _meta_filemon= 1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 -.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ - make(obj) || (!make(all) && (make(clean*) || make(destroy*))) +.if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= /dev/null .endif .endif From owner-svn-src-all@freebsd.org Wed Jun 21 23:01:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CBC8D9A9E3; Wed, 21 Jun 2017 23:01:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AE238166B; Wed, 21 Jun 2017 23:01:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LN1ImT079997; Wed, 21 Jun 2017 23:01:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LN1IL9079996; Wed, 21 Jun 2017 23:01:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706212301.v5LN1IL9079996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 23:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320206 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 23:01:19 -0000 Author: bdrewery Date: Wed Jun 21 23:01:18 2017 New Revision: 320206 URL: https://svnweb.freebsd.org/changeset/base/320206 Log: Follow-up r308602: Don't add missing headers to .depend.tables.h. This also avoids an error from egrep when a header is missing. This can happen with something like WITHOUT_BLUETOOTH set when searching for $include_dir/netgraph/bluetooth/include/ng_btsocket.h. The warning was not an error (from set -e) due to being on the left side of a pipe. Now the all_headers list is only filled with existing headers. Reviewed by: ngie MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Wed Jun 21 20:10:58 2017 (r320205) +++ head/lib/libsysdecode/mktables Wed Jun 21 23:01:18 2017 (r320206) @@ -65,6 +65,7 @@ gen_table() else filter="egrep -v" fi + [ -e "${include_dir}/${file}" ] || return 0 all_headers="${all_headers:+${all_headers} }${file}" cat <<_EOF_ TABLE_START(${name}) From owner-svn-src-all@freebsd.org Wed Jun 21 23:28:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54626D9B0CE; Wed, 21 Jun 2017 23:28:26 +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 22DBD8243C; Wed, 21 Jun 2017 23:28:25 +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 v5LNSP9d092057; Wed, 21 Jun 2017 23:28:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LNSPDK092056; Wed, 21 Jun 2017 23:28:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706212328.v5LNSPDK092056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Jun 2017 23:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320207 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 23:28:26 -0000 Author: bdrewery Date: Wed Jun 21 23:28:24 2017 New Revision: 320207 URL: https://svnweb.freebsd.org/changeset/base/320207 Log: Tweak r320206: Still create the TABLE but not the .depend entry for missing headers. X-MFC-With: r320206 MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Wed Jun 21 23:01:18 2017 (r320206) +++ head/lib/libsysdecode/mktables Wed Jun 21 23:28:24 2017 (r320207) @@ -65,18 +65,19 @@ gen_table() else filter="egrep -v" fi - [ -e "${include_dir}/${file}" ] || return 0 - all_headers="${all_headers:+${all_headers} }${file}" cat <<_EOF_ TABLE_START(${name}) _EOF_ - egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ - $include_dir/$file | ${filter} ${excl} | \ - awk '{ for (i = 1; i <= NF; i++) \ - if ($i ~ /define/) \ - break; \ - ++i; \ - printf "TABLE_ENTRY(%s)\n", $i }' + if [ -e "${include_dir}/${file}" ]; then + all_headers="${all_headers:+${all_headers} }${file}" + egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ + $include_dir/$file | ${filter} ${excl} | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "TABLE_ENTRY(%s)\n", $i }' + fi cat <<_EOF_ TABLE_END From owner-svn-src-all@freebsd.org Thu Jun 22 00:17:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C54FD9BB0C; Thu, 22 Jun 2017 00:17:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFA283544; Thu, 22 Jun 2017 00:17:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M0HFnB012087; Thu, 22 Jun 2017 00:17:15 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M0HFAQ012086; Thu, 22 Jun 2017 00:17:15 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706220017.v5M0HFAQ012086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 22 Jun 2017 00:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320208 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 00:17:16 -0000 Author: rmacklem Date: Thu Jun 22 00:17:15 2017 New Revision: 320208 URL: https://svnweb.freebsd.org/changeset/base/320208 Log: Ensure that the credentials field of the NFSv4 client open structure is initialized. bdrewery@ has reported panics "newnfs_copycred: negative nfsc_ngroups". The only way I can see that this occurs is that the credentials field of the open structure gets used before being filled in. I am not sure quite how this happens, but for the file create case, the code is serialized via the vnode lock on the directory. If, somehow, a link to the same file gets created just after file creation, this might occur. This patch ensures that the credentials field is initialized to a reasonable set of credentials before the structure is linked into any list, so I this should ensure it is initialized before use. I am committing the patch now, since bdrewery@ notes that the panics are intermittent and it may be months before he knows if the patch fixes his problem. Reported by: bdrewery MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Wed Jun 21 23:28:24 2017 (r320207) +++ head/sys/fs/nfsclient/nfs_clstate.c Thu Jun 22 00:17:15 2017 (r320208) @@ -133,7 +133,7 @@ static int nfscl_localconflict(struct nfsclclient *, u struct nfscllock *, u_int8_t *, struct nfscldeleg *, struct nfscllock **); static void nfscl_newopen(struct nfsclclient *, struct nfscldeleg *, struct nfsclowner **, struct nfsclowner **, struct nfsclopen **, - struct nfsclopen **, u_int8_t *, u_int8_t *, int, int *); + struct nfsclopen **, u_int8_t *, u_int8_t *, int, struct ucred *, int *); static int nfscl_moveopen(vnode_t , struct nfsclclient *, struct nfsmount *, struct nfsclopen *, struct nfsclowner *, struct nfscldeleg *, struct ucred *, NFSPROC_T *); @@ -287,7 +287,7 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_in * Create a new open, as required. */ nfscl_newopen(clp, dp, &owp, &nowp, &op, &nop, own, nfhp, fhlen, - newonep); + cred, newonep); /* * Now, check the mode on the open and return the appropriate @@ -346,7 +346,7 @@ static void nfscl_newopen(struct nfsclclient *clp, struct nfscldeleg *dp, struct nfsclowner **owpp, struct nfsclowner **nowpp, struct nfsclopen **opp, struct nfsclopen **nopp, u_int8_t *own, u_int8_t *fhp, int fhlen, - int *newonep) + struct ucred *cred, int *newonep) { struct nfsclowner *owp = *owpp, *nowp; struct nfsclopen *op, *nop; @@ -399,6 +399,8 @@ nfscl_newopen(struct nfsclclient *clp, struct nfscldel nop->nfso_stateid.other[0] = 0; nop->nfso_stateid.other[1] = 0; nop->nfso_stateid.other[2] = 0; + KASSERT(cred != NULL, ("%s: cred NULL\n", __func__)); + newnfs_copyincred(cred, &nop->nfso_cred); if (dp != NULL) { TAILQ_REMOVE(&clp->nfsc_deleg, dp, nfsdl_list); TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, @@ -3970,7 +3972,7 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsm M_WAITOK); nfscl_newopen(clp, NULL, &owp, &nowp, &op, NULL, lowp->nfsow_owner, dp->nfsdl_fh, - dp->nfsdl_fhlen, NULL); + dp->nfsdl_fhlen, NULL, NULL); newnfs_copycred(&dp->nfsdl_cred, cred); ret = nfscl_moveopen(vp, clp, nmp, lop, owp, dp, cred, p); @@ -4052,7 +4054,7 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, st lop->nfso_fhlen - 1, M_NFSCLOPEN, M_WAITOK); newone = 0; nfscl_newopen(clp, NULL, &owp, NULL, &op, &nop, owp->nfsow_owner, - lop->nfso_fh, lop->nfso_fhlen, &newone); + lop->nfso_fh, lop->nfso_fhlen, cred, &newone); ndp = dp; error = nfscl_tryopen(nmp, vp, np->n_v4->n4_data, np->n_v4->n4_fhlen, lop->nfso_fh, lop->nfso_fhlen, lop->nfso_mode, op, @@ -4061,8 +4063,6 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, st if (newone) nfscl_freeopen(op, 0); } else { - if (newone) - newnfs_copyincred(cred, &op->nfso_cred); op->nfso_mode |= lop->nfso_mode; op->nfso_opencnt += lop->nfso_opencnt; nfscl_freeopen(lop, 1); From owner-svn-src-all@freebsd.org Thu Jun 22 01:11:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23653D9CC45; Thu, 22 Jun 2017 01:11: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 E1A6A84F4A; Thu, 22 Jun 2017 01:11:21 +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 v5M1BL6v033408; Thu, 22 Jun 2017 01:11:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M1BL9A033407; Thu, 22 Jun 2017 01:11:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706220111.v5M1BL9A033407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Jun 2017 01:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320209 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 01:11:22 -0000 Author: emaste Date: Thu Jun 22 01:11:20 2017 New Revision: 320209 URL: https://svnweb.freebsd.org/changeset/base/320209 Log: msdosfs: reformat a comment to reduce NetBSD diffs Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Thu Jun 22 00:17:15 2017 (r320208) +++ head/sys/fs/msdosfs/msdosfs_fat.c Thu Jun 22 01:11:20 2017 (r320209) @@ -999,14 +999,12 @@ extendfile(struct denode *dep, u_long count, struct bu while (count > 0) { /* * Allocate a new cluster chain and cat onto the end of the - * file. - * If the file is empty we make de_StartCluster point - * to the new block. Note that de_StartCluster being - * 0 is sufficient to be sure the file is empty since - * we exclude attempts to extend the root directory - * above, and the root dir is the only file with a - * startcluster of 0 that has blocks allocated (sort - * of). + * file. If the file is empty we make de_StartCluster point + * to the new block. Note that de_StartCluster being 0 is + * sufficient to be sure the file is empty since we exclude + * attempts to extend the root directory above, and the root + * dir is the only file with a startcluster of 0 that has + * blocks allocated (sort of). */ if (dep->de_StartCluster == 0) cn = 0; From owner-svn-src-all@freebsd.org Thu Jun 22 02:19:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B3D1DA0854; Thu, 22 Jun 2017 02:19:41 +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 ECE4436CD; Thu, 22 Jun 2017 02:19:40 +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 v5M2JeWs060771; Thu, 22 Jun 2017 02:19:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M2Jet6060770; Thu, 22 Jun 2017 02:19:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706220219.v5M2Jet6060770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 22 Jun 2017 02:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320210 - head/usr.bin/join X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 02:19:41 -0000 Author: cem Date: Thu Jun 22 02:19:39 2017 New Revision: 320210 URL: https://svnweb.freebsd.org/changeset/base/320210 Log: join(1): Fix field ordering for -v output Per POSIX, join(1) (in modes other than -o) is a concatenation of selected character fields. The joined field is first, followed by fields in the order they occurred in the input files. Our join(1) utility previously handled this correctly for lines with a match in the other file. But it failed to order output fields correctly for unmatched lines, printed in -a and -v modes. A simple test case is: $ touch a $ echo "2 1" > b $ join -v2 -2 2 a b 1 2 PR: 217711 Reported by: alt.j2-4o4s2yon at yopmail.com Sponsored by: Dell EMC Isilon Modified: head/usr.bin/join/join.c Modified: head/usr.bin/join/join.c ============================================================================== --- head/usr.bin/join/join.c Thu Jun 22 01:11:20 2017 (r320209) +++ head/usr.bin/join/join.c Thu Jun 22 02:19:39 2017 (r320210) @@ -467,9 +467,15 @@ outoneline(INPUT *F, LINE *lp) else outfield(lp, 0, 1); } - else + else { + /* + * Output the join field, then the remaining fields. + */ + outfield(lp, F->joinf, 0); for (cnt = 0; cnt < lp->fieldcnt; ++cnt) - outfield(lp, cnt, 0); + if (F->joinf != cnt) + outfield(lp, cnt, 0); + } (void)printf("\n"); if (ferror(stdout)) err(1, "stdout"); From owner-svn-src-all@freebsd.org Thu Jun 22 02:43:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38C70DA1484; Thu, 22 Jun 2017 02:43:34 +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 12DE16447F; Thu, 22 Jun 2017 02:43:34 +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 v5M2hXWC072661; Thu, 22 Jun 2017 02:43:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M2hWCA072657; Thu, 22 Jun 2017 02:43:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706220243.v5M2hWCA072657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 22 Jun 2017 02:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320211 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 02:43:34 -0000 Author: pfg Date: Thu Jun 22 02:43:32 2017 New Revision: 320211 URL: https://svnweb.freebsd.org/changeset/base/320211 Log: ext2fs: add dir_nlink feature support. ext4 on linux has always supported more than 32000 directories through the dir_nlink feature, but FreeBSD was unable to catch up on this feature. As part of the 64 bit inode changes nlink_t has been extended and this feature is now possible. Submitted by: Fedor Uporov Differential Revision: https://reviews.freebsd.org/D11210 Modified: head/sys/fs/ext2fs/ext2_dir.h head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/ext2fs.h head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/ext2_dir.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dir.h Thu Jun 22 02:19:39 2017 (r320210) +++ head/sys/fs/ext2fs/ext2_dir.h Thu Jun 22 02:43:32 2017 (r320211) @@ -74,6 +74,7 @@ struct ext2fs_direct_2 { * Maximal count of links to a file */ #define EXT2_LINK_MAX 32000 +#define EXT4_LINK_MAX 65000 /* * Ext2 directory file types. Only the low 3 bits are used. The Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Thu Jun 22 02:19:39 2017 (r320210) +++ head/sys/fs/ext2fs/ext2_vnops.c Thu Jun 22 02:43:32 2017 (r320211) @@ -672,6 +672,19 @@ out: return (error); } +static unsigned short +ext2_max_nlink(struct inode *ip) +{ + struct m_ext2fs *fs; + + fs = ip->i_e2fs; + + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_DIR_NLINK)) + return (EXT4_LINK_MAX); + else + return (EXT2_LINK_MAX); +} + /* * link vnode call */ @@ -689,7 +702,7 @@ ext2_link(struct vop_link_args *ap) panic("ext2_link: no name"); #endif ip = VTOI(vp); - if ((nlink_t)ip->i_nlink >= EXT2_LINK_MAX) { + if ((nlink_t)ip->i_nlink >= ext2_max_nlink(ip)) { error = EMLINK; goto out; } @@ -710,6 +723,31 @@ out: return (error); } +static int +ext2_inc_nlink(struct inode *ip) +{ + + ip->i_nlink++; + + if (ext2_htree_has_idx(ip) && ip->i_nlink > 1) { + if (ip->i_nlink >= ext2_max_nlink(ip) || ip->i_nlink == 2) + ip->i_nlink = 1; + } else if (ip->i_nlink > ext2_max_nlink(ip)) { + ip->i_nlink--; + return (EMLINK); + } + + return (0); +} + +static void +ext2_dec_nlink(struct inode *ip) +{ + + if (!S_ISDIR(ip->i_mode) || ip->i_nlink > 2) + ip->i_nlink--; +} + /* * Rename system call. * rename("foo", "bar"); @@ -792,7 +830,7 @@ abortit: goto abortit; dp = VTOI(fdvp); ip = VTOI(fvp); - if (ip->i_nlink >= EXT2_LINK_MAX) { + if (ip->i_nlink >= ext2_max_nlink(ip) && !ext2_htree_has_idx(ip)) { VOP_UNLOCK(fvp, 0); error = EMLINK; goto abortit; @@ -835,7 +873,7 @@ abortit: * completing our work, the link count * may be wrong, but correctable. */ - ip->i_nlink++; + ext2_inc_nlink(ip); ip->i_flag |= IN_CHANGE; if ((error = ext2_update(fvp, !DOINGASYNC(fvp))) != 0) { VOP_UNLOCK(fvp, 0); @@ -890,11 +928,10 @@ abortit: * parent we don't fool with the link count. */ if (doingdirectory && newparent) { - if ((nlink_t)dp->i_nlink >= EXT2_LINK_MAX) { - error = EMLINK; + error = ext2_inc_nlink(dp); + if (error) goto bad; - } - dp->i_nlink++; + dp->i_flag |= IN_CHANGE; error = ext2_update(tdvp, !DOINGASYNC(tdvp)); if (error) @@ -903,7 +940,7 @@ abortit: error = ext2_direnter(ip, tdvp, tcnp); if (error) { if (doingdirectory && newparent) { - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; (void)ext2_update(tdvp, 1); } @@ -936,8 +973,7 @@ abortit: * (both directories, or both not directories). */ if ((xp->i_mode & IFMT) == IFDIR) { - if (!ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) || - xp->i_nlink > 2) { + if (!ext2_dirempty(xp, dp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; } @@ -960,7 +996,7 @@ abortit: * of the target directory. */ if (doingdirectory && !newparent) { - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; } vput(tdvp); @@ -974,7 +1010,7 @@ abortit: * it above, as the remaining link would point to * a directory without "." or ".." entries. */ - xp->i_nlink--; + ext2_dec_nlink(xp); if (doingdirectory) { if (--xp->i_nlink != 0) panic("ext2_rename: linked directory"); @@ -1031,7 +1067,7 @@ abortit: * and ".." set to point to the new parent. */ if (doingdirectory && newparent) { - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf, sizeof(struct dirtemplate), (off_t)0, @@ -1060,7 +1096,7 @@ abortit: } error = ext2_dirremove(fdvp, fcnp); if (!error) { - xp->i_nlink--; + ext2_dec_nlink(xp); xp->i_flag |= IN_CHANGE; } xp->i_flag &= ~IN_RENAME; @@ -1080,7 +1116,7 @@ out: if (doingdirectory) ip->i_flag &= ~IN_RENAME; if (vn_lock(fvp, LK_EXCLUSIVE) == 0) { - ip->i_nlink--; + ext2_dec_nlink(ip); ip->i_flag |= IN_CHANGE; ip->i_flag &= ~IN_RENAME; vput(fvp); @@ -1255,7 +1291,8 @@ ext2_mkdir(struct vop_mkdir_args *ap) panic("ext2_mkdir: no name"); #endif dp = VTOI(dvp); - if ((nlink_t)dp->i_nlink >= EXT2_LINK_MAX) { + if ((nlink_t)dp->i_nlink >= ext2_max_nlink(dp) && + !ext2_htree_has_idx(dp)) { error = EMLINK; goto out; } @@ -1306,7 +1343,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) * be done before reference is created * so reparation is possible if we crash. */ - dp->i_nlink++; + ext2_inc_nlink(dp); dp->i_flag |= IN_CHANGE; error = ext2_update(dvp, !DOINGASYNC(dvp)); if (error) @@ -1333,7 +1370,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, cnp->cn_cred, NOCRED, NULL, NULL); if (error) { - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; goto bad; } @@ -1358,7 +1395,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) /* Directory set up, now install its entry in the parent directory. */ error = ext2_direnter(ip, dvp, cnp); if (error) { - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; } bad: @@ -1400,7 +1437,7 @@ ext2_rmdir(struct vop_rmdir_args *ap) * the current directory and thus be * non-empty.) */ - if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) { + if (!ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; goto out; } @@ -1417,22 +1454,15 @@ ext2_rmdir(struct vop_rmdir_args *ap) error = ext2_dirremove(dvp, cnp); if (error) goto out; - dp->i_nlink--; + ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; cache_purge(dvp); VOP_UNLOCK(dvp, 0); /* * Truncate inode. The only stuff left - * in the directory is "." and "..". The - * "." reference is inconsequential since - * we're quashing it. The ".." reference - * has already been adjusted above. We've - * removed the "." reference and the reference - * in the parent directory, but there may be - * other hard links so decrement by 2 and - * worry about them later. + * in the directory is "." and "..". */ - ip->i_nlink -= 2; + ip->i_nlink = 0; error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred, cnp->cn_thread); cache_purge(ITOV(ip)); @@ -1592,7 +1622,10 @@ ext2_pathconf(struct vop_pathconf_args *ap) switch (ap->a_name) { case _PC_LINK_MAX: - *ap->a_retval = EXT2_LINK_MAX; + if (ext2_htree_has_idx(VTOI(ap->a_vp))) + *ap->a_retval = INT_MAX; + else + *ap->a_retval = ext2_max_nlink(VTOI(ap->a_vp)); break; case _PC_NAME_MAX: *ap->a_retval = NAME_MAX; Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Thu Jun 22 02:19:39 2017 (r320210) +++ head/sys/fs/ext2fs/ext2fs.h Thu Jun 22 02:43:32 2017 (r320211) @@ -260,6 +260,7 @@ struct csum { #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_GDT_CSUM | \ + EXT2F_ROCOMPAT_DIR_NLINK | \ EXT2F_ROCOMPAT_HUGE_FILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE Modified: head/sys/fs/ext2fs/inode.h ============================================================================== --- head/sys/fs/ext2fs/inode.h Thu Jun 22 02:19:39 2017 (r320210) +++ head/sys/fs/ext2fs/inode.h Thu Jun 22 02:43:32 2017 (r320211) @@ -91,7 +91,7 @@ struct inode { /* Fields from struct dinode in UFS. */ uint16_t i_mode; /* IFMT, permissions; see below. */ - int16_t i_nlink; /* File link count. */ + int32_t i_nlink; /* File link count. */ uint32_t i_uid; /* File owner. */ uint32_t i_gid; /* File group. */ uint64_t i_size; /* File byte count. */ From owner-svn-src-all@freebsd.org Thu Jun 22 02:46:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F696DA1672; Thu, 22 Jun 2017 02:46:38 +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 BD66E6469C; Thu, 22 Jun 2017 02:46:37 +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 v5M2kbc2072826; Thu, 22 Jun 2017 02:46:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M2kaH1072824; Thu, 22 Jun 2017 02:46:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706220246.v5M2kaH1072824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Jun 2017 02:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320212 - head/usr.sbin/makefs/msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 02:46:38 -0000 Author: emaste Date: Thu Jun 22 02:46:36 2017 New Revision: 320212 URL: https://svnweb.freebsd.org/changeset/base/320212 Log: makefs: add copies of NetBSD makefs msdos source files We do not treat makefs as contrib code. Import copies of makefs msdos files from NetBSD so that we can track our changes to these files. These are copied from NetBSD, with only a change to use __FBSDID and $FreeBSD$ instead of __KERNEL_RCSID and $NetBSD$. A copy of the original $NetBSD$ tag remains in each source file. Submitted by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Added: head/usr.sbin/makefs/msdos/ head/usr.sbin/makefs/msdos/msdosfs_denode.c (contents, props changed) head/usr.sbin/makefs/msdos/msdosfs_vfsops.c (contents, props changed) head/usr.sbin/makefs/msdos/msdosfs_vnops.c (contents, props changed) Added: head/usr.sbin/makefs/msdos/msdosfs_denode.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/msdos/msdosfs_denode.c Thu Jun 22 02:46:36 2017 (r320212) @@ -0,0 +1,363 @@ +/* $NetBSD: msdosfs_denode.c,v 1.7 2015/03/29 05:52:59 agc Exp $ */ + +/*- + * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. + * Copyright (C) 1994, 1995, 1997 TooLs GmbH. + * All rights reserved. + * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + */ +/* + * Written by Paul Popelka (paulp@uts.amdahl.com) + * + * You can do anything you want with this software, just don't say you wrote + * it, and don't remove this notice. + * + * This software is provided "as is". + * + * The author supplies this software to be publicly redistributed on the + * understanding that the author is not responsible for the correct + * functioning of this software in any circumstances and is not liable for + * any damages caused by this software. + * + * October 1992 + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include + +#include +#include +#include +#include +#include + +#include + +/* + * If deget() succeeds it returns with the gotten denode locked(). + * + * pmp - address of msdosfsmount structure of the filesystem containing + * the denode of interest. The pm_dev field and the address of + * the msdosfsmount structure are used. + * dirclust - which cluster bp contains, if dirclust is 0 (root directory) + * diroffset is relative to the beginning of the root directory, + * otherwise it is cluster relative. + * diroffset - offset past begin of cluster of denode we want + * depp - returns the address of the gotten denode. + */ +int +deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, + struct denode **depp) + /* pmp: so we know the maj/min number */ + /* dirclust: cluster this dir entry came from */ + /* diroffset: index of entry within the cluster */ + /* depp: returns the addr of the gotten denode */ +{ + int error; + struct direntry *direntptr; + struct denode *ldep; + struct buf *bp; + +#ifdef MSDOSFS_DEBUG + printf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", + pmp, dirclust, diroffset, depp); +#endif + + /* + * On FAT32 filesystems, root is a (more or less) normal + * directory + */ + if (FAT32(pmp) && dirclust == MSDOSFSROOT) + dirclust = pmp->pm_rootdirblk; + + ldep = ecalloc(1, sizeof(*ldep)); + ldep->de_vnode = NULL; + ldep->de_flag = 0; + ldep->de_devvp = 0; + ldep->de_lockf = 0; + ldep->de_dev = pmp->pm_dev; + ldep->de_dirclust = dirclust; + ldep->de_diroffset = diroffset; + ldep->de_pmp = pmp; + ldep->de_devvp = pmp->pm_devvp; + ldep->de_refcnt = 1; + fc_purge(ldep, 0); + /* + * Copy the directory entry into the denode area of the vnode. + */ + if ((dirclust == MSDOSFSROOT + || (FAT32(pmp) && dirclust == pmp->pm_rootdirblk)) + && diroffset == MSDOSFSROOT_OFS) { + /* + * Directory entry for the root directory. There isn't one, + * so we manufacture one. We should probably rummage + * through the root directory and find a label entry (if it + * exists), and then use the time and date from that entry + * as the time and date for the root denode. + */ + ldep->de_vnode = (struct vnode *)-1; + + ldep->de_Attributes = ATTR_DIRECTORY; + if (FAT32(pmp)) + ldep->de_StartCluster = pmp->pm_rootdirblk; + /* de_FileSize will be filled in further down */ + else { + ldep->de_StartCluster = MSDOSFSROOT; + ldep->de_FileSize = pmp->pm_rootdirsize * pmp->pm_BytesPerSec; + } + /* + * fill in time and date so that dos2unixtime() doesn't + * spit up when called from msdosfs_getattr() with root + * denode + */ + ldep->de_CHun = 0; + ldep->de_CTime = 0x0000; /* 00:00:00 */ + ldep->de_CDate = (0 << DD_YEAR_SHIFT) | (1 << DD_MONTH_SHIFT) + | (1 << DD_DAY_SHIFT); + /* Jan 1, 1980 */ + ldep->de_ADate = ldep->de_CDate; + ldep->de_MTime = ldep->de_CTime; + ldep->de_MDate = ldep->de_CDate; + /* leave the other fields as garbage */ + } else { + error = readep(pmp, dirclust, diroffset, &bp, &direntptr); + if (error) { + ldep->de_devvp = NULL; + ldep->de_Name[0] = SLOT_DELETED; + return (error); + } + DE_INTERNALIZE(ldep, direntptr); + brelse(bp, 0); + } + + /* + * Fill in a few fields of the vnode and finish filling in the + * denode. Then return the address of the found denode. + */ + if (ldep->de_Attributes & ATTR_DIRECTORY) { + /* + * Since DOS directory entries that describe directories + * have 0 in the filesize field, we take this opportunity + * to find out the length of the directory and plug it into + * the denode structure. + */ + u_long size; + + if (ldep->de_StartCluster != MSDOSFSROOT) { + error = pcbmap(ldep, CLUST_END, 0, &size, 0); + if (error == E2BIG) { + ldep->de_FileSize = de_cn2off(pmp, size); + error = 0; + } else + printf("deget(): pcbmap returned %d\n", error); + } + } + *depp = ldep; + return (0); +} + +/* + * Truncate the file described by dep to the length specified by length. + */ +int +detrunc(struct denode *dep, u_long length, int flags, struct kauth_cred *cred) +{ + int error; + int allerror = 0; + u_long eofentry; + u_long chaintofree = 0; + daddr_t bn, lastblock; + int boff; + int isadir = dep->de_Attributes & ATTR_DIRECTORY; + struct buf *bp; + struct msdosfsmount *pmp = dep->de_pmp; + +#ifdef MSDOSFS_DEBUG + printf("detrunc(): file %s, length %lu, flags %x\n", dep->de_Name, length, flags); +#endif + + /* + * Disallow attempts to truncate the root directory since it is of + * fixed size. That's just the way dos filesystems are. We use + * the VROOT bit in the vnode because checking for the directory + * bit and a startcluster of 0 in the denode is not adequate to + * recognize the root directory at this point in a file or + * directory's life. + */ + if (dep->de_vnode != NULL && !FAT32(pmp)) { + printf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n", + dep->de_dirclust, dep->de_diroffset); + return (EINVAL); + } + + if (dep->de_FileSize < length) + return (deextend(dep, length, cred)); + lastblock = de_clcount(pmp, length) - 1; + + /* + * If the desired length is 0 then remember the starting cluster of + * the file and set the StartCluster field in the directory entry + * to 0. If the desired length is not zero, then get the number of + * the last cluster in the shortened file. Then get the number of + * the first cluster in the part of the file that is to be freed. + * Then set the next cluster pointer in the last cluster of the + * file to CLUST_EOFE. + */ + if (length == 0) { + chaintofree = dep->de_StartCluster; + dep->de_StartCluster = 0; + eofentry = ~0; + } else { + error = pcbmap(dep, lastblock, 0, &eofentry, 0); + if (error) { +#ifdef MSDOSFS_DEBUG + printf("detrunc(): pcbmap fails %d\n", error); +#endif + return (error); + } + } + + /* + * If the new length is not a multiple of the cluster size then we + * must zero the tail end of the new last cluster in case it + * becomes part of the file again because of a seek. + */ + if ((boff = length & pmp->pm_crbomask) != 0) { + if (isadir) { + bn = cntobn(pmp, eofentry); + error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), + pmp->pm_bpcluster, B_MODIFY, &bp); + if (error) { +#ifdef MSDOSFS_DEBUG + printf("detrunc(): bread fails %d\n", error); +#endif + return (error); + } + memset((char *)bp->b_data + boff, 0, + pmp->pm_bpcluster - boff); + if (flags & IO_SYNC) + bwrite(bp); + else + bdwrite(bp); + } + } + + /* + * Write out the updated directory entry. Even if the update fails + * we free the trailing clusters. + */ + dep->de_FileSize = length; + if (!isadir) + dep->de_flag |= DE_UPDATE|DE_MODIFIED; +#ifdef MSDOSFS_DEBUG + printf("detrunc(): allerror %d, eofentry %lu\n", + allerror, eofentry); +#endif + + /* + * If we need to break the cluster chain for the file then do it + * now. + */ + if (eofentry != (u_long)~0) { + error = fatentry(FAT_GET_AND_SET, pmp, eofentry, + &chaintofree, CLUST_EOFE); + if (error) { +#ifdef MSDOSFS_DEBUG + printf("detrunc(): fatentry errors %d\n", error); +#endif + return (error); + } + } + + /* + * Now free the clusters removed from the file because of the + * truncation. + */ + if (chaintofree != 0 && !MSDOSFSEOF(chaintofree, pmp->pm_fatmask)) + freeclusterchain(pmp, chaintofree); + + return (allerror); +} + +/* + * Extend the file described by dep to length specified by length. + */ +int +deextend(struct denode *dep, u_long length, struct kauth_cred *cred) +{ + struct msdosfsmount *pmp = dep->de_pmp; + u_long count; + int error; + + /* + * The root of a DOS filesystem cannot be extended. + */ + if (dep->de_vnode != NULL && !FAT32(pmp)) + return EINVAL; + + /* + * Directories cannot be extended. + */ + if (dep->de_Attributes & ATTR_DIRECTORY) + return EISDIR; + + if (length <= dep->de_FileSize) + return E2BIG; + + /* + * Compute the number of clusters to allocate. + */ + count = de_clcount(pmp, length) - de_clcount(pmp, dep->de_FileSize); + if (count > 0) { + if (count > pmp->pm_freeclustercount) + return (ENOSPC); + error = extendfile(dep, count, NULL, NULL, DE_CLEAR); + if (error) { + /* truncate the added clusters away again */ + (void) detrunc(dep, dep->de_FileSize, 0, cred); + return (error); + } + } + + /* + * Zero extend file range; ubc_zerorange() uses ubc_alloc() and a + * memset(); we set the write size so ubc won't read in file data that + * is zero'd later. + */ + dep->de_FileSize = length; + dep->de_flag |= DE_UPDATE|DE_MODIFIED; + return 0; +} Added: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Thu Jun 22 02:46:36 2017 (r320212) @@ -0,0 +1,433 @@ + +/*- + * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. + * Copyright (C) 1994, 1995, 1997 TooLs GmbH. + * All rights reserved. + * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + */ +/* + * Written by Paul Popelka (paulp@uts.amdahl.com) + * + * You can do anything you want with this software, just don't say you wrote + * it, and don't remove this notice. + * + * This software is provided "as is". + * + * The author supplies this software to be publicly redistributed on the + * understanding that the author is not responsible for the correct + * functioning of this software in any circumstances and is not liable for + * any damages caused by this software. + * + * October 1992 + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +/* $NetBSD: msdosfs_vfsops.c,v 1.10 2016/01/30 09:59:27 mlelstv Exp $ */ +__FBSDID("$FreeBSD$"); + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "makefs.h" +#include "msdos.h" +#include "mkfs_msdos.h" + +#ifdef MSDOSFS_DEBUG +#define DPRINTF(a) printf a +#else +#define DPRINTF(a) +#endif + +struct msdosfsmount * +msdosfs_mount(struct vnode *devvp, int flags) +{ + struct msdosfsmount *pmp = NULL; + struct buf *bp; + union bootsector *bsp; + struct byte_bpb33 *b33; + struct byte_bpb50 *b50; + struct byte_bpb710 *b710; + uint8_t SecPerClust; + int ronly = 0, error, tmp; + int bsize; + struct msdos_options *m = devvp->fs->fs_specific; + uint64_t psize = m->create_size; + unsigned secsize = 512; + + DPRINTF(("%s(bread 0)\n", __func__)); + if ((error = bread(devvp, 0, secsize, 0, &bp)) != 0) + goto error_exit; + + bsp = (union bootsector *)bp->b_data; + b33 = (struct byte_bpb33 *)bsp->bs33.bsBPB; + b50 = (struct byte_bpb50 *)bsp->bs50.bsBPB; + b710 = (struct byte_bpb710 *)bsp->bs710.bsBPB; + + if (!(flags & MSDOSFSMNT_GEMDOSFS)) { + if (bsp->bs50.bsBootSectSig0 != BOOTSIG0 + || bsp->bs50.bsBootSectSig1 != BOOTSIG1) { + DPRINTF(("bootsig0 %d bootsig1 %d\n", + bsp->bs50.bsBootSectSig0, + bsp->bs50.bsBootSectSig1)); + error = EINVAL; + goto error_exit; + } + bsize = 0; + } else + bsize = 512; + + pmp = ecalloc(1, sizeof *pmp); + /* + * Compute several useful quantities from the bpb in the + * bootsector. Copy in the dos 5 variant of the bpb then fix up + * the fields that are different between dos 5 and dos 3.3. + */ + SecPerClust = b50->bpbSecPerClust; + pmp->pm_BytesPerSec = getushort(b50->bpbBytesPerSec); + pmp->pm_ResSectors = getushort(b50->bpbResSectors); + pmp->pm_FATs = b50->bpbFATs; + pmp->pm_RootDirEnts = getushort(b50->bpbRootDirEnts); + pmp->pm_Sectors = getushort(b50->bpbSectors); + pmp->pm_FATsecs = getushort(b50->bpbFATsecs); + pmp->pm_SecPerTrack = getushort(b50->bpbSecPerTrack); + pmp->pm_Heads = getushort(b50->bpbHeads); + pmp->pm_Media = b50->bpbMedia; + + DPRINTF(("%s(BytesPerSec=%u, ResSectors=%u, FATs=%d, RootDirEnts=%u, " + "Sectors=%u, FATsecs=%lu, SecPerTrack=%u, Heads=%u, Media=%u)\n", + __func__, pmp->pm_BytesPerSec, pmp->pm_ResSectors, pmp->pm_FATs, + pmp->pm_RootDirEnts, pmp->pm_Sectors, pmp->pm_FATsecs, + pmp->pm_SecPerTrack, pmp->pm_Heads, pmp->pm_Media)); + if (!(flags & MSDOSFSMNT_GEMDOSFS)) { + /* XXX - We should probably check more values here */ + if (!pmp->pm_BytesPerSec || !SecPerClust + || pmp->pm_SecPerTrack > 63) { + DPRINTF(("bytespersec %d secperclust %d " + "secpertrack %d\n", + pmp->pm_BytesPerSec, SecPerClust, + pmp->pm_SecPerTrack)); + error = EINVAL; + goto error_exit; + } + } + + pmp->pm_flags = flags & MSDOSFSMNT_MNTOPT; + if (pmp->pm_flags & MSDOSFSMNT_GEMDOSFS) + pmp->pm_flags |= MSDOSFSMNT_NOWIN95; + if (pmp->pm_flags & MSDOSFSMNT_NOWIN95) + pmp->pm_flags |= MSDOSFSMNT_SHORTNAME; + + if (pmp->pm_Sectors == 0) { + pmp->pm_HiddenSects = getulong(b50->bpbHiddenSecs); + pmp->pm_HugeSectors = getulong(b50->bpbHugeSectors); + } else { + pmp->pm_HiddenSects = getushort(b33->bpbHiddenSecs); + pmp->pm_HugeSectors = pmp->pm_Sectors; + } + + if (pmp->pm_RootDirEnts == 0) { + unsigned short vers = getushort(b710->bpbFSVers); + /* + * Some say that bsBootSectSig[23] must be zero, but + * Windows does not require this and some digital cameras + * do not set these to zero. Therefore, do not insist. + */ + if (pmp->pm_Sectors || pmp->pm_FATsecs || vers) { + DPRINTF(("sectors %d fatsecs %lu vers %d\n", + pmp->pm_Sectors, pmp->pm_FATsecs, vers)); + error = EINVAL; + goto error_exit; + } + pmp->pm_fatmask = FAT32_MASK; + pmp->pm_fatmult = 4; + pmp->pm_fatdiv = 1; + pmp->pm_FATsecs = getulong(b710->bpbBigFATsecs); + + /* mirrorring is enabled if the FATMIRROR bit is not set */ + if ((getushort(b710->bpbExtFlags) & FATMIRROR) == 0) + pmp->pm_flags |= MSDOSFS_FATMIRROR; + else + pmp->pm_curfat = getushort(b710->bpbExtFlags) & FATNUM; + } else + pmp->pm_flags |= MSDOSFS_FATMIRROR; + + if (flags & MSDOSFSMNT_GEMDOSFS) { + if (FAT32(pmp)) { + DPRINTF(("FAT32 for GEMDOS\n")); + /* + * GEMDOS doesn't know FAT32. + */ + error = EINVAL; + goto error_exit; + } + + /* + * Check a few values (could do some more): + * - logical sector size: power of 2, >= block size + * - sectors per cluster: power of 2, >= 1 + * - number of sectors: >= 1, <= size of partition + */ + if ( (SecPerClust == 0) + || (SecPerClust & (SecPerClust - 1)) + || (pmp->pm_BytesPerSec < bsize) + || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) + || (pmp->pm_HugeSectors == 0) + || (pmp->pm_HugeSectors * (pmp->pm_BytesPerSec / bsize) + > psize)) { + DPRINTF(("consistency checks for GEMDOS\n")); + error = EINVAL; + goto error_exit; + } + /* + * XXX - Many parts of the msdosfs driver seem to assume that + * the number of bytes per logical sector (BytesPerSec) will + * always be the same as the number of bytes per disk block + * Let's pretend it is. + */ + tmp = pmp->pm_BytesPerSec / bsize; + pmp->pm_BytesPerSec = bsize; + pmp->pm_HugeSectors *= tmp; + pmp->pm_HiddenSects *= tmp; + pmp->pm_ResSectors *= tmp; + pmp->pm_Sectors *= tmp; + pmp->pm_FATsecs *= tmp; + SecPerClust *= tmp; + } + + /* Check that fs has nonzero FAT size */ + if (pmp->pm_FATsecs == 0) { + DPRINTF(("FATsecs is 0\n")); + error = EINVAL; + goto error_exit; + } + + pmp->pm_fatblk = pmp->pm_ResSectors; + if (FAT32(pmp)) { + pmp->pm_rootdirblk = getulong(b710->bpbRootClust); + pmp->pm_firstcluster = pmp->pm_fatblk + + (pmp->pm_FATs * pmp->pm_FATsecs); + pmp->pm_fsinfo = getushort(b710->bpbFSInfo); + } else { + pmp->pm_rootdirblk = pmp->pm_fatblk + + (pmp->pm_FATs * pmp->pm_FATsecs); + pmp->pm_rootdirsize = (pmp->pm_RootDirEnts * sizeof(struct direntry) + + pmp->pm_BytesPerSec - 1) + / pmp->pm_BytesPerSec;/* in sectors */ + pmp->pm_firstcluster = pmp->pm_rootdirblk + pmp->pm_rootdirsize; + } + + pmp->pm_nmbrofclusters = (pmp->pm_HugeSectors - pmp->pm_firstcluster) / + SecPerClust; + pmp->pm_maxcluster = pmp->pm_nmbrofclusters + 1; + pmp->pm_fatsize = pmp->pm_FATsecs * pmp->pm_BytesPerSec; + + if (flags & MSDOSFSMNT_GEMDOSFS) { + if (pmp->pm_nmbrofclusters <= (0xff0 - 2)) { + pmp->pm_fatmask = FAT12_MASK; + pmp->pm_fatmult = 3; + pmp->pm_fatdiv = 2; + } else { + pmp->pm_fatmask = FAT16_MASK; + pmp->pm_fatmult = 2; + pmp->pm_fatdiv = 1; + } + } else if (pmp->pm_fatmask == 0) { + if (pmp->pm_maxcluster + <= ((CLUST_RSRVD - CLUST_FIRST) & FAT12_MASK)) { + /* + * This will usually be a floppy disk. This size makes + * sure that one FAT entry will not be split across + * multiple blocks. + */ + pmp->pm_fatmask = FAT12_MASK; + pmp->pm_fatmult = 3; + pmp->pm_fatdiv = 2; + } else { + pmp->pm_fatmask = FAT16_MASK; + pmp->pm_fatmult = 2; + pmp->pm_fatdiv = 1; + } + } + if (FAT12(pmp)) + pmp->pm_fatblocksize = 3 * pmp->pm_BytesPerSec; + else + pmp->pm_fatblocksize = MAXBSIZE; + + pmp->pm_fatblocksec = pmp->pm_fatblocksize / pmp->pm_BytesPerSec; + pmp->pm_bnshift = ffs(pmp->pm_BytesPerSec) - 1; + + /* + * Compute mask and shift value for isolating cluster relative byte + * offsets and cluster numbers from a file offset. + */ + pmp->pm_bpcluster = SecPerClust * pmp->pm_BytesPerSec; + pmp->pm_crbomask = pmp->pm_bpcluster - 1; + pmp->pm_cnshift = ffs(pmp->pm_bpcluster) - 1; + + DPRINTF(("%s(fatmask=%lu, fatmult=%u, fatdiv=%u, fatblocksize=%lu, " + "fatblocksec=%lu, bnshift=%lu, pbcluster=%lu, crbomask=%lu, " + "cnshift=%lu)\n", + __func__, pmp->pm_fatmask, pmp->pm_fatmult, pmp->pm_fatdiv, + pmp->pm_fatblocksize, pmp->pm_fatblocksec, pmp->pm_bnshift, + pmp->pm_bpcluster, pmp->pm_crbomask, pmp->pm_cnshift)); + /* + * Check for valid cluster size + * must be a power of 2 + */ + if (pmp->pm_bpcluster ^ (1 << pmp->pm_cnshift)) { + DPRINTF(("bpcluster %lu cnshift %lu\n", + pmp->pm_bpcluster, pmp->pm_cnshift)); + error = EINVAL; + goto error_exit; + } + + /* + * Release the bootsector buffer. + */ + brelse(bp, BC_AGE); + bp = NULL; + + /* + * Check FSInfo. + */ + if (pmp->pm_fsinfo) { + struct fsinfo *fp; + + /* + * XXX If the fsinfo block is stored on media with + * 2KB or larger sectors, is the fsinfo structure + * padded at the end or in the middle? + */ + DPRINTF(("%s(bread %lu)\n", __func__, + (unsigned long)de_bn2kb(pmp, pmp->pm_fsinfo))); + if ((error = bread(devvp, de_bn2kb(pmp, pmp->pm_fsinfo), + pmp->pm_BytesPerSec, 0, &bp)) != 0) + goto error_exit; + fp = (struct fsinfo *)bp->b_data; + if (!memcmp(fp->fsisig1, "RRaA", 4) + && !memcmp(fp->fsisig2, "rrAa", 4) + && !memcmp(fp->fsisig3, "\0\0\125\252", 4) + && !memcmp(fp->fsisig4, "\0\0\125\252", 4)) + pmp->pm_nxtfree = getulong(fp->fsinxtfree); + else + pmp->pm_fsinfo = 0; + brelse(bp, 0); + bp = NULL; + } + + /* + * Check and validate (or perhaps invalidate?) the fsinfo structure? + * XXX + */ + if (pmp->pm_fsinfo) { + if ((pmp->pm_nxtfree == 0xffffffffUL) || + (pmp->pm_nxtfree > pmp->pm_maxcluster)) + pmp->pm_fsinfo = 0; + } + + /* + * Allocate memory for the bitmap of allocated clusters, and then + * fill it in. + */ + pmp->pm_inusemap = ecalloc(sizeof(*pmp->pm_inusemap), + ((pmp->pm_maxcluster + N_INUSEBITS) / N_INUSEBITS)); + /* + * fillinusemap() needs pm_devvp. + */ + pmp->pm_dev = 0; + pmp->pm_devvp = devvp; + + /* + * Have the inuse map filled in. + */ + if ((error = fillinusemap(pmp)) != 0) { + DPRINTF(("fillinusemap %d\n", error)); + goto error_exit; + } + + /* + * Finish up. + */ + if (ronly) + pmp->pm_flags |= MSDOSFSMNT_RONLY; + else + pmp->pm_fmod = 1; + + /* + * If we ever do quotas for DOS filesystems this would be a place + * to fill in the info in the msdosfsmount structure. You dolt, + * quotas on dos filesystems make no sense because files have no + * owners on dos filesystems. of course there is some empty space + * in the directory entry where we could put uid's and gid's. + */ + + return pmp; + +error_exit: + if (bp) + brelse(bp, BC_AGE); + if (pmp) { + if (pmp->pm_inusemap) + free(pmp->pm_inusemap); + free(pmp); + } + errno = error; + return NULL; +} + +int +msdosfs_root(struct msdosfsmount *pmp, struct vnode *vp) { + struct denode *ndep; + int error; + + *vp = *pmp->pm_devvp; + if ((error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, &ndep)) != 0) { + errno = error; + return -1; + } + vp->v_data = ndep; + return 0; +} Added: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Jun 22 02:46:36 2017 (r320212) @@ -0,0 +1,647 @@ +/* $NetBSD: msdosfs_vnops.c,v 1.19 2017/04/13 17:10:12 christos Exp $ */ + +/*- + * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. + * Copyright (C) 1994, 1995, 1997 TooLs GmbH. + * All rights reserved. + * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + */ +/* + * Written by Paul Popelka (paulp@uts.amdahl.com) + * + * You can do anything you want with this software, just don't say you wrote + * it, and don't remove this notice. + * + * This software is provided "as is". + * + * The author supplies this software to be publicly redistributed on the + * understanding that the author is not responsible for the correct + * functioning of this software in any circumstances and is not liable for + * any damages caused by this software. + * + * October 1992 + */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "makefs.h" +#include "msdos.h" + +#ifdef MSDOSFS_DEBUG +#define DPRINTF(a) printf a +#else +#define DPRINTF(a) +#endif +/* + * Some general notes: + * + * In the ufs filesystem the inodes, superblocks, and indirect blocks are + * read/written using the vnode for the filesystem. Blocks that represent + * the contents of a file are read/written using the vnode for the file + * (including directories when they are read/written as files). This + * presents problems for the dos filesystem because data that should be in + * an inode (if dos had them) resides in the directory itself. Since we + * must update directory entries without the benefit of having the vnode + * for the directory we must use the vnode for the filesystem. This means + * that when a directory is actually read/written (via read, write, or + * readdir, or seek) we must use the vnode for the filesystem instead of + * the vnode for the directory as would happen in ufs. This is to insure we + * retrieve the correct block from the buffer cache since the hash value is + * based upon the vnode address and the desired block number. + */ + +static int msdosfs_wfile(const char *, struct denode *, fsnode *); + +static void +msdosfs_times(struct msdosfsmount *pmp, struct denode *dep, + const struct stat *st) +{ + struct timespec at; + struct timespec mt; + + if (stampst.st_ino) + st = &stampst; + +#ifndef HAVE_NBTOOL_CONFIG_H + at = st->st_atimespec; + mt = st->st_mtimespec; +#else + at.tv_sec = st->st_atime; + at.tv_nsec = 0; + mt.tv_sec = st->st_mtime; + mt.tv_nsec = 0; +#endif + unix2dostime(&at, pmp->pm_gmtoff, &dep->de_ADate, NULL, NULL); + unix2dostime(&mt, pmp->pm_gmtoff, &dep->de_MDate, &dep->de_MTime, NULL); +} + +/* + * When we search a directory the blocks containing directory entries are + * read and examined. The directory entries contain information that would + * normally be in the inode of a unix filesystem. This means that some of + * a directory's contents may also be in memory resident denodes (sort of + * an inode). This can cause problems if we are searching while some other + * process is modifying a directory. To prevent one process from accessing + * incompletely modified directory information we depend upon being the + * sole owner of a directory block. bread/brelse provide this service. + * This being the case, when a process modifies a directory it must first + * acquire the disk block that contains the directory entry to be modified. + * Then update the disk block and the denode, and then write the disk block + * out to disk. This way disk blocks containing directory entries and in + * memory denode's will be in synch. + */ +static int +msdosfs_findslot(struct denode *dp, struct componentname *cnp) +{ + daddr_t bn; + int error; + int slotcount; + int slotoffset = 0; + int frcn; + u_long cluster; + int blkoff; + u_int diroff; + int blsize; + struct msdosfsmount *pmp; + struct buf *bp = 0; + struct direntry *dep; + u_char dosfilename[12]; + int wincnt = 1; + int chksum = -1, chksum_ok; + int olddos = 1; + + pmp = dp->de_pmp; + + switch (unix2dosfn((const u_char *)cnp->cn_nameptr, dosfilename, + cnp->cn_namelen, 0)) { + case 0: + return (EINVAL); + case 1: + break; + case 2: + wincnt = winSlotCnt((const u_char *)cnp->cn_nameptr, + cnp->cn_namelen, pmp->pm_flags & MSDOSFSMNT_UTF8) + 1; + break; + case 3: + olddos = 0; + wincnt = winSlotCnt((const u_char *)cnp->cn_nameptr, + cnp->cn_namelen, pmp->pm_flags & MSDOSFSMNT_UTF8) + 1; + break; + } + + if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME) + wincnt = 1; + + /* + * Suppress search for slots unless creating + * file and at end of pathname, in which case + * we watch for a place to put the new file in + * case it doesn't already exist. + */ + slotcount = 0; + DPRINTF(("%s(): dos filename: %s\n", __func__, dosfilename)); + /* + * Search the directory pointed at by vdp for the name pointed at + * by cnp->cn_nameptr. + */ + /* + * The outer loop ranges over the clusters that make up the + * directory. Note that the root directory is different from all + * other directories. It has a fixed number of blocks that are not + * part of the pool of allocatable clusters. So, we treat it a + * little differently. The root directory starts at "cluster" 0. + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 22 05:10:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFE14DA5DE9; Thu, 22 Jun 2017 05:10:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 967D36A13A; Thu, 22 Jun 2017 05:10:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5AGAW031103; Thu, 22 Jun 2017 05:10:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5AGuo031102; Thu, 22 Jun 2017 05:10:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706220510.v5M5AGuo031102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 22 Jun 2017 05:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320216 - head/lib/libc/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:10:17 -0000 Author: delphij Date: Thu Jun 22 05:10:16 2017 New Revision: 320216 URL: https://svnweb.freebsd.org/changeset/base/320216 Log: Fix use-after-free introduced in r300388. In r300388, endnetconfig() was called on nc_handle which would release the associated netconfig structure, which means tmpnconf->nc_netid would be a use-after-free. Solve this by doing endnetconfig() in return paths instead. Reported by: jemalloc via kevlo Reviewed by: cem, ngie (earlier version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D11288 Modified: head/lib/libc/rpc/rpcb_clnt.c Modified: head/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- head/lib/libc/rpc/rpcb_clnt.c Thu Jun 22 04:40:11 2017 (r320215) +++ head/lib/libc/rpc/rpcb_clnt.c Thu Jun 22 05:10:16 2017 (r320216) @@ -499,14 +499,15 @@ try_nconf: hostname = IN6_LOCALHOST_STRING; } } - endnetconfig(nc_handle); if (tmpnconf == NULL) { + endnetconfig(nc_handle); rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; mutex_unlock(&loopnconf_lock); return (NULL); } loopnconf = getnetconfigent(tmpnconf->nc_netid); /* loopnconf is never freed */ + endnetconfig(nc_handle); } mutex_unlock(&loopnconf_lock); client = getclnthandle(hostname, loopnconf, NULL); From owner-svn-src-all@freebsd.org Thu Jun 22 05:22:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2BE7DA6365; Thu, 22 Jun 2017 05:22:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80D8E6A8E2; Thu, 22 Jun 2017 05:22:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5MLcu039351; Thu, 22 Jun 2017 05:22:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5MLFD039350; Thu, 22 Jun 2017 05:22:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706220522.v5M5MLFD039350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 22 Jun 2017 05:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320217 - stable/11/usr.sbin/rpc.lockd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:22:22 -0000 Author: delphij Date: Thu Jun 22 05:22:21 2017 New Revision: 320217 URL: https://svnweb.freebsd.org/changeset/base/320217 Log: MFC r320183: Reduce code duplication in rpc.lockd. Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM. As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter. Approved by: re (gjb) Modified: stable/11/usr.sbin/rpc.lockd/lockd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- stable/11/usr.sbin/rpc.lockd/lockd.c Thu Jun 22 05:10:16 2017 (r320216) +++ stable/11/usr.sbin/rpc.lockd/lockd.c Thu Jun 22 05:22:21 2017 (r320217) @@ -99,9 +99,8 @@ char localhost[] = "localhost"; static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); -void lookup_addresses(struct netconfig *nconf); +static void out_of_mem(void) __dead2; void init_nsm(void); -void out_of_mem(void); void usage(void); void sigalarm_handler(void); @@ -144,7 +143,6 @@ main(int argc, char **argv) break; case 'h': ++nhosts; - hosts_bak = hosts; hosts_bak = realloc(hosts, nhosts * sizeof(char *)); if (hosts_bak == NULL) { if (hosts != NULL) { @@ -172,7 +170,6 @@ main(int argc, char **argv) svcport_str = strdup(optarg); break; default: - case '?': usage(); /* NOTREACHED */ } @@ -227,7 +224,6 @@ main(int argc, char **argv) hosts[0] = strdup("*"); nhosts = 1; } else { - hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * sizeof(char *)); @@ -309,7 +305,7 @@ main(int argc, char **argv) if (have_v6 == 0 && strcmp(nconf->nc_protofmly, "inet6") == 0) { /* DO NOTHING */ } else { - lookup_addresses(nconf); + create_service(nconf); } } } @@ -482,9 +478,14 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate - * addresses. It gets called one time for each transport. + * addresses if lockd for user NLM, or perform a lookup of + * addresses for the kernel to create transports. + * + * It gets called one time for each transport. + * * It returns 0 upon success, 1 for ingore the call and -1 to indicate * bind failed with EADDRINUSE. + * * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. */ @@ -528,20 +529,23 @@ create_service(struct netconfig *nconf) nhostsbak = nhosts; while (nhostsbak > 0) { --nhostsbak; - sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); - if (sock_fd == NULL) - out_of_mem(); - sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; hints.ai_flags = AI_PASSIVE; - /* - * XXX - using RPC library internal functions. - */ - if ((fd = __rpc_nconf2fd(nconf)) < 0) { - syslog(LOG_ERR, "cannot create socket for %s", - nconf->nc_netid); - continue; + if (!kernel_lockd) { + sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); + if (sock_fd == NULL) + out_of_mem(); + sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ + + /* + * XXX - using RPC library internal functions. + */ + if ((fd = __rpc_nconf2fd(nconf)) < 0) { + syslog(LOG_ERR, "cannot create socket for %s", + nconf->nc_netid); + continue; + } } switch (hints.ai_family) { @@ -555,7 +559,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -570,7 +575,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -584,8 +590,7 @@ create_service(struct netconfig *nconf) */ if (strcmp("*", hosts[nhostsbak]) == 0) { if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) + if ((res = malloc(sizeof(struct addrinfo))) == NULL) out_of_mem(); mallocd_res = 1; res->ai_flags = hints.ai_flags; @@ -616,7 +621,7 @@ create_service(struct netconfig *nconf) break; default: syslog(LOG_ERR, - "bad addr fam %d", + "bad address family %d", res->ai_family); exit(1); } @@ -627,7 +632,8 @@ create_service(struct netconfig *nconf) "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -637,42 +643,62 @@ create_service(struct netconfig *nconf) syslog(LOG_ERR, "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } + if (kernel_lockd) { + struct netbuf servaddr; + char *uaddr; - /* Store the fd. */ - sock_fd[sock_fdcnt - 1] = fd; + /* + * Look up addresses for the kernel to create transports for. + */ + servaddr.len = servaddr.maxlen = res->ai_addrlen; + servaddr.buf = res->ai_addr; + uaddr = taddr2uaddr(nconf, &servaddr); - /* Now, attempt the bind. */ - r = bindresvport_sa(fd, res->ai_addr); - if (r != 0) { - if (errno == EADDRINUSE && mallocd_svcport != 0) { - if (mallocd_res != 0) { - free(res->ai_addr); - free(res); - } else - freeaddrinfo(res); - return (-1); + addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); + if (!addrs) + out_of_mem(); + addrs[2 * naddrs] = strdup(nconf->nc_netid); + addrs[2 * naddrs + 1] = uaddr; + naddrs++; + } else { + /* Store the fd. */ + sock_fd[sock_fdcnt - 1] = fd; + + /* Now, attempt the bind. */ + r = bindresvport_sa(fd, res->ai_addr); + if (r != 0) { + if (errno == EADDRINUSE && mallocd_svcport != 0) { + if (mallocd_res != 0) { + free(res->ai_addr); + free(res); + } else + freeaddrinfo(res); + return (-1); + } + syslog(LOG_ERR, "bindresvport_sa: %m"); + exit(1); } - syslog(LOG_ERR, "bindresvport_sa: %m"); - exit(1); - } - if (svcport_str == NULL) { - svcport_str = malloc(NI_MAXSERV * sizeof(char)); - if (svcport_str == NULL) - out_of_mem(); - mallocd_svcport = 1; + if (svcport_str == NULL) { + svcport_str = malloc(NI_MAXSERV * sizeof(char)); + if (svcport_str == NULL) + out_of_mem(); + mallocd_svcport = 1; - if (getnameinfo(res->ai_addr, - res->ai_addr->sa_len, NULL, NI_MAXHOST, - svcport_str, NI_MAXSERV * sizeof(char), - NI_NUMERICHOST | NI_NUMERICSERV)) - errx(1, "Cannot get port number"); + if (getnameinfo(res->ai_addr, + res->ai_addr->sa_len, NULL, NI_MAXHOST, + svcport_str, NI_MAXSERV * sizeof(char), + NI_NUMERICHOST | NI_NUMERICSERV)) + errx(1, "Cannot get port number"); + } } + if (mallocd_res != 0) { free(res->ai_addr); free(res); @@ -803,151 +829,6 @@ clearout_service(void) close(sock_fd[i]); } } -} - -/* - * Look up addresses for the kernel to create transports for. - */ -void -lookup_addresses(struct netconfig *nconf) -{ - struct addrinfo hints, *res = NULL; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; - struct __rpc_sockinfo si; - struct netbuf servaddr; - int aicode; - int nhostsbak; - u_int32_t host_addr[4]; /* IPv4 or IPv6 */ - char *uaddr; - - if ((nconf->nc_semantics != NC_TPI_CLTS) && - (nconf->nc_semantics != NC_TPI_COTS) && - (nconf->nc_semantics != NC_TPI_COTS_ORD)) - return; /* not my type */ - - /* - * XXX - using RPC library internal functions. - */ - if (!__rpc_nconf2sockinfo(nconf, &si)) { - syslog(LOG_ERR, "cannot get information for %s", - nconf->nc_netid); - return; - } - - /* Get rpc.statd's address on this transport */ - memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = si.si_af; - hints.ai_socktype = si.si_socktype; - hints.ai_protocol = si.si_proto; - - /* - * Bind to specific IPs if asked to - */ - nhostsbak = nhosts; - while (nhostsbak > 0) { - --nhostsbak; - - switch (hints.ai_family) { - case AF_INET: - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET6 address. - */ - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - case AF_INET6: - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET address. - */ - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - default: - break; - } - - /* - * If no hosts were specified, just bind to INADDR_ANY - */ - if (strcmp("*", hosts[nhostsbak]) == 0) { - if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) - out_of_mem(); - res->ai_flags = hints.ai_flags; - res->ai_family = hints.ai_family; - res->ai_protocol = hints.ai_protocol; - switch (res->ai_family) { - case AF_INET: - sin = malloc(sizeof(struct sockaddr_in)); - if (sin == NULL) - out_of_mem(); - sin->sin_family = AF_INET; - sin->sin_port = htons(0); - sin->sin_addr.s_addr = htonl(INADDR_ANY); - res->ai_addr = (struct sockaddr*) sin; - res->ai_addrlen = sizeof(struct sockaddr_in); - break; - case AF_INET6: - sin6 = malloc(sizeof(struct sockaddr_in6)); - if (sin6 == NULL) - out_of_mem(); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = htons(0); - sin6->sin6_addr = in6addr_any; - res->ai_addr = (struct sockaddr*) sin6; - res->ai_addrlen = sizeof(struct sockaddr_in6); - break; - default: - break; - } - } else { - if ((aicode = getaddrinfo(NULL, svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, - gai_strerror(aicode)); - continue; - } - } - } else { - if ((aicode = getaddrinfo(hosts[nhostsbak], svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); - continue; - } - } - - servaddr.len = servaddr.maxlen = res->ai_addrlen; - servaddr.buf = res->ai_addr; - uaddr = taddr2uaddr(nconf, &servaddr); - - addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); - if (!addrs) - out_of_mem(); - addrs[2 * naddrs] = strdup(nconf->nc_netid); - addrs[2 * naddrs + 1] = uaddr; - naddrs++; - } /* end while */ } void From owner-svn-src-all@freebsd.org Thu Jun 22 05:26:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63E6FDA647B; Thu, 22 Jun 2017 05:26:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEE86AA9D; Thu, 22 Jun 2017 05:26:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5Q9U5039538; Thu, 22 Jun 2017 05:26:09 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5Q9bL039534; Thu, 22 Jun 2017 05:26:09 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201706220526.v5M5Q9bL039534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 22 Jun 2017 05:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320218 - in stable/11/usr.bin: factor primes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:26:10 -0000 Author: cperciva Date: Thu Jun 22 05:26:08 2017 New Revision: 320218 URL: https://svnweb.freebsd.org/changeset/base/320218 Log: MFC r31956[12]: Teach primes(6) to enumerate primes up to 2^64 - 1. Approved by: re (delphij) Relnotes: primes(6) now enumerates primes beyond 3825123056546413050, up to a new limit of 2^64 - 1. > Description of fields to fill in above: 76 columns --| > PR: If and which Problem Report is related. > Submitted by: If someone else sent in the change. > Reported by: If someone else reported the issue. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. _M . M usr.bin/factor/factor.6 M usr.bin/primes/primes.c M usr.bin/primes/primes.h M usr.bin/primes/spsp.c Modified: stable/11/usr.bin/factor/factor.6 stable/11/usr.bin/primes/primes.c stable/11/usr.bin/primes/primes.h stable/11/usr.bin/primes/spsp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/factor/factor.6 ============================================================================== --- stable/11/usr.bin/factor/factor.6 Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/factor/factor.6 Thu Jun 22 05:26:08 2017 (r320218) @@ -119,9 +119,3 @@ cannot handle the factor list, .Nm primes will not get you a world record. -.Pp -.Nm primes -is unable to list primes between 3825123056546413050 and 18446744073709551615 -since it relies on strong pseudoprime tests after sieving, and nobody has -proven how many strong pseudoprime tests are required to prove primality for -integers larger than 3825123056546413050. Modified: stable/11/usr.bin/primes/primes.c ============================================================================== --- stable/11/usr.bin/primes/primes.c Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/primes.c Thu Jun 22 05:26:08 2017 (r320218) @@ -112,7 +112,7 @@ main(int argc, char *argv[]) argv += optind; start = 0; - stop = SPSPMAX; + stop = (uint64_t)(-1); /* * Convert low and high args. Strtoumax(3) sets errno to @@ -139,8 +139,6 @@ main(int argc, char *argv[]) err(1, "%s", argv[1]); if (*p != '\0') errx(1, "%s: illegal numeric format.", argv[1]); - if (stop > SPSPMAX) - errx(1, "%s: stop value too large.", argv[1]); break; case 1: /* Start on the command line. */ Modified: stable/11/usr.bin/primes/primes.h ============================================================================== --- stable/11/usr.bin/primes/primes.h Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/primes.h Thu Jun 22 05:26:08 2017 (r320218) @@ -72,6 +72,3 @@ extern const size_t pattern_size; /* length of pattern /* Test for primality using strong pseudoprime tests. */ int isprime(ubig); - -/* Maximum value which the SPSP code can handle. */ -#define SPSPMAX 3825123056546413050ULL Modified: stable/11/usr.bin/primes/spsp.c ============================================================================== --- stable/11/usr.bin/primes/spsp.c Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/spsp.c Thu Jun 22 05:26:08 2017 (r320218) @@ -32,23 +32,32 @@ __FBSDID("$FreeBSD$"); #include "primes.h" -/* Return a * b % n, where 0 <= a, b < 2^63, 0 < n < 2^63. */ +/* Return a * b % n, where 0 < n. */ static uint64_t mulmod(uint64_t a, uint64_t b, uint64_t n) { uint64_t x = 0; + uint64_t an = a % n; while (b != 0) { - if (b & 1) - x = (x + a) % n; - a = (a + a) % n; + if (b & 1) { + x += an; + if ((x < an) || (x >= n)) + x -= n; + } + if (an + an < an) + an = an + an - n; + else if (an + an >= n) + an = an + an - n; + else + an = an + an; b >>= 1; } return (x); } -/* Return a^r % n, where 0 <= a < 2^63, 0 < n < 2^63. */ +/* Return a^r % n, where 0 < n. */ static uint64_t powmod(uint64_t a, uint64_t r, uint64_t n) { @@ -173,9 +182,20 @@ isprime(ubig _n) if (n < 3825123056546413051) return (1); - /* We can't handle values larger than this. */ - assert(n <= SPSPMAX); + /* + * Value from: + * J. Sorenson and J. Webster, Strong pseudoprimes to twelve prime + * bases, Math. Comp. 86(304):985-1003, 2017. + */ - /* UNREACHABLE */ - return (0); + /* No SPSPs to bases 2..37 less than 318665857834031151167461. */ + if (!spsp(n, 29)) + return (0); + if (!spsp(n, 31)) + return (0); + if (!spsp(n, 37)) + return (0); + + /* All 64-bit values are less than 318665857834031151167461. */ + return (1); } From owner-svn-src-all@freebsd.org Thu Jun 22 05:30:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4F7DDA6607; Thu, 22 Jun 2017 05:30:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA556AC38; Thu, 22 Jun 2017 05:30:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5URVI039752; Thu, 22 Jun 2017 05:30:27 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5UR4w039751; Thu, 22 Jun 2017 05:30:27 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201706220530.v5M5UR4w039751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 22 Jun 2017 05:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320219 - stable/11/sys/dev/xen/netfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:30:28 -0000 Author: cperciva Date: Thu Jun 22 05:30:27 2017 New Revision: 320219 URL: https://svnweb.freebsd.org/changeset/base/320219 Log: MFC r319491: Skip setting the MTU in the netfront driver (xn# devices) if the new MTU is the same as the old MTU. In particular, on Amazon EC2 "T2" instances without this change, the network interface is reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained. Approved by: re (delphij) Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:26:08 2017 (r320218) +++ stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:30:27 2017 (r320219) @@ -1767,6 +1767,9 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif break; case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; + ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xn_ifinit(sc); From owner-svn-src-all@freebsd.org Thu Jun 22 05:34:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9EBBDA67D2; Thu, 22 Jun 2017 05:34:43 +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 8C1816AFF4; Thu, 22 Jun 2017 05:34:43 +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 v5M5Ygls043632; Thu, 22 Jun 2017 05:34:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5YgEk043630; Thu, 22 Jun 2017 05:34:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706220534.v5M5YgEk043630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 05:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320220 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:34:43 -0000 Author: bdrewery Date: Thu Jun 22 05:34:41 2017 New Revision: 320220 URL: https://svnweb.freebsd.org/changeset/base/320220 Log: Rework logic for skipping .depend/.meta file read/stat/writes. - Rename _SKIP_READ_DEPEND to _SKIP_DEPEND since it also avoids writing. - This now uses .NOMETA to avoid reading any .meta files related to DEPENDOBJS. Objects not in OBJS/DEPENDOBJS may still have their .meta files read in if they are in the dependency graph. - This also avoids statting .meta and .depend files in the META_MODE + -DNO_FILEMON case. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Thu Jun 22 05:30:27 2017 (r320219) +++ head/share/mk/bsd.dep.mk Thu Jun 22 05:34:41 2017 (r320220) @@ -86,10 +86,13 @@ _meta_filemon= 1 # Skip reading .depend when not needed to speed up tree-walks and simple # lookups. See _SKIP_BUILD logic in bsd.init.mk for more details. # Also skip generating or including .depend.* files if in meta+filemon mode -# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if defined(_SKIP_BUILD) || defined(_meta_filemon) -_SKIP_READ_DEPEND= 1 +# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used +# for _meta_filemon but not for _SKIP_DEPEND. +.if defined(_SKIP_BUILD) +_SKIP_DEPEND= 1 +.endif .if ${MK_DIRDEPS_BUILD} == "no" +.if defined(_SKIP_DEPEND) || defined(_meta_filemon) .MAKE.DEPENDFILE= /dev/null .endif .endif @@ -180,6 +183,15 @@ DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*. DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} .endif DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} +.if defined(_SKIP_DEPEND) +# Don't bother statting any .meta files for .depend* +${DEPENDOBJS}: .NOMETA +${DEPENDFILE}: .NOMETA +# Unset these to avoid looping/statting on them later. +.undef DEPENDSRCS +.undef DEPENDOBJS +.undef DEPENDFILES_OBJS +.endif # defined(_SKIP_DEPEND) DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+= -MT${.TARGET} .if !defined(_meta_filemon) @@ -191,7 +203,6 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS .else CFLAGS+= ${DEPEND_CFLAGS} .endif -.if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} .if ${MAKE_VERSION} < 20160220 .sinclude "${.OBJDIR}/${__depend_obj}" @@ -199,7 +210,6 @@ CFLAGS+= ${DEPEND_CFLAGS} .dinclude "${.OBJDIR}/${__depend_obj}" .endif .endfor -.endif # !defined(_SKIP_READ_DEPEND) .endif # !defined(_meta_filemon) .endif # defined(SRCS) @@ -266,11 +276,13 @@ DPSRCS+= ${SRCS} # targets are kept as they be used for generating something. The target is # kept to allow 'make depend' to generate files. ${DEPENDFILE}: ${DPSRCS} +.if !defined(_SKIP_DEPEND) .if exists(${.OBJDIR}/${DEPENDFILE}) || \ ((commands(beforedepend) || \ (!defined(_meta_filemon) && commands(_EXTRADEPEND)) || \ commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta)) rm -f ${DEPENDFILE} +.endif .endif .if !defined(_meta_filemon) && target(_EXTRADEPEND) _EXTRADEPEND: .USE Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Thu Jun 22 05:30:27 2017 (r320219) +++ head/sys/conf/kern.post.mk Thu Jun 22 05:34:41 2017 (r320220) @@ -199,12 +199,15 @@ _meta_filemon= 1 # Skip reading .depend when not needed to speed up tree-walks and simple # lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode -# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. +# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used +# for _meta_filemon but not for _SKIP_DEPEND. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \ ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ defined(_meta_filemon) -_SKIP_READ_DEPEND= 1 +_SKIP_DEPEND= 1 +.endif +.if defined(_SKIP_DEPEND) || defined(_meta_filemon) .MAKE.DEPENDFILE= /dev/null .endif @@ -218,6 +221,15 @@ DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./} .if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP .endif +.if defined(_SKIP_DEPEND) +# Don't bother reading any .meta files +${DEPENDOBJS}: .NOMETA +.depend: .NOMETA +# Unset these to avoid looping/statting on them later. +.undef DEPENDSRCS +.undef DEPENDOBJS +.undef DEPENDFILES_OBJS +.endif # defined(_SKIP_DEPEND) DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF.depend.${.TARGET} DEPEND_CFLAGS+= -MT${.TARGET} .if !defined(_meta_filemon) @@ -229,7 +241,6 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS .else CFLAGS+= ${DEPEND_CFLAGS} .endif -.if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} .if ${MAKE_VERSION} < 20160220 .sinclude "${.OBJDIR}/${__depend_obj}" @@ -237,7 +248,6 @@ CFLAGS+= ${DEPEND_CFLAGS} .dinclude "${.OBJDIR}/${__depend_obj}" .endif .endfor -.endif # !defined(_SKIP_READ_DEPEND) .endif # !defined(_meta_filemon) # Always run 'make depend' to generate dependencies early and to avoid the From owner-svn-src-all@freebsd.org Thu Jun 22 06:25:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E43FDA748A; Thu, 22 Jun 2017 06:25:35 +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 5278A6F460; Thu, 22 Jun 2017 06:25:35 +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 v5M6PYbT063787; Thu, 22 Jun 2017 06:25:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M6PYk6063786; Thu, 22 Jun 2017 06:25:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706220625.v5M6PYk6063786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 22 Jun 2017 06:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320221 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 06:25:35 -0000 Author: cy Date: Thu Jun 22 06:25:34 2017 New Revision: 320221 URL: https://svnweb.freebsd.org/changeset/base/320221 Log: poolflush() has no positional arguments. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Thu Jun 22 05:34:41 2017 (r320220) +++ head/contrib/ipfilter/tools/ippool.c Thu Jun 22 06:25:34 2017 (r320221) @@ -583,7 +583,7 @@ poolflush(argc, argv) break; /* keep compiler happy */ } - if (argc - 1 - optind > 0) + if (argc - optind > 0) usage(argv[0]); if (opts & OPT_DEBUG) From owner-svn-src-all@freebsd.org Thu Jun 22 07:08:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3DB8DA7DA0; Thu, 22 Jun 2017 07:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AE0570372; Thu, 22 Jun 2017 07:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M78KdG080632; Thu, 22 Jun 2017 07:08:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M78IYv080609; Thu, 22 Jun 2017 07:08:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220708.v5M78IYv080609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:08:21 -0000 Author: ngie Date: Thu Jun 22 07:08:18 2017 New Revision: 320222 URL: https://svnweb.freebsd.org/changeset/base/320222 Log: MFC r308139,r308157,r308160,r316818,r318250,r318443: r308139 (by bapt): cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d For automation tools it is way easier to maintain files in directories rather than modifying /etc/crontab. The files in those directories are in the same format as /etc/crontab Relnotes: yes r308157 (by bapt): Fix typo in cron(8) date r308160 (by bapt): syslogd(8): add an 'include' keyword All the '.conf' files not beginning with a '.' contained int he directory following the keyword will be included. This keyword can only be used in the first level configuration files. Modify the default syslogd.conf to 'include' /etc/syslog.d and /usr/local/etc/syslog.d It simplify a lot handling of syslog from automation tools. Relnotes: yes r316818: Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd /etc/pam.d/ftp* should be installed with MK_FTP != no and /etc/pam.d/telnetd should be installed when MK_TELNET != no. r318250: Handle the logfiles in newsyslog and syslogd conditionally, based on src.conf(5) knobs This will allow consumers of FreeBSD to use the unmodified configuration files out of the box more than previously. Both newsyslog.conf and syslog.conf: - /var/log/lpd-errs (MK_LPR != no) - /var/log/ppp.log (MK_PPP != no) - /var/log/xferlog (MK_FTP != no) newsyslog.conf: - /var/log/amd.log (MK_AMD != no) - /var/log/pflog (MK_PF != no) - /var/log/sendmail.st (MK_SENDMAIL != no) r318443: Conditionally handle the crontab entry for atrun(8) The default crontab prior to this commit assumes atrun(8) is always present, which isn't true if MK_AT == no. Move atrun(8) execution from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration is loaded and run atrun every 5 minutes like it would prior to this commit. SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at because atrun(8) executes programs, which may rely on environment set in the current default /etc/crontab. Noted by: bdrewery (in an internal review) Relnotes: yes (may need to add environmental modifications to /etc/cron.d/at) Added: stable/10/etc/cron.d/ - copied from r318443, head/etc/cron.d/ stable/10/etc/newsyslog.conf.d/amd.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/amd.conf stable/10/etc/newsyslog.conf.d/ftp.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/ftp.conf stable/10/etc/newsyslog.conf.d/lpr.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/lpr.conf stable/10/etc/newsyslog.conf.d/pf.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/pf.conf stable/10/etc/newsyslog.conf.d/ppp.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/ppp.conf stable/10/etc/newsyslog.conf.d/sendmail.conf - copied unchanged from r318250, head/etc/newsyslog.conf.d/sendmail.conf stable/10/etc/syslog.d/ - copied from r318250, head/etc/syslog.d/ Modified: stable/10/etc/Makefile stable/10/etc/cron.d/Makefile stable/10/etc/crontab stable/10/etc/mtree/BSD.root.dist stable/10/etc/newsyslog.conf stable/10/etc/newsyslog.conf.d/Makefile stable/10/etc/pam.d/Makefile stable/10/etc/syslog.conf stable/10/etc/syslog.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/cron/cron/cron.8 stable/10/usr.sbin/cron/cron/cron.h stable/10/usr.sbin/cron/cron/database.c stable/10/usr.sbin/cron/cron/pathnames.h stable/10/usr.sbin/cron/lib/misc.c stable/10/usr.sbin/syslogd/syslog.conf.5 stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -4,7 +4,9 @@ .include SUBDIR= \ - newsyslog.conf.d + cron.d \ + newsyslog.conf.d \ + syslog.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail Modified: stable/10/etc/cron.d/Makefile ============================================================================== --- head/etc/cron.d/Makefile Thu May 18 06:33:55 2017 (r318443) +++ stable/10/etc/cron.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include .if ${MK_AT} != "no" FILES+= at Modified: stable/10/etc/crontab ============================================================================== --- stable/10/etc/crontab Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/crontab Thu Jun 22 07:08:18 2017 (r320222) @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin # #minute hour mday month wday who command # -*/5 * * * * root /usr/libexec/atrun -# # Save some entropy so that /dev/random can re-seed on boot. */11 * * * * operator /usr/libexec/save-entropy # Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:08:18 2017 (r320222) @@ -30,6 +30,8 @@ .. bluetooth .. + cron.d + .. defaults .. devd @@ -71,6 +73,8 @@ ssh .. ssl + .. + syslog.d .. zfs .. Modified: stable/10/etc/newsyslog.conf ============================================================================== --- stable/10/etc/newsyslog.conf Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/newsyslog.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -18,7 +18,6 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J -/var/log/amd.log 644 7 100 * J /var/log/auth.log 600 7 100 @0101T JC /var/log/console.log 600 5 100 * J /var/log/cron 600 3 100 * JC @@ -26,18 +25,13 @@ /var/log/debug.log 600 7 100 * JC /var/log/init.log 644 3 100 * J /var/log/kerberos.log 600 7 100 * J -/var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 100 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN -/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid -/var/log/ppp.log root:network 640 3 100 * JC /var/log/devd.log 644 3 100 * JC /var/log/security 600 10 100 * JC -/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN -/var/log/xferlog 600 7 100 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: stable/10/etc/newsyslog.conf.d/Makefile ============================================================================== --- stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d FILES= +.if ${MK_AMD} != "no" +FILES+= amd.conf +.endif + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + .if ${MK_OFED} != "no" FILES+= opensm.conf +.endif + +.if ${MK_PF} != "no" +FILES+= pf.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail.conf .endif .include Copied and modified: stable/10/etc/newsyslog.conf.d/amd.conf (from r318250, head/etc/newsyslog.conf.d/amd.conf) ============================================================================== --- head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/amd.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/amd.log 644 7 1000 * J +/var/log/amd.log 644 7 100 * J Copied and modified: stable/10/etc/newsyslog.conf.d/ftp.conf (from r318250, head/etc/newsyslog.conf.d/ftp.conf) ============================================================================== --- head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/ftp.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/xferlog 600 7 1000 * JC +/var/log/xferlog 600 7 100 * JC Copied and modified: stable/10/etc/newsyslog.conf.d/lpr.conf (from r318250, head/etc/newsyslog.conf.d/lpr.conf) ============================================================================== --- head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/lpr.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/lpd-errs 644 7 1000 * JC +/var/log/lpd-errs 644 7 100 * JC Copied and modified: stable/10/etc/newsyslog.conf.d/pf.conf (from r318250, head/etc/newsyslog.conf.d/pf.conf) ============================================================================== --- head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/pf.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid +/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid Copied and modified: stable/10/etc/newsyslog.conf.d/ppp.conf (from r318250, head/etc/newsyslog.conf.d/ppp.conf) ============================================================================== --- head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/ppp.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/ppp.log root:network 640 3 1000 * JC +/var/log/ppp.log root:network 640 3 100 * JC Copied: stable/10/etc/newsyslog.conf.d/sendmail.conf (from r318250, head/etc/newsyslog.conf.d/sendmail.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/newsyslog.conf.d/sendmail.conf Thu Jun 22 07:08:18 2017 (r320222, copy of r318250, head/etc/newsyslog.conf.d/sendmail.conf) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/sendmail.st 640 10 * 168 BN Modified: stable/10/etc/pam.d/Makefile ============================================================================== --- stable/10/etc/pam.d/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/pam.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,23 +1,52 @@ # $FreeBSD$ +.include + NO_OBJ= +FILESGROUPS= FILES + FILES= README \ - atrun \ cron \ - ftpd \ imap \ login \ other \ passwd pop3 \ - rsh \ sshd su system \ - telnetd \ xdm FILESDIR= /etc/pam.d FILESMODE= 644 -FILESMODE_README= 444 + +.if ${MK_AT} != "no" +FILESGROUPS+= AT +AT+= atrun +ATDIR= ${FILESDIR} +ATMODE= ${FILESMODE} +.endif + +.if ${MK_FTP} != "no" +FILESGROUPS+= FTP +FTP+= ftpd +FTPDIR= ${FILESDIR} +FTPMODE= ${FILESMODE} LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp +.endif + +.if ${MK_RCMDS} != "no" +FILESGROUPS+= RCMDS +RCMDS+= rsh +RCMDSDIR= ${FILESDIR} +RCMDSMODE= ${FILESMODE} +.endif + +.if ${MK_TELNET} != "no" +FILESGROUPS+= TELNET +TELNET+= telnetd +TELNETDIR= ${FILESDIR} +TELNETMODE= ${FILESMODE} +.endif + +FILESMODE_README= 444 .include Modified: stable/10/etc/syslog.conf ============================================================================== --- stable/10/etc/syslog.conf Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/syslog.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -10,8 +10,6 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog -lpr.info /var/log/lpd-errs -ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -31,6 +29,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log -!ppp -*.* /var/log/ppp.log !* +include /etc/syslog.d +include /usr/local/etc/syslog.d Modified: stable/10/etc/syslog.d/Makefile ============================================================================== --- head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) +++ stable/10/etc/syslog.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include .if ${MK_FTP} != "no" FILES+= ftp.conf Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:08:18 2017 (r320222) @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1063,7 +1064,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.gz .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf +OLD_FILES+=etc/pam.d/ftp +OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -3816,7 +3821,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8.gz .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd +OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -4192,6 +4199,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinstall .endif .if ${MK_PF} == no +OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -4260,7 +4268,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif .if ${MK_PPP} == no +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf +OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -4460,6 +4470,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects @@ -4778,6 +4789,7 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat .endif .if ${MK_TELNET} == no +OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz Modified: stable/10/usr.sbin/cron/cron/cron.8 ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:08:18 2017 (r320222) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2008 +.Dd October 31, 2016 .Dt CRON 8 .Os .Sh NAME @@ -52,7 +52,11 @@ The .Nm utility also searches for .Pa /etc/crontab -which is in a different format (see +and files in +.Pa /etc/cron.d +and +.Pa /usr/local/etc/cron.d +which are in a different format (see .Xr crontab 5 ) . .Pp The Modified: stable/10/usr.sbin/cron/cron/cron.h ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:08:18 2017 (r320222) @@ -218,7 +218,7 @@ void set_cron_uid(void), unget_char(int, FILE *), free_entry(entry *), skip_comments(FILE *), - log_it(char *, int, char *, char *), + log_it(char *, int, char *, const char *), log_close(void); int job_runqueue(void), Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:08:18 2017 (r320222) @@ -45,9 +45,18 @@ load_database(old_db) DIR *dir; struct stat statbuf; struct stat syscron_stat; + time_t maxmtime; DIR_T *dp; cron_db new_db; user *u, *nu; + struct { + const char *name; + struct stat st; + } syscrontabs [] = { + { SYSCRONTABS }, + { LOCALSYSCRONTABS } + }; + int i; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -65,6 +74,16 @@ load_database(old_db) if (stat(SYSCRONTAB, &syscron_stat) < OK) syscron_stat.st_mtime = 0; + maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + + for (i = 0; i < nitems(syscrontabs); i++) { + if (stat(syscrontabs[i].name, &syscrontabs[i].st) != -1) { + maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); + } else { + syscrontabs[i].st.st_mtime = 0; + } + } + /* if spooldir's mtime has not changed, we don't need to fiddle with * the database. * @@ -72,7 +91,7 @@ load_database(old_db) * so is guaranteed to be different than the stat() mtime the first * time this function is called. */ - if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { + if (old_db->mtime == maxmtime) { Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", getpid())) return; @@ -83,13 +102,36 @@ load_database(old_db) * actually changed. Whatever is left in the old database when * we're done is chaff -- crontabs that disappeared. */ - new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + new_db.mtime = maxmtime; new_db.head = new_db.tail = NULL; if (syscron_stat.st_mtime) { process_crontab("root", SYS_NAME, SYSCRONTAB, &syscron_stat, &new_db, old_db); + } + + for (i = 0; i < nitems(syscrontabs); i++) { + char tabname[MAXPATHLEN]; + if (syscrontabs[i].st.st_mtime == 0) + continue; + if (!(dir = opendir(syscrontabs[i].name))) { + log_it("CRON", getpid(), "OPENDIR FAILED", + syscrontabs[i].name); + (void) exit(ERROR_EXIT); + } + + while (NULL != (dp = readdir(dir))) { + if (dp->d_name[0] == '.') + continue; + if (dp->d_type != DT_REG) + continue; + snprintf(tabname, sizeof(tabname), "%s/%s", + syscrontabs[i].name, dp->d_name); + process_crontab("root", SYS_NAME, tabname, + &syscrontabs[i].st, &new_db, old_db); + } + closedir(dir); } /* we used to keep this dir open all the time, for the sake of Modified: stable/10/usr.sbin/cron/cron/pathnames.h ============================================================================== --- stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:08:18 2017 (r320222) @@ -62,6 +62,8 @@ /* 4.3BSD-style crontab */ #define SYSCRONTAB "/etc/crontab" +#define SYSCRONTABS "/etc/cron.d" +#define LOCALSYSCRONTABS "/usr/local/etc/cron.d" /* what editor to use if no EDITOR or VISUAL * environment variable specified. Modified: stable/10/usr.sbin/cron/lib/misc.c ============================================================================== --- stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:08:18 2017 (r320222) @@ -385,11 +385,7 @@ out: if (allow) void -log_it(username, xpid, event, detail) - char *username; - int xpid; - char *event; - char *detail; +log_it(char *username, int xpid, char *event, const char *detail) { #if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; Modified: stable/10/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:08:18 2017 (r320222) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd November 1, 2016 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -61,6 +61,12 @@ The field is separated from the .Em action field by one or more tab characters or spaces. +.Pp +A special +.Em include +keyword can be used to include all files with names ending in '.conf' and not +beginning with a '.' contained in the directory following the keyword. +This keyword can only be used in the first level configuration file. .Pp Note that if you use spaces as separators, your .Nm Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:08:18 2017 (r320222) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -120,6 +121,8 @@ __FBSDID("$FreeBSD$"); const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; +static const char include_str[] = "include"; +static const char include_ext[] = ".conf"; #define dprintf if (Debug) printf @@ -1548,96 +1551,46 @@ die(int signo) exit(1); } -/* - * INIT -- Initialize syslogd from configuration table - */ -static void -init(int signo) +static int +configfiles(const struct dirent *dp) { - int i; - FILE *cf; - struct filed *f, *next, **nextp; - char *p; - char cline[LINE_MAX]; - char prog[LINE_MAX]; - char host[MAXHOSTNAMELEN]; - char oldLocalHostName[MAXHOSTNAMELEN]; - char hostMsg[2*MAXHOSTNAMELEN+40]; - char bootfileMsg[LINE_MAX]; + const char *p; + size_t ext_len; - dprintf("init\n"); + if (dp->d_name[0] == '.') + return (0); - /* - * Load hostname (may have changed). - */ - if (signo != 0) - (void)strlcpy(oldLocalHostName, LocalHostName, - sizeof(oldLocalHostName)); - if (gethostname(LocalHostName, sizeof(LocalHostName))) - err(EX_OSERR, "gethostname() failed"); - if ((p = strchr(LocalHostName, '.')) != NULL) { - *p++ = '\0'; - LocalDomain = p; - } else { - LocalDomain = ""; - } + ext_len = sizeof(include_ext) -1; - /* - * Close all open log files. - */ - Initialized = 0; - for (f = Files; f != NULL; f = next) { - /* flush any pending output */ - if (f->f_prevcount) - fprintlog(f, 0, (char *)NULL); + if (dp->d_namlen <= ext_len) + return (0); - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - if (f->f_un.f_pipe.f_pid > 0) { - close_filed(f); - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - } - f->f_un.f_pipe.f_pid = 0; - break; - } - next = f->f_next; - if (f->f_program) free(f->f_program); - if (f->f_host) free(f->f_host); - free((char *)f); - } - Files = NULL; - nextp = &Files; + p = &dp->d_name[dp->d_namlen - ext_len]; + if (strcmp(p, include_ext) != 0) + return (0); - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - *nextp = (struct filed *)calloc(1, sizeof(*f)); - if (*nextp == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.ERR\t/dev/console", *nextp, "*", "*"); - (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); - if ((*nextp)->f_next == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); - Initialized = 1; - return; - } + return (1); +} +static void +readconfigfile(FILE *cf, struct filed **nextp, int allow_includes) +{ + FILE *cf2; + struct filed *f; + struct dirent **ent; + char cline[LINE_MAX]; + char host[MAXHOSTNAMELEN]; + char prog[LINE_MAX]; + char file[MAXPATHLEN]; + char *p, *tmp; + int i, nents; + size_t include_len; + /* * Foreach line in the conf table, open that file. */ f = NULL; + include_len = sizeof(include_str) -1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); while (fgets(cline, sizeof(cline), cf) != NULL) { @@ -1650,6 +1603,42 @@ init(int signo) continue; if (*p == 0) continue; + if (allow_includes && + strncmp(p, include_str, include_len) == 0 && + isspace(p[include_len])) { + p += include_len; + while (isspace(*p)) + p++; + tmp = p; + while (*tmp != '\0' && !isspace(*tmp)) + tmp++; + *tmp = '\0'; + dprintf("Trying to include files in '%s'\n", p); + nents = scandir(p, &ent, configfiles, alphasort); + if (nents == -1) { + dprintf("Unable to open '%s': %s\n", p, + strerror(errno)); + continue; + } + for (i = 0; i < nents; i++) { + if (snprintf(file, sizeof(file), "%s/%s", p, + ent[i]->d_name) >= (int)sizeof(file)) { + dprintf("ignoring path too long: " + "'%s/%s'\n", p, ent[i]->d_name); + free(ent[i]); + continue; + } + free(ent[i]); + cf2 = fopen(file, "r"); + if (cf2 == NULL) + continue; + dprintf("reading %s\n", file); + readconfigfile(cf2, nextp, 0); + fclose(cf2); + } + free(ent); + continue; + } if (*p == '#') { p++; if (*p != '!' && *p != '+' && *p != '-') @@ -1711,6 +1700,91 @@ init(int signo) nextp = &f->f_next; cfline(cline, f, prog, host); } +} + +/* + * INIT -- Initialize syslogd from configuration table + */ +static void +init(int signo) +{ + int i; + FILE *cf; + struct filed *f, *next, **nextp; + char *p; + char oldLocalHostName[MAXHOSTNAMELEN]; + char hostMsg[2*MAXHOSTNAMELEN+40]; + char bootfileMsg[LINE_MAX]; + + dprintf("init\n"); + + /* + * Load hostname (may have changed). + */ + if (signo != 0) + (void)strlcpy(oldLocalHostName, LocalHostName, + sizeof(oldLocalHostName)); + if (gethostname(LocalHostName, sizeof(LocalHostName))) + err(EX_OSERR, "gethostname() failed"); + if ((p = strchr(LocalHostName, '.')) != NULL) { + *p++ = '\0'; + LocalDomain = p; + } else { + LocalDomain = ""; + } + + /* + * Close all open log files. + */ + Initialized = 0; + for (f = Files; f != NULL; f = next) { + /* flush any pending output */ + if (f->f_prevcount) + fprintlog(f, 0, (char *)NULL); + + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + close_filed(f); + break; + case F_PIPE: + if (f->f_un.f_pipe.f_pid > 0) { + close_filed(f); + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); + } + f->f_un.f_pipe.f_pid = 0; + break; + } + next = f->f_next; + if (f->f_program) free(f->f_program); + if (f->f_host) free(f->f_host); + free((char *)f); + } + Files = NULL; + + /* open the configuration file */ + if ((cf = fopen(ConfFile, "r")) == NULL) { + dprintf("cannot open %s\n", ConfFile); + *nextp = (struct filed *)calloc(1, sizeof(*f)); + if (*nextp == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.ERR\t/dev/console", *nextp, "*", "*"); + (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); + if ((*nextp)->f_next == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); + Initialized = 1; + return; + } + + readconfigfile(cf, &Files, 1); /* close the configuration file */ (void)fclose(cf); From owner-svn-src-all@freebsd.org Thu Jun 22 07:10:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6276BDA7E60; Thu, 22 Jun 2017 07:10:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3233870596; Thu, 22 Jun 2017 07:10:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7A1ON080922; Thu, 22 Jun 2017 07:10:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7A1xN080921; Thu, 22 Jun 2017 07:10:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220710.v5M7A1xN080921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320223 - stable/10/usr.sbin/cron/cron X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:10:02 -0000 Author: ngie Date: Thu Jun 22 07:10:01 2017 New Revision: 320223 URL: https://svnweb.freebsd.org/changeset/base/320223 Log: MFC r308158: r308158 (by bapt): Allow symlinks to be followed in cron.d directories and fix detection of regular files on NFS Modified: stable/10/usr.sbin/cron/cron/database.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:08:18 2017 (r320222) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:10:01 2017 (r320223) @@ -44,7 +44,7 @@ load_database(old_db) { DIR *dir; struct stat statbuf; - struct stat syscron_stat; + struct stat syscron_stat, st; time_t maxmtime; DIR_T *dp; cron_db new_db; @@ -124,7 +124,8 @@ load_database(old_db) while (NULL != (dp = readdir(dir))) { if (dp->d_name[0] == '.') continue; - if (dp->d_type != DT_REG) + if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 && + !S_ISREG(st.st_mode)) continue; snprintf(tabname, sizeof(tabname), "%s/%s", syscrontabs[i].name, dp->d_name); From owner-svn-src-all@freebsd.org Thu Jun 22 07:14:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA59DA8048; Thu, 22 Jun 2017 07:14:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8509170948; Thu, 22 Jun 2017 07:14:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7EbWH084864; Thu, 22 Jun 2017 07:14:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7EbQb084863; Thu, 22 Jun 2017 07:14:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220714.v5M7EbQb084863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320224 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:14:40 -0000 Author: ngie Date: Thu Jun 22 07:14:37 2017 New Revision: 320224 URL: https://svnweb.freebsd.org/changeset/base/320224 Log: MFC r309194,r309216: r309194 (by bapt): initialize *nextp which could be left uninitialized in case the configuration file cannot be open/read CID: 1365665 r309216 (by bapt): Properly initialize nextp Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:10:01 2017 (r320223) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:14:37 2017 (r320224) @@ -1764,6 +1764,7 @@ init(int signo) free((char *)f); } Files = NULL; + nextp = &Files; /* open the configuration file */ if ((cf = fopen(ConfFile, "r")) == NULL) { From owner-svn-src-all@freebsd.org Thu Jun 22 07:35:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9973DA83D7; Thu, 22 Jun 2017 07:35:24 +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 757AC7110A; Thu, 22 Jun 2017 07:35:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1ADAB10AB01; Thu, 22 Jun 2017 03:35:16 -0400 (EDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201706220708.v5M78IYv080609@repo.freebsd.org> From: John Baldwin Message-ID: Date: Thu, 22 Jun 2017 03:35:15 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706220708.v5M78IYv080609@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 22 Jun 2017 03:35:16 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:35:24 -0000 On 6/22/17 3:08 AM, Ngie Cooper wrote: > Author: ngie > Date: Thu Jun 22 07:08:18 2017 > New Revision: 320222 > URL: https://svnweb.freebsd.org/changeset/base/320222 > > Log: > MFC r308139,r308157,r308160,r316818,r318250,r318443: > > r308139 (by bapt): > > cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d > > For automation tools it is way easier to maintain files in directories rather > than modifying /etc/crontab. > > The files in those directories are in the same format as /etc/crontab > > Relnotes: yes > > r308157 (by bapt): > > Fix typo in cron(8) date > > r308160 (by bapt): > > syslogd(8): add an 'include' keyword > > All the '.conf' files not beginning with a '.' contained int he directory > following the keyword will be included. > > This keyword can only be used in the first level configuration files. > > Modify the default syslogd.conf to 'include' /etc/syslog.d and > /usr/local/etc/syslog.d > > It simplify a lot handling of syslog from automation tools. > > Relnotes: yes > > r316818: > > Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd > > /etc/pam.d/ftp* should be installed with MK_FTP != no and > /etc/pam.d/telnetd should be installed when MK_TELNET != no. > > r318250: > > Handle the logfiles in newsyslog and syslogd conditionally, based on > src.conf(5) knobs > > This will allow consumers of FreeBSD to use the unmodified configuration > files out of the box more than previously. > > Both newsyslog.conf and syslog.conf: > - /var/log/lpd-errs (MK_LPR != no) > - /var/log/ppp.log (MK_PPP != no) > - /var/log/xferlog (MK_FTP != no) > > newsyslog.conf: > - /var/log/amd.log (MK_AMD != no) > - /var/log/pflog (MK_PF != no) > - /var/log/sendmail.st (MK_SENDMAIL != no) > > r318443: > > Conditionally handle the crontab entry for atrun(8) > > The default crontab prior to this commit assumes atrun(8) is always > present, which isn't true if MK_AT == no. Move atrun(8) execution > from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation > on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration > is loaded and run atrun every 5 minutes like it would prior to this commit. > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > because atrun(8) executes programs, which may rely on environment > set in the current default /etc/crontab. > > Noted by: bdrewery (in an internal review) > Relnotes: yes (may need to add environmental modifications to > /etc/cron.d/at) Please revert the breakout of the existing config files. I think that splitting up the conf files is too disruptive of a change (POLA) for stable branches. This was agreed to by other folks in the followup thread to the commits in head that you continue to ignore. In head please either fully split up the files or revert to a single file (another part of that thread you continue to ignore). -- John Baldwin From owner-svn-src-all@freebsd.org Thu Jun 22 07:42:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88ADDA8717; Thu, 22 Jun 2017 07:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EDDE71768; Thu, 22 Jun 2017 07:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7ga66097153; Thu, 22 Jun 2017 07:42:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7gaGk097152; Thu, 22 Jun 2017 07:42:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220742.v5M7gaGk097152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320228 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:42:37 -0000 Author: ngie Date: Thu Jun 22 07:42:36 2017 New Revision: 320228 URL: https://svnweb.freebsd.org/changeset/base/320228 Log: MFC r318545: Install {cron.d,newsyslog.conf.d,syslog.d} via `make distribution`, not `make install` I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file, and continued using it in r318441 and r318443. This will fix the files being handled improperly via installworld, preventing tools like etcupdate, mergemaster, etc from functioning properly when comparing the installed contents on a system vs the contents in a source tree when doing merges. PR: 219404 MFC with: r277541, r318441, r318443 Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 07:37:10 2017 (r320227) +++ stable/10/etc/Makefile Thu Jun 22 07:42:36 2017 (r320228) @@ -3,11 +3,6 @@ .include -SUBDIR= \ - cron.d \ - newsyslog.conf.d \ - syslog.d - .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif @@ -243,9 +238,11 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif + ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install + ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif @@ -255,6 +252,7 @@ distribution: .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap + ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ From owner-svn-src-all@freebsd.org Thu Jun 22 07:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1996DA8AEF; Thu, 22 Jun 2017 07:54:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A80D71DF8; Thu, 22 Jun 2017 07:54:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7sEGN001586; Thu, 22 Jun 2017 07:54:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7sCnX001572; Thu, 22 Jun 2017 07:54:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220754.v5M7sCnX001572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320229 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:54:22 -0000 Author: ngie Date: Thu Jun 22 07:54:12 2017 New Revision: 320229 URL: https://svnweb.freebsd.org/changeset/base/320229 Log: Revert r320222,r320223,r320224 The committed changes (reverted after this commit) break POLA on a stable branch. Requested by: jhb Deleted: stable/10/etc/cron.d/ stable/10/etc/newsyslog.conf.d/amd.conf stable/10/etc/newsyslog.conf.d/ftp.conf stable/10/etc/newsyslog.conf.d/lpr.conf stable/10/etc/newsyslog.conf.d/pf.conf stable/10/etc/newsyslog.conf.d/ppp.conf stable/10/etc/newsyslog.conf.d/sendmail.conf stable/10/etc/syslog.d/ Modified: stable/10/etc/crontab stable/10/etc/mtree/BSD.root.dist stable/10/etc/newsyslog.conf stable/10/etc/newsyslog.conf.d/Makefile stable/10/etc/pam.d/Makefile stable/10/etc/syslog.conf stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/cron/cron/cron.8 stable/10/usr.sbin/cron/cron/cron.h stable/10/usr.sbin/cron/cron/database.c stable/10/usr.sbin/cron/cron/pathnames.h stable/10/usr.sbin/cron/lib/misc.c stable/10/usr.sbin/syslogd/syslog.conf.5 stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/crontab ============================================================================== --- stable/10/etc/crontab Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/crontab Thu Jun 22 07:54:12 2017 (r320229) @@ -7,6 +7,8 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin # #minute hour mday month wday who command # +*/5 * * * * root /usr/libexec/atrun +# # Save some entropy so that /dev/random can re-seed on boot. */11 * * * * operator /usr/libexec/save-entropy # Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:54:12 2017 (r320229) @@ -30,8 +30,6 @@ .. bluetooth .. - cron.d - .. defaults .. devd @@ -73,8 +71,6 @@ ssh .. ssl - .. - syslog.d .. zfs .. Modified: stable/10/etc/newsyslog.conf ============================================================================== --- stable/10/etc/newsyslog.conf Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/newsyslog.conf Thu Jun 22 07:54:12 2017 (r320229) @@ -18,6 +18,7 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J +/var/log/amd.log 644 7 100 * J /var/log/auth.log 600 7 100 @0101T JC /var/log/console.log 600 5 100 * J /var/log/cron 600 3 100 * JC @@ -25,13 +26,18 @@ /var/log/debug.log 600 7 100 * JC /var/log/init.log 644 3 100 * J /var/log/kerberos.log 600 7 100 * J +/var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 100 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN +/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid +/var/log/ppp.log root:network 640 3 100 * JC /var/log/devd.log 644 3 100 * JC /var/log/security 600 10 100 * JC +/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN +/var/log/xferlog 600 7 100 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: stable/10/etc/newsyslog.conf.d/Makefile ============================================================================== --- stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:54:12 2017 (r320229) @@ -6,32 +6,8 @@ BINDIR= /etc/newsyslog.conf.d FILES= -.if ${MK_AMD} != "no" -FILES+= amd.conf -.endif - -.if ${MK_FTP} != "no" -FILES+= ftp.conf -.endif - -.if ${MK_LPR} != "no" -FILES+= lpr.conf -.endif - .if ${MK_OFED} != "no" FILES+= opensm.conf -.endif - -.if ${MK_PF} != "no" -FILES+= pf.conf -.endif - -.if ${MK_PPP} != "no" -FILES+= ppp.conf -.endif - -.if ${MK_SENDMAIL} != "no" -FILES+= sendmail.conf .endif .include Modified: stable/10/etc/pam.d/Makefile ============================================================================== --- stable/10/etc/pam.d/Makefile Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/pam.d/Makefile Thu Jun 22 07:54:12 2017 (r320229) @@ -1,52 +1,23 @@ # $FreeBSD$ -.include - NO_OBJ= -FILESGROUPS= FILES - FILES= README \ + atrun \ cron \ + ftpd \ imap \ login \ other \ passwd pop3 \ + rsh \ sshd su system \ + telnetd \ xdm FILESDIR= /etc/pam.d FILESMODE= 644 - -.if ${MK_AT} != "no" -FILESGROUPS+= AT -AT+= atrun -ATDIR= ${FILESDIR} -ATMODE= ${FILESMODE} -.endif - -.if ${MK_FTP} != "no" -FILESGROUPS+= FTP -FTP+= ftpd -FTPDIR= ${FILESDIR} -FTPMODE= ${FILESMODE} -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp -.endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= rsh -RCMDSDIR= ${FILESDIR} -RCMDSMODE= ${FILESMODE} -.endif - -.if ${MK_TELNET} != "no" -FILESGROUPS+= TELNET -TELNET+= telnetd -TELNETDIR= ${FILESDIR} -TELNETMODE= ${FILESMODE} -.endif - FILESMODE_README= 444 +LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp .include Modified: stable/10/etc/syslog.conf ============================================================================== --- stable/10/etc/syslog.conf Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/syslog.conf Thu Jun 22 07:54:12 2017 (r320229) @@ -10,6 +10,8 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog +lpr.info /var/log/lpd-errs +ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -29,6 +31,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log +!ppp +*.* /var/log/ppp.log !* -include /etc/syslog.d -include /usr/local/etc/syslog.d Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:54:12 2017 (r320229) @@ -56,7 +56,6 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map -OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1064,11 +1063,7 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.gz .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers -OLD_FILES+=etc/newsyslog.conf.d/ftp.conf -OLD_FILES+=etc/pam.d/ftp -OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd -OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -3821,9 +3816,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8.gz .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap -OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd -OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -4199,7 +4192,6 @@ OLD_DIRS+=usr/share/examples/pc-sysinstall .endif .if ${MK_PF} == no -OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -4268,9 +4260,7 @@ OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif .if ${MK_PPP} == no -OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf -OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -4470,7 +4460,6 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no -OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects @@ -4789,7 +4778,6 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat .endif .if ${MK_TELNET} == no -OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz Modified: stable/10/usr.sbin/cron/cron/cron.8 ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:54:12 2017 (r320229) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2016 +.Dd June 29, 2008 .Dt CRON 8 .Os .Sh NAME @@ -52,11 +52,7 @@ The .Nm utility also searches for .Pa /etc/crontab -and files in -.Pa /etc/cron.d -and -.Pa /usr/local/etc/cron.d -which are in a different format (see +which is in a different format (see .Xr crontab 5 ) . .Pp The Modified: stable/10/usr.sbin/cron/cron/cron.h ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:54:12 2017 (r320229) @@ -218,7 +218,7 @@ void set_cron_uid(void), unget_char(int, FILE *), free_entry(entry *), skip_comments(FILE *), - log_it(char *, int, char *, const char *), + log_it(char *, int, char *, char *), log_close(void); int job_runqueue(void), Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:54:12 2017 (r320229) @@ -44,19 +44,10 @@ load_database(old_db) { DIR *dir; struct stat statbuf; - struct stat syscron_stat, st; - time_t maxmtime; + struct stat syscron_stat; DIR_T *dp; cron_db new_db; user *u, *nu; - struct { - const char *name; - struct stat st; - } syscrontabs [] = { - { SYSCRONTABS }, - { LOCALSYSCRONTABS } - }; - int i; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -74,16 +65,6 @@ load_database(old_db) if (stat(SYSCRONTAB, &syscron_stat) < OK) syscron_stat.st_mtime = 0; - maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); - - for (i = 0; i < nitems(syscrontabs); i++) { - if (stat(syscrontabs[i].name, &syscrontabs[i].st) != -1) { - maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); - } else { - syscrontabs[i].st.st_mtime = 0; - } - } - /* if spooldir's mtime has not changed, we don't need to fiddle with * the database. * @@ -91,7 +72,7 @@ load_database(old_db) * so is guaranteed to be different than the stat() mtime the first * time this function is called. */ - if (old_db->mtime == maxmtime) { + if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", getpid())) return; @@ -102,37 +83,13 @@ load_database(old_db) * actually changed. Whatever is left in the old database when * we're done is chaff -- crontabs that disappeared. */ - new_db.mtime = maxmtime; + new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); new_db.head = new_db.tail = NULL; if (syscron_stat.st_mtime) { process_crontab("root", SYS_NAME, SYSCRONTAB, &syscron_stat, &new_db, old_db); - } - - for (i = 0; i < nitems(syscrontabs); i++) { - char tabname[MAXPATHLEN]; - if (syscrontabs[i].st.st_mtime == 0) - continue; - if (!(dir = opendir(syscrontabs[i].name))) { - log_it("CRON", getpid(), "OPENDIR FAILED", - syscrontabs[i].name); - (void) exit(ERROR_EXIT); - } - - while (NULL != (dp = readdir(dir))) { - if (dp->d_name[0] == '.') - continue; - if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 && - !S_ISREG(st.st_mode)) - continue; - snprintf(tabname, sizeof(tabname), "%s/%s", - syscrontabs[i].name, dp->d_name); - process_crontab("root", SYS_NAME, tabname, - &syscrontabs[i].st, &new_db, old_db); - } - closedir(dir); } /* we used to keep this dir open all the time, for the sake of Modified: stable/10/usr.sbin/cron/cron/pathnames.h ============================================================================== --- stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:54:12 2017 (r320229) @@ -62,8 +62,6 @@ /* 4.3BSD-style crontab */ #define SYSCRONTAB "/etc/crontab" -#define SYSCRONTABS "/etc/cron.d" -#define LOCALSYSCRONTABS "/usr/local/etc/cron.d" /* what editor to use if no EDITOR or VISUAL * environment variable specified. Modified: stable/10/usr.sbin/cron/lib/misc.c ============================================================================== --- stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:54:12 2017 (r320229) @@ -385,7 +385,11 @@ out: if (allow) void -log_it(char *username, int xpid, char *event, const char *detail) +log_it(username, xpid, event, detail) + char *username; + int xpid; + char *event; + char *detail; { #if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; Modified: stable/10/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:54:12 2017 (r320229) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 1, 2016 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -61,12 +61,6 @@ The field is separated from the .Em action field by one or more tab characters or spaces. -.Pp -A special -.Em include -keyword can be used to include all files with names ending in '.conf' and not -beginning with a '.' contained in the directory following the keyword. -This keyword can only be used in the first level configuration file. .Pp Note that if you use spaces as separators, your .Nm Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:54:12 2017 (r320229) @@ -97,7 +97,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -121,8 +120,6 @@ __FBSDID("$FreeBSD$"); const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; -static const char include_str[] = "include"; -static const char include_ext[] = ".conf"; #define dprintf if (Debug) printf @@ -1551,46 +1548,96 @@ die(int signo) exit(1); } -static int -configfiles(const struct dirent *dp) +/* + * INIT -- Initialize syslogd from configuration table + */ +static void +init(int signo) { - const char *p; - size_t ext_len; + int i; + FILE *cf; + struct filed *f, *next, **nextp; + char *p; + char cline[LINE_MAX]; + char prog[LINE_MAX]; + char host[MAXHOSTNAMELEN]; + char oldLocalHostName[MAXHOSTNAMELEN]; + char hostMsg[2*MAXHOSTNAMELEN+40]; + char bootfileMsg[LINE_MAX]; - if (dp->d_name[0] == '.') - return (0); + dprintf("init\n"); - ext_len = sizeof(include_ext) -1; + /* + * Load hostname (may have changed). + */ + if (signo != 0) + (void)strlcpy(oldLocalHostName, LocalHostName, + sizeof(oldLocalHostName)); + if (gethostname(LocalHostName, sizeof(LocalHostName))) + err(EX_OSERR, "gethostname() failed"); + if ((p = strchr(LocalHostName, '.')) != NULL) { + *p++ = '\0'; + LocalDomain = p; + } else { + LocalDomain = ""; + } - if (dp->d_namlen <= ext_len) - return (0); + /* + * Close all open log files. + */ + Initialized = 0; + for (f = Files; f != NULL; f = next) { + /* flush any pending output */ + if (f->f_prevcount) + fprintlog(f, 0, (char *)NULL); - p = &dp->d_name[dp->d_namlen - ext_len]; - if (strcmp(p, include_ext) != 0) - return (0); + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + close_filed(f); + break; + case F_PIPE: + if (f->f_un.f_pipe.f_pid > 0) { + close_filed(f); + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); + } + f->f_un.f_pipe.f_pid = 0; + break; + } + next = f->f_next; + if (f->f_program) free(f->f_program); + if (f->f_host) free(f->f_host); + free((char *)f); + } + Files = NULL; + nextp = &Files; - return (1); -} + /* open the configuration file */ + if ((cf = fopen(ConfFile, "r")) == NULL) { + dprintf("cannot open %s\n", ConfFile); + *nextp = (struct filed *)calloc(1, sizeof(*f)); + if (*nextp == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.ERR\t/dev/console", *nextp, "*", "*"); + (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); + if ((*nextp)->f_next == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); + Initialized = 1; + return; + } -static void -readconfigfile(FILE *cf, struct filed **nextp, int allow_includes) -{ - FILE *cf2; - struct filed *f; - struct dirent **ent; - char cline[LINE_MAX]; - char host[MAXHOSTNAMELEN]; - char prog[LINE_MAX]; - char file[MAXPATHLEN]; - char *p, *tmp; - int i, nents; - size_t include_len; - /* * Foreach line in the conf table, open that file. */ f = NULL; - include_len = sizeof(include_str) -1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); while (fgets(cline, sizeof(cline), cf) != NULL) { @@ -1603,42 +1650,6 @@ readconfigfile(FILE *cf, struct filed **nextp, int all continue; if (*p == 0) continue; - if (allow_includes && - strncmp(p, include_str, include_len) == 0 && - isspace(p[include_len])) { - p += include_len; - while (isspace(*p)) - p++; - tmp = p; - while (*tmp != '\0' && !isspace(*tmp)) - tmp++; - *tmp = '\0'; - dprintf("Trying to include files in '%s'\n", p); - nents = scandir(p, &ent, configfiles, alphasort); - if (nents == -1) { - dprintf("Unable to open '%s': %s\n", p, - strerror(errno)); - continue; - } - for (i = 0; i < nents; i++) { - if (snprintf(file, sizeof(file), "%s/%s", p, - ent[i]->d_name) >= (int)sizeof(file)) { - dprintf("ignoring path too long: " - "'%s/%s'\n", p, ent[i]->d_name); - free(ent[i]); - continue; - } - free(ent[i]); - cf2 = fopen(file, "r"); - if (cf2 == NULL) - continue; - dprintf("reading %s\n", file); - readconfigfile(cf2, nextp, 0); - fclose(cf2); - } - free(ent); - continue; - } if (*p == '#') { p++; if (*p != '!' && *p != '+' && *p != '-') @@ -1700,92 +1711,6 @@ readconfigfile(FILE *cf, struct filed **nextp, int all nextp = &f->f_next; cfline(cline, f, prog, host); } -} - -/* - * INIT -- Initialize syslogd from configuration table - */ -static void -init(int signo) -{ - int i; - FILE *cf; - struct filed *f, *next, **nextp; - char *p; - char oldLocalHostName[MAXHOSTNAMELEN]; - char hostMsg[2*MAXHOSTNAMELEN+40]; - char bootfileMsg[LINE_MAX]; - - dprintf("init\n"); - - /* - * Load hostname (may have changed). - */ - if (signo != 0) - (void)strlcpy(oldLocalHostName, LocalHostName, - sizeof(oldLocalHostName)); - if (gethostname(LocalHostName, sizeof(LocalHostName))) - err(EX_OSERR, "gethostname() failed"); - if ((p = strchr(LocalHostName, '.')) != NULL) { - *p++ = '\0'; - LocalDomain = p; - } else { - LocalDomain = ""; - } - - /* - * Close all open log files. - */ - Initialized = 0; - for (f = Files; f != NULL; f = next) { - /* flush any pending output */ - if (f->f_prevcount) - fprintlog(f, 0, (char *)NULL); - - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - if (f->f_un.f_pipe.f_pid > 0) { - close_filed(f); - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - } - f->f_un.f_pipe.f_pid = 0; - break; - } - next = f->f_next; - if (f->f_program) free(f->f_program); - if (f->f_host) free(f->f_host); - free((char *)f); - } - Files = NULL; - nextp = &Files; - - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - *nextp = (struct filed *)calloc(1, sizeof(*f)); - if (*nextp == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.ERR\t/dev/console", *nextp, "*", "*"); - (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); - if ((*nextp)->f_next == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); - Initialized = 1; - return; - } - - readconfigfile(cf, &Files, 1); /* close the configuration file */ (void)fclose(cf); From owner-svn-src-all@freebsd.org Thu Jun 22 07:57:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA0D9DA8B85; Thu, 22 Jun 2017 07:57:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A30071F54; Thu, 22 Jun 2017 07:57:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7vT9v001790; Thu, 22 Jun 2017 07:57:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7vTT2001789; Thu, 22 Jun 2017 07:57:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220757.v5M7vTT2001789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320230 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:57:30 -0000 Author: ngie Date: Thu Jun 22 07:57:29 2017 New Revision: 320230 URL: https://svnweb.freebsd.org/changeset/base/320230 Log: Revert r320228 as well See r320229 for the other related revert commit. Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 07:54:12 2017 (r320229) +++ stable/10/etc/Makefile Thu Jun 22 07:57:29 2017 (r320230) @@ -3,6 +3,9 @@ .include +SUBDIR= \ + newsyslog.conf.d + .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif @@ -238,11 +241,9 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif - ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install - ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif @@ -252,7 +253,6 @@ distribution: .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap - ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ From owner-svn-src-all@freebsd.org Thu Jun 22 08:02:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F94ADA8F09; Thu, 22 Jun 2017 08:02:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::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 0F56B72307; Thu, 22 Jun 2017 08:02:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x242.google.com with SMTP id 185so3290264itv.3; Thu, 22 Jun 2017 01:02:31 -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=4PZ7q7+1sqM07icE3ubRi/M7PHEkrT9f3I5DYbDZRo8=; b=dm3PVI/rXhFyeMbzUY8h95Fc04AYJpgk+4NkXL1nnXYmzOZ3bDg9716LZCIHQS+MAY wbI2drKyW/NW5MyQXQSunuprYqJWuiFHR/fz/FpvcnswFlN+XhQMeWRLxU8k6njnq6gj gXRVbI/17ZQFku0ApBZv0x8A7dTkfK3fMY0d4cQqSOgZKnCs1sQnNKZ1DSPwLbBFC6s1 J217TK5fbWJo4zVlrdl5TDhGcDdKDo2Bvvo+NwK65fjX6atHqV6At2UB5yHozELvyhA7 3wNflaEVGRw/i9+4MEWgcVqAMXOSZWkh30VELQ6acGP4bQb4QtkRotIhzVQu8hSnHfnm isVw== 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=4PZ7q7+1sqM07icE3ubRi/M7PHEkrT9f3I5DYbDZRo8=; b=KDJDzkdZz/791PPy0EEPJ5Uv/zQE6kM++N4X/ntsuboN2wrIfqCQiD3dKQykxOPRFU 74rG/sK1CuVJI6AWCVh6HK7LKx8OhAs1AQ6CrFuMtg7ynPcqvkvxNJmcsJ+U/ln0LuP5 lJTFOX6iYA2B7U8fRcyZyd4/0yudeIP4cWb1dFvqpRpybeMuOACD1XXV/G0wVcPN8D/y 8c9JQi2KOCmjfJx9EZX1PD1E5CBKmLJf447spKZCOTgZXGVoIA12RWbAxaXL5/WTz424 0lyHGg+IvZDefYWiDh8jJjn6fvfa7JPk8P02SMnZSTGhUA+L0Z5LkxcKLg3IsM0mrpAE jJzQ== X-Gm-Message-State: AKS2vOxtFRzi9nIMbEM8/w2mGc+Wy5NpbL25CKTEmxwGz9kkEFy6N2dp LnuuAwZiMrNhFjfNV7o= X-Received: by 10.36.227.72 with SMTP id d69mr725304ith.121.1498118550368; Thu, 22 Jun 2017 01:02:30 -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 197sm470001ity.5.2017.06.22.01.02.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 01:02:29 -0700 (PDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 22 Jun 2017 01:02:28 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> References: <201706220708.v5M78IYv080609@repo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 08:02:31 -0000 --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 22, 2017, at 00:35, John Baldwin wrote: =E2=80=A6 > Please revert the breakout of the existing config files. I think that = splitting > up the conf files is too disruptive of a change (POLA) for stable = branches. Done in r320229 and r320230. > This was agreed to by other folks in the followup thread to the = commits in > head that you continue to ignore. > In head please either fully split up the files or revert to a single = file > (another part of that thread you continue to ignore). My eyes glazed over trying to read through all of the posts. I = seem to have missed the point where a proposed change was made to split = up the config files further. Could this please be summarized again? Thank you, -Ngie --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F 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 iQIcBAEBCgAGBQJZS3mUAAoJEPWDqSZpMIYV/4AP/2fl4PvIjVRUfnf5kJ2Vld0S xmgLBIs9FuVEJ1fkUykiV5USsPVEpMeZ3TIoGqRA0K0YE4ubzOWPaPYudoOBQka7 vFpyqyIqT40zA0VkscV8uZ9oe8MKHKfQE7I6Kig8Vj6wH1Bu3AobWctjrzDxOgD9 MfjULGI7i9oWpZAUZsUxfyuSeyAybGUzDVlibItPQvWslTHl/U31kxeIwN/eQ/kX k9TF9JrGV/A23h83OrzsdH+Uq188KUjgNhI1Z0At2iYx8uDJsbE3y5ZJ2pjnT+FP WAwqnKYOeRwwF4zbeWUMY85WkWm4zllkGvOUqnSXHZacS7l8AAMBMoJEf+O2+dDj P44QzeC1aUTN+07MfgqiJcJYxbwMH4ZvdkZW0VRrwuXY8yzxLrgyT8uaYDe7U12P dwhG6KoVSeQBxjr1rHiwkuTRqTurSTBynLRZABFwVlfX4kDUZCx1Pi0PlrLTdrma qeBUsZT1jcZYiwk86LNYPvweWGPWtfyCvcNoJ2bxoHGvG7crU2UdapHgniFNy7JK ShPnanky0a/Rmxmy6ntwpZvVxwLJuBNkVEeadzeHSJ4y9VC9eTeNwfQoq6eSlUxs hnHWCIuxtRpz3MNeRMDrEmX7mOO2Ko3MqY0DBv1SDZHGZlmVQgCF6KSVcaZzgjCh NA8hn1IvJJufkNh0zNM7 =HkVD -----END PGP SIGNATURE----- --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F-- From owner-svn-src-all@freebsd.org Thu Jun 22 10:28:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE580D88E6F; Thu, 22 Jun 2017 10:28:29 +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 934ED7622D; Thu, 22 Jun 2017 10:28:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id E202C10AF01; Thu, 22 Jun 2017 06:28:27 -0400 (EDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd To: "Ngie Cooper (yaneurabeya)" References: <201706220708.v5M78IYv080609@repo.freebsd.org> <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: John Baldwin Message-ID: Date: Thu, 22 Jun 2017 06:28:26 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 22 Jun 2017 06:28:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 10:28:29 -0000 On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: > >> On Jun 22, 2017, at 00:35, John Baldwin wrote: > > … > >> Please revert the breakout of the existing config files. I think that splitting >> up the conf files is too disruptive of a change (POLA) for stable branches. > > Done in r320229 and r320230. I haven't checked if this was merged to 11, but if so, I think they should also stay a single conf file in 11 for the same reason. >> This was agreed to by other folks in the followup thread to the commits in >> head that you continue to ignore. > > >> In head please either fully split up the files or revert to a single file >> (another part of that thread you continue to ignore). > > My eyes glazed over trying to read through all of the posts. I seem to have missed the point where a proposed change was made to split up the config files further. Could this please be summarized again? I think that having the files partially split up is the worst of both worlds as folks writing config management rules, etc. have to use different approaches depending on the rule. I think that is a headache and would rather have the config either be all in a single file, or all be split up into conf.d/ so that it is consistent. I also think that when splitting up a conf file we should do it all at once so that there is only one painful /etc merge instead of several of them. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Jun 22 11:03:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B172ED897A9; Thu, 22 Jun 2017 11:03:43 +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 8ABF27708E; Thu, 22 Jun 2017 11:03:43 +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 v5MB3g74078265; Thu, 22 Jun 2017 11:03:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MB3g2T078264; Thu, 22 Jun 2017 11:03:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706221103.v5MB3g2T078264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Jun 2017 11:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320231 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 11:03:43 -0000 Author: kib Date: Thu Jun 22 11:03:42 2017 New Revision: 320231 URL: https://svnweb.freebsd.org/changeset/base/320231 Log: MFC r319975: Some minor improvements to vnode_pager_generic_putpages(). Approved by: re (marius) Modified: stable/11/sys/vm/vnode_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vnode_pager.c ============================================================================== --- stable/11/sys/vm/vnode_pager.c Thu Jun 22 07:57:29 2017 (r320230) +++ stable/11/sys/vm/vnode_pager.c Thu Jun 22 11:03:42 2017 (r320231) @@ -1158,7 +1158,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page vm_ooffset_t poffset; struct uio auio; struct iovec aiov; - int count, error, i, maxsize, ncount, ppscheck; + int count, error, i, maxsize, ncount, pgoff, ppscheck; static struct timeval lastfail; static int curfail; @@ -1169,10 +1169,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page rtvals[i] = VM_PAGER_ERROR; if ((int64_t)ma[0]->pindex < 0) { - printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%lx)\n", - (long)ma[0]->pindex, (u_long)ma[0]->dirty); + printf("vnode_pager_generic_putpages: " + "attempt to write meta-data 0x%jx(%lx)\n", + (uintmax_t)ma[0]->pindex, (u_long)ma[0]->dirty); rtvals[0] = VM_PAGER_BAD; - return VM_PAGER_BAD; + return (VM_PAGER_BAD); } maxsize = count * PAGE_SIZE; @@ -1195,8 +1196,6 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page VM_OBJECT_WLOCK(object); if (maxsize + poffset > object->un_pager.vnp.vnp_size) { if (object->un_pager.vnp.vnp_size > poffset) { - int pgoff; - maxsize = object->un_pager.vnp.vnp_size - poffset; ncount = btoc(maxsize); if ((pgoff = (int)maxsize & PAGE_MASK) != 0) { @@ -1210,6 +1209,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page vm_page_assert_sbusied(m); KASSERT(!pmap_page_is_write_mapped(m), ("vnode_pager_generic_putpages: page %p is not read-only", m)); + MPASS(m->dirty != 0); vm_page_clear_dirty(m, pgoff, PAGE_SIZE - pgoff); } @@ -1217,15 +1217,14 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page maxsize = 0; ncount = 0; } - if (ncount < count) { - for (i = ncount; i < count; i++) { - rtvals[i] = VM_PAGER_BAD; - } - } + for (i = ncount; i < count; i++) + rtvals[i] = VM_PAGER_BAD; } + for (i = 0; i < ncount - ((btoc(maxsize) & PAGE_MASK) != 0); i++) + MPASS(ma[i]->dirty == VM_PAGE_BITS_ALL); VM_OBJECT_WUNLOCK(object); - aiov.iov_base = (caddr_t) 0; + aiov.iov_base = NULL; aiov.iov_len = maxsize; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; @@ -1233,26 +1232,23 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page auio.uio_segflg = UIO_NOCOPY; auio.uio_rw = UIO_WRITE; auio.uio_resid = maxsize; - auio.uio_td = (struct thread *) 0; + auio.uio_td = NULL; error = VOP_WRITE(vp, &auio, vnode_pager_putpages_ioflags(flags), curthread->td_ucred); PCPU_INC(cnt.v_vnodeout); PCPU_ADD(cnt.v_vnodepgsout, ncount); ppscheck = 0; - if (error) { - if ((ppscheck = ppsratecheck(&lastfail, &curfail, 1))) - printf("vnode_pager_putpages: I/O error %d\n", error); - } - if (auio.uio_resid) { - if (ppscheck || ppsratecheck(&lastfail, &curfail, 1)) - printf("vnode_pager_putpages: residual I/O %zd at %lu\n", - auio.uio_resid, (u_long)ma[0]->pindex); - } - for (i = 0; i < ncount; i++) { + if (error != 0 && (ppscheck = ppsratecheck(&lastfail, &curfail, 1)) + != 0) + printf("vnode_pager_putpages: I/O error %d\n", error); + if (auio.uio_resid != 0 && (ppscheck != 0 || + ppsratecheck(&lastfail, &curfail, 1) != 0)) + printf("vnode_pager_putpages: residual I/O %zd at %ju\n", + auio.uio_resid, (uintmax_t)ma[0]->pindex); + for (i = 0; i < ncount; i++) rtvals[i] = VM_PAGER_OK; - } - return rtvals[0]; + return (rtvals[0]); } int From owner-svn-src-all@freebsd.org Thu Jun 22 12:11:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C332D8B39B; Thu, 22 Jun 2017 12:11:39 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::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 C87D378F75; Thu, 22 Jun 2017 12:11:38 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ua0-x22a.google.com with SMTP id j53so14745872uaa.2; Thu, 22 Jun 2017 05:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=jwQtg49DerrQwEJl+yX2TQQPFbZvQOz1rAaVSMhrHJc=; b=FHYH1MK7QCVC8enrXLPgIcx9Rr5uwx03rjYaUdJIRCVyarqTaqGYqBYbV75wNDHH1j U2PTyVp/uA7OeZufsbmFJgrC79k6bR+pZ7E+kVnjuOg5sMYjdVVbzoqojkEmWak5w/Sa aN0s+5zVACs8ypuZcPedrJ6x/1Y5jidbXi4X7CoZR3vXsdPMpu6mIqddWiI45qbMcUIa bA995N5LFdYYP/dvU5vCchK+iMDB71uKf164eelVjrpXS5hflZwuE2nvZ6Mp8HLGi04H IJY8aYeECzq/TlbFNnLlvWWvntFX4NCKTDigXLb3KFLUzFcWRsJaGLzndmjbrC/ifKa3 whNQ== 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=jwQtg49DerrQwEJl+yX2TQQPFbZvQOz1rAaVSMhrHJc=; b=As8xJWqJJ5T1lJiwdhUyOqAyWu+gQDyIbrp+7+fCpRi8T/9+b8+28swJxQuBgdMdl7 C9fAy82YYlUK3q61O0SP9nIUO43nzkcyn+1Ibr5c3lwybCPpiBc707C8aoLBnGu3E43g dZI8PokM+eb+b3eO4bujyAeqMigALD1AaQflLMrYogT66Wel2yH+W26CZnb0DdttibdV 7P6439Crg5WpNFXGKdtRAlB99nU3YcWhqKVt5oOrujUd35Gv7/v9q4YaxzIoQqIxecFj 6btmyY4oIe2NKYiWngymsZNybaCTLAPQytFoeFrX0q211NG5aOj4x2otge9RQv+cf0Hw xumA== X-Gm-Message-State: AKS2vOzL0MlOAScf+TSiTJQj4RMHyhkKg3DMHqdzIcAtAqpIQNjwVACP 20W9jCPzDCO+N84Lxj6JBQeS0Kw52g== X-Received: by 10.159.32.133 with SMTP id 5mr1806614uaa.123.1498133497817; Thu, 22 Jun 2017 05:11:37 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.83.198 with HTTP; Thu, 22 Jun 2017 05:11:37 -0700 (PDT) In-Reply-To: <201706202052.v5KKq6AD038653@repo.freebsd.org> References: <201706202052.v5KKq6AD038653@repo.freebsd.org> From: Edward Napierala Date: Thu, 22 Jun 2017 13:11:37 +0100 X-Google-Sender-Auth: ICKE-uDzkOXIT3uYQbwvMBjEu4U Message-ID: Subject: Re: svn commit: r320174 - head/share/mk To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 12:11:39 -0000 2017-06-20 21:52 GMT+01:00 Bryan Drewery : > Author: bdrewery > Date: Tue Jun 20 20:52:06 2017 > New Revision: 320174 > URL: https://svnweb.freebsd.org/changeset/base/320174 > > Log: > Fix 'make clean all' to work again. > > This likely broke completely with r308599. > > Apply the same fix for 'make destroy' which is a DIRDEPS_BUILD thing. Thanks! From owner-svn-src-all@freebsd.org Thu Jun 22 12:46:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73DD8D8BDE7; Thu, 22 Jun 2017 12:46:49 +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 3A8157A2BF; Thu, 22 Jun 2017 12:46:49 +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 v5MCkmie019416; Thu, 22 Jun 2017 12:46:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MCkmZX019415; Thu, 22 Jun 2017 12:46:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706221246.v5MCkmZX019415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 22 Jun 2017 12:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320232 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 12:46:49 -0000 Author: cy Date: Thu Jun 22 12:46:48 2017 New Revision: 320232 URL: https://svnweb.freebsd.org/changeset/base/320232 Log: In poolnodcommand(): TTL (-T) is only valid when adding a node to a pool (ippool -a) not when removing a node from a pool (ippool -r). Flag -T as an error in ippool -r. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Thu Jun 22 11:03:42 2017 (r320231) +++ head/contrib/ipfilter/tools/ippool.c Thu Jun 22 12:46:48 2017 (r320232) @@ -201,10 +201,14 @@ poolnodecommand(remove, argc, argv) } break; case 'T' : - ttl = atoi(optarg); - if (ttl < 0) { - fprintf(stderr, "cannot set negative ttl\n"); - return -1; + if (remove == 0) { + ttl = atoi(optarg); + if (ttl < 0) { + fprintf(stderr, "cannot set negative ttl\n"); + return -1; + } + } else { + usage(argv[0]); } break; case 'v' : From owner-svn-src-all@freebsd.org Thu Jun 22 13:31:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1203D8C8F4; Thu, 22 Jun 2017 13:31:45 +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 6F6457B78F; Thu, 22 Jun 2017 13:31:45 +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 v5MDVi2l041978; Thu, 22 Jun 2017 13:31:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MDViwv041977; Thu, 22 Jun 2017 13:31:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706221331.v5MDViwv041977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Jun 2017 13:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320233 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 13:31:45 -0000 Author: gjb Date: Thu Jun 22 13:31:44 2017 New Revision: 320233 URL: https://svnweb.freebsd.org/changeset/base/320233 Log: Document r320218, primes(6) updated to new limit of 2^64-1. Document r320164, qlnxe(4) firmware and hardware support updates. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 22 12:46:48 2017 (r320232) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 22 13:31:44 2017 (r320233) @@ -247,6 +247,11 @@ The &man.cxgbetool.8; utility has been added, providing command-line access to features and debugging facilities of &man.cxgbe.4; devices. + + The &man.primes.6; utility now + enumerates primes beyond + 3825123056546413050, up to a new limit of + 2^64 - 1. @@ -711,6 +716,12 @@ The &man.cxgbe.4; driver has been updated to firmware version 1.16.45.0 for T4, T5, and T6 cards. + + The &man.qlnxe.4; driver has been + updated to support QLE41XXX hardware. + + The &man.qlnxe.4; driver firmware has + been updated to version 8.30.0.0. From owner-svn-src-all@freebsd.org Thu Jun 22 14:08:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ACA6D8D008; Thu, 22 Jun 2017 14:08:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 DA6897C454; Thu, 22 Jun 2017 14:08:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id y7so3124701pfd.3; Thu, 22 Jun 2017 07:08:58 -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=1QyW2NkyjfvQuQuEZPQKfg6CG/4z3TNgnRXT+Pi80ic=; b=MKsi4jxtruvpCt8Hm0STWF6FkKcmNgGAvaq62YUuy3msZ5AifngxMI9nT3QHvVixX+ ZkMLS/URltP0vc4LKHXBzD59QI25K6g+HhE2jjiq8ME9FN3tf6F1s60ysYjXkq/uAkZf Pmkz2aya/tWrSNKaD3uwJGKLFZgBIRESpkY6Lo1PN9VqonttcOrOTDsvyyBm3lWhRLRc bkngiD/yj5HEpSV0tHQXAPwZbrcHj8SlTa83c32Lo9RsFVommYEf9AWaBMz9eNUN5qdj F1h+pGCLpa6NsaW1oE3S8E6K5vO1UvFlwt/R53JcAsEgjAZPuuFU4b/fGotFfppEfvnx lhJQ== 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=1QyW2NkyjfvQuQuEZPQKfg6CG/4z3TNgnRXT+Pi80ic=; b=SNj0zJ+rSaat/hlVuplTGDxoYSd7vrHuAyhH+3nSeqU5p6FBbZksLTAsDzaqm8uoiS ca0r/wyOyeX6Ot2ohQdLpbdINTnOLS31KjSrNNmkWxED9irdToK/HgaeVQH4fcNujlUb WDSKVEfMC5874TWz6NMFAASIh1jAsYgTUM7t7LAPFohtMhCfqFnFabdAUDC7utayvTc0 V0T5QgY6ieyWythA96HRI2PAU4aoTb3MZwHsZZoImq+syasE5g8AD9J6QPJ+x37jtzWN wAqxPQK7mE+iWdnAdCl+3oOW6ad3gabIrGZF0GP7Gb91Y4kiIv3442L7aUSafdya/VfT Z00Q== X-Gm-Message-State: AKS2vOzbpU2HfNB9bLD7WymsliU7ffV9rSsfC2yl06adian2h0/lWzT5 aGqvWQjcZneOYn2SlcA= X-Received: by 10.98.92.3 with SMTP id q3mr2793226pfb.65.1498140538023; Thu, 22 Jun 2017 07:08:58 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o2sm4255665pgq.44.2017.06.22.07.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 07:08:56 -0700 (PDT) Content-Type: text/plain; charset=cp932 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: Date: Thu, 22 Jun 2017 07:08:55 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <52481168-DCDD-4D6A-8F68-1EBDA44513D1@gmail.com> References: <201706220708.v5M78IYv080609@repo.freebsd.org> <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 14:08:59 -0000 > On Jun 22, 2017, at 03:28, John Baldwin wrote: >=20 >> On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Jun 22, 2017, at 00:35, John Baldwin wrote: >>=20 >> =81c >>=20 >>> Please revert the breakout of the existing config files. I think that s= plitting >>> up the conf files is too disruptive of a change (POLA) for stable branch= es. >>=20 >> Done in r320229 and r320230. >=20 > I haven't checked if this was merged to 11, but if so, I think they should= also > stay a single conf file in 11 for the same reason. No, it wasn't merged to 11, so no further action required here. >>> This was agreed to by other folks in the followup thread to the commits i= n >>> head that you continue to ignore. >>=20 >>=20 >>> In head please either fully split up the files or revert to a single fil= e >>> (another part of that thread you continue to ignore). >>=20 >> My eyes glazed over trying to read through all of the posts. I seem to= have missed the point where a proposed change was made to split up the conf= ig files further. Could this please be summarized again? >=20 > I think that having the files partially split up is the worst of both > worlds as folks writing config management rules, etc. have to use > different approaches depending on the rule. I think that is a headache > and would rather have the config either be all in a single file, or all > be split up into conf.d/ so that it is consistent. I also think that > when splitting up a conf file we should do it all at once so that there is= > only one painful /etc merge instead of several of them. This still doesn't answer my concern fully. In what way are the config files= in base not broken down 100%, i.e., what action can I take to resolve your c= oncerns about it not being fully modularized? I think syslog.conf having ker= beros.log is likely the last issue, but I would really like clarification in= order to move forward. If there isn't any actionable feedback here, I'll call what's done in head "= good enough", not MFC the changes, and move on to other pressing tasks. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Thu Jun 22 14:30:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E6DD8D717; Thu, 22 Jun 2017 14:30:10 +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 751627D03C; Thu, 22 Jun 2017 14:30:10 +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 v5MEU9th063376; Thu, 22 Jun 2017 14:30:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MEU9Zc063375; Thu, 22 Jun 2017 14:30:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706221430.v5MEU9Zc063375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Jun 2017 14:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320234 - head/sys/boot/efi/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 14:30:10 -0000 Author: emaste Date: Thu Jun 22 14:30:09 2017 New Revision: 320234 URL: https://svnweb.freebsd.org/changeset/base/320234 Log: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR The EFI memory descriptor 64-bit aligns PhysicalStart on both 32- and 64-bit platforms. Make the padding explicit for i386 EFI. Submitted by: Siva Mahadevan MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11301 Modified: head/sys/boot/efi/include/efidef.h Modified: head/sys/boot/efi/include/efidef.h ============================================================================== --- head/sys/boot/efi/include/efidef.h Thu Jun 22 13:31:44 2017 (r320233) +++ head/sys/boot/efi/include/efidef.h Thu Jun 22 14:30:09 2017 (r320234) @@ -178,6 +178,7 @@ typedef enum { #define EFI_MEMORY_DESCRIPTOR_VERSION 1 typedef struct { UINT32 Type; // Field size is 32 bits followed by 32 bit pad + UINT32 Pad; EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits UINT64 NumberOfPages; // Field size is 64 bits From owner-svn-src-all@freebsd.org Thu Jun 22 15:09:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72340D8E273; Thu, 22 Jun 2017 15:09:43 +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 427487E2CD; Thu, 22 Jun 2017 15:09:43 +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 v5MF9gmM079639; Thu, 22 Jun 2017 15:09:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MF9gd0079638; Thu, 22 Jun 2017 15:09:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706221509.v5MF9gd0079638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Jun 2017 15:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320235 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 15:09:43 -0000 Author: emaste Date: Thu Jun 22 15:09:42 2017 New Revision: 320235 URL: https://svnweb.freebsd.org/changeset/base/320235 Log: retire arm64 kernel module linker workaround Relocatable linking in aarch64 ld from binutils 2.25.1 does not work. The linker corrupts the references to the external symbols which are defined by other object in the linking set and should therefore lose the GOT entry. The problem is fixed in later versions of GNU ld and does not exist in the in-tree lld linker that we now use by default for arm64, so the workaround can be removed. Reviewed by: kib MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11302 Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Jun 22 14:30:09 2017 (r320234) +++ head/sys/conf/kmod.mk Thu Jun 22 15:09:42 2017 (r320235) @@ -209,18 +209,8 @@ ${PROG}.debug: ${FULLPROG} .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld -.if ${MACHINE_CPUARCH} != "aarch64" ${LD} -m ${LD_EMULATION} -Bshareable -znotext ${_LDFLAGS} \ -o ${.TARGET} ${KMOD}.kld -.else -#XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does -# not work. The linker corrupts the references to the external -# symbols which are defined by other object in the linking set -# and should therefore loose the GOT entry. The problem seems -# to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack -# below allows to get partially functioning modules for now. - ${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS} -.endif .if !defined(DEBUG_FLAGS) ${OBJCOPY} --strip-debug ${.TARGET} .endif From owner-svn-src-all@freebsd.org Thu Jun 22 15:52:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84662D8F0F7; Thu, 22 Jun 2017 15:52: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 5008F7F871; Thu, 22 Jun 2017 15:52: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 v5MFqIKR098724; Thu, 22 Jun 2017 15:52:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MFqI03098723; Thu, 22 Jun 2017 15:52:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706221552.v5MFqI03098723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 22 Jun 2017 15:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320236 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 15:52:19 -0000 Author: cem Date: Thu Jun 22 15:52:18 2017 New Revision: 320236 URL: https://svnweb.freebsd.org/changeset/base/320236 Log: sglist.h: Fix sg_refs signedness to match refcount(9) PR: 220122 Reported by: Mark Millard Sponsored by: Dell EMC Isilon Modified: head/sys/sys/sglist.h Modified: head/sys/sys/sglist.h ============================================================================== --- head/sys/sys/sglist.h Thu Jun 22 15:09:42 2017 (r320235) +++ head/sys/sys/sglist.h Thu Jun 22 15:52:18 2017 (r320236) @@ -48,7 +48,7 @@ struct sglist_seg { struct sglist { struct sglist_seg *sg_segs; - int sg_refs; + u_int sg_refs; u_short sg_nseg; u_short sg_maxseg; }; From owner-svn-src-all@freebsd.org Thu Jun 22 16:52:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F9CDD907AE; Thu, 22 Jun 2017 16:52:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 559F281EA9; Thu, 22 Jun 2017 16:52:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5MGqMks024160; Thu, 22 Jun 2017 16:52:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MGqMkp024158; Thu, 22 Jun 2017 16:52:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706221652.v5MGqMkp024158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 22 Jun 2017 16:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320237 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 16:52:23 -0000 Author: avg Date: Thu Jun 22 16:52:22 2017 New Revision: 320237 URL: https://svnweb.freebsd.org/changeset/base/320237 Log: MFV r318947: 7578 Fix/improve some aspects of ZIL writing. FreeBSD note: this commit removes small differences between what mav committed to FreeBSD in r308782 and what ended up committed to illumos after addressing all review comments. illumos/illumos-gate@c5ee46810f82e8a53d2cc5a487568a573f449039 https://github.com/illumos/illumos-gate/commit/c5ee46810f82e8a53d2cc5a487568a573f449039 https://www.illumos.org/issues/7578 After some ZIL changes 6 years ago zil_slog_limit got partially broken due to zl_itx_list_sz not updated when async itx'es upgraded to sync. Actually because of other changes about that time zl_itx_list_sz is not really required to implement the functionality, so this patch removes some unneeded broken code and variables. Original idea of zil_slog_limit was to reduce chance of SLOG abuse by single heavy logger, that increased latency for other (more latency critical) loggers, by pushing heavy log out into the main pool instead of SLOG. Beside huge latency increase for heavy writers, this implementation caused double write of all data, since the log records were explicitly prepared for SLOG. Since we now have I/O scheduler, I've found it can be much more efficient to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG. Existing ZIL implementation had problem with space efficiency when it has to write large chunks of data into log blocks of limited size. In some cases efficiency stopped to almost as low as 50%. In case of ZIL stored on spinning rust, that also reduced log write speed in half, since head had to uselessly fly over allocated but not written areas. This change improves the situation by offloading problematic operations from z*_log_write() to zil_lwb_commit(), which knows real situation of log blocks allocation and can split large requests into pieces much more efficiently. Also as side effect it removes one of two data copy operations done by ZIL code WR_COPIED case. While there, untangle and unify code of z*_log_write() functions. Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing block boundary, that may also improve efficiency if ZPL is made to do that. Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Andriy Gapon Reviewed by: Steven Hartland Reviewed by: Brad Lewis Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Alexander Motin MFC after: 3 weeks Modified: 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/sys/zil_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Thu Jun 22 15:52:18 2017 (r320236) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Thu Jun 22 16:52:22 2017 (r320237) @@ -139,10 +139,27 @@ typedef struct zil_bp_node { avl_node_t zn_node; } zil_bp_node_t; +/* + * Maximum amount of write data that can be put into single log block. + */ #define ZIL_MAX_LOG_DATA (SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t) - \ sizeof (lr_write_t)) #define ZIL_MAX_COPIED_DATA \ ((SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) + +/* + * Maximum amount of log space we agree to waste to reduce number of + * WR_NEED_COPY chunks to reduce zl_get_data() overhead (~12%). + */ +#define ZIL_MAX_WASTE_SPACE (ZIL_MAX_LOG_DATA / 8) + +/* + * Maximum amount of write data for WR_COPIED. Fall back to WR_NEED_COPY + * as more space efficient if we can't fit at least two log records into + * maximum sized log block. + */ +#define ZIL_MAX_COPIED_DATA ((SPA_OLD_MAXBLOCKSIZE - \ + sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) #ifdef __cplusplus } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Jun 22 15:52:18 2017 (r320236) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Jun 22 16:52:22 2017 (r320237) @@ -90,12 +90,12 @@ SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_R /* * Limit SLOG write size per commit executed with synchronous priority. - * Any writes above that executed with lower (asynchronous) priority to - * limit potential SLOG device abuse by single active ZIL writer. + * Any writes above that will be executed with lower (asynchronous) priority + * to limit potential SLOG device abuse by single active ZIL writer. */ -uint64_t zil_slog_limit = 768 * 1024; -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, zil_slog_limit, CTLFLAG_RWTUN, - &zil_slog_limit, 0, "Maximal SLOG commit size with sync priority"); +uint64_t zil_slog_bulk = 768 * 1024; +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, zil_slog_bulk, CTLFLAG_RWTUN, + &zil_slog_bulk, 0, "Maximal SLOG commit size with sync priority"); static kmem_cache_t *zil_lwb_cache; @@ -923,7 +923,7 @@ zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) if (lwb->lwb_zio == NULL) { abd_t *lwb_abd = abd_get_from_buf(lwb->lwb_buf, BP_GET_LSIZE(&lwb->lwb_blk)); - if (zilog->zl_cur_used <= zil_slog_limit || !lwb->lwb_slog) + if (!lwb->lwb_slog || zilog->zl_cur_used <= zil_slog_bulk) prio = ZIO_PRIORITY_SYNC_WRITE; else prio = ZIO_PRIORITY_ASYNC_WRITE; @@ -1068,36 +1068,38 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea static lwb_t * zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) { - lr_t *lrcb, *lrc = &itx->itx_lr; /* common log record */ - lr_write_t *lrwb, *lrw = (lr_write_t *)lrc; + lr_t *lrcb, *lrc; + lr_write_t *lrwb, *lrw; char *lr_buf; - uint64_t txg = lrc->lrc_txg; - uint64_t reclen = lrc->lrc_reclen; - uint64_t dlen = 0; - uint64_t dnow, lwb_sp; + uint64_t dlen, dnow, lwb_sp, reclen, txg; if (lwb == NULL) return (NULL); ASSERT(lwb->lwb_buf != NULL); - if (lrc->lrc_txtype == TX_WRITE && itx->itx_wr_state == WR_NEED_COPY) + lrc = &itx->itx_lr; /* Common log record inside itx. */ + lrw = (lr_write_t *)lrc; /* Write log record inside itx. */ + if (lrc->lrc_txtype == TX_WRITE && itx->itx_wr_state == WR_NEED_COPY) { dlen = P2ROUNDUP_TYPED( lrw->lr_length, sizeof (uint64_t), uint64_t); - + } else { + dlen = 0; + } + reclen = lrc->lrc_reclen; zilog->zl_cur_used += (reclen + dlen); + txg = lrc->lrc_txg; zil_lwb_write_init(zilog, lwb); cont: /* * If this record won't fit in the current log block, start a new one. - * For WR_NEED_COPY optimize layout for minimal number of chunks, but - * try to keep wasted space withing reasonable range (12%). + * For WR_NEED_COPY optimize layout for minimal number of chunks. */ lwb_sp = lwb->lwb_sz - lwb->lwb_nused; if (reclen > lwb_sp || (reclen + dlen > lwb_sp && - lwb_sp < ZIL_MAX_LOG_DATA / 8 && (dlen % ZIL_MAX_LOG_DATA == 0 || + lwb_sp < ZIL_MAX_WASTE_SPACE && (dlen % ZIL_MAX_LOG_DATA == 0 || lwb_sp < reclen + dlen % ZIL_MAX_LOG_DATA))) { lwb = zil_lwb_write_start(zilog, lwb, B_FALSE); if (lwb == NULL) @@ -1105,14 +1107,14 @@ cont: zil_lwb_write_init(zilog, lwb); ASSERT(LWB_EMPTY(lwb)); lwb_sp = lwb->lwb_sz - lwb->lwb_nused; - ASSERT3U(reclen + MIN(dlen, sizeof(uint64_t)), <=, lwb_sp); + ASSERT3U(reclen + MIN(dlen, sizeof (uint64_t)), <=, lwb_sp); } dnow = MIN(dlen, lwb_sp - reclen); lr_buf = lwb->lwb_buf + lwb->lwb_nused; bcopy(lrc, lr_buf, reclen); - lrcb = (lr_t *)lr_buf; - lrwb = (lr_write_t *)lrcb; + lrcb = (lr_t *)lr_buf; /* Like lrc, but inside lwb. */ + lrwb = (lr_write_t *)lrcb; /* Like lrw, but inside lwb. */ /* * If it's a write, fetch the data or get its blkptr as appropriate. @@ -1328,6 +1330,8 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *t * this itxg. Save the itxs for release below. * This should be rare. */ + zfs_dbgmsg("zil_itx_assign: missed itx cleanup for " + "txg %llu", itxg->itxg_txg); clean = itxg->itxg_itxs; } itxg->itxg_txg = txg; From owner-svn-src-all@freebsd.org Thu Jun 22 16:58:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F997D90965; Thu, 22 Jun 2017 16:58: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 5DE9D821E0; Thu, 22 Jun 2017 16:58: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 v5MGw9q1024467; Thu, 22 Jun 2017 16:58:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MGw9ni024466; Thu, 22 Jun 2017 16:58:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706221658.v5MGw9ni024466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 22 Jun 2017 16:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320238 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 16:58:10 -0000 Author: avg Date: Thu Jun 22 16:58:09 2017 New Revision: 320238 URL: https://svnweb.freebsd.org/changeset/base/320238 Log: MFV r319742: 8056 zfs send size estimate is inaccurate for some zvols illumos/illumos-gate@0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://github.com/illumos/illumos-gate/commit/0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://www.illumos.org/issues/8056 The send size estimate for a zvol can be too low, if the size of the record headers (dmu_replay_record_t's) is a significant portion of the size. This is typically the case when the data is highly compressible, especially with embedded blocks. The problem is that dmu_adjust_send_estimate_for_indirects() assumes that blocks are the size of the "recordsize" property (128KB). However, for zvols, the blocks are the size of the "volblocksize" property (8KB). Therefore, we estimate that there will be 16x less record headers than there really will be. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Paul Dagnelie MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jun 22 16:52:22 2017 (r320237) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jun 22 16:58:09 2017 (r320238) @@ -1140,10 +1140,17 @@ dmu_adjust_send_estimate_for_indirects(dsl_dataset_t * */ uint64_t recordsize; uint64_t record_count; + objset_t *os; + VERIFY0(dmu_objset_from_ds(ds, &os)); /* Assume all (uncompressed) blocks are recordsize. */ - err = dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - &recordsize); + if (os->os_phys->os_type == DMU_OST_ZVOL) { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &recordsize); + } else { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), &recordsize); + } if (err != 0) return (err); record_count = uncompressed / recordsize; @@ -1212,6 +1219,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl_dataset_t *fr err = dmu_adjust_send_estimate_for_indirects(ds, uncomp, comp, stream_compressed, sizep); + /* + * Add the size of the BEGIN and END records to the estimate. + */ + *sizep += 2 * sizeof (dmu_replay_record_t); return (err); } From owner-svn-src-all@freebsd.org Thu Jun 22 17:10:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96E14D90CDA; Thu, 22 Jun 2017 17:10:35 +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 7066882845; Thu, 22 Jun 2017 17:10:35 +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 v5MHAYCr028637; Thu, 22 Jun 2017 17:10:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MHAYqe028636; Thu, 22 Jun 2017 17:10:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706221710.v5MHAYqe028636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 22 Jun 2017 17:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320239 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 17:10:35 -0000 Author: avg Date: Thu Jun 22 17:10:34 2017 New Revision: 320239 URL: https://svnweb.freebsd.org/changeset/base/320239 Log: MFV r319950: 5220 L2ARC does not support devices that do not provide 512B access FreeBSD note: the actual change has been in FreeBSD since r297848. This commit accounts for integration of that change with subsequent changes, especially r320156 (MFV of r318946) and r314274. illumos/illumos-gate@403a8da73c64ff9dfb6230ba045c765a242213fb https://github.com/illumos/illumos-gate/commit/403a8da73c64ff9dfb6230ba045c765a242213fb https://www.illumos.org/issues/5220 There are disk devices that have logical sector size larger than 512B, for example 4KB. That is, their physical sector size is larger than 512B and they do not provide emulation for 512B sector sizes. For such devices both a data offset and a data size must be properly aligned. L2ARC should arrange that because it uses physical I/O. zio_vdev_io_start() performs a necessary transformation if io_size is not aligned to vdev_ashift, but that is done only for logical I/O. Something similar should be done in L2ARC code. * a temporary write buffer should be allocated if the original buffer is not going to be compressed and its size is not aligned * size of a temporary compression buffer should be ashift aligned * for the reads, if a size of a target buffer is not sufficiently large and it is not aligned then a temporary read buffer should be allocated Reviewed by: George Wilson Reviewed by: Dan Kimmel Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: Andriy Gapon MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 22 16:58:09 2017 (r320238) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 22 17:10:34 2017 (r320239) @@ -1343,7 +1343,7 @@ typedef struct l2arc_read_callback { blkptr_t l2rcb_bp; /* original blkptr */ zbookmark_phys_t l2rcb_zb; /* original bookmark */ int l2rcb_flags; /* original flags */ - void *l2rcb_abd; /* temporary buffer */ + abd_t *l2rcb_abd; /* temporary buffer */ } l2arc_read_callback_t; typedef struct l2arc_write_callback { @@ -7485,8 +7485,13 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint * Normally the L2ARC can use the hdr's data, but if * we're sharing data between the hdr and one of its * bufs, L2ARC needs its own copy of the data so that - * the ZIO below can't race with the buf consumer. To - * ensure that this copy will be available for the + * the ZIO below can't race with the buf consumer. + * Another case where we need to create a copy of the + * data is when the buffer size is not device-aligned + * and we need to pad the block to make it such. + * That also keeps the clock hand suitably aligned. + * + * To ensure that the copy will be available for the * lifetime of the ZIO and be cleaned up afterwards, we * add it to the l2arc_free_on_write queue. */ From owner-svn-src-all@freebsd.org Thu Jun 22 18:24:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24788D9217B; Thu, 22 Jun 2017 18:24:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD0B233B; Thu, 22 Jun 2017 18:24:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::94ad:a84a:d0ed:3add] (unknown [IPv6:2001:470:7a58:0:94ad:a84a:d0ed:3add]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D7277289B9; Thu, 22 Jun 2017 20:24:04 +0200 (CEST) From: Dimitry Andric Message-Id: <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320234 - head/sys/boot/efi/include Date: Thu, 22 Jun 2017 20:23:56 +0200 In-Reply-To: <201706221430.v5MEU9Zc063375@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Ed Maste References: <201706221430.v5MEU9Zc063375@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:24:08 -0000 --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 22 Jun 2017, at 16:30, Ed Maste wrote: >=20 > Author: emaste > Date: Thu Jun 22 14:30:09 2017 > New Revision: 320234 > URL: https://svnweb.freebsd.org/changeset/base/320234 >=20 > Log: > Make structure padding explicit in EFI_MEMORY_DESCRIPTOR >=20 > The EFI memory descriptor 64-bit aligns PhysicalStart on both 32- and > 64-bit platforms. Make the padding explicit for i386 EFI. >=20 > Submitted by: Siva Mahadevan = > MFC after: 3 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D11301 >=20 > Modified: > head/sys/boot/efi/include/efidef.h >=20 > Modified: head/sys/boot/efi/include/efidef.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/boot/efi/include/efidef.h Thu Jun 22 13:31:44 2017 = (r320233) > +++ head/sys/boot/efi/include/efidef.h Thu Jun 22 14:30:09 2017 = (r320234) > @@ -178,6 +178,7 @@ typedef enum { > #define EFI_MEMORY_DESCRIPTOR_VERSION 1 > typedef struct { > UINT32 Type; // Field size is = 32 bits followed by 32 bit pad > + UINT32 Pad; > EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is = 64 bits > EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is = 64 bits > UINT64 NumberOfPages; // Field size is = 64 bits If you explicitly insert padding, it is better to mark the struct as __packed, I think. Or at least also specify the alignment explicitly. -Dimitry --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAllMC0cACgkQsF6jCi4glqOS7wCfQXRMqdBBwFKlGTT/gWqOmgZJ YD4AoPIB939JxyVWZv0uEV3EthQaTLbu =nvNU -----END PGP SIGNATURE----- --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B-- From owner-svn-src-all@freebsd.org Thu Jun 22 18:34:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7D38D923BE; Thu, 22 Jun 2017 18:34:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 731E7B1A; Thu, 22 Jun 2017 18:34:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id j24so870088ioi.3; Thu, 22 Jun 2017 11:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+YtcHOSAN/zjmeJCcgOhuYpVDBmCyBzbYuo6ZVqLVEM=; b=cOOkN+3ViukQxYeMpnFzpPc5MwMtNUgB2DsIlKDtC3HVtON0Yrt4ai0AMdE9PCgjQ9 y8h7Za/D5L/4E+/Wb4us81CX+Q2C5yTBZgsqbMVsNzq99yD7UNxghqP1L1CXuO4txzmR XZ+5H+H5HampxcdyltAm0SVUZ6YT9Fm5bw3OYlvMxaJOTZVyPMWLgAz751KF9TD0ikom kzVOPVw5+J50XejskxJUzjFwbbBXo18OC/u4os64mC9bYQB+2TrQYl3CKnll/+k6tTJd /Xx9xzd5iFE1h1BKSXzv5ruoIqWRQP8evRaGTJ9I6G/rvs7fqh9n7Rtf63f8YkexCLky cYvA== 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=+YtcHOSAN/zjmeJCcgOhuYpVDBmCyBzbYuo6ZVqLVEM=; b=sz3xHLpK/cvHbSBYi9+7rG+cpsTpCZdDMAE9WPQajN57zEmiBMadsdy0SnZEcBBc5z ja74YuqDNEPUlrlgD6XKI+D9CSXasK703i72iseUZQOrbfTcYjtUlun0jytArb5qysaJ MsASES0r7PBPjX9e21PjOWarUbT6Bxi/zqS2rrNpL36pMpsfal+5UiYSbufgcqhNA7aL Sr9qT65lCuX4a4sB3LMDar2yW0M5iEpTQGfLu+XI+6HVewExiruj/v/zQgLzlreCnvNE 9JAE1eWTrJXevp0RzIck5KQhYbt4UlV2bU6pliUtJpnpUV4hfn2ti2PXw3xYKWE7hRdt H5AA== X-Gm-Message-State: AKS2vOwrPCZlwmG54OjWHYvEE/i7TVPY41YBZyOM7JYrCemQZRtaWTlx R11epWXOVCBkCM7MoVJE2iyX87teooZ2 X-Received: by 10.107.59.211 with SMTP id i202mr3520811ioa.159.1498156462681; Thu, 22 Jun 2017 11:34:22 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.10.85 with HTTP; Thu, 22 Jun 2017 11:34:02 -0700 (PDT) In-Reply-To: <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> References: <201706221430.v5MEU9Zc063375@repo.freebsd.org> <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> From: Ed Maste Date: Thu, 22 Jun 2017 14:34:02 -0400 X-Google-Sender-Auth: kShrHdim_e3ZPwwjU-ASMKDpaZ4 Message-ID: Subject: Re: svn commit: r320234 - head/sys/boot/efi/include To: Dimitry Andric Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:34:23 -0000 On 22 June 2017 at 14:23, Dimitry Andric wrote: >> Modified: head/sys/boot/efi/include/efidef.h >> ============================================================================== >> --- head/sys/boot/efi/include/efidef.h Thu Jun 22 13:31:44 2017 (r320233) >> +++ head/sys/boot/efi/include/efidef.h Thu Jun 22 14:30:09 2017 (r320234) >> @@ -178,6 +178,7 @@ typedef enum { >> #define EFI_MEMORY_DESCRIPTOR_VERSION 1 >> typedef struct { >> UINT32 Type; // Field size is 32 bits followed by 32 bit pad >> + UINT32 Pad; >> EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits >> EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits >> UINT64 NumberOfPages; // Field size is 64 bits > > If you explicitly insert padding, it is better to mark the struct as > __packed, I think. Or at least also specify the alignment explicitly. Perhaps, although this struct now matches the definition in the edk and u-boot EFI headers. From owner-svn-src-all@freebsd.org Thu Jun 22 18:34:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B688ED92403; Thu, 22 Jun 2017 18:34:36 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp001.me.com (st13p35im-asmtp001.me.com [17.164.199.64]) (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 8BA8ABF7; Thu, 22 Jun 2017 18:34:36 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp001.me.com by st13p35im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0ORY00800OGZA400@st13p35im-asmtp001.me.com>; Thu, 22 Jun 2017 18:34:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1498156470; bh=VP1grAwiVdiYzuXN1JQw4zwXtiD2YUMdRHxR9/rC+og=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=r2LUcf975TDAmY4uShTs26R6ivZxsxIUqYmZHNv4wfsF7GHLkr+YZ9WzdSiSqw0HV 3z4QryLx2Ku5WIujWVuQVRcQN1tdnlbG/Ck1VQogc6SzFFujtrqhfUevGjPjh707G6 hEb55OQ/hWB1/dTrLQR/RV0yNZi5se3T2doTyMpMrpm4wXkZi0DMUmhTrTxb/pkUxw WDNK6YhCkzjhDPxxe9JRl7G01xynOb16t7APh0CCtgVzu7VPxSSqkYGqi8WmmAEocD 8+h21NJmNsnJKa4HjNWMwR0p+Tcxo0y5tXe5mZ+rhyBua2WEPP5sYtY93+nB32AAKZ mVcY7fJnhpe/Q== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0ORY001Z6OXEUE00@st13p35im-asmtp001.me.com>; Thu, 22 Jun 2017 18:34:28 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-22_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1706220317 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320234 - head/sys/boot/efi/include From: Toomas Soome In-reply-to: <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> Date: Thu, 22 Jun 2017 21:34:25 +0300 Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: <62AB7B61-DE8C-4CBA-94EA-899A7564E751@me.com> References: <201706221430.v5MEU9Zc063375@repo.freebsd.org> <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:34:36 -0000 > On 22. juuni 2017, at 21:23, Dimitry Andric wrote: >=20 > On 22 Jun 2017, at 16:30, Ed Maste wrote: >>=20 >> Author: emaste >> Date: Thu Jun 22 14:30:09 2017 >> New Revision: 320234 >> URL: https://svnweb.freebsd.org/changeset/base/320234 >>=20 >> Log: >> Make structure padding explicit in EFI_MEMORY_DESCRIPTOR >>=20 >> The EFI memory descriptor 64-bit aligns PhysicalStart on both 32- and >> 64-bit platforms. Make the padding explicit for i386 EFI. >>=20 >> Submitted by: Siva Mahadevan = >> MFC after: 3 weeks >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D11301 >>=20 >> Modified: >> head/sys/boot/efi/include/efidef.h >>=20 >> Modified: head/sys/boot/efi/include/efidef.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/boot/efi/include/efidef.h Thu Jun 22 13:31:44 2017 = (r320233) >> +++ head/sys/boot/efi/include/efidef.h Thu Jun 22 14:30:09 2017 = (r320234) >> @@ -178,6 +178,7 @@ typedef enum { >> #define EFI_MEMORY_DESCRIPTOR_VERSION 1 >> typedef struct { >> UINT32 Type; // Field size is = 32 bits followed by 32 bit pad >> + UINT32 Pad; >> EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is = 64 bits >> EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is = 64 bits >> UINT64 NumberOfPages; // Field size is = 64 bits >=20 > If you explicitly insert padding, it is better to mark the struct as > __packed, I think. Or at least also specify the alignment explicitly. >=20 > -Dimitry >=20 There is also second one with the same issue: in sys/boot/efi/include/efiprot.h @@ -90,12 +90,14 @@ typedef struct { BOOLEAN LogicalPartition; BOOLEAN ReadOnly; BOOLEAN WriteCaching; + UINT8 pad1[3]; =20 UINT32 BlockSize; UINT32 IoAlign; + UINT8 pad2[4]; =20 EFI_LBA LastBlock; -} EFI_BLOCK_IO_MEDIA; +} __packed EFI_BLOCK_IO_MEDIA; Without this, the EFI32 will get disk sizes wrong. rgds, toomas From owner-svn-src-all@freebsd.org Thu Jun 22 18:39:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 853B5D92497; Thu, 22 Jun 2017 18:39:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9F7E6D; Thu, 22 Jun 2017 18:39:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5MIdqHj065948; Thu, 22 Jun 2017 18:39:52 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MIdqK3065947; Thu, 22 Jun 2017 18:39:52 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201706221839.v5MIdqK3065947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Jun 2017 18:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320240 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:39:53 -0000 Author: ed Date: Thu Jun 22 18:39:52 2017 New Revision: 320240 URL: https://svnweb.freebsd.org/changeset/base/320240 Log: Use __ISO_C_VISIBLE, as opposed to testing __STDC_VERSION__. FreeBSD's C library uses __STDC_VERSION__ to determine whether the compiler provides language features specific to a certain version of the C standard. __ISO_C_VISIBLE is used to specify which library features need to be exposed. max_align_t currently uses __STDC_VERSION__, even though it should be using __ISO_C_VISIBLE to remain consistent with the rest of the headers in include/. Reviewed by: dim MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D11303 Modified: head/include/stddef.h Modified: head/include/stddef.h ============================================================================== --- head/include/stddef.h Thu Jun 22 17:10:34 2017 (r320239) +++ head/include/stddef.h Thu Jun 22 18:39:52 2017 (r320240) @@ -62,7 +62,7 @@ typedef ___wchar_t wchar_t; #endif #endif -#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #ifndef __CLANG_MAX_ALIGN_T_DEFINED typedef __max_align_t max_align_t; #define __CLANG_MAX_ALIGN_T_DEFINED From owner-svn-src-all@freebsd.org Thu Jun 22 18:40:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBAACD92527; Thu, 22 Jun 2017 18:40:35 +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 B737BFD8; Thu, 22 Jun 2017 18:40:35 +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 v5MIeYkU066041; Thu, 22 Jun 2017 18:40:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MIeYEr066038; Thu, 22 Jun 2017 18:40:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706221840.v5MIeYEr066038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 22 Jun 2017 18:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320241 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:40:36 -0000 Author: markj Date: Thu Jun 22 18:40:34 2017 New Revision: 320241 URL: https://svnweb.freebsd.org/changeset/base/320241 Log: MFC r320124: Fix the !TD_IS_IDLETHREAD(curthread) locking assertions. Approved by: re (kib) Modified: stable/11/sys/kern/kern_mutex.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_mutex.c Thu Jun 22 18:40:34 2017 (r320241) @@ -233,7 +233,8 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, cons m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -390,7 +391,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_rwlock.c Thu Jun 22 18:40:34 2017 (r320241) @@ -269,7 +269,8 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -305,7 +306,7 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -615,7 +616,8 @@ __rw_rlock(volatile uintptr_t *c, const char *file, in td = curthread; rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || + !TD_IS_IDLETHREAD(td), ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", td, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -815,7 +817,6 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char * TD_LOCKS_DEC(curthread); } - /* * This function is called when we are unable to obtain a write lock on the Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_sx.c Thu Jun 22 18:40:34 2017 (r320241) @@ -293,7 +293,8 @@ _sx_xlock(struct sx *sx, int opts, const char *file, i uintptr_t tid, x; int error = 0; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -330,7 +331,7 @@ sx_try_xlock_(struct sx *sx, const char *file, int lin if (SCHEDULER_STOPPED_TD(td)) return (1); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -1028,7 +1029,8 @@ _sx_slock(struct sx *sx, int opts, const char *file, i uintptr_t x; int error; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_slock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, From owner-svn-src-all@freebsd.org Thu Jun 22 19:25:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54C04D9309B; Thu, 22 Jun 2017 19:25:18 +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 2EB112899; Thu, 22 Jun 2017 19:25:18 +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 v5MJPHNS086050; Thu, 22 Jun 2017 19:25:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MJPHPa086049; Thu, 22 Jun 2017 19:25:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706221925.v5MJPHPa086049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 22 Jun 2017 19:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320242 - head/etc/ntp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 19:25:18 -0000 Author: cy Date: Thu Jun 22 19:25:17 2017 New Revision: 320242 URL: https://svnweb.freebsd.org/changeset/base/320242 Log: Update leap-seconds to leap-seconds.3701462400. As per https://datacenter.iers.org/eop/-/somos/5Rgv/latest/16: INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France) Tel. : 33 (0) 1 40 51 23 35 FAX : 33 (0) 1 40 51 22 91 Internet : services.iers@obspm.fr Paris, 9 January 2017 Bulletin C 53 To authorities responsible for the measurement and distribution of time INFORMATION ON UTC - TAI NO leap second will be introduced at the end of June 2017. The difference between Coordinated Universal Time UTC and the International Atomic Time TAI is : from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37 s Leap seconds can be introduced in UTC at the end of the months of December or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every six months, either to announce a time step in UTC, or to confirm that there will be no time step at the next possible date. Christian BIZOUARD Director Earth Orientation Center of IERS Observatoire de Paris, France Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 MFC after: 3 days Modified: head/etc/ntp/leap-seconds Modified: head/etc/ntp/leap-seconds ============================================================================== --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 (r320241) +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 (r320242) @@ -128,7 +128,7 @@ # Washington, DC # jeffrey.prillaman@usno.navy.mil # -# Last Update of leap second values: 6 Jul 2016 +# Last Update of leap second values: 18 Apr 2017 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -136,7 +136,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3676752000 +#$ 3701462400 # # The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line @@ -168,10 +168,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 52 -# File expires on: 1 Jun 2017 +# Updated through IERS Bulletin C 53 +# File expires on: 1 Dec 2017 # -#@ 3705264000 +#@ 3721075200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -216,5 +216,5 @@ # the hash line is also ignored in the # computation. # -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 # From owner-svn-src-all@freebsd.org Thu Jun 22 20:02:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34D22D93848 for ; Thu, 22 Jun 2017 20:02:31 +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 161F137EB for ; Thu, 22 Jun 2017 20:02:30 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ba09caa3-5785-11e7-8dc9-a95799a96e8f 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 ba09caa3-5785-11e7-8dc9-a95799a96e8f; Thu, 22 Jun 2017 20:02:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v5MK2RmQ008821; Thu, 22 Jun 2017 14:02:28 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1498161747.66489.10.camel@freebsd.org> Subject: Re: svn commit: r320242 - head/etc/ntp From: Ian Lepore To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 22 Jun 2017 14:02:27 -0600 In-Reply-To: <201706221925.v5MJPHPa086049@repo.freebsd.org> References: <201706221925.v5MJPHPa086049@repo.freebsd.org> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 20:02:31 -0000 On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: > Author: cy > Date: Thu Jun 22 19:25:17 2017 > New Revision: 320242 > URL: https://svnweb.freebsd.org/changeset/base/320242 > > Log: >   Update leap-seconds to leap-seconds.3701462400. >  > > Modified: head/etc/ntp/leap-seconds > ===================================================================== > ========= > --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 > (r320241) > +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 > (r320242) > @@ -128,7 +128,7 @@ >  # Washington, DC >  # jeffrey.prillaman@usno.navy.mil >  # > -# Last Update of leap second values:   6 Jul 2016 > +# Last Update of leap second values:  18 Apr 2017 >  #  # The following line shows this last update date in NTP > timestamp  >  # format. This is the date on which the most recent change to > @@ -136,7 +136,7 @@ >  # be identified by the unique pair of characters in the first > two  >  # columns as shown below. >  # > -#$  3676752000 > +#$  3701462400 >  # Where did this leapfile come from?  The last update of leap second values is supposed to change only when the actual list of offsets changes, not when the file is updated to just change an expiration date.  This is actually very explicitly documented in the file itself, just a few lines down from this change:   If an announcement by the IERS specifies that no leap second is    scheduled, then only the expiration date of the file will    be advanced to show that the information in the file is still   current -- the update time stamp, the data and the name of the file    will not change. > -# File expires on:  1 Jun 2017 > +# Updated through IERS Bulletin C 53 > +# File expires on:  1 Dec 2017 >  # > -#@ 3705264000 > +#@ 3721075200 >  # This expiration is wrong too, dangerously so IMO.  The data in the file is good through 12-31-2017-23:59:59, although historical practice has been to make the file expire a couple days before that.  Making it expire 31 days early is about the worst possible choice... some systems for notifying clients/consumers of an impending leap second (or the lack thereof) only do so during the last month before the leap opportunity -- this has the file expire just at the point such software would consider it authoratative for dissemination.   I will note however, unlike the update date, there is no formal written description of how expiration date is determined, so the previous paragraph is just my opinion and experience working in the timing field. A leapfile without these problems can be found at   ftp://time.nist.gov/pub/leap-seconds.list -- Ian >  2272060800 10 # 1 Jan 1972 >  2287785600 11 # 1 Jul 1972 > @@ -216,5 +216,5 @@ >  # the hash line is also ignored in the >  # computation. >  # > -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 > +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 >  # > From owner-svn-src-all@freebsd.org Thu Jun 22 20:32:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAC47D93F5C; Thu, 22 Jun 2017 20:32:24 +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 A25F4645A8; Thu, 22 Jun 2017 20:32:24 +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 v5MKWNLc014234; Thu, 22 Jun 2017 20:32:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MKWN1s014233; Thu, 22 Jun 2017 20:32:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222032.v5MKWN1s014233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 20:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320243 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 20:32:25 -0000 Author: bdrewery Date: Thu Jun 22 20:32:23 2017 New Revision: 320243 URL: https://svnweb.freebsd.org/changeset/base/320243 Log: Fix spelling error. Reported by: arc Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Thu Jun 22 19:25:17 2017 (r320242) +++ head/share/mk/bsd.compiler.mk Thu Jun 22 20:32:23 2017 (r320243) @@ -9,7 +9,7 @@ # # COMPILER_VERSION is a numeric constant equal to: # major * 10000 + minor * 100 + tiny -# It too can be overriden on the command line. When testing it, be sure to +# It too can be overridden on the command line. When testing it, be sure to # make sure that you are limiting the test to a specific compiler. Testing # against 30300 for gcc likely isn't what you wanted (since versions of gcc # prior to 4.2 likely have no prayer of working). From owner-svn-src-all@freebsd.org Thu Jun 22 21:03:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52A72D94649; Thu, 22 Jun 2017 21:03:25 +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 21203653B6; Thu, 22 Jun 2017 21:03:25 +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 v5ML3OfL026558; Thu, 22 Jun 2017 21:03:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ML3Oq3026557; Thu, 22 Jun 2017 21:03:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222103.v5ML3Oq3026557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 21:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320245 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:03:25 -0000 Author: bdrewery Date: Thu Jun 22 21:03:24 2017 New Revision: 320245 URL: https://svnweb.freebsd.org/changeset/base/320245 Log: Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. This is similar to r300350 for bsd.compiler.mk. MFC after: 2 weeks Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11309 Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r320244) +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r320245) @@ -9,25 +9,39 @@ # major * 10000 + minor * 100 + tiny # It too can be overridden on the command line. # +# These variables with an X_ prefix will also be provided if XLD is set. +# # This file may be included multiple times, but only has effect the first time. # .if !target(____) ____: -_ld_version!= ${LD} --version 2>/dev/null | head -n 1 || echo none +.for ld X_ in LD $${_empty_var_} XLD X_ +.if ${ld} == "LD" || !empty(XLD) +.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) + +_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none .if ${_ld_version} == "none" -.error Unable to determine linker type from LD=${LD} +.error Unable to determine linker type from ${ld}=${${ld}} .endif .if ${_ld_version:[1..2]} == "GNU ld" -LINKER_TYPE= binutils +${X_}LINKER_TYPE= binutils _v= ${_ld_version:[3]} .elif ${_ld_version:[1]} == "LLD" -LINKER_TYPE= lld +${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} .else -.error Unknown linker from LD=${LD}: ${_ld_version} +.error Unknown linker from ${ld}=${${ld}}: ${_ld_version} .endif -LINKER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' +${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ + awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' +.undef _ld_version +.undef _v +.endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) + +.endif # ${ld} == "LD" || !empty(XLD) +.endfor # .for ld in LD XLD + .endif # !target(____) From owner-svn-src-all@freebsd.org Thu Jun 22 21:03:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E991D94640; Thu, 22 Jun 2017 21:03:22 +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 1E86D653B3; Thu, 22 Jun 2017 21:03:22 +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 v5ML3LDG026511; Thu, 22 Jun 2017 21:03:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ML3KDs026508; Thu, 22 Jun 2017 21:03:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222103.v5ML3KDs026508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 21:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320244 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:03:22 -0000 Author: bdrewery Date: Thu Jun 22 21:03:20 2017 New Revision: 320244 URL: https://svnweb.freebsd.org/changeset/base/320244 Log: Add basic bsd.linker.mk auto included from bsd.compiler.mk. This will provide LINKER_TYPE and LINKER_VERSION. MFC after: 2 weeks Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11308 Added: head/share/mk/bsd.linker.mk (contents, props changed) Modified: head/share/mk/Makefile head/share/mk/bsd.compiler.mk Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Thu Jun 22 20:32:23 2017 (r320243) +++ head/share/mk/Makefile Thu Jun 22 21:03:20 2017 (r320244) @@ -33,6 +33,7 @@ FILES= \ bsd.kmod.mk \ bsd.lib.mk \ bsd.libnames.mk \ + bsd.linker.mk \ bsd.links.mk \ bsd.man.mk \ bsd.mkopt.mk \ Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Thu Jun 22 20:32:23 2017 (r320243) +++ head/share/mk/bsd.compiler.mk Thu Jun 22 21:03:20 2017 (r320244) @@ -194,4 +194,5 @@ ${var}.${${X_}_cc_hash}:= ${${var}} .endif # ${cc} == "CC" || !empty(XCC) .endfor # .for cc in CC XCC +.include .endif # !target(____) Added: head/share/mk/bsd.linker.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r320244) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +# Setup variables for the linker. +# +# LINKER_TYPE is the major type of linker. Currently binutils and lld support +# automatic detection. +# +# LINKER_VERSION is a numeric constant equal to: +# major * 10000 + minor * 100 + tiny +# It too can be overridden on the command line. +# +# This file may be included multiple times, but only has effect the first time. +# + +.if !target(____) +____: + +_ld_version!= ${LD} --version 2>/dev/null | head -n 1 || echo none +.if ${_ld_version} == "none" +.error Unable to determine linker type from LD=${LD} +.endif +.if ${_ld_version:[1..2]} == "GNU ld" +LINKER_TYPE= binutils +_v= ${_ld_version:[3]} +.elif ${_ld_version:[1]} == "LLD" +LINKER_TYPE= lld +_v= ${_ld_version:[2]} +.else +.error Unknown linker from LD=${LD}: ${_ld_version} +.endif +LINKER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' + +.endif # !target(____) From owner-svn-src-all@freebsd.org Thu Jun 22 21:03:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D541AD94677; Thu, 22 Jun 2017 21:03:28 +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 A42B3653E9; Thu, 22 Jun 2017 21:03:28 +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 v5ML3R8e026603; Thu, 22 Jun 2017 21:03:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ML3Rd1026602; Thu, 22 Jun 2017 21:03:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222103.v5ML3Rd1026602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 21:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320246 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:03:29 -0000 Author: bdrewery Date: Thu Jun 22 21:03:27 2017 New Revision: 320246 URL: https://svnweb.freebsd.org/changeset/base/320246 Log: Support cached linker values in environment. This is similar to r289659 for bsd.compiler.mk. MFC after: 2 weeks Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11310 Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r320245) +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:27 2017 (r320246) @@ -19,6 +19,27 @@ ____: .for ld X_ in LD $${_empty_var_} XLD X_ .if ${ld} == "LD" || !empty(XLD) +# Try to import LINKER_TYPE and LINKER_VERSION from parent make. +# The value is only used/exported for the same environment that impacts +# LD and LINKER_* settings here. +_exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION +${X_}_ld_hash= ${${ld}}${MACHINE}${PATH} +${X_}_ld_hash:= ${${X_}_ld_hash:hash} +# Only import if none of the vars are set somehow else. +_can_export= yes +.for var in ${_exported_vars} +.if defined(${var}) +_can_export= no +.endif +.endfor +.if ${_can_export} == yes +.for var in ${_exported_vars} +.if defined(${var}.${${X_}_ld_hash}) +${var}= ${${var}.${${X_}_ld_hash}} +.endif +.endfor +.endif + .if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) _ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none @@ -39,6 +60,14 @@ ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ .undef _ld_version .undef _v .endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) + +# Export the values so sub-makes don't have to look them up again, using the +# hash key computed above. +.for var in ${_exported_vars} +${var}.${${X_}_ld_hash}:= ${${var}} +.export-env ${var}.${${X_}_ld_hash} +.undef ${var}.${${X_}_ld_hash} +.endfor .endif # ${ld} == "LD" || !empty(XLD) .endfor # .for ld in LD XLD From owner-svn-src-all@freebsd.org Thu Jun 22 21:03:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F40D94694; Thu, 22 Jun 2017 21:03:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A0165450; Thu, 22 Jun 2017 21:03:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ML3UeD026653; Thu, 22 Jun 2017 21:03:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ML3UXZ026652; Thu, 22 Jun 2017 21:03:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222103.v5ML3UXZ026652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 21:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320247 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:03:31 -0000 Author: bdrewery Date: Thu Jun 22 21:03:30 2017 New Revision: 320247 URL: https://svnweb.freebsd.org/changeset/base/320247 Log: Pass along LINKER_* vars during installworld and show in test-system-compiler. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 22 21:03:27 2017 (r320246) +++ head/Makefile.inc1 Thu Jun 22 21:03:30 2017 (r320247) @@ -149,7 +149,8 @@ TEST_SYSTEM_COMPILER_VARS= \ WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ - COMPILER_FREEBSD_VERSION + COMPILER_FREEBSD_VERSION \ + LINKER_TYPE LINKER_VERSION test-system-compiler: .PHONY .for v in ${TEST_SYSTEM_COMPILER_VARS} ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" @@ -181,7 +182,9 @@ CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \ _COMPILER_METADATA_VARS= COMPILER_VERSION \ COMPILER_TYPE \ COMPILER_FEATURES \ - COMPILER_FREEBSD_VERSION + COMPILER_FREEBSD_VERSION \ + LINKER_VERSION \ + LINKER_TYPE compiler-metadata.mk: .PHONY .META @: > ${.TARGET} @echo ".info Using cached compiler metadata from build at $$(hostname) on $$(date)" \ From owner-svn-src-all@freebsd.org Thu Jun 22 21:22:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF368D94AFB; Thu, 22 Jun 2017 21:22:13 +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 BAE0365EEF; Thu, 22 Jun 2017 21:22:13 +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 v5MLMCRc033955; Thu, 22 Jun 2017 21:22:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MLMCCv033936; Thu, 22 Jun 2017 21:22:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222122.v5MLMCCv033936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 21:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320248 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:22:14 -0000 Author: bdrewery Date: Thu Jun 22 21:22:12 2017 New Revision: 320248 URL: https://svnweb.freebsd.org/changeset/base/320248 Log: LINKER_VERSION: Support external binutils. The ports binutils stores the version in the 5th word so just look for a version using a pattern instead. Reported by: rpokala MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:30 2017 (r320247) +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:22:12 2017 (r320248) @@ -48,7 +48,7 @@ _ld_version!= ${${ld}} --version 2>/dev/null | head -n .endif .if ${_ld_version:[1..2]} == "GNU ld" ${X_}LINKER_TYPE= binutils -_v= ${_ld_version:[3]} +_v= ${_ld_version:M[1-9].[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} From owner-svn-src-all@freebsd.org Thu Jun 22 21:49:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E1EED94FFB; Thu, 22 Jun 2017 21:49:59 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C48B566891; Thu, 22 Jun 2017 21:49:58 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.52.10.30]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LnwxU-1dzfWI1EUa-00fwg7; Thu, 22 Jun 2017 23:44:38 +0200 Date: Thu, 22 Jun 2017 23:44:30 +0200 From: "O. Hartmann" To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320248 - head/share/mk Message-ID: <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201706222122.v5MLMCCv033936@repo.freebsd.org> References: <201706222122.v5MLMCCv033936@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/VYtqTxJV9u1_mQetu6X5kTA"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:PgxO5rO9O3tEIeogSKkVluQsmLy77JtoU905cvVxa4FMfDlB1k7 ZJJcf1EX4fp58/IjyXGYqd5/RHUsL4xzF4eBzm+A3QXmWVDxEqHjXTbtvQTZqiBN+SiwD8K r2PvCVedxjvRr+gtTFFQfVv2k3MygwdwHH2w6NKmDgK7NPidR3zv2JFNP54KalmPKnVBMia Fmu+rJrPAwuwuzDV/zQsw== X-UI-Out-Filterresults: notjunk:1;V01:K0:YTwfTBG6kto=:WaxOhBWPYf3fZCgJDWfL5Z GFNcFiBKFo0D0oQAXFOT9tHHajoTaDiSveEjrxGy9KafcqX+5pbteLoK+igDkYzcGDecVqu+0 UFiFcroz2Dp7bhyzIscYdw+xuXWDQy74yeypMplr8BTmhBED5xK0ebdqxhyvc4pD26UvYbGbV Cgyb27c+kNgXc+ROXBh+stPgKa7BzacAG8/A7Er+vpp6U7xgA16hOyl2uJ2XWt1qWMj2wzTLD OjlEtaH/rsTmUghMUCZda2tc5hJ4vkfhkegu+cgpoeyxoPvoHjq8IBa/mH4S44pis3hY0Xr1c 5K9KM8dloR9h8NiJ6t1fVWEcs+xPtv7et790wsSKrgc3wgSEw/UstLbnrjp47ojjzK903kqXB ZbR8Jg5+MFTG4RrL+94h5s+RH0+u9cKdFPz7hmZR1fEyHdwiPfNP/1QtpqFeIk2mY6HjZKQjE svWVb0vIdkevzxd5ZVA08MgtBVmGLTWhIfzpmd2sxM1NrcN2x/+7tHTaKmErSbzWJ6CF+4X1F H6/KCZO9aszeqQ4pwswcQlpSJi4g+fQ1Z8A2d1cx1SrEh55VcEaaW5BwIhOOCIukFaxnEgwWv 0kVv/4EA/hrJyY9bKkLn/LiVtCYZ/fS9WI+om3v4H3yRC+bWDHKG677ytlrZ0blB8ikDubbqc DNALuvHzeRMVtnl1RqhFwgwwJdmOr3CTZO6iNdumoF5/fnglEdtA2L3xCqjkl6YLvMYjM2q09 V2cfKJfv6m7kk8K69BX1zWFnFGP2yi0T8aOxDcCGQXstEGYlJMb7zQoh9CU= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 21:49:59 -0000 --Sig_/VYtqTxJV9u1_mQetu6X5kTA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Thu, 22 Jun 2017 21:22:12 +0000 (UTC) Bryan Drewery schrieb: > Author: bdrewery > Date: Thu Jun 22 21:22:12 2017 > New Revision: 320248 > URL: https://svnweb.freebsd.org/changeset/base/320248 >=20 > Log: > LINKER_VERSION: Support external binutils. > =20 > The ports binutils stores the version in the 5th word so just look for > a version using a pattern instead. > =20 > Reported by: rpokala > MFC after: 2 weeks > Sponsored by: Dell EMC Isilon >=20 > Modified: > head/share/mk/bsd.linker.mk >=20 > Modified: head/share/mk/bsd.linker.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:30 2017 (r320247) > +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:22:12 2017 (r320248) > @@ -48,7 +48,7 @@ _ld_version!=3D ${${ld}} --version 2>/dev/null | head -n > .endif > .if ${_ld_version:[1..2]} =3D=3D "GNU ld" > ${X_}LINKER_TYPE=3D binutils > -_v=3D ${_ld_version:[3]} > +_v=3D ${_ld_version:M[1-9].[0-9]*:[1]} > .elif ${_ld_version:[1]} =3D=3D "LLD" > ${X_}LINKER_TYPE=3D lld > _v=3D ${_ld_version:[2]} > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" make installworld: [...] --- installworld --- mkdir -p /tmp/install.miEfyZyL progs=3D$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp date e= cho egrep find grep id install ln make mkdir mtree mv pwd_mkdb rm sed services_mkdb sh = strip sysctl test true uname wc zic tzsetup makewhatis; do if progpath=3D`which $prog= `; then echo $progpath; else echo "Required tool $prog not found in PATH." >&2; exit = 1; fi; done); libs=3D$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u= | while read line; do $line; if [ "$2 $3" !=3D "not found" ]; then echo $2; else ec= ho "Required library $1 not found." >&2; exit 1; fi; done); cp $libs $progs /tmp/ins= tall.miEfyZyL cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.miEfyZyL/locale cd /= usr/src; COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dclang COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE_ARC= H=3Damd64 MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freebsd12= .0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D"c++= -target x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-freebsd1= 2.0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D"as"= AR=3D"ar" LD=3D"ld" LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SI= ZE=3D"size" PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr= /bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj= /usr/src/tmp/usr/bin:/tmp/install.miEfyZyL LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miEfyZy= L/locale make -f Makefile.inc1 __MAKE_SHELL=3D/tmp/install.miEfyZyL/sh reinstall; COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dclang COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE_ARC= H=3Damd64 MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freebsd12= .0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D"c++= -target x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-freebsd1= 2.0 --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D"as"= AR=3D"ar" LD=3D"ld" LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SI= ZE=3D"size" PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr= /bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj= /usr/src/tmp/usr/bin:/tmp/install.miEfyZyL LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miEfyZy= L/locale rm -rf /tmp/install.miEfyZyL sh: head: not found make[2]: "/usr/src/share/mk/b= sd.linker.mk" line 41: Unable to determine linker type from LD=3Dld *** [installworld] Er= ror code 1 --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/VYtqTxJV9u1_mQetu6X5kTA Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWUw6PgAKCRDS528fyFhY lNhgAgCJbnnnvR/lsalyQ1oHYhQDY66BI0oT35KdKOkmHUUOcMEhV/W0NptZrujs 2UKOu1DCjjVOvyO/coQaeq1PHP5XAf9HihqRPPkPHvjtlil93LDWp+05QnMgyWWH qOzAdfsw7EODC1U5wDR5ecmUeqpTRgSp571uUPpnMSFac1d5/1xu =fdJj -----END PGP SIGNATURE----- --Sig_/VYtqTxJV9u1_mQetu6X5kTA-- From owner-svn-src-all@freebsd.org Thu Jun 22 22:01:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 682E6D9525F; Thu, 22 Jun 2017 22:01:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 37E0067031; Thu, 22 Jun 2017 22:01:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 5EB001B770; Thu, 22 Jun 2017 22:01:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id D7FAA8507; Thu, 22 Jun 2017 22:01:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id OMBZIHn6xiJr; Thu, 22 Jun 2017 22:01:33 +0000 (UTC) Subject: Re: svn commit: r320248 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7F5F58502 To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706222122.v5MLMCCv033936@repo.freebsd.org> <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Thu, 22 Jun 2017 15:01:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VPGf1fWlkimc72SN6IIjXAMqp6bHaqvGN" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 22:01:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VPGf1fWlkimc72SN6IIjXAMqp6bHaqvGN Content-Type: multipart/mixed; boundary="xd5JU1WbnGNdUqsm6uhVGMsES7aPjwfEU"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r320248 - head/share/mk References: <201706222122.v5MLMCCv033936@repo.freebsd.org> <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> --xd5JU1WbnGNdUqsm6uhVGMsES7aPjwfEU Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/22/2017 2:44 PM, O. Hartmann wrote: > Am Thu, 22 Jun 2017 21:22:12 +0000 (UTC) > Bryan Drewery schrieb: >=20 >> Author: bdrewery >> Date: Thu Jun 22 21:22:12 2017 >> New Revision: 320248 >> URL: https://svnweb.freebsd.org/changeset/base/320248 >> >> Log: >> LINKER_VERSION: Support external binutils. >> =20 >> The ports binutils stores the version in the 5th word so just look f= or >> a version using a pattern instead. >> =20 >> Reported by: rpokala >> MFC after: 2 weeks >> Sponsored by: Dell EMC Isilon >> >> Modified: >> head/share/mk/bsd.linker.mk >> >> Modified: head/share/mk/bsd.linker.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:30 2017 (r320247) >> +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:22:12 2017 (r320248) >> @@ -48,7 +48,7 @@ _ld_version!=3D ${${ld}} --version 2>/dev/null | hea= d -n >> .endif >> .if ${_ld_version:[1..2]} =3D=3D "GNU ld" >> ${X_}LINKER_TYPE=3D binutils >> -_v=3D ${_ld_version:[3]} >> +_v=3D ${_ld_version:M[1-9].[0-9]*:[1]} >> .elif ${_ld_version:[1]} =3D=3D "LLD" >> ${X_}LINKER_TYPE=3D lld >> _v=3D ${_ld_version:[2]} >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org= " >=20 > make installworld: >=20 >=20 > [...] > --- installworld --- > mkdir -p /tmp/install.miEfyZyL > progs=3D$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp da= te echo egrep find > grep id install ln make mkdir mtree mv pwd_mkdb rm sed services_mkdb= sh strip sysctl > test true uname wc zic tzsetup makewhatis; do if progpath=3D`which $= prog`; then echo > $progpath; else echo "Required tool $prog not found in PATH." >&2; e= xit 1; fi; > done); libs=3D$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sor= t -u | while read > line; do $line; if [ "$2 $3" !=3D "not found" ]; then echo $2; else= echo "Required > library $1 not found." >&2; exit 1; fi; done); cp $libs $progs /tmp= /install.miEfyZyL > cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.miEfyZyL/locale = cd /usr/src; > COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dcl= ang > COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE= _ARCH=3Damd64 > MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freeb= sd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D= "c++ -target > x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp > -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-free= bsd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D= "as" AR=3D"ar" LD=3D"ld" > LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D= SIZE=3D"size" > PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy= /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/u= sr/obj/usr/src/tmp/usr/bin:/tmp/install.miEfyZyL > LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miE= fyZyL/locale make -f > Makefile.inc1 __MAKE_SHELL=3D/tmp/install.miEfyZyL/sh reinstall; > COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dcl= ang > COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE= _ARCH=3Damd64 > MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freeb= sd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D= "c++ -target > x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp > -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-free= bsd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D= "as" AR=3D"ar" LD=3D"ld" > LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D= SIZE=3D"size" > PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy= /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/u= sr/obj/usr/src/tmp/usr/bin:/tmp/install.miEfyZyL > LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miE= fyZyL/locale rm > -rf /tmp/install.miEfyZyL sh: head: not found make[2]: "/usr/src/share/= mk/bsd.linker.mk" > line 41: Unable to determine linker type from LD=3Dld *** [installworld= ] Error code 1 >=20 >=20 r320247 should have prevented this. Did you do a full buildworld after SVN up? Which revision are you actually on? --=20 Regards, Bryan Drewery --xd5JU1WbnGNdUqsm6uhVGMsES7aPjwfEU-- --VPGf1fWlkimc72SN6IIjXAMqp6bHaqvGN 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 iQEcBAEBAgAGBQJZTD4uAAoJEDXXcbtuRpfPB6YIAIaCz4F7GBpMZzqcsZFfvZO1 o7/OXqDxx8TrSvCcevtafT7WS+DIWNEkxQzNGHsMQgewSKyl/51iU3agC22QeAw7 zp7oCOoBzjiopG4YNCgo9yn6vnt4J55rU/EzLQgE47cBuqmMENg3K5DTadrYXyk1 KApqa9Qqrl6gU1f+WIY3jvBF5Q9Q0R7cPyY0CgWatU/H38Hr24EDz7lFPneLJEJO nTq3+19wm+SFYXhGTta0QwZ+i2Val7k4C+aGb2Krk8kXGngKPhjdKQRO84WjG5N6 5rwOGCjw4btEo8jUasw7BhQqShHaxw1NI4q1CrIXpgrr6lMVTe4M8774f0V19lc= =6bUj -----END PGP SIGNATURE----- --VPGf1fWlkimc72SN6IIjXAMqp6bHaqvGN-- From owner-svn-src-all@freebsd.org Thu Jun 22 22:53:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75AD8D96094; Thu, 22 Jun 2017 22:53:08 +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 41616688E6; Thu, 22 Jun 2017 22:53:08 +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 v5MMr722071555; Thu, 22 Jun 2017 22:53:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MMr734071554; Thu, 22 Jun 2017 22:53:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222253.v5MMr734071554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 22:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320249 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 22:53:08 -0000 Author: bdrewery Date: Thu Jun 22 22:53:07 2017 New Revision: 320249 URL: https://svnweb.freebsd.org/changeset/base/320249 Log: Don't overwrite already-set LINKER_VERSION/LINKER_TYPE. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu Jun 22 21:22:12 2017 (r320248) +++ head/share/mk/bsd.linker.mk Thu Jun 22 22:53:07 2017 (r320249) @@ -41,7 +41,7 @@ ${var}= ${${var}.${${X_}_ld_hash}} .endif .if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) - +.if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION) _ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none .if ${_ld_version} == "none" .error Unable to determine linker type from ${ld}=${${ld}} @@ -59,6 +59,7 @@ ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' .undef _ld_version .undef _v +.endif .endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) # Export the values so sub-makes don't have to look them up again, using the From owner-svn-src-all@freebsd.org Thu Jun 22 22:53:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61250D960B4; Thu, 22 Jun 2017 22:53:12 +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 2E16A688FD; Thu, 22 Jun 2017 22:53:12 +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 v5MMrB8b071600; Thu, 22 Jun 2017 22:53:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MMrBVC071599; Thu, 22 Jun 2017 22:53:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706222253.v5MMrBVC071599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Jun 2017 22:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320250 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 22:53:12 -0000 Author: bdrewery Date: Thu Jun 22 22:53:10 2017 New Revision: 320250 URL: https://svnweb.freebsd.org/changeset/base/320250 Log: Provide proper values for X_LINKER_TYPE/VERSION when XLD == LD. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu Jun 22 22:53:07 2017 (r320249) +++ head/share/mk/bsd.linker.mk Thu Jun 22 22:53:10 2017 (r320250) @@ -60,6 +60,10 @@ ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ .undef _ld_version .undef _v .endif +.else +# Use LD's values +X_LINKER_TYPE= ${LINKER_TYPE} +X_LINKER_VERSION= ${LINKER_VERSION} .endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) # Export the values so sub-makes don't have to look them up again, using the From owner-svn-src-all@freebsd.org Thu Jun 22 22:53:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 650BBD9612B; Thu, 22 Jun 2017 22:53:46 +0000 (UTC) (envelope-from bdrewery@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 3594C68B4D; Thu, 22 Jun 2017 22:53:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 67B341C206; Thu, 22 Jun 2017 22:53:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 19CA48753; Thu, 22 Jun 2017 22:53:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id CtQSKw3zHrwi; Thu, 22 Jun 2017 22:53:32 +0000 (UTC) Subject: Re: svn commit: r320248 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 761418749 To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706222122.v5MLMCCv033936@repo.freebsd.org> <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <40da943b-4d4e-125d-d4ce-9cf0d9d4f77c@FreeBSD.org> Date: Thu, 22 Jun 2017 15:53:31 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3Ao5hwVMFDNSifIPWtMQvoK7NH0bkxf2v" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 22:53:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3Ao5hwVMFDNSifIPWtMQvoK7NH0bkxf2v Content-Type: multipart/mixed; boundary="Cu0WeJOPpS10p9W4DNXTRnkMUUOe5REbC"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <40da943b-4d4e-125d-d4ce-9cf0d9d4f77c@FreeBSD.org> Subject: Re: svn commit: r320248 - head/share/mk References: <201706222122.v5MLMCCv033936@repo.freebsd.org> <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170622234430.2ab00612@thor.intern.walstatt.dynvpn.de> --Cu0WeJOPpS10p9W4DNXTRnkMUUOe5REbC Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/22/2017 2:44 PM, O. Hartmann wrote: > Am Thu, 22 Jun 2017 21:22:12 +0000 (UTC) > Bryan Drewery schrieb: >=20 >> Author: bdrewery >> Date: Thu Jun 22 21:22:12 2017 >> New Revision: 320248 >> URL: https://svnweb.freebsd.org/changeset/base/320248 >> >> Log: >> LINKER_VERSION: Support external binutils. >> =20 >> The ports binutils stores the version in the 5th word so just look f= or >> a version using a pattern instead. >> =20 >> Reported by: rpokala >> MFC after: 2 weeks >> Sponsored by: Dell EMC Isilon >> >> Modified: >> head/share/mk/bsd.linker.mk >> >> Modified: head/share/mk/bsd.linker.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:30 2017 (r320247) >> +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:22:12 2017 (r320248) >> @@ -48,7 +48,7 @@ _ld_version!=3D ${${ld}} --version 2>/dev/null | hea= d -n >> .endif >> .if ${_ld_version:[1..2]} =3D=3D "GNU ld" >> ${X_}LINKER_TYPE=3D binutils >> -_v=3D ${_ld_version:[3]} >> +_v=3D ${_ld_version:M[1-9].[0-9]*:[1]} >> .elif ${_ld_version:[1]} =3D=3D "LLD" >> ${X_}LINKER_TYPE=3D lld >> _v=3D ${_ld_version:[2]} >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org= " >=20 > make installworld: >=20 >=20 > [...] > --- installworld --- > mkdir -p /tmp/install.miEfyZyL > progs=3D$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp da= te echo egrep find > grep id install ln make mkdir mtree mv pwd_mkdb rm sed services_mkdb= sh strip sysctl > test true uname wc zic tzsetup makewhatis; do if progpath=3D`which $= prog`; then echo > $progpath; else echo "Required tool $prog not found in PATH." >&2; e= xit 1; fi; > done); libs=3D$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sor= t -u | while read > line; do $line; if [ "$2 $3" !=3D "not found" ]; then echo $2; else= echo "Required > library $1 not found." >&2; exit 1; fi; done); cp $libs $progs /tmp= /install.miEfyZyL > cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.miEfyZyL/locale = cd /usr/src; > COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dcl= ang > COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE= _ARCH=3Damd64 > MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freeb= sd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D= "c++ -target > x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp > -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-free= bsd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D= "as" AR=3D"ar" LD=3D"ld" > LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D= SIZE=3D"size" > PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy= /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/u= sr/obj/usr/src/tmp/usr/bin:/tmp/install.miEfyZyL > LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miE= fyZyL/locale make -f > Makefile.inc1 __MAKE_SHELL=3D/tmp/install.miEfyZyL/sh reinstall; > COMPILER_VERSION=3D40000 COMPILER_FEATURES=3Dc++11 COMPILER_TYPE=3Dcl= ang > COMPILER_FREEBSD_VERSION=3D1200006 MAKEOBJDIRPREFIX=3D/usr/obj MACHINE= _ARCH=3Damd64 > MACHINE=3Damd64 CPUTYPE=3Dnative CC=3D"cc -target x86_64-unknown-freeb= sd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX=3D= "c++ -target > x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp > -B/usr/obj/usr/src/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknown-free= bsd12.0 > --sysroot=3D/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS=3D= "as" AR=3D"ar" LD=3D"ld" > LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D= SIZE=3D"size" > PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy= /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/u= sr/obj/usr/src/tmp/usr/bin:/tmp/install.miEfyZyL > LD_LIBRARY_PATH=3D/tmp/install.miEfyZyL PATH_LOCALE=3D/tmp/install.miE= fyZyL/locale rm > -rf /tmp/install.miEfyZyL sh: head: not found make[2]: "/usr/src/share/= mk/bsd.linker.mk" > line 41: Unable to determine linker type from LD=3Dld *** [installworld= ] Error code 1 >=20 >=20 r320249 fixes it. No need to do another buildworld. --=20 Regards, Bryan Drewery --Cu0WeJOPpS10p9W4DNXTRnkMUUOe5REbC-- --3Ao5hwVMFDNSifIPWtMQvoK7NH0bkxf2v 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 iQEcBAEBAgAGBQJZTEpsAAoJEDXXcbtuRpfPBaIH/0QP12jIch6tIfUbwUHpaIjm FOet3nhOGKL6ojZrcdmfdppuAmoKioE+nhAV11MyCZHd3RXpLF8llU5qcXGC81Z6 ORfQfMgq2wofOK1CW7OkMDE1RO/K9GWIQyeFs8KwVLeIcNlLug0CmqrHqhuQl2Pk V3grXwOAwndW7TyRX7lPj2L+LfzI9YtlBS+Lwd85ZhM3LwCJezF4T40ppMxMIGja nkZgEKQ90CnRY+irOsa90zXOKLS1Osn1DrKlec3sMS2zGCFatV91VUEzdXk8mw/Q XLn9FCgF05PJdY8Fgk2gI5qQq4y1ugc8KmOCGzVCRm0tzuioYr2vcB9G0YPa6/g= =6of7 -----END PGP SIGNATURE----- --3Ao5hwVMFDNSifIPWtMQvoK7NH0bkxf2v-- From owner-svn-src-all@freebsd.org Thu Jun 22 23:38:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FF56D96D9E; Thu, 22 Jun 2017 23:38:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pg0-f41.google.com (mail-pg0-f41.google.com [74.125.83.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0EE16AF1D; Thu, 22 Jun 2017 23:38:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pg0-f41.google.com with SMTP id 132so14067354pgb.2; Thu, 22 Jun 2017 16:38:17 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=5yukiJqZGdIIMTuuWvNC9Is5l+tRYclOlGE5qU2ebEc=; b=H+bbZ7LMy3vNjePTw3rrrBj3g0nSxt+9r3BBQKk+6fK9lL+9b36CejTc2SJmsLDhv0 GdJ+fqjryPED55w7rE0l0PYJMZgdYhtj9LqAE1+QC2fhmkIz0av9jGpB63HwGQkWmjv6 l/gW/PwBGnPNYwcN/bt1TEDaMxoc8GWEM4Vxm5j/L38qsQ313xxDk5aURYUD4U3bVObz F8AbcAtfSPe0slNIRdefLNSEOPvTE7k3ai8Zihj0xE0P3Rm6hdylGWQe4j1C9CD+N7qM NxHtMuO3MFGkILUHfFi9YZR2brBOkuR/b+RDRVA5Sb91Jg6orEvVFa8lVa4Wgxih2cTp ZoXQ== X-Gm-Message-State: AKS2vOxQVXQV3e7Nw3jDsITNb8U4YIuRUNBuxS/zONjHLCkyMIjw1g+B 2VHpN7kJT86M/8DMTN106w== X-Received: by 10.101.91.138 with SMTP id i10mr5208497pgr.168.1498174696731; Thu, 22 Jun 2017 16:38:16 -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 18sm6142290pfo.92.2017.06.22.16.38.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 16:38:16 -0700 (PDT) Received: by mail-pg0-f42.google.com with SMTP id e187so14068005pgc.1; Thu, 22 Jun 2017 16:38:16 -0700 (PDT) X-Received: by 10.84.241.197 with SMTP id t5mr5638945plm.48.1498174696105; Thu, 22 Jun 2017 16:38:16 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.133.66 with HTTP; Thu, 22 Jun 2017 16:38:15 -0700 (PDT) In-Reply-To: <201610071257.u97CvZ3V029734@repo.freebsd.org> References: <201610071257.u97CvZ3V029734@repo.freebsd.org> From: Conrad Meyer Date: Thu, 22 Jun 2017 16:38:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306806 - head/usr.bin/dtc To: Ed Maste Cc: src-committers , 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 23:38:18 -0000 Hi Ed, I suspect this commit accidentally introduced a bug in define handling and was detected by Coverity as dead code (CID 1376409). On Fri, Oct 7, 2016 at 5:57 AM, Ed Maste wrote: > Author: emaste > Date: Fri Oct 7 12:57:35 2016 > New Revision: 306806 > URL: https://svnweb.freebsd.org/changeset/base/306806 > > Log: > Improvements to BSD-licensed DTC. > > - Numerous crash and bug fixes > - Improved warning and error messages > - Permit multiple labels on nodes and properties > - Fix node@address references > - Add support for /delete-node/ > - Consume whitespace after a node > - Read the next token before the second /memreserve/ > - Fix parsing of whitespace > - Clean up /delete-node/ and add support for /delete-property/ > - Handle /delete-node/ specifying a unit address > > Obtained from: https://github.com/davidchisnall/dtc @df5ede4 > > Modified: > head/usr.bin/dtc/checking.cc > head/usr.bin/dtc/checking.hh > head/usr.bin/dtc/dtb.cc > head/usr.bin/dtc/dtb.hh > head/usr.bin/dtc/dtc.1 > head/usr.bin/dtc/dtc.cc > head/usr.bin/dtc/fdt.cc > head/usr.bin/dtc/fdt.hh > head/usr.bin/dtc/input_buffer.cc > head/usr.bin/dtc/input_buffer.hh > head/usr.bin/dtc/string.cc > head/usr.bin/dtc/util.hh The original diff email was truncated, but this function was both moved from fdt.cc to input_buffer.cc and modified at the same time: fdt.cc: @@ -1169,87 +1327,10 @@ } } -bool -device_tree::parse_include(input_buffer &input, - const std::string &dir, - std::vector &roots, - FILE *depfile, - bool &read_header) -{ - if (!input.consume("/include/")) - { - return false; - } - bool reallyInclude =3D true; - if (input.consume("if ")) - { - input.next_token(); - string name =3D string::parse_property_name(input); - // XXX: Error handling - if (defines.find(name) =3D=3D defines.end()) - { - reallyInclude =3D false; - } - input.consume('/'); - } - input.next_token(); - if (!input.consume('"')) - { - input.parse_error("Expected quoted filename"); - valid =3D false; - return false; - } - int length =3D 0; - while (input[length] !=3D '"') length++; - - std::string file((const char*)input, length); - std::string include_file =3D dir + '/' + file; - input.consume(file.c_str()); - if (!reallyInclude) - { - input.consume('"'); - input.next_token(); - return true; - } ... input_buffer.cc: +void +text_input_buffer::handle_include() +{ + bool reallyInclude =3D true; + if (consume("if ")) + { + next_token(); + string name =3D parse_property_name(); + if (defines.count(name) > 0) + { + reallyInclude =3D true; + } + consume('/'); + } + next_token(); + if (!consume('"')) + { + parse_error("Expected quoted filename"); + return; + } + string file =3D parse_to('"'); + consume('"'); + if (!reallyInclude) + { + return; + } Note the use of the 'reallyInclude' sentinel. In the old function, it would be false if a "define" wasn't found in the "defines" lookup table, causing an early function return. In the new function, it is only ever initialized to true =E2=80=94 even if = the "define" isn't located in the global "defines" lookup table. Maybe the sense of the 'if (defines.count(name) > 0)' check and set should be inverted? Something like: if (defines.count(name) <=3D 0) reallyInclude =3D false; Best, Conrad From owner-svn-src-all@freebsd.org Fri Jun 23 00:00:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED086D97A75; Fri, 23 Jun 2017 00:00:01 +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 B7B726FDE5; Fri, 23 Jun 2017 00:00:01 +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 v5N000OC098927; Fri, 23 Jun 2017 00:00:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N000da098926; Fri, 23 Jun 2017 00:00:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706230000.v5N000da098926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 00:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320251 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:00:02 -0000 Author: gjb Date: Fri Jun 23 00:00:00 2017 New Revision: 320251 URL: https://svnweb.freebsd.org/changeset/base/320251 Log: Update stable/11 to BETA3 as part of the 11.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 22 22:53:10 2017 (r320250) +++ stable/11/sys/conf/newvers.sh Fri Jun 23 00:00:00 2017 (r320251) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Jun 23 00:08:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E209D97DEA; Fri, 23 Jun 2017 00:08:38 +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 0A64B70342; Fri, 23 Jun 2017 00:08:37 +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 v5N08bGB003364; Fri, 23 Jun 2017 00:08:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N08aR3003361; Fri, 23 Jun 2017 00:08:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706230008.v5N08aR3003361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 00:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320252 - in head/release: . arm64 tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:08:38 -0000 Author: gjb Date: Fri Jun 23 00:08:36 2017 New Revision: 320252 URL: https://svnweb.freebsd.org/changeset/base/320252 Log: In release/release.sh: - Rename chroot_arm_armv6_build_release() to chroot_arm_build_release() and make it hardware agnostic (such as armv6 -vs- armv7 -vs- arm64). - Evaluate EMBEDDED_TARGET differently so release/tools/arm.subr can be used for arm/armv6 and arm64/aarch64. - Update comments and copyright. In release/tools/arm.subr: - In arm_create_disk(), change the default alignment from 63 to 512k, fixing a boot issue on arm64 and EFI. [1] - Update comments and copyright. Add a RPI3 configuration file, pieces obtained from Crochet. Obtained from: Crochet [1] MFC after: 5 days X-MFC-Note: maybe Sponsored by: The FreeBSD Foundation Added: head/release/arm64/RPI3.conf (contents, props changed) Modified: head/release/release.sh head/release/tools/arm.subr Added: head/release/arm64/RPI3.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm64/RPI3.conf Fri Jun 23 00:08:36 2017 (r320252) @@ -0,0 +1,66 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +CHROOT_MAKEENV="TARGET=amd64 TARGET_ARCH=amd64" +SRCBRANCH="base/head@rHEAD" +EMBEDDEDBUILD=1 +EMBEDDED_TARGET="arm64" +EMBEDDED_TARGET_ARCH="aarch64" +EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss" +KERNEL="GENERIC" +#MAKE_FLAGS="${MAKE_FLAGS} -s" +WORLD_FLAGS="${WORLD_FLAGS} -j48 UBLDR_LOADADDR=0x42000000" +IMAGE_SIZE="2G" +PART_SCHEME="MBR" +FAT_SIZE="50m -b 1m" +FAT_TYPE="16" +MD_ARGS="-x 63 -y 255" +NODOC=1 +DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot" +DTB="bcm2710-rpi-3-b.dtb" +OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" +export BOARDNAME="RPI3" + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi3" + UBOOT_FILES="LICENCE.broadcom README armstub8.bin bootcode.bin config.txt \ + fixup.dat fixup_cd.dat fixup_x.dat start.elf start_cd.elf \ + start_x.elf u-boot.bin" + FATMOUNT="${DESTDIR%${KERNEL}}fat" + UFSMOUNT="${DESTDIR%${KERNEL}}ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + for _UF in ${UBOOT_FILES}; do + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ + ${FATMOUNT}/${_UF} + done + chroot ${CHROOTDIR} fetch -o "${FATMOUNT}/${DTB}" "${DTB_REPO}/${DTB}?raw=true" + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays + for _OL in ${OVERLAYS}; do + chroot ${CHROOTDIR} fetch -o "${FATMOUNT}/overlays/${_OL}"\ + "${DTB_REPO}/overlays/${_OL}?raw=true" + done + + _OBJDIR="$(chroot ${CHROOTDIR} make -C ${WORLDDIR} -V .OBJDIR)" + _OBJDIR="$(realpath ${_OBJDIR})" + if [ -d "${CHROOTDIR}/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + else + BOOTFILES="/${_OBJDIR}/sys/boot" + fi + + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT + chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \ + ${FATMOUNT}/EFI/BOOT/bootaa64.efi + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Fri Jun 23 00:00:00 2017 (r320251) +++ head/release/release.sh Fri Jun 23 00:08:36 2017 (r320252) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2013-2015 The FreeBSD Foundation +# Copyright (c) 2013-2017 The FreeBSD Foundation # Copyright (c) 2013 Glen Barber # Copyright (c) 2011 Nathan Whitehorn # All rights reserved. @@ -148,10 +148,11 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:armv6) - chroot_build_release_cmd="chroot_arm_armv6_build_release" + arm:armv6|arm64:aarch64) + chroot_build_release_cmd="chroot_arm_build_release" ;; *) + ;; esac fi @@ -346,13 +347,19 @@ chroot_build_release() { return 0 } # chroot_build_release() -# chroot_arm_armv6_build_release(): Create arm/armv6 SD card image. -chroot_arm_armv6_build_release() { +# chroot_arm_build_release(): Create arm SD card image. +chroot_arm_build_release() { load_target_env eval chroot ${CHROOTDIR} make -C /usr/src/release obj - if [ -e "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" ]; then - . "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" - fi + case ${EMBEDDED_TARGET} in + arm|arm64) + if [ -e "${RELENGDIR}/tools/arm.subr" ]; then + . "${RELENGDIR}/tools/arm.subr" + fi + ;; + *) + ;; + esac [ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}" WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)" OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)" @@ -381,7 +388,7 @@ chroot_arm_armv6_build_release() { > CHECKSUM.SHA256 return 0 -} # chroot_arm_armv6_build_release() +} # chroot_arm_build_release() # main(): Start here. main() { Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Fri Jun 23 00:00:00 2017 (r320251) +++ head/release/tools/arm.subr Fri Jun 23 00:08:36 2017 (r320252) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2015 The FreeBSD Foundation +# Copyright (c) 2015-2017 The FreeBSD Foundation # All rights reserved. # # Portions of this software were developed by Glen Barber @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Common subroutines used to build arm/armv6 images. +# Common subroutines used to build arm SD card images. # # $FreeBSD$ # @@ -65,7 +65,7 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 63 -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} From owner-svn-src-all@freebsd.org Fri Jun 23 00:11:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 455B2D97FD0; Fri, 23 Jun 2017 00:11:35 +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 160DB70640; Fri, 23 Jun 2017 00:11:35 +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 v5N0BY4q004278; Fri, 23 Jun 2017 00:11:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N0BYb2004277; Fri, 23 Jun 2017 00:11:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706230011.v5N0BYb2004277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 00:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320253 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:11:35 -0000 Author: gjb Date: Fri Jun 23 00:11:34 2017 New Revision: 320253 URL: https://svnweb.freebsd.org/changeset/base/320253 Log: Remove two configuration entries used for debugging that snuck in. MFC after: 5 days X-MFC-Note: maybe X-MFC-With: r320252 Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Fri Jun 23 00:08:36 2017 (r320252) +++ head/release/arm64/RPI3.conf Fri Jun 23 00:11:34 2017 (r320253) @@ -10,8 +10,7 @@ EMBEDDED_TARGET="arm64" EMBEDDED_TARGET_ARCH="aarch64" EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss" KERNEL="GENERIC" -#MAKE_FLAGS="${MAKE_FLAGS} -s" -WORLD_FLAGS="${WORLD_FLAGS} -j48 UBLDR_LOADADDR=0x42000000" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000" IMAGE_SIZE="2G" PART_SCHEME="MBR" FAT_SIZE="50m -b 1m" From owner-svn-src-all@freebsd.org Fri Jun 23 00:27:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68644D9835D; Fri, 23 Jun 2017 00:27:41 +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 2EC9870C74; Fri, 23 Jun 2017 00:27:41 +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 v5N0ReSn011404; Fri, 23 Jun 2017 00:27:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N0ReQC011403; Fri, 23 Jun 2017 00:27:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706230027.v5N0ReQC011403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 00:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320254 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:27:41 -0000 Author: gjb Date: Fri Jun 23 00:27:40 2017 New Revision: 320254 URL: https://svnweb.freebsd.org/changeset/base/320254 Log: Fix, for the fourth or fifth time now, looking up where boot1.efi is located. MFC after: 5 days X-MFC-Note: maybe X-MFC-With: r320252, r320253 Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Fri Jun 23 00:11:34 2017 (r320253) +++ head/release/arm64/RPI3.conf Fri Jun 23 00:27:40 2017 (r320254) @@ -45,8 +45,8 @@ arm_install_uboot() { _OBJDIR="$(chroot ${CHROOTDIR} make -C ${WORLDDIR} -V .OBJDIR)" _OBJDIR="$(realpath ${_OBJDIR})" - if [ -d "${CHROOTDIR}/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + if [ -d "${CHROOTDIR}/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}/usr/src/sys/boot" else BOOTFILES="/${_OBJDIR}/sys/boot" fi From owner-svn-src-all@freebsd.org Fri Jun 23 00:36:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE22D98623; Fri, 23 Jun 2017 00:36:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCDA571123; Fri, 23 Jun 2017 00:36:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f170.google.com with SMTP id s66so16044117pfs.1; Thu, 22 Jun 2017 17:36:52 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=wO13HNJfNQ0d0BC0THVaZwl9o1u1b5jhX8VIFkZoPBk=; b=e4RPhnIH/DIMfUCmVwTXKLeeHwBj7h8A2uDAE77IxzlcbDMXAYCXZnazO+LP31a2JS nUl6LVNcDmFUb/GdeI11j4tQ9BKFqVWY3j4TnAi0OKunGXBQxSMmyKOCBn73fc6YkX+x rMEVaoyFwPuSit97Nzyk6bDZ4Xtipg0LU2/htch/HeFQ78DtYwT/aXDvou7V5PEKHzTi lP+fpG7Ee4UpvDPi/PD8d7tcyeHXqEFiCHMvAw/mCu1qnD0Z+o6PrOPqMx24o3R2+8lM /Ko/U/JTS1RqJw3FG9njLvuS5RMs8z++yAkIVkFKQZ50VbRs8VjRZe/o10PTfyelQEp/ cqGA== X-Gm-Message-State: AKS2vOw77puXMpSL8Q54qlaPTpzPcWX/Zc3ND6jiVeHj+jr7vlnjbbLY H48aI+aT1d9X+l55hQ+vmw== X-Received: by 10.98.192.204 with SMTP id g73mr5248932pfk.26.1498176783648; Thu, 22 Jun 2017 17:13:03 -0700 (PDT) Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com. [74.125.83.43]) by smtp.gmail.com with ESMTPSA id s29sm5941084pfi.17.2017.06.22.17.13.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 17:13:03 -0700 (PDT) Received: by mail-pg0-f43.google.com with SMTP id f127so14356394pgc.0; Thu, 22 Jun 2017 17:13:03 -0700 (PDT) X-Received: by 10.99.119.12 with SMTP id s12mr5284842pgc.143.1498176783357; Thu, 22 Jun 2017 17:13:03 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.133.66 with HTTP; Thu, 22 Jun 2017 17:13:02 -0700 (PDT) In-Reply-To: <201706170258.v5H2wWCT006080@repo.freebsd.org> References: <201706170258.v5H2wWCT006080@repo.freebsd.org> From: Conrad Meyer Date: Thu, 22 Jun 2017 17:13:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320048 - head/usr.bin/mkuzip To: Maxim Sobolev Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:36:53 -0000 ffd is leaked in return paths. Coverity CID 1376420. On Fri, Jun 16, 2017 at 7:58 PM, Maxim Sobolev wrote: > Author: sobomax > Date: Sat Jun 17 02:58:31 2017 > New Revision: 320048 > URL: https://svnweb.freebsd.org/changeset/base/320048 > > Log: > o Move logic that determines size of the input image into its own > file. That logic has grown quite significantly now; > > o add a special handling for the snapshot images. Those have some > extra headers at the end of the image and we don't need those > in the output image really. > > MFC after: 6 weeks > > ... > Added: head/usr.bin/mkuzip/mkuz_insize.c > ... > +off_t > +mkuz_get_insize(struct mkuz_cfg *cfp) > +{ > + int ffd; > + off_t ms; > + struct stat sb; > + struct statfs statfsbuf; > + > + if (fstat(cfp->fdr, &sb) != 0) { > + warn("fstat(%s)", cfp->iname); > + return (-1); > + } > + if ((sb.st_flags & SF_SNAPSHOT) != 0) { > + if (fstatfs(cfp->fdr, &statfsbuf) != 0) { > + warn("fstatfs(%s)", cfp->iname); > + return (-1); > + } > + ffd = open(statfsbuf.f_mntfromname, O_RDONLY); > + if (ffd < 0) { > + warn("open(%s, O_RDONLY)", statfsbuf.f_mntfromname); > + return (-1); > + } > + if (ioctl(ffd, DIOCGMEDIASIZE, &ms) < 0) { > + warn("ioctl(DIOCGMEDIASIZE)"); > + return (-1); ffd leaked here. > + } ffd also leaked here via fallthrough return. > + sb.st_size = ms; > + } else if (S_ISCHR(sb.st_mode)) { > + if (ioctl(cfp->fdr, DIOCGMEDIASIZE, &ms) < 0) { > + warn("ioctl(DIOCGMEDIASIZE)"); > + return (-1); > + } > + sb.st_size = ms; > + } else if (!S_ISREG(sb.st_mode)) { > + warnx("%s: not a character device or regular file\n", > + cfp->iname); > + return (-1); > + } > + return (sb.st_size); > +} From owner-svn-src-all@freebsd.org Fri Jun 23 00:40:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BEE6D986C3; Fri, 23 Jun 2017 00:40:11 +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 15BBE7129D; Fri, 23 Jun 2017 00:40:11 +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 v5N0eAbb015847; Fri, 23 Jun 2017 00:40:10 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N0e9pk015845; Fri, 23 Jun 2017 00:40:09 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706230040.v5N0e9pk015845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 23 Jun 2017 00:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320255 - in head: lib/libc/sys share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:40:11 -0000 Author: asomers Date: Fri Jun 23 00:40:09 2017 New Revision: 320255 URL: https://svnweb.freebsd.org/changeset/base/320255 Log: Clarify usage of aio(4) with kqueue(2) Reviewed by: jhb MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D11299 Modified: head/lib/libc/sys/kqueue.2 head/share/man/man4/aio.4 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Fri Jun 23 00:27:40 2017 (r320254) +++ head/lib/libc/sys/kqueue.2 Fri Jun 23 00:40:09 2017 (r320255) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 17, 2017 +.Dd June 22, 2017 .Dt KQUEUE 2 .Os .Sh NAME @@ -351,33 +351,18 @@ case. Takes a descriptor as the identifier, and returns whenever there is no remaining data in the write buffer. .It Dv EVFILT_AIO -The sigevent portion of the AIO request is filled in, with -.Va sigev_notify_kqueue -containing the descriptor of the kqueue that the event should -be attached to, -.Va sigev_notify_kevent_flags -containing the kevent flags which should be -.Dv EV_ONESHOT , -.Dv EV_CLEAR -or -.Dv EV_DISPATCH , -.Va sigev_value -containing the udata value, and -.Va sigev_notify -set to -.Dv SIGEV_KEVENT . -When the -.Fn aio_* -system call is made, the event will be registered -with the specified kqueue, and the -.Va ident -argument set to the -.Fa struct aiocb -returned by the -.Fn aio_* -system call. +Events for this filter are not registered with +.Fn kevent +directly but are registered via the +.Va aio_sigevent +member of an asychronous I/O request when it is scheduled via an asychronous I/O +system call such as +.Fn aio_read . The filter returns under the same conditions as .Fn aio_error . +For more details on this filter see +.Xr sigevent 3 and +.Xr aio 4 . .It Dv EVFILT_VNODE Takes a file descriptor as the identifier and the events to watch for in .Va fflags , Modified: head/share/man/man4/aio.4 ============================================================================== --- head/share/man/man4/aio.4 Fri Jun 23 00:27:40 2017 (r320254) +++ head/share/man/man4/aio.4 Fri Jun 23 00:40:09 2017 (r320255) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd June 22, 2017 .Dt AIO 4 .Os .Sh NAME @@ -161,11 +161,27 @@ field which can be used to request notification when a For .Dv SIGEV_KEVENT notifications, -the posted kevent will contain: +the +.Va sigevent +.Ap +s +.Va sigev_notify_kqueue +field should contain the descriptor of the kqueue that the event should be attached +to, its +.Va sigev_notify_kevent_flags +field may contain +.Dv EV_ONESHOT , +.Dv EV_CLEAR , and/or +.Dv EV_DISPATCH , and its +.Va sigev_notify +field should be set to +.Dv SIGEV_KEVENT . +The posted kevent will contain: .Bl -column ".Va filter" .It Sy Member Ta Sy Value .It Va ident Ta asynchronous I/O control buffer pointer .It Va filter Ta Dv EVFILT_AIO +.It Va flags Ta Dv EV_EOF .It Va udata Ta value stored in .Va aio_sigevent.sigev_value From owner-svn-src-all@freebsd.org Fri Jun 23 01:05:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34CCED98C30; Fri, 23 Jun 2017 01:05:51 +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 CD2D771CFD; Fri, 23 Jun 2017 01:05:50 +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 v5N15npU027781; Fri, 23 Jun 2017 01:05:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N15n16027780; Fri, 23 Jun 2017 01:05:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706230105.v5N15n16027780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 23 Jun 2017 01:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320256 - head/etc/ntp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 01:05:51 -0000 Author: cy Date: Fri Jun 23 01:05:49 2017 New Revision: 320256 URL: https://svnweb.freebsd.org/changeset/base/320256 Log: Replace the leap-seconds file in r320242 from USNO - ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 - with a leap-seconds file from NIST at ftp://time.nist.gov/pub/. The USNO version of the file changes the last documented leap second update time whereas the NIST version does not. The expiration of the USNO version of the file is also one month short. Requested by: ian@ Obtained from: ftp://time.nist.gov/pub/leap-seconds.3676924800 MFC after: 3 days Modified: head/etc/ntp/leap-seconds Modified: head/etc/ntp/leap-seconds ============================================================================== --- head/etc/ntp/leap-seconds Fri Jun 23 00:40:09 2017 (r320255) +++ head/etc/ntp/leap-seconds Fri Jun 23 01:05:49 2017 (r320256) @@ -1,10 +1,10 @@ # # In the following text, the symbol '#' introduces -# a comment, which continues from that symbol until +# a comment, which continues from that symbol until # the end of the line. A plain comment line has a # whitespace character following the comment indicator. -# There are also special comment lines defined below. -# A special comment will always have a non-whitespace +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace # character in column 2. # # A blank line should be ignored. @@ -15,17 +15,22 @@ # are transmitted by almost all time services. # # The first column shows an epoch as a number of seconds -# since 1900.0 and the second column shows the number of -# seconds that must be added to UTC to compute TAI for -# any timestamp at or after that epoch. The value on -# each line is valid from the indicated initial instant -# until the epoch given on the next one or indefinitely -# into the future if there is no next line. +# since 1 January 1900, 00:00:00 (1900.0 is also used to +# indicate the same epoch.) Both of these time stamp formats +# ignore the complexities of the time scales that were +# used before the current definition of UTC at the start +# of 1972. (See note 3 below.) +# The second column shows the number of seconds that +# must be added to UTC to compute TAI for any timestamp +# at or after that epoch. The value on each line is +# valid from the indicated initial instant until the +# epoch given on the next one or indefinitely into the +# future if there is no next line. # (The comment on each line shows the representation of -# the corresponding initial epoch in the usual +# the corresponding initial epoch in the usual # day-month-year format. The epoch always begins at # 00:00:00 UTC on the indicated day. See Note 5 below.) -# +# # Important notes: # # 1. Coordinated Universal Time (UTC) is often referred to @@ -33,7 +38,7 @@ # longer used, and the use of GMT to designate UTC is # discouraged. # -# 2. The UTC time scale is realized by many national +# 2. The UTC time scale is realized by many national # laboratories and timing centers. Each laboratory # identifies its realization with its name: Thus # UTC(NIST), UTC(USNO), etc. The differences among @@ -42,12 +47,12 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # -# 3. The current defintion of the relationship between UTC -# and TAI dates from 1 January 1972. A number of different -# time scales were in use before than epoch, and it can be -# quite difficult to compute precise timestamps and time +# 3. The current definition of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before that epoch, and it can be +# quite difficult to compute precise timestamps and time # intervals in those "prehistoric" days. For more information, # consult: # @@ -58,36 +63,34 @@ # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. # -# 4. The insertion of leap seconds into UTC is currently the -# responsibility of the International Earth Rotation Service, -# which is located at the Paris Observatory: +# 4. The decision to insert a leap second into UTC is currently +# the responsibility of the International Earth Rotation and +# Reference Systems Service. (The name was changed from the +# International Earth Rotation Service, but the acronym IERS +# is still used.) # -# Central Bureau of IERS -# 61, Avenue de l'Observatoire -# 75014 Paris, France. +# Leap seconds are announced by the IERS in its Bulletin C. # -# Leap seconds are announced by the IERS in its Bulletin C +# See www.iers.org for more details. # -# See hpiers.obspm.fr or www.iers.org for more details. +# Every national laboratory and timing center uses the +# data from the BIPM and the IERS to construct UTC(lab), +# their local realization of UTC. # -# All national laboratories and timing centers use the -# data from the BIPM and the IERS to construct their -# local realizations of UTC. -# # Although the definition also includes the possibility -# of dropping seconds ("negative" leap seconds), this has -# never been done and is unlikely to be necessary in the +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the # foreseeable future. # # 5. If your system keeps time as the number of seconds since # some epoch (e.g., NTP timestamps), then the algorithm for # assigning a UTC time stamp to an event that happens during a positive -# leap second is not well defined. The official name of that leap -# second is 23:59:60, but there is no way of representing that time -# in these systems. -# Many systems of this type effectively stop the system clock for -# one second during the leap second and use a time that is equivalent -# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI # timestamp would be obtained by advancing to the next entry in the # following table when the time equivalent to 23:59:59 UTC # is used for the second time. Thus the leap second which @@ -102,7 +105,7 @@ # # If your system realizes the leap second by repeating 00:00:00 UTC twice # (this is possible but not usual), then the advance to the next entry -# in the table must occur the second time that a time equivlent to +# in the table must occur the second time that a time equivalent to # 00:00:00 UTC is used. Thus, using the same example as above: # # ... @@ -112,66 +115,94 @@ # ... # # in both cases the use of timestamps based on TAI produces a smooth -# time scale with no discontinuity in the time interval. +# time scale with no discontinuity in the time interval. However, +# although the long-term behavior of the time scale is correct in both +# methods, the second method is technically not correct because it adds +# the extra second to the wrong day. # -# This complexity would not be needed for negative leap seconds (if they -# are ever used). The UTC time would skip 23:59:59 and advance from -# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by -# 1 second at the same instant. This is a much easier situation to deal -# with, since the difficulty of unambiguously representing the epoch +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. +# # Questions or comments to: -# Jeff Prillaman -# Time Service Department -# US Naval Observatory -# Washington, DC -# jeffrey.prillaman@usno.navy.mil +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# Judah.Levine@nist.gov # -# Last Update of leap second values: 18 Apr 2017 +# Last Update of leap second values: 8 July 2016 # -# The following line shows this last update date in NTP timestamp +# The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to # the leap second data was added to the file. This line can -# be identified by the unique pair of characters in the first two +# be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3701462400 +#$ 3676924800 # -# The data in this file will be updated periodically as new leap +# The NTP timestamps are in units of seconds since the NTP epoch, +# which is 1 January 1900, 00:00:00. The Modified Julian Day number +# corresponding to the NTP time stamp, X, can be computed as +# +# X/86400 + 15020 +# +# where the first term converts seconds to days and the second +# term adds the MJD corresponding to the time origin defined above. +# The integer portion of the result is the integer MJD for that +# day, and any remainder is the time of day, expressed as the +# fraction of the day since 0 hours UTC. The conversion from day +# fraction to seconds or to hours, minutes, and seconds may involve +# rounding or truncation, depending on the method used in the +# computation. +# +# The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line -# above, the update time (in NTP format) will be added to the basic +# above, the update time (in NTP format) will be added to the basic # file name leap-seconds to form the name leap-seconds.. -# In addition, the generic name leap-seconds.list will always point to +# In addition, the generic name leap-seconds.list will always point to # the most recent version of the file. # # This update procedure will be performed only when a new leap second -# is announced. +# is announced. # # The following entry specifies the expiration date of the data -# in this file in units of seconds since 1900.0. This expiration date -# will be changed at least twice per year whether or not a new leap -# second is announced. These semi-annual changes will be made no -# later than 1 June and 1 December of each year to indicate what -# action (if any) is to be taken on 30 June and 31 December, +# in this file in units of seconds since the origin at the instant +# 1 January 1900, 00:00:00. This expiration date will be changed +# at least twice per year whether or not a new leap second is +# announced. These semi-annual changes will be made no later +# than 1 June and 1 December of each year to indicate what +# action (if any) is to be taken on 30 June and 31 December, # respectively. (These are the customary effective dates for new # leap seconds.) This expiration date will be identified by a # unique pair of characters in columns 1 and 2 as shown below. -# In the unlikely event that a leap second is announced with an +# In the unlikely event that a leap second is announced with an # effective date other than 30 June or 31 December, then this # file will be edited to include that leap second as soon as it is # announced or at least one month before the effective date -# (whichever is later). -# If an announcement by the IERS specifies that no leap second is -# scheduled, then only the expiration date of the file will +# (whichever is later). +# If an announcement by the IERS specifies that no leap second is +# scheduled, then only the expiration date of the file will # be advanced to show that the information in the file is still -# current -- the update time stamp, the data and the name of the file +# current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 53 -# File expires on: 1 Dec 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 # -#@ 3721075200 +#@ 3723408000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -205,16 +236,15 @@ # the following special comment contains the # hash value of the data in this file computed # use the secure hash algorithm as specified -# by FIPS 180-1. See the files in ~/sha for +# by FIPS 180-1. See the files in ~/pub/sha for # the details of how this hash value is # computed. Note that the hash computation # ignores comments and whitespace characters # in data lines. It includes the NTP values -# of both the last modification time and the +# of both the last modification time and the # expiration time of the file, but not the # white space on those lines. # the hash line is also ignored in the # computation. # -#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 -# +#h 62cf8c5d 8bbb6dcc c61e3b56 c308343 869bb80d From owner-svn-src-all@freebsd.org Fri Jun 23 01:06:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 579EBD98C6C; Fri, 23 Jun 2017 01:06:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (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 DC47A71DE6; Fri, 23 Jun 2017 01:06:05 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OD2qd8esdM9gtOD2rdrSPu; Thu, 22 Jun 2017 19:05:59 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=LWSFodeU3zMA:10 a=XldT38RWNwACPDQzwzUA:9 a=6I5d2MoRAAAA:8 a=qyDxTJV7AAAA:8 a=PYnjg3YJAAAA:8 a=DYLuha1j27-hCIhesKsA:9 a=wPNLvfGTeEIA:10 a=m-w02ATHAAAA:8 a=HjEdur_ZAAAA:8 a=8BxFqUjPAAAA:8 a=_uFKFmxJaJP077kJHyMA:9 a=Swq5NdzsTFHhtY39:21 a=wpjR_oSjSLl80N17:21 a=hquHOILUSkIA:10 a=YxBL1-UpAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=IjZwj45LgO3ly-622nXo:22 a=aVrITwz5twCY0aGzra0O:22 a=96-UuAdfYG6OSYlHWuPe:22 a=OP4o87eNYoEXs-Ejf1in:22 a=aD4WmjVXVPxnezg8-Tec:22 a=7aCoql57-N0si2cdfCkG:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 003C5694; Thu, 22 Jun 2017 18:05:55 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5N14e3e031473; Thu, 22 Jun 2017 18:04:40 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706230104.v5N14e3e031473@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: Ian Lepore cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320242 - head/etc/ntp In-Reply-To: Message from Ian Lepore of "Thu, 22 Jun 2017 14:02:27 -0600." <1498161747.66489.10.camel@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1498178950_284940" Date: Thu, 22 Jun 2017 18:04:40 -0700 X-CMAE-Envelope: MS4wfJr9hyN1Tum4v9YgOR2uV1+u4v6fSmsOnj35qqpefIXdtxvv6ghuc4493LBR/mNvuLyW6sjqzJ98GzpZveJNE/dl8eD3hhbPR0lPkilp1IyXhUNKE1U5 tUha6qcGjHqM7lYtqTBjHJP3kU/CMOzeynjVWSiu5d/LEIt3hTaOZr4ILwuEnEc1w66oDhmGf97XpyTOvaZbQM4DMWd7ks+NcUaFPaUYfbBT2fjCqd4qzCi6 ZNVPipvn4jDzj0xvy7VhhpDRlf5x/26TwPvwmWp3FD9ME1zHokblNsVqvhoOwNA1jNSavFKn6Pu7YUcTGk1dgg== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 01:06:06 -0000 This is a multipart MIME message. --==_Exmh_1498178950_284940 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit In message <1498161747.66489.10.camel@freebsd.org>, Ian Lepore writes: > On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: > > Author: cy > > Date: Thu Jun 22 19:25:17 2017 > > New Revision: 320242 > > URL: https://svnweb.freebsd.org/changeset/base/320242 > > > > Log: > >   Update leap-seconds to leap-seconds.3701462400. > >  > > > > Modified: head/etc/ntp/leap-seconds > > ===================================================================== > > ========= > > --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 > > (r320241) > > +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 > > (r320242) > > @@ -128,7 +128,7 @@ > >  # Washington, DC > >  # jeffrey.prillaman@usno.navy.mil > >  # > > -# Last Update of leap second values:   6 Jul 2016 > > +# Last Update of leap second values:  18 Apr 2017 > >  # >  # The following line shows this last update date in NTP > > timestamp  > >  # format. This is the date on which the most recent change to > > @@ -136,7 +136,7 @@ > >  # be identified by the unique pair of characters in the first > > two  > >  # columns as shown below. > >  # > > -#$  3676752000 > > +#$  3701462400 > >  # > > Where did this leapfile come from?  The last update of leap second > values is supposed to change only when the actual list of offsets > changes, not when the file is updated to just change an expiration > date.  This is actually very explicitly documented in the file itself, > just a few lines down from this change: The source of the leapfile is in the commit message. Here it is again: Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 > >   If an announcement by the IERS specifies that no leap second is  >   scheduled, then only the expiration date of the file will  >   be advanced to show that the information in the file is still >   current -- the update time stamp, the data and the name of the file  >   will not change. > > > > -# File expires on:  1 Jun 2017 > > +# Updated through IERS Bulletin C 53 > > +# File expires on:  1 Dec 2017 > >  # > > -#@ 3705264000 > > +#@ 3721075200 > >  # > > This expiration is wrong too, dangerously so IMO.  The data in the file > is good through 12-31-2017-23:59:59, although historical practice has > been to make the file expire a couple days before that.  Making it > expire 31 days early is about the worst possible choice... some systems > for notifying clients/consumers of an impending leap second (or the > lack thereof) only do so during the last month before the leap > opportunity -- this has the file expire just at the point such software > would consider it authoratative for dissemination. My guess is that USNO may have had reason to do so. I'll keep an eye on their next release of the file.   > > I will note however, unlike the update date, there is no formal written > description of how expiration date is determined, so the previous > paragraph is just my opinion and experience working in the timing > field. > > A leapfile without these problems can be found at > >   ftp://time.nist.gov/pub/leap-seconds.list We can use that instead. Attached is the diff between the USNO and NIST versions of the file. One would think that two groups within the US Government might be able to produce a consistent leapfile. I suspect the real reason is that the USNO might have a different bureaucratic process than the NIST does. > > > -- Ian > > >  2272060800 10 # 1 Jan 1972 > >  2287785600 11 # 1 Jul 1972 > > @@ -216,5 +216,5 @@ > >  # the hash line is also ignored in the > >  # computation. > >  # > > -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 > > +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 > >  # > > > I'll update to the NIST version of the file. --==_Exmh_1498178950_284940 Content-Type: text/plain ; name="leap-seconds.diff"; charset=iso-8859-1 Content-Description: leap-seconds.diff Content-Disposition: attachment; filename="leap-seconds.diff" Content-Transfer-Encoding: 8bit --- leap-seconds 2017-04-18 07:11:44.000000000 -0700 +++ leap-seconds.3676924800 2017-02-07 10:05:13.000000000 -0800 @@ -1,10 +1,10 @@ # # In the following text, the symbol '#' introduces -# a comment, which continues from that symbol until +# a comment, which continues from that symbol until # the end of the line. A plain comment line has a # whitespace character following the comment indicator. -# There are also special comment lines defined below. -# A special comment will always have a non-whitespace +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace # character in column 2. # # A blank line should be ignored. @@ -15,17 +15,22 @@ # are transmitted by almost all time services. # # The first column shows an epoch as a number of seconds -# since 1900.0 and the second column shows the number of -# seconds that must be added to UTC to compute TAI for -# any timestamp at or after that epoch. The value on -# each line is valid from the indicated initial instant -# until the epoch given on the next one or indefinitely -# into the future if there is no next line. +# since 1 January 1900, 00:00:00 (1900.0 is also used to +# indicate the same epoch.) Both of these time stamp formats +# ignore the complexities of the time scales that were +# used before the current definition of UTC at the start +# of 1972. (See note 3 below.) +# The second column shows the number of seconds that +# must be added to UTC to compute TAI for any timestamp +# at or after that epoch. The value on each line is +# valid from the indicated initial instant until the +# epoch given on the next one or indefinitely into the +# future if there is no next line. # (The comment on each line shows the representation of -# the corresponding initial epoch in the usual +# the corresponding initial epoch in the usual # day-month-year format. The epoch always begins at # 00:00:00 UTC on the indicated day. See Note 5 below.) -# +# # Important notes: # # 1. Coordinated Universal Time (UTC) is often referred to @@ -33,7 +38,7 @@ # longer used, and the use of GMT to designate UTC is # discouraged. # -# 2. The UTC time scale is realized by many national +# 2. The UTC time scale is realized by many national # laboratories and timing centers. Each laboratory # identifies its realization with its name: Thus # UTC(NIST), UTC(USNO), etc. The differences among @@ -42,12 +47,12 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # -# 3. The current defintion of the relationship between UTC -# and TAI dates from 1 January 1972. A number of different -# time scales were in use before than epoch, and it can be -# quite difficult to compute precise timestamps and time +# 3. The current definition of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before that epoch, and it can be +# quite difficult to compute precise timestamps and time # intervals in those "prehistoric" days. For more information, # consult: # @@ -58,36 +63,34 @@ # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. # -# 4. The insertion of leap seconds into UTC is currently the -# responsibility of the International Earth Rotation Service, -# which is located at the Paris Observatory: +# 4. The decision to insert a leap second into UTC is currently +# the responsibility of the International Earth Rotation and +# Reference Systems Service. (The name was changed from the +# International Earth Rotation Service, but the acronym IERS +# is still used.) # -# Central Bureau of IERS -# 61, Avenue de l'Observatoire -# 75014 Paris, France. +# Leap seconds are announced by the IERS in its Bulletin C. # -# Leap seconds are announced by the IERS in its Bulletin C +# See www.iers.org for more details. # -# See hpiers.obspm.fr or www.iers.org for more details. +# Every national laboratory and timing center uses the +# data from the BIPM and the IERS to construct UTC(lab), +# their local realization of UTC. # -# All national laboratories and timing centers use the -# data from the BIPM and the IERS to construct their -# local realizations of UTC. -# # Although the definition also includes the possibility -# of dropping seconds ("negative" leap seconds), this has -# never been done and is unlikely to be necessary in the +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the # foreseeable future. # # 5. If your system keeps time as the number of seconds since # some epoch (e.g., NTP timestamps), then the algorithm for # assigning a UTC time stamp to an event that happens during a positive -# leap second is not well defined. The official name of that leap -# second is 23:59:60, but there is no way of representing that time -# in these systems. -# Many systems of this type effectively stop the system clock for -# one second during the leap second and use a time that is equivalent -# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI # timestamp would be obtained by advancing to the next entry in the # following table when the time equivalent to 23:59:59 UTC # is used for the second time. Thus the leap second which @@ -102,7 +105,7 @@ # # If your system realizes the leap second by repeating 00:00:00 UTC twice # (this is possible but not usual), then the advance to the next entry -# in the table must occur the second time that a time equivlent to +# in the table must occur the second time that a time equivalent to # 00:00:00 UTC is used. Thus, using the same example as above: # # ... @@ -112,66 +115,94 @@ # ... # # in both cases the use of timestamps based on TAI produces a smooth -# time scale with no discontinuity in the time interval. +# time scale with no discontinuity in the time interval. However, +# although the long-term behavior of the time scale is correct in both +# methods, the second method is technically not correct because it adds +# the extra second to the wrong day. # -# This complexity would not be needed for negative leap seconds (if they -# are ever used). The UTC time would skip 23:59:59 and advance from -# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by -# 1 second at the same instant. This is a much easier situation to deal -# with, since the difficulty of unambiguously representing the epoch +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. +# # Questions or comments to: -# Jeff Prillaman -# Time Service Department -# US Naval Observatory -# Washington, DC -# jeffrey.prillaman@usno.navy.mil +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# Judah.Levine@nist.gov # -# Last Update of leap second values: 18 Apr 2017 +# Last Update of leap second values: 8 July 2016 # -# The following line shows this last update date in NTP timestamp +# The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to # the leap second data was added to the file. This line can -# be identified by the unique pair of characters in the first two +# be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3701462400 +#$ 3676924800 # -# The data in this file will be updated periodically as new leap +# The NTP timestamps are in units of seconds since the NTP epoch, +# which is 1 January 1900, 00:00:00. The Modified Julian Day number +# corresponding to the NTP time stamp, X, can be computed as +# +# X/86400 + 15020 +# +# where the first term converts seconds to days and the second +# term adds the MJD corresponding to the time origin defined above. +# The integer portion of the result is the integer MJD for that +# day, and any remainder is the time of day, expressed as the +# fraction of the day since 0 hours UTC. The conversion from day +# fraction to seconds or to hours, minutes, and seconds may involve +# rounding or truncation, depending on the method used in the +# computation. +# +# The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line -# above, the update time (in NTP format) will be added to the basic +# above, the update time (in NTP format) will be added to the basic # file name leap-seconds to form the name leap-seconds.. -# In addition, the generic name leap-seconds.list will always point to +# In addition, the generic name leap-seconds.list will always point to # the most recent version of the file. # # This update procedure will be performed only when a new leap second -# is announced. +# is announced. # # The following entry specifies the expiration date of the data -# in this file in units of seconds since 1900.0. This expiration date -# will be changed at least twice per year whether or not a new leap -# second is announced. These semi-annual changes will be made no -# later than 1 June and 1 December of each year to indicate what -# action (if any) is to be taken on 30 June and 31 December, +# in this file in units of seconds since the origin at the instant +# 1 January 1900, 00:00:00. This expiration date will be changed +# at least twice per year whether or not a new leap second is +# announced. These semi-annual changes will be made no later +# than 1 June and 1 December of each year to indicate what +# action (if any) is to be taken on 30 June and 31 December, # respectively. (These are the customary effective dates for new # leap seconds.) This expiration date will be identified by a # unique pair of characters in columns 1 and 2 as shown below. -# In the unlikely event that a leap second is announced with an +# In the unlikely event that a leap second is announced with an # effective date other than 30 June or 31 December, then this # file will be edited to include that leap second as soon as it is # announced or at least one month before the effective date -# (whichever is later). -# If an announcement by the IERS specifies that no leap second is -# scheduled, then only the expiration date of the file will +# (whichever is later). +# If an announcement by the IERS specifies that no leap second is +# scheduled, then only the expiration date of the file will # be advanced to show that the information in the file is still -# current -- the update time stamp, the data and the name of the file +# current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 53 -# File expires on: 1 Dec 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 # -#@ 3721075200 +#@ 3723408000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -205,16 +236,15 @@ # the following special comment contains the # hash value of the data in this file computed # use the secure hash algorithm as specified -# by FIPS 180-1. See the files in ~/sha for +# by FIPS 180-1. See the files in ~/pub/sha for # the details of how this hash value is # computed. Note that the hash computation # ignores comments and whitespace characters # in data lines. It includes the NTP values -# of both the last modification time and the +# of both the last modification time and the # expiration time of the file, but not the # white space on those lines. # the hash line is also ignored in the # computation. # -#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 -# +#h 62cf8c5d 8bbb6dcc c61e3b56 c308343 869bb80d --==_Exmh_1498178950_284940 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. --==_Exmh_1498178950_284940-- From owner-svn-src-all@freebsd.org Fri Jun 23 02:00:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92856D99B9E; Fri, 23 Jun 2017 02:00: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 596C1732C5; Fri, 23 Jun 2017 02:00:03 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 0A39F132BC; Fri, 23 Jun 2017 02:00:01 +0000 (UTC) Subject: Re: svn commit: r320242 - head/etc/ntp To: Cy Schubert , Ian Lepore Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706230104.v5N14e3e031473@slippy.cwsent.com> From: Allan Jude Message-ID: <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org> Date: Thu, 22 Jun 2017 21:59:57 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706230104.v5N14e3e031473@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 02:00:03 -0000 On 2017-06-22 21:04, Cy Schubert wrote: > In message <1498161747.66489.10.camel@freebsd.org>, Ian Lepore writes: >> On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: >>> Author: cy >>> Date: Thu Jun 22 19:25:17 2017 >>> New Revision: 320242 >>> URL: https://svnweb.freebsd.org/changeset/base/320242 >>> >>> Log: >>>  Update leap-seconds to leap-seconds.3701462400. >>>  >>> >>> Modified: head/etc/ntp/leap-seconds >>> ===================================================================== >>> ========= >>> --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 >>> (r320241) >>> +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 >>> (r320242) >>> @@ -128,7 +128,7 @@ >>>  # Washington, DC >>>  # jeffrey.prillaman@usno.navy.mil >>>  # >>> -# Last Update of leap second values:   6 Jul 2016 >>> +# Last Update of leap second values:  18 Apr 2017 >>>  # >>  # The following line shows this last update date in NTP >>> timestamp >>>  # format. This is the date on which the most recent change to >>> @@ -136,7 +136,7 @@ >>>  # be identified by the unique pair of characters in the first >>> two >>>  # columns as shown below. >>>  # >>> -#$  3676752000 >>> +#$  3701462400 >>>  # >> >> Where did this leapfile come from?  The last update of leap second >> values is supposed to change only when the actual list of offsets >> changes, not when the file is updated to just change an expiration >> date.  This is actually very explicitly documented in the file itself, >> just a few lines down from this change: > > The source of the leapfile is in the commit message. Here it is again: > > Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 > >> >>  If an announcement by the IERS specifies that no leap second is >>  scheduled, then only the expiration date of the file will >>  be advanced to show that the information in the file is still >>  current -- the update time stamp, the data and the name of the file >>  will not change. >> >> >>> -# File expires on:  1 Jun 2017 >>> +# Updated through IERS Bulletin C 53 >>> +# File expires on:  1 Dec 2017 >>>  # >>> -#@ 3705264000 >>> +#@ 3721075200 >>>  # >> >> This expiration is wrong too, dangerously so IMO.  The data in the file >> is good through 12-31-2017-23:59:59, although historical practice has >> been to make the file expire a couple days before that.  Making it >> expire 31 days early is about the worst possible choice... some systems >> for notifying clients/consumers of an impending leap second (or the >> lack thereof) only do so during the last month before the leap >> opportunity -- this has the file expire just at the point such software >> would consider it authoratative for dissemination. > > My guess is that USNO may have had reason to do so. I'll keep an eye on > their next release of the file. >  >> >> I will note however, unlike the update date, there is no formal written >> description of how expiration date is determined, so the previous >> paragraph is just my opinion and experience working in the timing >> field. >> >> A leapfile without these problems can be found at >> >>   ftp://time.nist.gov/pub/leap-seconds.list > > We can use that instead. Attached is the diff between the USNO and NIST > versions of the file. > > One would think that two groups within the US Government might be able to > produce a consistent leapfile. I suspect the real reason is that the USNO > might have a different bureaucratic process than the NIST does. > >> >> >> -- Ian >> >>>  2272060800 10 # 1 Jan 1972 >>>  2287785600 11 # 1 Jul 1972 >>> @@ -216,5 +216,5 @@ >>>  # the hash line is also ignored in the >>>  # computation. >>>  # >>> -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 >>> +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 >>>  # >>> >> > > I'll update to the NIST version of the file. > > > > > > > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > The NIST version does seem to have a number of improvements, like corrected typos etc, but: -# Last Update of leap second values: 18 Apr 2017 +# Last Update of leap second values: 8 July 2016 The USNO one seems newer. A bit strange. -- Allan Jude From owner-svn-src-all@freebsd.org Fri Jun 23 02:12:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 600A8D9A035; Fri, 23 Jun 2017 02:12:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 F0E1473A12; Fri, 23 Jun 2017 02:12:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OE4xdjvU2yd2DOE4ydgCRT; Thu, 22 Jun 2017 20:12:14 -0600 X-Authority-Analysis: v=2.2 cv=F5wnTupN c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=8nJEP1OIZ-IA:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=qyDxTJV7AAAA:8 a=PYnjg3YJAAAA:8 a=YxBL1-UpAAAA:8 a=w_mOZy6POangvjivhvoA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=aVrITwz5twCY0aGzra0O:22 a=96-UuAdfYG6OSYlHWuPe:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 4CBF5719; Thu, 22 Jun 2017 19:12:11 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5N2At0l075844; Thu, 22 Jun 2017 19:10:55 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706230210.v5N2At0l075844@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: Allan Jude cc: Cy Schubert , Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320242 - head/etc/ntp In-Reply-To: Message from Allan Jude of "Thu, 22 Jun 2017 21:59:57 -0400." <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 22 Jun 2017 19:10:55 -0700 X-CMAE-Envelope: MS4wfHCPuFFEfGzcwqsG2ndUBPQ9848Yvzjv17JvCdah/NpCgp1Sf0YrenBSg/tm5uu702wSx1FIhBdj6/Gq6pxte+ptWNVSuZe6a2VMiblxLvHD+EmtZ0T6 UK53LVn3icMZgrPNyq+okc/eMboljWMhJ0/eoXoFeWWBG7xJwl7jjPtOERjgdFN//NuuRiemVpyqgUq1AkXdxjfatqYvrGPpSvabvbUODQWykItAy31Sagdm risGOVsjanSIsmy3cz3RKIQy9HRL99vjWqvvrCzmYqNRQxRrPjtnbclynr1MS43OFSPb8Nce6iXG0J9JVNmpFcT/VCprUqixJfSd4PmBHaA= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 02:12:21 -0000 In message <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org>, Allan Jude write s: > On 2017-06-22 21:04, Cy Schubert wrote: > > In message <1498161747.66489.10.camel@freebsd.org>, Ian Lepore writes: > >> On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: > >>> Author: cy > >>> Date: Thu Jun 22 19:25:17 2017 > >>> New Revision: 320242 > >>> URL: https://svnweb.freebsd.org/changeset/base/320242 > >>> > >>> Log: > >>>  Update leap-seconds to leap-seconds.3701462400. > >>>  > >>> > >>> Modified: head/etc/ntp/leap-seconds > >>> ===================================================================== > >>> ========= > >>> --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 > >>> (r320241) > >>> +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 > >>> (r320242) > >>> @@ -128,7 +128,7 @@ > >>>  # Washington, DC > >>>  # jeffrey.prillaman@usno.navy.mil > >>>  # > >>> -# Last Update of leap second values:   6 Jul 2016 > >>> +# Last Update of leap second values:  18 Apr 2017 > >>>  # > >>  # The following line shows this last update date in NTP > >>> timestamp > >>>  # format. This is the date on which the most recent change to > >>> @@ -136,7 +136,7 @@ > >>>  # be identified by the unique pair of characters in the first > >>> two > >>>  # columns as shown below. > >>>  # > >>> -#$  3676752000 > >>> +#$  3701462400 > >>>  # > >> > >> Where did this leapfile come from?  The last update of leap second > >> values is supposed to change only when the actual list of offsets > >> changes, not when the file is updated to just change an expiration > >> date.  This is actually very explicitly documented in the file itself, > >> just a few lines down from this change: > > > > The source of the leapfile is in the commit message. Here it is again: > > > > Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 > > > >> > >>  If an announcement by the IERS specifies that no leap second is > >>  scheduled, then only the expiration date of the file will > >>  be advanced to show that the information in the file is still > >>  current -- the update time stamp, the data and the name of the file > >>  will not change. > >> > >> > >>> -# File expires on:  1 Jun 2017 > >>> +# Updated through IERS Bulletin C 53 > >>> +# File expires on:  1 Dec 2017 > >>>  # > >>> -#@ 3705264000 > >>> +#@ 3721075200 > >>>  # > >> > >> This expiration is wrong too, dangerously so IMO.  The data in the file > >> is good through 12-31-2017-23:59:59, although historical practice has > >> been to make the file expire a couple days before that.  Making it > >> expire 31 days early is about the worst possible choice... some systems > >> for notifying clients/consumers of an impending leap second (or the > >> lack thereof) only do so during the last month before the leap > >> opportunity -- this has the file expire just at the point such software > >> would consider it authoratative for dissemination. > > > > My guess is that USNO may have had reason to do so. I'll keep an eye on > > their next release of the file. > >  > >> > >> I will note however, unlike the update date, there is no formal written > >> description of how expiration date is determined, so the previous > >> paragraph is just my opinion and experience working in the timing > >> field. > >> > >> A leapfile without these problems can be found at > >> > >>   ftp://time.nist.gov/pub/leap-seconds.list > > > > We can use that instead. Attached is the diff between the USNO and NIST > > versions of the file. > > > > One would think that two groups within the US Government might be able to > > produce a consistent leapfile. I suspect the real reason is that the USNO > > might have a different bureaucratic process than the NIST does. > > > >> > >> > >> -- Ian > >> > >>>  2272060800 10 # 1 Jan 1972 > >>>  2287785600 11 # 1 Jul 1972 > >>> @@ -216,5 +216,5 @@ > >>>  # the hash line is also ignored in the > >>>  # computation. > >>>  # > >>> -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 > >>> +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 > >>>  # > >>> > >> > > > > I'll update to the NIST version of the file. > > > > > > > > > > > > > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > The NIST version does seem to have a number of improvements, like > corrected typos etc, but: > > -# Last Update of leap second values: 18 Apr 2017 > +# Last Update of leap second values: 8 July 2016 > > The USNO one seems newer. A bit strange. That was Ian's issue. I think the following explanation makes sense: The leap second itself wasn't updated in the NIST version file cine July 8, 2016, even though the file itself had been updated since then. I think USNO sees that date as the date the file itself was updated, not the leap second value, like NIST would appear it does. It sees like a fair hypothesis. -- 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-all@freebsd.org Fri Jun 23 02:19:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D0FCD9A291; Fri, 23 Jun 2017 02:19:07 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 06A0073C81; Fri, 23 Jun 2017 02:19:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OEBWd902VM9gtOEBXdrf5x; Thu, 22 Jun 2017 20:19:00 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=8nJEP1OIZ-IA:10 a=LWSFodeU3zMA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=qyDxTJV7AAAA:8 a=PYnjg3YJAAAA:8 a=YxBL1-UpAAAA:8 a=jiE4ZjxP2-fhC_OB0kgA:9 a=wPNLvfGTeEIA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=aVrITwz5twCY0aGzra0O:22 a=96-UuAdfYG6OSYlHWuPe:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 04B6E72D; Thu, 22 Jun 2017 19:18:58 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5N2Hgr7022456; Thu, 22 Jun 2017 19:17:42 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706230217.v5N2Hgr7022456@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: Allan Jude cc: Cy Schubert , Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320242 - head/etc/ntp In-Reply-To: Message from Cy Schubert of "Thu, 22 Jun 2017 19:10:55 -0700." <201706230210.v5N2At0l075844@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 22 Jun 2017 19:17:42 -0700 X-CMAE-Envelope: MS4wfKAe1EocQj9QTjVnyeUQZBfiCsaexNP2Z//m5+tOt1n4hOjH0+jzaylm0BDD6DuJC6sRFgk0LM/eTRnmS87Sz27VfVJvJsr4W4wV2y8gjXymhY3XQieq JhAWfBPgNFJMx55u/gxx82CxcDYdpbz4IWzleT4w6kYvJ/kTIOtxQnvJizhwN2AkWJaiUWWNWswxxAz4K0owcWsQIHPLJ0NLPHANtW66Cy8bg6sXpjYA4tnk VZow/oGJeOtHiAQtjIfs4kvFc2/lrXxSpQj2zSr9hvkgIMv2kuCCzEtd+i+0E18TDeg/mX5p42xQIHRrQMXMQPU6SoJWy7CVfIbrxf2LxuQ= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 02:19:07 -0000 In message <201706230210.v5N2At0l075844@slippy.cwsent.com>, Cy Schubert writes: > In message <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org>, Allan Jude > write > s: > > On 2017-06-22 21:04, Cy Schubert wrote: > > > In message <1498161747.66489.10.camel@freebsd.org>, Ian Lepore writes: > > >> On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: > > >>> Author: cy > > >>> Date: Thu Jun 22 19:25:17 2017 > > >>> New Revision: 320242 > > >>> URL: https://svnweb.freebsd.org/changeset/base/320242 > > >>> > > >>> Log: > > >>>  Update leap-seconds to leap-seconds.3701462400. > > >>>  > > >>> > > >>> Modified: head/etc/ntp/leap-seconds > > >>> ===================================================================== > > >>> ========= > > >>> --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 > > >>> (r320241) > > >>> +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 > > >>> (r320242) > > >>> @@ -128,7 +128,7 @@ > > >>>  # Washington, DC > > >>>  # jeffrey.prillaman@usno.navy.mil > > >>>  # > > >>> -# Last Update of leap second values:   6 Jul 2016 > > >>> +# Last Update of leap second values:  18 Apr 2017 > > >>>  # > > >>  # The following line shows this last update date in NTP > > >>> timestamp > > >>>  # format. This is the date on which the most recent change to > > >>> @@ -136,7 +136,7 @@ > > >>>  # be identified by the unique pair of characters in the first > > >>> two > > >>>  # columns as shown below. > > >>>  # > > >>> -#$  3676752000 > > >>> +#$  3701462400 > > >>>  # > > >> > > >> Where did this leapfile come from?  The last update of leap second > > >> values is supposed to change only when the actual list of offsets > > >> changes, not when the file is updated to just change an expiration > > >> date.  This is actually very explicitly documented in the file itself, > > >> just a few lines down from this change: > > > > > > The source of the leapfile is in the commit message. Here it is again: > > > > > > Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701462400 > > > > > >> > > >>  If an announcement by the IERS specifies that no leap second is > > >>  scheduled, then only the expiration date of the file will > > >>  be advanced to show that the information in the file is still > > >>  current -- the update time stamp, the data and the name of the file > > >>  will not change. > > >> > > >> > > >>> -# File expires on:  1 Jun 2017 > > >>> +# Updated through IERS Bulletin C 53 > > >>> +# File expires on:  1 Dec 2017 > > >>>  # > > >>> -#@ 3705264000 > > >>> +#@ 3721075200 > > >>>  # > > >> > > >> This expiration is wrong too, dangerously so IMO.  The data in the file > > >> is good through 12-31-2017-23:59:59, although historical practice has > > >> been to make the file expire a couple days before that.  Making it > > >> expire 31 days early is about the worst possible choice... some systems > > >> for notifying clients/consumers of an impending leap second (or the > > >> lack thereof) only do so during the last month before the leap > > >> opportunity -- this has the file expire just at the point such software > > >> would consider it authoratative for dissemination. > > > > > > My guess is that USNO may have had reason to do so. I'll keep an eye on > > > their next release of the file. > > >  > > >> > > >> I will note however, unlike the update date, there is no formal written > > >> description of how expiration date is determined, so the previous > > >> paragraph is just my opinion and experience working in the timing > > >> field. > > >> > > >> A leapfile without these problems can be found at > > >> > > >>   ftp://time.nist.gov/pub/leap-seconds.list > > > > > > We can use that instead. Attached is the diff between the USNO and NIST > > > versions of the file. > > > > > > One would think that two groups within the US Government might be able to > > > > produce a consistent leapfile. I suspect the real reason is that the USNO > > > > might have a different bureaucratic process than the NIST does. > > > > > >> > > >> > > >> -- Ian > > >> > > >>>  2272060800 10 # 1 Jan 1972 > > >>>  2287785600 11 # 1 Jul 1972 > > >>> @@ -216,5 +216,5 @@ > > >>>  # the hash line is also ignored in the > > >>>  # computation. > > >>>  # > > >>> -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 > > >>> +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 > > >>>  # > > >>> > > >> > > > > > > I'll update to the NIST version of the file. > > > > > > > > > > > > > > > > > > > > > Cheers, > > > Cy Schubert > > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > > > The need of the many outweighs the greed of the few. > > > > > > > The NIST version does seem to have a number of improvements, like > > corrected typos etc, but: > > > > -# Last Update of leap second values: 18 Apr 2017 > > +# Last Update of leap second values: 8 July 2016 > > > > The USNO one seems newer. A bit strange. > > That was Ian's issue. I think the following explanation makes sense: The > leap second itself wasn't updated in the NIST version file cine July 8, since The brain is faster than -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. the fingers. > 2016, even though the file itself had been updated since then. I think > USNO sees that date as the date the file itself was updated, not the leap > second value, like NIST would appear it does. It sees like a fair > hypothesis. > > > -- > 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-all@freebsd.org Fri Jun 23 02:42:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE9C2D9A97A; Fri, 23 Jun 2017 02:42: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 C8C0574668; Fri, 23 Jun 2017 02:42: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 v5N2g5VR069235; Fri, 23 Jun 2017 02:42:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N2g4Ow069230; Fri, 23 Jun 2017 02:42:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706230242.v5N2g4Ow069230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 23 Jun 2017 02:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320257 - in head/contrib/ipfilter: lib tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 02:42:06 -0000 Author: cy Date: Fri Jun 23 02:42:04 2017 New Revision: 320257 URL: https://svnweb.freebsd.org/changeset/base/320257 Log: Replace AF_INET6 ifdefs with USE_INET6 ifdefs. This is more consistent and guaranteed to build everywhere in ipfilter. Not all of this commit can be MFCed. Some is original code while others are not. Modified: head/contrib/ipfilter/lib/familyname.c head/contrib/ipfilter/lib/printhashnode.c head/contrib/ipfilter/lib/printip.c head/contrib/ipfilter/lib/printpoolnode.c head/contrib/ipfilter/tools/ipf_y.y Modified: head/contrib/ipfilter/lib/familyname.c ============================================================================== --- head/contrib/ipfilter/lib/familyname.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/familyname.c Fri Jun 23 02:42:04 2017 (r320257) @@ -4,7 +4,7 @@ const char *familyname(int family) { if (family == AF_INET) return "inet"; -#ifdef AF_INET6 +#ifdef USE_INET6 if (family == AF_INET6) return "inet6"; #endif Modified: head/contrib/ipfilter/lib/printhashnode.c ============================================================================== --- head/contrib/ipfilter/lib/printhashnode.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printhashnode.c Fri Jun 23 02:42:04 2017 (r320257) @@ -35,7 +35,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields) } printf("\n"); } else if ((opts & OPT_DEBUG) != 0) { -#ifdef AF_INET6 +#ifdef USE_INET6 if (ipe.ipe_family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; @@ -59,7 +59,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields) } else if (ipe.ipe_family == AF_INET) { #else if (ipe.ipe_family == AF_INET) { -#endif /* AF_INET6 */ +#endif /* USE_INET6 */ PRINTF("\t%d\tAddress: %s", hv, inet_ntoa(ipe.ipe_addr.in4)); printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr); Modified: head/contrib/ipfilter/lib/printip.c ============================================================================== --- head/contrib/ipfilter/lib/printip.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printip.c Fri Jun 23 02:42:04 2017 (r320257) @@ -25,7 +25,7 @@ printip(family, addr) else PRINTF("%s", inet_ntoa(ipa)); } -#ifdef AF_INET6 +#ifdef USE_INET6 else if (family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printpoolnode.c Fri Jun 23 02:42:04 2017 (r320257) @@ -33,7 +33,7 @@ printpoolnode(np, opts, fields) printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); } else { -#ifdef AF_INET6 +#ifdef USE_INET6 if (np->ipn_addr.adf_family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; @@ -54,9 +54,7 @@ printpoolnode(np, opts, fields) } else { PRINTF("\tAddress: family: %d\n", np->ipn_addr.adf_family); -#ifdef AF_INET6 } -#endif printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); #ifdef USE_QUAD_T Modified: head/contrib/ipfilter/tools/ipf_y.y ============================================================================== --- head/contrib/ipfilter/tools/ipf_y.y Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/tools/ipf_y.y Fri Jun 23 02:42:04 2017 (r320257) @@ -2303,7 +2303,7 @@ makepool(list) for (n = top, a = list; (n != NULL) && (a != NULL); a = a->al_next) { if (use_inet6 == 1) { -#ifdef AF_INET6 +#ifdef USE_INET6 n->ipn_addr.adf_family = AF_INET6; n->ipn_addr.adf_addr = a->al_i6addr; n->ipn_addr.adf_len = offsetof(addrfamily_t, From owner-svn-src-all@freebsd.org Fri Jun 23 03:10:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50F63D9AFF9; Fri, 23 Jun 2017 03:10:55 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 020CA75548; Fri, 23 Jun 2017 03:10:55 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id 16so26966405qkg.2; Thu, 22 Jun 2017 20:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WgXlTUugd2c48sG1eCxUS/K2P+wLeOFGlHuN1D0uxSo=; b=JwIXDJM9NzMWg9l+vZ5myShZmNAHGgZWe0D1BxIglt+9sJR2Uoxpec7bNgkMDXYWcl pr/EcOerQgR3u680ZtlztHLv6osMzqx/BiyvZKEVwCDIt8lLavS0f6Ly/4WhVxcXVkhg YL73QpWMWRUkAv3bxsTKUiXlxoHnyQLkOqonxUBakwLfYijLS1CaIB/5RXjZ7pXoILf5 biKc7FZ4XBYwMou9vjOlMtP4Qu/FOq1VrPE3yTCzU01Uzn5biIQVrknkj5lK8dDAbvqE KazzJCryPszp2qI0gQljq1XKON0/gvvfkTbBa4Dyr4AYqMAGaob+uBAJCxmH6K031VtG MHcw== 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=WgXlTUugd2c48sG1eCxUS/K2P+wLeOFGlHuN1D0uxSo=; b=O6hTfhFm4NHm4dNBkrxj5WCKUx81ETz9WfoDJEjJd14vdDP701MSAZpdGNMIIvUAOg nOQ9ZuhRBS0UwOpx5RodrnYqv1Tpk1u9O3I9xzJk3CpE3Mz9C3JTbT7r3boWECiwZJN1 sWl+XwD/OZgM1gpES9m10PqyZeH3X+hgTkI7UttlcbWcIVxz75zdLwdRDd802vG0XNaJ KHYlzxHTnuvCn2wzOqTiiW+i0WfkPhqM9o4Ba6EIXEFt2oQSg2jm3Z6uXBwDHYt0BVIF WwziBKp0YlE6/puhYbJb852qwvfReDQSX238t1Mj/4D+pyj6oBSdrH0ZpQzajiHRm/4W xtHQ== X-Gm-Message-State: AKS2vOyg603kEL0zG3dfL0qqSfMSAVNf+Y+fwNvLl40nUcdISNGw1xbi q/SmrJIVxyc2q/02pkmyuK1H/gdPTQ== X-Received: by 10.55.115.69 with SMTP id o66mr6550536qkc.120.1498187453693; Thu, 22 Jun 2017 20:10:53 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.12.183.143 with HTTP; Thu, 22 Jun 2017 20:10:53 -0700 (PDT) In-Reply-To: <201706201739.v5KHdPhO051256@repo.freebsd.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> From: Justin Hibbits Date: Thu, 22 Jun 2017 22:10:53 -0500 X-Google-Sender-Auth: D88dXkyy4s9_S5ZlhJfVg6xaltc Message-ID: Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... To: Andriy Gapon Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 03:10:55 -0000 Hi Andriy, On Tuesday, June 20, 2017, Andriy Gapon wrote: > Author: avg > Date: Tue Jun 20 17:39:24 2017 > New Revision: 320156 > URL: https://svnweb.freebsd.org/changeset/base/320156 > > Log: > MFV r318946: 8021 ARC buf data scatter-ization > > illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 > https://github.com/illumos/illumos-gate/commit/ > 770499e185d15678ccb0be57ebc626ad18d93383 > > https://www.illumos.org/issues/8021 > The ARC buf data project (known simply as "ABD" since its genesis in > the ZoL > community) changes the way the ARC allocates `b_pdata` memory from > using linear > `void *` buffers to using scatter/gather lists of fixed-size 1KB > chunks. This > improves ZFS's performance by helping to defragment the address space > occupied > by the ARC, in particular for cases where compressed ARC is enabled. > It could > also ease future work to allocate pages directly from `segkpm` for > minimal- > overhead memory allocations, bypassing the `kmem` subsystem. > This is essentially the same change as the one which recently landed > in ZFS on > Linux, although they made some platform-specific changes while > adapting this > work to their codebase: > 1. Implemented the equivalent of the `segkpm` suggestion for future > work > mentioned above to bypass issues that they've had with the Linux > kernel memory > allocator. > 2. Changed the internal representation of the ABD's scatter/gather > list so it > could be used to pass I/O directly into Linux block device drivers. > (This > feature is not available in the illumos block device interface yet.) > > FreeBSD notes: > - the actual (default) chunk size is 4KB (despite the text above saying > 1KB) > - we can try to reimplement ABDs, so that they are not permanently > mapped into the KVA unless explicitly requested, especially on > platforms with scarce KVA > - we can try to use unmapped I/O and avoid intermediate allocation of a > linear, virtual memory mapped buffer > - we can try to avoid extra data copying by referring to chunks / pages > in the original ABD > > Reviewed by: Matthew Ahrens > Reviewed by: George Wilson > Reviewed by: Paul Dagnelie > Reviewed by: John Kennedy > Reviewed by: Prakash Surya > Reviewed by: Prashanth Sreenivasa > Reviewed by: Pavel Zakharov > Reviewed by: Chris Williamson > Approved by: Richard Lowe > Author: Dan Kimmel > > MFC after: 3 weeks > > Added: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > - copied, changed from r318946, vendor-sys/illumos/dist/uts/ > common/fs/zfs/abd.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h > - copied, changed from r318946, vendor-sys/illumos/dist/uts/ > common/fs/zfs/sys/abd.h > Modified: > head/cddl/contrib/opensolaris/cmd/zdb/zdb.c > head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c > head/cddl/contrib/opensolaris/cmd/ztest/ztest.c > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h > head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c > head/sys/conf/files > Directory Properties: > head/cddl/contrib/opensolaris/ (props changed) > head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) > head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) > head/sys/cddl/contrib/opensolaris/ (props changed) > > This commit breaks gcc builds with new warnings introduced: /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c: In function 'vdev_label_write_pad2': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c:902: warning: passing argument 2 of 'abd_copy_from_buf' discards qualifiers from pointer target type - Justin From owner-svn-src-all@freebsd.org Fri Jun 23 03:55:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 970E3D9B80B; Fri, 23 Jun 2017 03:55: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 670AE7650E; Fri, 23 Jun 2017 03:55: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 v5N3t08h098972; Fri, 23 Jun 2017 03:55:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N3t0gh098971; Fri, 23 Jun 2017 03:55:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706230355.v5N3t0gh098971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jun 2017 03:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320258 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 03:55:01 -0000 Author: emaste Date: Fri Jun 23 03:55:00 2017 New Revision: 320258 URL: https://svnweb.freebsd.org/changeset/base/320258 Log: change GNU ld LINKER_TYPE from binutils to bfd GNU binutils includes two linkers: ld.bfd and ld.gold. For clarity use LINKER_TYPE=bfd to refer to ld.bfd, the original binutils linker that identifies itself as "GNU ld". Discussed with: bdrewery Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Fri Jun 23 02:42:04 2017 (r320257) +++ head/share/mk/bsd.linker.mk Fri Jun 23 03:55:00 2017 (r320258) @@ -47,7 +47,7 @@ _ld_version!= ${${ld}} --version 2>/dev/null | head -n .error Unable to determine linker type from ${ld}=${${ld}} .endif .if ${_ld_version:[1..2]} == "GNU ld" -${X_}LINKER_TYPE= binutils +${X_}LINKER_TYPE= bfd _v= ${_ld_version:M[1-9].[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld From owner-svn-src-all@freebsd.org Fri Jun 23 06:25:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3547D9D921; Fri, 23 Jun 2017 06:25:40 +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 77A0679DFC; Fri, 23 Jun 2017 06:25:40 +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 v5N6PdTh059493; Fri, 23 Jun 2017 06:25:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N6PdMo059492; Fri, 23 Jun 2017 06:25:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706230625.v5N6PdMo059492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Jun 2017 06:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320259 - head/sys/dev/jedec_ts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 06:25:40 -0000 Author: avg Date: Fri Jun 23 06:25:39 2017 New Revision: 320259 URL: https://svnweb.freebsd.org/changeset/base/320259 Log: jedec_ts: read device id from the correct register Due to my braino / typo the driver was reading the Vendor ID register twice. MFC after: 3 days 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 Fri Jun 23 03:55:00 2017 (r320258) +++ head/sys/dev/jedec_ts/jedec_ts.c Fri Jun 23 06:25:39 2017 (r320259) @@ -114,7 +114,7 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Manufacturer ID\n"); return (ENXIO); } - err = ts_readw_be(dev, 6, &devid); + err = ts_readw_be(dev, 7, &devid); if (err != 0) { device_printf(dev, "failed to read Device ID\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Fri Jun 23 06:54:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9565FD9E015; Fri, 23 Jun 2017 06:54:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 73E757A827; Fri, 23 Jun 2017 06:54:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA26236; Fri, 23 Jun 2017 09:54:33 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dOIUD-00010C-Hq; Fri, 23 Jun 2017 09:54:33 +0300 Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... To: Justin Hibbits Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201706201739.v5KHdPhO051256@repo.freebsd.org> From: Andriy Gapon Message-ID: <8c556315-b267-54c1-049a-c401ab0d6b09@FreeBSD.org> Date: Fri, 23 Jun 2017 09:53:37 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 06:54:42 -0000 On 23/06/2017 06:10, Justin Hibbits wrote: > This commit breaks gcc builds with new warnings introduced: > > /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': > /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] > /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c: In function 'vdev_label_write_pad2': > /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c:902: > warning: passing argument 2 of 'abd_copy_from_buf' discards qualifiers from > pointer target type I missed the first one during the merge. The second one is in FreeBSD specific code, but the root cause is that the interface introduced upstream takes a non-const parameter where it should really take a const one. Thank you for the report. I'll handle this. -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Jun 23 08:34:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 506A7D9F5F4; Fri, 23 Jun 2017 08:34:03 +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 1B92A7CB76; Fri, 23 Jun 2017 08:34:03 +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 v5N8Y23M012034; Fri, 23 Jun 2017 08:34:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N8Y2RH012031; Fri, 23 Jun 2017 08:34:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706230834.v5N8Y2RH012031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 23 Jun 2017 08:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320260 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 08:34:03 -0000 Author: tuexen Date: Fri Jun 23 08:34:01 2017 New Revision: 320260 URL: https://svnweb.freebsd.org/changeset/base/320260 Log: Improve compilation on platforms different from FreeBSD. Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Jun 23 06:25:39 2017 (r320259) +++ head/sys/netinet/sctp_input.c Fri Jun 23 08:34:01 2017 (r320260) @@ -5194,7 +5194,7 @@ process_control_chunks: return (NULL); } } - /* + /*- * First are we accepting? We do this again here * since it is possible that a previous endpoint WAS * listening responded to a INIT-ACK and then Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri Jun 23 06:25:39 2017 (r320259) +++ head/sys/netinet/sctputil.c Fri Jun 23 08:34:01 2017 (r320260) @@ -7240,8 +7240,6 @@ sctp_over_udp_start(void) return (0); } -#if defined(INET6) || defined(INET) - /* * sctp_min_mtu ()returns the minimum of all non-zero arguments. * If all arguments are zero, zero is returned. @@ -7325,4 +7323,3 @@ sctp_hc_get_mtu(union sctp_sockstore *addr, uint16_t f } return ((uint32_t)tcp_hc_getmtu(&inc)); } -#endif Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Fri Jun 23 06:25:39 2017 (r320259) +++ head/sys/netinet/sctputil.h Fri Jun 23 08:34:01 2017 (r320260) @@ -388,10 +388,8 @@ sctp_auditing(int, struct sctp_inpcb *, struct sctp_tc void sctp_audit_log(uint8_t, uint8_t); #endif -#if defined(INET6) || defined(INET) uint32_t sctp_min_mtu(uint32_t, uint32_t, uint32_t); void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t); uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t); -#endif #endif /* _KERNEL */ #endif From owner-svn-src-all@freebsd.org Fri Jun 23 08:35:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E68FAD9F66B; Fri, 23 Jun 2017 08:35:55 +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 B00F07CCCD; Fri, 23 Jun 2017 08:35:55 +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 v5N8Zs1S012139; Fri, 23 Jun 2017 08:35:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N8ZspM012138; Fri, 23 Jun 2017 08:35:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706230835.v5N8ZspM012138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 23 Jun 2017 08:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320261 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 08:35:56 -0000 Author: tuexen Date: Fri Jun 23 08:35:54 2017 New Revision: 320261 URL: https://svnweb.freebsd.org/changeset/base/320261 Log: Honor the backlog field. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Jun 23 08:34:01 2017 (r320260) +++ head/sys/netinet/sctp_usrreq.c Fri Jun 23 08:35:54 2017 (r320261) @@ -7143,7 +7143,11 @@ sctp_listen(struct socket *so, int backlog, struct thr solisten_proto(so, backlog); SOCK_UNLOCK(so); } - inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING; + if (backlog > 0) { + inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING; + } else { + inp->sctp_flags &= ~SCTP_PCB_FLAGS_ACCEPTING; + } SCTP_INP_WUNLOCK(inp); return (error); } From owner-svn-src-all@freebsd.org Fri Jun 23 08:42:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75905D9F8CD; Fri, 23 Jun 2017 08:42:54 +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 400EE7D196; Fri, 23 Jun 2017 08:42:54 +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 v5N8grH9015911; Fri, 23 Jun 2017 08:42:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N8grdQ015909; Fri, 23 Jun 2017 08:42:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706230842.v5N8grdQ015909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Jun 2017 08:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320262 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 08:42:54 -0000 Author: avg Date: Fri Jun 23 08:42:53 2017 New Revision: 320262 URL: https://svnweb.freebsd.org/changeset/base/320262 Log: fix gcc-specific fallout from r320156, MFV of r318946, ZFS ABD Reported by: jhibbits MFC after: 1 week X-MFC with: r320156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 23 08:35:54 2017 (r320261) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 23 08:42:53 2017 (r320262) @@ -4354,6 +4354,7 @@ arc_reclaim_needed(void) extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; extern kmem_cache_t *range_seg_cache; +extern kmem_cache_t *abd_chunk_cache; static __noinline void arc_kmem_reap_now(void) @@ -4361,7 +4362,6 @@ arc_kmem_reap_now(void) size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; - extern kmem_cache_t *abd_chunk_cache; DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Fri Jun 23 08:35:54 2017 (r320261) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Fri Jun 23 08:42:53 2017 (r320262) @@ -899,7 +899,7 @@ vdev_label_write_pad2(vdev_t *vd, const char *buf, siz pad2 = abd_alloc_for_io(VDEV_PAD_SIZE, B_TRUE); abd_zero(pad2, VDEV_PAD_SIZE); - abd_copy_from_buf(pad2, (void *)buf, size); + abd_copy_from_buf(pad2, __DECONST(void *, buf), size); retry: zio = zio_root(spa, NULL, NULL, flags); From owner-svn-src-all@freebsd.org Fri Jun 23 09:27:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D48F4DA0739; Fri, 23 Jun 2017 09:27:32 +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 A38327E90F; Fri, 23 Jun 2017 09:27:32 +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 v5N9RVOl032711; Fri, 23 Jun 2017 09:27:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N9RVKt032710; Fri, 23 Jun 2017 09:27:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706230927.v5N9RVKt032710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 23 Jun 2017 09:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320263 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 09:27:32 -0000 Author: tuexen Date: Fri Jun 23 09:27:31 2017 New Revision: 320263 URL: https://svnweb.freebsd.org/changeset/base/320263 Log: Use a longer buffer for messages in ERROR chunks. This allows them to be sent in a non truncated way and addresses a warning given by newver versions of gcc. Thanks to Anselm Jonas Scholl for reporting it and providing a patch. Modified: head/sys/netinet/sctp_constants.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Fri Jun 23 08:42:53 2017 (r320262) +++ head/sys/netinet/sctp_constants.h Fri Jun 23 09:27:31 2017 (r320263) @@ -758,7 +758,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_DEFAULT_SPLIT_POINT_MIN 2904 /* Maximum length of diagnostic information in error causes */ -#define SCTP_DIAG_INFO_LEN 64 +#define SCTP_DIAG_INFO_LEN 128 /* ABORT CODES and other tell-tale location * codes are generated by adding the below From owner-svn-src-all@freebsd.org Fri Jun 23 10:09:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64ACADA131B; Fri, 23 Jun 2017 10:09:50 +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 3547B7FC3B; Fri, 23 Jun 2017 10:09:50 +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 v5NA9nwb049469; Fri, 23 Jun 2017 10:09:49 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NA9noQ049468; Fri, 23 Jun 2017 10:09:49 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706231009.v5NA9noQ049468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 23 Jun 2017 10:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320264 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 10:09:50 -0000 Author: tuexen Date: Fri Jun 23 10:09:49 2017 New Revision: 320264 URL: https://svnweb.freebsd.org/changeset/base/320264 Log: Check the length of a COOKIE chunk before accessing fields in it. Thanks to Felix Weinrank for reporting the issue he found by using libFuzzer. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Jun 23 09:27:31 2017 (r320263) +++ head/sys/netinet/sctp_input.c Fri Jun 23 10:09:49 2017 (r320264) @@ -2441,6 +2441,12 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in cookie_offset = offset + sizeof(struct sctp_chunkhdr); cookie_len = ntohs(cp->ch.chunk_length); + if (cookie_len < sizeof(struct sctp_cookie_echo_chunk) + + sizeof(struct sctp_init_chunk) + + sizeof(struct sctp_init_ack_chunk) + SCTP_SIGNATURE_SIZE) { + /* cookie too small */ + return (NULL); + } if ((cookie->peerport != sh->src_port) || (cookie->myport != sh->dest_port) || (cookie->my_vtag != sh->v_tag)) { @@ -2451,12 +2457,6 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in * This maintains the match even though it may be in the * opposite byte order of the machine :-> */ - return (NULL); - } - if (cookie_len < sizeof(struct sctp_cookie_echo_chunk) + - sizeof(struct sctp_init_chunk) + - sizeof(struct sctp_init_ack_chunk) + SCTP_SIGNATURE_SIZE) { - /* cookie too small */ return (NULL); } /* From owner-svn-src-all@freebsd.org Fri Jun 23 10:36:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7459FDA18BF; Fri, 23 Jun 2017 10:36:29 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35C9E8078B; Fri, 23 Jun 2017 10:36:29 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NAaSb9061377; Fri, 23 Jun 2017 10:36:28 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NAaSU8061376; Fri, 23 Jun 2017 10:36:28 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201706231036.v5NAaSU8061376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Fri, 23 Jun 2017 10:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320265 - head/sys/compat/linprocfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 10:36:29 -0000 Author: mmokhi (ports committer) Date: Fri Jun 23 10:36:27 2017 New Revision: 320265 URL: https://svnweb.freebsd.org/changeset/base/320265 Log: Fix caveat in new implementation of linprocfs_docpuinfo(): Prevent kernel panic in case that extended-cpuid isn't supported by CPU Reviewed by: kib, ngie, trasz Approved by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11294 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Jun 23 10:09:49 2017 (r320264) +++ head/sys/compat/linprocfs/linprocfs.c Fri Jun 23 10:36:27 2017 (r320265) @@ -245,7 +245,10 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) break; } #endif - do_cpuid(0x80000006, cache_size); + if (cpu_exthigh >= 0x80000006) + do_cpuid(0x80000006, cache_size); + else + memset(cache_size, 0, sizeof(cache_size)); for (i = 0; i < mp_ncpus; ++i) { fqmhz = 0; fqkhz = 0; From owner-svn-src-all@freebsd.org Fri Jun 23 11:55:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32E34DA2B64; Fri, 23 Jun 2017 11:55: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 013FB827C5; Fri, 23 Jun 2017 11:55:44 +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 v5NBtiEm094316; Fri, 23 Jun 2017 11:55:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NBti31094315; Fri, 23 Jun 2017 11:55:44 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706231155.v5NBti31094315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Jun 2017 11:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320266 - head/sys/dev/jedec_ts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 11:55:45 -0000 Author: avg Date: Fri Jun 23 11:55:43 2017 New Revision: 320266 URL: https://svnweb.freebsd.org/changeset/base/320266 Log: jedec_ts: add support for devices manufactured by IDT Full manufacturer name is Integrated Device Technology, Inc. Supported devices include TSE2002B3C and TS3000B3A. MFC after: 1 week 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 Fri Jun 23 10:36:27 2017 (r320265) +++ head/sys/dev/jedec_ts/jedec_ts.c Fri Jun 23 11:55:43 2017 (r320266) @@ -131,6 +131,13 @@ ts_attach(device_t dev) * 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 { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" From owner-svn-src-all@freebsd.org Fri Jun 23 12:15:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7172DA3614; Fri, 23 Jun 2017 12:15:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::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 83C878331C; Fri, 23 Jun 2017 12:15:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qt0-x230.google.com with SMTP id i2so32776230qta.3; Fri, 23 Jun 2017 05:15:24 -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=8/YvjCIwCmfE+Phjz6dD/lRfgulAN1CEepH63LQA/yU=; b=Gxf8owZTrAGLR3/8GW8jo/lGJfLQyOL15/cchAICNz0nxzOlY1hcJVAl7pGagZ+KDT hnYTEdQyniSZCPNv0AT8Y7zRqFNaqoWUoJKDEHSGrOhTcH/9xr5Z+P9NaEfVCTW/Yemo JoVZiC6QraHW1xfepWV1m9qwx9zlOi7ahgoGHOeTnTgW/rgoPnR2hIlIm0TIe772HKB0 JvzJMFLA/p2fJzrUvmTMVNNd0kWo6qOWaqL13FfLxJ2iIgwri+h+uCJ9q9ERt8/LYfEI ST2GqcLQCMBFQkn/ZSCRm/2un8HcaUPnvtJmGUsmBh5ZHyxVqlq/PL/wRG7Y6e9BCc6i 1QXQ== 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=8/YvjCIwCmfE+Phjz6dD/lRfgulAN1CEepH63LQA/yU=; b=ODecCAH9bqBOSOaWIYTVfnxrr1cH8/F7IybOOnFgcmQwJUqE9v0hB9o3YQvCT8t0yW 4vcV/tP8Ac20dEtLJzHphqdCY2t+N9UtBuBTUcLg9diyzDaGxjqZIByUU44RV0KI9fiZ IsV8FV9DVfaBg+ziCciru22wI6PrNdyh0kN0kzuw96n7FMK8dwoOfDPyco00mho9Ku4m sKL9Z/QzKgeOCFcdPiQFPTUAXJwb6tZg8u9NnTFWfuToJCnFqBTd0yaAbW0ibZdWC7O3 5m32MC2L84fgF9fPV9s+Wo4kWwVZwPe09fwrl1h8NKekdGD0Aqd1Bdad0UinEygiNYCl uGwQ== X-Gm-Message-State: AKS2vOwJzt4HvKfIXRCdy/X4wgt+i3ENY4ZL0AIdgMKPkwZHV1DxKbCu ofsQS9CQiozduzJWtJbV1MJWLUXwFA== X-Received: by 10.200.42.121 with SMTP id l54mr9824994qtl.32.1498220123543; Fri, 23 Jun 2017 05:15:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.183.143 with HTTP; Fri, 23 Jun 2017 05:15:22 -0700 (PDT) Received: by 10.12.183.143 with HTTP; Fri, 23 Jun 2017 05:15:22 -0700 (PDT) In-Reply-To: <201706230842.v5N8grdQ015909@repo.freebsd.org> References: <201706230842.v5N8grdQ015909@repo.freebsd.org> From: Justin Hibbits Date: Fri, 23 Jun 2017 07:15:22 -0500 Message-ID: Subject: Re: svn commit: r320262 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Andriy Gapon Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 12:15:24 -0000 On Jun 23, 2017 03:43, "Andriy Gapon" wrote: Author: avg Date: Fri Jun 23 08:42:53 2017 New Revision: 320262 URL: https://svnweb.freebsd.org/changeset/base/320262 Log: fix gcc-specific fallout from r320156, MFV of r318946, ZFS ABD Reported by: jhibbits MFC after: 1 week X-MFC with: r320156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Thanks! - Justin From owner-svn-src-all@freebsd.org Fri Jun 23 13:26:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA6BDA49A4; Fri, 23 Jun 2017 13:26:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6A96651; Fri, 23 Jun 2017 13:26:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NDQDnQ037070; Fri, 23 Jun 2017 13:26:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NDQDmg037068; Fri, 23 Jun 2017 13:26:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706231326.v5NDQDmg037068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 23 Jun 2017 13:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320267 - head/usr.sbin/sesutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 13:26:15 -0000 Author: bapt Date: Fri Jun 23 13:26:13 2017 New Revision: 320267 URL: https://svnweb.freebsd.org/changeset/base/320267 Log: Do not use sprintf(3) when not needed, while here, prefer snprintf(3) over sprintf(3) Modified: head/usr.sbin/sesutil/eltsub.c head/usr.sbin/sesutil/eltsub.h Modified: head/usr.sbin/sesutil/eltsub.c ============================================================================== --- head/usr.sbin/sesutil/eltsub.c Fri Jun 23 11:55:43 2017 (r320266) +++ head/usr.sbin/sesutil/eltsub.c Fri Jun 23 13:26:13 2017 (r320267) @@ -51,134 +51,97 @@ */ #define TEMPERATURE_OFFSET 20 -char * +const char * geteltnm(int type) { static char rbuf[132]; switch (type) { case ELMTYP_UNSPECIFIED: - sprintf(rbuf, "Unspecified"); - break; + return ("Unspecified"); case ELMTYP_DEVICE: - sprintf(rbuf, "Device Slot"); - break; + return ("Device Slot"); case ELMTYP_POWER: - sprintf(rbuf, "Power Supply"); - break; + return ("Power Supply"); case ELMTYP_FAN: - sprintf(rbuf, "Cooling"); - break; + return ("Cooling"); case ELMTYP_THERM: - sprintf(rbuf, "Temperature Sensors"); - break; + return ("Temperature Sensors"); case ELMTYP_DOORLOCK: - sprintf(rbuf, "Door Lock"); - break; + return ("Door Lock"); case ELMTYP_ALARM: - sprintf(rbuf, "Audible alarm"); - break; + return ("Audible alarm"); case ELMTYP_ESCC: - sprintf(rbuf, "Enclosure Services Controller Electronics"); - break; + return ("Enclosure Services Controller Electronics"); case ELMTYP_SCC: - sprintf(rbuf, "SCC Controller Electronics"); - break; + return ("SCC Controller Electronics"); case ELMTYP_NVRAM: - sprintf(rbuf, "Nonvolatile Cache"); - break; + return ("Nonvolatile Cache"); case ELMTYP_INV_OP_REASON: - sprintf(rbuf, "Invalid Operation Reason"); - break; + return ("Invalid Operation Reason"); case ELMTYP_UPS: - sprintf(rbuf, "Uninterruptible Power Supply"); - break; + return ("Uninterruptible Power Supply"); case ELMTYP_DISPLAY: - sprintf(rbuf, "Display"); - break; + return ("Display"); case ELMTYP_KEYPAD: - sprintf(rbuf, "Key Pad Entry"); - break; + return ("Key Pad Entry"); case ELMTYP_ENCLOSURE: - sprintf(rbuf, "Enclosure"); - break; + return ("Enclosure"); case ELMTYP_SCSIXVR: - sprintf(rbuf, "SCSI Port/Transceiver"); - break; + return ("SCSI Port/Transceiver"); case ELMTYP_LANGUAGE: - sprintf(rbuf, "Language"); - break; + return ("Language"); case ELMTYP_COMPORT: - sprintf(rbuf, "Communication Port"); - break; + return ("Communication Port"); case ELMTYP_VOM: - sprintf(rbuf, "Voltage Sensor"); - break; + return ("Voltage Sensor"); case ELMTYP_AMMETER: - sprintf(rbuf, "Current Sensor"); - break; + return ("Current Sensor"); case ELMTYP_SCSI_TGT: - sprintf(rbuf, "SCSI Target Port"); - break; + return ("SCSI Target Port"); case ELMTYP_SCSI_INI: - sprintf(rbuf, "SCSI Initiator Port"); - break; + return ("SCSI Initiator Port"); case ELMTYP_SUBENC: - sprintf(rbuf, "Simple Subenclosure"); - break; + return ("Simple Subenclosure"); case ELMTYP_ARRAY_DEV: - sprintf(rbuf, "Array Device Slot"); - break; + return ("Array Device Slot"); case ELMTYP_SAS_EXP: - sprintf(rbuf, "SAS Expander"); - break; + return ("SAS Expander"); case ELMTYP_SAS_CONN: - sprintf(rbuf, "SAS Connector"); - break; + return ("SAS Connector"); default: - (void) sprintf(rbuf, "", type); - break; + snprintf(rbuf, sizeof(rbuf), "", type); + return (rbuf); } - return (rbuf); } -char * +const char * scode2ascii(u_char code) { static char rbuf[32]; switch (code & 0xf) { case SES_OBJSTAT_UNSUPPORTED: - sprintf(rbuf, "Unsupported"); - break; + return ("Unsupported"); case SES_OBJSTAT_OK: - sprintf(rbuf, "OK"); - break; + return ("OK"); case SES_OBJSTAT_CRIT: - sprintf(rbuf, "Critical"); - break; + return ("Critical"); case SES_OBJSTAT_NONCRIT: - sprintf(rbuf, "Noncritical"); - break; + return ("Noncritical"); case SES_OBJSTAT_UNRECOV: - sprintf(rbuf, "Unrecoverable"); - break; + return ("Unrecoverable"); case SES_OBJSTAT_NOTINSTALLED: - sprintf(rbuf, "Not Installed"); - break; + return ("Not Installed"); case SES_OBJSTAT_UNKNOWN: - sprintf(rbuf, "Unknown"); - break; + return ("Unknown"); case SES_OBJSTAT_NOTAVAIL: - sprintf(rbuf, "Not Available"); - break; + return ("Not Available"); case SES_OBJSTAT_NOACCESS: - sprintf(rbuf, "No Access Allowed"); - break; + return ("No Access Allowed"); default: - sprintf(rbuf, "", code & 0xf); - break; + snprintf(rbuf, sizeof(rbuf), "", code & 0xf); + return (rbuf); } - return (rbuf); } struct sbuf * Modified: head/usr.sbin/sesutil/eltsub.h ============================================================================== --- head/usr.sbin/sesutil/eltsub.h Fri Jun 23 11:55:43 2017 (r320266) +++ head/usr.sbin/sesutil/eltsub.h Fri Jun 23 13:26:13 2017 (r320267) @@ -32,6 +32,6 @@ * mjacob@feral.com */ -char *geteltnm(int); -char *scode2ascii(u_char); +const char *geteltnm(int); +const char *scode2ascii(u_char); struct sbuf *stat2sbuf(int, u_char *); From owner-svn-src-all@freebsd.org Fri Jun 23 13:28:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4B18DA4A18; Fri, 23 Jun 2017 13:28:28 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 6C4F7839; Fri, 23 Jun 2017 13:28:28 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OOdMdDw74ETFpOOdNdSsbj; Fri, 23 Jun 2017 07:28:26 -0600 X-Authority-Analysis: v=2.2 cv=dZbw5Tfe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=Yms5KrpuRKIbBsFBG84A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0A1549EB; Fri, 23 Jun 2017 06:28:24 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5NDR75e033232; Fri, 23 Jun 2017 06:27:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706231327.v5NDR75e033232@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: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320245 - head/share/mk In-Reply-To: Message from Bryan Drewery of "Thu, 22 Jun 2017 21:03:24 -0000." <201706222103.v5ML3Oq3026557@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Jun 2017 06:27:07 -0700 X-CMAE-Envelope: MS4wfA9etWp8m3UxtZ/aDVziNbaGbO9YsL1HAn7LkwMPlLo7n7YxsMc7nxL2iYYN+2HGE22zS56HWwdN6kAUHyrvOTzy9iHoygWukqoMd2ueA/BjLovDQYNn azzuf5B8GOfPbfEPGCvk/4N2Yf67Bxx+lSrzmtWTe0HALxJ2nWhSpAbE4ActSEk6biQ58YuxlIKksJB3ZECTgEp1bH0D+QDLDWHr/nGx6b/qVGdep2OfdTuk 5zUULtYcBGRt9rTDaPBszRk+AB3HGsYK26wc3ocOKiFcz3yCukPpwy0i/MMD8gvg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 13:28:28 -0000 In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewery writes : > Author: bdrewery > Date: Thu Jun 22 21:03:24 2017 > New Revision: 320245 > URL: https://svnweb.freebsd.org/changeset/base/320245 > > Log: > Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. > > This is similar to r300350 for bsd.compiler.mk. > > MFC after: 2 weeks > Reviewed by: emaste > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D11309 > > Modified: > head/share/mk/bsd.linker.mk > > Modified: head/share/mk/bsd.linker.mk > ============================================================================= > = > --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 > 4) > +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 > 5) > @@ -9,25 +9,39 @@ > # major * 10000 + minor * 100 + tiny > # It too can be overridden on the command line. > # > +# These variables with an X_ prefix will also be provided if XLD is set. > +# > # This file may be included multiple times, but only has effect the first ti > me. > # > > .if !target(____) > ____: > > -_ld_version!= ${LD} --version 2>/dev/null | head -n 1 || echo none > +.for ld X_ in LD $${_empty_var_} XLD X_ > +.if ${ld} == "LD" || !empty(XLD) > +.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) > + > +_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none This line gave one of my machines a bit of gas with the error: sh: head: not found make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable to determine linker type from LD=ld *** Error code 1 Specifying -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. he full pathname for head resolves the isssue. > .if ${_ld_version} == "none" > -.error Unable to determine linker type from LD=${LD} > +.error Unable to determine linker type from ${ld}=${${ld}} > .endif > .if ${_ld_version:[1..2]} == "GNU ld" > -LINKER_TYPE= binutils > +${X_}LINKER_TYPE= binutils > _v= ${_ld_version:[3]} > .elif ${_ld_version:[1]} == "LLD" > -LINKER_TYPE= lld > +${X_}LINKER_TYPE= lld > _v= ${_ld_version:[2]} > .else > -.error Unknown linker from LD=${LD}: ${_ld_version} > +.error Unknown linker from ${ld}=${${ld}}: ${_ld_version} > .endif > -LINKER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $ > $2 * 100 + $$3;}' > +${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ > + awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' > +.undef _ld_version > +.undef _v > +.endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) > + > +.endif # ${ld} == "LD" || !empty(XLD) > +.endfor # .for ld in LD XLD > + > > .endif # !target(____) > > From owner-svn-src-all@freebsd.org Fri Jun 23 13:49:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F6C4DA5086; Fri, 23 Jun 2017 13:49:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 044C5133C; Fri, 23 Jun 2017 13:49:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OOxTdE1RtETFpOOxUdSvqc; Fri, 23 Jun 2017 07:49:13 -0600 X-Authority-Analysis: v=2.2 cv=dZbw5Tfe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=Yms5KrpuRKIbBsFBG84A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A434AA6; Fri, 23 Jun 2017 06:49:11 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5NDlt39037415; Fri, 23 Jun 2017 06:47:55 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706231347.v5NDlt39037415@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: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320245 - head/share/mk In-Reply-To: Message from Bryan Drewery of "Thu, 22 Jun 2017 21:03:24 -0000." <201706222103.v5ML3Oq3026557@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Jun 2017 06:47:55 -0700 X-CMAE-Envelope: MS4wfDLdc/NR3FywcoxBb8uH1j1grFfY0LKMWDUC/NBPGsvHA4dCj/uQDNglw6QfoToX2prgKJiewSY2+bMhD+LPqseSnop8feFXdZRoJ33PUn88Q07mDVf6 P8CrXMgE/wQ5WqbXQWCtYE/NyLay+nn3xqu2we2TdKN1cEKeG4nuhw/taDdE99zt/iho6V7CdIqO+oUsfl2Q1wmgXxXw3xJmx2CQP4GpsXg2UfXjc/fTy5IS GxCfGCgAV6PuCBpBifH1n6MGEFmXRTIjM1esZSK7QyrdK/kC6XoB3HbC1ehVHQ60 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 13:49:14 -0000 Let me try replying to this again. It's an exmh thing. Sorry. In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewery writes : > Author: bdrewery > Date: Thu Jun 22 21:03:24 2017 > New Revision: 320245 > URL: https://svnweb.freebsd.org/changeset/base/320245 > > Log: > Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. > > This is similar to r300350 for bsd.compiler.mk. > > MFC after: 2 weeks > Reviewed by: emaste > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D11309 > > Modified: > head/share/mk/bsd.linker.mk > > Modified: head/share/mk/bsd.linker.mk > ============================================================================= > = > --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 > 4) > +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 > 5) > @@ -9,25 +9,39 @@ > # major * 10000 + minor * 100 + tiny > # It too can be overridden on the command line. > # > +# These variables with an X_ prefix will also be provided if XLD is set. > +# > # This file may be included multiple times, but only has effect the first ti > me. > # > > .if !target(____) > ____: > > -_ld_version!= ${LD} --version 2>/dev/null | head -n 1 || echo none > +.for ld X_ in LD $${_empty_var_} XLD X_ > +.if ${ld} == "LD" || !empty(XLD) > +.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) > + > +_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none This line gave one of my machines a bit of gas with the error: sh: head: not found make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable to determine linker type from LD=ld *** Error code 1 Specifying the full pathname for head resolves the isssue. > .if ${_ld_version} == "none" > -.error Unable to determine linker type from LD=${LD} > +.error Unable to determine linker type from ${ld}=${${ld}} > .endif > .if ${_ld_version:[1..2]} == "GNU ld" > -LINKER_TYPE= binutils > +${X_}LINKER_TYPE= binutils > _v= ${_ld_version:[3]} > .elif ${_ld_version:[1]} == "LLD" > -LINKER_TYPE= lld > +${X_}LINKER_TYPE= lld > _v= ${_ld_version:[2]} > .else > -.error Unknown linker from LD=${LD}: ${_ld_version} > +.error Unknown linker from ${ld}=${${ld}}: ${_ld_version} > .endif > -LINKER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $ > $2 * 100 + $$3;}' > +${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ > + awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' > +.undef _ld_version > +.undef _v > +.endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) > + > +.endif # ${ld} == "LD" || !empty(XLD) > +.endfor # .for ld in LD XLD > + > > .endif # !target(____) > > -- 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-all@freebsd.org Fri Jun 23 14:00:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBF42DA528F; Fri, 23 Jun 2017 14:00:29 +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 AE7F719FE; Fri, 23 Jun 2017 14:00:29 +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 v5NE0SLQ050078; Fri, 23 Jun 2017 14:00:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NE0ScW050077; Fri, 23 Jun 2017 14:00:28 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706231400.v5NE0ScW050077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 23 Jun 2017 14:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320268 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 14:00:30 -0000 Author: manu Date: Fri Jun 23 14:00:28 2017 New Revision: 320268 URL: https://svnweb.freebsd.org/changeset/base/320268 Log: ipfw: dummynet: Add 'G' and 'g' suffix for bandwidth configuration/display MFC after: 2 weeks Sponsored by: Gandi.net Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Fri Jun 23 13:26:13 2017 (r320267) +++ head/sbin/ipfw/dummynet.c Fri Jun 23 14:00:28 2017 (r320268) @@ -626,6 +626,8 @@ list_pipes(struct dn_id *oid, struct dn_id *end) /* data rate */ if (b == 0) sprintf(bwbuf, "unlimited "); + else if (b >= 1000000000) + sprintf(bwbuf, "%7.3f Gbit/s", b/1000000000); else if (b >= 1000000) sprintf(bwbuf, "%7.3f Mbit/s", b/1000000); else if (b >= 1000) @@ -818,6 +820,9 @@ read_bandwidth(char *arg, int *bandwidth, char *if_nam } else if (*end == 'M' || *end == 'm') { end++; bw *= 1000000; + } else if (*end == 'G' || *end == 'g') { + end++; + bw *= 1000000000; } if ((*end == 'B' && _substrcmp2(end, "Bi", "Bit/s") != 0) || From owner-svn-src-all@freebsd.org Fri Jun 23 14:00:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74CE0DA5404; Fri, 23 Jun 2017 14:00:46 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 28D2D1B09; Fri, 23 Jun 2017 14:00:45 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OP67dgaS8eQWUOP68dQeSA; Fri, 23 Jun 2017 07:58:08 -0600 X-Authority-Analysis: v=2.2 cv=UpATD64B c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=tpqOzRr5eYGDGepGtMUA:9 a=CjuIK1q_8ugA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0F5E8B6; Fri, 23 Jun 2017 06:58:07 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5NDujRH002025; Fri, 23 Jun 2017 06:56:45 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706231356.v5NDujRH002025@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: Cy Schubert cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320245 - head/share/mk In-Reply-To: Message from Cy Schubert of "Fri, 23 Jun 2017 06:47:55 -0700." <201706231347.v5NDlt39037415@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Jun 2017 06:56:45 -0700 X-CMAE-Envelope: MS4wfETKNpRVFs1u8DzrFJ8IFYl3SmF2M5N8TjTlKHlbwMsl5zsBcTv4aImuDRfIdhPuGLrCSTGF3k5twypDZTdrvNZOktlGRXNpjJuf+pi1sbyHNib1hT0Y FuOf7HEK95gvSDNIPfw6wdCotv+phv/eFj4M5F8JSm52I4dncrq+a3EORoJ8eOCaKPZjEOmKjm+A8jl5QJnDtcyCjbgXSQtYZqsSmTwJi7rt2qXGz+zJiDC5 0a4FqTyD5CpSaYLGQu2UZCfHtjZnqmy0CgMQ0S7Ei0enQASEBuu1bFxJH0cVyBZf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 14:00:46 -0000 In message <201706231347.v5NDlt39037415@slippy.cwsent.com>, Cy Schubert writes: > Let me try replying to this again. It's an exmh thing. Sorry. > > In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewery > writes > : > > Author: bdrewery > > Date: Thu Jun 22 21:03:24 2017 > > New Revision: 320245 > > URL: https://svnweb.freebsd.org/changeset/base/320245 > > > > Log: > > Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. > > > > This is similar to r300350 for bsd.compiler.mk. > > > > MFC after: 2 weeks > > Reviewed by: emaste > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D11309 > > > > Modified: > > head/share/mk/bsd.linker.mk > > > > Modified: head/share/mk/bsd.linker.mk > > =========================================================================== > == > > = > > --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 > > 4) > > +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 > > 5) > > @@ -9,25 +9,39 @@ > > # major * 10000 + minor * 100 + tiny > > # It too can be overridden on the command line. > > # > > +# These variables with an X_ prefix will also be provided if XLD is set. > > +# > > # This file may be included multiple times, but only has effect the first > ti > > me. > > # > > > > .if !target(____) > > ____: > > > > -_ld_version!= ${LD} --version 2>/dev/null | head -n 1 || echo none > > +.for ld X_ in LD $${_empty_var_} XLD X_ > > +.if ${ld} == "LD" || !empty(XLD) > > +.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) > > + > > +_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none > > This line gave one of my machines a bit of gas with the error: > > sh: head: not found > make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable to > determine linker type from LD=ld > *** Error code 1 > > Specifying the full pathname for head resolves the isssue. Or better yet, use include head in the build tools (or use sed or awk). -- 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-all@freebsd.org Fri Jun 23 15:02:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33279DA64B8; Fri, 23 Jun 2017 15:02:51 +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 F2B833A62; Fri, 23 Jun 2017 15:02:50 +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 v5NF2ogp078103; Fri, 23 Jun 2017 15:02:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NF2owa078102; Fri, 23 Jun 2017 15:02:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706231502.v5NF2owa078102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 23 Jun 2017 15:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320269 - head/bin/echo/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:02:51 -0000 Author: asomers Date: Fri Jun 23 15:02:49 2017 New Revision: 320269 URL: https://svnweb.freebsd.org/changeset/base/320269 Log: style fixes in bin/echo/tests Submitted by: shivansh Reviewed by: asomers MFC after: 2 weeks X-MFC-With: 319626 Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11318 Modified: head/bin/echo/tests/echo_test.sh Modified: head/bin/echo/tests/echo_test.sh ============================================================================== --- head/bin/echo/tests/echo_test.sh Fri Jun 23 14:00:28 2017 (r320268) +++ head/bin/echo/tests/echo_test.sh Fri Jun 23 15:02:49 2017 (r320269) @@ -27,29 +27,33 @@ # atf_test_case n_output -n_output_head() { - atf_set "descr" "Verify that echo(1) does not print the trailing " \ - "newline character with option '-n'" +n_output_head() +{ + atf_set "descr" "Verify that echo(1) does not print the trailing " \ + "newline character with option '-n'" } -n_output_body() { - atf_check -s ignore -o inline:"Hello world" \ - /bin/echo -n "Hello world" +n_output_body() +{ + atf_check -s ignore -o inline:"Hello world" \ + /bin/echo -n "Hello world" } atf_test_case append_c_output -append_c_output_head() { - atf_set "descr" "Verify that echo(1) does not print the trailing newline " \ - "character when '\c' is appended to the end of the string" +append_c_output_head() +{ + atf_set "descr" "Verify that echo(1) does not print the trailing newline " \ + "character when '\c' is appended to the end of the string" } -append_c_output_body() { - atf_check -s ignore -o inline:"Hello world" \ - /bin/echo "Hello world\c" +append_c_output_body() +{ + atf_check -s ignore -o inline:"Hello world" \ + /bin/echo "Hello world\c" } atf_init_test_cases() { - atf_add_test_case n_output - atf_add_test_case append_c_output + atf_add_test_case n_output + atf_add_test_case append_c_output } From owner-svn-src-all@freebsd.org Fri Jun 23 15:09:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 582D0DA6538; Fri, 23 Jun 2017 15:09:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27E4D3C75; Fri, 23 Jun 2017 15:09:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NF992n078348; Fri, 23 Jun 2017 15:09:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NF98Gi078344; Fri, 23 Jun 2017 15:09:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706231509.v5NF98Gi078344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 23 Jun 2017 15:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320270 - head/usr.sbin/sesutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:09:10 -0000 Author: bapt Date: Fri Jun 23 15:09:08 2017 New Revision: 320270 URL: https://svnweb.freebsd.org/changeset/base/320270 Log: Directly print the extra status instead of filling a buffer then printing it. This prepares the code to make it libxo friendly Reviewed by: manu, Nikita Kozlov (nikita elyzion.net) MFC after: 2 weeks Sponsored by: Gandi.net Modified: head/usr.sbin/sesutil/Makefile head/usr.sbin/sesutil/eltsub.c head/usr.sbin/sesutil/eltsub.h head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/Makefile ============================================================================== --- head/usr.sbin/sesutil/Makefile Fri Jun 23 15:02:49 2017 (r320269) +++ head/usr.sbin/sesutil/Makefile Fri Jun 23 15:09:08 2017 (r320270) @@ -4,6 +4,4 @@ PROG= sesutil SRCS= sesutil.c eltsub.c MAN= sesutil.8 -LIBADD= sbuf - .include Modified: head/usr.sbin/sesutil/eltsub.c ============================================================================== --- head/usr.sbin/sesutil/eltsub.c Fri Jun 23 15:02:49 2017 (r320269) +++ head/usr.sbin/sesutil/eltsub.c Fri Jun 23 15:09:08 2017 (r320270) @@ -32,9 +32,7 @@ * mjacob@feral.com */ -#include #include -#include #include #include @@ -142,53 +140,4 @@ scode2ascii(u_char code) snprintf(rbuf, sizeof(rbuf), "", code & 0xf); return (rbuf); } -} - -struct sbuf * -stat2sbuf(int eletype, u_char *cstat) -{ - struct sbuf *buf; - - buf = sbuf_new_auto(); - if (buf == NULL) - err(EXIT_FAILURE, "sbuf_new_auto()"); - - if (cstat[0] & 0x40) - sbuf_printf(buf, "\t\t- Predicted Failure\n"); - if (cstat[0] & 0x20) - sbuf_printf(buf, "\t\t- Disabled\n"); - if (cstat[0] & 0x10) - sbuf_printf(buf, "\t\t- Swapped\n"); - switch (eletype) { - case ELMTYP_DEVICE: - if (cstat[2] & 0x02) - sbuf_printf(buf, "\t\t- LED=locate\n"); - if (cstat[2] & 0x20) - sbuf_printf(buf, "\t\t- LED=fault\n"); - break; - case ELMTYP_ARRAY_DEV: - if (cstat[2] & 0x02) - sbuf_printf(buf, "\t\t- LED=locate\n"); - if (cstat[2] & 0x20) - sbuf_printf(buf, "\t\t- LED=fault\n"); - break; - case ELMTYP_FAN: - sbuf_printf(buf, "\t\t- Speed: %d rpm\n", - (((0x7 & cstat[1]) << 8) + cstat[2]) * 10); - break; - case ELMTYP_THERM: - if (cstat[2]) { - sbuf_printf(buf, "\t\t- Temperature: %d C\n", - cstat[2] - TEMPERATURE_OFFSET); - } else { - sbuf_printf(buf, "\t\t- Temperature: -reserved-\n"); - } - break; - case ELMTYP_VOM: - sbuf_printf(buf, "\t\t- Voltage: %.2f V\n", - be16dec(cstat + 2) / 100.0); - break; - } - sbuf_finish(buf); - return (buf); } Modified: head/usr.sbin/sesutil/eltsub.h ============================================================================== --- head/usr.sbin/sesutil/eltsub.h Fri Jun 23 15:02:49 2017 (r320269) +++ head/usr.sbin/sesutil/eltsub.h Fri Jun 23 15:09:08 2017 (r320270) @@ -34,4 +34,3 @@ const char *geteltnm(int); const char *scode2ascii(u_char); -struct sbuf *stat2sbuf(int, u_char *); Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Fri Jun 23 15:02:49 2017 (r320269) +++ head/usr.sbin/sesutil/sesutil.c Fri Jun 23 15:09:08 2017 (r320270) @@ -29,10 +29,10 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include -#include #include #include @@ -56,6 +56,7 @@ static int fault(int argc, char **argv); static int locate(int argc, char **argv); static int objmap(int argc, char **argv); static int sesled(int argc, char **argv, bool fault); +static void sesutil_print(bool *title, const char *fmt, ...) __printflike(2,3); static struct command { const char *name; @@ -303,10 +304,74 @@ fault(int argc, char **argv) return (sesled(argc, argv, true)); } +#define TEMPERATURE_OFFSET 20 +static void +sesutil_print(bool *title, const char *fmt, ...) +{ + va_list args; + + if (!*title) { + printf("\t\tExtra status:\n"); + *title = true; + } + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +static void +print_extra_status(int eletype, u_char *cstat) +{ + bool title = false; + + if (cstat[0] & 0x40) { + sesutil_print(&title, "\t\t- Predicted Failure\n"); + } + if (cstat[0] & 0x20) { + sesutil_print(&title, "\t\t- Disabled\n"); + } + if (cstat[0] & 0x10) { + sesutil_print(&title, "\t\t- Swapped\n"); + } + switch (eletype) { + case ELMTYP_DEVICE: + if (cstat[2] & 0x02) { + sesutil_print(&title, "\t\t- LED=locate\n"); + } + if (cstat[2] & 0x20) { + sesutil_print(&title, "\t\t- LED=fault\n"); + } + break; + case ELMTYP_ARRAY_DEV: + if (cstat[2] & 0x02) { + sesutil_print(&title, "\t\t- LED=locate\n"); + } + if (cstat[2] & 0x20) { + sesutil_print(&title, "\t\t- LED=fault\n"); + } + break; + case ELMTYP_FAN: + sesutil_print(&title, "\t\t- Speed: %d rpm\n", + (((0x7 & cstat[1]) << 8) + cstat[2]) * 10); + break; + case ELMTYP_THERM: + if (cstat[2]) { + sesutil_print(&title, "\t\t- Temperature: %d C\n", + cstat[2] - TEMPERATURE_OFFSET); + } else { + sesutil_print(&title, "\t\t- Temperature: -reserved-\n"); + } + break; + case ELMTYP_VOM: + sesutil_print(&title, "\t\t- Voltage: %.2f V\n", + be16dec(cstat + 2) / 100.0); + break; + } +} + static int objmap(int argc, char **argv __unused) { - struct sbuf *extra; encioc_string_t stri; encioc_elm_devnames_t e_devname; encioc_elm_status_t e_status; @@ -422,12 +487,7 @@ objmap(int argc, char **argv __unused) printf("\t\tDevice Names: %s\n", e_devname.elm_devnames); } - extra = stat2sbuf(e_ptr[j].elm_type, e_status.cstat); - if (sbuf_len(extra) > 0) { - printf("\t\tExtra status:\n%s", - sbuf_data(extra)); - } - sbuf_delete(extra); + print_extra_status(e_ptr[j].elm_type, e_status.cstat); free(e_devname.elm_devnames); } free(e_ptr); From owner-svn-src-all@freebsd.org Fri Jun 23 15:17:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1FF6DA67A7; Fri, 23 Jun 2017 15:17:02 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A43176425C; Fri, 23 Jun 2017 15:17:02 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 348B45EE; Fri, 23 Jun 2017 10:17:01 -0500 (CDT) Date: Fri, 23 Jun 2017 10:17:00 -0500 From: Mark Linimon To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320262 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20170623151659.GA12212@lonesome.com> References: <201706230842.v5N8grdQ015909@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706230842.v5N8grdQ015909@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:17:02 -0000 I can confirm that this fixes the build on sparc64. mcl From owner-svn-src-all@freebsd.org Fri Jun 23 15:25:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2F3ADA69FE for ; Fri, 23 Jun 2017 15:25:23 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B08664735 for ; Fri, 23 Jun 2017 15:25:22 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 232fb08b-5828-11e7-8f51-6f1fdf31063e 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.eu.mailhop.org (Halon) with ESMTPSA id 232fb08b-5828-11e7-8f51-6f1fdf31063e; Fri, 23 Jun 2017 15:25:08 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v5NFP6iO010758; Fri, 23 Jun 2017 09:25:06 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1498231506.66489.18.camel@freebsd.org> Subject: Re: svn commit: r320242 - head/etc/ntp From: Ian Lepore To: Allan Jude , Cy Schubert Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 23 Jun 2017 09:25:06 -0600 In-Reply-To: <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org> References: <201706230104.v5N14e3e031473@slippy.cwsent.com> <2caa5927-9919-ce19-93f4-1005a5257295@freebsd.org> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:25:23 -0000 On Thu, 2017-06-22 at 21:59 -0400, Allan Jude wrote: > On 2017-06-22 21:04, Cy Schubert wrote: > > > > In message <1498161747.66489.10.camel@freebsd.org>, Ian Lepore > > writes: > > > > > > On Thu, 2017-06-22 at 19:25 +0000, Cy Schubert wrote: > > > > > > > > Author: cy > > > > Date: Thu Jun 22 19:25:17 2017 > > > > New Revision: 320242 > > > > URL: https://svnweb.freebsd.org/changeset/base/320242 > > > > > > > > Log: > > > >   Update leap-seconds to leap-seconds.3701462400. > > > >   > > > > > > > > Modified: head/etc/ntp/leap-seconds > > > > =============================================================== > > > > ====== > > > > ========= > > > > --- head/etc/ntp/leap-seconds Thu Jun 22 18:40:34 2017 > > > > (r320241) > > > > +++ head/etc/ntp/leap-seconds Thu Jun 22 19:25:17 2017 > > > > (r320242) > > > > @@ -128,7 +128,7 @@ > > > >  # Washington, DC > > > >  # jeffrey.prillaman@usno.navy.mil > > > >  # > > > > -# Last Update of leap second values:   6 Jul 2016 > > > > +# Last Update of leap second values:  18 Apr 2017 > > > >  # > > >  # The following line shows this last update date in NTP > > > > > > > > timestamp  > > > >  # format. This is the date on which the most recent > > > > change to > > > > @@ -136,7 +136,7 @@ > > > >  # be identified by the unique pair of characters in > > > > the first > > > > two  > > > >  # columns as shown below. > > > >  # > > > > -#$  3676752000 > > > > +#$  3701462400 > > > >  # > > > Where did this leapfile come from?  The last update of leap > > > second > > > values is supposed to change only when the actual list of offsets > > > changes, not when the file is updated to just change an > > > expiration > > > date.  This is actually very explicitly documented in the file > > > itself, > > > just a few lines down from this change: > > The source of the leapfile is in the commit message. Here it is > > again: > > > > Obtained from:  ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3701 > > 462400 > > > > > > > > > > >   If an announcement by the IERS specifies that no leap second > > > is  > > >   scheduled, then only the expiration date of the file will  > > >   be advanced to show that the information in the file is still > > >   current -- the update time stamp, the data and the name of the > > > file  > > >   will not change. > > > > > > > > > > > > > > -# File expires on:  1 Jun 2017 > > > > +# Updated through IERS Bulletin C 53 > > > > +# File expires on:  1 Dec 2017 > > > >  # > > > > -#@ 3705264000 > > > > +#@ 3721075200 > > > >  # > > > This expiration is wrong too, dangerously so IMO.  The data in > > > the file > > > is good through 12-31-2017-23:59:59, although historical practice > > > has > > > been to make the file expire a couple days before that.  Making > > > it > > > expire 31 days early is about the worst possible choice... some > > > systems > > > for notifying clients/consumers of an impending leap second (or > > > the > > > lack thereof) only do so during the last month before the leap > > > opportunity -- this has the file expire just at the point such > > > software > > > would consider it authoratative for dissemination.  > > My guess is that USNO may have had reason to do so. I'll keep an > > eye on  > > their next release of the file. > >   > > > > > > > > > I will note however, unlike the update date, there is no formal > > > written > > > description of how expiration date is determined, so the previous > > > paragraph is just my opinion and experience working in the timing > > > field. > > > > > > A leapfile without these problems can be found at > > > > > >   ftp://time.nist.gov/pub/leap-seconds.list > > We can use that instead. Attached is the diff between the USNO and > > NIST  > > versions of the file. > > > > One would think that two groups within the US Government might be > > able to  > > produce a consistent leapfile. I suspect the real reason is that > > the USNO  > > might have a different bureaucratic process than the NIST does. > > > > > > > > > > > > > > -- Ian > > > > > > > > > > >  2272060800 10 # 1 Jan 1972 > > > >  2287785600 11 # 1 Jul 1972 > > > > @@ -216,5 +216,5 @@ > > > >  # the hash line is also ignored in the > > > >  # computation. > > > >  # > > > > -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 > > > > +#h 3f004255 91f969f7 252361e5 27aa6754 eb6b7c72 > > > >  # > > > > > > I'll update to the NIST version of the file. > > > > > > > > > > > > > > Cheers, > > Cy Schubert > > FreeBSD UNIX:     Web:  http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > The NIST version does seem to have a number of improvements, like > corrected typos etc, but: > > -# Last Update of leap second values:  18 Apr 2017 > +# Last Update of leap second values:   8 July 2016 > > The USNO one seems newer. A bit strange. > That was the main point of my mail (with the expiration date being a secondary point).  The NIST file's date is correct according to the rules for changing it, which appear in the paragraph right after the date itself.  USNO for some reason is updating this value when they extend the expiration date, and that's not how it's supposed to work. If USNO wants to document when they touch the file at all, they can do so by inserting freeform comments, but not by manipulating the "Last update of values" metadata field that begins with '#$'. -- Ian From owner-svn-src-all@freebsd.org Fri Jun 23 15:27:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43DCCDA6B10; Fri, 23 Jun 2017 15:27:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1227E649AD; Fri, 23 Jun 2017 15:27:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NFRODS086176; Fri, 23 Jun 2017 15:27:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NFROh7086175; Fri, 23 Jun 2017 15:27:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706231527.v5NFROh7086175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 23 Jun 2017 15:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320271 - head/usr.sbin/sesutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:27:25 -0000 Author: bapt Date: Fri Jun 23 15:27:23 2017 New Revision: 320271 URL: https://svnweb.freebsd.org/changeset/base/320271 Log: sesutil no longer depends on libsbuf Sponsored by: Gandi.net Modified: head/usr.sbin/sesutil/Makefile.depend Modified: head/usr.sbin/sesutil/Makefile.depend ============================================================================== --- head/usr.sbin/sesutil/Makefile.depend Fri Jun 23 15:09:08 2017 (r320270) +++ head/usr.sbin/sesutil/Makefile.depend Fri Jun 23 15:27:23 2017 (r320271) @@ -8,8 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcompiler_rt \ - lib/libsbuf \ + lib/libcompiler_rt .include From owner-svn-src-all@freebsd.org Fri Jun 23 15:43:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3625BDA6EB9; Fri, 23 Jun 2017 15:43:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 0224E65173; Fri, 23 Jun 2017 15:43:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 42C0B74B5; Fri, 23 Jun 2017 15:43:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 131EC2DB1; Fri, 23 Jun 2017 15:43:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id pTz34wzh1u_c; Fri, 23 Jun 2017 15:42:57 +0000 (UTC) Subject: Re: svn commit: r320245 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F40F42DAC To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706231356.v5NDujRH002025@slippy.cwsent.com> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Fri, 23 Jun 2017 08:42:41 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706231356.v5NDujRH002025@slippy.cwsent.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:43:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3 Content-Type: multipart/mixed; boundary="77famXCJfxNoDslk4Jg33FDxFgUd929a1"; protected-headers="v1" From: Bryan Drewery To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r320245 - head/share/mk References: <201706231356.v5NDujRH002025@slippy.cwsent.com> In-Reply-To: <201706231356.v5NDujRH002025@slippy.cwsent.com> --77famXCJfxNoDslk4Jg33FDxFgUd929a1 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/23/2017 6:56 AM, Cy Schubert wrote: > In message <201706231347.v5NDlt39037415@slippy.cwsent.com>, Cy Schubert= =20 > writes: >> Let me try replying to this again. It's an exmh thing. Sorry. >> >> In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewe= ry=20 >> writes >> : >>> Author: bdrewery >>> Date: Thu Jun 22 21:03:24 2017 >>> New Revision: 320245 >>> URL: https://svnweb.freebsd.org/changeset/base/320245 >>> >>> Log: >>> Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. >>> =20 >>> This is similar to r300350 for bsd.compiler.mk. >>> =20 >>> MFC after: 2 weeks >>> Reviewed by: emaste >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: https://reviews.freebsd.org/D11309 >>> >>> Modified: >>> head/share/mk/bsd.linker.mk >>> >>> Modified: head/share/mk/bsd.linker.mk >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >> =3D=3D >>> =3D >>> --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 >>> 4) >>> +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 >>> 5) >>> @@ -9,25 +9,39 @@ >>> # major * 10000 + minor * 100 + tiny >>> # It too can be overridden on the command line. >>> # >>> +# These variables with an X_ prefix will also be provided if XLD is = set. >>> +# >>> # This file may be included multiple times, but only has effect the = first=20 >> ti >>> me. >>> # >>> =20 >>> .if !target(____) >>> ____: >>> =20 >>> -_ld_version!=3D ${LD} --version 2>/dev/null | head -n 1 || echo none= >>> +.for ld X_ in LD $${_empty_var_} XLD X_ >>> +.if ${ld} =3D=3D "LD" || !empty(XLD) >>> +.if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD}) >>> + >>> +_ld_version!=3D ${${ld}} --version 2>/dev/null | head -n 1 || echo n= one >> >> This line gave one of my machines a bit of gas with the error: >> >> sh: head: not found >> make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable= to=20 >> determine linker type from LD=3Dld >> *** Error code 1 >> >> Specifying the full pathname for head resolves the isssue. >=20 > Or better yet, use include head in the build tools (or use sed or awk).= >=20 >=20 Good point, but r320249 should remove the head(1) call entirely during installworld. Can you try again? --=20 Regards, Bryan Drewery --77famXCJfxNoDslk4Jg33FDxFgUd929a1-- --wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3 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 iQEcBAEBAgAGBQJZTTbxAAoJEDXXcbtuRpfPp8cH/AtRKy9Mmx2V8uo3fJjKrV+K 3t9NyvPfzz0XXR4m/HXCIJzDZOpYNkdVWQlAYvQP2J/Uq+klttermehRYYsyvqvb lmJWwNuVYlUlQsnpPXPhILdFfSRGrHgxjDCWiVQQ4SlzGIQkwSIeJCGNC3idxPq/ h/JtY5BQCF7JIweY9xB5VU5uURp28Wioxhydvf9Ej/6ME1zaQyeajLsMMUJtZgrO KSmesQei7viFXs6VLdOBcAfR/uSYZlBnL/9NNUEo//uIC//JWYVpdgr4lnIZHwaT rIzmOXM41dj6LS10mA7v+0N0yCExiUbwCGAtacvRXkZGGtJ3+ECCAYe8GG2mgWA= =4zps -----END PGP SIGNATURE----- --wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3-- From owner-svn-src-all@freebsd.org Fri Jun 23 15:58:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08EB4DA74BC; Fri, 23 Jun 2017 15:58:00 +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 CD3446598F; Fri, 23 Jun 2017 15:57:59 +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 v5NFvxaV098668; Fri, 23 Jun 2017 15:57:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NFvw8g098666; Fri, 23 Jun 2017 15:57:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706231557.v5NFvw8g098666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jun 2017 15:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320272 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 15:58:00 -0000 Author: emaste Date: Fri Jun 23 15:57:58 2017 New Revision: 320272 URL: https://svnweb.freebsd.org/changeset/base/320272 Log: enable --build-id for the kernel link A Build-ID is an identifier generated at link time to uniquely identify ELF binaries. It allows efficient confirmation that an executable or shared library and a corresponding standalone debuginfo file match. (Otherwise, a checksum of the debuginfo file must be calculated when opening it in a debugger.) The FreeBSD base system includes GNU bfd ld 2.17.50 as the linker for architectures other than arm64. Build-ID support was added to bfd ld shortly after that version, so was not previously available to us. We can now start making use of Build-ID as we migrate to using lld or bfd ld from ports, conditionally enabled based on the LINKER_TYPE and LINKER_VERSION make variables added in r320244 and subsequent commits. Reviewed by: dim MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11314 Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Jun 23 15:27:23 2017 (r320271) +++ head/sys/conf/kern.pre.mk Fri Jun 23 15:57:58 2017 (r320272) @@ -114,6 +114,10 @@ DEFINED_PROF= ${PROF} # can override the others. CFLAGS+= ${CONF_CFLAGS} +.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 +LDFLAGS+= -Wl,--build-id=sha1 +.endif + # Optional linting. This can be overridden in /etc/make.conf. LINTFLAGS= ${LINTOBJKERNFLAGS} Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Jun 23 15:27:23 2017 (r320271) +++ head/sys/conf/kmod.mk Fri Jun 23 15:57:58 2017 (r320272) @@ -125,6 +125,10 @@ CFLAGS.gcc+= --param large-function-growth=1000 CFLAGS+= -fno-common LDFLAGS+= -d -warn-common +.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 +LDFLAGS+= -Wl,--build-id=sha1 +.endif + CFLAGS+= ${DEBUG_FLAGS} .if ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer From owner-svn-src-all@freebsd.org Fri Jun 23 16:29:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAE4ADA794A; Fri, 23 Jun 2017 16:29:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B94466424; Fri, 23 Jun 2017 16:29:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5NGSxPe034399 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Jun 2017 19:28:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5NGSxPe034399 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5NGSxcj034398; Fri, 23 Jun 2017 19:28:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 23 Jun 2017 19:28:59 +0300 From: Konstantin Belousov To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320272 - head/sys/conf Message-ID: <20170623162859.GL3437@kib.kiev.ua> References: <201706231557.v5NFvw8g098666@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706231557.v5NFvw8g098666@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 16:29:06 -0000 On Fri, Jun 23, 2017 at 03:57:58PM +0000, Ed Maste wrote: > Author: emaste > Date: Fri Jun 23 15:57:58 2017 > New Revision: 320272 > URL: https://svnweb.freebsd.org/changeset/base/320272 > > Log: > enable --build-id for the kernel link > > A Build-ID is an identifier generated at link time to uniquely identify > ELF binaries. It allows efficient confirmation that an executable or > shared library and a corresponding standalone debuginfo file match. > (Otherwise, a checksum of the debuginfo file must be calculated when > opening it in a debugger.) > > The FreeBSD base system includes GNU bfd ld 2.17.50 as the linker for > architectures other than arm64. Build-ID support was added to bfd ld > shortly after that version, so was not previously available to us. > > We can now start making use of Build-ID as we migrate to using lld or > bfd ld from ports, conditionally enabled based on the LINKER_TYPE and > LINKER_VERSION make variables added in r320244 and subsequent commits. > > Reviewed by: dim > MFC after: 3 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D11314 > > Modified: > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk > > Modified: head/sys/conf/kern.pre.mk > ============================================================================== > --- head/sys/conf/kern.pre.mk Fri Jun 23 15:27:23 2017 (r320271) > +++ head/sys/conf/kern.pre.mk Fri Jun 23 15:57:58 2017 (r320272) > @@ -114,6 +114,10 @@ DEFINED_PROF= ${PROF} > # can override the others. > CFLAGS+= ${CONF_CFLAGS} > > +.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 I believe such tests is the road to misery. I suggest that an ld feature presence must define some variable for make, and the places using the ld feature would test for the variable. In other words, checking the features must be centralized. There is too many linkers already: bfd, gold, lld. Since two new linkers appeared in five years, I would be not surprised if more will. Having to deal with combinations at places of use is not scalable. We do it close to right with C compilers and sys/cdefs.h. > +LDFLAGS+= -Wl,--build-id=sha1 > +.endif > + > # Optional linting. This can be overridden in /etc/make.conf. > LINTFLAGS= ${LINTOBJKERNFLAGS} > > > Modified: head/sys/conf/kmod.mk > ============================================================================== > --- head/sys/conf/kmod.mk Fri Jun 23 15:27:23 2017 (r320271) > +++ head/sys/conf/kmod.mk Fri Jun 23 15:57:58 2017 (r320272) > @@ -125,6 +125,10 @@ CFLAGS.gcc+= --param large-function-growth=1000 > CFLAGS+= -fno-common > LDFLAGS+= -d -warn-common > > +.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 > +LDFLAGS+= -Wl,--build-id=sha1 > +.endif > + > CFLAGS+= ${DEBUG_FLAGS} > .if ${MACHINE_CPUARCH} == amd64 > CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer From owner-svn-src-all@freebsd.org Fri Jun 23 16:38:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0B4ADA7DCC; Fri, 23 Jun 2017 16:38:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70DE966CBE; Fri, 23 Jun 2017 16:38:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NGcILO015046; Fri, 23 Jun 2017 16:38:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NGcIq1015045; Fri, 23 Jun 2017 16:38:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231638.v5NGcIq1015045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 16:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320273 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 16:38:19 -0000 Author: bdrewery Date: Fri Jun 23 16:38:18 2017 New Revision: 320273 URL: https://svnweb.freebsd.org/changeset/base/320273 Log: Allow ALWAYS_BOOTSTRAP_MAKE to force bmake bootstrapping. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Jun 23 15:57:58 2017 (r320272) +++ head/Makefile Fri Jun 23 16:38:18 2017 (r320273) @@ -195,7 +195,8 @@ HAVE_MAKE= bmake .else HAVE_MAKE= fmake .endif -.if ${HAVE_MAKE} != ${WANT_MAKE} || \ +.if defined(ALWAYS_BOOTSTRAP_MAKE) || \ + ${HAVE_MAKE} != ${WANT_MAKE} || \ (defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION}) NEED_MAKE_UPGRADE= t .endif From owner-svn-src-all@freebsd.org Fri Jun 23 16:38:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55734DA7E26; Fri, 23 Jun 2017 16:38:47 +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 243E566DF9; Fri, 23 Jun 2017 16:38:47 +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 v5NGckJs015102; Fri, 23 Jun 2017 16:38:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NGckMa015101; Fri, 23 Jun 2017 16:38:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231638.v5NGckMa015101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 16:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320274 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 16:38:47 -0000 Author: bdrewery Date: Fri Jun 23 16:38:46 2017 New Revision: 320274 URL: https://svnweb.freebsd.org/changeset/base/320274 Log: Set compiler metadata for stageworld/distributeworld. This fixes LD errors during 'make packages' but also for the unlikely case of 'buildworld' on 1 system and 'packages' on another [1]. PR: 212877 [1] MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 16:38:18 2017 (r320273) +++ head/Makefile.inc1 Fri Jun 23 16:38:46 2017 (r320274) @@ -87,7 +87,8 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} # Pull in compiler metadata from buildworld/toolchain if possible to avoid # running CC from bsd.compiler.mk. -.if make(installworld) || make(install) +.if make(installworld) || make(install) || make(distributeworld) || \ + make(stageworld) .-include "${OBJTREE}${.CURDIR}/compiler-metadata.mk" .endif From owner-svn-src-all@freebsd.org Fri Jun 23 16:43:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D14ADA8018; Fri, 23 Jun 2017 16:43:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 C9293672E4; Fri, 23 Jun 2017 16:43:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id EB96B8393; Fri, 23 Jun 2017 16:43:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id B3DF22F26; Fri, 23 Jun 2017 16:43:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id bdcJhoGeGhVI; Fri, 23 Jun 2017 16:42:59 +0000 (UTC) Subject: Re: svn commit: r320272 - head/sys/conf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 68B0E2F1E To: Konstantin Belousov , Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706231557.v5NFvw8g098666@repo.freebsd.org> <20170623162859.GL3437@kib.kiev.ua> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Fri, 23 Jun 2017 09:43:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170623162859.GL3437@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iAqIDL4FAWgTdH0PFtGjl3UQ1VotPpvH6" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 16:43:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iAqIDL4FAWgTdH0PFtGjl3UQ1VotPpvH6 Content-Type: multipart/mixed; boundary="lFdDxvMkNesgbR8fgnHquGnmOInPtQxTr"; protected-headers="v1" From: Bryan Drewery To: Konstantin Belousov , Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r320272 - head/sys/conf References: <201706231557.v5NFvw8g098666@repo.freebsd.org> <20170623162859.GL3437@kib.kiev.ua> In-Reply-To: <20170623162859.GL3437@kib.kiev.ua> --lFdDxvMkNesgbR8fgnHquGnmOInPtQxTr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/23/2017 9:28 AM, Konstantin Belousov wrote: > On Fri, Jun 23, 2017 at 03:57:58PM +0000, Ed Maste wrote: >> Author: emaste >> Date: Fri Jun 23 15:57:58 2017 >> New Revision: 320272 >> URL: https://svnweb.freebsd.org/changeset/base/320272 >> >> Log: >> enable --build-id for the kernel link >> =20 >> A Build-ID is an identifier generated at link time to uniquely ident= ify >> ELF binaries. It allows efficient confirmation that an executable o= r >> shared library and a corresponding standalone debuginfo file match. >> (Otherwise, a checksum of the debuginfo file must be calculated when= >> opening it in a debugger.) >> =20 >> The FreeBSD base system includes GNU bfd ld 2.17.50 as the linker fo= r >> architectures other than arm64. Build-ID support was added to bfd l= d >> shortly after that version, so was not previously available to us. >> =20 >> We can now start making use of Build-ID as we migrate to using lld o= r >> bfd ld from ports, conditionally enabled based on the LINKER_TYPE an= d >> LINKER_VERSION make variables added in r320244 and subsequent commit= s. >> =20 >> Reviewed by: dim >> MFC after: 3 weeks >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D11314 >> >> Modified: >> head/sys/conf/kern.pre.mk >> head/sys/conf/kmod.mk >> >> Modified: head/sys/conf/kern.pre.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/conf/kern.pre.mk Fri Jun 23 15:27:23 2017 (r320271) >> +++ head/sys/conf/kern.pre.mk Fri Jun 23 15:57:58 2017 (r320272) >> @@ -114,6 +114,10 @@ DEFINED_PROF=3D ${PROF} >> # can override the others. >> CFLAGS+=3D ${CONF_CFLAGS} >> =20 >> +.if ${LINKER_TYPE} !=3D "bfd" || ${LINKER_VERSION} > 21750 > I believe such tests is the road to misery. I suggest that an ld featu= re > presence must define some variable for make, and the places using the > ld feature would test for the variable. >=20 > In other words, checking the features must be centralized. There is to= o > many linkers already: bfd, gold, lld. Since two new linkers appeared i= n > five years, I would be not surprised if more will. Agreed. We can have a LINKER_FEATURES like we do for the compiler. In this case I suggest just moving the same condition you have added into bsd.linker.mk with something like https://people.freebsd.org/~bdrewery/patches/linker-features-build-id.dif= f Then in these sys/conf places you just: =2Eif ${LINKER_FEATURES:Mbuild-id} LDFLAGS+=3D >=20 > Having to deal with combinations at places of use is not scalable. We = do > it close to right with C compilers and sys/cdefs.h. >=20 >> +LDFLAGS+=3D -Wl,--build-id=3Dsha1 >> +.endif >> + >> # Optional linting. This can be overridden in /etc/make.conf. >> LINTFLAGS=3D ${LINTOBJKERNFLAGS} >> =20 >> >> Modified: head/sys/conf/kmod.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/conf/kmod.mk Fri Jun 23 15:27:23 2017 (r320271) >> +++ head/sys/conf/kmod.mk Fri Jun 23 15:57:58 2017 (r320272) >> @@ -125,6 +125,10 @@ CFLAGS.gcc+=3D --param large-function-growth=3D10= 00 >> CFLAGS+=3D -fno-common >> LDFLAGS+=3D -d -warn-common >> =20 >> +.if ${LINKER_TYPE} !=3D "bfd" || ${LINKER_VERSION} > 21750 >> +LDFLAGS+=3D -Wl,--build-id=3Dsha1 >> +.endif >> + >> CFLAGS+=3D ${DEBUG_FLAGS} >> .if ${MACHINE_CPUARCH} =3D=3D amd64 >> CFLAGS+=3D -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer >=20 --=20 Regards, Bryan Drewery --lFdDxvMkNesgbR8fgnHquGnmOInPtQxTr-- --iAqIDL4FAWgTdH0PFtGjl3UQ1VotPpvH6 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 iQEcBAEBAgAGBQJZTUUUAAoJEDXXcbtuRpfPJqgH/R+fz6S85B5e/vBHI4NEPTHh 6UPiDweZRShpA/vb45FaEuLUyapZ3yp2/690aT0o6ryFQFn88Q9hnItwUaG+emhw xlZUDNt1vfkOpukvZQ4pjtEdXpDV9Kx+davwwDHmmmaBMKAD/kF303vVMlqgVqQI kTulpSrFZHR8C61YDTvgfmkRBQ8ESG1DAgomXS/8NJvlRePOzFVo+3qM6nQCf9nC p+QIVVRoCJmQykk0oiwu2EbKcL0i4oraU+wnZzcvVapcpdvvyjB2HN9a5dsaFpZH oEkvHG1CSvA0LovWxUb9gizSNFk9Lizz/4PfmbmeLRKjGfh18eDxCUvN5GSAQxE= =UJsD -----END PGP SIGNATURE----- --iAqIDL4FAWgTdH0PFtGjl3UQ1VotPpvH6-- From owner-svn-src-all@freebsd.org Fri Jun 23 17:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12FC9DA8CC9; Fri, 23 Jun 2017 17:21: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 E2E166897A; Fri, 23 Jun 2017 17:21: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 v5NHLc9t032335; Fri, 23 Jun 2017 17:21:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NHLb1n032332; Fri, 23 Jun 2017 17:21:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706231721.v5NHLb1n032332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jun 2017 17:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320275 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 17:21:39 -0000 Author: emaste Date: Fri Jun 23 17:21:37 2017 New Revision: 320275 URL: https://svnweb.freebsd.org/changeset/base/320275 Log: Introduce LINKER_FEATURES to avoid duplicating version logic Submitted by: bdrewery Reported by: kib Modified: head/share/mk/bsd.linker.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Fri Jun 23 16:38:46 2017 (r320274) +++ head/share/mk/bsd.linker.mk Fri Jun 23 17:21:37 2017 (r320275) @@ -9,6 +9,11 @@ # major * 10000 + minor * 100 + tiny # It too can be overridden on the command line. # +# LINKER_FEATURES may contain one or more of the following, based on +# linker support for that feature: +# +# - build-id : support for generating a Build-ID note +# # These variables with an X_ prefix will also be provided if XLD is set. # # This file may be included multiple times, but only has effect the first time. @@ -22,7 +27,7 @@ ____: # Try to import LINKER_TYPE and LINKER_VERSION from parent make. # The value is only used/exported for the same environment that impacts # LD and LINKER_* settings here. -_exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION +_exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION ${X_}LINKER_FEATURES ${X_}_ld_hash= ${${ld}}${MACHINE}${PATH} ${X_}_ld_hash:= ${${X_}_ld_hash:hash} # Only import if none of the vars are set somehow else. @@ -59,11 +64,16 @@ ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' .undef _ld_version .undef _v +${X_}LINKER_FEATURES= +.if ${${X_}LINKER_TYPE} != "bfd" || ${${X_}LINKER_VERSION} > 21750 +${X_}LINKER_FEATURES+= build-id .endif +.endif .else # Use LD's values X_LINKER_TYPE= ${LINKER_TYPE} X_LINKER_VERSION= ${LINKER_VERSION} +X_LINKER_FEATURES= ${LINKER_FEATURES} .endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) # Export the values so sub-makes don't have to look them up again, using the Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Jun 23 16:38:46 2017 (r320274) +++ head/sys/conf/kern.pre.mk Fri Jun 23 17:21:37 2017 (r320275) @@ -114,7 +114,7 @@ DEFINED_PROF= ${PROF} # can override the others. CFLAGS+= ${CONF_CFLAGS} -.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 +.if ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= -Wl,--build-id=sha1 .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Jun 23 16:38:46 2017 (r320274) +++ head/sys/conf/kmod.mk Fri Jun 23 17:21:37 2017 (r320275) @@ -125,7 +125,7 @@ CFLAGS.gcc+= --param large-function-growth=1000 CFLAGS+= -fno-common LDFLAGS+= -d -warn-common -.if ${LINKER_TYPE} != "bfd" || ${LINKER_VERSION} > 21750 +.if ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= -Wl,--build-id=sha1 .endif From owner-svn-src-all@freebsd.org Fri Jun 23 17:31:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FAA9DA8DBE; Fri, 23 Jun 2017 17:31:08 +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 1E8A868DF3; Fri, 23 Jun 2017 17:31:08 +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 v5NHV7aG035848; Fri, 23 Jun 2017 17:31:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NHV7cs035847; Fri, 23 Jun 2017 17:31:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706231731.v5NHV7cs035847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 23 Jun 2017 17:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320276 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 17:31:08 -0000 Author: manu Date: Fri Jun 23 17:31:07 2017 New Revision: 320276 URL: https://svnweb.freebsd.org/changeset/base/320276 Log: ipfw: Note that bandwidth can take G suffix in the manpage Reported by: Jose Luis Duran (github) Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Fri Jun 23 17:21:37 2017 (r320275) +++ head/sbin/ipfw/ipfw.8 Fri Jun 23 17:31:07 2017 (r320276) @@ -2499,7 +2499,7 @@ The following parameters can be configured for a pipe: .It Cm bw Ar bandwidth | device Bandwidth, measured in .Sm off -.Op Cm K | M +.Op Cm K | M | G .Brq Cm bit/s | Byte/s . .Sm on .Pp From owner-svn-src-all@freebsd.org Fri Jun 23 17:33:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F92DA8F53; Fri, 23 Jun 2017 17:33:37 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2856D6A177; Fri, 23 Jun 2017 17:33:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id eac094fc; Fri, 23 Jun 2017 19:33:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=Nl4W/ho+HKyQJUzfXX6tbIL7VUo=; b=qgq2nn7YfjG4Zcodcq/EVRJLD0kw XouzCHKUp9KwQHH6ajTAPQR50UyhZ6PgLRbxDQUfGJ67VjPH0qrtPqc+oSzduOem ZvUPkdA/Koa9G1Jh8ny5VLNAEgisnVpqnXxK+icz3+/vJfsO/qBakn9OieCR8MLD Z/scofKLdRwLoEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=c73W/+EAi3Q3lBwWExYbiNRLDdbvM2GfuW2VUuo6aFh7hvJi9x7w3rAG 7gJUbdlE5S9pRt/zmU4mfVrM/wvlR74qIZECpryh6q4JLxeKQmC08Xtf35g9+X/M 2jZ4/XTquN53JOnP6fbTmsEfIz/Cpq9DZ+dt7ep72aPAPKgMJi4= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id be16d61c TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 23 Jun 2017 19:33:32 +0200 (CEST) Date: Fri, 23 Jun 2017 19:33:32 +0200 From: Emmanuel Vadot To: Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320276 - head/sbin/ipfw Message-Id: <20170623193332.75f7656ff83bf6b7755430b1@bidouilliste.com> In-Reply-To: <201706231731.v5NHV7cs035847@repo.freebsd.org> References: <201706231731.v5NHV7cs035847@repo.freebsd.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 17:33:37 -0000 On Fri, 23 Jun 2017 17:31:07 +0000 (UTC) Emmanuel Vadot wrote: > Author: manu > Date: Fri Jun 23 17:31:07 2017 > New Revision: 320276 > URL: https://svnweb.freebsd.org/changeset/base/320276 > > Log: > ipfw: Note that bandwidth can take G suffix in the manpage > > Reported by: Jose Luis Duran (github) Forgot: MFC After: 2 weeks X-MFC-With: r320268 > Modified: > head/sbin/ipfw/ipfw.8 > > Modified: head/sbin/ipfw/ipfw.8 > ============================================================================== > --- head/sbin/ipfw/ipfw.8 Fri Jun 23 17:21:37 2017 (r320275) > +++ head/sbin/ipfw/ipfw.8 Fri Jun 23 17:31:07 2017 (r320276) > @@ -2499,7 +2499,7 @@ The following parameters can be configured for a pipe: > .It Cm bw Ar bandwidth | device > Bandwidth, measured in > .Sm off > -.Op Cm K | M > +.Op Cm K | M | G > .Brq Cm bit/s | Byte/s . > .Sm on > .Pp -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Fri Jun 23 17:39:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53373D8607D; Fri, 23 Jun 2017 17:39:01 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2015F6A382; Fri, 23 Jun 2017 17:39:01 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NHd0d6039901; Fri, 23 Jun 2017 17:39:00 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NHd05x039900; Fri, 23 Jun 2017 17:39:00 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201706231739.v5NHd05x039900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Fri, 23 Jun 2017 17:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320277 - head/usr.bin/mkuzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 17:39:01 -0000 Author: sobomax Date: Fri Jun 23 17:39:00 2017 New Revision: 320277 URL: https://svnweb.freebsd.org/changeset/base/320277 Log: Don't leak file descriptor in some cases. Reported by: cem MFC after: 6 weeks Modified: head/usr.bin/mkuzip/mkuz_insize.c Modified: head/usr.bin/mkuzip/mkuz_insize.c ============================================================================== --- head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:31:07 2017 (r320276) +++ head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:39:00 2017 (r320277) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "mkuz_cfg.h" #include "mkuz_insize.h" @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) ffd = open(statfsbuf.f_mntfromname, O_RDONLY); if (ffd < 0) { warn("open(%s, O_RDONLY)", statfsbuf.f_mntfromname); + close(ffd); return (-1); } if (ioctl(ffd, DIOCGMEDIASIZE, &ms) < 0) { warn("ioctl(DIOCGMEDIASIZE)"); + close(ffd); return (-1); } + close(ffd); sb.st_size = ms; } else if (S_ISCHR(sb.st_mode)) { if (ioctl(cfp->fdr, DIOCGMEDIASIZE, &ms) < 0) { From owner-svn-src-all@freebsd.org Fri Jun 23 17:39:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4A18D860F2 for ; Fri, 23 Jun 2017 17:39:40 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8183A6A554 for ; Fri, 23 Jun 2017 17:39:40 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-vk0-x233.google.com with SMTP id r125so17267830vkf.1 for ; Fri, 23 Jun 2017 10:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=APSenA+f29J3C1epkOnv009qVhLMJ1SyT2mBV//+KFg=; b=sA+4thse15CbzRuVcuxU1mzg6dwmrCYUKok0CyHgzWbLljZq/JFksjewdCZAYa85WW pKUM9aGAjcGCwU0FXAelAHj9mArA7RJx7qxc8mG48vx+Z5kvuSsUslINyz8ID3qR/Pm4 v+pi+K1BjU0rTklKUNZov2JMJFWO05HGoFAJom8grfC6KQ6H8xFymLzkvb4zvLtNuJpH 8ZzeNhTAL8ugD6r6donkU90FTM6n9hYPW38pX8j8FbI5qRVTpA06X1k/JBdcoRn6QpXQ pw/SFIjx24qqcEtK/TBAeKqxQ/4YwwDwUg9CH0cowFyRVqVdmkgL7jR4woWw23HgTYJC ALhA== 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=APSenA+f29J3C1epkOnv009qVhLMJ1SyT2mBV//+KFg=; b=k13SRpcN7cO1HzgiWcYLyCWyxaqUSjOts+qaf0NUZie52KqpxhSwy7RW4ZksxCUZCX DiKmcECid5ag6iIdgGdcOFp/M+FERMOVUKiWxjhGP+77NE2SO1ioiRoXpwgUKg1RNNxd ctjAip7uSxhoqVlHXGe7+Es0PaOg9k2Ds+M8bZVJCFN5WUHs9o2GQHFslmVy+nmCGTyQ iD97awV32dxeMdi9grC0baI10Ma3x6+HOqbIsDAP3iBijzxGfTCUo/+hLjnNowWRmJtP 1RLaMQT0SiAx+e5J+35IrrTxXp8Mm92cId3eZNGjkdZNCG64lolt5BEZiK7mQLmubR4q cgZA== X-Gm-Message-State: AKS2vOyHRkau1qQdhW06WKrAMPqzv7KxWYtRb8nwNnrqHULbTWFNZCvd g5gEMuYGYFOhhmd4D15O2X2iaa6kpyKB X-Received: by 10.31.196.69 with SMTP id u66mr3353689vkf.47.1498239579357; Fri, 23 Jun 2017 10:39:39 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.176.16.76 with HTTP; Fri, 23 Jun 2017 10:39:38 -0700 (PDT) In-Reply-To: References: <201706170258.v5H2wWCT006080@repo.freebsd.org> From: Maxim Sobolev Date: Fri, 23 Jun 2017 10:39:38 -0700 X-Google-Sender-Auth: qT6z4SMbtKZ5NWriPC69TAv1W9k Message-ID: Subject: Re: svn commit: r320048 - head/usr.bin/mkuzip To: "Conrad E. Meyer" 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 17:39:40 -0000 Sorry overlooked that. Fixed, thanks! -Maxim On Thu, Jun 22, 2017 at 5:13 PM, Conrad Meyer wrote: > ffd is leaked in return paths. Coverity CID 1376420. > > On Fri, Jun 16, 2017 at 7:58 PM, Maxim Sobolev > wrote: > > Author: sobomax > > Date: Sat Jun 17 02:58:31 2017 > > New Revision: 320048 > > URL: https://svnweb.freebsd.org/changeset/base/320048 > > > > Log: > > o Move logic that determines size of the input image into its own > > file. That logic has grown quite significantly now; > > > > o add a special handling for the snapshot images. Those have some > > extra headers at the end of the image and we don't need those > > in the output image really. > > > > MFC after: 6 weeks > > > > ... > > Added: head/usr.bin/mkuzip/mkuz_insize.c > > ... > > +off_t > > +mkuz_get_insize(struct mkuz_cfg *cfp) > > +{ > > + int ffd; > > + off_t ms; > > + struct stat sb; > > + struct statfs statfsbuf; > > + > > + if (fstat(cfp->fdr, &sb) != 0) { > > + warn("fstat(%s)", cfp->iname); > > + return (-1); > > + } > > + if ((sb.st_flags & SF_SNAPSHOT) != 0) { > > + if (fstatfs(cfp->fdr, &statfsbuf) != 0) { > > + warn("fstatfs(%s)", cfp->iname); > > + return (-1); > > + } > > + ffd = open(statfsbuf.f_mntfromname, O_RDONLY); > > + if (ffd < 0) { > > + warn("open(%s, O_RDONLY)", > statfsbuf.f_mntfromname); > > + return (-1); > > + } > > + if (ioctl(ffd, DIOCGMEDIASIZE, &ms) < 0) { > > + warn("ioctl(DIOCGMEDIASIZE)"); > > + return (-1); > > ffd leaked here. > > > + } > > ffd also leaked here via fallthrough return. > > > + sb.st_size = ms; > > + } else if (S_ISCHR(sb.st_mode)) { > > + if (ioctl(cfp->fdr, DIOCGMEDIASIZE, &ms) < 0) { > > + warn("ioctl(DIOCGMEDIASIZE)"); > > + return (-1); > > + } > > + sb.st_size = ms; > > + } else if (!S_ISREG(sb.st_mode)) { > > + warnx("%s: not a character device or regular file\n", > > + cfp->iname); > > + return (-1); > > + } > > + return (sb.st_size); > > +} > > From owner-svn-src-all@freebsd.org Fri Jun 23 18:06:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23807D86901; Fri, 23 Jun 2017 18:06:23 +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 D96326E3DE; Fri, 23 Jun 2017 18:06:22 +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 v5NI6Mg3052234; Fri, 23 Jun 2017 18:06:22 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NI6KCZ052221; Fri, 23 Jun 2017 18:06:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706231806.v5NI6KCZ052221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 23 Jun 2017 18:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320278 - in head: . lib/libc/include lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:06:23 -0000 Author: imp Date: Fri Jun 23 18:06:20 2017 New Revision: 320278 URL: https://svnweb.freebsd.org/changeset/base/320278 Log: Forward compatibility for ino64. Add forward compatibility so that new binaries can run on old kernels. If the new system call from ino64 isn't available on your system, then the old one will be used and the results translated. The stat and statfs families of functions are fully emulated. While not required by policy, in this case it is helpful to our users to provide this compatibility. In this case, it allows rollback of the kernel after installing a new userland should a problem be discovered. It also prevents foot-shooting if a user does an install before rebooting with the new kernel. Finally, it allows the use case where one needs to run new binaries on an old kernel as part of an upgrade process. The getdirentries family uses tricks that may not work on remote filesystems. Specifically, it uses a buffer 1/4 the size requested to get the data from he old syscall. The code carefully uses direct syscalls for old system calls to avoid referencing freebsd11_* symbols, which contaminate ld-elf.so.1's export table due to its use of stat functions, which causes errno to be incorrect in client programs due to the wrong *stat* function being resolved in some cases. This code should removed sometime after 12 is branched. Tested on: 12-current binaries on a 10.3-beta kernel run and return consistent results. 12-current kernel and userland with packages from before ino64 was committed also work. Differential Revision: https://reviews.freebsd.org/D11185 Reviewed by: kib@, emaste@ Added: head/lib/libc/sys/compat-ino64.h (contents, props changed) head/lib/libc/sys/fstat.c - copied, changed from r320250, head/lib/libc/sys/stat.c head/lib/libc/sys/fstatat.c - copied, changed from r320250, head/lib/libc/sys/stat.c head/lib/libc/sys/fstatfs.c - copied, changed from r320250, head/lib/libc/sys/lstat.c head/lib/libc/sys/getdirentries.c (contents, props changed) head/lib/libc/sys/getfsstat.c - copied, changed from r320250, head/lib/libc/sys/lstat.c head/lib/libc/sys/statfs.c - copied, changed from r320250, head/lib/libc/sys/stat.c Modified: head/UPDATING head/lib/libc/include/libc_private.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/getdents.c head/lib/libc/sys/lstat.c head/lib/libc/sys/stat.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jun 23 17:39:00 2017 (r320277) +++ head/UPDATING Fri Jun 23 18:06:20 2017 (r320278) @@ -55,6 +55,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC if you require the GPL compiler. +20170619: + Forward compatibility for the "ino64" project have been committed. This + will allow most new binaries to run on older kernels in a limited + fashion. This prevents many of the common foot-shooting actions in the + upgrade as well as the limited ability to roll back the kernel across + the ino64 upgrade. Complicated use cases may not work properly, though + enough simpler ones work to allow recovery in most situations. + 20170618: The internal ABI used for communication between the NFS kernel modules was changed by r320085, so __FreeBSD_version was bumped to Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Fri Jun 23 17:39:00 2017 (r320277) +++ head/lib/libc/include/libc_private.h Fri Jun 23 18:06:20 2017 (r320278) @@ -311,6 +311,7 @@ struct rusage; struct sigaction; struct sockaddr; struct stat; +struct statfs; struct timespec; struct timeval; struct timezone; @@ -327,13 +328,16 @@ int __sys_clock_nanosleep(__clockid_t, int, const struct timespec *, struct timespec *); int __sys_close(int); int __sys_connect(int, const struct sockaddr *, __socklen_t); -__ssize_t __sys_getdirentries(int, char *, __size_t, __off_t *); int __sys_fcntl(int, int, ...); int __sys_fdatasync(int); +int __sys_fstat(int fd, struct stat *); +int __sys_fstatfs(int fd, struct statfs *); int __sys_fstatat(int, const char *, struct stat *, int); int __sys_fsync(int); __pid_t __sys_fork(void); int __sys_ftruncate(int, __off_t); +__ssize_t __sys_getdirentries(int, char *, __size_t, __off_t *); +int __sys_getfsstat(struct statfs *, long, int); int __sys_gettimeofday(struct timeval *, struct timezone *); int __sys_kevent(int, const struct kevent *, int, struct kevent *, int, const struct timespec *); @@ -372,6 +376,7 @@ int __sys_sigtimedwait(const __sigset_t *, struct __s const struct timespec *); int __sys_sigwait(const __sigset_t *, int *); int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *); +int __sys_statfs(const char *, struct statfs *); int __sys_swapcontext(struct __ucontext *, const struct __ucontext *); int __sys_thr_kill(long, int); Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri Jun 23 17:39:00 2017 (r320277) +++ head/lib/libc/sys/Makefile.inc Fri Jun 23 18:06:20 2017 (r320278) @@ -37,6 +37,14 @@ SRCS+= \ SRCS+= getdents.c lstat.c mknod.c stat.c +SRCS+= fstat.c fstatat.c fstatfs.c getfsstat.c statfs.c +NOASM+= fstat.o fstatat.o fstatfs.o getfsstat.o statfs.o +PSEUDO+= _fstat.o _fstatat.o _fstatfs.o _getfsstat.o _statfs.o + +SRCS+= getdirentries.c +NOASM+= getdirentries.o +PSEUDO+= _getdirentries.o + SRCS+= pipe.c INTERPOSED = \ Added: head/lib/libc/sys/compat-ino64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/compat-ino64.h Fri Jun 23 18:06:20 2017 (r320278) @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2017 M. Warner Losh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Forward compatibility shim to convert old stat buffer to + * new so we can call the old system call, but return data in + * the new system call's format. + */ +#define _WANT_FREEBSD11_STATFS +#include +#include + +#define _WANT_FREEBSD11_STAT +#include + +#include + +#define INO64_FIRST 1200031 + +static __inline void +__stat11_to_stat(const struct freebsd11_stat *sb11, struct stat *sb) +{ + + sb->st_dev = sb11->st_dev; + sb->st_ino = sb11->st_ino; + sb->st_nlink = sb11->st_nlink; + sb->st_mode = sb11->st_mode; + sb->st_uid = sb11->st_uid; + sb->st_gid = sb11->st_gid; + sb->st_rdev = sb11->st_rdev; + sb->st_atim = sb11->st_atim; + sb->st_mtim = sb11->st_mtim; + sb->st_ctim = sb11->st_ctim; +#ifdef __STAT_TIME_T_EXT + sb->st_atim_ext = 0; + sb->st_mtim_ext = 0; + sb->st_ctim_ext = 0; + sb->st_btim_ext = 0; +#endif + sb->st_birthtim = sb11->st_birthtim; + sb->st_size = sb11->st_size; + sb->st_blocks = sb11->st_blocks; + sb->st_blksize = sb11->st_blksize; + sb->st_flags = sb11->st_flags; + sb->st_gen = sb11->st_gen; + sb->st_padding0 = 0; + sb->st_padding1 = 0; + memset(sb->st_spare, 0, sizeof(sb->st_spare)); +} + +static __inline void +__statfs11_to_statfs(const struct freebsd11_statfs *sf11, struct statfs *sf) +{ + + sf->f_version = STATFS_VERSION; + sf->f_type = sf11->f_type; + sf->f_flags = sf11->f_flags; + sf->f_bsize = sf11->f_bsize; + sf->f_iosize = sf11->f_iosize; + sf->f_blocks = sf11->f_blocks; + sf->f_bfree = sf11->f_bfree; + sf->f_bavail = sf11->f_bavail; + sf->f_files = sf11->f_files; + sf->f_ffree = sf11->f_ffree; + sf->f_syncwrites = sf11->f_syncwrites; + sf->f_asyncwrites = sf11->f_asyncwrites; + sf->f_syncreads = sf11->f_syncreads; + sf->f_asyncreads = sf11->f_asyncreads; + sf->f_namemax = sf11->f_namemax; + sf->f_owner = sf11->f_owner; + sf->f_fsid = sf11->f_fsid; + memset(sf->f_spare, 0, sizeof(sf->f_spare)); + memset(sf->f_charspare, 0, sizeof(sf->f_charspare)); + strlcpy(sf->f_fstypename, sf11->f_fstypename, sizeof(sf->f_fstypename)); + strlcpy(sf->f_mntfromname, sf11->f_mntfromname, sizeof(sf->f_mntfromname)); + strlcpy(sf->f_mntonname, sf11->f_mntonname, sizeof(sf->f_mntonname)); +} Copied and modified: head/lib/libc/sys/fstat.c (from r320250, head/lib/libc/sys/stat.c) ============================================================================== --- head/lib/libc/sys/stat.c Thu Jun 22 22:53:10 2017 (r320250, copy source) +++ head/lib/libc/sys/fstat.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Gleb Kurtsou + * Copyright (c) 2017 M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,26 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" +#undef fstat +__weak_reference(_fstat, fstat); + +#pragma weak _fstat int -stat(const char *path, struct stat *sb) +_fstat(int fd, struct stat *sb) { + struct freebsd11_stat stat11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, 0)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_fstat(fd, sb)); + rv = syscall(SYS_freebsd11_fstat, fd, &stat11); + if (rv == 0) + __stat11_to_stat(&stat11, sb); + return (rv); } Copied and modified: head/lib/libc/sys/fstatat.c (from r320250, head/lib/libc/sys/stat.c) ============================================================================== --- head/lib/libc/sys/stat.c Thu Jun 22 22:53:10 2017 (r320250, copy source) +++ head/lib/libc/sys/fstatat.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Gleb Kurtsou + * Copyright (c) 2017 M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,22 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" int -stat(const char *path, struct stat *sb) +fstatat(int fd, const char *path, struct stat *sb, int flag) { + struct freebsd11_stat stat11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, 0)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_fstatat(fd, path, sb, flag)); + rv = syscall(SYS_freebsd11_fstatat, fd, path, &stat11, flag); + if (rv == 0) + __stat11_to_stat(&stat11, sb); + return (rv); } Copied and modified: head/lib/libc/sys/fstatfs.c (from r320250, head/lib/libc/sys/lstat.c) ============================================================================== --- head/lib/libc/sys/lstat.c Thu Jun 22 22:53:10 2017 (r320250, copy source) +++ head/lib/libc/sys/fstatfs.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Gleb Kurtsou + * Copyright (c) 2017 M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,26 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" +#undef fstatfs +__weak_reference(_fstatfs, fstatfs); + +#pragma weak _fstatfs int -lstat(const char *path, struct stat *sb) +_fstatfs(int fd, struct statfs *buf) { + struct freebsd11_statfs statfs11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_fstatfs(fd, buf)); + rv = syscall(SYS_freebsd11_fstatfs, fd, &statfs11); + if (rv == 0) + __statfs11_to_statfs(&statfs11, buf); + return (rv); } Modified: head/lib/libc/sys/getdents.c ============================================================================== --- head/lib/libc/sys/getdents.c Fri Jun 23 17:39:00 2017 (r320277) +++ head/lib/libc/sys/getdents.c Fri Jun 23 18:06:20 2017 (r320278) @@ -36,6 +36,11 @@ __FBSDID("$FreeBSD$"); ssize_t getdents(int fd, char *buf, size_t nbytes) { + /* + * _getdirentries knows how to call the right thing and + * return it in the new format. It assumes that the entire + * libc expecting the new format. + */ - return (__sys_getdirentries(fd, buf, nbytes, NULL)); + return (_getdirentries(fd, buf, nbytes, NULL)); } Added: head/lib/libc/sys/getdirentries.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/getdirentries.c Fri Jun 23 18:06:20 2017 (r320278) @@ -0,0 +1,117 @@ +/*- + * Copyright (c) 2017 M. Warner Losh + * 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$"); + +#define _WANT_FREEBSD11_DIRENT + +#include "namespace.h" +#include +#include +#include "compat-ino64.h" +#include +#include +#include +#include +#include +#include +#include +#include "libc_private.h" + +static ssize_t +__cvt_dirents_from11(const char *de11, ssize_t len11, char *de, ssize_t len) +{ + struct dirent *dst; + const struct freebsd11_dirent *src; + const char *edst, *esrc; + ssize_t rlen; + + src = (const struct freebsd11_dirent *)de11; + dst = (struct dirent *)de; + esrc = de11 + len11; + edst = de + len; + while ((const char *)src < esrc && (const char *)dst < edst) { + rlen = roundup(offsetof(struct dirent, d_name) + src->d_namlen + 1, 8); + if ((const char *)dst + rlen >= edst) + break; + dst->d_fileno = src->d_fileno; + dst->d_off = 0; /* nothing uses it yet, so safe for now */ + dst->d_reclen = rlen; + dst->d_type = src->d_type; + dst->d_pad0 = 0; + dst->d_namlen = src->d_namlen; + dst->d_pad1 = 0; + memset(dst->d_name, 0, roundup(src->d_namlen + 1, 8)); + memcpy(dst->d_name, src->d_name, src->d_namlen); + dst = (struct dirent *)((char *)dst + rlen); + src = (const struct freebsd11_dirent *)((const char *)src + src->d_reclen); + } + return ((char *)dst - de); +} + +#undef getdirentries +__weak_reference(_getdirentries, getdirentries); + +#pragma weak _getdirentries +ssize_t +_getdirentries(int fd, char *buf, size_t nbytes, off_t *basep) +{ + char *oldbuf; + size_t len; + ssize_t rv; + + if (__getosreldate() >= INO64_FIRST) + return (__sys_getdirentries(fd, buf, nbytes, basep)); + + /* + * Because the old system call returns entries that are smaller than the + * new, we could wind up in a situation where we have too many to fit in + * the buffer with the new encoding. So sacrifice a small bit of + * efficiency to ensure that never happens. We pick 1/4 the size round + * up to the next DIRBLKSIZ. This will guarnatee enough room exists in + * the dst buffer due to changes in efficiency in packing dirent + * entries. We don't check against minimum block size to avoid a lot of + * stat calls, we'll see if that's wise or not. + * TBD: Will this difference matter to lseek? + */ + len = roundup(nbytes / 4, DIRBLKSIZ); + oldbuf = malloc(len); + if (oldbuf == NULL) { + errno = EINVAL; /* ENOMEM not in possible list */ + return (-1); + } + rv = syscall(SYS_freebsd11_getdirentries, fd, oldbuf, len, basep); + if (rv == -1) { + free(oldbuf); + return (rv); + } + if (rv > 0) + rv = __cvt_dirents_from11(oldbuf, rv, buf, nbytes); + free(oldbuf); + + return (rv); +} Copied and modified: head/lib/libc/sys/getfsstat.c (from r320250, head/lib/libc/sys/lstat.c) ============================================================================== --- head/lib/libc/sys/lstat.c Thu Jun 22 22:53:10 2017 (r320250, copy source) +++ head/lib/libc/sys/getfsstat.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Gleb Kurtsou + * Copyright (c) 2017 M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,36 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include +#include "compat-ino64.h" +#include #include -#include +#include #include + #include "libc_private.h" int -lstat(const char *path, struct stat *sb) +getfsstat(struct statfs *buf, long bufsize, int flags) { + struct freebsd11_statfs *statfs11 = NULL; + ssize_t len = 0; + int rv, i; - return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_getfsstat(buf, bufsize, flags)); + if (buf != NULL) { + len = sizeof(struct freebsd11_statfs) * /* Round down on purpose to avoid */ + (bufsize / sizeof(struct statfs)); /* overflow on translation. */ + statfs11 = malloc(len); + if (statfs11 == NULL) { + errno = ENOMEM; + return (-1); + } + } + rv = syscall(SYS_freebsd11_getfsstat, statfs11, len, flags); + if (rv != -1 && buf != NULL) { + for (i = 0; i < rv; i++) + __statfs11_to_statfs(&statfs11[i], &buf[i]); + } + return (rv); } Modified: head/lib/libc/sys/lstat.c ============================================================================== --- head/lib/libc/sys/lstat.c Fri Jun 23 17:39:00 2017 (r320277) +++ head/lib/libc/sys/lstat.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2017 M. Warner Losh * Copyright (c) 2012 Gleb Kurtsou * All rights reserved. * @@ -29,15 +30,22 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" int lstat(const char *path, struct stat *sb) { + struct freebsd11_stat stat11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW)); + rv = syscall(SYS_freebsd11_lstat, path, &stat11); + if (rv == 0) + __stat11_to_stat(&stat11, sb); + return (rv); } Modified: head/lib/libc/sys/stat.c ============================================================================== --- head/lib/libc/sys/stat.c Fri Jun 23 17:39:00 2017 (r320277) +++ head/lib/libc/sys/stat.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2017 M. Warner Losh * Copyright (c) 2012 Gleb Kurtsou * All rights reserved. * @@ -29,15 +30,22 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" int stat(const char *path, struct stat *sb) { + struct freebsd11_stat stat11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, 0)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_fstatat(AT_FDCWD, path, sb, 0)); + rv = syscall(SYS_freebsd11_stat, path, &stat11); + if (rv == 0) + __stat11_to_stat(&stat11, sb); + return (rv); } Copied and modified: head/lib/libc/sys/statfs.c (from r320250, head/lib/libc/sys/stat.c) ============================================================================== --- head/lib/libc/sys/stat.c Thu Jun 22 22:53:10 2017 (r320250, copy source) +++ head/lib/libc/sys/statfs.c Fri Jun 23 18:06:20 2017 (r320278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Gleb Kurtsou + * Copyright (c) 2017 M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,22 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include -#include +#include "compat-ino64.h" #include + #include "libc_private.h" int -stat(const char *path, struct stat *sb) +statfs(const char *path, struct statfs *buf) { + struct freebsd11_statfs statfs11; + int rv; - return (__sys_fstatat(AT_FDCWD, path, sb, 0)); + if (__getosreldate() >= INO64_FIRST) + return (__sys_statfs(path, buf)); + rv = syscall(SYS_freebsd11_statfs, path, &statfs11); + if (rv == 0) + __statfs11_to_statfs(&statfs11, buf); + return (rv); } From owner-svn-src-all@freebsd.org Fri Jun 23 18:06:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A9A1D869B7; Fri, 23 Jun 2017 18:06:47 +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 370056E529; Fri, 23 Jun 2017 18:06:47 +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 v5NI6kdM052295; Fri, 23 Jun 2017 18:06:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NI6kh4052293; Fri, 23 Jun 2017 18:06:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706231806.v5NI6kh4052293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 23 Jun 2017 18:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320279 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:06:47 -0000 Author: imp Date: Fri Jun 23 18:06:46 2017 New Revision: 320279 URL: https://svnweb.freebsd.org/changeset/base/320279 Log: Decode FreeBSD 11 compat stat, fstat and lstat calls. Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Fri Jun 23 18:06:20 2017 (r320278) +++ head/usr.bin/truss/syscall.h Fri Jun 23 18:06:46 2017 (r320279) @@ -10,6 +10,7 @@ * BinString -- pointer to an array of chars, printed via strvisx(). * Ptr -- pointer to some unspecified structure. Just print as hex for now. * Stat -- a pointer to a stat buffer. Prints a couple fields. + * Stat11 -- a pointer to a freebsd 11 stat buffer. Prints a couple fields. * StatFs -- a pointer to a statfs buffer. Prints a few fields. * Ioctl -- an ioctl command. Woefully limited. * Quad -- a double-word value. e.g., lseek(int, offset_t, int) @@ -38,7 +39,7 @@ * $FreeBSD$ */ -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl, +enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Stat11, Ioctl, Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:20 2017 (r320278) +++ head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:46 2017 (r320279) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WANT_FREEBSD11_STAT #include #include #include @@ -215,6 +216,14 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, { .name = "flock", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Flockop, 1 } } }, + { .name = "compat11.fstat", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Stat11 | OUT, 1 } } }, + { .name = "compat11.lstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, + { .name = "compat11.stat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, + { .name = "compat11.stat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, @@ -1870,6 +1879,23 @@ print_arg(struct syscall_args *sc, unsigned long *args } case Stat: { struct stat st; + + if (get_struct(pid, (void *)args[sc->offset], &st, sizeof(st)) + != -1) { + char mode[12]; + + strmode(st.st_mode, mode); + fprintf(fp, + "{ mode=%s,inode=%ju,size=%jd,blksize=%ld }", mode, + (uintmax_t)st.st_ino, (intmax_t)st.st_size, + (long)st.st_blksize); + } else { + fprintf(fp, "0x%lx", args[sc->offset]); + } + break; + } + case Stat11: { + struct freebsd11_stat st; if (get_struct(pid, (void *)args[sc->offset], &st, sizeof(st)) != -1) { From owner-svn-src-all@freebsd.org Fri Jun 23 18:26:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40257D8704D; Fri, 23 Jun 2017 18:26:35 +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 06B896EF68; Fri, 23 Jun 2017 18:26:34 +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 v5NIQYba060694; Fri, 23 Jun 2017 18:26:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIQYrC060693; Fri, 23 Jun 2017 18:26:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231826.v5NIQYrC060693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320280 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:26:35 -0000 Author: bdrewery Date: Fri Jun 23 18:26:33 2017 New Revision: 320280 URL: https://svnweb.freebsd.org/changeset/base/320280 Log: packages: Allow stageworld/stagekernel to run with make jobs. The -B was originally added in projects/release-pkg r289381 as a copy of what 'make world' did at the time. The -B was removed from the 'installworld' call in 'world' in r303844 though. The staging of files is safe to run in parallel. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:06:46 2017 (r320279) +++ head/Makefile.inc1 Fri Jun 23 18:26:33 2017 (r320280) @@ -1539,8 +1539,8 @@ real-packages: stage-packages create-packages sign-pac stage-packages: .PHONY @mkdir -p ${REPODIR} ${WSTAGEDIR} ${KSTAGEDIR} ${_+_}@cd ${.CURDIR}; \ - ${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT -B stageworld ; \ - ${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT -B stagekernel + ${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT stageworld; \ + ${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT stagekernel create-packages: _pkgbootstrap .PHONY @mkdir -p ${REPODIR} From owner-svn-src-all@freebsd.org Fri Jun 23 18:26:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3618ED8709C; Fri, 23 Jun 2017 18:26:49 +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 070E56F03A; Fri, 23 Jun 2017 18:26:48 +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 v5NIQmvI060745; Fri, 23 Jun 2017 18:26:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIQmun060744; Fri, 23 Jun 2017 18:26:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231826.v5NIQmun060744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:26:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320281 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:26:49 -0000 Author: bdrewery Date: Fri Jun 23 18:26:47 2017 New Revision: 320281 URL: https://svnweb.freebsd.org/changeset/base/320281 Log: packages: Allow staging world/kernel in parallel. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:26:33 2017 (r320280) +++ head/Makefile.inc1 Fri Jun 23 18:26:47 2017 (r320281) @@ -1536,11 +1536,17 @@ package-pkg: .PHONY real-packages: stage-packages create-packages sign-packages .PHONY -stage-packages: .PHONY - @mkdir -p ${REPODIR} ${WSTAGEDIR} ${KSTAGEDIR} +stage-packages-world: .PHONY + @mkdir -p ${WSTAGEDIR} ${_+_}@cd ${.CURDIR}; \ - ${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT stageworld; \ + ${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT stageworld + +stage-packages-kernel: .PHONY + @mkdir -p ${KSTAGEDIR} + ${_+_}@cd ${.CURDIR}; \ ${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT stagekernel + +stage-packages: .PHONY stage-packages-world stage-packages-kernel create-packages: _pkgbootstrap .PHONY @mkdir -p ${REPODIR} From owner-svn-src-all@freebsd.org Fri Jun 23 18:26:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5953ED870B6; Fri, 23 Jun 2017 18:26:52 +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 279026F085; Fri, 23 Jun 2017 18:26:52 +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 v5NIQpj2060790; Fri, 23 Jun 2017 18:26:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIQp34060789; Fri, 23 Jun 2017 18:26:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231826.v5NIQp34060789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320282 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:26:52 -0000 Author: bdrewery Date: Fri Jun 23 18:26:51 2017 New Revision: 320282 URL: https://svnweb.freebsd.org/changeset/base/320282 Log: packages: Allow creating kernel/world packages in parallel. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:26:47 2017 (r320281) +++ head/Makefile.inc1 Fri Jun 23 18:26:51 2017 (r320282) @@ -1548,14 +1548,21 @@ stage-packages-kernel: .PHONY stage-packages: .PHONY stage-packages-world stage-packages-kernel -create-packages: _pkgbootstrap .PHONY +_repodir: .PHONY @mkdir -p ${REPODIR} + +create-packages-world: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ ${MAKE} DESTDIR=${WSTAGEDIR} \ - PKG_VERSION=${PKG_VERSION} create-world-packages ; \ + PKG_VERSION=${PKG_VERSION} create-world-packages + +create-packages-kernel: _pkgbootstrap _repodir .PHONY + ${_+_}@cd ${.CURDIR}; \ ${MAKE} DESTDIR=${KSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} DISTDIR=kernel \ create-kernel-packages + +create-packages: .PHONY create-packages-world create-packages-kernel create-world-packages: _pkgbootstrap .PHONY @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || : From owner-svn-src-all@freebsd.org Fri Jun 23 18:26:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B4CED87110; Fri, 23 Jun 2017 18:26:58 +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 17B666F133; Fri, 23 Jun 2017 18:26:58 +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 v5NIQvIg060883; Fri, 23 Jun 2017 18:26:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIQvYa060882; Fri, 23 Jun 2017 18:26:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231826.v5NIQvYa060882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320284 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:26:58 -0000 Author: bdrewery Date: Fri Jun 23 18:26:57 2017 New Revision: 320284 URL: https://svnweb.freebsd.org/changeset/base/320284 Log: packages: Parallelize individual kernel packaging. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:26:54 2017 (r320283) +++ head/Makefile.inc1 Fri Jun 23 18:26:57 2017 (r320284) @@ -1599,9 +1599,12 @@ create-world-package-${pkgname}: .PHONY -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} .endfor -create-kernel-packages: _pkgbootstrap .PHONY +create-kernel-packages: .PHONY +_default_flavor= -default .if exists(${KSTAGEDIR}/kernel.meta) .for flavor in "" -debug +create-kernel-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},} +create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY @cd ${KSTAGEDIR}/${DISTDIR} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} \ @@ -1631,6 +1634,8 @@ create-kernel-packages: _pkgbootstrap .PHONY .for _kernel in ${BUILDKERNELS:[2..-1]} .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta) .for flavor in "" -debug +create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},} +create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY @cd ${KSTAGEDIR}/kernel.${_kernel} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} \ From owner-svn-src-all@freebsd.org Fri Jun 23 18:27:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71B80D8713E; Fri, 23 Jun 2017 18:27:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B03B6F196; Fri, 23 Jun 2017 18:27:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NIR04v060933; Fri, 23 Jun 2017 18:27:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIR0I1060931; Fri, 23 Jun 2017 18:27:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231827.v5NIR0I1060931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320285 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:27:01 -0000 Author: bdrewery Date: Fri Jun 23 18:27:00 2017 New Revision: 320285 URL: https://svnweb.freebsd.org/changeset/base/320285 Log: Expose only the create-packages-* targets since they set needed DEST/DIRDIR. The other targets just fail confusingly otherwise. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Fri Jun 23 18:26:57 2017 (r320284) +++ head/Makefile Fri Jun 23 18:27:00 2017 (r320285) @@ -131,7 +131,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel bu build32 distribute32 install32 buildsoft distributesoft installsoft \ builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ - create-world-packages create-kernel-packages create-packages \ + create-packages-world create-packages-kernel create-packages \ packages installconfig real-packages sign-packages package-pkg \ print-dir test-system-compiler Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:26:57 2017 (r320284) +++ head/Makefile.inc1 Fri Jun 23 18:27:00 2017 (r320285) @@ -1553,12 +1553,14 @@ _repodir: .PHONY create-packages-world: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} DESTDIR=${WSTAGEDIR} \ + ${MAKE} -f Makefile.inc1 \ + DESTDIR=${WSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} create-world-packages create-packages-kernel: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} DESTDIR=${KSTAGEDIR} \ + ${MAKE} -f Makefile.inc1 \ + DESTDIR=${KSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} DISTDIR=kernel \ create-kernel-packages From owner-svn-src-all@freebsd.org Fri Jun 23 18:26:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E5ADD870E2; Fri, 23 Jun 2017 18:26:55 +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 1BFC16F0DD; Fri, 23 Jun 2017 18:26:55 +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 v5NIQsQb060836; Fri, 23 Jun 2017 18:26:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIQsN9060835; Fri, 23 Jun 2017 18:26:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231826.v5NIQsN9060835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320283 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:26:55 -0000 Author: bdrewery Date: Fri Jun 23 18:26:54 2017 New Revision: 320283 URL: https://svnweb.freebsd.org/changeset/base/320283 Log: packages: Allow actually building individual world packages in parallel. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:26:51 2017 (r320282) +++ head/Makefile.inc1 Fri Jun 23 18:26:54 2017 (r320283) @@ -1570,24 +1570,34 @@ create-world-packages: _pkgbootstrap .PHONY awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ ${WSTAGEDIR}/METALOG @for plist in ${WSTAGEDIR}/*.plist; do \ - plist=$${plist##*/} ; \ - pkgname=$${plist%.plist} ; \ - sh ${SRCDIR}/release/packages/generate-ucl.sh -o $${pkgname} \ - -s ${SRCDIR} -u ${WSTAGEDIR}/$${pkgname}.ucl ; \ - done - @for plist in ${WSTAGEDIR}/*.plist; do \ - plist=$${plist##*/} ; \ - pkgname=$${plist%.plist} ; \ - awk -F\" ' \ - /^name/ { printf("===> Creating %s-", $$2); next } \ - /^version/ { print $$2; next } \ - ' ${WSTAGEDIR}/$${pkgname}.ucl ; \ - ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ - create -M ${WSTAGEDIR}/$${pkgname}.ucl \ - -p ${WSTAGEDIR}/$${pkgname}.plist \ - -r ${WSTAGEDIR} \ - -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \ - done + plist=$${plist##*/} ; \ + pkgname=$${plist%.plist} ; \ + echo "_PKGS+= $${pkgname}" ; \ + done > ${WSTAGEDIR}/packages.mk + ${_+_}@cd ${.CURDIR}; \ + ${MAKE} -f Makefile.inc1 create-world-packages-jobs \ + .MAKE.JOB.PREFIX= + +.if make(create-world-packages-jobs) +.include "${WSTAGEDIR}/packages.mk" +.endif + +create-world-packages-jobs: .PHONY +.for pkgname in ${_PKGS} +create-world-packages-jobs: create-world-package-${pkgname} +create-world-package-${pkgname}: .PHONY + @sh ${SRCDIR}/release/packages/generate-ucl.sh -o ${pkgname} \ + -s ${SRCDIR} -u ${WSTAGEDIR}/${pkgname}.ucl + @awk -F\" ' \ + /^name/ { printf("===> Creating %s-", $$2); next } \ + /^version/ { print $$2; next } \ + ' ${WSTAGEDIR}/${pkgname}.ucl ; \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ + create -M ${WSTAGEDIR}/${pkgname}.ucl \ + -p ${WSTAGEDIR}/${pkgname}.plist \ + -r ${WSTAGEDIR} \ + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} +.endfor create-kernel-packages: _pkgbootstrap .PHONY .if exists(${KSTAGEDIR}/kernel.meta) From owner-svn-src-all@freebsd.org Fri Jun 23 18:27:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 591D0D87178; Fri, 23 Jun 2017 18:27:04 +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 240DA6F1FB; Fri, 23 Jun 2017 18:27:04 +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 v5NIR3QF060980; Fri, 23 Jun 2017 18:27:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIR3eL060979; Fri, 23 Jun 2017 18:27:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231827.v5NIR3eL060979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 18:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320286 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:27:04 -0000 Author: bdrewery Date: Fri Jun 23 18:27:03 2017 New Revision: 320286 URL: https://svnweb.freebsd.org/changeset/base/320286 Log: compiler-metadata: Properly handle cross-build OBJDIR. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:27:00 2017 (r320285) +++ head/Makefile.inc1 Fri Jun 23 18:27:03 2017 (r320286) @@ -882,7 +882,7 @@ _cross-tools: @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" - @rm -f ${.OBJDIR}/compiler-metadata.mk + @rm -f ${OBJTREE}${.CURDIR}/compiler-metadata.mk ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools _build-metadata: From owner-svn-src-all@freebsd.org Fri Jun 23 18:38:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A466D875C7; Fri, 23 Jun 2017 18:38:29 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE1B6FD97; Fri, 23 Jun 2017 18:38:28 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NIcS1W065028; Fri, 23 Jun 2017 18:38:28 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIcSoq065027; Fri, 23 Jun 2017 18:38:28 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201706231838.v5NIcSoq065027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 23 Jun 2017 18:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320287 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:38:29 -0000 Author: wblock (doc committer) Date: Fri Jun 23 18:38:27 2017 New Revision: 320287 URL: https://svnweb.freebsd.org/changeset/base/320287 Log: Remove redundant wording, minor edits for clarity. MFC after: 1 week Sponsored by: iXsystems Modified: head/lib/libc/sys/stat.2 Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Fri Jun 23 18:27:03 2017 (r320286) +++ head/lib/libc/sys/stat.2 Fri Jun 23 18:38:27 2017 (r320287) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd January 14, 2016 +.Dd June 23, 2017 .Dt STAT 2 .Os .Sh NAME @@ -62,7 +62,7 @@ The .Fn lstat system call is like .Fn stat -except in the case where the named file is a symbolic link, +except when the named file is a symbolic link, in which case .Fn lstat returns information about the link, @@ -82,7 +82,7 @@ system call is equivalent to .Fn stat and .Fn lstat -except in the case where the +except when the .Fa path specifies a relative path. In this case the status is retrieved from a file relative to @@ -92,7 +92,7 @@ instead of the current working directory. .Pp The values for the .Fa flag -are constructed by a bitwise-inclusive OR of flags from the following list, +are constructed by a bitwise-inclusive OR of flags from this list, defined in .In fcntl.h : .Bl -tag -width indent @@ -129,16 +129,16 @@ and into which information is placed concerning the fi .Pp The fields of .Vt "struct stat" -related to the file system are as follows: +related to the file system are: .Bl -tag -width ".Va st_nlink" .It Va st_dev -The numeric ID of the device containing the file. +Numeric ID of the device containing the file. .It Va st_ino The file's inode number. .It Va st_nlink -The number of hard links to the file. +Number of hard links to the file. .It Va st_flags -The flags enabled for the file. +Flags enabled for the file. See .Xr chflags 2 for the list of flags and their description. @@ -152,10 +152,10 @@ fields together identify the file uniquely within the .Pp The time-related fields of .Vt "struct stat" -are as follows: +are: .Bl -tag -width ".Va st_birthtim" .It Va st_atim -Time when file data last accessed. +Time when file data was last accessed. Changed by the .Xr mknod 2 , .Xr utimes 2 , @@ -164,7 +164,7 @@ and .Xr readv 2 system calls. .It Va st_mtim -Time when file data last modified. +Time when file data was last modified. Changed by the .Xr mkdir 2 , .Xr mkfifo 2 , @@ -199,7 +199,7 @@ system calls. Time when the inode was created. .El .Pp -The following time-related macros are defined for compatibility: +These time-related macros are defined for compatibility: .Bd -literal #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec @@ -216,35 +216,35 @@ The following time-related macros are defined for comp #endif .Ed .Pp -The size-related fields of the +Size-related fields of the .Vt "struct stat" -are as follows: +are: .Bl -tag -width ".Va st_blksize" .It Va st_size -The file size in bytes. +File size in bytes. .It Va st_blksize -The optimal I/O block size for the file. +Optimal I/O block size for the file. .It Va st_blocks -The actual number of blocks allocated for the file in 512-byte units. +Actual number of blocks allocated for the file in 512-byte units. As short symbolic links are stored in the inode, this number may be zero. .El .Pp The access-related fields of .Vt "struct stat" -are as follows: +are: .Bl -tag -width ".Va st_mode" .It Va st_uid -The user ID of the file's owner. +User ID of the file's owner. .It Va st_gid -The group ID of the file. +Group ID of the file. .It Va st_mode Status of the file (see below). .El .Pp The status information word .Fa st_mode -has the following bits: +has these bits: .Bd -literal #define S_IFMT 0170000 /* type of file mask */ #define S_IFIFO 0010000 /* named pipe (fifo) */ @@ -277,7 +277,7 @@ For a list of access modes, see .Xr access 2 and .Xr chmod 2 . -The following macros are available to test whether a +These macros are available to test whether a .Va st_mode value passed in the .Fa m From owner-svn-src-all@freebsd.org Fri Jun 23 18:41:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0104FD87784; Fri, 23 Jun 2017 18:41:51 +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 C378370010; Fri, 23 Jun 2017 18:41:50 +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 v5NIfn3G068108; Fri, 23 Jun 2017 18:41:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIfnII068091; Fri, 23 Jun 2017 18:41:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706231841.v5NIfnII068091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jun 2017 18:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320288 - head/sys/boot/i386/boot0 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:41:51 -0000 Author: emaste Date: Fri Jun 23 18:41:49 2017 New Revision: 320288 URL: https://svnweb.freebsd.org/changeset/base/320288 Log: Allow Clang's integrated assembler to assemble boot0 dim@ compared clang IAS-built and GNU as-built boot0 and found them equivalent. IAS encoded one instruction using two bytes where GNU as used three, and another instruction using three bytes where GNU as used two. The net result is equivalent and tested, so there is no need to force IAS off for boot0. Modified: head/sys/boot/i386/boot0/Makefile Modified: head/sys/boot/i386/boot0/Makefile ============================================================================== --- head/sys/boot/i386/boot0/Makefile Fri Jun 23 18:38:27 2017 (r320287) +++ head/sys/boot/i386/boot0/Makefile Fri Jun 23 18:41:49 2017 (r320288) @@ -78,6 +78,3 @@ CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \ LDFLAGS=${LDFLAGS_BIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.boot0.S= ${CLANG_NO_IAS} From owner-svn-src-all@freebsd.org Fri Jun 23 18:42:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6A4D877F9; Fri, 23 Jun 2017 18:42:48 +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 0C9C1702C7; Fri, 23 Jun 2017 18:42:47 +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 v5NIglGT068874; Fri, 23 Jun 2017 18:42:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIglbQ068873; Fri, 23 Jun 2017 18:42:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706231842.v5NIglbQ068873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 18:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320289 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:42:48 -0000 Author: gjb Date: Fri Jun 23 18:42:47 2017 New Revision: 320289 URL: https://svnweb.freebsd.org/changeset/base/320289 Log: Include WORLD_FLAGS in CHROOT_IMAKEFLAGS and CHROOT_DMAKEFLAGS, to allow passing '-jN' to the installworld and distributeworld targets. Submitted by: bdrewery Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Fri Jun 23 18:41:49 2017 (r320288) +++ head/release/release.sh Fri Jun 23 18:42:47 2017 (r320289) @@ -206,8 +206,8 @@ env_check() { CHROOT_MAKEENV="${CHROOT_MAKEENV} \ MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" - CHROOT_IMAKEFLAGS="${CONF_FILES}" - CHROOT_DMAKEFLAGS="${CONF_FILES}" + CHROOT_IMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}" + CHROOT_DMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} \ ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \ From owner-svn-src-all@freebsd.org Fri Jun 23 18:57:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF39D87AF7; Fri, 23 Jun 2017 18:57:58 +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 1AE1E70887; Fri, 23 Jun 2017 18:57:58 +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 v5NIvuI6072945; Fri, 23 Jun 2017 18:57:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIvuUU072944; Fri, 23 Jun 2017 18:57:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706231857.v5NIvuUU072944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Jun 2017 18:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320290 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:57:58 -0000 Author: kib Date: Fri Jun 23 18:57:56 2017 New Revision: 320290 URL: https://svnweb.freebsd.org/changeset/base/320290 Log: MFC r320038: Style. Approved by: re (gjb) Modified: stable/11/sys/kern/kern_event.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_event.c ============================================================================== --- stable/11/sys/kern/kern_event.c Fri Jun 23 18:42:47 2017 (r320289) +++ stable/11/sys/kern/kern_event.c Fri Jun 23 18:57:56 2017 (r320290) @@ -573,12 +573,13 @@ knote_fork(struct knlist *list, int pid) * interval timer support code. */ -#define NOTE_TIMER_PRECMASK (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ - NOTE_NSECONDS) +#define NOTE_TIMER_PRECMASK \ + (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t timer2sbintime(intptr_t data, int flags) { + int64_t secs; /* * Macros for converting to the fractional second portion of an @@ -597,27 +598,27 @@ timer2sbintime(intptr_t data, int flags) case NOTE_MSECONDS: /* FALLTHROUGH */ case 0: if (data >= 1000) { - int64_t secs = data / 1000; + secs = data / 1000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | MS_TO_SBT(data % 1000)); } - return MS_TO_SBT(data); + return (MS_TO_SBT(data)); case NOTE_USECONDS: if (data >= 1000000) { - int64_t secs = data / 1000000; + secs = data / 1000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | US_TO_SBT(data % 1000000)); } - return US_TO_SBT(data); + return (US_TO_SBT(data)); case NOTE_NSECONDS: if (data >= 1000000000) { - int64_t secs = data / 1000000000; + secs = data / 1000000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); From owner-svn-src-all@freebsd.org Fri Jun 23 18:58:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0DEFD87B74; Fri, 23 Jun 2017 18:58:29 +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 B2EEE709AD; Fri, 23 Jun 2017 18:58:29 +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 v5NIwScb073018; Fri, 23 Jun 2017 18:58:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIwS6f073015; Fri, 23 Jun 2017 18:58:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706231858.v5NIwS6f073015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jun 2017 18:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320291 - in head/usr.sbin/makefs: . msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:58:30 -0000 Author: emaste Date: Fri Jun 23 18:58:28 2017 New Revision: 320291 URL: https://svnweb.freebsd.org/changeset/base/320291 Log: makefs: add copies of NetBSD makefs msdos source files We do not treat makefs as contrib code. Import copies of makefs msdos files from NetBSD so that we can track our changes to these files. These are copied from NetBSD, with only a change to use __FBSDID and $FreeBSD$ instead of __KERNEL_RCSID and $NetBSD$. A copy of the original $NetBSD$ tag remains in each source file. These two files were missed in r320212. Also remove a stray blank line added in msdosfs_vfsops.c. Submitted by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Added: head/usr.sbin/makefs/msdos.c (contents, props changed) head/usr.sbin/makefs/msdos.h (contents, props changed) Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Added: head/usr.sbin/makefs/msdos.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/msdos.c Fri Jun 23 18:58:28 2017 (r320291) @@ -0,0 +1,272 @@ +/* $NetBSD: msdos.c,v 1.20 2017/04/14 15:40:35 christos Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(__RCSID) && !defined(__lint) +__FBSDID("$FreeBSD$"); +#endif /* !__lint */ + +#include + +#if !HAVE_NBTOOL_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "makefs.h" +#include "msdos.h" +#include "mkfs_msdos.h" + +static int msdos_populate_dir(const char *, struct denode *, fsnode *, + fsnode *, fsinfo_t *); + +struct msdos_options_ex { + struct msdos_options options; + bool utf8; +}; + +void +msdos_prep_opts(fsinfo_t *fsopts) +{ + struct msdos_options_ex *msdos_opt = ecalloc(1, sizeof(*msdos_opt)); + const option_t msdos_options[] = { +#define AOPT(_opt, _type, _name, _min, _desc) { \ + .letter = _opt, \ + .name = # _name, \ + .type = _min == -1 ? OPT_STRPTR : \ + (_min == -2 ? OPT_BOOL : \ + (sizeof(_type) == 1 ? OPT_INT8 : \ + (sizeof(_type) == 2 ? OPT_INT16 : \ + (sizeof(_type) == 4 ? OPT_INT32 : OPT_INT64)))), \ + .value = &msdos_opt->options._name, \ + .minimum = _min, \ + .maximum = sizeof(_type) == 1 ? 0xff : \ + (sizeof(_type) == 2 ? 0xffff : \ + (sizeof(_type) == 4 ? 0xffffffff : 0xffffffffffffffffLL)), \ + .desc = _desc, \ +}, +ALLOPTS +#undef AOPT + { 'U', "utf8", &msdos_opt->utf8, OPT_BOOL, + 0, 1, "Use UTF8 names" }, + { .name = NULL } + }; + + fsopts->fs_specific = msdos_opt; + fsopts->fs_options = copy_opts(msdos_options); +} + +void +msdos_cleanup_opts(fsinfo_t *fsopts) +{ + free(fsopts->fs_specific); + free(fsopts->fs_options); +} + +int +msdos_parse_opts(const char *option, fsinfo_t *fsopts) +{ + struct msdos_options *msdos_opt = fsopts->fs_specific; + option_t *msdos_options = fsopts->fs_options; + + int rv; + + assert(option != NULL); + assert(fsopts != NULL); + assert(msdos_opt != NULL); + + if (debug & DEBUG_FS_PARSE_OPTS) + printf("msdos_parse_opts: got `%s'\n", option); + + rv = set_option(msdos_options, option, NULL, 0); + if (rv == -1) + return rv; + + if (strcmp(msdos_options[rv].name, "volume_id") == 0) + msdos_opt->volume_id_set = 1; + else if (strcmp(msdos_options[rv].name, "media_descriptor") == 0) + msdos_opt->media_descriptor_set = 1; + else if (strcmp(msdos_options[rv].name, "hidden_sectors") == 0) + msdos_opt->hidden_sectors_set = 1; + + if (stampst.st_ino) { + msdos_opt->timestamp_set = 1; + msdos_opt->timestamp = stampst.st_mtime; + } + + return 1; +} + + +void +msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) +{ + struct msdos_options_ex *msdos_opt = fsopts->fs_specific; + struct vnode vp, rootvp; + struct timeval start; + struct msdosfsmount *pmp; + uint32_t flags; + + assert(image != NULL); + assert(dir != NULL); + assert(root != NULL); + assert(fsopts != NULL); + + fsopts->size = fsopts->maxsize; + msdos_opt->options.create_size = MAX(msdos_opt->options.create_size, + fsopts->offset + fsopts->size); + msdos_opt->options.offset = fsopts->offset; + if (msdos_opt->options.bytes_per_sector == 0) { + if (fsopts->sectorsize == -1) + fsopts->sectorsize = 512; + msdos_opt->options.bytes_per_sector = fsopts->sectorsize; + } else if (fsopts->sectorsize == -1) { + fsopts->sectorsize = msdos_opt->options.bytes_per_sector; + } else if (fsopts->sectorsize != msdos_opt->options.bytes_per_sector) { + err(1, "inconsistent sectorsize -S %u" + "!= -o bytes_per_sector %u", + fsopts->sectorsize, msdos_opt->options.bytes_per_sector); + } + + /* create image */ + printf("Creating `%s'\n", image); + TIMER_START(start); + if (mkfs_msdos(image, NULL, &msdos_opt->options) == -1) + return; + TIMER_RESULTS(start, "mkfs_msdos"); + + fsopts->fd = open(image, O_RDWR); + vp.fs = fsopts; + + flags = 0; + if (msdos_opt->utf8) + flags |= MSDOSFSMNT_UTF8; + + if ((pmp = msdosfs_mount(&vp, flags)) == NULL) + err(1, "msdosfs_mount"); + + if (msdosfs_root(pmp, &rootvp) != 0) + err(1, "msdosfs_root"); + + if (debug & DEBUG_FS_MAKEFS) + printf("msdos_makefs: image %s directory %s root %p\n", + image, dir, root); + + /* populate image */ + printf("Populating `%s'\n", image); + TIMER_START(start); + if (msdos_populate_dir(dir, VTODE(&rootvp), root, root, fsopts) == -1) + errx(1, "Image file `%s' not created.", image); + TIMER_RESULTS(start, "msdos_populate_dir"); + + if (debug & DEBUG_FS_MAKEFS) + putchar('\n'); + + /* ensure no outstanding buffers remain */ + if (debug & DEBUG_FS_MAKEFS) + bcleanup(); + + printf("Image `%s' complete\n", image); +} + +static int +msdos_populate_dir(const char *path, struct denode *dir, fsnode *root, + fsnode *parent, fsinfo_t *fsopts) +{ + fsnode *cur; + char pbuf[MAXPATHLEN]; + + assert(dir != NULL); + assert(root != NULL); + assert(fsopts != NULL); + + for (cur = root->next; cur != NULL; cur = cur->next) { + if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path, + cur->name) >= sizeof(pbuf)) { + warnx("path %s too long", pbuf); + return -1; + } + + if ((cur->inode->flags & FI_ALLOCATED) == 0) { + cur->inode->flags |= FI_ALLOCATED; + if (cur != root) { + fsopts->curinode++; + cur->inode->ino = fsopts->curinode; + cur->parent = parent; + } + } + + if (cur->inode->flags & FI_WRITTEN) { + continue; // hard link + } + cur->inode->flags |= FI_WRITTEN; + + if (cur->child) { + struct denode *de; + if ((de = msdosfs_mkdire(pbuf, dir, cur)) == NULL) { + warn("msdosfs_mkdire %s", pbuf); + return -1; + } + if (msdos_populate_dir(pbuf, de, cur->child, cur, + fsopts) == -1) { + warn("msdos_populate_dir %s", pbuf); + return -1; + } + continue; + } else if (!S_ISREG(cur->type)) { + warnx("skipping non-regular file %s/%s", cur->path, + cur->name); + continue; + } + if (msdosfs_mkfile(pbuf, dir, cur) == NULL) { + warn("msdosfs_mkfile %s", pbuf); + return -1; + } + } + return 0; +} Added: head/usr.sbin/makefs/msdos.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/msdos.h Fri Jun 23 18:58:28 2017 (r320291) @@ -0,0 +1,40 @@ +/* $FreeBSD$ */ +/* $NetBSD: msdos.h,v 1.3 2015/10/16 16:40:02 christos Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +struct vnode; +struct denode; + +struct msdosfsmount *msdosfs_mount(struct vnode *, int); +int msdosfs_root(struct msdosfsmount *, struct vnode *); + +struct denode *msdosfs_mkfile(const char *, struct denode *, fsnode *); +struct denode *msdosfs_mkdire(const char *, struct denode *, fsnode *); Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Fri Jun 23 18:57:56 2017 (r320290) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Fri Jun 23 18:58:28 2017 (r320291) @@ -1,4 +1,3 @@ - /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 TooLs GmbH. From owner-svn-src-all@freebsd.org Fri Jun 23 19:03:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 357F6D87D71; Fri, 23 Jun 2017 19:03:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06B7870DC1; Fri, 23 Jun 2017 19:03:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NJ3W3Z077295; Fri, 23 Jun 2017 19:03:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NJ3WEF077294; Fri, 23 Jun 2017 19:03:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231903.v5NJ3WEF077294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 19:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320292 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 19:03:33 -0000 Author: bdrewery Date: Fri Jun 23 19:03:31 2017 New Revision: 320292 URL: https://svnweb.freebsd.org/changeset/base/320292 Log: NO_ROOT: Remove excessive // when DESTDIR/DISTDIR are empty. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 23 18:58:28 2017 (r320291) +++ head/Makefile.inc1 Fri Jun 23 19:03:31 2017 (r320292) @@ -718,6 +718,7 @@ _INSTALL_DDIR= ${DESTDIR}/${DISTDIR} INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} .if defined(NO_ROOT) METALOG?= ${DESTDIR}/${DISTDIR}/METALOG +METALOG:= ${METALOG:C,//+,/,g} IMAKE+= -DNO_ROOT METALOG=${METALOG} INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR} MTREEFLAGS+= -W From owner-svn-src-all@freebsd.org Fri Jun 23 19:04:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A895D87E19; Fri, 23 Jun 2017 19:04:42 +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 D93AA70FD4; Fri, 23 Jun 2017 19:04:41 +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 v5NJ4fmi077407; Fri, 23 Jun 2017 19:04:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NJ4fBM077406; Fri, 23 Jun 2017 19:04:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706231904.v5NJ4fBM077406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Jun 2017 19:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320293 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 19:04:42 -0000 Author: kib Date: Fri Jun 23 19:04:40 2017 New Revision: 320293 URL: https://svnweb.freebsd.org/changeset/base/320293 Log: MFC r320038: Style. Modified: stable/10/sys/kern/kern_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_event.c ============================================================================== --- stable/10/sys/kern/kern_event.c Fri Jun 23 19:03:31 2017 (r320292) +++ stable/10/sys/kern/kern_event.c Fri Jun 23 19:04:40 2017 (r320293) @@ -553,12 +553,13 @@ knote_fork(struct knlist *list, int pid) * interval timer support code. */ -#define NOTE_TIMER_PRECMASK (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ - NOTE_NSECONDS) +#define NOTE_TIMER_PRECMASK \ + (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t timer2sbintime(intptr_t data, int flags) { + int64_t secs; /* * Macros for converting to the fractional second portion of an @@ -577,27 +578,27 @@ timer2sbintime(intptr_t data, int flags) case NOTE_MSECONDS: /* FALLTHROUGH */ case 0: if (data >= 1000) { - int64_t secs = data / 1000; + secs = data / 1000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | MS_TO_SBT(data % 1000)); } - return MS_TO_SBT(data); + return (MS_TO_SBT(data)); case NOTE_USECONDS: if (data >= 1000000) { - int64_t secs = data / 1000000; + secs = data / 1000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | US_TO_SBT(data % 1000000)); } - return US_TO_SBT(data); + return (US_TO_SBT(data)); case NOTE_NSECONDS: if (data >= 1000000000) { - int64_t secs = data / 1000000000; + secs = data / 1000000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); From owner-svn-src-all@freebsd.org Fri Jun 23 19:44:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E575CD8881C; Fri, 23 Jun 2017 19:44:21 +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 AD63471DDD; Fri, 23 Jun 2017 19:44:21 +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 v5NJiK9v093876; Fri, 23 Jun 2017 19:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NJiKTn093872; Fri, 23 Jun 2017 19:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231944.v5NJiKTn093872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 19:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320294 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 19:44:22 -0000 Author: bdrewery Date: Fri Jun 23 19:44:20 2017 New Revision: 320294 URL: https://svnweb.freebsd.org/changeset/base/320294 Log: MFC r320012,r320028,r320061,r320118: r320012: Fix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd. r320028: Fix more incorrect library directories fix 'stale .depend' rebuilds. r320061: Fix Makefiles which override LIBDIR to not add incorrect dependencies into .depend. r320118: Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. Approved by: re (gjb) Modified: stable/11/share/mk/bsd.libnames.mk stable/11/share/mk/bsd.own.mk stable/11/share/mk/local.sys.mk stable/11/share/mk/src.libnames.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.libnames.mk ============================================================================== --- stable/11/share/mk/bsd.libnames.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/bsd.libnames.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -12,161 +12,161 @@ # Src directory locations are also defined in src.libnames.mk. -LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o +LIBCRT0?= ${DESTDIR}${LIBDIR_BASE}/crt0.o -LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a -LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a -LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a -LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a -LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a -LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a -LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a -LIBBEGEMOT?= ${DESTDIR}${LIBDIR}/libbegemot.a -LIBBLACKLIST?= ${DESTDIR}${LIBDIR}/libblacklist.a -LIBBLUETOOTH?= ${DESTDIR}${LIBDIR}/libbluetooth.a -LIBBSDXML?= ${DESTDIR}${LIBDIR}/libbsdxml.a -LIBBSM?= ${DESTDIR}${LIBDIR}/libbsm.a -LIBBSNMP?= ${DESTDIR}${LIBDIR}/libbsnmp.a -LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a -LIBC?= ${DESTDIR}${LIBDIR}/libc.a -LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a -LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a -LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a -LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a -LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a -LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR}/libcap_random.a -LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR}/libcap_sysctl.a -LIBCASPER?= ${DESTDIR}${LIBDIR}/libcasper.a -LIBCOMPAT?= ${DESTDIR}${LIBDIR}/libcompat.a -LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a -LIBCOM_ERR?= ${DESTDIR}${LIBDIR}/libcom_err.a -LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libc++.a -LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt.a -LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a -LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a -LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a -LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a -LIBCXGB4?= ${DESTDIR}${LIBDIR}/libcxgb4.a -LIBCXXRT?= ${DESTDIR}${LIBDIR}/libcxxrt.a -LIBC_PIC?= ${DESTDIR}${LIBDIR}/libc_pic.a -LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a -LIBDEVDCTL?= ${DESTDIR}${LIBDIR}/libdevdctl.a -LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a -LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a -LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a -LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a -LIBDPV?= ${DESTDIR}${LIBDIR}/libdpv.a -LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a -LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a -LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a -LIBEFIVAR?= ${DESTDIR}${LIBDIR}/libefivar.a -LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a -LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a -LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a -LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a +LIB80211?= ${DESTDIR}${LIBDIR_BASE}/lib80211.a +LIBALIAS?= ${DESTDIR}${LIBDIR_BASE}/libalias.a +LIBARCHIVE?= ${DESTDIR}${LIBDIR_BASE}/libarchive.a +LIBASN1?= ${DESTDIR}${LIBDIR_BASE}/libasn1.a +LIBATM?= ${DESTDIR}${LIBDIR_BASE}/libatm.a +LIBAUDITD?= ${DESTDIR}${LIBDIR_BASE}/libauditd.a +LIBAVL?= ${DESTDIR}${LIBDIR_BASE}/libavl.a +LIBBEGEMOT?= ${DESTDIR}${LIBDIR_BASE}/libbegemot.a +LIBBLACKLIST?= ${DESTDIR}${LIBDIR_BASE}/libblacklist.a +LIBBLUETOOTH?= ${DESTDIR}${LIBDIR_BASE}/libbluetooth.a +LIBBSDXML?= ${DESTDIR}${LIBDIR_BASE}/libbsdxml.a +LIBBSM?= ${DESTDIR}${LIBDIR_BASE}/libbsm.a +LIBBSNMP?= ${DESTDIR}${LIBDIR_BASE}/libbsnmp.a +LIBBZ2?= ${DESTDIR}${LIBDIR_BASE}/libbz2.a +LIBC?= ${DESTDIR}${LIBDIR_BASE}/libc.a +LIBCALENDAR?= ${DESTDIR}${LIBDIR_BASE}/libcalendar.a +LIBCAM?= ${DESTDIR}${LIBDIR_BASE}/libcam.a +LIBCAP_DNS?= ${DESTDIR}${LIBDIR_BASE}/libcap_dns.a +LIBCAP_GRP?= ${DESTDIR}${LIBDIR_BASE}/libcap_grp.a +LIBCAP_PWD?= ${DESTDIR}${LIBDIR_BASE}/libcap_pwd.a +LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR_BASE}/libcap_random.a +LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR_BASE}/libcap_sysctl.a +LIBCASPER?= ${DESTDIR}${LIBDIR_BASE}/libcasper.a +LIBCOMPAT?= ${DESTDIR}${LIBDIR_BASE}/libcompat.a +LIBCOMPILER_RT?=${DESTDIR}${LIBDIR_BASE}/libcompiler_rt.a +LIBCOM_ERR?= ${DESTDIR}${LIBDIR_BASE}/libcom_err.a +LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libc++.a +LIBCRYPT?= ${DESTDIR}${LIBDIR_BASE}/libcrypt.a +LIBCRYPTO?= ${DESTDIR}${LIBDIR_BASE}/libcrypto.a +LIBCTF?= ${DESTDIR}${LIBDIR_BASE}/libctf.a +LIBCURSES?= ${DESTDIR}${LIBDIR_BASE}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR_BASE}/libcuse.a +LIBCXGB4?= ${DESTDIR}${LIBDIR_BASE}/libcxgb4.a +LIBCXXRT?= ${DESTDIR}${LIBDIR_BASE}/libcxxrt.a +LIBC_PIC?= ${DESTDIR}${LIBDIR_BASE}/libc_pic.a +LIBDEVCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevctl.a +LIBDEVDCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevdctl.a +LIBDEVINFO?= ${DESTDIR}${LIBDIR_BASE}/libdevinfo.a +LIBDEVSTAT?= ${DESTDIR}${LIBDIR_BASE}/libdevstat.a +LIBDIALOG?= ${DESTDIR}${LIBDIR_BASE}/libdialog.a +LIBDNS?= ${DESTDIR}${LIBDIR_BASE}/libdns.a +LIBDPV?= ${DESTDIR}${LIBDIR_BASE}/libdpv.a +LIBDTRACE?= ${DESTDIR}${LIBDIR_BASE}/libdtrace.a +LIBDWARF?= ${DESTDIR}${LIBDIR_BASE}/libdwarf.a +LIBEDIT?= ${DESTDIR}${LIBDIR_BASE}/libedit.a +LIBEFIVAR?= ${DESTDIR}${LIBDIR_BASE}/libefivar.a +LIBELF?= ${DESTDIR}${LIBDIR_BASE}/libelf.a +LIBEXECINFO?= ${DESTDIR}${LIBDIR_BASE}/libexecinfo.a +LIBFETCH?= ${DESTDIR}${LIBDIR_BASE}/libfetch.a +LIBFIGPAR?= ${DESTDIR}${LIBDIR_BASE}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" -LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a -LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a -LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a -LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a -LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a -LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a -LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR}/libgssapi_krb5.a -LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a -LIBHEIMBASE?= ${DESTDIR}${LIBDIR}/libheimbase.a -LIBHEIMNTLM?= ${DESTDIR}${LIBDIR}/libheimntlm.a -LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR}/libheimsqlite.a -LIBHX509?= ${DESTDIR}${LIBDIR}/libhx509.a -LIBIBCM?= ${DESTDIR}${LIBDIR}/libibcm.a -LIBIBCOMMON?= ${DESTDIR}${LIBDIR}/libibcommon.a -LIBIBMAD?= ${DESTDIR}${LIBDIR}/libibmad.a -LIBIBSDP?= ${DESTDIR}${LIBDIR}/libibsdp.a -LIBIBUMAD?= ${DESTDIR}${LIBDIR}/libibumad.a -LIBIBVERBS?= ${DESTDIR}${LIBDIR}/libibverbs.a -LIBIPSEC?= ${DESTDIR}${LIBDIR}/libipsec.a -LIBJAIL?= ${DESTDIR}${LIBDIR}/libjail.a -LIBKADM5CLNT?= ${DESTDIR}${LIBDIR}/libkadm5clnt.a -LIBKADM5SRV?= ${DESTDIR}${LIBDIR}/libkadm5srv.a -LIBKAFS5?= ${DESTDIR}${LIBDIR}/libkafs5.a -LIBKDC?= ${DESTDIR}${LIBDIR}/libkdc.a -LIBKEYCAP?= ${DESTDIR}${LIBDIR}/libkeycap.a -LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a -LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a -LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a -LIBL?= ${DESTDIR}${LIBDIR}/libl.a +LIBFORM?= ${DESTDIR}${LIBDIR_BASE}/libform.a +LIBG2C?= ${DESTDIR}${LIBDIR_BASE}/libg2c.a +LIBGEOM?= ${DESTDIR}${LIBDIR_BASE}/libgeom.a +LIBGNUREGEX?= ${DESTDIR}${LIBDIR_BASE}/libgnuregex.a +LIBGPIO?= ${DESTDIR}${LIBDIR_BASE}/libgpio.a +LIBGSSAPI?= ${DESTDIR}${LIBDIR_BASE}/libgssapi.a +LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a +LIBHDB?= ${DESTDIR}${LIBDIR_BASE}/libhdb.a +LIBHEIMBASE?= ${DESTDIR}${LIBDIR_BASE}/libheimbase.a +LIBHEIMNTLM?= ${DESTDIR}${LIBDIR_BASE}/libheimntlm.a +LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR_BASE}/libheimsqlite.a +LIBHX509?= ${DESTDIR}${LIBDIR_BASE}/libhx509.a +LIBIBCM?= ${DESTDIR}${LIBDIR_BASE}/libibcm.a +LIBIBCOMMON?= ${DESTDIR}${LIBDIR_BASE}/libibcommon.a +LIBIBMAD?= ${DESTDIR}${LIBDIR_BASE}/libibmad.a +LIBIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libibsdp.a +LIBIBUMAD?= ${DESTDIR}${LIBDIR_BASE}/libibumad.a +LIBIBVERBS?= ${DESTDIR}${LIBDIR_BASE}/libibverbs.a +LIBIPSEC?= ${DESTDIR}${LIBDIR_BASE}/libipsec.a +LIBJAIL?= ${DESTDIR}${LIBDIR_BASE}/libjail.a +LIBKADM5CLNT?= ${DESTDIR}${LIBDIR_BASE}/libkadm5clnt.a +LIBKADM5SRV?= ${DESTDIR}${LIBDIR_BASE}/libkadm5srv.a +LIBKAFS5?= ${DESTDIR}${LIBDIR_BASE}/libkafs5.a +LIBKDC?= ${DESTDIR}${LIBDIR_BASE}/libkdc.a +LIBKEYCAP?= ${DESTDIR}${LIBDIR_BASE}/libkeycap.a +LIBKICONV?= ${DESTDIR}${LIBDIR_BASE}/libkiconv.a +LIBKRB5?= ${DESTDIR}${LIBDIR_BASE}/libkrb5.a +LIBKVM?= ${DESTDIR}${LIBDIR_BASE}/libkvm.a +LIBL?= ${DESTDIR}${LIBDIR_BASE}/libl.a LIBLN?= "don't use LIBLN, use LIBL" -LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a -LIBM?= ${DESTDIR}${LIBDIR}/libm.a -LIBMAGIC?= ${DESTDIR}${LIBDIR}/libmagic.a -LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a -LIBMEMSTAT?= ${DESTDIR}${LIBDIR}/libmemstat.a -LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a -LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a -LIBMLX4?= ${DESTDIR}${LIBDIR}/libmlx4.a -LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a -LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a -LIBMTHCA?= ${DESTDIR}${LIBDIR}/libmthca.a -LIBNANDFS?= ${DESTDIR}${LIBDIR}/libnandfs.a -LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a -LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a -LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a -LIBNGATM?= ${DESTDIR}${LIBDIR}/libngatm.a -LIBNV?= ${DESTDIR}${LIBDIR}/libnv.a -LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpair.a -LIBOPENSM?= ${DESTDIR}${LIBDIR}/libopensm.a -LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a -LIBOSMCOMP?= ${DESTDIR}${LIBDIR}/libosmcomp.a -LIBOSMVENDOR?= ${DESTDIR}${LIBDIR}/libosmvendor.a -LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a -LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a -LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a -LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a -LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a -LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a -LIBPROC?= ${DESTDIR}${LIBDIR}/libproc.a -LIBPROCSTAT?= ${DESTDIR}${LIBDIR}/libprocstat.a -LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a -LIBRADIUS?= ${DESTDIR}${LIBDIR}/libradius.a -LIBRDMACM?= ${DESTDIR}${LIBDIR}/librdmacm.a -LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a -LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR}/librpcsec_gss.a -LIBRPCSVC?= ${DESTDIR}${LIBDIR}/librpcsvc.a -LIBRT?= ${DESTDIR}${LIBDIR}/librt.a -LIBRTLD_DB?= ${DESTDIR}${LIBDIR}/librtld_db.a -LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a -LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a -LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a -LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a -LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a -LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a -LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a -LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a -LIBSYSDECODE?= ${DESTDIR}${LIBDIR}/libsysdecode.a -LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a -LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a -LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a +LIBLZMA?= ${DESTDIR}${LIBDIR_BASE}/liblzma.a +LIBM?= ${DESTDIR}${LIBDIR_BASE}/libm.a +LIBMAGIC?= ${DESTDIR}${LIBDIR_BASE}/libmagic.a +LIBMD?= ${DESTDIR}${LIBDIR_BASE}/libmd.a +LIBMEMSTAT?= ${DESTDIR}${LIBDIR_BASE}/libmemstat.a +LIBMENU?= ${DESTDIR}${LIBDIR_BASE}/libmenu.a +LIBMILTER?= ${DESTDIR}${LIBDIR_BASE}/libmilter.a +LIBMLX4?= ${DESTDIR}${LIBDIR_BASE}/libmlx4.a +LIBMP?= ${DESTDIR}${LIBDIR_BASE}/libmp.a +LIBMT?= ${DESTDIR}${LIBDIR_BASE}/libmt.a +LIBMTHCA?= ${DESTDIR}${LIBDIR_BASE}/libmthca.a +LIBNANDFS?= ${DESTDIR}${LIBDIR_BASE}/libnandfs.a +LIBNCURSES?= ${DESTDIR}${LIBDIR_BASE}/libncurses.a +LIBNCURSESW?= ${DESTDIR}${LIBDIR_BASE}/libncursesw.a +LIBNETGRAPH?= ${DESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNGATM?= ${DESTDIR}${LIBDIR_BASE}/libngatm.a +LIBNV?= ${DESTDIR}${LIBDIR_BASE}/libnv.a +LIBNVPAIR?= ${DESTDIR}${LIBDIR_BASE}/libnvpair.a +LIBOPENSM?= ${DESTDIR}${LIBDIR_BASE}/libopensm.a +LIBOPIE?= ${DESTDIR}${LIBDIR_BASE}/libopie.a +LIBOSMCOMP?= ${DESTDIR}${LIBDIR_BASE}/libosmcomp.a +LIBOSMVENDOR?= ${DESTDIR}${LIBDIR_BASE}/libosmvendor.a +LIBPAM?= ${DESTDIR}${LIBDIR_BASE}/libpam.a +LIBPANEL?= ${DESTDIR}${LIBDIR_BASE}/libpanel.a +LIBPANELW?= ${DESTDIR}${LIBDIR_BASE}/libpanelw.a +LIBPCAP?= ${DESTDIR}${LIBDIR_BASE}/libpcap.a +LIBPJDLOG?= ${DESTDIR}${LIBDIR_BASE}/libpjdlog.a +LIBPMC?= ${DESTDIR}${LIBDIR_BASE}/libpmc.a +LIBPROC?= ${DESTDIR}${LIBDIR_BASE}/libproc.a +LIBPROCSTAT?= ${DESTDIR}${LIBDIR_BASE}/libprocstat.a +LIBPTHREAD?= ${DESTDIR}${LIBDIR_BASE}/libpthread.a +LIBRADIUS?= ${DESTDIR}${LIBDIR_BASE}/libradius.a +LIBRDMACM?= ${DESTDIR}${LIBDIR_BASE}/librdmacm.a +LIBROKEN?= ${DESTDIR}${LIBDIR_BASE}/libroken.a +LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR_BASE}/librpcsec_gss.a +LIBRPCSVC?= ${DESTDIR}${LIBDIR_BASE}/librpcsvc.a +LIBRT?= ${DESTDIR}${LIBDIR_BASE}/librt.a +LIBRTLD_DB?= ${DESTDIR}${LIBDIR_BASE}/librtld_db.a +LIBSBUF?= ${DESTDIR}${LIBDIR_BASE}/libsbuf.a +LIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libsdp.a +LIBSMB?= ${DESTDIR}${LIBDIR_BASE}/libsmb.a +LIBSSL?= ${DESTDIR}${LIBDIR_BASE}/libssl.a +LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTAND?= ${DESTDIR}${LIBDIR_BASE}/libstand.a +LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libstdc++.a +LIBSTDTHREADS?= ${DESTDIR}${LIBDIR_BASE}/libstdthreads.a +LIBSYSDECODE?= ${DESTDIR}${LIBDIR_BASE}/libsysdecode.a +LIBTACPLUS?= ${DESTDIR}${LIBDIR_BASE}/libtacplus.a +LIBTERMCAP?= ${DESTDIR}${LIBDIR_BASE}/libtermcap.a +LIBTERMCAPW?= ${DESTDIR}${LIBDIR_BASE}/libtermcapw.a LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES" -LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a -LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a -LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a -LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a -LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a -LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a -LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a -LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a -LIBVGL?= ${DESTDIR}${LIBDIR}/libvgl.a -LIBVMMAPI?= ${DESTDIR}${LIBDIR}/libvmmapi.a -LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a -LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a -LIBXO?= ${DESTDIR}${LIBDIR}/libxo.a -LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a -LIBY?= ${DESTDIR}${LIBDIR}/liby.a -LIBYPCLNT?= ${DESTDIR}${LIBDIR}/libypclnt.a -LIBZ?= ${DESTDIR}${LIBDIR}/libz.a -LIBZFS?= ${DESTDIR}${LIBDIR}/libzfs.a -LIBZFS_CORE?= ${DESTDIR}${LIBDIR}/libzfs_core.a -LIBZPOOL?= ${DESTDIR}${LIBDIR}/libzpool.a +LIBUFS?= ${DESTDIR}${LIBDIR_BASE}/libufs.a +LIBUGIDFW?= ${DESTDIR}${LIBDIR_BASE}/libugidfw.a +LIBULOG?= ${DESTDIR}${LIBDIR_BASE}/libulog.a +LIBUMEM?= ${DESTDIR}${LIBDIR_BASE}/libumem.a +LIBUSB?= ${DESTDIR}${LIBDIR_BASE}/libusb.a +LIBUSBHID?= ${DESTDIR}${LIBDIR_BASE}/libusbhid.a +LIBUTIL?= ${DESTDIR}${LIBDIR_BASE}/libutil.a +LIBUUTIL?= ${DESTDIR}${LIBDIR_BASE}/libuutil.a +LIBVGL?= ${DESTDIR}${LIBDIR_BASE}/libvgl.a +LIBVMMAPI?= ${DESTDIR}${LIBDIR_BASE}/libvmmapi.a +LIBWIND?= ${DESTDIR}${LIBDIR_BASE}/libwind.a +LIBWRAP?= ${DESTDIR}${LIBDIR_BASE}/libwrap.a +LIBXO?= ${DESTDIR}${LIBDIR_BASE}/libxo.a +LIBXPG4?= ${DESTDIR}${LIBDIR_BASE}/libxpg4.a +LIBY?= ${DESTDIR}${LIBDIR_BASE}/liby.a +LIBYPCLNT?= ${DESTDIR}${LIBDIR_BASE}/libypclnt.a +LIBZ?= ${DESTDIR}${LIBDIR_BASE}/libz.a +LIBZFS?= ${DESTDIR}${LIBDIR_BASE}/libzfs.a +LIBZFS_CORE?= ${DESTDIR}${LIBDIR_BASE}/libzfs_core.a +LIBZPOOL?= ${DESTDIR}${LIBDIR_BASE}/libzpool.a # enforce the 2 -lpthread and -lc to always be the last in that exact order .if defined(LDADD) @@ -183,7 +183,7 @@ LDADD:= ${LDADD:N-lc} -lc .if defined(_LIBRARIES) && defined(LIB) && \ ${_LIBRARIES:M${LIB}} != "" .if !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR_BASE}/lib${LIB}.a .endif .endif Modified: stable/11/share/mk/bsd.own.mk ============================================================================== --- stable/11/share/mk/bsd.own.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/bsd.own.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -152,7 +152,13 @@ DTBOWN?= root DTBGRP?= wheel DTBMODE?= 444 -LIBDIR?= /usr/lib +# Use make.conf / environment LIBDIR as default if set... +.if !empty(_PREMK_LIBDIR) +LIBDIR_BASE?= ${_PREMK_LIBDIR} +.endif +# otherwise use our expected default value. +LIBDIR_BASE?= /usr/lib +LIBDIR?= ${LIBDIR_BASE} LIBCOMPATDIR?= /usr/lib/compat LIBDATADIR?= /usr/libdata LIBEXECDIR?= /usr/libexec Modified: stable/11/share/mk/local.sys.mk ============================================================================== --- stable/11/share/mk/local.sys.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/local.sys.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -39,6 +39,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} .endif +.if !empty(LIBDIR) +_PREMK_LIBDIR:= ${LIBDIR} +.endif + .include "src.sys.mk" .if ${.MAKE.MODE:Mmeta*} != "" Modified: stable/11/share/mk/src.libnames.mk ============================================================================== --- stable/11/share/mk/src.libnames.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/src.libnames.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -339,13 +339,13 @@ _DP_rdmacm= ibverbs # Define special cases LDADD_supcplusplus= -lsupc++ -LIBATF_C= ${DESTDIR}${LIBDIR}/libprivateatf-c.a -LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a +LIBATF_C= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c.a +LIBATF_CXX= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ .for _l in ${_PRIVATELIBS} -LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a +LIB${_l:tu}?= ${DESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor .for _l in ${_LIBRARIES} @@ -416,7 +416,7 @@ LIBSMDBDIR= ${OBJTOP}/lib/libsmdb LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a LIBSMUTILDIR= ${OBJTOP}/lib/libsmutil -LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a +LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil.a LIBNETBSDDIR?= ${OBJTOP}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a @@ -449,16 +449,16 @@ LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a LIBLPRDIR= ${OBJTOP}/usr.sbin/lpr/common_source -LIBLPR?= ${LIBOPTSDIR}/liblpr.a +LIBLPR?= ${LIBLPRDIR}/liblpr.a LIBFIFOLOGDIR= ${OBJTOP}/usr.sbin/fifolog/lib -LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a +LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog.a LIBBSNMPTOOLSDIR= ${OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a LIBAMUDIR= ${OBJTOP}/usr.sbin/amd/libamu -LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a +LIBAMU?= ${LIBAMUDIR}/libamu.a # Define a directory for each library. This is useful for adding -L in when # not using a --sysroot or for meta mode bootstrapping when there is no From owner-svn-src-all@freebsd.org Fri Jun 23 20:07:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21F4AD88E46; Fri, 23 Jun 2017 20:07:58 +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 D92197262A; Fri, 23 Jun 2017 20:07:57 +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 v5NK7uEO002040; Fri, 23 Jun 2017 20:07:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NK7u7E002039; Fri, 23 Jun 2017 20:07:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232007.v5NK7u7E002039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320295 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:07:58 -0000 Author: bdrewery Date: Fri Jun 23 20:07:56 2017 New Revision: 320295 URL: https://svnweb.freebsd.org/changeset/base/320295 Log: MFC r319862,r319996,r320030: r319862: META_MODE: Show .ERROR_CMD in error. r319996: WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty. r320030: WITH_META_MODE: End each ERROR_CMD CMD line with ';'. Approved by: re (gjb, marius) Modified: stable/11/share/mk/local.sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/local.sys.mk ============================================================================== --- stable/11/share/mk/local.sys.mk Fri Jun 23 19:44:20 2017 (r320294) +++ stable/11/share/mk/local.sys.mk Fri Jun 23 20:07:56 2017 (r320295) @@ -13,7 +13,10 @@ MAKE_PRINT_VAR_ON_ERROR += \ .MAKE.MODE .endif +_ERROR_CMD_EXEC= ${sed -n '/^CMD/s,^CMD \(.*\),\1;,p' ${.ERROR_META_FILE}:L:sh} +_ERROR_CMD= ${!empty(.ERROR_META_FILE):?${_ERROR_CMD_EXEC}:.PHONY} MAKE_PRINT_VAR_ON_ERROR+= \ + _ERROR_CMD \ .CURDIR \ .MAKE \ .OBJDIR \ From owner-svn-src-all@freebsd.org Fri Jun 23 20:21:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7411BD8923D; Fri, 23 Jun 2017 20:21:54 +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 4498D72C13; Fri, 23 Jun 2017 20:21:54 +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 v5NKLrq0008598; Fri, 23 Jun 2017 20:21:53 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKLrYm008596; Fri, 23 Jun 2017 20:21:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706232021.v5NKLrYm008596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 23 Jun 2017 20:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320296 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:21:54 -0000 Author: manu Date: Fri Jun 23 20:21:53 2017 New Revision: 320296 URL: https://svnweb.freebsd.org/changeset/base/320296 Log: dtc: Update to upstream 9ce35ff8 - Add "compatible with gpl dtc X.Y.Z" to version output so U-Boot doesn't complain - Fix cross reference node This fixes some Allwinner DTS (and probably others). Modified: head/usr.bin/dtc/dtc.cc head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/dtc.cc ============================================================================== --- head/usr.bin/dtc/dtc.cc Fri Jun 23 20:07:56 2017 (r320295) +++ head/usr.bin/dtc/dtc.cc Fri Jun 23 20:21:53 2017 (r320296) @@ -51,14 +51,17 @@ using std::string; * The current major version of the tool. */ int version_major = 0; +int version_major_compatible = 1; /** * The current minor version of the tool. */ int version_minor = 5; +int version_minor_compatible = 4; /** * The current patch level of the tool. */ int version_patch = 0; +int version_patch_compatible = 0; static void usage(const string &argv0) { @@ -77,8 +80,10 @@ static void usage(const string &argv0) */ static void version(const char* progname) { - fprintf(stderr, "Version: %s %d.%d.%d\n", progname, version_major, - version_minor, version_patch); + fprintf(stdout, "Version: %s %d.%d.%d compatible with gpl dtc %d.%d.%d\n", progname, + version_major, version_minor, version_patch, + version_major_compatible, version_minor_compatible, + version_patch_compatible); } using fdt::device_tree; Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Fri Jun 23 20:07:56 2017 (r320295) +++ head/usr.bin/dtc/fdt.cc Fri Jun 23 20:21:53 2017 (r320296) @@ -1224,9 +1224,9 @@ device_tree::resolve_cross_references() { pv->byte_data.push_back('@'); push_string(pv->byte_data, p->second); - pv->byte_data.push_back(0); } } + pv->byte_data.push_back(0); } } std::unordered_map phandle_set; From owner-svn-src-all@freebsd.org Fri Jun 23 20:25:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6428D89349; Fri, 23 Jun 2017 20:25:59 +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 B353072FB6; Fri, 23 Jun 2017 20:25:59 +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 v5NKPwGr010350; Fri, 23 Jun 2017 20:25:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKPwxS010349; Fri, 23 Jun 2017 20:25:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232025.v5NKPwxS010349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320297 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:26:00 -0000 Author: bdrewery Date: Fri Jun 23 20:25:58 2017 New Revision: 320297 URL: https://svnweb.freebsd.org/changeset/base/320297 Log: MFC r319861: META_MODE: NO_FILEMON should imply nofilemon. Approved by: re (gjb) Modified: stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Fri Jun 23 20:21:53 2017 (r320296) +++ stable/11/share/mk/sys.mk Fri Jun 23 20:25:58 2017 (r320297) @@ -59,7 +59,7 @@ META_MODE+= missing-meta=yes .if !defined(NO_SILENT) META_MODE+= silent=yes .endif -.if !exists(/dev/filemon) +.if !exists(/dev/filemon) || defined(NO_FILEMON) META_MODE+= nofilemon .endif # Require filemon data with bmake From owner-svn-src-all@freebsd.org Fri Jun 23 20:38:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5960D89717; Fri, 23 Jun 2017 20:38:22 +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 B2202734DD; Fri, 23 Jun 2017 20:38:22 +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 v5NKcL4T014393; Fri, 23 Jun 2017 20:38:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKcL8O014390; Fri, 23 Jun 2017 20:38:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232038.v5NKcL8O014390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320298 - in stable/11: share/mk sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:38:22 -0000 Author: bdrewery Date: Fri Jun 23 20:38:21 2017 New Revision: 320298 URL: https://svnweb.freebsd.org/changeset/base/320298 Log: MFC r320174,r320204: r320174: Fix 'make clean all' to work again. r320204: Fix various 'make *clean *all *install' combinations. PR: 219819 Approved by: re (gjb) Modified: stable/11/share/mk/bsd.dep.mk stable/11/share/mk/bsd.init.mk stable/11/sys/conf/kern.post.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.dep.mk ============================================================================== --- stable/11/share/mk/bsd.dep.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/share/mk/bsd.dep.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -90,7 +90,7 @@ _meta_filemon= 1 .if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ - make(obj) || make(clean*) || make(destroy*) + make(obj) || (!make(all) && (make(clean*) || make(destroy*))) .MAKE.DEPENDFILE= /dev/null .endif .endif Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/share/mk/bsd.init.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -50,8 +50,9 @@ $xGRP= ${_gid} _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ - make(destroy*) + ${.TARGETS:Mclean*} == ${.TARGETS} || \ + ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ + make(obj) || make(analyze) || make(print-dir) # Skip building, but don't show a warning. _SKIP_BUILD= .endif Modified: stable/11/sys/conf/kern.post.mk ============================================================================== --- stable/11/sys/conf/kern.post.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/sys/conf/kern.post.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -200,10 +200,10 @@ _meta_filemon= 1 # lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ +.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \ + ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(kernel-obj) || make(kernel-clean*) || \ - make(kernel-install*) || defined(_meta_filemon) + defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null .endif From owner-svn-src-all@freebsd.org Fri Jun 23 20:49:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D38C3D89977; Fri, 23 Jun 2017 20:49:24 +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 A140E7396D; Fri, 23 Jun 2017 20:49:24 +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 v5NKnNUi018517; Fri, 23 Jun 2017 20:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKnNbm018516; Fri, 23 Jun 2017 20:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232049.v5NKnNbm018516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320299 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:49:24 -0000 Author: bdrewery Date: Fri Jun 23 20:49:23 2017 New Revision: 320299 URL: https://svnweb.freebsd.org/changeset/base/320299 Log: MFC r320206,r320207: r320206: Follow-up r308602: Don't add missing headers to .depend.tables.h. r320207: Tweak r320206: Still create the TABLE but not the .depend entry for missing headers. Approved by: re (gjb) Modified: stable/11/lib/libsysdecode/mktables Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/mktables ============================================================================== --- stable/11/lib/libsysdecode/mktables Fri Jun 23 20:38:21 2017 (r320298) +++ stable/11/lib/libsysdecode/mktables Fri Jun 23 20:49:23 2017 (r320299) @@ -65,17 +65,19 @@ gen_table() else filter="egrep -v" fi - all_headers="${all_headers:+${all_headers} }${file}" cat <<_EOF_ TABLE_START(${name}) _EOF_ - egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ - $include_dir/$file | ${filter} ${excl} | \ - awk '{ for (i = 1; i <= NF; i++) \ - if ($i ~ /define/) \ - break; \ - ++i; \ - printf "TABLE_ENTRY(%s)\n", $i }' + if [ -e "${include_dir}/${file}" ]; then + all_headers="${all_headers:+${all_headers} }${file}" + egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ + $include_dir/$file | ${filter} ${excl} | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "TABLE_ENTRY(%s)\n", $i }' + fi cat <<_EOF_ TABLE_END From owner-svn-src-all@freebsd.org Fri Jun 23 20:56:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8834D89BB9; Fri, 23 Jun 2017 20:56:26 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id A072B73E50; Fri, 23 Jun 2017 20:56:26 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: by vlakno.cz (Postfix, from userid 1002) id 55602C03A0B; Fri, 23 Jun 2017 22:45:42 +0200 (CEST) Date: Fri, 23 Jun 2017 22:45:42 +0200 From: Roman Divacky To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320288 - head/sys/boot/i386/boot0 Message-ID: <20170623204542.GA16165@vlakno.cz> References: <201706231841.v5NIfnII068091@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706231841.v5NIfnII068091@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:56:26 -0000 Nice! What about boot1.S from boot2? On Fri, Jun 23, 2017 at 06:41:49PM +0000, Ed Maste wrote: > Author: emaste > Date: Fri Jun 23 18:41:49 2017 > New Revision: 320288 > URL: https://svnweb.freebsd.org/changeset/base/320288 > > Log: > Allow Clang's integrated assembler to assemble boot0 > > dim@ compared clang IAS-built and GNU as-built boot0 and found them > equivalent. IAS encoded one instruction using two bytes where GNU as > used three, and another instruction using three bytes where GNU as used > two. The net result is equivalent and tested, so there is no need to > force IAS off for boot0. > > Modified: > head/sys/boot/i386/boot0/Makefile > > Modified: head/sys/boot/i386/boot0/Makefile > ============================================================================== > --- head/sys/boot/i386/boot0/Makefile Fri Jun 23 18:38:27 2017 (r320287) > +++ head/sys/boot/i386/boot0/Makefile Fri Jun 23 18:41:49 2017 (r320288) > @@ -78,6 +78,3 @@ CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \ > LDFLAGS=${LDFLAGS_BIN} > > .include > - > -# XXX: clang integrated-as doesn't grok .codeNN directives yet > -CFLAGS.boot0.S= ${CLANG_NO_IAS} > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Fri Jun 23 21:01:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87D7BD89E84; Fri, 23 Jun 2017 21:01:59 +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 5038B741D7; Fri, 23 Jun 2017 21:01:59 +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 v5NL1wFL024607; Fri, 23 Jun 2017 21:01:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NL1vKo024603; Fri, 23 Jun 2017 21:01:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706232101.v5NL1vKo024603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 23 Jun 2017 21:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320300 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 21:01:59 -0000 Author: tuexen Date: Fri Jun 23 21:01:57 2017 New Revision: 320300 URL: https://svnweb.freebsd.org/changeset/base/320300 Log: Handle sctp_get_next_param() in a consistent way. This addresses an issue found by Felix Weinrank using libfuzz. While there, use also consistent nameing. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Fri Jun 23 20:49:23 2017 (r320299) +++ head/sys/netinet/sctp_auth.c Fri Jun 23 21:01:57 2017 (r320300) @@ -1434,7 +1434,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(random_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)random_store, min(plen, sizeof(random_store))); + (struct sctp_paramhdr *)random_store, plen); if (phdr == NULL) return; /* save the random and length for the key */ @@ -1447,7 +1447,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(hmacs_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)hmacs_store, min(plen, sizeof(hmacs_store))); + (struct sctp_paramhdr *)hmacs_store, plen); if (phdr == NULL) return; /* save the hmacs list and num for the key */ @@ -1469,7 +1469,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(chunks_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)chunks_store, min(plen, sizeof(chunks_store))); + (struct sctp_paramhdr *)chunks_store, plen); if (phdr == NULL) return; chunks = (struct sctp_auth_chunk_list *)phdr; @@ -1814,7 +1814,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint int sctp_validate_init_auth_params(struct mbuf *m, int offset, int limit) { - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; uint16_t ptype, plen; int peer_supports_asconf = 0; int peer_supports_auth = 0; @@ -1823,7 +1823,7 @@ sctp_validate_init_auth_params(struct mbuf *m, int off uint8_t saw_asconf_ack = 0; /* go through each of the params. */ - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -1837,11 +1837,15 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (ptype == SCTP_SUPPORTED_CHUNK_EXT) { /* A supported extension chunk */ struct sctp_supported_chunk_types_param *pr_supported; - uint8_t local_store[SCTP_PARAM_BUFFER_SIZE]; + uint8_t local_store[SCTP_SMALL_CHUNK_STORE]; int num_ent, i; + if (plen > sizeof(local_store)) { + break; + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&local_store, min(plen, sizeof(local_store))); + (struct sctp_paramhdr *)&local_store, + plen); if (phdr == NULL) { return (-1); } @@ -1859,7 +1863,6 @@ sctp_validate_init_auth_params(struct mbuf *m, int off } } } else if (ptype == SCTP_RANDOM) { - got_random = 1; /* enforce the random length */ if (plen != (sizeof(struct sctp_auth_random) + SCTP_AUTH_RANDOM_SIZE_REQUIRED)) { @@ -1867,20 +1870,23 @@ sctp_validate_init_auth_params(struct mbuf *m, int off "SCTP: invalid RANDOM len\n"); return (-1); } + got_random = 1; } else if (ptype == SCTP_HMAC_LIST) { - uint8_t store[SCTP_PARAM_BUFFER_SIZE]; struct sctp_auth_hmac_algo *hmacs; + uint8_t store[SCTP_PARAM_BUFFER_SIZE]; int num_hmacs; - if (plen > sizeof(store)) + if (plen > sizeof(store)) { break; + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)store, min(plen, sizeof(store))); - if (phdr == NULL) + (struct sctp_paramhdr *)store, + plen); + if (phdr == NULL) { return (-1); + } hmacs = (struct sctp_auth_hmac_algo *)phdr; - num_hmacs = (plen - sizeof(*hmacs)) / - sizeof(hmacs->hmac_ids[0]); + num_hmacs = (plen - sizeof(*hmacs)) / sizeof(hmacs->hmac_ids[0]); /* validate the hmac list */ if (sctp_verify_hmac_param(hmacs, num_hmacs)) { SCTPDBG(SCTP_DEBUG_AUTH1, @@ -1889,18 +1895,19 @@ sctp_validate_init_auth_params(struct mbuf *m, int off } got_hmacs = 1; } else if (ptype == SCTP_CHUNK_LIST) { - int i, num_chunks; + struct sctp_auth_chunk_list *chunks; uint8_t chunks_store[SCTP_SMALL_CHUNK_STORE]; + int i, num_chunks; - /* did the peer send a non-empty chunk list? */ - struct sctp_auth_chunk_list *chunks = NULL; - + if (plen > sizeof(chunks_store)) { + break; + } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)chunks_store, - min(plen, sizeof(chunks_store))); - if (phdr == NULL) + plen); + if (phdr == NULL) { return (-1); - + } /*- * Flip through the list and mark that the * peer supports asconf/asconf_ack. @@ -1922,8 +1929,8 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (offset >= limit) { break; } - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } /* validate authentication required parameters */ if (got_random && got_hmacs) { Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Jun 23 20:49:23 2017 (r320299) +++ head/sys/netinet/sctp_input.c Fri Jun 23 21:01:57 2017 (r320300) @@ -3617,7 +3617,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc struct sctp_stream_reset_response *respin) { uint16_t type; - int lparm_len; + int lparam_len; struct sctp_association *asoc = &stcb->asoc; struct sctp_tmit_chunk *chk; struct sctp_stream_reset_request *req_param; @@ -3634,12 +3634,12 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc if (req_param != NULL) { stcb->asoc.str_reset_seq_out++; type = ntohs(req_param->ph.param_type); - lparm_len = ntohs(req_param->ph.param_length); + lparam_len = ntohs(req_param->ph.param_length); if (type == SCTP_STR_RESET_OUT_REQUEST) { int no_clear = 0; req_out_param = (struct sctp_stream_reset_out_request *)req_param; - number_entries = (lparm_len - sizeof(struct sctp_stream_reset_out_request)) / sizeof(uint16_t); + number_entries = (lparam_len - sizeof(struct sctp_stream_reset_out_request)) / sizeof(uint16_t); asoc->stream_reset_out_is_outstanding = 0; if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; @@ -3665,7 +3665,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc } } else if (type == SCTP_STR_RESET_IN_REQUEST) { req_in_param = (struct sctp_stream_reset_in_request *)req_param; - number_entries = (lparm_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); + number_entries = (lparam_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; if (action == SCTP_STREAM_RESET_RESULT_DENIED) { Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Jun 23 20:49:23 2017 (r320299) +++ head/sys/netinet/sctp_output.c Fri Jun 23 21:01:57 2017 (r320300) @@ -1940,7 +1940,7 @@ static struct mbuf * sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t *len) { #if defined(INET) || defined(INET6) - struct sctp_paramhdr *parmh; + struct sctp_paramhdr *paramh; struct mbuf *mret; uint16_t plen; #endif @@ -1962,7 +1962,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa #if defined(INET) || defined(INET6) if (M_TRAILINGSPACE(m) >= plen) { /* easy side we just drop it on the end */ - parmh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); + paramh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); mret = m; } else { /* Need more space */ @@ -1976,7 +1976,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa return (m); } mret = SCTP_BUF_NEXT(mret); - parmh = mtod(mret, struct sctp_paramhdr *); + paramh = mtod(mret, struct sctp_paramhdr *); } /* now add the parameter */ switch (ifa->address.sa.sa_family) { @@ -1987,9 +1987,9 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa struct sockaddr_in *sin; sin = &ifa->address.sin; - ipv4p = (struct sctp_ipv4addr_param *)parmh; - parmh->param_type = htons(SCTP_IPV4_ADDRESS); - parmh->param_length = htons(plen); + ipv4p = (struct sctp_ipv4addr_param *)paramh; + paramh->param_type = htons(SCTP_IPV4_ADDRESS); + paramh->param_length = htons(plen); ipv4p->addr = sin->sin_addr.s_addr; SCTP_BUF_LEN(mret) += plen; break; @@ -2002,9 +2002,9 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa struct sockaddr_in6 *sin6; sin6 = &ifa->address.sin6; - ipv6p = (struct sctp_ipv6addr_param *)parmh; - parmh->param_type = htons(SCTP_IPV6_ADDRESS); - parmh->param_length = htons(plen); + ipv6p = (struct sctp_ipv6addr_param *)paramh; + paramh->param_type = htons(SCTP_IPV6_ADDRESS); + paramh->param_length = htons(plen); memcpy(ipv6p->addr, &sin6->sin6_addr, sizeof(ipv6p->addr)); /* clear embedded scope in the address */ @@ -5141,7 +5141,10 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ s.param_length = htons(sizeof(s) + plen); m_copyback(op_err, err_at, sizeof(s), (caddr_t)&s); err_at += sizeof(s); - phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, min(sizeof(tempbuf), plen)); + if (plen > sizeof(tempbuf)) { + plen = sizeof(tempbuf); + } + phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, plen); if (phdr == NULL) { sctp_m_freem(op_err); /* @@ -5209,7 +5212,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ if (plen > sizeof(tempbuf)) { plen = sizeof(tempbuf); } - phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, min(sizeof(tempbuf), plen)); + phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, plen); if (phdr == NULL) { sctp_m_freem(op_err); /* @@ -5390,10 +5393,12 @@ sctp_are_there_new_addresses(struct sctp_association * { struct sctp_ipv4addr_param *p4, p4_buf; + if (plen != sizeof(struct sctp_ipv4addr_param)) { + return (1); + } phdr = sctp_get_next_param(in_initpkt, offset, (struct sctp_paramhdr *)&p4_buf, sizeof(p4_buf)); - if (plen != sizeof(struct sctp_ipv4addr_param) || - phdr == NULL) { + if (phdr == NULL) { return (1); } if (asoc->scope.ipv4_addr_legal) { @@ -5409,10 +5414,12 @@ sctp_are_there_new_addresses(struct sctp_association * { struct sctp_ipv6addr_param *p6, p6_buf; + if (plen != sizeof(struct sctp_ipv6addr_param)) { + return (1); + } phdr = sctp_get_next_param(in_initpkt, offset, (struct sctp_paramhdr *)&p6_buf, sizeof(p6_buf)); - if (plen != sizeof(struct sctp_ipv6addr_param) || - phdr == NULL) { + if (phdr == NULL) { return (1); } if (asoc->scope.ipv6_addr_legal) { @@ -9000,7 +9007,7 @@ sctp_send_cookie_echo(struct mbuf *m, */ int at; struct mbuf *cookie; - struct sctp_paramhdr parm, *phdr; + struct sctp_paramhdr param, *phdr; struct sctp_chunkhdr *hdr; struct sctp_tmit_chunk *chk; uint16_t ptype, plen; @@ -9010,7 +9017,7 @@ sctp_send_cookie_echo(struct mbuf *m, cookie = NULL; at = offset + sizeof(struct sctp_init_chunk); for (;;) { - phdr = sctp_get_next_param(m, at, &parm, sizeof(parm)); + phdr = sctp_get_next_param(m, at, ¶m, sizeof(param)); if (phdr == NULL) { return (-3); } Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Jun 23 20:49:23 2017 (r320299) +++ head/sys/netinet/sctp_pcb.c Fri Jun 23 21:01:57 2017 (r320300) @@ -2046,7 +2046,7 @@ sctp_findassociation_special_addr(struct mbuf *m, int struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, struct sockaddr *dst) { - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; #if defined(INET) || defined(INET6) struct sctp_tcb *stcb; uint16_t ptype; @@ -2074,7 +2074,7 @@ sctp_findassociation_special_addr(struct mbuf *m, int offset += sizeof(struct sctp_init_chunk); - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr != NULL) { /* now we must see if we want the parameter */ #if defined(INET) || defined(INET6) @@ -2088,10 +2088,10 @@ sctp_findassociation_special_addr(struct mbuf *m, int if (ptype == SCTP_IPV4_ADDRESS && plen == sizeof(struct sctp_ipv4addr_param)) { /* Get the rest of the address */ - struct sctp_ipv4addr_param ip4_parm, *p4; + struct sctp_ipv4addr_param ip4_param, *p4; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&ip4_parm, min(plen, sizeof(ip4_parm))); + (struct sctp_paramhdr *)&ip4_param, sizeof(ip4_param)); if (phdr == NULL) { return (NULL); } @@ -2109,10 +2109,10 @@ sctp_findassociation_special_addr(struct mbuf *m, int if (ptype == SCTP_IPV6_ADDRESS && plen == sizeof(struct sctp_ipv6addr_param)) { /* Get the rest of the address */ - struct sctp_ipv6addr_param ip6_parm, *p6; + struct sctp_ipv6addr_param ip6_param, *p6; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&ip6_parm, min(plen, sizeof(ip6_parm))); + (struct sctp_paramhdr *)&ip6_param, sizeof(ip6_param)); if (phdr == NULL) { return (NULL); } @@ -2127,8 +2127,8 @@ sctp_findassociation_special_addr(struct mbuf *m, int } #endif offset += SCTP_SIZE32(plen); - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } return (NULL); } @@ -2301,7 +2301,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off { struct sctp_tcb *stcb; union sctp_sockstore remote_store; - struct sctp_paramhdr parm_buf, *phdr; + struct sctp_paramhdr param_buf, *phdr; int ptype; int zero_address = 0; #ifdef INET @@ -2313,7 +2313,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off memset(&remote_store, 0, sizeof(remote_store)); phdr = sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &parm_buf, sizeof(struct sctp_paramhdr)); + ¶m_buf, sizeof(struct sctp_paramhdr)); if (phdr == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf lookup addr\n", __func__); @@ -2333,7 +2333,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off } p6 = (struct sctp_ipv6addr_param *)sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &p6_buf.ph, sizeof(*p6)); + &p6_buf.ph, sizeof(p6_buf)); if (p6 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v6 lookup addr\n", __func__); @@ -2360,7 +2360,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off } p4 = (struct sctp_ipv4addr_param *)sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &p4_buf.ph, sizeof(*p4)); + &p4_buf.ph, sizeof(p4_buf)); if (p4 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v4 lookup addr\n", __func__); @@ -6026,7 +6026,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s */ struct sctp_inpcb *inp; struct sctp_nets *net, *nnet, *net_tmp; - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; struct sctp_tcb *stcb_tmp; uint16_t ptype, plen; struct sockaddr *sa; @@ -6136,7 +6136,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s return (-4); } /* now we must go through each of the params. */ - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -6374,7 +6374,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)&lstore, - min(plen, sizeof(lstore))); + plen); if (phdr == NULL) { return (-24); } @@ -6427,8 +6427,11 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s uint8_t local_store[SCTP_PARAM_BUFFER_SIZE]; int num_ent, i; + if (plen > sizeof(local_store)) { + return (-35); + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&local_store, min(sizeof(local_store), plen)); + (struct sctp_paramhdr *)&local_store, plen); if (phdr == NULL) { return (-25); } @@ -6475,7 +6478,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)random_store, - min(sizeof(random_store), plen)); + plen); if (phdr == NULL) return (-26); p_random = (struct sctp_auth_random *)phdr; @@ -6498,7 +6501,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)hmacs_store, - min(plen, sizeof(hmacs_store))); + plen); if (phdr == NULL) return (-28); hmacs = (struct sctp_auth_hmac_algo *)phdr; @@ -6529,7 +6532,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)chunks_store, - min(plen, sizeof(chunks_store))); + plen); if (phdr == NULL) return (-30); chunks = (struct sctp_auth_chunk_list *)phdr; @@ -6577,8 +6580,8 @@ next_param: if (offset >= limit) { break; } - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } /* Now check to see if we need to purge any addresses */ TAILQ_FOREACH_SAFE(net, &stcb->asoc.nets, sctp_next, nnet) { From owner-svn-src-all@freebsd.org Fri Jun 23 22:54:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18AB9D8C052; Fri, 23 Jun 2017 22:54:38 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) (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 D7DB577C6D; Fri, 23 Jun 2017 22:54:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f179.google.com with SMTP id e7so29455222pfk.0; Fri, 23 Jun 2017 15:54:37 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=moIyPzMbiekiLqaZEVp6ux5f42HOdQ5qIuz+v69p6/4=; b=ewJIa5lBjjKTC3nka80ZelWDV+QsgeiR43JTgQB7aSm/iqKXNusWUu8odyNCr8+s0K VlSugnsrRQvJftkHW40G20VFXtzK71OuetKaSsH86MDlDHGwUbb9vfshZrSCTcH2+iNJ eY5fsrNPTOG5rx/mALTsUjA6rM3Y+UXRdoImj7/rRt3t5q19BkoDvGsXTdA9XJSaRouW Yb7eirUWpAIAAd+JQVej81G+kTUDIVzUHX9jQ+9aI6AUNUPteYBPCicNdN9lj1qgPgvm oeiW5xDogJAUgBBrCdmNDbahWkjxMCQqqVeGjlKm+P9+0E72GaBJeCPK/SxdErKRYqVe Smyw== X-Gm-Message-State: AKS2vOyb7BW4t5pFqI2O3Toj+PtvQ7w2EZKbpufnufS6sZjXl09UXELW 9/EqLHU2+hXFse9Nu3I= X-Received: by 10.99.122.13 with SMTP id v13mr10562525pgc.156.1498258476523; Fri, 23 Jun 2017 15:54:36 -0700 (PDT) Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com. [209.85.192.180]) by smtp.gmail.com with ESMTPSA id n2sm11711710pgd.26.2017.06.23.15.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 15:54:36 -0700 (PDT) Received: by mail-pf0-f180.google.com with SMTP id s66so29382738pfs.1; Fri, 23 Jun 2017 15:54:36 -0700 (PDT) X-Received: by 10.99.122.81 with SMTP id j17mr10432117pgn.97.1498258476300; Fri, 23 Jun 2017 15:54:36 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.133.66 with HTTP; Fri, 23 Jun 2017 15:54:35 -0700 (PDT) In-Reply-To: <201706231739.v5NHd05x039900@repo.freebsd.org> References: <201706231739.v5NHd05x039900@repo.freebsd.org> From: Conrad Meyer Date: Fri, 23 Jun 2017 15:54:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip To: Maxim Sobolev Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 22:54:38 -0000 One more nit. On Fri, Jun 23, 2017 at 10:39 AM, Maxim Sobolev wrote: > Author: sobomax > Date: Fri Jun 23 17:39:00 2017 > New Revision: 320277 > URL: https://svnweb.freebsd.org/changeset/base/320277 > > Log: > Don't leak file descriptor in some cases. > > Reported by: cem > MFC after: 6 weeks > > Modified: > head/usr.bin/mkuzip/mkuz_insize.c > > Modified: head/usr.bin/mkuzip/mkuz_insize.c > ============================================================================== > --- head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:31:07 2017 (r320276) > +++ head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:39:00 2017 (r320277) > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include "mkuz_cfg.h" > #include "mkuz_insize.h" > @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) > ffd = open(statfsbuf.f_mntfromname, O_RDONLY); > if (ffd < 0) { > warn("open(%s, O_RDONLY)", statfsbuf.f_mntfromname); > + close(ffd); This one is wrong for obvious reasons. From owner-svn-src-all@freebsd.org Fri Jun 23 23:11:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A4AD8C327; Fri, 23 Jun 2017 23:11:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87DD67816A; Fri, 23 Jun 2017 23:11:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NNB5gf077996; Fri, 23 Jun 2017 23:11:05 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NNB5bF077995; Fri, 23 Jun 2017 23:11:05 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201706232311.v5NNB5bF077995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Fri, 23 Jun 2017 23:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320301 - head/usr.bin/mkuzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 23:11:06 -0000 Author: sobomax Date: Fri Jun 23 23:11:05 2017 New Revision: 320301 URL: https://svnweb.freebsd.org/changeset/base/320301 Log: Doh, fix some botched "fix" in r320277. Reported by: cem MFC after: 6 weeks Modified: head/usr.bin/mkuzip/mkuz_insize.c Modified: head/usr.bin/mkuzip/mkuz_insize.c ============================================================================== --- head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 21:01:57 2017 (r320300) +++ head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 23:11:05 2017 (r320301) @@ -59,7 +59,6 @@ mkuz_get_insize(struct mkuz_cfg *cfp) ffd = open(statfsbuf.f_mntfromname, O_RDONLY); if (ffd < 0) { warn("open(%s, O_RDONLY)", statfsbuf.f_mntfromname); - close(ffd); return (-1); } if (ioctl(ffd, DIOCGMEDIASIZE, &ms) < 0) { From owner-svn-src-all@freebsd.org Fri Jun 23 23:11:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A01FD8C394 for ; Fri, 23 Jun 2017 23:11:49 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-ua0-x22c.google.com (mail-ua0-x22c.google.com [IPv6:2607:f8b0:400c:c08::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0113578305 for ; Fri, 23 Jun 2017 23:11:48 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-ua0-x22c.google.com with SMTP id z22so44824055uah.1 for ; Fri, 23 Jun 2017 16:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NxPm0FzH0VRBgtnN9pnbckEQ2Q8MNF72UctT8dow6xc=; b=eKN58b69FWKOkVyg6IiLGuPH04i3FUSelPA7lk90/IMM3v3CTZR0E/HOS4oOsUhBAa STFqXdlYURqzLFZAGN5IZYCf5BKFu9j1cidZixUapiHSENmGmh8y26NJwHJrvGUvu90G hidho8iiaTVPl4lLLtCtddQoAbLYzRD/8+nUiuoVSXbAO7RbfgNLsXo1umV1kWGkC5gO PWnHhyHG85lk9mOiS8Z/EtyJCJv2XD6gJMjJUyDswOmyw4cn0VG6Zc383hf6uim3N2Ga +yyw1IYeFQiSVOflwGeU2xYcBEMCQWl8i01nEEdkRia82ptL3d4mEUkDaOkXEjsVpWco iFJA== 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=NxPm0FzH0VRBgtnN9pnbckEQ2Q8MNF72UctT8dow6xc=; b=AkrcdRl/p1HTH9BX6mvc3uRGxIa4viBmXnv0V/RK4ZLOlzWi7GFZjoBqoHCEa8sWrO NsNijn1iKu90wzQzrIlNKXP9hrD+moNclfpIA2fuelY9TkZp87wzYea8G1K1kmVTVg5G UqsLZmCs8YOqOJtz/tiVH5LfnJcQEZYH7inN6Wy28LuPpV6tWa5di5mmdqyFoQ0Yvq7d xeiYT8apStiERUGV8c4ZRrhLuE74Hk6KWiJQNfK4Myo9dQFKUINx7/yVwIY2uAhgW0YF ESHoZaw9OgU0Z0qVHjFvbvuAm5QTQtkGPC8S+4nA6L04Tl36t0beQTOU5+NADYKMm3vg 1slg== X-Gm-Message-State: AKS2vOzX8ZpIXlV0Acnhz8CbiuxOnvCwmLZqJCMYBTs/NCOg/EcodTAv 4e2p3M0nUhXiSVXLFL4cG/erpis87Q1v X-Received: by 10.176.24.233 with SMTP id d41mr1479432uah.23.1498259508047; Fri, 23 Jun 2017 16:11:48 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.176.16.76 with HTTP; Fri, 23 Jun 2017 16:11:47 -0700 (PDT) In-Reply-To: References: <201706231739.v5NHd05x039900@repo.freebsd.org> From: Maxim Sobolev Date: Fri, 23 Jun 2017 16:11:47 -0700 X-Google-Sender-Auth: Lgg7G_R03xTVB0K_iGryPwZ89Cg Message-ID: Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip To: "Conrad E. Meyer" 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 23:11:49 -0000 Yeah, silly me. Thanks^2. -Max On Fri, Jun 23, 2017 at 3:54 PM, Conrad Meyer wrote: > One more nit. > > On Fri, Jun 23, 2017 at 10:39 AM, Maxim Sobolev > wrote: > > Author: sobomax > > Date: Fri Jun 23 17:39:00 2017 > > New Revision: 320277 > > URL: https://svnweb.freebsd.org/changeset/base/320277 > > > > Log: > > Don't leak file descriptor in some cases. > > > > Reported by: cem > > MFC after: 6 weeks > > > > Modified: > > head/usr.bin/mkuzip/mkuz_insize.c > > > > Modified: head/usr.bin/mkuzip/mkuz_insize.c > > ============================================================ > ================== > > --- head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:31:07 2017 > (r320276) > > +++ head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:39:00 2017 > (r320277) > > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > > > #include "mkuz_cfg.h" > > #include "mkuz_insize.h" > > @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) > > ffd = open(statfsbuf.f_mntfromname, O_RDONLY); > > if (ffd < 0) { > > warn("open(%s, O_RDONLY)", > statfsbuf.f_mntfromname); > > + close(ffd); > > This one is wrong for obvious reasons. > > From owner-svn-src-all@freebsd.org Fri Jun 23 23:51:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381F1D8CD22; Fri, 23 Jun 2017 23:51:43 +0000 (UTC) (envelope-from gjb@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 0A168792CD; Fri, 23 Jun 2017 23:51:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from 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 did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 20B27E673; Fri, 23 Jun 2017 23:51:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Fri, 23 Jun 2017 23:51:39 +0000 From: Glen Barber To: Conrad Meyer Cc: Maxim Sobolev , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip Message-ID: <20170623235139.GA69426@FreeBSD.org> References: <201706231739.v5NHd05x039900@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 23:51:43 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 23, 2017 at 03:54:35PM -0700, Conrad Meyer wrote: > > @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) > > ffd =3D open(statfsbuf.f_mntfromname, O_RDONLY); > > if (ffd < 0) { > > warn("open(%s, O_RDONLY)", statfsbuf.f_mntfromn= ame); > > + close(ffd); >=20 > This one is wrong for obvious reasons. >=20 It isn't obvious to me. :) Glen --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAllNqYYACgkQAxRYpUeP 4pPlWA//bu2hZg+SqiYNZFVN0wahfLRoRfTUX7dXC9gX/UdWx2TXg1mRQ+WLHeQW dyUwsA2DfxD6CUsmza2UTT6S22VN00TBgMGl9HfbMOTagPt/VO1IkTbLBPdOk95z zllAJWa/FVdNHIA9ZhpVS1emGCuPivse+wVp22shkg1YEvFBUu3l0qlB2Kgk49LO 1SWmNkkmW8g4EK98d8FwKllV0u/e1gcv8EfdzGqOyH/jsVOGL8zkyup8SJDhPRxg 8F7NpnLSawrTxNXEkd6LIFGAI0m37uNqMpiuJTmjRCjk11VhyJzluPVbFUGCGoDk 9MqjvLhWf2xtzeb7+lMFez2lKoOJRSmJYFddyaCHf8DvAbB530A/9LApOKymG2Vu T8xIH4YbpLsVTJWvdU6NEFC3MBUkqBkvwnXYaQTc8SIY4uhp0OoGkBbdaH1zIofw eJOESQ2z0AZ0oS9rus8xY0X2kjUGcrR7gUAJ5GlmBjzVitoj/P44CASLoZgiGnpx s+UVrtxcnQZN+4HvGGNawdxN5/2Jtr+sbqxQZTz6stnB8DGIuSsAXtrEMAt3GjMJ BAPt4mULhHL+pMTH0RnX7qAuzplBmxJUzoS52q4+tecj7lwKCT9sS0MCMITUvVmS NCb5GE5+UMNjlTjNlFlz75I8u63RDZ1LrqqXTAOR1mk5AvbY97I= =EQVT -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- From owner-svn-src-all@freebsd.org Sat Jun 24 00:28:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56538D8D5A3; Sat, 24 Jun 2017 00:28: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 17E9379E79; Sat, 24 Jun 2017 00:28: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 v5O0SZP1009511; Sat, 24 Jun 2017 00:28:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O0SZp8009510; Sat, 24 Jun 2017 00:28:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706240028.v5O0SZp8009510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 24 Jun 2017 00:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320302 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 00:28:36 -0000 Author: imp Date: Sat Jun 24 00:28:35 2017 New Revision: 320302 URL: https://svnweb.freebsd.org/changeset/base/320302 Log: Be sure to free allocated statfs11 buffer. Submitted by: Alistair Crooks Modified: head/lib/libc/sys/getfsstat.c Modified: head/lib/libc/sys/getfsstat.c ============================================================================== --- head/lib/libc/sys/getfsstat.c Fri Jun 23 23:11:05 2017 (r320301) +++ head/lib/libc/sys/getfsstat.c Sat Jun 24 00:28:35 2017 (r320302) @@ -60,5 +60,6 @@ getfsstat(struct statfs *buf, long bufsize, int flags) for (i = 0; i < rv; i++) __statfs11_to_statfs(&statfs11[i], &buf[i]); } + free(statfs11); return (rv); } From owner-svn-src-all@freebsd.org Sat Jun 24 04:05:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE40D9610E; Sat, 24 Jun 2017 04:05:05 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 CFCE281463; Sat, 24 Jun 2017 04:05:04 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OcJbdGvSEM9gtOcJcdvOZC; Fri, 23 Jun 2017 22:04:57 -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=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=nFYkoIQbuwSpul8FLbkA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 7885B2C4; Fri, 23 Jun 2017 21:04:55 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5O3ZTtG084871; Fri, 23 Jun 2017 20:35:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706240335.v5O3ZTtG084871@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: Bryan Drewery cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320245 - head/share/mk In-Reply-To: Message from Bryan Drewery of "Fri, 23 Jun 2017 08:42:41 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Jun 2017 20:35:29 -0700 X-CMAE-Envelope: MS4wfN6xz08SzpmqvZs/TGQpjjBzg5yvfhZScwDvr8wPL/qnevtd6IBdzKaoUuZM4nhtm2wEwfsAwL0qK8wObBJzmt27GDEbCRqwX+XVOo7W30aoSvXm0QU1 H1XTXAOZEp+pChnCnbcnUXj2KX/l9WgImzRqC9ROv9Ptcp/ur36N+oqmOHo3niDcpAmoJF5w2w+T/5Ws0tUcJnMVzsdHiz6VTFd/BNNG9y81RpGDh7sXPcmV JV3810XxOc35CZ37bcfJklucRzIF19UTOvNCPO0IPu0GhHkL0mqy22zJE1s3bMO/ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 04:05:05 -0000 In message , Bryan Drewery wr ites: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3 > Content-Type: multipart/mixed; boundary="77famXCJfxNoDslk4Jg33FDxFgUd929a1"; > protected-headers="v1" > From: Bryan Drewery > To: Cy Schubert > Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, > svn-src-head@freebsd.org > Message-ID: > Subject: Re: svn commit: r320245 - head/share/mk > References: <201706231356.v5NDujRH002025@slippy.cwsent.com> > In-Reply-To: <201706231356.v5NDujRH002025@slippy.cwsent.com> > > --77famXCJfxNoDslk4Jg33FDxFgUd929a1 > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > On 6/23/2017 6:56 AM, Cy Schubert wrote: > > In message <201706231347.v5NDlt39037415@slippy.cwsent.com>, Cy Schubert= > =20 > > writes: > >> Let me try replying to this again. It's an exmh thing. Sorry. > >> > >> In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewe= > ry=20 > >> writes > >> : > >>> Author: bdrewery > >>> Date: Thu Jun 22 21:03:24 2017 > >>> New Revision: 320245 > >>> URL: https://svnweb.freebsd.org/changeset/base/320245 > >>> > >>> Log: > >>> Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. > >>> =20 > >>> This is similar to r300350 for bsd.compiler.mk. > >>> =20 > >>> MFC after: 2 weeks > >>> Reviewed by: emaste > >>> Sponsored by: Dell EMC Isilon > >>> Differential Revision: https://reviews.freebsd.org/D11309 > >>> > >>> Modified: > >>> head/share/mk/bsd.linker.mk > >>> > >>> Modified: head/share/mk/bsd.linker.mk > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D > >> =3D=3D > >>> =3D > >>> --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 > >>> 4) > >>> +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 > >>> 5) > >>> @@ -9,25 +9,39 @@ > >>> # major * 10000 + minor * 100 + tiny > >>> # It too can be overridden on the command line. > >>> # > >>> +# These variables with an X_ prefix will also be provided if XLD is = > set. > >>> +# > >>> # This file may be included multiple times, but only has effect the = > first=20 > >> ti > >>> me. > >>> # > >>> =20 > >>> .if !target(____) > >>> ____: > >>> =20 > >>> -_ld_version!=3D ${LD} --version 2>/dev/null | head -n 1 || echo none= > > >>> +.for ld X_ in LD $${_empty_var_} XLD X_ > >>> +.if ${ld} =3D=3D "LD" || !empty(XLD) > >>> +.if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD}) > >>> + > >>> +_ld_version!=3D ${${ld}} --version 2>/dev/null | head -n 1 || echo n= > one > >> > >> This line gave one of my machines a bit of gas with the error: > >> > >> sh: head: not found > >> make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable= > to=20 > >> determine linker type from LD=3Dld > >> *** Error code 1 > >> > >> Specifying the full pathname for head resolves the isssue. > >=20 > > Or better yet, use include head in the build tools (or use sed or awk).= > > >=20 > >=20 > > Good point, but r320249 should remove the head(1) call entirely during > installworld. Can you try again? It's building now. I'll let you know when it's done. -- 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-all@freebsd.org Sat Jun 24 04:48:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1255FD975B7; Sat, 24 Jun 2017 04:48:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DED6F82E5F; Sat, 24 Jun 2017 04:48:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f170.google.com with SMTP id s66so31814620pfs.1; Fri, 23 Jun 2017 21:48:32 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=LpRcQQXhFBQK6170kxiJZzPXhGd9VFcZPRTx4adYIrA=; b=sjj6xGt/rbVz57f7L/E3VWVlz1kmodj/wOFqM+7MCCVTwMpL4a2Leq2qcwxsxMgJV2 ActMsioa1Z5tZZKzHlKN/++XYhotOr18QqLQO8qPGZ8ib2/Q760P4bM3eVm0DiBJHK3v QLSMxLJqVmEi6ghUnA7SPDh4WUHxhzvsJWwJw6GGCfQfpbzZkCjfOJrk2YXtTdzOk2IA jyT3b1u8Jlz5jl32f9jGxwSKZsBxwhWkEUbMKMVC29ZYr60f2Y+HWBgWDQfKclOpI6/D ziVJMhSTg/l8dWnQZDpzb5ZsiUdKxuqXX053tR5C4juurBZBiXukK8K6+4h3A7ffljUs wXkw== X-Gm-Message-State: AKS2vOzLfyb2mvljRdzcCTVhluZ/LhhrV/ghOcZC0WiZpFpLRX2xqTQQ YZCvrH1Nyy2Ah3DuGfc= X-Received: by 10.98.220.26 with SMTP id t26mr11701221pfg.32.1498279705898; Fri, 23 Jun 2017 21:48:25 -0700 (PDT) Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com. [74.125.83.54]) by smtp.gmail.com with ESMTPSA id r63sm12811393pgr.65.2017.06.23.21.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 21:48:25 -0700 (PDT) Received: by mail-pg0-f54.google.com with SMTP id e187so28648144pgc.1; Fri, 23 Jun 2017 21:48:25 -0700 (PDT) X-Received: by 10.84.241.198 with SMTP id t6mr6083095plm.48.1498279704794; Fri, 23 Jun 2017 21:48:24 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.133.66 with HTTP; Fri, 23 Jun 2017 21:48:24 -0700 (PDT) In-Reply-To: <201706082130.v58LUY0j095589@repo.freebsd.org> References: <201706082130.v58LUY0j095589@repo.freebsd.org> From: Conrad Meyer Date: Fri, 23 Jun 2017 21:48:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rpc... To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 04:48:33 -0000 Hi Gleb, We suspect this revision has broken setsockopt(SO_SNDBUF), etc., on listen sockets, as used by e.g. nginx. Example backtrace: http://imgur.com/a/fj5JQ The proposed mechanism is the destroyed snd/rcv sockbufs (and associated locks) as part of solisten_proto(). Best, Conrad On Thu, Jun 8, 2017 at 2:30 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Jun 8 21:30:34 2017 > New Revision: 319722 > URL: https://svnweb.freebsd.org/changeset/base/319722 > > Log: > Listening sockets improvements. > > o Separate fields of struct socket that belong to listening from > fields that belong to normal dataflow, and unionize them. This > shrinks the structure a bit. > - Take out selinfo's from the socket buffers into the socket. The > first reason is to support braindamaged scenario when a socket is > added to kevent(2) and then listen(2) is cast on it. The second > reason is that there is future plan to make socket buffers pluggable, > so that for a dataflow socket a socket buffer can be changed, and > in this case we also want to keep same selinfos through the lifetime > of a socket. > - Remove struct struct so_accf. Since now listening stuff no longer > affects struct socket size, just move its fields into listening part > of the union. > - Provide sol_upcall field and enforce that so_upcall_set() may be called > only on a dataflow socket, which has buffers, and for listening sockets > provide solisten_upcall_set(). > > o Remove ACCEPT_LOCK() global. > - Add a mutex to socket, to be used instead of socket buffer lock to lock > fields of struct socket that don't belong to a socket buffer. > - Allow to acquire two socket locks, but the first one must belong to a > listening socket. > - Make soref()/sorele() to use atomic(9). This allows in some situations > to do soref() without owning socket lock. There is place for improvement > here, it is possible to make sorele() also to lock optionally. > - Most protocols aren't touched by this change, except UNIX local sockets. > See below for more information. > > o Reduce copy-and-paste in kernel modules that accept connections from > listening sockets: provide function solisten_dequeue(), and use it in > the following modules: ctl(4), iscsi(4), ng_btsocket(4), ng_ksocket(4), > infiniband, rpc. > > o UNIX local sockets. > - Removal of ACCEPT_LOCK() global uncovered several races in the UNIX > local sockets. Most races exist around spawning a new socket, when we > are connecting to a local listening socket. To cover them, we need to > hold locks on both PCBs when spawning a third one. This means holding > them across sonewconn(). This creates a LOR between pcb locks and > unp_list_lock. > - To fix the new LOR, abandon the global unp_list_lock in favor of global > unp_link_lock. Indeed, separating these two locks didn't provide us any > extra parralelism in the UNIX sockets. > - Now call into uipc_attach() may happen with unp_link_lock hold if, we > are accepting, or without unp_link_lock in case if we are just creating > a socket. > - Another problem in UNIX sockets is that uipc_close() basicly did nothing > for a listening socket. The vnode remained opened for connections. This > is fixed by removing vnode in uipc_close(). Maybe the right way would be > to do it for all sockets (not only listening), simply move the vnode > teardown from uipc_detach() to uipc_close()? > > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D9770 > > Modified: > head/sys/cam/ctl/ctl_ha.c > head/sys/dev/iscsi/icl_soft_proxy.c > head/sys/kern/sys_socket.c > head/sys/kern/uipc_accf.c > head/sys/kern/uipc_debug.c > head/sys/kern/uipc_sockbuf.c > head/sys/kern/uipc_socket.c > head/sys/kern/uipc_syscalls.c > head/sys/kern/uipc_usrreq.c > head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c > head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c > head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c > head/sys/netgraph/ng_ksocket.c > head/sys/netinet/sctp_input.c > head/sys/netinet/sctp_syscalls.c > head/sys/netinet/sctp_sysctl.c > head/sys/netinet/sctp_usrreq.c > head/sys/netinet/tcp_subr.c > head/sys/netinet/tcp_syncache.c > head/sys/netinet/tcp_timewait.c > head/sys/ofed/drivers/infiniband/core/iwcm.c > head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c > head/sys/rpc/svc_vc.c > head/sys/sys/sockbuf.h > head/sys/sys/socket.h > head/sys/sys/socketvar.h > head/usr.bin/netstat/inet.c From owner-svn-src-all@freebsd.org Sat Jun 24 06:13:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 466EAD98E56; Sat, 24 Jun 2017 06:13:30 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 EB18984F7C; Sat, 24 Jun 2017 06:13:29 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OeJtdlgkAeQWUOeJudTZIG; Sat, 24 Jun 2017 00:13:23 -0600 X-Authority-Analysis: v=2.2 cv=UpATD64B c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=1j-JZghWd1vDaKHzSiUA:9 a=CjuIK1q_8ugA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id DD07C6AE; Fri, 23 Jun 2017 23:13:20 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5O6C5HX005101; Fri, 23 Jun 2017 23:12:05 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706240612.v5O6C5HX005101@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: Cy Schubert cc: Bryan Drewery , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320245 - head/share/mk In-Reply-To: Message from Cy Schubert of "Fri, 23 Jun 2017 20:35:29 -0700." <201706240335.v5O3ZTtG084871@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Jun 2017 23:12:05 -0700 X-CMAE-Envelope: MS4wfPEgl7pW4IqWArysZ/sDPOPr0sX5CKn6RMNCAcr4HCwAV8X5axT7H1q9Tq2gXEE2a+lHkczxpFtDU4iY9iubbvzdRbtw68VlEQL/GYLd/8LSJKtqB/+e tcJs/i9TCInRsZPAi8nHy88lj/eA209uaLmkhNrkzUBqSL3zvF7BL6PZxHTWYwIgEMuFR5NSmGy6tn6vkp3HTTujV2QyAiGDfB36wOwcMb1GiGyADgAOsUZ0 uGh789CqctZDI2AnHJqjx1k+Me3vwonxnTnVH8yXe+WDy9wHb4Yr4FDssE4keGkZ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 06:13:30 -0000 In message <201706240335.v5O3ZTtG084871@slippy.cwsent.com>, Cy Schubert writes: > In message , Bryan > Drewery wr > ites: > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > > --wgtDeWvwHi0cSQFVbm1oqMHHag11O62n3 > > Content-Type: multipart/mixed; boundary="77famXCJfxNoDslk4Jg33FDxFgUd929a1" > ; > > protected-headers="v1" > > From: Bryan Drewery > > To: Cy Schubert > > Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, > > svn-src-head@freebsd.org > > Message-ID: > > Subject: Re: svn commit: r320245 - head/share/mk > > References: <201706231356.v5NDujRH002025@slippy.cwsent.com> > > In-Reply-To: <201706231356.v5NDujRH002025@slippy.cwsent.com> > > > > --77famXCJfxNoDslk4Jg33FDxFgUd929a1 > > Content-Type: text/plain; charset=utf-8 > > Content-Language: en-US > > Content-Transfer-Encoding: quoted-printable > > > > On 6/23/2017 6:56 AM, Cy Schubert wrote: > > > In message <201706231347.v5NDlt39037415@slippy.cwsent.com>, Cy Schubert= > > =20 > > > writes: > > >> Let me try replying to this again. It's an exmh thing. Sorry. > > >> > > >> In message <201706222103.v5ML3Oq3026557@repo.freebsd.org>, Bryan Drewe= > > ry=20 > > >> writes > > >> : > > >>> Author: bdrewery > > >>> Date: Thu Jun 22 21:03:24 2017 > > >>> New Revision: 320245 > > >>> URL: https://svnweb.freebsd.org/changeset/base/320245 > > >>> > > >>> Log: > > >>> Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION. > > >>> =20 > > >>> This is similar to r300350 for bsd.compiler.mk. > > >>> =20 > > >>> MFC after: 2 weeks > > >>> Reviewed by: emaste > > >>> Sponsored by: Dell EMC Isilon > > >>> Differential Revision: https://reviews.freebsd.org/D11309 > > >>> > > >>> Modified: > > >>> head/share/mk/bsd.linker.mk > > >>> > > >>> Modified: head/share/mk/bsd.linker.mk > > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D > > >> =3D=3D > > >>> =3D > > >>> --- head/share/mk/bsd.linker.mk Thu Jun 22 21:03:20 2017 (r32024 > > >>> 4) > > >>> +++ head/share/mk/bsd.linker.mk Thu Jun 22 21:03:24 2017 (r32024 > > >>> 5) > > >>> @@ -9,25 +9,39 @@ > > >>> # major * 10000 + minor * 100 + tiny > > >>> # It too can be overridden on the command line. > > >>> # > > >>> +# These variables with an X_ prefix will also be provided if XLD is = > > set. > > >>> +# > > >>> # This file may be included multiple times, but only has effect the = > > first=20 > > >> ti > > >>> me. > > >>> # > > >>> =20 > > >>> .if !target(____) > > >>> ____: > > >>> =20 > > >>> -_ld_version!=3D ${LD} --version 2>/dev/null | head -n 1 || echo > none= > > > > >>> +.for ld X_ in LD $${_empty_var_} XLD X_ > > >>> +.if ${ld} =3D=3D "LD" || !empty(XLD) > > >>> +.if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD}) > > >>> + > > >>> +_ld_version!=3D ${${ld}} --version 2>/dev/null | head -n 1 || e > cho n= > > one > > >> > > >> This line gave one of my machines a bit of gas with the error: > > >> > > >> sh: head: not found > > >> make[2]: "/opt/src/svn-current/share/mk/bsd.linker.mk" line 42: Unable= > > to=20 > > >> determine linker type from LD=3Dld > > >> *** Error code 1 > > >> > > >> Specifying the full pathname for head resolves the isssue. > > >=20 > > > Or better yet, use include head in the build tools (or use sed or awk).= > > > > >=20 > > >=20 > > > > Good point, but r320249 should remove the head(1) call entirely during > > installworld. Can you try again? > > It's building now. I'll let you know when it's done. It's good. Install to amd64 and i386 was successful. Thanks for fixing this. -- 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-all@freebsd.org Sat Jun 24 07:44:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9442D99EC0; Sat, 24 Jun 2017 07:44:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957601301; Sat, 24 Jun 2017 07:44:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5O7i5N6087155; Sat, 24 Jun 2017 07:44:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O7i58J087154; Sat, 24 Jun 2017 07:44:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706240744.v5O7i58J087154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 24 Jun 2017 07:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320303 - stable/10/usr.sbin/rpc.lockd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 07:44:06 -0000 Author: delphij Date: Sat Jun 24 07:44:05 2017 New Revision: 320303 URL: https://svnweb.freebsd.org/changeset/base/320303 Log: MFC r320183: Reduce code duplication in rpc.lockd. Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM. As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter. Reviewed by: kevlo Modified: stable/10/usr.sbin/rpc.lockd/lockd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- stable/10/usr.sbin/rpc.lockd/lockd.c Sat Jun 24 00:28:35 2017 (r320302) +++ stable/10/usr.sbin/rpc.lockd/lockd.c Sat Jun 24 07:44:05 2017 (r320303) @@ -99,13 +99,12 @@ char localhost[] = "localhost"; static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); -void lookup_addresses(struct netconfig *nconf); +static void out_of_mem(void) __dead2; void init_nsm(void); void nlm_prog_0(struct svc_req *, SVCXPRT *); void nlm_prog_1(struct svc_req *, SVCXPRT *); void nlm_prog_3(struct svc_req *, SVCXPRT *); void nlm_prog_4(struct svc_req *, SVCXPRT *); -void out_of_mem(void); void usage(void); void sigalarm_handler(void); @@ -148,7 +147,6 @@ main(int argc, char **argv) break; case 'h': ++nhosts; - hosts_bak = hosts; hosts_bak = realloc(hosts, nhosts * sizeof(char *)); if (hosts_bak == NULL) { if (hosts != NULL) { @@ -176,7 +174,6 @@ main(int argc, char **argv) svcport_str = strdup(optarg); break; default: - case '?': usage(); /* NOTREACHED */ } @@ -231,7 +228,6 @@ main(int argc, char **argv) hosts[0] = "*"; nhosts = 1; } else { - hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * sizeof(char *)); @@ -313,7 +309,7 @@ main(int argc, char **argv) if (have_v6 == 0 && strcmp(nconf->nc_protofmly, "inet6") == 0) { /* DO NOTHING */ } else { - lookup_addresses(nconf); + create_service(nconf); } } } @@ -486,9 +482,14 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate - * addresses. It gets called one time for each transport. + * addresses if lockd for user NLM, or perform a lookup of + * addresses for the kernel to create transports. + * + * It gets called one time for each transport. + * * It returns 0 upon success, 1 for ingore the call and -1 to indicate * bind failed with EADDRINUSE. + * * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. */ @@ -532,20 +533,23 @@ create_service(struct netconfig *nconf) nhostsbak = nhosts; while (nhostsbak > 0) { --nhostsbak; - sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); - if (sock_fd == NULL) - out_of_mem(); - sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; hints.ai_flags = AI_PASSIVE; - /* - * XXX - using RPC library internal functions. - */ - if ((fd = __rpc_nconf2fd(nconf)) < 0) { - syslog(LOG_ERR, "cannot create socket for %s", - nconf->nc_netid); - continue; + if (!kernel_lockd) { + sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); + if (sock_fd == NULL) + out_of_mem(); + sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ + + /* + * XXX - using RPC library internal functions. + */ + if ((fd = __rpc_nconf2fd(nconf)) < 0) { + syslog(LOG_ERR, "cannot create socket for %s", + nconf->nc_netid); + continue; + } } switch (hints.ai_family) { @@ -559,7 +563,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -574,7 +579,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -588,8 +594,7 @@ create_service(struct netconfig *nconf) */ if (strcmp("*", hosts[nhostsbak]) == 0) { if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) + if ((res = malloc(sizeof(struct addrinfo))) == NULL) out_of_mem(); mallocd_res = 1; res->ai_flags = hints.ai_flags; @@ -620,7 +625,7 @@ create_service(struct netconfig *nconf) break; default: syslog(LOG_ERR, - "bad addr fam %d", + "bad address family %d", res->ai_family); exit(1); } @@ -631,7 +636,8 @@ create_service(struct netconfig *nconf) "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -641,42 +647,62 @@ create_service(struct netconfig *nconf) syslog(LOG_ERR, "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } + if (kernel_lockd) { + struct netbuf servaddr; + char *uaddr; - /* Store the fd. */ - sock_fd[sock_fdcnt - 1] = fd; + /* + * Look up addresses for the kernel to create transports for. + */ + servaddr.len = servaddr.maxlen = res->ai_addrlen; + servaddr.buf = res->ai_addr; + uaddr = taddr2uaddr(nconf, &servaddr); - /* Now, attempt the bind. */ - r = bindresvport_sa(fd, res->ai_addr); - if (r != 0) { - if (errno == EADDRINUSE && mallocd_svcport != 0) { - if (mallocd_res != 0) { - free(res->ai_addr); - free(res); - } else - freeaddrinfo(res); - return (-1); + addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); + if (!addrs) + out_of_mem(); + addrs[2 * naddrs] = strdup(nconf->nc_netid); + addrs[2 * naddrs + 1] = uaddr; + naddrs++; + } else { + /* Store the fd. */ + sock_fd[sock_fdcnt - 1] = fd; + + /* Now, attempt the bind. */ + r = bindresvport_sa(fd, res->ai_addr); + if (r != 0) { + if (errno == EADDRINUSE && mallocd_svcport != 0) { + if (mallocd_res != 0) { + free(res->ai_addr); + free(res); + } else + freeaddrinfo(res); + return (-1); + } + syslog(LOG_ERR, "bindresvport_sa: %m"); + exit(1); } - syslog(LOG_ERR, "bindresvport_sa: %m"); - exit(1); - } - if (svcport_str == NULL) { - svcport_str = malloc(NI_MAXSERV * sizeof(char)); - if (svcport_str == NULL) - out_of_mem(); - mallocd_svcport = 1; + if (svcport_str == NULL) { + svcport_str = malloc(NI_MAXSERV * sizeof(char)); + if (svcport_str == NULL) + out_of_mem(); + mallocd_svcport = 1; - if (getnameinfo(res->ai_addr, - res->ai_addr->sa_len, NULL, NI_MAXHOST, - svcport_str, NI_MAXSERV * sizeof(char), - NI_NUMERICHOST | NI_NUMERICSERV)) - errx(1, "Cannot get port number"); + if (getnameinfo(res->ai_addr, + res->ai_addr->sa_len, NULL, NI_MAXHOST, + svcport_str, NI_MAXSERV * sizeof(char), + NI_NUMERICHOST | NI_NUMERICSERV)) + errx(1, "Cannot get port number"); + } } + if (mallocd_res != 0) { free(res->ai_addr); free(res); @@ -807,151 +833,6 @@ clearout_service(void) close(sock_fd[i]); } } -} - -/* - * Look up addresses for the kernel to create transports for. - */ -void -lookup_addresses(struct netconfig *nconf) -{ - struct addrinfo hints, *res = NULL; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; - struct __rpc_sockinfo si; - struct netbuf servaddr; - int aicode; - int nhostsbak; - u_int32_t host_addr[4]; /* IPv4 or IPv6 */ - char *uaddr; - - if ((nconf->nc_semantics != NC_TPI_CLTS) && - (nconf->nc_semantics != NC_TPI_COTS) && - (nconf->nc_semantics != NC_TPI_COTS_ORD)) - return; /* not my type */ - - /* - * XXX - using RPC library internal functions. - */ - if (!__rpc_nconf2sockinfo(nconf, &si)) { - syslog(LOG_ERR, "cannot get information for %s", - nconf->nc_netid); - return; - } - - /* Get rpc.statd's address on this transport */ - memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = si.si_af; - hints.ai_socktype = si.si_socktype; - hints.ai_protocol = si.si_proto; - - /* - * Bind to specific IPs if asked to - */ - nhostsbak = nhosts; - while (nhostsbak > 0) { - --nhostsbak; - - switch (hints.ai_family) { - case AF_INET: - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET6 address. - */ - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - case AF_INET6: - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET address. - */ - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - default: - break; - } - - /* - * If no hosts were specified, just bind to INADDR_ANY - */ - if (strcmp("*", hosts[nhostsbak]) == 0) { - if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) - out_of_mem(); - res->ai_flags = hints.ai_flags; - res->ai_family = hints.ai_family; - res->ai_protocol = hints.ai_protocol; - switch (res->ai_family) { - case AF_INET: - sin = malloc(sizeof(struct sockaddr_in)); - if (sin == NULL) - out_of_mem(); - sin->sin_family = AF_INET; - sin->sin_port = htons(0); - sin->sin_addr.s_addr = htonl(INADDR_ANY); - res->ai_addr = (struct sockaddr*) sin; - res->ai_addrlen = sizeof(struct sockaddr_in); - break; - case AF_INET6: - sin6 = malloc(sizeof(struct sockaddr_in6)); - if (sin6 == NULL) - out_of_mem(); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = htons(0); - sin6->sin6_addr = in6addr_any; - res->ai_addr = (struct sockaddr*) sin6; - res->ai_addrlen = sizeof(struct sockaddr_in6); - break; - default: - break; - } - } else { - if ((aicode = getaddrinfo(NULL, svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, - gai_strerror(aicode)); - continue; - } - } - } else { - if ((aicode = getaddrinfo(hosts[nhostsbak], svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); - continue; - } - } - - servaddr.len = servaddr.maxlen = res->ai_addrlen; - servaddr.buf = res->ai_addr; - uaddr = taddr2uaddr(nconf, &servaddr); - - addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); - if (!addrs) - out_of_mem(); - addrs[2 * naddrs] = strdup(nconf->nc_netid); - addrs[2 * naddrs + 1] = uaddr; - naddrs++; - } /* end while */ } void From owner-svn-src-all@freebsd.org Sat Jun 24 09:33:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57480D9B781; Sat, 24 Jun 2017 09:33:26 +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 1AFD83B06; Sat, 24 Jun 2017 09:33:26 +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 v5O9XP2b032452; Sat, 24 Jun 2017 09:33:25 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O9XPVg032451; Sat, 24 Jun 2017 09:33:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706240933.v5O9XPVg032451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 24 Jun 2017 09:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320304 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 09:33:26 -0000 Author: manu Date: Sat Jun 24 09:33:25 2017 New Revision: 320304 URL: https://svnweb.freebsd.org/changeset/base/320304 Log: loader.efi: Disable smbios for arm The smbios code does a lot of unaligned access, since we don't really care about smbios info on ARM (not all board expose information and those who does don't expose useful ones) disable smbios for this arch (at least for now). Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Sat Jun 24 07:44:05 2017 (r320303) +++ head/sys/boot/efi/loader/main.c Sat Jun 24 09:33:25 2017 (r320304) @@ -308,7 +308,9 @@ main(int argc, CHAR16 *argv[]) int i, j, vargood, howto; UINTN k; int has_kbd; +#if !defined(__arm__) char buf[40]; +#endif archsw.arch_autoload = efi_autoload; archsw.arch_getdev = efi_getdev; @@ -482,6 +484,7 @@ main(int argc, CHAR16 *argv[]) for (k = 0; k < ST->NumberOfTableEntries; k++) { guid = &ST->ConfigurationTable[k].VendorGuid; +#if !defined(__arm__) if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) { snprintf(buf, sizeof(buf), "%p", ST->ConfigurationTable[k].VendorTable); @@ -489,6 +492,7 @@ main(int argc, CHAR16 *argv[]) smbios_detect(ST->ConfigurationTable[k].VendorTable); break; } +#endif } interact(NULL); /* doesn't return */ From owner-svn-src-all@freebsd.org Sat Jun 24 10:19:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD77AD9BD5E; Sat, 24 Jun 2017 10:19:07 +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 8DA7064990; Sat, 24 Jun 2017 10:19:07 +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 v5OAJ6jv048867; Sat, 24 Jun 2017 10:19:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OAJ6Bh048866; Sat, 24 Jun 2017 10:19:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241019.v5OAJ6Bh048866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 10:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320307 - head/sys/i386/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 10:19:07 -0000 Author: kib Date: Sat Jun 24 10:19:06 2017 New Revision: 320307 URL: https://svnweb.freebsd.org/changeset/base/320307 Log: Fix indent. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/i386/isa/npx.c Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Sat Jun 24 09:47:57 2017 (r320306) +++ head/sys/i386/isa/npx.c Sat Jun 24 10:19:06 2017 (r320307) @@ -1149,7 +1149,7 @@ npx_set_fpregs_xmm(struct save87 *sv_87, struct savexm for (i = 0; i < 8; ++i) { sv_xmm->sv_fp[i].fp_acc = sv_87->sv_ac[i]; if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) - penv_xmm->en_tw |= 1 << i; + penv_xmm->en_tw |= 1 << i; } } From owner-svn-src-all@freebsd.org Sat Jun 24 11:38:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9B2AD9CE4E; Sat, 24 Jun 2017 11:38:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2706657D; Sat, 24 Jun 2017 11:38:32 +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 v5OBcV8X081058; Sat, 24 Jun 2017 11:38:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OBcVhB081057; Sat, 24 Jun 2017 11:38:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241138.v5OBcVhB081057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 11:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320308 - head/sys/amd64/ia32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 11:38:32 -0000 Author: kib Date: Sat Jun 24 11:38:31 2017 New Revision: 320308 URL: https://svnweb.freebsd.org/changeset/base/320308 Log: Translate between abridged and full x87 tags for compat32 ptrace(PT_GETFPREGS). Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/ia32/ia32_reg.c Modified: head/sys/amd64/ia32/ia32_reg.c ============================================================================== --- head/sys/amd64/ia32/ia32_reg.c Sat Jun 24 10:19:06 2017 (r320307) +++ head/sys/amd64/ia32/ia32_reg.c Sat Jun 24 11:38:31 2017 (r320308) @@ -156,7 +156,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_87->en_cw = penv_xmm->en_cw; penv_87->en_sw = penv_xmm->en_sw; - penv_87->en_tw = penv_xmm->en_tw; + /* * XXX for en_fip/fcs/foo/fos, check if the fxsave format * uses the old-style layout for 32 bit user apps. If so, @@ -170,9 +170,13 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* Entry into the kernel always sets TF_HASSEGS */ penv_87->en_fos = td->td_frame->tf_ds; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_87->en_tw = 0xffff; + for (i = 0; i < 8; ++i) { sv_87->sv_ac[i] = sv_fpu->sv_fp[i].fp_acc; + if ((penv_xmm->en_tw & (1 << i)) != 0) + penv_87->en_tw &= ~(3 << i * 2); + } return (0); } @@ -189,15 +193,19 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_xmm->en_cw = penv_87->en_cw; penv_xmm->en_sw = penv_87->en_sw; - penv_xmm->en_tw = penv_87->en_tw; penv_xmm->en_rip = penv_87->en_fip; /* penv_87->en_fcs and en_fos ignored, see above */ penv_xmm->en_opcode = penv_87->en_opcode; penv_xmm->en_rdp = penv_87->en_foo; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_xmm->en_tw = 0; + for (i = 0; i < 8; ++i) { sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i]; + if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) + penv_xmm->en_tw |= 1 << i; + } + for (i = 8; i < 16; ++i) bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc)); fpuuserinited(td); From owner-svn-src-all@freebsd.org Sat Jun 24 13:53:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57C9CD9F243; Sat, 24 Jun 2017 13:53:49 +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 25AD46A77A; Sat, 24 Jun 2017 13:53:49 +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 v5ODrmG7037450; Sat, 24 Jun 2017 13:53:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ODrmhP037449; Sat, 24 Jun 2017 13:53:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241353.v5ODrmhP037449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 13:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320309 - stable/11/sys/i386/isa X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 13:53:49 -0000 Author: kib Date: Sat Jun 24 13:53:47 2017 New Revision: 320309 URL: https://svnweb.freebsd.org/changeset/base/320309 Log: MFC r320051: Correct translations between abridged and full x87 tags. Approved by: re (marius) Modified: stable/11/sys/i386/isa/npx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/isa/npx.c ============================================================================== --- stable/11/sys/i386/isa/npx.c Sat Jun 24 11:38:31 2017 (r320308) +++ stable/11/sys/i386/isa/npx.c Sat Jun 24 13:53:47 2017 (r320309) @@ -1116,7 +1116,7 @@ npx_fill_fpregs_xmm1(struct savexmm *sv_xmm, struct sa sv_87->sv_ac[i] = sv_xmm->sv_fp[i].fp_acc; if ((penv_xmm->en_tw & (1 << i)) != 0) /* zero and special are set as valid */ - penv_87->en_tw &= ~(3 << i); + penv_87->en_tw &= ~(3 << i * 2); } } @@ -1147,11 +1147,16 @@ npx_set_fpregs_xmm(struct save87 *sv_87, struct savexm penv_xmm->en_foo = penv_87->en_foo; penv_xmm->en_fos = penv_87->en_fos; - /* FPU registers and tags */ + /* + * FPU registers and tags. + * Abridged / Full translation (values in binary), see FXSAVE spec. + * 0 11 + * 1 00, 01, 10 + */ penv_xmm->en_tw = 0; for (i = 0; i < 8; ++i) { sv_xmm->sv_fp[i].fp_acc = sv_87->sv_ac[i]; - if ((penv_87->en_tw && (3 << i)) != (3 << i)) + if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) penv_xmm->en_tw |= 1 << i; } } From owner-svn-src-all@freebsd.org Sat Jun 24 14:32:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFADDD9FAB1; Sat, 24 Jun 2017 14:32:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A63416E579; Sat, 24 Jun 2017 14:32:58 +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 v5OEWvsA053479; Sat, 24 Jun 2017 14:32:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OEWv7Q053478; Sat, 24 Jun 2017 14:32:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706241432.v5OEWv7Q053478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 24 Jun 2017 14:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320310 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 14:32:59 -0000 Author: imp Date: Sat Jun 24 14:32:57 2017 New Revision: 320310 URL: https://svnweb.freebsd.org/changeset/base/320310 Log: Document that the dependencies aren't quite right for non-clean build. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jun 24 13:53:47 2017 (r320309) +++ head/UPDATING Sat Jun 24 14:32:57 2017 (r320310) @@ -51,17 +51,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** -20170620: - Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC - if you require the GPL compiler. - -20170619: +20170623: Forward compatibility for the "ino64" project have been committed. This will allow most new binaries to run on older kernels in a limited fashion. This prevents many of the common foot-shooting actions in the upgrade as well as the limited ability to roll back the kernel across the ino64 upgrade. Complicated use cases may not work properly, though - enough simpler ones work to allow recovery in most situations. + enough simpler ones work to allow recovery in most situations. There is an + issue with dependencies which may not properly rebuild everything needed + when doing a NO_CLEAN build. Removing *stat*o in lib/libc obj tree is + sufficient to avoid this issue. + +20170620: + Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC + if you require the GPL compiler. 20170618: The internal ABI used for communication between the NFS kernel modules From owner-svn-src-all@freebsd.org Sat Jun 24 14:41:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 466DBD9FCF9; Sat, 24 Jun 2017 14:41:59 +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 22F8D6EA78; Sat, 24 Jun 2017 14:41:59 +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 v5OEfw63057364; Sat, 24 Jun 2017 14:41:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OEfwsx057363; Sat, 24 Jun 2017 14:41:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241441.v5OEfwsx057363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 14:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320311 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 14:41:59 -0000 Author: kib Date: Sat Jun 24 14:41:57 2017 New Revision: 320311 URL: https://svnweb.freebsd.org/changeset/base/320311 Log: MFC r320052: Do not leak syslog_mutex on cancellation. Approved by: re (marius) Modified: stable/11/lib/libc/gen/syslog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/syslog.c ============================================================================== --- stable/11/lib/libc/gen/syslog.c Sat Jun 24 14:32:57 2017 (r320310) +++ stable/11/lib/libc/gen/syslog.c Sat Jun 24 14:41:57 2017 (r320311) @@ -129,8 +129,8 @@ syslog(int pri, const char *fmt, ...) va_end(ap); } -void -vsyslog(int pri, const char *fmt, va_list ap) +static void +vsyslog1(int pri, const char *fmt, va_list ap) { int cnt; char ch, *p; @@ -151,13 +151,9 @@ vsyslog(int pri, const char *fmt, va_list ap) saved_errno = errno; - THREAD_LOCK(); - /* Check priority against setlogmask values. */ - if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) { - THREAD_UNLOCK(); + if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) return; - } /* Set default facility if none specified. */ if ((pri & LOG_FACMASK) == 0) @@ -167,10 +163,8 @@ vsyslog(int pri, const char *fmt, va_list ap) tbuf_cookie.base = tbuf; tbuf_cookie.left = sizeof(tbuf); fp = fwopen(&tbuf_cookie, writehook); - if (fp == NULL) { - THREAD_UNLOCK(); + if (fp == NULL) return; - } /* Build the message. */ (void)time(&now); @@ -200,7 +194,6 @@ vsyslog(int pri, const char *fmt, va_list ap) fmt_fp = fwopen(&fmt_cookie, writehook); if (fmt_fp == NULL) { fclose(fp); - THREAD_UNLOCK(); return; } @@ -285,10 +278,8 @@ vsyslog(int pri, const char *fmt, va_list ap) */ disconnectlog(); connectlog(); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } /* * if the resend failed, fall through to * possible scenario 2 @@ -303,15 +294,11 @@ vsyslog(int pri, const char *fmt, va_list ap) if (status == CONNPRIV) break; _usleep(1); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } } - } else { - THREAD_UNLOCK(); + } else return; - } /* * Output the message to the console; try not to block @@ -333,10 +320,25 @@ vsyslog(int pri, const char *fmt, va_list ap) (void)_writev(fd, iov, 2); (void)_close(fd); } +} +static void +syslog_cancel_cleanup(void *arg __unused) +{ + THREAD_UNLOCK(); } +void +vsyslog(int pri, const char *fmt, va_list ap) +{ + + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); + vsyslog1(pri, fmt, ap); + pthread_cleanup_pop(1); +} + /* Should be called with mutex acquired */ static void disconnectlog(void) @@ -423,9 +425,11 @@ openlog_unlocked(const char *ident, int logstat, int l void openlog(const char *ident, int logstat, int logfac) { + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); openlog_unlocked(ident, logstat, logfac); - THREAD_UNLOCK(); + pthread_cleanup_pop(1); } From owner-svn-src-all@freebsd.org Sat Jun 24 14:45:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48925D9FF03; Sat, 24 Jun 2017 14:45: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 2523C6EC61; Sat, 24 Jun 2017 14:45: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 v5OEix49057542; Sat, 24 Jun 2017 14:44:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OEixDV057541; Sat, 24 Jun 2017 14:44:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241444.v5OEixDV057541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 14:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320312 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 14:45:00 -0000 Author: kib Date: Sat Jun 24 14:44:59 2017 New Revision: 320312 URL: https://svnweb.freebsd.org/changeset/base/320312 Log: MFC r320052: Do not leak syslog_mutex on cancellation. Modified: stable/10/lib/libc/gen/syslog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/syslog.c ============================================================================== --- stable/10/lib/libc/gen/syslog.c Sat Jun 24 14:41:57 2017 (r320311) +++ stable/10/lib/libc/gen/syslog.c Sat Jun 24 14:44:59 2017 (r320312) @@ -129,8 +129,8 @@ syslog(int pri, const char *fmt, ...) va_end(ap); } -void -vsyslog(int pri, const char *fmt, va_list ap) +static void +vsyslog1(int pri, const char *fmt, va_list ap) { int cnt; char ch, *p; @@ -151,13 +151,9 @@ vsyslog(int pri, const char *fmt, va_list ap) saved_errno = errno; - THREAD_LOCK(); - /* Check priority against setlogmask values. */ - if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) { - THREAD_UNLOCK(); + if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) return; - } /* Set default facility if none specified. */ if ((pri & LOG_FACMASK) == 0) @@ -167,10 +163,8 @@ vsyslog(int pri, const char *fmt, va_list ap) tbuf_cookie.base = tbuf; tbuf_cookie.left = sizeof(tbuf); fp = fwopen(&tbuf_cookie, writehook); - if (fp == NULL) { - THREAD_UNLOCK(); + if (fp == NULL) return; - } /* Build the message. */ (void)time(&now); @@ -200,7 +194,6 @@ vsyslog(int pri, const char *fmt, va_list ap) fmt_fp = fwopen(&fmt_cookie, writehook); if (fmt_fp == NULL) { fclose(fp); - THREAD_UNLOCK(); return; } @@ -285,10 +278,8 @@ vsyslog(int pri, const char *fmt, va_list ap) */ disconnectlog(); connectlog(); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } /* * if the resend failed, fall through to * possible scenario 2 @@ -303,15 +294,11 @@ vsyslog(int pri, const char *fmt, va_list ap) if (status == CONNPRIV) break; _usleep(1); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } } - } else { - THREAD_UNLOCK(); + } else return; - } /* * Output the message to the console; try not to block @@ -333,10 +320,25 @@ vsyslog(int pri, const char *fmt, va_list ap) (void)_writev(fd, iov, 2); (void)_close(fd); } +} +static void +syslog_cancel_cleanup(void *arg __unused) +{ + THREAD_UNLOCK(); } +void +vsyslog(int pri, const char *fmt, va_list ap) +{ + + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); + vsyslog1(pri, fmt, ap); + pthread_cleanup_pop(1); +} + /* Should be called with mutex acquired */ static void disconnectlog(void) @@ -423,9 +425,11 @@ openlog_unlocked(const char *ident, int logstat, int l void openlog(const char *ident, int logstat, int logfac) { + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); openlog_unlocked(ident, logstat, logfac); - THREAD_UNLOCK(); + pthread_cleanup_pop(1); } From owner-svn-src-all@freebsd.org Sat Jun 24 16:21:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A90EDA1548; Sat, 24 Jun 2017 16:21:35 +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 3B0C370FE8; Sat, 24 Jun 2017 16:21:35 +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 v5OGLYcj096939; Sat, 24 Jun 2017 16:21:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OGLYNw096914; Sat, 24 Jun 2017 16:21:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241621.v5OGLYNw096914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 16:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320313 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 16:21:35 -0000 Author: kib Date: Sat Jun 24 16:21:34 2017 New Revision: 320313 URL: https://svnweb.freebsd.org/changeset/base/320313 Log: Fix typo. Noted by: alc MFC after: 3 days Modified: head/lib/libc/sys/mmap.2 Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Jun 24 14:44:59 2017 (r320312) +++ head/lib/libc/sys/mmap.2 Sat Jun 24 16:21:34 2017 (r320313) @@ -69,7 +69,7 @@ current) offsets in the object. In particular, the .Fa offset value cannot be negative. -If the object is truncated and the process later accesses a pages that +If the object is truncated and the process later accesses a page that is wholly within the truncated region, the access is aborted and a .Dv SIGBUS signal is delivered to the process. From owner-svn-src-all@freebsd.org Sat Jun 24 16:36:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A66DA1CDB; Sat, 24 Jun 2017 16:36:31 +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 AF8037223F; Sat, 24 Jun 2017 16:36:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5OGaURs005022; Sat, 24 Jun 2017 16:36:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OGaUsi005021; Sat, 24 Jun 2017 16:36:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241636.v5OGaUsi005021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 16:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320314 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 16:36:32 -0000 Author: kib Date: Sat Jun 24 16:36:30 2017 New Revision: 320314 URL: https://svnweb.freebsd.org/changeset/base/320314 Log: Remove the description of MAP_HASSEMAPHORE. The flag is not implemented, all FreeBSD architectures correctly handle locks on normal cacheable mappings. On the other hand, the flag was specified by some software, so it is kept in the header as nop. Removal from the man page should discourage its use. Reviewed by: alc, bjk, emaste, markj, pho MFC after: 3 days X-Differential revision: https://reviews.freebsd.org/D11306 Modified: head/lib/libc/sys/mmap.2 Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Jun 24 16:21:34 2017 (r320313) +++ head/lib/libc/sys/mmap.2 Sat Jun 24 16:36:30 2017 (r320314) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 4, 2017 +.Dd June 22, 2017 .Dt MMAP 2 .Os .Sh NAME @@ -199,9 +199,6 @@ In contrast, if .Dv MAP_EXCL is specified, the request will fail if a mapping already exists within the range. -.It Dv MAP_HASSEMAPHORE -Notify the kernel that the region may contain semaphores and that special -handling may be necessary. .It Dv MAP_NOCORE Region is not included in a core file. .It Dv MAP_NOSYNC From owner-svn-src-all@freebsd.org Sat Jun 24 16:41:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B86E7DA1EC3; Sat, 24 Jun 2017 16:41:27 +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 94A9672542; Sat, 24 Jun 2017 16:41:27 +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 v5OGfQQY008235; Sat, 24 Jun 2017 16:41:26 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OGfQoM008230; Sat, 24 Jun 2017 16:41:26 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706241641.v5OGfQoM008230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 24 Jun 2017 16:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320315 - in head/sys: arm/allwinner arm/conf conf modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 16:41:27 -0000 Author: manu Date: Sat Jun 24 16:41:26 2017 New Revision: 320315 URL: https://svnweb.freebsd.org/changeset/base/320315 Log: Allwinner: Add support for H2 Plus SoC H2+ SoC is a stripped down version of H3 without gigabit ethernet and 4K HDMI. Also add sun8i-h2-plus-orangepi-zero.dts to the build as we run on this board. Modified: head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/aw_machdep.c head/sys/arm/conf/GENERIC head/sys/conf/options.arm head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Sat Jun 24 16:36:30 2017 (r320314) +++ head/sys/arm/allwinner/aw_ccu.c Sat Jun 24 16:41:26 2017 (r320315) @@ -82,6 +82,7 @@ static struct ofw_compat_data compat_data[] = { { "allwinner,sun50i-a64", CLOCK_CCU }, { "allwinner,sun8i-a33", CLOCK_CCU }, { "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL }, + { "allwinner,sun8i-h2-plus", CLOCK_CCU|CLOCK_PRCM }, { "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM }, { NULL, 0 } }; Modified: head/sys/arm/allwinner/aw_machdep.c ============================================================================== --- head/sys/arm/allwinner/aw_machdep.c Sat Jun 24 16:36:30 2017 (r320314) +++ head/sys/arm/allwinner/aw_machdep.c Sat Jun 24 16:41:26 2017 (r320315) @@ -261,6 +261,21 @@ static platform_method_t a83t_methods[] = { FDT_PLATFORM_DEF(a83t, "a83t", 0, "allwinner,sun8i-a83t", 200); #endif +#if defined(SOC_ALLWINNER_H2PLUS) +static platform_method_t h2_plus_methods[] = { + PLATFORMMETHOD(platform_attach, h3_attach), + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid), +#endif + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(h2_plus, "h2_plus", 0, "allwinner,sun8i-h2-plus", 200); +#endif + #if defined(SOC_ALLWINNER_H3) static platform_method_t h3_methods[] = { PLATFORMMETHOD(platform_attach, h3_attach), @@ -275,6 +290,8 @@ static platform_method_t h3_methods[] = { }; FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200); #endif + + u_int allwinner_soc_type(void) Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Sat Jun 24 16:36:30 2017 (r320314) +++ head/sys/arm/conf/GENERIC Sat Jun 24 16:41:26 2017 (r320315) @@ -53,6 +53,7 @@ options SOC_ALLWINNER_A31 options SOC_ALLWINNER_A31S options SOC_ALLWINNER_A33 options SOC_ALLWINNER_A83T +options SOC_ALLWINNER_H2PLUS options SOC_ALLWINNER_H3 options SOC_BCM2836 options SOC_TI_AM335X Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Jun 24 16:36:30 2017 (r320314) +++ head/sys/conf/options.arm Sat Jun 24 16:41:26 2017 (r320315) @@ -50,6 +50,7 @@ SOC_ALLWINNER_A31 opt_global.h SOC_ALLWINNER_A31S opt_global.h SOC_ALLWINNER_A33 opt_global.h SOC_ALLWINNER_A83T opt_global.h +SOC_ALLWINNER_H2PLUS opt_global.h SOC_ALLWINNER_H3 opt_global.h SOC_ALTERA_ARRIA10 opt_global.h SOC_ALTERA_CYCLONE5 opt_global.h Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Sat Jun 24 16:36:30 2017 (r320314) +++ head/sys/modules/dtb/allwinner/Makefile Sat Jun 24 16:41:26 2017 (r320315) @@ -13,6 +13,7 @@ DTS= \ sun7i-a20-cubieboard2.dts \ sun7i-a20-olimex-som-evb.dts \ sun7i-a20-pcduino3.dts \ + sun8i-h2-plus-orangepi-zero.dts \ sun8i-h3-orangepi-one.dts LINKS= \ From owner-svn-src-all@freebsd.org Sat Jun 24 16:47:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A94DFDA2042; Sat, 24 Jun 2017 16:47:42 +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 79B3172872; Sat, 24 Jun 2017 16:47:42 +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 v5OGlfTp009253; Sat, 24 Jun 2017 16:47:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OGlfPn009252; Sat, 24 Jun 2017 16:47:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241647.v5OGlfPn009252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 16:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320316 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 16:47:42 -0000 Author: kib Date: Sat Jun 24 16:47:41 2017 New Revision: 320316 URL: https://svnweb.freebsd.org/changeset/base/320316 Log: Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread. The issue is catched by "vm_map_wire: alien wire" KASSERT at the end of the vm_map_wire(). We currently check for MAP_ENTRY_WIRE_SKIPPED flag before ensuring that the wiring_thread is curthread. For HOLESOK wiring, this means that we might see WIRE_SKIPPED entry from different wiring. The fix it by only checking WIRE_SKIPPED if the entry is put IN_TRANSITION by us. Also fixed a typo in the comment explaining the situation. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jun 24 16:41:26 2017 (r320315) +++ head/sys/vm/vm_map.c Sat Jun 24 16:47:41 2017 (r320316) @@ -2712,9 +2712,6 @@ done: } for (entry = first_entry; entry != &map->header && entry->start < end; entry = entry->next) { - if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) - goto next_entry_done; - /* * If VM_MAP_WIRE_HOLESOK was specified, an empty * space in the unwired region could have been mapped @@ -2722,7 +2719,7 @@ done: * pages or draining MAP_ENTRY_IN_TRANSITION. * Moreover, another thread could be simultaneously * wiring this new mapping entry. Detect these cases - * and skip any entries marked as in transition by us. + * and skip any entries marked as in transition not by us. */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { @@ -2730,6 +2727,9 @@ done: ("vm_map_wire: !HOLESOK and new/changed entry")); continue; } + + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) + goto next_entry_done; if (rv == KERN_SUCCESS) { if (user_wire) From owner-svn-src-all@freebsd.org Sat Jun 24 17:01:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CED5DA23DF; Sat, 24 Jun 2017 17:01:13 +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 EBFCD72EA4; Sat, 24 Jun 2017 17:01:12 +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 v5OH1CjD015281; Sat, 24 Jun 2017 17:01:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OH1BUg015272; Sat, 24 Jun 2017 17:01:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241701.v5OH1BUg015272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 17:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320317 - in head: lib/libc/sys sys/sys sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 17:01:13 -0000 Author: kib Date: Sat Jun 24 17:01:11 2017 New Revision: 320317 URL: https://svnweb.freebsd.org/changeset/base/320317 Log: Implement address space guards. Guard, requested by the MAP_GUARD mmap(2) flag, prevents the reuse of the allocated address space, but does not allow instantiation of the pages in the range. It is useful for more explicit support for usual two-stage reserve then commit allocators, since it prevents accidental instantiation of the mapping, e.g. by mprotect(2). Use guards to reimplement stack grow code. Explicitely track stack grow area with the guard, including the stack guard page. On stack grow, trivial shift of the guard map entry and stack map entry limits makes the stack expansion. Move the code to detect stack grow and call vm_map_growstack(), from vm_fault() into vm_map_lookup(). As result, it is impossible to get random mapping to occur in the stack grow area, or to overlap the stack guard page. Enable stack guard page by default. Reviewed by: alc, markj Man page update reviewed by: alc, bjk, emaste, markj, pho Tested by: pho, Qualys Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D11306 (man pages) Modified: head/lib/libc/sys/mmap.2 head/lib/libc/sys/munmap.2 head/sys/sys/mman.h head/sys/sys/param.h head/sys/vm/vm.h head/sys/vm/vm_fault.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Jun 24 16:47:41 2017 (r320316) +++ head/lib/libc/sys/mmap.2 Sat Jun 24 17:01:11 2017 (r320317) @@ -199,6 +199,21 @@ In contrast, if .Dv MAP_EXCL is specified, the request will fail if a mapping already exists within the range. +.It Dv MAP_GUARD +Instead of a mapping, create a guard of the specified size. +Guards allow a process to create reservations in its address space, +which can later be replaced by actual mappings. +.Pp +.Fa mmap +will not create mappings in the address range of a guard unless +the request specifies +.Dv MAP_FIXED . +Guards can be destroyed with +.Xr munmap 2 . +Any memory access by a thread to the guarded range results +in the delivery of a +.Dv SIGSEGV +signal to that thread. .It Dv MAP_NOCORE Region is not included in a core file. .It Dv MAP_NOSYNC @@ -303,6 +318,7 @@ must include at least .Dv PROT_READ and .Dv PROT_WRITE . +.Pp This option creates a memory region that grows to at most .Fa len @@ -313,6 +329,10 @@ stack top is the starting address returned by the call bytes. The bottom of the stack at maximum growth is the starting address returned by the call. +The system uses guards to prevent the inadvertent use of +regions into which stacks created with +.Dv MAP_STACK +will automatically grow, without mapping the whole stack in advance. .El .Pp The @@ -406,6 +426,7 @@ were specified. .It Bq Er EINVAL None of .Dv MAP_ANON , +.Dv MAP_GUARD , .Dv MAP_PRIVATE , .Dv MAP_SHARED , or @@ -455,6 +476,25 @@ were specified, but the requested region is already us was specified, but .Dv MAP_FIXED was not. +.It Bq Er EINVAL +.Dv MAP_GUARD +was specified, but the +.Fa offset +argument was not zero, the +.Fa fd +argument was not -1, or the +.Fa prot +argument was not +.Dv PROT_NONE . +.It Bq Er EINVAL +.Dv MAP_GUARD +was specified together with one of the flags +.Dv MAP_ANON , +.Dv MAP_PREFAULT , +.Dv MAP_PREFAULT_READ , +.Dv MAP_PRIVATE , +.Dv MAP_SHARED , +.Dv MAP_STACK . .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: head/lib/libc/sys/munmap.2 ============================================================================== --- head/lib/libc/sys/munmap.2 Sat Jun 24 16:47:41 2017 (r320316) +++ head/lib/libc/sys/munmap.2 Sat Jun 24 17:01:11 2017 (r320317) @@ -28,7 +28,7 @@ .\" @(#)munmap.2 8.3 (Berkeley) 5/27/94 .\" $FreeBSD$ .\" -.Dd May 27, 1994 +.Dd June 22, 2017 .Dt MUNMAP 2 .Os .Sh NAME @@ -44,7 +44,7 @@ The .Fn munmap system call -deletes the mappings for the specified address range, +deletes the mappings and guards for the specified address range, and causes further references to addresses within the range to generate invalid memory references. .Sh RETURN VALUES Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/sys/mman.h Sat Jun 24 17:01:11 2017 (r320317) @@ -90,6 +90,7 @@ /* * Extended flags */ +#define MAP_GUARD 0x00002000 /* reserve but don't map address range */ #define MAP_EXCL 0x00004000 /* for MAP_FIXED, fail if address is used */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ #define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/sys/param.h Sat Jun 24 17:01:11 2017 (r320317) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200034 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200035 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, @@ -76,12 +76,13 @@ #undef __FreeBSD_kernel__ #define __FreeBSD_kernel__ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(IN_RTLD) #define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #define P_OSREL_MAP_FSTRICT 1100036 #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 +#define P_OSREL_MAP_GUARD 1200035 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif Modified: head/sys/vm/vm.h ============================================================================== --- head/sys/vm/vm.h Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/vm/vm.h Sat Jun 24 17:01:11 2017 (r320317) @@ -78,6 +78,7 @@ typedef u_char vm_prot_t; /* protection codes */ #define VM_PROT_WRITE ((vm_prot_t) 0x02) #define VM_PROT_EXECUTE ((vm_prot_t) 0x04) #define VM_PROT_COPY ((vm_prot_t) 0x08) /* copy-on-read */ +#define VM_PROT_FAULT_LOOKUP ((vm_prot_t) 0x010) #define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) #define VM_PROT_RW (VM_PROT_READ|VM_PROT_WRITE) Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/vm/vm_fault.c Sat Jun 24 17:01:11 2017 (r320317) @@ -495,13 +495,12 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot int locked, nera, result, rv; u_char behavior; boolean_t wired; /* Passed by reference. */ - bool dead, growstack, hardfault, is_first_object_locked; + bool dead, hardfault, is_first_object_locked; VM_CNT_INC(v_vm_faults); fs.vp = NULL; faultcount = 0; nera = -1; - growstack = true; hardfault = false; RetryFault:; @@ -511,17 +510,10 @@ RetryFault:; * search. */ fs.map = map; - result = vm_map_lookup(&fs.map, vaddr, fault_type, &fs.entry, - &fs.first_object, &fs.first_pindex, &prot, &wired); + result = vm_map_lookup(&fs.map, vaddr, fault_type | + VM_PROT_FAULT_LOOKUP, &fs.entry, &fs.first_object, + &fs.first_pindex, &prot, &wired); if (result != KERN_SUCCESS) { - if (growstack && result == KERN_INVALID_ADDRESS && - map != kernel_map) { - result = vm_map_growstack(curproc, vaddr); - if (result != KERN_SUCCESS) - return (KERN_FAILURE); - growstack = false; - goto RetryFault; - } unlock_vp(&fs); return (result); } @@ -546,6 +538,8 @@ RetryFault:; vm_map_unlock(fs.map); goto RetryFault; } + + MPASS((fs.entry->eflags & MAP_ENTRY_GUARD) == 0); if (wired) fault_type = prot | (fault_type & VM_PROT_COPY); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/vm/vm_map.c Sat Jun 24 17:01:11 2017 (r320317) @@ -133,6 +133,8 @@ static void _vm_map_init(vm_map_t map, pmap_t pmap, vm static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map); static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); static void vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry); +static int vm_map_growstack(vm_map_t map, vm_offset_t addr, + vm_map_entry_t gap_entry); static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); #ifdef INVARIANTS @@ -1214,6 +1216,10 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof if (prev_entry->next != &map->header && prev_entry->next->start < end) return (KERN_NO_SPACE); + if ((cow & MAP_CREATE_GUARD) != 0 && (object != NULL || + max != VM_PROT_NONE)) + return (KERN_INVALID_ARGUMENT); + protoeflags = 0; if (cow & MAP_COPY_ON_WRITE) protoeflags |= MAP_ENTRY_COW | MAP_ENTRY_NEEDS_COPY; @@ -1229,13 +1235,19 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof protoeflags |= MAP_ENTRY_GROWS_UP; if (cow & MAP_VN_WRITECOUNT) protoeflags |= MAP_ENTRY_VN_WRITECNT; + if ((cow & MAP_CREATE_GUARD) != 0) + protoeflags |= MAP_ENTRY_GUARD; + if ((cow & MAP_CREATE_STACK_GAP_DN) != 0) + protoeflags |= MAP_ENTRY_STACK_GAP_DN; + if ((cow & MAP_CREATE_STACK_GAP_UP) != 0) + protoeflags |= MAP_ENTRY_STACK_GAP_UP; if (cow & MAP_INHERIT_SHARE) inheritance = VM_INHERIT_SHARE; else inheritance = VM_INHERIT_DEFAULT; cred = NULL; - if (cow & (MAP_ACC_NO_CHARGE | MAP_NOFAULT)) + if ((cow & (MAP_ACC_NO_CHARGE | MAP_NOFAULT | MAP_CREATE_GUARD)) != 0) goto charged; if ((cow & MAP_ACC_CHARGED) || ((prot & VM_PROT_WRITE) && ((protoeflags & MAP_ENTRY_NEEDS_COPY) || object == NULL))) { @@ -1284,7 +1296,8 @@ charged: if (prev_entry->inheritance == inheritance && prev_entry->protection == prot && prev_entry->max_protection == max) { - map->size += end - prev_entry->end; + if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0) + map->size += end - prev_entry->end; prev_entry->end = end; vm_map_entry_resize_free(map, prev_entry); vm_map_simplify_entry(map, prev_entry); @@ -1321,7 +1334,6 @@ charged: new_entry->eflags = protoeflags; new_entry->object.vm_object = object; new_entry->offset = offset; - new_entry->avail_ssize = 0; new_entry->inheritance = inheritance; new_entry->protection = prot; @@ -1339,7 +1351,8 @@ charged: * Insert the new entry into the list */ vm_map_entry_link(map, prev_entry, new_entry); - map->size += new_entry->end - new_entry->start; + if ((new_entry->eflags & MAP_ENTRY_GUARD) == 0) + map->size += new_entry->end - new_entry->start; /* * Try to coalesce the new entry with both the previous and next @@ -1674,7 +1687,8 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, * map. This is a bit of a hack, but is also about the best place to * put this improvement. */ - if (entry->object.vm_object == NULL && !map->system_map) { + if (entry->object.vm_object == NULL && !map->system_map && + (entry->eflags & MAP_ENTRY_GUARD) == 0) { vm_object_t object; object = vm_object_allocate(OBJT_DEFAULT, atop(entry->end - entry->start)); @@ -1753,7 +1767,8 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v * map. This is a bit of a hack, but is also about the best place to * put this improvement. */ - if (entry->object.vm_object == NULL && !map->system_map) { + if (entry->object.vm_object == NULL && !map->system_map && + (entry->eflags & MAP_ENTRY_GUARD) == 0) { vm_object_t object; object = vm_object_allocate(OBJT_DEFAULT, atop(entry->end - entry->start)); @@ -2010,7 +2025,8 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_off if (set_max || ((new_prot & ~(current->protection)) & VM_PROT_WRITE) == 0 || - ENTRY_CHARGED(current)) { + ENTRY_CHARGED(current) || + (current->eflags & MAP_ENTRY_GUARD) != 0) { continue; } @@ -2059,6 +2075,9 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_off */ for (current = entry; current != &map->header && current->start < end; current = current->next) { + if ((current->eflags & MAP_ENTRY_GUARD) != 0) + continue; + old_prot = current->protection; if (set_max) @@ -2312,7 +2331,9 @@ vm_map_inherit(vm_map_t map, vm_offset_t start, vm_off entry = temp_entry->next; while ((entry != &map->header) && (entry->start < end)) { vm_map_clip_end(map, entry, end); - entry->inheritance = new_inheritance; + if ((entry->eflags & MAP_ENTRY_GUARD) == 0 || + new_inheritance != VM_INHERIT_ZERO) + entry->inheritance = new_inheritance; vm_map_simplify_entry(map, entry); entry = entry->next; } @@ -2918,6 +2939,15 @@ vm_map_entry_delete(vm_map_t map, vm_map_entry_t entry vm_map_entry_unlink(map, entry); object = entry->object.vm_object; + + if ((entry->eflags & MAP_ENTRY_GUARD) != 0) { + MPASS(entry->cred == NULL); + MPASS((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0); + MPASS(object == NULL); + vm_map_entry_deallocate(entry, map->system_map); + return; + } + size = entry->end - entry->start; map->size -= size; @@ -3276,6 +3306,8 @@ vmspace_map_entry_forked(const struct vmspace *vm1, st vm_size_t entrysize; vm_offset_t newend; + if ((entry->eflags & MAP_ENTRY_GUARD) != 0) + return; entrysize = entry->end - entry->start; vm2->vm_map.size += entrysize; if (entry->eflags & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) { @@ -3312,6 +3344,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c vm_map_entry_t new_entry, old_entry; vm_object_t object; int locked; + vm_inherit_t inh; old_map = &vm1->vm_map; /* Copy immutable fields of vm1 to vm2. */ @@ -3334,7 +3367,12 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c if (old_entry->eflags & MAP_ENTRY_IS_SUB_MAP) panic("vm_map_fork: encountered a submap"); - switch (old_entry->inheritance) { + inh = old_entry->inheritance; + if ((old_entry->eflags & MAP_ENTRY_GUARD) != 0 && + inh != VM_INHERIT_NONE) + inh = VM_INHERIT_COPY; + + switch (inh) { case VM_INHERIT_NONE: break; @@ -3467,7 +3505,6 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c new_entry->start = old_entry->start; new_entry->end = old_entry->end; - new_entry->avail_ssize = old_entry->avail_ssize; new_entry->eflags = old_entry->eflags & ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_VN_WRITECNT); @@ -3535,7 +3572,7 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, vm_size_t growsize, vm_prot_t prot, vm_prot_t max, int cow) { vm_map_entry_t new_entry, prev_entry; - vm_offset_t bot, top; + vm_offset_t bot, gap_bot, gap_top, top; vm_size_t init_ssize; int orient, rv; @@ -3543,10 +3580,11 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, * The stack orientation is piggybacked with the cow argument. * Extract it into orient and mask the cow argument so that we * don't pass it around further. - * NOTE: We explicitly allow bi-directional stacks. */ - orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); + orient = cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP); KASSERT(orient != 0, ("No stack grow direction")); + KASSERT(orient != (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP), + ("bi-dir stack")); if (addrbos < vm_map_min(map) || addrbos > vm_map_max(map) || @@ -3582,57 +3620,58 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, * and cow to be 0. Possibly we should eliminate these as input * parameters, and just pass these values here in the insert call. */ - if (orient == MAP_STACK_GROWS_DOWN) + if (orient == MAP_STACK_GROWS_DOWN) { bot = addrbos + max_ssize - init_ssize; - else if (orient == MAP_STACK_GROWS_UP) + top = bot + init_ssize; + gap_bot = addrbos; + gap_top = bot; + } else /* if (orient == MAP_STACK_GROWS_UP) */ { bot = addrbos; - else - bot = round_page(addrbos + max_ssize/2 - init_ssize/2); - top = bot + init_ssize; - rv = vm_map_insert(map, NULL, 0, bot, top, prot, max, cow); - - /* Now set the avail_ssize amount. */ - if (rv == KERN_SUCCESS) { - new_entry = prev_entry->next; - if (new_entry->end != top || new_entry->start != bot) - panic("Bad entry start/end for new stack entry"); - - new_entry->avail_ssize = max_ssize - init_ssize; - KASSERT((orient & MAP_STACK_GROWS_DOWN) == 0 || - (new_entry->eflags & MAP_ENTRY_GROWS_DOWN) != 0, - ("new entry lacks MAP_ENTRY_GROWS_DOWN")); - KASSERT((orient & MAP_STACK_GROWS_UP) == 0 || - (new_entry->eflags & MAP_ENTRY_GROWS_UP) != 0, - ("new entry lacks MAP_ENTRY_GROWS_UP")); + top = bot + init_ssize; + gap_bot = top; + gap_top = addrbos + max_ssize; } - + rv = vm_map_insert(map, NULL, 0, bot, top, prot, max, cow); + if (rv != KERN_SUCCESS) + return (rv); + new_entry = prev_entry->next; + KASSERT(new_entry->end == top || new_entry->start == bot, + ("Bad entry start/end for new stack entry")); + KASSERT((orient & MAP_STACK_GROWS_DOWN) == 0 || + (new_entry->eflags & MAP_ENTRY_GROWS_DOWN) != 0, + ("new entry lacks MAP_ENTRY_GROWS_DOWN")); + KASSERT((orient & MAP_STACK_GROWS_UP) == 0 || + (new_entry->eflags & MAP_ENTRY_GROWS_UP) != 0, + ("new entry lacks MAP_ENTRY_GROWS_UP")); + rv = vm_map_insert(map, NULL, 0, gap_bot, gap_top, VM_PROT_NONE, + VM_PROT_NONE, MAP_CREATE_GUARD | (orient == MAP_STACK_GROWS_DOWN ? + MAP_CREATE_STACK_GAP_DN : MAP_CREATE_STACK_GAP_UP)); + if (rv != KERN_SUCCESS) + (void)vm_map_delete(map, bot, top); return (rv); } -static int stack_guard_page = 0; +static int stack_guard_page = 1; SYSCTL_INT(_security_bsd, OID_AUTO, stack_guard_page, CTLFLAG_RWTUN, &stack_guard_page, 0, - "Insert stack guard page ahead of the growable segments."); + "Specifies the number of guard pages for a stack that grows."); -/* Attempts to grow a vm stack entry. Returns KERN_SUCCESS if the - * desired address is already mapped, or if we successfully grow - * the stack. Also returns KERN_SUCCESS if addr is outside the - * stack range (this is strange, but preserves compatibility with - * the grow function in vm_machdep.c). +/* + * Attempts to grow a vm stack entry. Returns KERN_SUCCESS if we + * successfully grow the stack. */ -int -vm_map_growstack(struct proc *p, vm_offset_t addr) +static int +vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_map_entry_t gap_entry) { - vm_map_entry_t next_entry, prev_entry; - vm_map_entry_t new_entry, stack_entry; - struct vmspace *vm = p->p_vmspace; - vm_map_t map = &vm->vm_map; - vm_offset_t end; - vm_size_t growsize; + vm_map_entry_t stack_entry; + struct proc *p; + struct vmspace *vm; + struct ucred *cred; + vm_offset_t gap_end, gap_start, grow_start; size_t grow_amount, max_grow; rlim_t lmemlim, stacklim, vmemlim; - int is_procstack, rv; - struct ucred *cred; + int rv, rv1; + bool gap_deleted, grow_down, is_procstack; #ifdef notyet uint64_t limit; #endif @@ -3640,125 +3679,71 @@ vm_map_growstack(struct proc *p, vm_offset_t addr) int error; #endif + p = curproc; + vm = p->p_vmspace; + MPASS(map == &p->p_vmspace->vm_map); + MPASS(!map->system_map); + lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK); stacklim = lim_cur(curthread, RLIMIT_STACK); vmemlim = lim_cur(curthread, RLIMIT_VMEM); -Retry: - - vm_map_lock_read(map); - - /* If addr is already in the entry range, no need to grow.*/ - if (vm_map_lookup_entry(map, addr, &prev_entry)) { - vm_map_unlock_read(map); +retry: + /* If addr is not in a hole for a stack grow area, no need to grow. */ + if (gap_entry == NULL && !vm_map_lookup_entry(map, addr, &gap_entry)) + return (KERN_FAILURE); + if ((gap_entry->eflags & MAP_ENTRY_GUARD) == 0) return (KERN_SUCCESS); - } - - next_entry = prev_entry->next; - if (!(prev_entry->eflags & MAP_ENTRY_GROWS_UP)) { - /* - * This entry does not grow upwards. Since the address lies - * beyond this entry, the next entry (if one exists) has to - * be a downward growable entry. The entry list header is - * never a growable entry, so it suffices to check the flags. - */ - if (!(next_entry->eflags & MAP_ENTRY_GROWS_DOWN)) { - vm_map_unlock_read(map); - return (KERN_SUCCESS); - } - stack_entry = next_entry; + if ((gap_entry->eflags & MAP_ENTRY_STACK_GAP_DN) != 0) { + stack_entry = gap_entry->next; + if ((stack_entry->eflags & MAP_ENTRY_GROWS_DOWN) == 0 || + stack_entry->start != gap_entry->end) + return (KERN_FAILURE); + grow_amount = round_page(stack_entry->start - addr); + grow_down = true; + } else if ((gap_entry->eflags & MAP_ENTRY_STACK_GAP_UP) != 0) { + stack_entry = gap_entry->prev; + if ((stack_entry->eflags & MAP_ENTRY_GROWS_UP) == 0 || + stack_entry->end != gap_entry->start) + return (KERN_FAILURE); + grow_amount = round_page(addr + 1 - stack_entry->end); + grow_down = false; } else { - /* - * This entry grows upward. If the next entry does not at - * least grow downwards, this is the entry we need to grow. - * otherwise we have two possible choices and we have to - * select one. - */ - if (next_entry->eflags & MAP_ENTRY_GROWS_DOWN) { - /* - * We have two choices; grow the entry closest to - * the address to minimize the amount of growth. - */ - if (addr - prev_entry->end <= next_entry->start - addr) - stack_entry = prev_entry; - else - stack_entry = next_entry; - } else - stack_entry = prev_entry; + return (KERN_FAILURE); } - - if (stack_entry == next_entry) { - KASSERT(stack_entry->eflags & MAP_ENTRY_GROWS_DOWN, ("foo")); - KASSERT(addr < stack_entry->start, ("foo")); - end = (prev_entry != &map->header) ? prev_entry->end : - stack_entry->start - stack_entry->avail_ssize; - grow_amount = roundup(stack_entry->start - addr, PAGE_SIZE); - max_grow = stack_entry->start - end; - } else { - KASSERT(stack_entry->eflags & MAP_ENTRY_GROWS_UP, ("foo")); - KASSERT(addr >= stack_entry->end, ("foo")); - end = (next_entry != &map->header) ? next_entry->start : - stack_entry->end + stack_entry->avail_ssize; - grow_amount = roundup(addr + 1 - stack_entry->end, PAGE_SIZE); - max_grow = end - stack_entry->end; - } - - if (grow_amount > stack_entry->avail_ssize) { - vm_map_unlock_read(map); + max_grow = gap_entry->end - gap_entry->start - stack_guard_page * + PAGE_SIZE; + if (grow_amount > max_grow) return (KERN_NO_SPACE); - } /* - * If there is no longer enough space between the entries nogo, and - * adjust the available space. Note: this should only happen if the - * user has mapped into the stack area after the stack was created, - * and is probably an error. - * - * This also effectively destroys any guard page the user might have - * intended by limiting the stack size. - */ - if (grow_amount + (stack_guard_page ? PAGE_SIZE : 0) > max_grow) { - if (vm_map_lock_upgrade(map)) - goto Retry; - - stack_entry->avail_ssize = max_grow; - - vm_map_unlock(map); - return (KERN_NO_SPACE); - } - - is_procstack = (addr >= (vm_offset_t)vm->vm_maxsaddr && - addr < (vm_offset_t)p->p_sysent->sv_usrstack) ? 1 : 0; - - /* * If this is the main process stack, see if we're over the stack * limit. */ - if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { - vm_map_unlock_read(map); + is_procstack = addr >= (vm_offset_t)vm->vm_maxsaddr && + addr < (vm_offset_t)p->p_sysent->sv_usrstack; + if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) return (KERN_NO_SPACE); - } + #ifdef RACCT if (racct_enable) { PROC_LOCK(p); if (is_procstack && racct_set(p, RACCT_STACK, ctob(vm->vm_ssize) + grow_amount)) { PROC_UNLOCK(p); - vm_map_unlock_read(map); return (KERN_NO_SPACE); } PROC_UNLOCK(p); } #endif - /* Round up the grow amount modulo sgrowsiz */ - growsize = sgrowsiz; - grow_amount = roundup(grow_amount, growsize); - if (grow_amount > stack_entry->avail_ssize) - grow_amount = stack_entry->avail_ssize; + grow_amount = roundup(grow_amount, sgrowsiz); + if (grow_amount > max_grow) + grow_amount = max_grow; if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { grow_amount = trunc_page((vm_size_t)stacklim) - ctob(vm->vm_ssize); } + #ifdef notyet PROC_LOCK(p); limit = racct_get_available(p, RACCT_STACK); @@ -3766,9 +3751,9 @@ Retry: if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > limit)) grow_amount = limit - ctob(vm->vm_ssize); #endif - if (!old_mlock && map->flags & MAP_WIREFUTURE) { + + if (!old_mlock && (map->flags & MAP_WIREFUTURE) != 0) { if (ptoa(pmap_wired_count(map->pmap)) + grow_amount > lmemlim) { - vm_map_unlock_read(map); rv = KERN_NO_SPACE; goto out; } @@ -3778,7 +3763,6 @@ Retry: if (racct_set(p, RACCT_MEMLOCK, ptoa(pmap_wired_count(map->pmap)) + grow_amount)) { PROC_UNLOCK(p); - vm_map_unlock_read(map); rv = KERN_NO_SPACE; goto out; } @@ -3786,9 +3770,9 @@ Retry: } #endif } + /* If we would blow our VMEM resource limit, no go */ if (map->size + grow_amount > vmemlim) { - vm_map_unlock_read(map); rv = KERN_NO_SPACE; goto out; } @@ -3797,7 +3781,6 @@ Retry: PROC_LOCK(p); if (racct_set(p, RACCT_VMEM, map->size + grow_amount)) { PROC_UNLOCK(p); - vm_map_unlock_read(map); rv = KERN_NO_SPACE; goto out; } @@ -3805,62 +3788,42 @@ Retry: } #endif - if (vm_map_lock_upgrade(map)) - goto Retry; + if (vm_map_lock_upgrade(map)) { + gap_entry = NULL; + vm_map_lock_read(map); + goto retry; + } - if (stack_entry == next_entry) { - /* - * Growing downward. - */ - /* Get the preliminary new entry start value */ - addr = stack_entry->start - grow_amount; - - /* - * If this puts us into the previous entry, cut back our - * growth to the available space. Also, see the note above. - */ - if (addr < end) { - stack_entry->avail_ssize = max_grow; - addr = end; - if (stack_guard_page) - addr += PAGE_SIZE; + if (grow_down) { + grow_start = gap_entry->end - grow_amount; + if (gap_entry->start + grow_amount == gap_entry->end) { + gap_start = gap_entry->start; + gap_end = gap_entry->end; + vm_map_entry_delete(map, gap_entry); + gap_deleted = true; + } else { + MPASS(gap_entry->start < gap_entry->end - grow_amount); + gap_entry->end -= grow_amount; + vm_map_entry_resize_free(map, gap_entry); + gap_deleted = false; } - - rv = vm_map_insert(map, NULL, 0, addr, stack_entry->start, - next_entry->protection, next_entry->max_protection, + rv = vm_map_insert(map, NULL, 0, grow_start, + grow_start + grow_amount, + stack_entry->protection, stack_entry->max_protection, MAP_STACK_GROWS_DOWN); - - /* Adjust the available stack space by the amount we grew. */ - if (rv == KERN_SUCCESS) { - new_entry = prev_entry->next; - KASSERT(new_entry == stack_entry->prev, ("foo")); - KASSERT(new_entry->end == stack_entry->start, ("foo")); - KASSERT(new_entry->start == addr, ("foo")); - KASSERT((new_entry->eflags & MAP_ENTRY_GROWS_DOWN) != - 0, ("new entry lacks MAP_ENTRY_GROWS_DOWN")); - grow_amount = new_entry->end - new_entry->start; - new_entry->avail_ssize = stack_entry->avail_ssize - - grow_amount; - stack_entry->eflags &= ~MAP_ENTRY_GROWS_DOWN; + if (rv != KERN_SUCCESS) { + if (gap_deleted) { + rv1 = vm_map_insert(map, NULL, 0, gap_start, + gap_end, VM_PROT_NONE, VM_PROT_NONE, + MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN); + MPASS(rv1 == KERN_SUCCESS); + } else { + gap_entry->end += grow_amount; + vm_map_entry_resize_free(map, gap_entry); + } } } else { - /* - * Growing upward. - */ - addr = stack_entry->end + grow_amount; - - /* - * If this puts us into the next entry, cut back our growth - * to the available space. Also, see the note above. - */ - if (addr > end) { - stack_entry->avail_ssize = end - stack_entry->end; - addr = end; - if (stack_guard_page) - addr -= PAGE_SIZE; - } - - grow_amount = addr - stack_entry->end; + grow_start = stack_entry->end; cred = stack_entry->cred; if (cred == NULL && stack_entry->object.vm_object != NULL) cred = stack_entry->object.vm_object->cred; @@ -3872,30 +3835,30 @@ Retry: stack_entry->offset, (vm_size_t)(stack_entry->end - stack_entry->start), (vm_size_t)grow_amount, cred != NULL)) { - map->size += (addr - stack_entry->end); - /* Update the current entry. */ - stack_entry->end = addr; - stack_entry->avail_ssize -= grow_amount; + if (gap_entry->start + grow_amount == gap_entry->end) + vm_map_entry_delete(map, gap_entry); + else + gap_entry->start += grow_amount; + stack_entry->end += grow_amount; + map->size += grow_amount; vm_map_entry_resize_free(map, stack_entry); rv = KERN_SUCCESS; } else rv = KERN_FAILURE; } - if (rv == KERN_SUCCESS && is_procstack) vm->vm_ssize += btoc(grow_amount); - vm_map_unlock(map); - /* * Heed the MAP_WIREFUTURE flag if it was set for this process. */ - if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE)) { - vm_map_wire(map, - (stack_entry == next_entry) ? addr : addr - grow_amount, - (stack_entry == next_entry) ? stack_entry->start : addr, + if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE) != 0) { + vm_map_unlock(map); + vm_map_wire(map, grow_start, grow_start + grow_amount, VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); - } + vm_map_lock_read(map); + } else + vm_map_lock_downgrade(map); out: #ifdef RACCT @@ -4019,10 +3982,11 @@ vm_map_lookup(vm_map_t *var_map, /* IN/OUT */ vm_size_t size; struct ucred *cred; -RetryLookup:; +RetryLookup: vm_map_lock_read(map); +RetryLookupLocked: /* * Lookup the faulting address. */ @@ -4048,7 +4012,16 @@ RetryLookup:; * Check whether this task is allowed to have this page. */ prot = entry->protection; - fault_type &= (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); + if ((fault_typea & VM_PROT_FAULT_LOOKUP) != 0) { + fault_typea &= ~VM_PROT_FAULT_LOOKUP; + if (prot == VM_PROT_NONE && map != kernel_map && + (entry->eflags & MAP_ENTRY_GUARD) != 0 && + (entry->eflags & (MAP_ENTRY_STACK_GAP_DN | + MAP_ENTRY_STACK_GAP_UP)) != 0 && + vm_map_growstack(map, vaddr, entry) == KERN_SUCCESS) + goto RetryLookupLocked; + } + fault_type &= VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE; if ((fault_type & prot) != fault_type || prot == VM_PROT_NONE) { vm_map_unlock_read(map); return (KERN_PROTECTION_FAILURE); @@ -4282,8 +4255,9 @@ vm_map_print(vm_map_t map) db_indent += 2; for (entry = map->header.next; entry != &map->header; entry = entry->next) { - db_iprintf("map entry %p: start=%p, end=%p\n", - (void *)entry, (void *)entry->start, (void *)entry->end); + db_iprintf("map entry %p: start=%p, end=%p, eflags=%#x, \n", + (void *)entry, (void *)entry->start, (void *)entry->end, + entry->eflags); { static char *inheritance_name[4] = {"share", "copy", "none", "donate_copy"}; Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/vm/vm_map.h Sat Jun 24 17:01:11 2017 (r320317) @@ -103,7 +103,6 @@ struct vm_map_entry { struct vm_map_entry *right; /* right child in binary search tree */ vm_offset_t start; /* start address */ vm_offset_t end; /* end address */ - vm_offset_t avail_ssize; /* amt can grow if this is a stack */ vm_offset_t next_read; /* vaddr of the next sequential read */ vm_size_t adj_free; /* amount of adjacent free space */ vm_size_t max_free; /* max free space in subtree */ @@ -142,6 +141,9 @@ struct vm_map_entry { #define MAP_ENTRY_WIRE_SKIPPED 0x4000 #define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ +#define MAP_ENTRY_GUARD 0x10000 +#define MAP_ENTRY_STACK_GAP_DN 0x20000 +#define MAP_ENTRY_STACK_GAP_UP 0x40000 #ifdef _KERNEL static __inline u_char @@ -315,6 +317,7 @@ long vmspace_resident_count(struct vmspace *vmspace); #define MAP_PREFAULT_PARTIAL 0x0010 #define MAP_DISABLE_SYNCER 0x0020 #define MAP_CHECK_EXCL 0x0040 +#define MAP_CREATE_GUARD 0x0080 #define MAP_DISABLE_COREDUMP 0x0100 #define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ #define MAP_VN_WRITECOUNT 0x0400 @@ -322,6 +325,8 @@ long vmspace_resident_count(struct vmspace *vmspace); #define MAP_STACK_GROWS_UP 0x2000 #define MAP_ACC_CHARGED 0x4000 #define MAP_ACC_NO_CHARGE 0x8000 +#define MAP_CREATE_STACK_GAP_UP 0x10000 +#define MAP_CREATE_STACK_GAP_DN 0x20000 /* * vm_fault option flags @@ -387,7 +392,6 @@ int vm_map_submap (vm_map_t, vm_offset_t, vm_offset_t, int vm_map_sync(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); int vm_map_madvise (vm_map_t, vm_offset_t, vm_offset_t, int); int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); -int vm_map_growstack (struct proc *p, vm_offset_t addr); int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags); int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end, Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Jun 24 16:47:41 2017 (r320316) +++ head/sys/vm/vm_mmap.c Sat Jun 24 17:01:11 2017 (r320317) @@ -226,7 +226,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s } if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_HASSEMAPHORE | MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE | - MAP_PREFAULT_READ | + MAP_PREFAULT_READ | MAP_GUARD | #ifdef MAP_32BIT MAP_32BIT | #endif @@ -239,6 +239,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s if (prot != PROT_NONE && (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) != 0) return (EINVAL); + if ((flags & MAP_GUARD) != 0 && (prot != PROT_NONE || fd != -1 || + pos != 0 || (flags & (MAP_SHARED | MAP_PRIVATE | MAP_PREFAULT | + MAP_PREFAULT_READ | MAP_ANON | MAP_STACK)) != 0)) + return (EINVAL); /* * Align the file position to a page boundary, @@ -314,7 +318,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s * returns an error earlier. */ error = 0; - } else if (flags & MAP_ANON) { + } else if ((flags & MAP_GUARD) != 0) { + error = vm_mmap_object(&vms->vm_map, &addr, size, VM_PROT_NONE, + VM_PROT_NONE, flags, NULL, pos, FALSE, td); + } else if ((flags & MAP_ANON) != 0) { /* * Mapping blank space is trivial. * @@ -1511,6 +1518,8 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz } if ((flags & MAP_EXCL) != 0) docow |= MAP_CHECK_EXCL; + if ((flags & MAP_GUARD) != 0) + docow |= MAP_CREATE_GUARD; if (fitit) { if ((flags & MAP_ALIGNMENT_MASK) == MAP_ALIGNED_SUPER) From owner-svn-src-all@freebsd.org Sat Jun 24 17:04:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5550BDA245A; Sat, 24 Jun 2017 17:04: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 1C4997310B; Sat, 24 Jun 2017 17:04: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 v5OH4RjM017546; Sat, 24 Jun 2017 17:04:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OH4RSu017545; Sat, 24 Jun 2017 17:04:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241704.v5OH4RSu017545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 17:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320318 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 17:04:28 -0000 Author: kib Date: Sat Jun 24 17:04:27 2017 New Revision: 320318 URL: https://svnweb.freebsd.org/changeset/base/320318 Log: Use address space guard to implement inter-segment gap. Rtld checks and use old MAP_ANON/PROT_NONE method of creating gap if running on old kernel. Reviewed by: alc, markj Tested by: pho, Qualys Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Sat Jun 24 17:01:11 2017 (r320317) +++ head/libexec/rtld-elf/map_object.c Sat Jun 24 17:04:27 2017 (r320318) @@ -41,6 +41,8 @@ static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *); static int convert_flags(int); /* Elf flags -> mmap flags */ +int __getosreldate(void); + /* * Map a shared object into memory. The "fd" argument is a file descriptor, * which must be open on the object and positioned at its beginning. @@ -190,7 +192,8 @@ map_object(int fd, const char *path, const struct stat base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz); mapsize = base_vlimit - base_vaddr; base_addr = (caddr_t) base_vaddr; - base_flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE; + base_flags = __getosreldate() >= P_OSREL_MAP_GUARD ? MAP_GUARD : + MAP_PRIVATE | MAP_ANON | MAP_NOCORE; if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1]) base_flags |= MAP_ALIGNED_SUPER; if (base_vaddr != 0) From owner-svn-src-all@freebsd.org Sat Jun 24 17:10:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBFB6DA2571; Sat, 24 Jun 2017 17:10:34 +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 9D1167338F; Sat, 24 Jun 2017 17:10:34 +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 v5OHAX10018300; Sat, 24 Jun 2017 17:10:33 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OHAXZs018298; Sat, 24 Jun 2017 17:10:33 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706241710.v5OHAXZs018298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 24 Jun 2017 17:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320319 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 17:10:34 -0000 Author: alc Date: Sat Jun 24 17:10:33 2017 New Revision: 320319 URL: https://svnweb.freebsd.org/changeset/base/320319 Log: Increase the pageout cluster size to 32 pages. Decouple the pageout cluster size from the size of the hash table entry used by the swap pager for mapping (object, pindex) to a block on the swap device(s), and keep the size of a hash table entry at its current size. Eliminate a pointless macro. Reviewed by: kib, markj (an earlier version) MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D11305 Modified: head/sys/vm/swap_pager.c head/sys/vm/vm_pageout.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat Jun 24 17:04:27 2017 (r320318) +++ head/sys/vm/swap_pager.c Sat Jun 24 17:10:33 2017 (r320319) @@ -120,7 +120,7 @@ __FBSDID("$FreeBSD$"); * The 64-page limit is due to the radix code (kern/subr_blist.c). */ #ifndef MAX_PAGEOUT_CLUSTER -#define MAX_PAGEOUT_CLUSTER 16 +#define MAX_PAGEOUT_CLUSTER 32 #endif #if !defined(SWB_NPAGES) @@ -134,7 +134,7 @@ __FBSDID("$FreeBSD$"); * Unused disk addresses within a swap area are allocated and managed * using a blist. */ -#define SWAP_META_PAGES (SWB_NPAGES * 2) +#define SWAP_META_PAGES 32 #define SWAP_META_MASK (SWAP_META_PAGES - 1) struct swblock { Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Jun 24 17:04:27 2017 (r320318) +++ head/sys/vm/vm_pageout.c Sat Jun 24 17:10:33 2017 (r320319) @@ -251,8 +251,7 @@ static u_int vm_background_launder_max = 20 * 1024; SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RW, &vm_background_launder_max, 0, "background laundering cap, in kilobytes"); -#define VM_PAGEOUT_PAGE_COUNT 16 -int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT; +int vm_pageout_page_count = 32; int vm_page_max_wired; /* XXX max # of wired pages system-wide */ SYSCTL_INT(_vm, OID_AUTO, max_wired, From owner-svn-src-all@freebsd.org Sat Jun 24 18:37:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E1A1DA3B60; Sat, 24 Jun 2017 18:37:52 +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 3E5C4757B7; Sat, 24 Jun 2017 18:37:52 +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 v5OIbpvs055415; Sat, 24 Jun 2017 18:37:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OIbp9k055413; Sat, 24 Jun 2017 18:37:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706241837.v5OIbp9k055413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 24 Jun 2017 18:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320321 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 18:37:52 -0000 Author: emaste Date: Sat Jun 24 18:37:51 2017 New Revision: 320321 URL: https://svnweb.freebsd.org/changeset/base/320321 Log: Clean up stale dependencies after r320278 Our current approach to dependency tracking cannot cope with switching generated asm syscall stubs into C wrappers. Perpetuate the hack in Makefile.inc1 to paper over the problem until we can take a holistic approach to fixing dependency problems. Differential Revision: https://reviews.freebsd.org/D11344 Modified: head/Makefile.inc1 head/UPDATING Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jun 24 17:19:31 2017 (r320320) +++ head/Makefile.inc1 Sat Jun 24 18:37:51 2017 (r320321) @@ -762,14 +762,18 @@ _worldtmp: .PHONY .else rm -rf ${WORLDTMP}/legacy/usr/include .endif -# Dependencies cannot cope with certain source tree changes, particularly -# with respect to removing source files and replacing generated files. -# Handle these cases here in an ad-hoc fashion. -# 20160829 remove stale dependencies for ptrace stub, rewritten in C -# in r305012 -.for f in ptrace + +# Our current approach to dependency tracking cannot cope with certain source +# tree changes, particularly with respect to removing source files and +# replacing generated files. Handle these cases here in an ad-hoc fashion. +# +# Syscall stubs rewritten in C +# Date SVN Rev Syscalls +# 20160829 r305012 ptrace +# 20170624 r320278 fstat fstatat fstatfs getdirentries getfsstat statfs +.for f in fstat fstatat fstatfs getdirentries getfsstat ptrace statfs .if exists(${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o) - @if egrep -q '/${f}.[sS]' \ + @if egrep -qw '${f}\.[sS]' \ ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o; then \ echo Removing stale dependencies for ${f} syscall wrappers; \ rm -f ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \ Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jun 24 17:19:31 2017 (r320320) +++ head/UPDATING Sat Jun 24 18:37:51 2017 (r320321) @@ -57,10 +57,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: fashion. This prevents many of the common foot-shooting actions in the upgrade as well as the limited ability to roll back the kernel across the ino64 upgrade. Complicated use cases may not work properly, though - enough simpler ones work to allow recovery in most situations. There is an - issue with dependencies which may not properly rebuild everything needed - when doing a NO_CLEAN build. Removing *stat*o in lib/libc obj tree is - sufficient to avoid this issue. + enough simpler ones work to allow recovery in most situations. 20170620: Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC From owner-svn-src-all@freebsd.org Sat Jun 24 19:54:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AADFDA4B12; Sat, 24 Jun 2017 19:54:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 14CBB7736D; Sat, 24 Jun 2017 19:54:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id e199so1639047pfh.0; Sat, 24 Jun 2017 12:54:28 -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=N6MX5OitIXEj2pH67f0Q98V5fz+DuHsLIpv4mgMpQx0=; b=b5348gaWNLg/IRz5Cb6K6zCuvyD2HdlphsPkfgf8EpGW2jQgXorFe92mLkujUh81tV s09hjUsoFzBhWHa6hknMwNzPsxz+ZBI3WM/MZPkue8HSfSLdPkNBp6N2O8orByMy2C9A oan+6d/UbrUmty8V9vH1wLqaZ+NWLlo37ouxjWSHR4lo2+9zArUwFPJVnaosoKOvzy8F uUofvOMuNKrD1ODOkdNYFwvqmlWPKKvm+1jpGZWii+PA7fkYKnarksSULJz9XiCdp5uA zvhhTbAYB98NoiEhGUgDQwWXEvYOGRFAURXzIaJTxgPrPwoUL9bk8sdsmClVm2cbqhn7 5mQg== 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=N6MX5OitIXEj2pH67f0Q98V5fz+DuHsLIpv4mgMpQx0=; b=lm5mp1ojm67GGlunRyH/bxZbA2xzd7UI1gEE8ymoxulyEJL5XH87CYQWNezZ8GMMwB ht302+tbzpxXSY21y0jv7ebBMVDd48eFIR9xXQeshcyCmE2ycDwA3DelS9vgiin/ETJ6 EpLNDI5MIj7LWu7ODv9r2aPpt8Gm75qqyrqVwddgKZBUYgds2US1ShwMusx/bVk/t/jI RYSt4+otqZeNsLyegwiy2d2dR0MucLRZldEPbj2Mo5e7PRJ4SKtmIJI1YOczSmDURSUB CgD01/Ixy5gYR7zJdwo2ay+JkCFjeuYd9ouw7dnGDj2rtGTJAL5hgDRjypNOkdCa4Zh7 5Big== X-Gm-Message-State: AKS2vOwJjnC+5jkGTwADeyYz380JJ0RSLGhbqE7D6XMK0vIyvos+oo6h TbE/Nc0pYseM5rwdZHU= X-Received: by 10.99.188.18 with SMTP id q18mr14234293pge.79.1498334067267; Sat, 24 Jun 2017 12:54:27 -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 24sm17438797pfs.58.2017.06.24.12.54.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Jun 2017 12:54:25 -0700 (PDT) Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170623235139.GA69426@FreeBSD.org> Date: Sat, 24 Jun 2017 12:54:23 -0700 Cc: Conrad Meyer , Maxim Sobolev , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201706231739.v5NHd05x039900@repo.freebsd.org> <20170623235139.GA69426@FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 19:54:28 -0000 --Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 23, 2017, at 16:51, Glen Barber wrote: >=20 > On Fri, Jun 23, 2017 at 03:54:35PM -0700, Conrad Meyer wrote: >>> @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) >>> ffd =3D open(statfsbuf.f_mntfromname, O_RDONLY); >>> if (ffd < 0) { >>> warn("open(%s, O_RDONLY)", = statfsbuf.f_mntfromname); >>> + close(ffd); >>=20 >> This one is wrong for obvious reasons. >>=20 >=20 > It isn't obvious to me. :) open failed, so closing ffd =3D=3D -1 is a programming error (but = admittedly, pretty benign). -Ngie --Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877 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 iQIcBAEBCgAGBQJZTsNwAAoJEPWDqSZpMIYVbZMP/iG9rupG6A1N+NMah71sYrjb 6jsgJWN85OvN5ZncNBfNg85Yru1qENQbS863WlJ4k7yRVrXWqp3Sj18XNu8lpyKR P0YdQKgGLVI0pDpaaux5OYTYsjdDNU6M+z9QMdmDHVeJtnMEZKHrZwf7xzMGnJZu q6F5dMisVS8HTTXol5R/0Ym/nQgp/6B+5Xj2Z5bpsI4x1pYtI0wuEN0CaSO1WWzq hN1Fgbxgp9K+fBmFuzU5F9x5J5ryTSLgTD4k8AhLCzrY780wXnUyOf6idrrKowF4 T8G9c7JR1B8dTqniVbNYB6dtiMB3z/lzc8FG5FosDIIaEJvFTTyvGgjLj/Y3VzXK Fqthda9DkGGuZceec9EqyDNS9eOWD9uaOJQV+vffyuSQ4V83TtXNyOsqudw4onkb 5Vn9dMemCm5dyEpSuns+SDAMeFf5JJtAUcoyq+SkBWZqIHbtpsaNELU7MGfVTfNj DkrvMDRNycVU1TXlMAfbvdlzykW+2Jo5RJ0EOY4gRukneARI5p2dEOKQii9Ox5aM tNoEfu4Ykp6gP+WciRKOGDH1Bz2ar8/XkUVGcsXsin8lLHqmyZZGCRhnidBsqYQs Vz89II6vR90ogZXNr7Bxv6bKR9pgY03Vu62C8FtxiiRG1kpI0cD1hSPNp3pVCmtH cDhtf7aXR9fiuHzHU+gZ =48rq -----END PGP SIGNATURE----- --Apple-Mail=_5EEAB819-08EB-4E1A-95C1-907ECE064877-- From owner-svn-src-all@freebsd.org Sat Jun 24 20:01:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EC0EDA4D01; Sat, 24 Jun 2017 20:01:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19FE47765A; Sat, 24 Jun 2017 20:01:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5OK1MqV089125; Sat, 24 Jun 2017 20:01:22 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OK1LfG089120; Sat, 24 Jun 2017 20:01:21 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706242001.v5OK1LfG089120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 24 Jun 2017 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320322 - in head/sys/fs: nfs nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 20:01:23 -0000 Author: rmacklem Date: Sat Jun 24 20:01:21 2017 New Revision: 320322 URL: https://svnweb.freebsd.org/changeset/base/320322 Log: Add two new compound RPCs to the NFSv4.1/pNFS client. When the NFSv4.1 client is doing pNFS, it needs to get an Open and a Layout for every file it will be doing I/O on. The current code does two separate RPCs to get these. This patch adds two new compounds that do the both the Open and LayoutGet in the same RPC, reducing the RPC count. It also factors out the code that sets up and parses the LayoutGet operation into separate functions, so that the code doesn't get duplicated for these new RPCs. This patch is fairly large, but should only affect the NFSv4.1 client when the "pnfs" option is specified. PR: 219550 MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfsport.h head/sys/fs/nfs/nfsproto.h head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sat Jun 24 18:37:51 2017 (r320321) +++ head/sys/fs/nfs/nfs_commonsubs.c Sat Jun 24 20:01:21 2017 (r320322) @@ -175,7 +175,7 @@ static struct nfsrv_lughash *nfsgroupnamehash; */ int nfs_bigreply[NFSV41_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }; /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat Jun 24 18:37:51 2017 (r320321) +++ head/sys/fs/nfs/nfsport.h Sat Jun 24 20:01:21 2017 (r320322) @@ -357,11 +357,13 @@ #define NFSPROC_WRITEDS 51 #define NFSPROC_READDS 52 #define NFSPROC_COMMITDS 53 +#define NFSPROC_OPENLAYGET 54 +#define NFSPROC_CREATELAYGET 55 /* * Must be defined as one higher than the last NFSv4.1 Proc# above. */ -#define NFSV41_NPROCS 54 +#define NFSV41_NPROCS 56 #endif /* NFS_V3NPROCS */ @@ -390,7 +392,7 @@ struct nfsstatsv1 { uint64_t readlink_bios; uint64_t biocache_readdirs; uint64_t readdir_bios; - uint64_t rpccnt[NFSV41_NPROCS + 15]; + uint64_t rpccnt[NFSV41_NPROCS + 13]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS]; uint64_t srvrpc_errs; Modified: head/sys/fs/nfs/nfsproto.h ============================================================================== --- head/sys/fs/nfs/nfsproto.h Sat Jun 24 18:37:51 2017 (r320321) +++ head/sys/fs/nfs/nfsproto.h Sat Jun 24 20:01:21 2017 (r320322) @@ -342,11 +342,13 @@ #define NFSPROC_WRITEDS 51 #define NFSPROC_READDS 52 #define NFSPROC_COMMITDS 53 +#define NFSPROC_OPENLAYGET 54 +#define NFSPROC_CREATELAYGET 55 /* * Must be defined as one higher than the last NFSv4.1 Proc# above. */ -#define NFSV41_NPROCS 54 +#define NFSV41_NPROCS 56 #endif /* NFS_V3NPROCS */ Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Jun 24 18:37:51 2017 (r320321) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Jun 24 20:01:21 2017 (r320322) @@ -112,6 +112,8 @@ static struct { { NFSV4OP_WRITE, 1, "WriteDS", 7, }, { NFSV4OP_READ, 1, "ReadDS", 6, }, { NFSV4OP_COMMIT, 1, "CommitDS", 8, }, + { NFSV4OP_OPEN, 3, "OpenLayoutGet", 13, }, + { NFSV4OP_OPEN, 8, "CreateLayGet", 12, }, }; /* @@ -120,7 +122,7 @@ static struct { static int nfs_bigrequest[NFSV41_NPROCS] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0 + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }; /* Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 24 18:37:51 2017 (r320321) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 24 20:01:21 2017 (r320322) @@ -127,6 +127,29 @@ static enum nfsclds_state nfscl_getsameserver(struct n static int nfsrpc_commitds(vnode_t, uint64_t, int, struct nfsclds *, struct nfsfh *, struct ucred *, NFSPROC_T *, void *); #endif +static void nfsrv_setuplayoutget(struct nfsrv_descript *, int, uint64_t, + uint64_t, uint64_t, nfsv4stateid_t *, int, int); +static int nfsrv_parselayoutget(struct nfsrv_descript *, nfsv4stateid_t *, + int *, struct nfsclflayouthead *); +static int nfsrpc_getopenlayout(struct nfsmount *, vnode_t, u_int8_t *, + int, uint8_t *, int, uint32_t, struct nfsclopen *, uint8_t *, int, + struct nfscldeleg **, struct ucred *, NFSPROC_T *); +static int nfsrpc_getcreatelayout(vnode_t, char *, int, struct vattr *, + nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, + struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, + struct nfsfh **, int *, int *, void *, int *); +static int nfsrpc_openlayoutrpc(struct nfsmount *, vnode_t, u_int8_t *, + int, uint8_t *, int, uint32_t, struct nfsclopen *, uint8_t *, int, + struct nfscldeleg **, nfsv4stateid_t *, int, int, int *, + struct nfsclflayouthead *, int *, struct ucred *, NFSPROC_T *); +static int nfsrpc_createlayout(vnode_t, char *, int, struct vattr *, + nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, + struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, + struct nfsfh **, int *, int *, void *, int *, nfsv4stateid_t *, + int, int, int *, struct nfsclflayouthead *, int *); +static int nfsrpc_layoutgetres(struct nfsmount *, vnode_t, uint8_t *, + int, nfsv4stateid_t *, int, uint32_t *, struct nfscllayout **, + struct nfsclflayouthead *, int, int *, struct ucred *, NFSPROC_T *); /* * nfs null call from vfs. @@ -301,11 +324,27 @@ else printf(" fhl=0\n"); clidrev = 0; if (ret == NFSCLOPEN_DOOPEN) { if (np->n_v4 != NULL) { - error = nfsrpc_openrpc(nmp, vp, np->n_v4->n4_data, - np->n_v4->n4_fhlen, np->n_fhp->nfh_fh, - np->n_fhp->nfh_len, mode, op, - NFS4NODENAME(np->n_v4), np->n_v4->n4_namelen, &dp, - 0, 0x0, cred, p, 0, 0); + /* + * For the first attempt, try and get a layout, if + * pNFS is enabled for the mount. + */ + if (!NFSHASPNFS(nmp) || nfscl_enablecallb == 0 || + nfs_numnfscbd == 0 || + (np->n_flag & NNOLAYOUT) != 0 || retrycnt > 0) + error = nfsrpc_openrpc(nmp, vp, + np->n_v4->n4_data, + np->n_v4->n4_fhlen, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, mode, op, + NFS4NODENAME(np->n_v4), + np->n_v4->n4_namelen, + &dp, 0, 0x0, cred, p, 0, 0); + else + error = nfsrpc_getopenlayout(nmp, vp, + np->n_v4->n4_data, + np->n_v4->n4_fhlen, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, mode, op, + NFS4NODENAME(np->n_v4), + np->n_v4->n4_namelen, &dp, cred, p); if (dp != NULL) { #ifdef APPLE OSBitAndAtomic((int32_t)~NDELEGMOD, (UInt32 *)&np->n_flag); @@ -1894,9 +1933,15 @@ nfsrpc_create(vnode_t dvp, char *name, int namelen, st clidrev = nmp->nm_clp->nfsc_clientidrev; else clidrev = 0; - error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode, - owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp, - dstuff, &unlocked); + if (!NFSHASPNFS(nmp) || nfscl_enablecallb == 0 || + nfs_numnfscbd == 0 || retrycnt > 0) + error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, + fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, + attrflagp, dattrflagp, dstuff, &unlocked); + else + error = nfsrpc_getcreatelayout(dvp, name, namelen, vap, + cverf, fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, + attrflagp, dattrflagp, dstuff, &unlocked); /* * There is no need to invalidate cached attributes here, * since new post-delegation issue attributes are always @@ -4795,149 +4840,22 @@ nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, i nfsv4stateid_t *stateidp, int *retonclosep, struct nfsclflayouthead *flhp, struct ucred *cred, NFSPROC_T *p, void *stuff) { - uint32_t *tl; struct nfsrv_descript nfsd, *nd = &nfsd; - struct nfsfh *nfhp; - struct nfsclflayout *flp, *prevflp, *tflp; - int cnt, error, gotiomode, fhcnt, nfhlen, i, j; - uint8_t *cp; - uint64_t retlen; + int error; - flp = NULL; - gotiomode = -1; nfscl_reqstart(nd, NFSPROC_LAYOUTGET, nmp, fhp, fhlen, NULL, NULL); - NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED + 3 * NFSX_HYPER + - NFSX_STATEID); - *tl++ = newnfs_false; /* Don't signal availability. */ - *tl++ = txdr_unsigned(NFSLAYOUT_NFSV4_1_FILES); - *tl++ = txdr_unsigned(iomode); - txdr_hyper(offset, tl); - tl += 2; - txdr_hyper(len, tl); - tl += 2; - txdr_hyper(minlen, tl); - tl += 2; - *tl++ = txdr_unsigned(stateidp->seqid); - NFSCL_DEBUG(4, "layget seq=%d\n", (int)stateidp->seqid); - *tl++ = stateidp->other[0]; - *tl++ = stateidp->other[1]; - *tl++ = stateidp->other[2]; - *tl = txdr_unsigned(layoutlen); + nfsrv_setuplayoutget(nd, iomode, offset, len, minlen, stateidp, + layoutlen, 0); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); + NFSCL_DEBUG(4, "layget err=%d st=%d\n", error, nd->nd_repstat); if (error != 0) return (error); - if (nd->nd_repstat == 0) { - NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED + NFSX_STATEID); - if (*tl++ != 0) - *retonclosep = 1; - else - *retonclosep = 0; - stateidp->seqid = fxdr_unsigned(uint32_t, *tl++); - NFSCL_DEBUG(4, "retoncls=%d stseq=%d\n", *retonclosep, - (int)stateidp->seqid); - stateidp->other[0] = *tl++; - stateidp->other[1] = *tl++; - stateidp->other[2] = *tl++; - cnt = fxdr_unsigned(int, *tl); - NFSCL_DEBUG(4, "layg cnt=%d\n", cnt); - if (cnt <= 0 || cnt > 10000) { - /* Don't accept more than 10000 layouts in reply. */ - error = NFSERR_BADXDR; - goto nfsmout; - } - for (i = 0; i < cnt; i++) { - /* Dissect all the way to the file handle cnt. */ - NFSM_DISSECT(tl, uint32_t *, 3 * NFSX_HYPER + - 6 * NFSX_UNSIGNED + NFSX_V4DEVICEID); - fhcnt = fxdr_unsigned(int, *(tl + 11 + - NFSX_V4DEVICEID / NFSX_UNSIGNED)); - NFSCL_DEBUG(4, "fhcnt=%d\n", fhcnt); - if (fhcnt < 0 || fhcnt > 100) { - /* Don't accept more than 100 file handles. */ - error = NFSERR_BADXDR; - goto nfsmout; - } - if (fhcnt > 1) - flp = malloc(sizeof(*flp) + (fhcnt - 1) * - sizeof(struct nfsfh *), - M_NFSFLAYOUT, M_WAITOK); - else - flp = malloc(sizeof(*flp), - M_NFSFLAYOUT, M_WAITOK); - flp->nfsfl_flags = 0; - flp->nfsfl_fhcnt = 0; - flp->nfsfl_devp = NULL; - flp->nfsfl_off = fxdr_hyper(tl); tl += 2; - retlen = fxdr_hyper(tl); tl += 2; - if (flp->nfsfl_off + retlen < flp->nfsfl_off) - flp->nfsfl_end = UINT64_MAX - flp->nfsfl_off; - else - flp->nfsfl_end = flp->nfsfl_off + retlen; - flp->nfsfl_iomode = fxdr_unsigned(int, *tl++); - if (gotiomode == -1) - gotiomode = flp->nfsfl_iomode; - NFSCL_DEBUG(4, "layg reqiom=%d retiom=%d\n", iomode, - (int)flp->nfsfl_iomode); - if (fxdr_unsigned(int, *tl++) != - NFSLAYOUT_NFSV4_1_FILES) { - printf("NFSv4.1: got non-files layout\n"); - error = NFSERR_BADXDR; - goto nfsmout; - } - NFSBCOPY(++tl, flp->nfsfl_dev, NFSX_V4DEVICEID); - tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); - flp->nfsfl_util = fxdr_unsigned(uint32_t, *tl++); - NFSCL_DEBUG(4, "flutil=0x%x\n", flp->nfsfl_util); - flp->nfsfl_stripe1 = fxdr_unsigned(uint32_t, *tl++); - flp->nfsfl_patoff = fxdr_hyper(tl); tl += 2; - if (fxdr_unsigned(int, *tl) != fhcnt) { - printf("EEK! bad fhcnt\n"); - error = NFSERR_BADXDR; - goto nfsmout; - } - for (j = 0; j < fhcnt; j++) { - NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); - nfhlen = fxdr_unsigned(int, *tl); - if (nfhlen <= 0 || nfhlen > NFSX_V4FHMAX) { - error = NFSERR_BADXDR; - goto nfsmout; - } - nfhp = malloc(sizeof(*nfhp) + nfhlen - 1, - M_NFSFH, M_WAITOK); - flp->nfsfl_fh[j] = nfhp; - flp->nfsfl_fhcnt++; - nfhp->nfh_len = nfhlen; - NFSM_DISSECT(cp, uint8_t *, NFSM_RNDUP(nfhlen)); - NFSBCOPY(cp, nfhp->nfh_fh, nfhlen); - } - if (flp->nfsfl_iomode == gotiomode) { - /* Keep the list in increasing offset order. */ - tflp = LIST_FIRST(flhp); - prevflp = NULL; - while (tflp != NULL && - tflp->nfsfl_off < flp->nfsfl_off) { - prevflp = tflp; - tflp = LIST_NEXT(tflp, nfsfl_list); - } - if (prevflp == NULL) - LIST_INSERT_HEAD(flhp, flp, nfsfl_list); - else - LIST_INSERT_AFTER(prevflp, flp, - nfsfl_list); - } else { - printf("nfscl_layoutget(): got wrong iomode\n"); - nfscl_freeflayout(flp); - } - flp = NULL; - } - } - if (nd->nd_repstat != 0 && error == 0) + if (nd->nd_repstat == 0) + error = nfsrv_parselayoutget(nd, stateidp, retonclosep, flhp); + if (error == 0 && nd->nd_repstat != 0) error = nd->nd_repstat; -nfsmout: - if (error != 0 && flp != NULL) - nfscl_freeflayout(flp); mbuf_freem(nd->nd_mrep); return (error); } @@ -5238,8 +5156,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, str struct nfscllayout **lypp, struct ucred *cred, NFSPROC_T *p) { struct nfscllayout *lyp; - struct nfsclflayout *flp, *tflp; - struct nfscldevinfo *dip; + struct nfsclflayout *flp; struct nfsclflayouthead flh; int error = 0, islocked, layoutlen, recalled, retonclose; nfsv4stateid_t stateid; @@ -5281,35 +5198,13 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, str (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } + error = nfsrpc_layoutgetres(nmp, vp, nfhp->nfh_fh, + nfhp->nfh_len, &stateid, retonclose, notifybitsp, &lyp, + &flh, error, NULL, cred, p); if (error == 0) - LIST_FOREACH(tflp, &flh, nfsfl_list) { - error = nfscl_adddevinfo(nmp, NULL, tflp); - if (error != 0) { - error = nfsrpc_getdeviceinfo(nmp, - tflp->nfsfl_dev, - NFSLAYOUT_NFSV4_1_FILES, - notifybitsp, &dip, cred, p); - if (error != 0) - break; - error = nfscl_adddevinfo(nmp, dip, - tflp); - if (error != 0) - printf( - "getlayout: cannot add\n"); - } - } - if (error == 0) { - /* - * nfscl_layout() always returns with the nfsly_lock - * set to a refcnt (shared lock). - */ - error = nfscl_layout(nmp, vp, nfhp->nfh_fh, - nfhp->nfh_len, &stateid, retonclose, &flh, &lyp, - cred, p); - if (error == 0) - *lypp = lyp; - } else if (islocked != 0) - nfsv4_unlock(&lyp->nfsly_lock, 0); + *lypp = lyp; + else if (islocked != 0) + nfscl_rellayout(lyp, 1); } else *lypp = lyp; return (error); @@ -6031,4 +5926,756 @@ nfsmout: return (error); } #endif + +/* + * Set up the XDR arguments for the LayoutGet operation. + */ +static void +nfsrv_setuplayoutget(struct nfsrv_descript *nd, int iomode, uint64_t offset, + uint64_t len, uint64_t minlen, nfsv4stateid_t *stateidp, int layoutlen, + int usecurstateid) +{ + uint32_t *tl; + + NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED + 3 * NFSX_HYPER + + NFSX_STATEID); + *tl++ = newnfs_false; /* Don't signal availability. */ + *tl++ = txdr_unsigned(NFSLAYOUT_NFSV4_1_FILES); + *tl++ = txdr_unsigned(iomode); + txdr_hyper(offset, tl); + tl += 2; + txdr_hyper(len, tl); + tl += 2; + txdr_hyper(minlen, tl); + tl += 2; + if (usecurstateid != 0) { + /* Special stateid for Current stateid. */ + *tl++ = txdr_unsigned(1); + *tl++ = 0; + *tl++ = 0; + *tl++ = 0; + } else { + *tl++ = txdr_unsigned(stateidp->seqid); + NFSCL_DEBUG(4, "layget seq=%d\n", (int)stateidp->seqid); + *tl++ = stateidp->other[0]; + *tl++ = stateidp->other[1]; + *tl++ = stateidp->other[2]; + } + *tl = txdr_unsigned(layoutlen); +} + +/* + * Parse the reply for a successful LayoutGet operation. + */ +static int +nfsrv_parselayoutget(struct nfsrv_descript *nd, nfsv4stateid_t *stateidp, + int *retonclosep, struct nfsclflayouthead *flhp) +{ + uint32_t *tl; + struct nfsclflayout *flp, *prevflp, *tflp; + int cnt, error, gotiomode, fhcnt, nfhlen, i, j; + uint64_t retlen; + struct nfsfh *nfhp; + uint8_t *cp; + + error = 0; + flp = NULL; + gotiomode = -1; + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED + NFSX_STATEID); + if (*tl++ != 0) + *retonclosep = 1; + else + *retonclosep = 0; + stateidp->seqid = fxdr_unsigned(uint32_t, *tl++); + NFSCL_DEBUG(4, "retoncls=%d stseq=%d\n", *retonclosep, + (int)stateidp->seqid); + stateidp->other[0] = *tl++; + stateidp->other[1] = *tl++; + stateidp->other[2] = *tl++; + cnt = fxdr_unsigned(int, *tl); + NFSCL_DEBUG(4, "layg cnt=%d\n", cnt); + if (cnt <= 0 || cnt > 10000) { + /* Don't accept more than 10000 layouts in reply. */ + error = NFSERR_BADXDR; + goto nfsmout; + } + for (i = 0; i < cnt; i++) { + /* Dissect all the way to the file handle cnt. */ + NFSM_DISSECT(tl, uint32_t *, 3 * NFSX_HYPER + + 6 * NFSX_UNSIGNED + NFSX_V4DEVICEID); + fhcnt = fxdr_unsigned(int, *(tl + 11 + + NFSX_V4DEVICEID / NFSX_UNSIGNED)); + NFSCL_DEBUG(4, "fhcnt=%d\n", fhcnt); + if (fhcnt < 0 || fhcnt > 100) { + /* Don't accept more than 100 file handles. */ + error = NFSERR_BADXDR; + goto nfsmout; + } + if (fhcnt > 1) + flp = malloc(sizeof(*flp) + (fhcnt - 1) * + sizeof(struct nfsfh *), M_NFSFLAYOUT, M_WAITOK); + else + flp = malloc(sizeof(*flp), M_NFSFLAYOUT, M_WAITOK); + flp->nfsfl_flags = 0; + flp->nfsfl_fhcnt = 0; + flp->nfsfl_devp = NULL; + flp->nfsfl_off = fxdr_hyper(tl); tl += 2; + retlen = fxdr_hyper(tl); tl += 2; + if (flp->nfsfl_off + retlen < flp->nfsfl_off) + flp->nfsfl_end = UINT64_MAX - flp->nfsfl_off; + else + flp->nfsfl_end = flp->nfsfl_off + retlen; + flp->nfsfl_iomode = fxdr_unsigned(int, *tl++); + if (gotiomode == -1) + gotiomode = flp->nfsfl_iomode; + if (fxdr_unsigned(int, *tl++) != NFSLAYOUT_NFSV4_1_FILES) { + printf("NFSv4.1: got non-files layout\n"); + error = NFSERR_BADXDR; + goto nfsmout; + } + NFSBCOPY(++tl, flp->nfsfl_dev, NFSX_V4DEVICEID); + tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); + flp->nfsfl_util = fxdr_unsigned(uint32_t, *tl++); + NFSCL_DEBUG(4, "flutil=0x%x\n", flp->nfsfl_util); + flp->nfsfl_stripe1 = fxdr_unsigned(uint32_t, *tl++); + flp->nfsfl_patoff = fxdr_hyper(tl); tl += 2; + if (fxdr_unsigned(int, *tl) != fhcnt) { + printf("EEK! bad fhcnt\n"); + error = NFSERR_BADXDR; + goto nfsmout; + } + for (j = 0; j < fhcnt; j++) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + nfhlen = fxdr_unsigned(int, *tl); + if (nfhlen <= 0 || nfhlen > NFSX_V4FHMAX) { + error = NFSERR_BADXDR; + goto nfsmout; + } + nfhp = malloc(sizeof(*nfhp) + nfhlen - 1, M_NFSFH, + M_WAITOK); + flp->nfsfl_fh[j] = nfhp; + flp->nfsfl_fhcnt++; + nfhp->nfh_len = nfhlen; + NFSM_DISSECT(cp, uint8_t *, NFSM_RNDUP(nfhlen)); + NFSBCOPY(cp, nfhp->nfh_fh, nfhlen); + } + if (flp->nfsfl_iomode == gotiomode) { + /* Keep the list in increasing offset order. */ + tflp = LIST_FIRST(flhp); + prevflp = NULL; + while (tflp != NULL && + tflp->nfsfl_off < flp->nfsfl_off) { + prevflp = tflp; + tflp = LIST_NEXT(tflp, nfsfl_list); + } + if (prevflp == NULL) + LIST_INSERT_HEAD(flhp, flp, nfsfl_list); + else + LIST_INSERT_AFTER(prevflp, flp, + nfsfl_list); + } else { + printf("nfscl_layoutget(): got wrong iomode\n"); + nfscl_freeflayout(flp); + } + flp = NULL; + } +nfsmout: + if (error != 0 && flp != NULL) + nfscl_freeflayout(flp); + return (error); +} + +/* + * Similar to nfsrpc_getlayout(), except that it uses nfsrpc_openlayget(), + * so that it does both an Open and a Layoutget. + */ +static int +nfsrpc_getopenlayout(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, + int fhlen, uint8_t *newfhp, int newfhlen, uint32_t mode, + struct nfsclopen *op, uint8_t *name, int namelen, struct nfscldeleg **dpp, + struct ucred *cred, NFSPROC_T *p) +{ + struct nfscllayout *lyp; + struct nfsclflayout *flp; + struct nfsclflayouthead flh; + int error, islocked, layoutlen, recalled, retonclose, usecurstateid; + int laystat; + nfsv4stateid_t stateid; + struct nfsclsession *tsep; + + error = 0; + /* + * If lyp is returned non-NULL, there will be a refcnt (shared lock) + * on it, iff flp != NULL or a lock (exclusive lock) on it iff + * flp == NULL. + */ + lyp = nfscl_getlayout(nmp->nm_clp, newfhp, newfhlen, 0, &flp, + &recalled); + NFSCL_DEBUG(4, "nfsrpc_getopenlayout nfscl_getlayout lyp=%p\n", lyp); + if (lyp == NULL) + islocked = 0; + else if (flp != NULL) + islocked = 1; + else + islocked = 2; + if ((lyp == NULL || flp == NULL) && recalled == 0) { + LIST_INIT(&flh); + tsep = nfsmnt_mdssession(nmp); + layoutlen = tsep->nfsess_maxcache - (NFSX_STATEID + + 3 * NFSX_UNSIGNED); + if (lyp == NULL) + usecurstateid = 1; + else { + usecurstateid = 0; + stateid.seqid = lyp->nfsly_stateid.seqid; + stateid.other[0] = lyp->nfsly_stateid.other[0]; + stateid.other[1] = lyp->nfsly_stateid.other[1]; + stateid.other[2] = lyp->nfsly_stateid.other[2]; + } + error = nfsrpc_openlayoutrpc(nmp, vp, nfhp, fhlen, + newfhp, newfhlen, mode, op, name, namelen, + dpp, &stateid, usecurstateid, layoutlen, + &retonclose, &flh, &laystat, cred, p); + NFSCL_DEBUG(4, "aft nfsrpc_openlayoutrpc laystat=%d err=%d\n", + laystat, error); + laystat = nfsrpc_layoutgetres(nmp, vp, newfhp, newfhlen, + &stateid, retonclose, NULL, &lyp, &flh, laystat, &islocked, + cred, p); + } else + error = nfsrpc_openrpc(nmp, vp, nfhp, fhlen, newfhp, newfhlen, + mode, op, name, namelen, dpp, 0, 0, cred, p, 0, 0); + if (islocked == 2) + nfscl_rellayout(lyp, 1); + else if (islocked == 1) + nfscl_rellayout(lyp, 0); + return (error); +} + +/* + * This function does an Open+LayoutGet for an NFSv4.1 mount with pNFS + * enabled, only for the CLAIM_NULL case. All other NFSv4 Opens are + * handled by nfsrpc_openrpc(). + * For the case where op == NULL, dvp is the directory. When op != NULL, it + * can be NULL. + */ +static int +nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, + int fhlen, uint8_t *newfhp, int newfhlen, uint32_t mode, + struct nfsclopen *op, uint8_t *name, int namelen, struct nfscldeleg **dpp, + nfsv4stateid_t *stateidp, int usecurstateid, + int layoutlen, int *retonclosep, struct nfsclflayouthead *flhp, + int *laystatp, struct ucred *cred, NFSPROC_T *p) +{ + uint32_t *tl; + struct nfsrv_descript nfsd, *nd = &nfsd; + struct nfscldeleg *ndp = NULL; + struct nfsvattr nfsva; + struct nfsclsession *tsep; + uint32_t rflags, deleg; + nfsattrbit_t attrbits; + int error, ret, acesize, limitby, iomode; + + *dpp = NULL; + *laystatp = ENXIO; + nfscl_reqstart(nd, NFSPROC_OPENLAYGET, nmp, nfhp, fhlen, NULL, NULL); + NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); + *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); + *tl++ = txdr_unsigned((mode >> NFSLCK_SHIFT) & NFSV4OPEN_DENYBOTH); + tsep = nfsmnt_mdssession(nmp); + *tl++ = tsep->nfsess_clientid.lval[0]; + *tl = tsep->nfsess_clientid.lval[1]; + nfsm_strtom(nd, op->nfso_own->nfsow_owner, NFSV4CL_LOCKNAMELEN); + NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(NFSV4OPEN_NOCREATE); + *tl = txdr_unsigned(NFSV4OPEN_CLAIMNULL); + nfsm_strtom(nd, name, namelen); + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + NFSZERO_ATTRBIT(&attrbits); + NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_CHANGE); + NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEMODIFY); + nfsrv_putattrbit(nd, &attrbits); + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_LAYOUTGET); + if ((mode & NFSV4OPEN_ACCESSWRITE) != 0) + iomode = NFSLAYOUTIOMODE_RW; + else + iomode = NFSLAYOUTIOMODE_READ; + nfsrv_setuplayoutget(nd, iomode, 0, UINT64_MAX, 0, stateidp, + layoutlen, usecurstateid); + error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, vp, p, cred, + NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); + if (error != 0) + return (error); + NFSCL_INCRSEQID(op->nfso_own->nfsow_seqid, nd); + if (nd->nd_repstat != 0) + *laystatp = nd->nd_repstat; + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + /* ND_NOMOREDATA will be set if the Open operation failed. */ + NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + + 6 * NFSX_UNSIGNED); + op->nfso_stateid.seqid = *tl++; + op->nfso_stateid.other[0] = *tl++; + op->nfso_stateid.other[1] = *tl++; + op->nfso_stateid.other[2] = *tl; + rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); + error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL); + if (error != 0) + goto nfsmout; + NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(u_int32_t, *tl); + if (deleg == NFSV4OPEN_DELEGATEREAD || + deleg == NFSV4OPEN_DELEGATEWRITE) { + if (!(op->nfso_own->nfsow_clp->nfsc_flags & + NFSCLFLAGS_FIRSTDELEG)) + op->nfso_own->nfsow_clp->nfsc_flags |= + (NFSCLFLAGS_FIRSTDELEG | NFSCLFLAGS_GOTDELEG); + ndp = malloc(sizeof(struct nfscldeleg) + newfhlen, + M_NFSCLDELEG, M_WAITOK); + LIST_INIT(&ndp->nfsdl_owner); + LIST_INIT(&ndp->nfsdl_lock); + ndp->nfsdl_clp = op->nfso_own->nfsow_clp; + ndp->nfsdl_fhlen = newfhlen; + NFSBCOPY(newfhp, ndp->nfsdl_fh, newfhlen); + newnfs_copyincred(cred, &ndp->nfsdl_cred); + nfscl_lockinit(&ndp->nfsdl_rwlock); + NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + + NFSX_UNSIGNED); + ndp->nfsdl_stateid.seqid = *tl++; + ndp->nfsdl_stateid.other[0] = *tl++; + ndp->nfsdl_stateid.other[1] = *tl++; + ndp->nfsdl_stateid.other[2] = *tl++; + ret = fxdr_unsigned(int, *tl); + if (deleg == NFSV4OPEN_DELEGATEWRITE) { + ndp->nfsdl_flags = NFSCLDL_WRITE; + /* + * Indicates how much the file can grow. + */ + NFSM_DISSECT(tl, u_int32_t *, + 3 * NFSX_UNSIGNED); + limitby = fxdr_unsigned(int, *tl++); + switch (limitby) { + case NFSV4OPEN_LIMITSIZE: + ndp->nfsdl_sizelimit = fxdr_hyper(tl); + break; + case NFSV4OPEN_LIMITBLOCKS: + ndp->nfsdl_sizelimit = + fxdr_unsigned(u_int64_t, *tl++); + ndp->nfsdl_sizelimit *= + fxdr_unsigned(u_int64_t, *tl); + break; + default: + error = NFSERR_BADXDR; + goto nfsmout; + }; + } else + ndp->nfsdl_flags = NFSCLDL_READ; + if (ret != 0) + ndp->nfsdl_flags |= NFSCLDL_RECALL; + error = nfsrv_dissectace(nd, &ndp->nfsdl_ace, &ret, + &acesize, p); + if (error != 0) + goto nfsmout; + } else if (deleg != NFSV4OPEN_DELEGATENONE) { + error = NFSERR_BADXDR; + goto nfsmout; + } + if ((rflags & NFSV4OPEN_LOCKTYPEPOSIX) != 0 || + nfscl_assumeposixlocks) + op->nfso_posixlock = 1; + else + op->nfso_posixlock = 0; + NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + /* If the 2nd element == NFS_OK, the Getattr succeeded. */ + if (*++tl == 0) { + error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, + NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, + NULL, NULL, NULL, p, cred); + if (error != 0) + goto nfsmout; + if (ndp != NULL) { + ndp->nfsdl_change = nfsva.na_filerev; + ndp->nfsdl_modtime = nfsva.na_mtime; + ndp->nfsdl_flags |= NFSCLDL_MODTIMESET; + *dpp = ndp; + ndp = NULL; + } + /* + * At this point, the Open has succeeded, so set + * nd_repstat = NFS_OK. If the Layoutget failed, + * this function just won't return a layout. + */ + if (nd->nd_repstat == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + *laystatp = fxdr_unsigned(int, *++tl); + if (*laystatp == 0) { + error = nfsrv_parselayoutget(nd, + stateidp, retonclosep, flhp); + if (error != 0) + *laystatp = error; + } + } else + nd->nd_repstat = 0; /* Return 0 for Open. */ + } + } + if (nd->nd_repstat != 0 && error == 0) + error = nd->nd_repstat; +nfsmout: + free(ndp, M_NFSCLDELEG); + mbuf_freem(nd->nd_mrep); + return (error); +} + +/* + * Similar nfsrpc_createv4(), but also does the LayoutGet operation. + * Used only for mounts with pNFS enabled. + */ +static int +nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap, + nfsquad_t cverf, int fmode, struct nfsclowner *owp, struct nfscldeleg **dpp, + struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap, + struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp, + int *dattrflagp, void *dstuff, int *unlockedp, nfsv4stateid_t *stateidp, + int usecurstateid, int layoutlen, int *retonclosep, + struct nfsclflayouthead *flhp, int *laystatp) +{ + uint32_t *tl; + int error = 0, deleg, newone, ret, acesize, limitby; + struct nfsrv_descript nfsd, *nd = &nfsd; + struct nfsclopen *op; + struct nfscldeleg *dp = NULL; + struct nfsnode *np; + struct nfsfh *nfhp; + struct nfsclsession *tsep; + nfsattrbit_t attrbits; + nfsv4stateid_t stateid; + uint32_t rflags; + struct nfsmount *nmp; + + nmp = VFSTONFS(dvp->v_mount); + np = VTONFS(dvp); + *laystatp = ENXIO; + *unlockedp = 0; + *nfhpp = NULL; + *dpp = NULL; + *attrflagp = 0; + *dattrflagp = 0; + if (namelen > NFS_MAXNAMLEN) + return (ENAMETOOLONG); + NFSCL_REQSTART(nd, NFSPROC_CREATELAYGET, dvp); + /* + * For V4, this is actually an Open op. + */ + NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(owp->nfsow_seqid); + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD); + *tl++ = txdr_unsigned(NFSV4OPEN_DENYNONE); + tsep = nfsmnt_mdssession(nmp); + *tl++ = tsep->nfsess_clientid.lval[0]; + *tl = tsep->nfsess_clientid.lval[1]; + nfsm_strtom(nd, owp->nfsow_owner, NFSV4CL_LOCKNAMELEN); + NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(NFSV4OPEN_CREATE); + if ((fmode & O_EXCL) != 0) { + if (NFSHASSESSPERSIST(nmp)) { + /* Use GUARDED for persistent sessions. */ + *tl = txdr_unsigned(NFSCREATE_GUARDED); + nfscl_fillsattr(nd, vap, dvp, 0, 0); + } else { + /* Otherwise, use EXCLUSIVE4_1. */ + *tl = txdr_unsigned(NFSCREATE_EXCLUSIVE41); + NFSM_BUILD(tl, u_int32_t *, NFSX_VERF); + *tl++ = cverf.lval[0]; + *tl = cverf.lval[1]; + nfscl_fillsattr(nd, vap, dvp, 0, 0); + } + } else { + *tl = txdr_unsigned(NFSCREATE_UNCHECKED); + nfscl_fillsattr(nd, vap, dvp, 0, 0); + } + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_CLAIMNULL); + nfsm_strtom(nd, name, namelen); + /* Get the new file's handle and attributes, plus save the FH. */ + NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(NFSV4OP_SAVEFH); + *tl++ = txdr_unsigned(NFSV4OP_GETFH); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + NFSGETATTR_ATTRBIT(&attrbits); + nfsrv_putattrbit(nd, &attrbits); + /* Get the directory's post-op attributes. */ + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + nfsm_fhtom(nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + nfsrv_putattrbit(nd, &attrbits); + NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(NFSV4OP_RESTOREFH); + *tl = txdr_unsigned(NFSV4OP_LAYOUTGET); + nfsrv_setuplayoutget(nd, NFSLAYOUTIOMODE_RW, 0, UINT64_MAX, 0, stateidp, + layoutlen, usecurstateid); + error = nfscl_request(nd, dvp, p, cred, dstuff); + if (error != 0) + return (error); + NFSCL_DEBUG(4, "nfsrpc_createlayout stat=%d err=%d\n", nd->nd_repstat, + error); + if (nd->nd_repstat != 0) + *laystatp = nd->nd_repstat; + NFSCL_INCRSEQID(owp->nfsow_seqid, nd); + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + NFSCL_DEBUG(4, "nfsrpc_createlayout open succeeded\n"); + NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + + 6 * NFSX_UNSIGNED); + stateid.seqid = *tl++; + stateid.other[0] = *tl++; + stateid.other[1] = *tl++; + stateid.other[2] = *tl; + rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); + nfsrv_getattrbits(nd, &attrbits, NULL, NULL); + NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(int, *tl); + if (deleg == NFSV4OPEN_DELEGATEREAD || + deleg == NFSV4OPEN_DELEGATEWRITE) { + if (!(owp->nfsow_clp->nfsc_flags & + NFSCLFLAGS_FIRSTDELEG)) + owp->nfsow_clp->nfsc_flags |= + (NFSCLFLAGS_FIRSTDELEG | NFSCLFLAGS_GOTDELEG); + dp = malloc(sizeof(struct nfscldeleg) + NFSX_V4FHMAX, + M_NFSCLDELEG, M_WAITOK); + LIST_INIT(&dp->nfsdl_owner); + LIST_INIT(&dp->nfsdl_lock); + dp->nfsdl_clp = owp->nfsow_clp; + newnfs_copyincred(cred, &dp->nfsdl_cred); + nfscl_lockinit(&dp->nfsdl_rwlock); + NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + + NFSX_UNSIGNED); + dp->nfsdl_stateid.seqid = *tl++; + dp->nfsdl_stateid.other[0] = *tl++; + dp->nfsdl_stateid.other[1] = *tl++; + dp->nfsdl_stateid.other[2] = *tl++; + ret = fxdr_unsigned(int, *tl); + if (deleg == NFSV4OPEN_DELEGATEWRITE) { + dp->nfsdl_flags = NFSCLDL_WRITE; + /* + * Indicates how much the file can grow. + */ + NFSM_DISSECT(tl, u_int32_t *, + 3 * NFSX_UNSIGNED); + limitby = fxdr_unsigned(int, *tl++); + switch (limitby) { + case NFSV4OPEN_LIMITSIZE: + dp->nfsdl_sizelimit = fxdr_hyper(tl); + break; + case NFSV4OPEN_LIMITBLOCKS: + dp->nfsdl_sizelimit = + fxdr_unsigned(u_int64_t, *tl++); + dp->nfsdl_sizelimit *= + fxdr_unsigned(u_int64_t, *tl); + break; + default: + error = NFSERR_BADXDR; + goto nfsmout; + }; + } else { + dp->nfsdl_flags = NFSCLDL_READ; + } + if (ret != 0) + dp->nfsdl_flags |= NFSCLDL_RECALL; + error = nfsrv_dissectace(nd, &dp->nfsdl_ace, &ret, + &acesize, p); + if (error != 0) + goto nfsmout; + } else if (deleg != NFSV4OPEN_DELEGATENONE) { + error = NFSERR_BADXDR; + goto nfsmout; + } + + /* Now, we should have the status for the SaveFH. */ + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (*++tl == 0) { + NFSCL_DEBUG(4, "nfsrpc_createlayout SaveFH ok\n"); + /* + * Now, process the GetFH and Getattr for the newly + * created file. nfscl_mtofh() will set + * ND_NOMOREDATA if these weren't successful. + */ + error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); + NFSCL_DEBUG(4, "aft nfscl_mtofh err=%d\n", error); + if (error != 0) + goto nfsmout; + } else + nd->nd_flag |= ND_NOMOREDATA; + /* Now we have the PutFH and Getattr for the directory. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (*++tl != 0) + nd->nd_flag |= ND_NOMOREDATA; + else { + NFSM_DISSECT(tl, uint32_t *, 2 * + NFSX_UNSIGNED); + if (*++tl != 0) + nd->nd_flag |= ND_NOMOREDATA; + } + } + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + NFSCL_DEBUG(4, "aft nfsm_loadattr err=%d\n", error); + if (error != 0) + goto nfsmout; + *dattrflagp = 1; + if (dp != NULL && *attrflagp != 0) { + dp->nfsdl_change = nnap->na_filerev; + dp->nfsdl_modtime = nnap->na_mtime; + dp->nfsdl_flags |= NFSCLDL_MODTIMESET; + } + /* + * We can now complete the Open state. + */ + nfhp = *nfhpp; + if (dp != NULL) { + dp->nfsdl_fhlen = nfhp->nfh_len; + NFSBCOPY(nfhp->nfh_fh, dp->nfsdl_fh, + nfhp->nfh_len); + } + /* + * Get an Open structure that will be + * attached to the OpenOwner, acquired already. + */ + error = nfscl_open(dvp, nfhp->nfh_fh, nfhp->nfh_len, + (NFSV4OPEN_ACCESSWRITE | NFSV4OPEN_ACCESSREAD), 0, + cred, p, NULL, &op, &newone, NULL, 0); + if (error != 0) + goto nfsmout; + op->nfso_stateid = stateid; + newnfs_copyincred(cred, &op->nfso_cred); + + nfscl_openrelease(nmp, op, error, newone); + *unlockedp = 1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jun 24 20:09:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 882E3DA4DE5; Sat, 24 Jun 2017 20:09:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5683F77A0C; Sat, 24 Jun 2017 20:09:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5OK9NkD093005; Sat, 24 Jun 2017 20:09:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OK9NHx093004; Sat, 24 Jun 2017 20:09:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706242009.v5OK9NHx093004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 24 Jun 2017 20:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320323 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 20:09:24 -0000 Author: rmacklem Date: Sat Jun 24 20:09:23 2017 New Revision: 320323 URL: https://svnweb.freebsd.org/changeset/base/320323 Log: Add RPC count reporting for the two new RPCs added by r320322. This is a content change. PR: 219550 MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Sat Jun 24 20:01:21 2017 (r320322) +++ head/usr.bin/nfsstat/nfsstat.c Sat Jun 24 20:09:23 2017 (r320323) @@ -926,6 +926,13 @@ exp41_intpr(int clientOnly, int serverOnly) (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMITDS]); if (printtitle) printf( + "%12.12s %12.12s\n", + "OpenLayout", "CreateLayout"); + printf("%12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET]); + if (printtitle) + printf( "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", "OpenOwner", "Opens", "LockOwner", "Locks", "Delegs", "LocalOwn");