From owner-svn-src-stable-11@freebsd.org Sun Sep 17 01:32:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A9DE174D5; Sun, 17 Sep 2017 01:32:39 +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 ACADF6B894; Sun, 17 Sep 2017 01:32:39 +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 v8H1Wc90071848; Sun, 17 Sep 2017 01:32:38 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H1WcN1071847; Sun, 17 Sep 2017 01:32:38 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709170132.v8H1WcN1071847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 17 Sep 2017 01:32:38 +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: r323659 - stable/11/lib/libfetch X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/lib/libfetch X-SVN-Commit-Revision: 323659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 01:32:40 -0000 Author: marius Date: Sun Sep 17 01:32:38 2017 New Revision: 323659 URL: https://svnweb.freebsd.org/changeset/base/323659 Log: MFC: r322669 In fetch_resolve() if the port number or service name is included in the host argument (e. g. "www.freebsd.org:443"), correctly set the service pointer accordingly. Previously, the service pointer was set to the separator instead, causing getaddrinfo(3) to fail. Modified: stable/11/lib/libfetch/common.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libfetch/common.c ============================================================================== --- stable/11/lib/libfetch/common.c Sun Sep 17 01:08:42 2017 (r323658) +++ stable/11/lib/libfetch/common.c Sun Sep 17 01:32:38 2017 (r323659) @@ -291,7 +291,7 @@ fetch_resolve(const char *addr, int port, int af) goto syserr; service = sbuf; } else if (*sep != '\0') { - service = sep; + service = sep + 1; } else { service = NULL; } From owner-svn-src-stable-11@freebsd.org Sun Sep 17 03:17:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FBC6E1E9AB; Sun, 17 Sep 2017 03:17:25 +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 59F886F569; Sun, 17 Sep 2017 03:17:25 +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 v8H3HOkg014077; Sun, 17 Sep 2017 03:17:24 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3HOwB014072; Sun, 17 Sep 2017 03:17:24 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170317.v8H3HOwB014072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:17:24 +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: r323662 - in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Commit-Revision: 323662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:17:25 -0000 Author: alc Date: Sun Sep 17 03:17:23 2017 New Revision: 323662 URL: https://svnweb.freebsd.org/changeset/base/323662 Log: MFC r322296 Introduce vm_page_grab_pages(), which is intended to replace loops calling vm_page_grab() on consecutive page indices. Besides simplifying the code in the caller, vm_page_grab_pages() allows for batching optimizations. For example, the current implementation replaces calls to vm_page_lookup() on consecutive page indices by cheaper calls to vm_page_next(). Modified: stable/11/sys/kern/vfs_bio.c stable/11/sys/sparc64/sparc64/pmap.c stable/11/sys/vm/vm_glue.c stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/kern/vfs_bio.c Sun Sep 17 03:17:23 2017 (r323662) @@ -2745,7 +2745,7 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int */ obj = bp->b_bufobj->bo_object; VM_OBJECT_WLOCK(obj); - while (bp->b_npages < desiredpages) { + if (bp->b_npages < desiredpages) { /* * We must allocate system pages since blocking * here could interfere with paging I/O, no @@ -2756,14 +2756,12 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int * deadlocks once allocbuf() is called after * pages are vfs_busy_pages(). */ - m = vm_page_grab(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, - VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | - VM_ALLOC_WIRED | VM_ALLOC_IGN_SBUSY | - VM_ALLOC_COUNT(desiredpages - bp->b_npages)); - if (m->valid == 0) - bp->b_flags &= ~B_CACHE; - bp->b_pages[bp->b_npages] = m; - ++bp->b_npages; + vm_page_grab_pages(obj, + OFF_TO_IDX(bp->b_offset) + bp->b_npages, + VM_ALLOC_SYSTEM | VM_ALLOC_IGN_SBUSY | + VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, + &bp->b_pages[bp->b_npages], desiredpages - bp->b_npages); + bp->b_npages = desiredpages; } /* Modified: stable/11/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 03:17:23 2017 (r323662) @@ -1230,7 +1230,6 @@ int pmap_pinit(pmap_t pm) { vm_page_t ma[TSB_PAGES]; - vm_page_t m; int i; /* @@ -1253,14 +1252,11 @@ pmap_pinit(pmap_t pm) CPU_ZERO(&pm->pm_active); VM_OBJECT_WLOCK(pm->pm_tsb_obj); - for (i = 0; i < TSB_PAGES; i++) { - m = vm_page_grab(pm->pm_tsb_obj, i, VM_ALLOC_NOBUSY | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); - m->valid = VM_PAGE_BITS_ALL; - m->md.pmap = pm; - ma[i] = m; - } + vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO, ma, TSB_PAGES); VM_OBJECT_WUNLOCK(pm->pm_tsb_obj); + for (i = 0; i < TSB_PAGES; i++) + ma[i]->md.pmap = pm; pmap_qenter((vm_offset_t)pm->pm_tsb, ma, TSB_PAGES); bzero(&pm->pm_stats, sizeof(pm->pm_stats)); Modified: stable/11/sys/vm/vm_glue.c ============================================================================== --- stable/11/sys/vm/vm_glue.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_glue.c Sun Sep 17 03:17:23 2017 (r323662) @@ -322,7 +322,7 @@ vm_thread_new(struct thread *td, int pages) { vm_object_t ksobj; vm_offset_t ks; - vm_page_t m, ma[KSTACK_MAX_PAGES]; + vm_page_t ma[KSTACK_MAX_PAGES]; struct kstack_cache_entry *ks_ce; int i; @@ -391,15 +391,10 @@ vm_thread_new(struct thread *td, int pages) * page of stack. */ VM_OBJECT_WLOCK(ksobj); - for (i = 0; i < pages; i++) { - /* - * Get a kernel stack page. - */ - m = vm_page_grab(ksobj, i, VM_ALLOC_NOBUSY | - VM_ALLOC_NORMAL | VM_ALLOC_WIRED); - ma[i] = m; - m->valid = VM_PAGE_BITS_ALL; - } + vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED, ma, pages); + for (i = 0; i < pages; i++) + ma[i]->valid = VM_PAGE_BITS_ALL; VM_OBJECT_WUNLOCK(ksobj); pmap_qenter(ks, ma, pages); return (1); @@ -573,9 +568,8 @@ vm_thread_swapin(struct thread *td) pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); - for (int i = 0; i < pages; i++) - ma[i] = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | - VM_ALLOC_WIRED); + vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, + pages); for (int i = 0; i < pages;) { int j, a, count, rv; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_page.c Sun Sep 17 03:17:23 2017 (r323662) @@ -3130,6 +3130,100 @@ retrylookup: } /* + * Return the specified range of pages from the given object. For each + * page offset within the range, if a page already exists within the object + * at that offset and it is busy, then wait for it to change state. If, + * instead, the page doesn't exist, then allocate it. + * + * The caller must always specify an allocation class. + * + * allocation classes: + * VM_ALLOC_NORMAL normal process request + * VM_ALLOC_SYSTEM system *really* needs the pages + * + * The caller must always specify that the pages are to be busied and/or + * wired. + * + * optional allocation flags: + * VM_ALLOC_IGN_SBUSY do not sleep on soft busy pages + * VM_ALLOC_NOBUSY do not exclusive busy the page + * VM_ALLOC_SBUSY set page to sbusy state + * VM_ALLOC_WIRED wire the pages + * VM_ALLOC_ZERO zero and validate any invalid pages + * + * This routine may sleep. + */ +void +vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, + vm_page_t *ma, int count) +{ + vm_page_t m; + int i; + bool sleep; + + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT(((u_int)allocflags >> VM_ALLOC_COUNT_SHIFT) == 0, + ("vm_page_grap_pages: VM_ALLOC_COUNT() is not allowed")); + KASSERT((allocflags & VM_ALLOC_NOBUSY) == 0 || + (allocflags & VM_ALLOC_WIRED) != 0, + ("vm_page_grab_pages: the pages must be busied or wired")); + KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || + (allocflags & VM_ALLOC_IGN_SBUSY) != 0, + ("vm_page_grab_pages: VM_ALLOC_SBUSY/IGN_SBUSY mismatch")); + if (count == 0) + return; + i = 0; +retrylookup: + m = vm_page_lookup(object, pindex + i); + for (; i < count; i++) { + if (m != NULL) { + sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? + vm_page_xbusied(m) : vm_page_busied(m); + if (sleep) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_aflag_set(m, PGA_REFERENCED); + vm_page_lock(m); + VM_OBJECT_WUNLOCK(object); + vm_page_busy_sleep(m, "grbmaw", (allocflags & + VM_ALLOC_IGN_SBUSY) != 0); + VM_OBJECT_WLOCK(object); + goto retrylookup; + } + if ((allocflags & VM_ALLOC_WIRED) != 0) { + vm_page_lock(m); + vm_page_wire(m); + vm_page_unlock(m); + } + if ((allocflags & (VM_ALLOC_NOBUSY | + VM_ALLOC_SBUSY)) == 0) + vm_page_xbusy(m); + if ((allocflags & VM_ALLOC_SBUSY) != 0) + vm_page_sbusy(m); + } else { + m = vm_page_alloc(object, pindex + i, (allocflags & + ~VM_ALLOC_IGN_SBUSY) | VM_ALLOC_COUNT(count - i)); + if (m == NULL) { + VM_OBJECT_WUNLOCK(object); + VM_WAIT; + VM_OBJECT_WLOCK(object); + goto retrylookup; + } + } + if (m->valid == 0 && (allocflags & VM_ALLOC_ZERO) != 0) { + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + ma[i] = m; + m = vm_page_next(m); + } +} + +/* * Mapping function for valid or dirty bits in a page. * * Inputs are required to range within a page. Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_page.h Sun Sep 17 03:17:23 2017 (r323662) @@ -387,6 +387,9 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); * vm_page_alloc_freelist(). Some functions support only a subset * of the flags, and ignore others, see the flags legend. * + * The meaning of VM_ALLOC_ZERO differs slightly between the vm_page_alloc*() + * and the vm_page_grab*() functions. See these functions for details. + * * Bits 0 - 1 define class. * Bits 2 - 15 dedicated for flags. * Legend: @@ -394,6 +397,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); * (c) - vm_page_alloc_contig() supports the flag. * (f) - vm_page_alloc_freelist() supports the flag. * (g) - vm_page_grab() supports the flag. + * (p) - vm_page_grab_pages() supports the flag. * Bits above 15 define the count of additional pages that the caller * intends to allocate. */ @@ -401,15 +405,15 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_INTERRUPT 1 #define VM_ALLOC_SYSTEM 2 #define VM_ALLOC_CLASS_MASK 3 -#define VM_ALLOC_WIRED 0x0020 /* (acfg) Allocate non pageable page */ -#define VM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ +#define VM_ALLOC_WIRED 0x0020 /* (acfgp) Allocate a wired page */ +#define VM_ALLOC_ZERO 0x0040 /* (acfgp) Allocate a prezeroed page */ #define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ -#define VM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ +#define VM_ALLOC_NOBUSY 0x0200 /* (acgp) Do not excl busy the page */ #define VM_ALLOC_IFCACHED 0x0400 #define VM_ALLOC_IFNOTCACHED 0x0800 -#define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ +#define VM_ALLOC_IGN_SBUSY 0x1000 /* (gp) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ -#define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ +#define VM_ALLOC_SBUSY 0x4000 /* (acgp) Shared busy the page */ #define VM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) @@ -450,6 +454,8 @@ vm_page_t vm_page_alloc_contig(vm_object_t object, vm_ vm_page_t vm_page_alloc_freelist(int, int); void vm_page_change_lock(vm_page_t m, struct mtx **mtx); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); +void vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, + vm_page_t *ma, int count); int vm_page_try_to_free (vm_page_t); void vm_page_deactivate (vm_page_t); void vm_page_deactivate_noreuse(vm_page_t); From owner-svn-src-stable-11@freebsd.org Sun Sep 17 03:34:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59696E1F67E; Sun, 17 Sep 2017 03:34:37 +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 26E7E6FD4B; Sun, 17 Sep 2017 03:34:37 +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 v8H3YaUn021966; Sun, 17 Sep 2017 03:34:36 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3Yam0021965; Sun, 17 Sep 2017 03:34:36 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170334.v8H3Yam0021965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:34:36 +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: r323663 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:34:37 -0000 Author: alc Date: Sun Sep 17 03:34:36 2017 New Revision: 323663 URL: https://svnweb.freebsd.org/changeset/base/323663 Log: MFC r322404 An invalid page can't be dirty. Modified: stable/11/sys/kern/kern_sendfile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Sun Sep 17 03:17:23 2017 (r323662) +++ stable/11/sys/kern/kern_sendfile.c Sun Sep 17 03:34:36 2017 (r323663) @@ -366,7 +366,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o NULL, &a) && i < j) { pmap_zero_page(pa[i]); pa[i]->valid = VM_PAGE_BITS_ALL; - pa[i]->dirty = 0; + MPASS(pa[i]->dirty == 0); vm_page_xunbusy(pa[i]); i++; } From owner-svn-src-stable-11@freebsd.org Sun Sep 17 03:44:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCA0CE1FE80; Sun, 17 Sep 2017 03:44:16 +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 7FC2170218; Sun, 17 Sep 2017 03:44:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8H3iF5c026169; Sun, 17 Sep 2017 03:44:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3iFoY026168; Sun, 17 Sep 2017 03:44:15 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170344.v8H3iFoY026168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:44: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: r323664 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:44:17 -0000 Author: alc Date: Sun Sep 17 03:44:15 2017 New Revision: 323664 URL: https://svnweb.freebsd.org/changeset/base/323664 Log: MFC r321102 Tidy up before making another round of functional changes: Remove end- of-line whitespace, remove excessive whitespace and blank lines, remove dead code, follow our standard style for function definitions, and correct grammatical and factual errors in some of the comments. Modified: stable/11/sys/kern/subr_blist.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 03:34:36 2017 (r323663) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 03:44:15 2017 (r323664) @@ -28,18 +28,18 @@ * BLIST.C - Bitmap allocator/deallocator, using a radix tree with hinting * * This module implements a general bitmap allocator/deallocator. The - * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other than to return + * allocator eats around 2 bits per 'block'. The module does not + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are * involved: One for the bitmaps contained in the leaf nodes (typically - * 32), and one for the meta nodes (typically 16). Both meta and leaf + * 64), and one for the meta nodes (typically 16). Both meta and leaf * nodes have a hint field. This field gives us a hint as to the largest * free contiguous range of blocks under the node. It may contain a - * value that is too high, but will never contain a value that is too + * value that is too high, but will never contain a value that is too * low. When the radix tree is searched, allocation failures in subtrees - * update the hint. + * update the hint. * * The radix tree also implements two collapsed states for meta nodes: * the ALL-ALLOCATED state and the ALL-FREE state. If a meta node is @@ -49,7 +49,7 @@ * * The hinting greatly increases code efficiency for allocations while * the general radix structure optimizes both allocations and frees. The - * radix tree should be able to operate well no matter how much + * radix tree should be able to operate well no matter how much * fragmentation there is and no matter how large a bitmap is used. * * The blist code wires all necessary memory at creation time. Neither @@ -61,18 +61,18 @@ * linear array. Each meta node is immediately followed (laid out * sequentially in memory) by BLIST_META_RADIX lower level nodes. This * is a recursive structure but one that can be easily scanned through - * a very simple 'skip' calculation. In order to support large radixes, - * portions of the tree may reside outside our memory allocation. We - * handle this with an early-termination optimization (when bighint is - * set to -1) on the scan. The memory allocation is only large enough + * a very simple 'skip' calculation. In order to support large radixes, + * portions of the tree may reside outside our memory allocation. We + * handle this with an early-termination optimization (when bighint is + * set to -1) on the scan. The memory allocation is only large enough * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more than - * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too - * large' if you try. This is an area that could use improvement. The - * radix is large enough that this restriction does not effect the swap - * system, though. Currently only the allocation code is effected by + * NOTE: the allocator cannot currently allocate more than + * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too + * large' if you try. This is an area that could use improvement. The + * radix is large enough that this restriction does not effect the swap + * system, though. Currently only the allocation code is affected by * this algorithmic unfeature. The freeing code can handle arbitrary * ranges. * @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #else @@ -120,16 +120,15 @@ void panic(const char *ctl, ...); /* * static support functions */ - static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor); static daddr_t blst_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, +static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk); -static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, blist_t dest, daddr_t count); +static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, + daddr_t skip, blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk); @@ -151,11 +150,10 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); * blocks - must be greater than 0 * flags - malloc flags * - * The smallest blist consists of a single leaf node capable of + * The smallest blist consists of a single leaf node capable of * managing BLIST_BMAP_RADIX blocks. */ - -blist_t +blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; @@ -202,7 +200,7 @@ blist_create(daddr_t blocks, int flags) return (bl); } -void +void blist_destroy(blist_t bl) { free(bl->bl_root, M_SWAP); @@ -214,8 +212,7 @@ blist_destroy(blist_t bl) * of a contiguous region or SWAPBLK_NONE if space could * not be allocated. */ - -daddr_t +daddr_t blist_alloc(blist_t bl, daddr_t count) { daddr_t blk; @@ -245,7 +242,6 @@ blist_alloc(blist_t bl, daddr_t count) /* * blist_avail() - return the number of free blocks. */ - daddr_t blist_avail(blist_t bl) { @@ -261,8 +257,7 @@ blist_avail(blist_t bl) * of a contiguous region. Panic if an inconsistancy is * found. */ - -void +void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { if (bl) { @@ -280,7 +275,6 @@ blist_free(blist_t bl, daddr_t blkno, daddr_t count) * existing allocations. Return the number of blocks * actually filled that were free before the call. */ - daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { @@ -304,7 +298,6 @@ blist_fill(blist_t bl, daddr_t blkno, daddr_t count) * one. When extending the tree you can specify whether * the new blocks are to left allocated or freed. */ - void blist_resize(blist_t *pbl, daddr_t count, int freenew, int flags) { @@ -330,7 +323,6 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, /* * blist_print() - dump radix tree */ - void blist_print(blist_t bl) { @@ -345,7 +337,7 @@ blist_print(blist_t bl) * ALLOCATION SUPPORT FUNCTIONS * ************************************************************************ * - * These support functions do all the actual work. They may seem + * These support functions do all the actual work. They may seem * rather longish, but that's because I've commented them up. The * actual code is straight forward. * @@ -358,7 +350,6 @@ blist_print(blist_t bl) * BLIST_BMAP_RADIX block allocation case. Otherwise, execution * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX). */ - static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) { @@ -450,7 +441,6 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count * calls that hit this node. We have to check for our collapse cases * and we have a few optimizations strewn in as well. */ - static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t cursor) @@ -541,13 +531,9 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * BLST_LEAF_FREE() - free allocated block from leaf bitmap * */ - static void -blst_leaf_free( - blmeta_t *scan, - daddr_t blk, - int count -) { +blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) +{ /* * free some data in this bitmap * @@ -568,7 +554,7 @@ blst_leaf_free( /* * We could probably do a better job here. We are required to make - * bighint at least as large as the biggest contiguous block of + * bighint at least as large as the biggest contiguous block of * data. If we just shoehorn it, a little extra overhead will * be incured on the next allocation (but only that one typically). */ @@ -585,20 +571,13 @@ blst_leaf_free( * range whereas the allocation code cannot allocate an arbitrary * range). */ - -static void +static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk) { daddr_t i, next_skip, v; int child; -#if 0 - printf("free (%llx,%lld) FROM (%llx,%lld)\n", - (long long)freeBlk, (long long)count, - (long long)blk, (long long)radix - ); -#endif next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -675,15 +654,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ * Locates free space in the source tree and frees it in the destination * tree. The space may not already be free in the destination. */ - -static void blst_copy( - blmeta_t *scan, - daddr_t blk, - daddr_t radix, - daddr_t skip, - blist_t dest, - daddr_t count -) { +static void +blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, + blist_t dest, daddr_t count) +{ daddr_t i, next_skip; /* @@ -715,7 +689,7 @@ static void blst_copy( * Source all allocated, leave dest allocated */ return; - } + } if (scan->u.bmu_avail == radix) { /* * Source all free, free entire dest @@ -736,25 +710,13 @@ static void blst_copy( break; if (count >= radix) { - blst_copy( - &scan[i], - blk, - radix, - next_skip - 1, - dest, - radix - ); + blst_copy(&scan[i], blk, radix, next_skip - 1, dest, + radix); count -= radix; } else { if (count) { - blst_copy( - &scan[i], - blk, - radix, - next_skip - 1, - dest, - count - ); + blst_copy(&scan[i], blk, radix, next_skip - 1, + dest, count); } count = 0; } @@ -769,7 +731,6 @@ static void blst_copy( * regardless of any existing allocations in that range. Returns * the number of blocks allocated by the call. */ - static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) { @@ -879,8 +840,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * be considerably less than the calculated radix due to the large * RADIX values we use. */ - -static daddr_t +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) { daddr_t i, memindex, next_skip; @@ -896,7 +856,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t scan->bm_bighint = 0; scan->u.bmu_bitmap = 0; } - return(memindex); + return (memindex); } /* @@ -918,23 +878,17 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t /* * Allocate the entire object */ - memindex = i + blst_radix_init( - ((scan) ? &scan[i] : NULL), - radix, - next_skip - 1, - radix - ); + memindex = i + + blst_radix_init(((scan) ? &scan[i] : NULL), radix, + next_skip - 1, radix); count -= radix; } else if (count > 0) { /* * Allocate a partial object */ - memindex = i + blst_radix_init( - ((scan) ? &scan[i] : NULL), - radix, - next_skip - 1, - count - ); + memindex = i + + blst_radix_init(((scan) ? &scan[i] : NULL), radix, + next_skip - 1, count); count = 0; } else { /* @@ -947,12 +901,12 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t } if (memindex < i) memindex = i; - return(memindex); + return (memindex); } #ifdef BLIST_DEBUG -static void +static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, int tab) { @@ -960,7 +914,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t if (radix == BLIST_BMAP_RADIX) { printf( - "%*.*s(%08llx,%lld): bitmap %016llx big=%lld\n", + "%*.*s(%08llx,%lld): bitmap %016llx big=%lld\n", tab, tab, "", (long long)blk, (long long)radix, (long long)scan->u.bmu_bitmap, @@ -1010,13 +964,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); break; } - blst_radix_print( - &scan[i], - blk, - radix, - next_skip - 1, - tab - ); + blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); blk += radix; } tab -= 4; @@ -1126,4 +1074,3 @@ panic(const char *ctl, ...) } #endif - From owner-svn-src-stable-11@freebsd.org Sun Sep 17 04:15:13 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C82FE21A68; Sun, 17 Sep 2017 04:15:13 +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 26C357105E; Sun, 17 Sep 2017 04:15:13 +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 v8H4FChZ038347; Sun, 17 Sep 2017 04:15:12 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H4FCvw038346; Sun, 17 Sep 2017 04:15:12 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170415.v8H4FCvw038346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 04:15:12 +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: r323665 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 04:15:13 -0000 Author: alc Date: Sun Sep 17 04:15:12 2017 New Revision: 323665 URL: https://svnweb.freebsd.org/changeset/base/323665 Log: MFC r321423 Change the interactions of the interface functions with the "meta" and "leaf" functions for alloc, free, and fill. After the change, the interface functions call "meta" unconditionally, and the "meta" functions recur unconditionally in looping over their descendants. The "meta" functions start with a validity test, and then a test for the "leaf" case, before falling into the general recursive case. This simplifies and shrinks the code, and, for "free" and "fill" moves panic tests that check the same meta node repeatedly in a loop to a place that will have each node tested once. Remove irrelevant null checks from blist_free and blist_fill. Make the code that initializes a meta node the same in blist_meta_alloc and blist_meta_fill. Parenthesize return expressions in blst_meta_fill. Modified: stable/11/sys/kern/subr_blist.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 03:44:15 2017 (r323664) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 04:15:12 2017 (r323665) @@ -224,12 +224,8 @@ blist_alloc(blist_t bl, daddr_t count) * 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, - bl->bl_cursor); - else - blk = blst_meta_alloc(bl->bl_root, 0, count, - bl->bl_radix, bl->bl_skip, bl->bl_cursor); + blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, + bl->bl_skip, bl->bl_cursor); if (blk != SWAPBLK_NONE) { bl->bl_cursor = blk + count; return (blk); @@ -260,13 +256,8 @@ blist_avail(blist_t bl) void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { - if (bl) { - if (bl->bl_radix == BLIST_BMAP_RADIX) - blst_leaf_free(bl->bl_root, blkno, count); - else - blst_meta_free(bl->bl_root, blkno, count, - bl->bl_radix, bl->bl_skip, 0); - } + + blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); } /* @@ -278,17 +269,9 @@ blist_free(blist_t bl, daddr_t blkno, daddr_t count) daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - daddr_t filled; - if (bl) { - if (bl->bl_radix == BLIST_BMAP_RADIX) - filled = blst_leaf_fill(bl->bl_root, blkno, count); - else - filled = blst_meta_fill(bl->bl_root, blkno, count, - bl->bl_radix, bl->bl_skip, 0); - return (filled); - } - return (0); + return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, + bl->bl_skip, 0)); } /* @@ -449,6 +432,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c int child; bool scan_from_start; + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_alloc(scan, blk, count, cursor)); if (scan->u.bmu_avail < count) { /* * The meta node's hint must be too large if the allocation @@ -497,14 +482,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c /* * The allocation might fit in the i'th subtree. */ - if (next_skip == 1) { - r = blst_leaf_alloc(&scan[i], blk, count, - cursor > blk ? cursor : blk); - } else { - r = blst_meta_alloc(&scan[i], blk, count, - radix, next_skip - 1, cursor > blk ? - cursor : blk); - } + r = blst_meta_alloc(&scan[i], blk, count, radix, + next_skip - 1, cursor > blk ? cursor : blk); if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; return (r); @@ -578,6 +557,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ daddr_t i, next_skip, v; int child; + if (scan->bm_bighint == (daddr_t)-1) + panic("freeing invalid range"); + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_free(scan, freeBlk, count)); next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -630,17 +613,9 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ v = blk + radix - freeBlk; if (v > count) v = count; - - if (scan->bm_bighint == (daddr_t)-1) - panic("blst_meta_free: freeing unexpected range"); - - if (next_skip == 1) { - blst_leaf_free(&scan[i], freeBlk, v); - } else { - blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); - } + blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); if (scan->bm_bighint < scan[i].bm_bighint) - scan->bm_bighint = scan[i].bm_bighint; + scan->bm_bighint = scan[i].bm_bighint; count -= v; freeBlk += v; blk += radix; @@ -763,13 +738,17 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr daddr_t i, nblks, next_skip, v; int child; + if (scan->bm_bighint == (daddr_t)-1) + panic("filling invalid range"); if (count > radix) { /* * The allocation exceeds the number of blocks that are - * managed by this meta node. + * managed by this node. */ - panic("allocation too large"); + panic("fill too large"); } + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_fill(scan, allocBlk, count)); if (count == radix || scan->u.bmu_avail == 0) { /* * ALL-ALLOCATED special case @@ -777,7 +756,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr nblks = scan->u.bmu_avail; scan->u.bmu_avail = 0; scan->bm_bighint = 0; - return nblks; + return (nblks); } next_skip = skip / BLIST_META_RADIX; @@ -793,13 +772,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * 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; @@ -813,23 +790,15 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr v = blk + radix - allocBlk; if (v > count) v = count; - - if (scan->bm_bighint == (daddr_t)-1) - panic("blst_meta_fill: filling unexpected range"); - - if (next_skip == 1) { - nblks += blst_leaf_fill(&scan[i], allocBlk, v); - } else { - nblks += blst_meta_fill(&scan[i], allocBlk, v, - radix, next_skip - 1, blk); - } + nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, + next_skip - 1, blk); count -= v; allocBlk += v; blk += radix; i += next_skip; } scan->u.bmu_avail -= nblks; - return nblks; + return (nblks); } /* From owner-svn-src-stable-11@freebsd.org Sun Sep 17 06:32:06 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E531E26AB5; Sun, 17 Sep 2017 06:32:06 +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 6D7DA744AD; Sun, 17 Sep 2017 06:32:06 +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 v8H6W514094738; Sun, 17 Sep 2017 06:32:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6W50x094737; Sun, 17 Sep 2017 06:32:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170632.v8H6W50x094737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:32:05 +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: r323666 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.bin/netstat X-SVN-Commit-Revision: 323666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:32:06 -0000 Author: bapt Date: Sun Sep 17 06:32:05 2017 New Revision: 323666 URL: https://svnweb.freebsd.org/changeset/base/323666 Log: MFC r323016: Don't call kresolv_list() if using netstat on live kernel kresolve_list() is calling many kldsym(2). Removing that call on when collecting stats for the running kernel improves the startup time and CPU usage. Submitted by: Nikita Kozlov (nikita.kozlov@blade-group.com) Reviewed by: cem Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12151 Modified: stable/11/usr.bin/netstat/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/main.c ============================================================================== --- stable/11/usr.bin/netstat/main.c Sun Sep 17 04:15:12 2017 (r323665) +++ stable/11/usr.bin/netstat/main.c Sun Sep 17 06:32:05 2017 (r323666) @@ -422,13 +422,12 @@ main(int argc, char *argv[]) if (!live) { if (setgid(getgid()) != 0) xo_err(-1, "setgid"); + /* Load all necessary kvm symbols */ + kresolve_list(nl); } if (xflag && Tflag) xo_errx(1, "-x and -T are incompatible, pick one."); - - /* Load all necessary kvm symbols */ - kresolve_list(nl); if (Bflag) { if (!live) From owner-svn-src-stable-11@freebsd.org Sun Sep 17 06:33:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FC6BE26CFC; Sun, 17 Sep 2017 06:33:43 +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 66A14746D5; Sun, 17 Sep 2017 06:33:43 +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 v8H6XgrO094854; Sun, 17 Sep 2017 06:33:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6Xg3i094853; Sun, 17 Sep 2017 06:33:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170633.v8H6Xg3i094853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:33: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: r323667 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:33:43 -0000 Author: bapt Date: Sun Sep 17 06:33:42 2017 New Revision: 323667 URL: https://svnweb.freebsd.org/changeset/base/323667 Log: MFC r323051: Add sysctls for arc shrinking and growing values The default value for arc_no_grow_shift may not be optimal when using several GiB ARC. Expose it via sysctl allows users to tune it easily. Also expose arc_grow_retry via sysctl for the same reason. The default value of 60s might, in case of intensive load, be too long. Submitted by: Nikita Kozlov Reviewed by: mav, manu, bapt Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12144 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Sep 17 06:32:05 2017 (r323666) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Sep 17 06:33:42 2017 (r323667) @@ -358,6 +358,7 @@ uint64_t zfs_arc_meta_limit = 0; uint64_t zfs_arc_meta_min = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; +int zfs_arc_no_grow_shift = 0; int zfs_arc_p_min_shift = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ u_int zfs_arc_free_target = 0; @@ -371,6 +372,7 @@ static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDL static int sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS); static int sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS); static int sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS); +static int sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS); #if defined(__FreeBSD__) && defined(_KERNEL) static void @@ -385,17 +387,25 @@ SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); TUNABLE_QUAD("vfs.zfs.arc_meta_min", &zfs_arc_meta_min); TUNABLE_INT("vfs.zfs.arc_shrink_shift", &zfs_arc_shrink_shift); +TUNABLE_INT("vfs.zfs.arc_grow_retry", &zfs_arc_grow_retry); +TUNABLE_INT("vfs.zfs.arc_no_grow_shift", &zfs_arc_no_grow_shift); SYSCTL_DECL(_vfs_zfs); SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_U64 | CTLFLAG_RWTUN, 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_max, "QU", "Maximum ARC size"); SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_U64 | CTLFLAG_RWTUN, 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_min, "QU", "Minimum ARC size"); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift, CTLTYPE_U32 | CTLFLAG_RWTUN, + 0, sizeof(uint32_t), sysctl_vfs_zfs_arc_no_grow_shift, "U", + "log2(fraction of ARC which must be free to allow growing)"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, &zfs_arc_average_blocksize, 0, "ARC average blocksize"); SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_shrink_shift, CTLFLAG_RW, &arc_shrink_shift, 0, "log2(fraction of arc to reclaim)"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_grow_retry, CTLFLAG_RW, + &arc_grow_retry, 0, + "Wait in seconds before considering growing ARC"); SYSCTL_INT(_vfs_zfs, OID_AUTO, compressed_arc_enabled, CTLFLAG_RDTUN, &zfs_compressed_arc_enabled, 0, "Enable compressed ARC"); @@ -1065,6 +1075,24 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS) } static int +sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS) +{ + uint32_t val; + int err; + + val = arc_no_grow_shift; + err = sysctl_handle_32(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val >= arc_shrink_shift) + return (EINVAL); + + arc_no_grow_shift = val; + return (0); +} + +static int sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS) { uint64_t val; @@ -6505,6 +6533,8 @@ arc_init(void) if (zfs_arc_shrink_shift > 0) arc_shrink_shift = zfs_arc_shrink_shift; + if (zfs_arc_no_grow_shift > 0) + arc_no_grow_shift = zfs_arc_no_grow_shift; /* * Ensure that arc_no_grow_shift is less than arc_shrink_shift. */ From owner-svn-src-stable-11@freebsd.org Sun Sep 17 06:34:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 469A6E26D93; Sun, 17 Sep 2017 06:34:52 +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 10A7D74809; Sun, 17 Sep 2017 06:34:51 +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 v8H6Yp80094932; Sun, 17 Sep 2017 06:34:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6Yphs094931; Sun, 17 Sep 2017 06:34:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170634.v8H6Yphs094931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:34: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: r323668 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 323668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:34:52 -0000 Author: bapt Date: Sun Sep 17 06:34:51 2017 New Revision: 323668 URL: https://svnweb.freebsd.org/changeset/base/323668 Log: MFC r323160: Update pci_vendors to 2017-09-01 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Sun Sep 17 06:33:42 2017 (r323667) +++ stable/11/share/misc/pci_vendors Sun Sep 17 06:34:51 2017 (r323668) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.07.27 -# Date: 2017-07-27 03:15:02 +# Version: 2017.09.01 +# Date: 2017-09-01 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -41,7 +41,8 @@ 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -0100 Ncipher Corp Ltd +# nee nCipher +0100 Thales e-Security 0123 General Dynamics # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne @@ -327,6 +328,7 @@ 1033 8336 SAS1068 0056 SAS1064ET PCI-Express Fusion-MPT SAS 1014 03bb ServeRAID BR10il SAS/SATA Controller v2 + 8086 34dc AXX4SASMOD RAID Controller 0057 M1064E MegaRAID SAS 8086 346c Embedded Software RAID Technology II (ESTRII) 0058 SAS1068E PCI-Express Fusion-MPT SAS @@ -369,7 +371,16 @@ 1028 1f38 PERC H710 Mini (for monolithics) 15d9 0690 LSI MegaRAID ROMB 8086 3510 RMS25PB080 RAID Controller + 8086 3511 RMS25PB040 RAID Controller + 8086 3512 RMT3PB080 RAID Controller 8086 3513 RMS25CB080 RAID Controller + 8086 3514 RMS25CB040 RAID Controller + 8086 351c RMS25PB080N RAID Controller + 8086 351d RMS25CB080N RAID Controller + 8086 9265 RS25DB080 RAID Controller + 8086 9268 RS25AB080 RAID Controller + 8086 9285 RS25NB008 RAID Controller + 8086 9288 RS25SB008 RAID Controller 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i @@ -389,6 +400,12 @@ 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter + 8086 351e RMS3CC080 RAID Controller + 8086 351f RMS3CC040 RAID Controller + 8086 9360 RS3DC080 RAID Controller + 8086 9362 RS3DC040 RAID Controller + 8086 9380 RS3SC008 RAID Controller + 8086 9381 RS3MC044 RAID Controller 005e SAS1066 PCI-X Fusion-MPT SAS 005f MegaRAID SAS-3 3008 [Fury] 1028 1f44 PERC H330 Adapter @@ -444,6 +461,7 @@ 1028 1f20 PERC H200 Embedded 1028 1f22 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller + 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] 1000 9240 MegaRAID SAS 9240-8i 1000 9241 MegaRAID SAS 9240-4i @@ -499,12 +517,18 @@ 1043 8480 PIKE-2108 16PD 1734 1176 RAID Ctrl SAS 6G 5/6 512MB (D2616) 1734 1177 RAID Ctrl SAS 6G 0/1 (D2607) - 8086 9256 MegaRAID SAS 9260DE-8i + 8086 350b RMS2MH080 RAID Controller + 8086 9256 MegaRAID SAS 9260DE-8i RS2BL080DE 8086 9260 RAID Controller RS2BL040 8086 9261 RAID Controller RS2BL080 - 8086 9264 Warm Beach (Caster Lite) + 8086 9264 RAID Controller RT3WB080 Warm Beach (Caster Lite) 8086 9267 RAID Controller RS2VB040 8086 9268 RAID Controller RS2VB080 + 8086 9275 RAID Controller RS2PI008DE + 8086 9276 RAID Controller RS2WG160 + 8086 9280 RAID Controller RS2PI008 + 8086 9282 RAID Controller RS2MB044 + 8086 9290 RAID Controller RS2SG244 007c MegaRAID SAS 1078DE 1014 0395 ServeRAID-AR10is SAS/SATA Controller 007e SSS6200 PCI-Express Flash SSD @@ -535,6 +559,14 @@ 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i 1590 0044 H220i + 8086 3000 RS25GB008 RAID Controller + 8086 3060 RS25FB044 RAID Controller + 8086 3516 RMS25JB080 RAID Controller + 8086 3517 RMS25JB040 RAID Controller + 8086 3518 RMS25KB080 RAID Controller + 8086 3519 RMS25KB040 RAID Controller + 8086 351a RMS25LB040 RAID Controller + 8086 351b RMS25LB080 RAID Controller 008f 53c875J 1092 8000 FirePort 40 SCSI Controller 1092 8760 FirePort 40 Dual SCSI Host Adapter @@ -2267,6 +2299,7 @@ 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] + 174b 2015 NITRO Radeon R7 370 174b 2016 Trinidad PRO [Radeon R9 370 OEM] 1787 2016 Trinidad PRO [Radeon R9 370 OEM] 6816 Pitcairn @@ -2437,7 +2470,7 @@ 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] - 687f Vega [Radeon RX Vega] + 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -3427,6 +3460,7 @@ aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] + aaf0 Ellesmere [Radeon RX 580] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe ac12 Theater HD T507 (DVB-T) TV tuner/capture device @@ -5964,7 +5998,10 @@ 0074 U4 HT Bridge # should be 14e4:1645 1645 Broadcom NetXtreme BCM5701 Gigabit Ethernet - 2001 PCI Express SSD + 2001 S1X NVMe Controller + 2002 S3ELab NVMe Controller + 2003 S3X NVMe Controller + 2005 ANS2 NVMe Controller 106c Hynix Semiconductor 8139 8139c 100BaseTX Ethernet Controller 8801 Dual Pentium ISA/PCI Motherboard @@ -6034,10 +6071,10 @@ 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter - 165c FastLinQ QL45000 Series 40GbE Controller (FCoE) + 165c FastLinQ QL45000 Series 10/25/40/50GbE Controller (FCoE) 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter - 165e FastLinQ QL45000 Series 40GbE Controller (iSCSI) + 165e FastLinQ QL45000 Series 10/25/40/50GbE Controller (iSCSI) 1077 e4f1 FastLinQ QL45462H 40GbE iSCSI Adapter 1077 e4f2 FastLinQ QL45461H 40GbE iSCSI Adapter 1664 FastLinQ QL45000 Series Gigabit Ethernet Controller (SR-IOV VF) @@ -7612,6 +7649,7 @@ 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -10753,6 +10791,7 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] + 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] @@ -10768,6 +10807,8 @@ 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] + 1c07 GP106 [P106-100] + 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 @@ -10788,7 +10829,7 @@ 1cb2 GP107GL [Quadro P600] 1cb3 GP107GL [Quadro P400] 1d01 GP108 [GeForce GT 1030] - 1d10 GP108 [GeForce MX150] + 1d10 GP108M [GeForce MX150] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10962,6 +11003,7 @@ 1025 0813 Aspire R7-571 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3832 Yoga 520 522a RTS522A PCI Express Card Reader 5249 RTS5249 PCI Express Card Reader 103c 1909 ZBook 15 @@ -13048,6 +13090,7 @@ 1179 Toshiba America Info Systems 0102 Extended IDE Controller 0103 EX-IDE Type-B + 010f NVMe Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -16574,6 +16617,7 @@ a822 NVMe SSD Controller 172Xa 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 + 1014 0629 PCIe3 6.4TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16988,6 +17032,7 @@ 1655 NetXtreme BCM5717 Gigabit Ethernet PCIe 1656 NetXtreme BCM5718 Gigabit Ethernet PCIe 1657 NetXtreme BCM5719 Gigabit Ethernet PCIe + 1014 0420 FC 5260/5899 4-port 1 GbE Adapter for Power 103c 169d Ethernet 1Gb 4-port 331FLR Adapter 103c 22be Ethernet 1Gb 4-port 331i Adapter 103c 3383 Ethernet 1Gb 4-port 331T Adapter @@ -18253,6 +18298,7 @@ 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0008 ConnectX-4 Stand-up dual-port 100GbE MCX416A-CCAT 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter @@ -18349,6 +18395,7 @@ 0014 RamSan Flash SSD 0015 ZBox 15b7 Sandisk Corp + 2001 Skyhawk Series NVME SSD 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -19099,6 +19146,10 @@ 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE Intelligent adapter 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE Intelligent adapter 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter + 177d 0008 CN2350 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 0009 CN2360 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 000a CN2350 [LiquidIO II] 2-port 10GBASE-T Intelligent adapter + 177d 000b CN2360 [LiquidIO II] 2-port 10GBASE-T Intelligent adapter 9703 CN23XX [LiquidIO II] NVMe Controller 9712 CN23XX [LiquidIO II] SRIOV Virtual Function 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function @@ -19360,6 +19411,7 @@ 1a07 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL] 1a08 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL_QSFP] 1a09 Arria10 PCIe Darklite Design [DNPCIe_80G_A10_LL] + 1a0a VirtexUS PCIe Darklite Design [DNVUF2_HPC_PCIe] 17e4 Sectra AB 0001 KK671 Cardbus encryption board 0002 KK672 Cardbus encryption board @@ -19370,8 +19422,8 @@ 0021 EN2210 [c.Link] MoCA Network Controller (Coax) 0025 EN2510 [c.Link] MoCA Network Controller (Coax, PCIe interface) 0027 EN2710 [c.Link] MoCA 2.0 Network Controller (Coax, PCIe interface) - 3706 MoCA 2.0 Network Controller (Coax, PCIe interface) - 3711 MoCA 2.5 Network Controller (Coax, PCIe interface) + 3700 MoCA 2.0 Network Controller (Coax, PCIe interface) + 3710 MoCA 2.5 Network Controller (Coax, PCIe interface) 17ee Connect Components Ltd 17f2 Albatron Corp. 17f3 RDC Semiconductor, Inc. @@ -20570,6 +20622,7 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter + 0023 Ultrastar SN200 Series NVMe SSD 1c5f Beijing Memblaze Technology Co. Ltd. 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) @@ -20608,6 +20661,65 @@ 0007 ExaNIC X40 1cf7 Subspace Dynamics 1d00 Pure Storage +1d0f Amazon.com, Inc. + cd01 NVMe SSD Controller + ec20 Elastic Network Adapter (ENA) +1d17 Zhaoxin + 070f ZX-100 PCI Express Root Port + 0710 ZX-100/ZX-200 PCI Express Root Port + 0711 ZX-100/ZX-200 PCI Express Root Port + 0712 ZX-100/ZX-200 PCI Express Root Port + 0713 ZX-100/ZX-200 PCI Express Root Port + 0714 ZX-100/ZX-200 PCI Express Root Port + 0715 ZX-100/ZX-200 PCI Express Root Port + 0716 ZX-D PCI Express Root Port + 0717 ZX-D PCI Express Root Port + 0718 ZX-D PCI Express Root Port + 0719 ZX-D PCI Express Root Port + 071a ZX-D PCI Express Root Port + 071b ZX-D PCI Express Root Port + 071c ZX-D PCI Express Root Port + 071d ZX-D PCI Express Root Port + 071e ZX-D PCI Express Root Port + 071f ZX-200 Upstream Port of PCI Express Switch + 0720 ZX-200 PCIE RC6 controller + 0721 ZX-200 Downstream Port of PCI Express Switch + 0722 ZX-200 PCIE P2C bridge + 1000 ZX-D Standard Host Bridge + 1001 ZX-D Miscellaneous Bus + 3001 ZX-100 Standard Host Bridge + 300a ZX-100 Miscellaneous Bus + 3038 ZX-100/ZX-200 Standard Universal PCI to USB Host Controller + 3104 ZX-100/ZX-200 Standard Enhanced PCI to USB Host Controller + 31b0 ZX-100/ZX-D Standard Host Bridge + 31b1 ZX-100/ZX-D Standard Host Bridge + 31b2 ZX-100/ZX-D DRAM Controller + 31b3 ZX-100/ZX-D Power Management Controller + 31b4 ZX-100/ZX-D I/O APIC + 31b5 ZX-100/ZX-D Scratch Device + 31b7 ZX-100/ZX-D Standard Host Bridge + 31b8 ZX-100/ZX-D PCI to PCI Bridge + 3288 ZX-100/ZX-D High Definition Audio Controller + 345b ZX-100/ZX-D Miscellaneous Bus + 3a02 ZX-100 C-320 GPU + 3a03 ZX-D C-860 GPU + 9002 ZX-100/ZX-200 EIDE Controller + 9003 ZX-100 EIDE Controller + 9045 ZX-100/ZX-D RAID Accelerator + 9046 ZX-D RAID Accelerator + 9083 ZX-100/ZX-200 StorX AHCI Controller + 9084 ZX-100 StorX AHCI Controller + 9100 ZX-200 Cross bus + 9101 ZX-200 Traffic Controller + 9141 ZX-100 High Definition Audio Controller + 9142 ZX-D High Definition Audio Controller + 9180 ZX-200 Networking Gigabit Ethernet Adapter + 9202 ZX-100 USB eXtensible Host Controller + 9203 ZX-200 USB eXtensible Host Controller + 9286 ZX-D eMMC Host Controller + 9300 ZX-D eSPI Host Controller + 95d0 ZX-100 Universal SD Host Controller + f410 ZX-100/ZX-D PCI Com Port 1d18 RME 0001 Fireface UFX+ 1d1d CNEX Labs @@ -20630,6 +20742,8 @@ 1d62 Nebbiolo Technologies 1d65 Imagine Communications Corp. 04de Taurus/McKinley +1d6a Aquantia Corp. + d107 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 1d6c Atomic Rules LLC 1001 A5PL-E1 1002 A5PL-E7 @@ -21305,6 +21419,8 @@ 6178 DVB-S2 4 Tuner PCIe Card 544d 6904 TBS6904 DVB-S2 Quad Tuner PCIe Card 544d 6905 TBS6905 DVB-S2 Quad Tuner PCIe Card + 6205 0001 TBS6205 DVB-T2/T/C Quad TV Tuner PCIe Card + 6209 0001 TBS6209 DVB-T2/C2/T/C/ISDB-T OctaTV Tuner 5452 SCANLAB AG 3443 RTC4 5455 Technische University Berlin @@ -21336,6 +21452,8 @@ c147 Virtualized Graphics Device 5854 GoTView 5ace Beholder International Ltd. +6205 TBS Technologies (wrong ID) +6209 TBS Technologies (wrong ID) 631c SmartInfra Ltd 1652 PXI-1652 Signal Generator 2504 PXI-2504 Signal Interrogator @@ -23211,6 +23329,7 @@ 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ + 19e5 d11c Ethernet 2-port X710 10Gb SFP+ Adapter SP330 8086 0000 Ethernet Converged Network Adapter X710 8086 0001 Ethernet Converged Network Adapter X710-4 8086 0002 Ethernet Converged Network Adapter X710-4 @@ -24639,8 +24758,11 @@ 1590 00e8 100Gb 1-port OP101 QSFP28 x16 PCIe Gen3 with Intel Omni-Path Adapter 1590 021c Apollo 100Gb 1-port Intel Omni-Path Architecture 860z Mezzanine FIO Adapter 15d9 0934 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, SIOM Module + 15d9 099b Omni-path HFI Mezz AOC, 1 Port, PCIe x16. 1cb8 0001 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600 QSFP28 1cb8 0002 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC6600 Fixed Port + 1cb8 0003 Omni-Path HFI Adapter 100 Series, 2 Port, 2 PCIe x16, Earth Simulation QSFP28 + 1cb8 0004 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600E QSFP28 8086 2628 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16 8086 2629 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x8 8086 262a Omni-Path HFI Adapter 100 Series, 2 Ports, Split PCIe x16 @@ -27363,6 +27485,8 @@ 5912 HD Graphics 630 5916 HD Graphics 620 17aa 224f ThinkPad X1 Carbon 5th Gen + 591d HD Graphics P630 + 591f Intel Kaby Lake Host Bridge 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster @@ -28049,6 +28173,7 @@ 9d17 Sunrise Point-LP PCI Express Root Port #8 9d18 Sunrise Point-LP PCI Express Root Port #9 17aa 382a B51-80 Laptop + 9d19 Sunrise Point-LP PCI Express Root Port #10 9d21 Sunrise Point-LP PMC 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28069,6 +28194,7 @@ 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop + 9d35 Sunrise Point-LP Integrated Sensor Hub 9d3a Sunrise Point-LP CSME HECI #1 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28077,6 +28203,7 @@ 17aa 382a B51-80 Laptop 9d48 Sunrise Point-LP LPC Controller 1028 06f3 Latitude 3570 + 9d56 Sunrise Point-LP LPC Controller 9d58 Sunrise Point-LP LPC Controller 17aa 224f ThinkPad X1 Carbon 5th Gen 9d60 Sunrise Point-LP Serial IO I2C Controller #0 @@ -28091,6 +28218,7 @@ 9d70 Sunrise Point-LP HD Audio 1028 06f3 Latitude 3570 17aa 382a B51-80 Laptop + 9d71 Sunrise Point-LP HD Audio a000 Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge 1458 5000 GA-D525TUD 8086 4f4d DeskTop Board D510MO @@ -28190,6 +28318,7 @@ a169 Sunrise Point-H PCI Root Port #19 a16a Sunrise Point-H PCI Root Port #20 a170 Sunrise Point-H HD Audio + a171 CM238 HD Audio Controller a182 Lewisburg SATA Controller [AHCI mode] a186 Lewisburg SATA Controller [RAID mode] a190 Lewisburg PCI Express Root Port #1 From owner-svn-src-stable-11@freebsd.org Sun Sep 17 10:43:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0584BE09273; Sun, 17 Sep 2017 10:43:29 +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 C6B2C7E79F; Sun, 17 Sep 2017 10:43: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 v8HAhRPs096128; Sun, 17 Sep 2017 10:43:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAhRn0096126; Sun, 17 Sep 2017 10:43:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171043.v8HAhRn0096126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:43: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: r323672 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:43:29 -0000 Author: kib Date: Sun Sep 17 10:43:27 2017 New Revision: 323672 URL: https://svnweb.freebsd.org/changeset/base/323672 Log: MFC r314477 (by imp): Fix TCO v3 tick convert. Modified: stable/11/sys/dev/ichwd/ichwd.c stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.c Sun Sep 17 10:28:45 2017 (r323671) +++ stable/11/sys/dev/ichwd/ichwd.c Sun Sep 17 10:43:27 2017 (r323672) @@ -512,7 +512,13 @@ ichwd_event(void *arg, unsigned int cmd, int *error) /* convert from power-of-two-ns to WDT ticks */ cmd &= WD_INTERVAL; - timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; + + if (sc->tco_version == 3) { + timeout = ((uint64_t)1 << cmd) / ICHWD_TCO_V3_TICK; + } else { + timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; + } + if (cmd) { if (!sc->active) ichwd_tmr_enable(sc); Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:28:45 2017 (r323671) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:43:27 2017 (r323672) @@ -345,7 +345,9 @@ struct ichwd_softc { #define TCO_RLD1_TMR_MAX 0x003f #define TCO_RLD2_TMR_MAX 0x03ff -/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */ +/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ #define ICHWD_TICK 600000000 +/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ +#define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-stable-11@freebsd.org Sun Sep 17 10:45:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65847E09459; Sun, 17 Sep 2017 10:45:09 +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 141F37E92A; Sun, 17 Sep 2017 10:45:09 +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 v8HAj8Ah096259; Sun, 17 Sep 2017 10:45:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAj8Y5096258; Sun, 17 Sep 2017 10:45:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171045.v8HAj8Y5096258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:45:08 +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: r323673 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:45:09 -0000 Author: kib Date: Sun Sep 17 10:45:08 2017 New Revision: 323673 URL: https://svnweb.freebsd.org/changeset/base/323673 Log: MFC r323386: Style: tab after #define. Modified: stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:43:27 2017 (r323672) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:45:08 2017 (r323673) @@ -29,7 +29,7 @@ */ #ifndef _ICHWD_H_ -#define _ICHWD_H_ +#define _ICHWD_H_ struct ichwd_device { uint16_t device; @@ -60,279 +60,279 @@ struct ichwd_softc { eventhandler_tag ev_tag; }; -#define VENDORID_INTEL 0x8086 -#define DEVICEID_BAYTRAIL 0x0f1c -#define DEVICEID_CPT0 0x1c40 -#define DEVICEID_CPT1 0x1c41 -#define DEVICEID_CPT2 0x1c42 -#define DEVICEID_CPT3 0x1c43 -#define DEVICEID_CPT4 0x1c44 -#define DEVICEID_CPT5 0x1c45 -#define DEVICEID_CPT6 0x1c46 -#define DEVICEID_CPT7 0x1c47 -#define DEVICEID_CPT8 0x1c48 -#define DEVICEID_CPT9 0x1c49 -#define DEVICEID_CPT10 0x1c4a -#define DEVICEID_CPT11 0x1c4b -#define DEVICEID_CPT12 0x1c4c -#define DEVICEID_CPT13 0x1c4d -#define DEVICEID_CPT14 0x1c4e -#define DEVICEID_CPT15 0x1c4f -#define DEVICEID_CPT16 0x1c50 -#define DEVICEID_CPT17 0x1c51 -#define DEVICEID_CPT18 0x1c52 -#define DEVICEID_CPT19 0x1c53 -#define DEVICEID_CPT20 0x1c54 -#define DEVICEID_CPT21 0x1c55 -#define DEVICEID_CPT22 0x1c56 -#define DEVICEID_CPT23 0x1c57 -#define DEVICEID_CPT24 0x1c58 -#define DEVICEID_CPT25 0x1c59 -#define DEVICEID_CPT26 0x1c5a -#define DEVICEID_CPT27 0x1c5b -#define DEVICEID_CPT28 0x1c5c -#define DEVICEID_CPT29 0x1c5d -#define DEVICEID_CPT30 0x1c5e -#define DEVICEID_CPT31 0x1c5f -#define DEVICEID_PATSBURG_LPC1 0x1d40 -#define DEVICEID_PATSBURG_LPC2 0x1d41 -#define DEVICEID_PPT0 0x1e40 -#define DEVICEID_PPT1 0x1e41 -#define DEVICEID_PPT2 0x1e42 -#define DEVICEID_PPT3 0x1e43 -#define DEVICEID_PPT4 0x1e44 -#define DEVICEID_PPT5 0x1e45 -#define DEVICEID_PPT6 0x1e46 -#define DEVICEID_PPT7 0x1e47 -#define DEVICEID_PPT8 0x1e48 -#define DEVICEID_PPT9 0x1e49 -#define DEVICEID_PPT10 0x1e4a -#define DEVICEID_PPT11 0x1e4b -#define DEVICEID_PPT12 0x1e4c -#define DEVICEID_PPT13 0x1e4d -#define DEVICEID_PPT14 0x1e4e -#define DEVICEID_PPT15 0x1e4f -#define DEVICEID_PPT16 0x1e50 -#define DEVICEID_PPT17 0x1e51 -#define DEVICEID_PPT18 0x1e52 -#define DEVICEID_PPT19 0x1e53 -#define DEVICEID_PPT20 0x1e54 -#define DEVICEID_PPT21 0x1e55 -#define DEVICEID_PPT22 0x1e56 -#define DEVICEID_PPT23 0x1e57 -#define DEVICEID_PPT24 0x1e58 -#define DEVICEID_PPT25 0x1e59 -#define DEVICEID_PPT26 0x1e5a -#define DEVICEID_PPT27 0x1e5b -#define DEVICEID_PPT28 0x1e5c -#define DEVICEID_PPT29 0x1e5d -#define DEVICEID_PPT30 0x1e5e -#define DEVICEID_PPT31 0x1e5f -#define DEVICEID_AVN0 0x1f38 -#define DEVICEID_AVN1 0x1f39 -#define DEVICEID_AVN2 0x1f3a -#define DEVICEID_AVN3 0x1f3b -#define DEVICEID_BRASWELL 0x229c -#define DEVICEID_DH89XXCC_LPC 0x2310 -#define DEVICEID_COLETOCRK_LPC 0x2390 -#define DEVICEID_82801AA 0x2410 -#define DEVICEID_82801AB 0x2420 -#define DEVICEID_82801BA 0x2440 -#define DEVICEID_82801BAM 0x244c -#define DEVICEID_82801CA 0x2480 -#define DEVICEID_82801CAM 0x248c -#define DEVICEID_82801DB 0x24c0 -#define DEVICEID_82801DBM 0x24cc -#define DEVICEID_82801E 0x2450 -#define DEVICEID_82801EB 0x24dc -#define DEVICEID_82801EBR 0x24d0 -#define DEVICEID_6300ESB 0x25a1 -#define DEVICEID_82801FBR 0x2640 -#define DEVICEID_ICH6M 0x2641 -#define DEVICEID_ICH6W 0x2642 -#define DEVICEID_63XXESB 0x2670 -#define DEVICEID_ICH7 0x27b8 -#define DEVICEID_ICH7DH 0x27b0 -#define DEVICEID_ICH7M 0x27b9 -#define DEVICEID_NM10 0x27bc -#define DEVICEID_ICH7MDH 0x27bd -#define DEVICEID_ICH8 0x2810 -#define DEVICEID_ICH8DH 0x2812 -#define DEVICEID_ICH8DO 0x2814 -#define DEVICEID_ICH8M 0x2815 -#define DEVICEID_ICH8ME 0x2811 -#define DEVICEID_ICH9 0x2918 -#define DEVICEID_ICH9DH 0x2912 -#define DEVICEID_ICH9DO 0x2914 -#define DEVICEID_ICH9M 0x2919 -#define DEVICEID_ICH9ME 0x2917 -#define DEVICEID_ICH9R 0x2916 -#define DEVICEID_ICH10 0x3a18 -#define DEVICEID_ICH10D 0x3a1a -#define DEVICEID_ICH10DO 0x3a14 -#define DEVICEID_ICH10R 0x3a16 -#define DEVICEID_PCH 0x3b00 -#define DEVICEID_PCHM 0x3b01 -#define DEVICEID_P55 0x3b02 -#define DEVICEID_PM55 0x3b03 -#define DEVICEID_H55 0x3b06 -#define DEVICEID_QM57 0x3b07 -#define DEVICEID_H57 0x3b08 -#define DEVICEID_HM55 0x3b09 -#define DEVICEID_Q57 0x3b0a -#define DEVICEID_HM57 0x3b0b -#define DEVICEID_PCHMSFF 0x3b0d -#define DEVICEID_QS57 0x3b0f -#define DEVICEID_3400 0x3b12 -#define DEVICEID_3420 0x3b14 -#define DEVICEID_3450 0x3b16 -#define DEVICEID_LPT0 0x8c40 -#define DEVICEID_LPT1 0x8c41 -#define DEVICEID_LPT2 0x8c42 -#define DEVICEID_LPT3 0x8c43 -#define DEVICEID_LPT4 0x8c44 -#define DEVICEID_LPT5 0x8c45 -#define DEVICEID_LPT6 0x8c46 -#define DEVICEID_LPT7 0x8c47 -#define DEVICEID_LPT8 0x8c48 -#define DEVICEID_LPT9 0x8c49 -#define DEVICEID_LPT10 0x8c4a -#define DEVICEID_LPT11 0x8c4b -#define DEVICEID_LPT12 0x8c4c -#define DEVICEID_LPT13 0x8c4d -#define DEVICEID_LPT14 0x8c4e -#define DEVICEID_LPT15 0x8c4f -#define DEVICEID_LPT16 0x8c50 -#define DEVICEID_LPT17 0x8c51 -#define DEVICEID_LPT18 0x8c52 -#define DEVICEID_LPT19 0x8c53 -#define DEVICEID_LPT20 0x8c54 -#define DEVICEID_LPT21 0x8c55 -#define DEVICEID_LPT22 0x8c56 -#define DEVICEID_LPT23 0x8c57 -#define DEVICEID_LPT24 0x8c58 -#define DEVICEID_LPT25 0x8c59 -#define DEVICEID_LPT26 0x8c5a -#define DEVICEID_LPT27 0x8c5b -#define DEVICEID_LPT28 0x8c5c -#define DEVICEID_LPT29 0x8c5d -#define DEVICEID_LPT30 0x8c5e -#define DEVICEID_LPT31 0x8c5f -#define DEVICEID_WCPT1 0x8cc1 -#define DEVICEID_WCPT2 0x8cc2 -#define DEVICEID_WCPT3 0x8cc3 -#define DEVICEID_WCPT4 0x8cc4 -#define DEVICEID_WCPT6 0x8cc6 -#define DEVICEID_WBG0 0x8d40 -#define DEVICEID_WBG1 0x8d41 -#define DEVICEID_WBG2 0x8d42 -#define DEVICEID_WBG3 0x8d43 -#define DEVICEID_WBG4 0x8d44 -#define DEVICEID_WBG5 0x8d45 -#define DEVICEID_WBG6 0x8d46 -#define DEVICEID_WBG7 0x8d47 -#define DEVICEID_WBG8 0x8d48 -#define DEVICEID_WBG9 0x8d49 -#define DEVICEID_WBG10 0x8d4a -#define DEVICEID_WBG11 0x8d4b -#define DEVICEID_WBG12 0x8d4c -#define DEVICEID_WBG13 0x8d4d -#define DEVICEID_WBG14 0x8d4e -#define DEVICEID_WBG15 0x8d4f -#define DEVICEID_WBG16 0x8d50 -#define DEVICEID_WBG17 0x8d51 -#define DEVICEID_WBG18 0x8d52 -#define DEVICEID_WBG19 0x8d53 -#define DEVICEID_WBG20 0x8d54 -#define DEVICEID_WBG21 0x8d55 -#define DEVICEID_WBG22 0x8d56 -#define DEVICEID_WBG23 0x8d57 -#define DEVICEID_WBG24 0x8d58 -#define DEVICEID_WBG25 0x8d59 -#define DEVICEID_WBG26 0x8d5a -#define DEVICEID_WBG27 0x8d5b -#define DEVICEID_WBG28 0x8d5c -#define DEVICEID_WBG29 0x8d5d -#define DEVICEID_WBG30 0x8d5e -#define DEVICEID_WBG31 0x8d5f -#define DEVICEID_LPT_LP0 0x9c40 -#define DEVICEID_LPT_LP1 0x9c41 -#define DEVICEID_LPT_LP2 0x9c42 -#define DEVICEID_LPT_LP3 0x9c43 -#define DEVICEID_LPT_LP4 0x9c44 -#define DEVICEID_LPT_LP5 0x9c45 -#define DEVICEID_LPT_LP6 0x9c46 -#define DEVICEID_LPT_LP7 0x9c47 -#define DEVICEID_WCPT_LP1 0x9cc1 -#define DEVICEID_WCPT_LP2 0x9cc2 -#define DEVICEID_WCPT_LP3 0x9cc3 -#define DEVICEID_WCPT_LP5 0x9cc5 -#define DEVICEID_WCPT_LP6 0x9cc6 -#define DEVICEID_WCPT_LP7 0x9cc7 -#define DEVICEID_WCPT_LP9 0x9cc9 +#define VENDORID_INTEL 0x8086 +#define DEVICEID_BAYTRAIL 0x0f1c +#define DEVICEID_CPT0 0x1c40 +#define DEVICEID_CPT1 0x1c41 +#define DEVICEID_CPT2 0x1c42 +#define DEVICEID_CPT3 0x1c43 +#define DEVICEID_CPT4 0x1c44 +#define DEVICEID_CPT5 0x1c45 +#define DEVICEID_CPT6 0x1c46 +#define DEVICEID_CPT7 0x1c47 +#define DEVICEID_CPT8 0x1c48 +#define DEVICEID_CPT9 0x1c49 +#define DEVICEID_CPT10 0x1c4a +#define DEVICEID_CPT11 0x1c4b +#define DEVICEID_CPT12 0x1c4c +#define DEVICEID_CPT13 0x1c4d +#define DEVICEID_CPT14 0x1c4e +#define DEVICEID_CPT15 0x1c4f +#define DEVICEID_CPT16 0x1c50 +#define DEVICEID_CPT17 0x1c51 +#define DEVICEID_CPT18 0x1c52 +#define DEVICEID_CPT19 0x1c53 +#define DEVICEID_CPT20 0x1c54 +#define DEVICEID_CPT21 0x1c55 +#define DEVICEID_CPT22 0x1c56 +#define DEVICEID_CPT23 0x1c57 +#define DEVICEID_CPT24 0x1c58 +#define DEVICEID_CPT25 0x1c59 +#define DEVICEID_CPT26 0x1c5a +#define DEVICEID_CPT27 0x1c5b +#define DEVICEID_CPT28 0x1c5c +#define DEVICEID_CPT29 0x1c5d +#define DEVICEID_CPT30 0x1c5e +#define DEVICEID_CPT31 0x1c5f +#define DEVICEID_PATSBURG_LPC1 0x1d40 +#define DEVICEID_PATSBURG_LPC2 0x1d41 +#define DEVICEID_PPT0 0x1e40 +#define DEVICEID_PPT1 0x1e41 +#define DEVICEID_PPT2 0x1e42 +#define DEVICEID_PPT3 0x1e43 +#define DEVICEID_PPT4 0x1e44 +#define DEVICEID_PPT5 0x1e45 +#define DEVICEID_PPT6 0x1e46 +#define DEVICEID_PPT7 0x1e47 +#define DEVICEID_PPT8 0x1e48 +#define DEVICEID_PPT9 0x1e49 +#define DEVICEID_PPT10 0x1e4a +#define DEVICEID_PPT11 0x1e4b +#define DEVICEID_PPT12 0x1e4c +#define DEVICEID_PPT13 0x1e4d +#define DEVICEID_PPT14 0x1e4e +#define DEVICEID_PPT15 0x1e4f +#define DEVICEID_PPT16 0x1e50 +#define DEVICEID_PPT17 0x1e51 +#define DEVICEID_PPT18 0x1e52 +#define DEVICEID_PPT19 0x1e53 +#define DEVICEID_PPT20 0x1e54 +#define DEVICEID_PPT21 0x1e55 +#define DEVICEID_PPT22 0x1e56 +#define DEVICEID_PPT23 0x1e57 +#define DEVICEID_PPT24 0x1e58 +#define DEVICEID_PPT25 0x1e59 +#define DEVICEID_PPT26 0x1e5a +#define DEVICEID_PPT27 0x1e5b +#define DEVICEID_PPT28 0x1e5c +#define DEVICEID_PPT29 0x1e5d +#define DEVICEID_PPT30 0x1e5e +#define DEVICEID_PPT31 0x1e5f +#define DEVICEID_AVN0 0x1f38 +#define DEVICEID_AVN1 0x1f39 +#define DEVICEID_AVN2 0x1f3a +#define DEVICEID_AVN3 0x1f3b +#define DEVICEID_BRASWELL 0x229c +#define DEVICEID_DH89XXCC_LPC 0x2310 +#define DEVICEID_COLETOCRK_LPC 0x2390 +#define DEVICEID_82801AA 0x2410 +#define DEVICEID_82801AB 0x2420 +#define DEVICEID_82801BA 0x2440 +#define DEVICEID_82801BAM 0x244c +#define DEVICEID_82801CA 0x2480 +#define DEVICEID_82801CAM 0x248c +#define DEVICEID_82801DB 0x24c0 +#define DEVICEID_82801DBM 0x24cc +#define DEVICEID_82801E 0x2450 +#define DEVICEID_82801EB 0x24dc +#define DEVICEID_82801EBR 0x24d0 +#define DEVICEID_6300ESB 0x25a1 +#define DEVICEID_82801FBR 0x2640 +#define DEVICEID_ICH6M 0x2641 +#define DEVICEID_ICH6W 0x2642 +#define DEVICEID_63XXESB 0x2670 +#define DEVICEID_ICH7 0x27b8 +#define DEVICEID_ICH7DH 0x27b0 +#define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc +#define DEVICEID_ICH7MDH 0x27bd +#define DEVICEID_ICH8 0x2810 +#define DEVICEID_ICH8DH 0x2812 +#define DEVICEID_ICH8DO 0x2814 +#define DEVICEID_ICH8M 0x2815 +#define DEVICEID_ICH8ME 0x2811 +#define DEVICEID_ICH9 0x2918 +#define DEVICEID_ICH9DH 0x2912 +#define DEVICEID_ICH9DO 0x2914 +#define DEVICEID_ICH9M 0x2919 +#define DEVICEID_ICH9ME 0x2917 +#define DEVICEID_ICH9R 0x2916 +#define DEVICEID_ICH10 0x3a18 +#define DEVICEID_ICH10D 0x3a1a +#define DEVICEID_ICH10DO 0x3a14 +#define DEVICEID_ICH10R 0x3a16 +#define DEVICEID_PCH 0x3b00 +#define DEVICEID_PCHM 0x3b01 +#define DEVICEID_P55 0x3b02 +#define DEVICEID_PM55 0x3b03 +#define DEVICEID_H55 0x3b06 +#define DEVICEID_QM57 0x3b07 +#define DEVICEID_H57 0x3b08 +#define DEVICEID_HM55 0x3b09 +#define DEVICEID_Q57 0x3b0a +#define DEVICEID_HM57 0x3b0b +#define DEVICEID_PCHMSFF 0x3b0d +#define DEVICEID_QS57 0x3b0f +#define DEVICEID_3400 0x3b12 +#define DEVICEID_3420 0x3b14 +#define DEVICEID_3450 0x3b16 +#define DEVICEID_LPT0 0x8c40 +#define DEVICEID_LPT1 0x8c41 +#define DEVICEID_LPT2 0x8c42 +#define DEVICEID_LPT3 0x8c43 +#define DEVICEID_LPT4 0x8c44 +#define DEVICEID_LPT5 0x8c45 +#define DEVICEID_LPT6 0x8c46 +#define DEVICEID_LPT7 0x8c47 +#define DEVICEID_LPT8 0x8c48 +#define DEVICEID_LPT9 0x8c49 +#define DEVICEID_LPT10 0x8c4a +#define DEVICEID_LPT11 0x8c4b +#define DEVICEID_LPT12 0x8c4c +#define DEVICEID_LPT13 0x8c4d +#define DEVICEID_LPT14 0x8c4e +#define DEVICEID_LPT15 0x8c4f +#define DEVICEID_LPT16 0x8c50 +#define DEVICEID_LPT17 0x8c51 +#define DEVICEID_LPT18 0x8c52 +#define DEVICEID_LPT19 0x8c53 +#define DEVICEID_LPT20 0x8c54 +#define DEVICEID_LPT21 0x8c55 +#define DEVICEID_LPT22 0x8c56 +#define DEVICEID_LPT23 0x8c57 +#define DEVICEID_LPT24 0x8c58 +#define DEVICEID_LPT25 0x8c59 +#define DEVICEID_LPT26 0x8c5a +#define DEVICEID_LPT27 0x8c5b +#define DEVICEID_LPT28 0x8c5c +#define DEVICEID_LPT29 0x8c5d +#define DEVICEID_LPT30 0x8c5e +#define DEVICEID_LPT31 0x8c5f +#define DEVICEID_WCPT1 0x8cc1 +#define DEVICEID_WCPT2 0x8cc2 +#define DEVICEID_WCPT3 0x8cc3 +#define DEVICEID_WCPT4 0x8cc4 +#define DEVICEID_WCPT6 0x8cc6 +#define DEVICEID_WBG0 0x8d40 +#define DEVICEID_WBG1 0x8d41 +#define DEVICEID_WBG2 0x8d42 +#define DEVICEID_WBG3 0x8d43 +#define DEVICEID_WBG4 0x8d44 +#define DEVICEID_WBG5 0x8d45 +#define DEVICEID_WBG6 0x8d46 +#define DEVICEID_WBG7 0x8d47 +#define DEVICEID_WBG8 0x8d48 +#define DEVICEID_WBG9 0x8d49 +#define DEVICEID_WBG10 0x8d4a +#define DEVICEID_WBG11 0x8d4b +#define DEVICEID_WBG12 0x8d4c +#define DEVICEID_WBG13 0x8d4d +#define DEVICEID_WBG14 0x8d4e +#define DEVICEID_WBG15 0x8d4f +#define DEVICEID_WBG16 0x8d50 +#define DEVICEID_WBG17 0x8d51 +#define DEVICEID_WBG18 0x8d52 +#define DEVICEID_WBG19 0x8d53 +#define DEVICEID_WBG20 0x8d54 +#define DEVICEID_WBG21 0x8d55 +#define DEVICEID_WBG22 0x8d56 +#define DEVICEID_WBG23 0x8d57 +#define DEVICEID_WBG24 0x8d58 +#define DEVICEID_WBG25 0x8d59 +#define DEVICEID_WBG26 0x8d5a +#define DEVICEID_WBG27 0x8d5b +#define DEVICEID_WBG28 0x8d5c +#define DEVICEID_WBG29 0x8d5d +#define DEVICEID_WBG30 0x8d5e +#define DEVICEID_WBG31 0x8d5f +#define DEVICEID_LPT_LP0 0x9c40 +#define DEVICEID_LPT_LP1 0x9c41 +#define DEVICEID_LPT_LP2 0x9c42 +#define DEVICEID_LPT_LP3 0x9c43 +#define DEVICEID_LPT_LP4 0x9c44 +#define DEVICEID_LPT_LP5 0x9c45 +#define DEVICEID_LPT_LP6 0x9c46 +#define DEVICEID_LPT_LP7 0x9c47 +#define DEVICEID_WCPT_LP1 0x9cc1 +#define DEVICEID_WCPT_LP2 0x9cc2 +#define DEVICEID_WCPT_LP3 0x9cc3 +#define DEVICEID_WCPT_LP5 0x9cc5 +#define DEVICEID_WCPT_LP6 0x9cc6 +#define DEVICEID_WCPT_LP7 0x9cc7 +#define DEVICEID_WCPT_LP9 0x9cc9 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ -#define ICH_GEN_STA 0xd4 -#define ICH_GEN_STA_NO_REBOOT 0x02 -#define ICH_PMBASE 0x40 /* ACPI base address register */ -#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ +#define ICH_GEN_STA 0xd4 +#define ICH_GEN_STA_NO_REBOOT 0x02 +#define ICH_PMBASE 0x40 /* ACPI base address register */ +#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ /* ICH Chipset Configuration Registers (ICH6 and newer) */ -#define ICH_RCBA 0xf0 -#define ICH_GCS_OFFSET 0x3410 -#define ICH_GCS_SIZE 0x4 -#define ICH_GCS_NO_REBOOT 0x20 +#define ICH_RCBA 0xf0 +#define ICH_GCS_OFFSET 0x3410 +#define ICH_GCS_SIZE 0x4 +#define ICH_GCS_NO_REBOOT 0x20 /* SoC Power Management Configuration Registers */ -#define ICH_PBASE 0x44 -#define ICH_PMC_OFFSET 0x08 -#define ICH_PMC_SIZE 0x4 -#define ICH_PMC_NO_REBOOT 0x10 +#define ICH_PBASE 0x44 +#define ICH_PMC_OFFSET 0x08 +#define ICH_PMC_SIZE 0x4 +#define ICH_PMC_NO_REBOOT 0x10 /* register names and locations (relative to PMBASE) */ -#define SMI_BASE 0x30 /* base address for SMI registers */ -#define SMI_LEN 0x08 -#define SMI_EN 0x00 /* SMI Control and Enable Register */ -#define SMI_STS 0x04 /* SMI Status Register */ -#define TCO_BASE 0x60 /* base address for TCO registers */ -#define TCO_LEN 0x20 -#define TCO_RLD 0x00 /* TCO Reload and Current Value */ -#define TCO_TMR1 0x01 /* TCO Timer Initial Value +#define SMI_BASE 0x30 /* base address for SMI registers */ +#define SMI_LEN 0x08 +#define SMI_EN 0x00 /* SMI Control and Enable Register */ +#define SMI_STS 0x04 /* SMI Status Register */ +#define TCO_BASE 0x60 /* base address for TCO registers */ +#define TCO_LEN 0x20 +#define TCO_RLD 0x00 /* TCO Reload and Current Value */ +#define TCO_TMR1 0x01 /* TCO Timer Initial Value (ICH5 and older, 8 bits) */ -#define TCO_TMR2 0x12 /* TCO Timer Initial Value +#define TCO_TMR2 0x12 /* TCO Timer Initial Value (ICH6 and newer, 16 bits) */ -#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ -#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ -#define TCO1_STS 0x04 /* TCO Status 1 */ -#define TCO2_STS 0x06 /* TCO Status 2 */ -#define TCO1_CNT 0x08 /* TCO Control 1 */ -#define TCO2_CNT 0x08 /* TCO Control 2 */ -#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ -#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ +#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ +#define TCO1_STS 0x04 /* TCO Status 1 */ +#define TCO2_STS 0x06 /* TCO Status 2 */ +#define TCO1_CNT 0x08 /* TCO Control 1 */ +#define TCO2_CNT 0x08 /* TCO Control 2 */ +#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ +#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ /* bit definitions for SMI_EN and SMI_STS */ -#define SMI_TCO_EN 0x2000 -#define SMI_TCO_STS 0x2000 -#define SMI_GBL_EN 0x0001 +#define SMI_TCO_EN 0x2000 +#define SMI_TCO_STS 0x2000 +#define SMI_GBL_EN 0x0001 /* timer value mask for TCO_RLD and TCO_TMR */ -#define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK 0x1f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ +#define TCO_TIMEOUT 0x08 /* timed out */ +#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ /* control bits for TCO1_CNT */ -#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ -#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ -#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ -#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ +#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ +#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ +#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ /* * Masks for the TCO timer value field in TCO_RLD. @@ -341,13 +341,13 @@ struct ichwd_softc { * I suspect this is a bug in the ICH5 datasheet and that the minimum is * uniformly 2, but I'd rather err on the side of caution. */ -#define TCO_RLD_TMR_MIN 0x0004 -#define TCO_RLD1_TMR_MAX 0x003f -#define TCO_RLD2_TMR_MAX 0x03ff +#define TCO_RLD_TMR_MIN 0x0004 +#define TCO_RLD1_TMR_MAX 0x003f +#define TCO_RLD2_TMR_MAX 0x03ff /* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ -#define ICHWD_TICK 600000000 +#define ICHWD_TICK 600000000 /* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ -#define ICHWD_TCO_V3_TICK 1000000000 +#define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-stable-11@freebsd.org Sun Sep 17 10:47:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB632E0960B; Sun, 17 Sep 2017 10:47:22 +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 949BC7EA91; Sun, 17 Sep 2017 10:47: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 v8HAlLia096382; Sun, 17 Sep 2017 10:47:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAlLni096381; Sun, 17 Sep 2017 10:47:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171047.v8HAlLni096381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:47: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: r323674 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:47:22 -0000 Author: kib Date: Sun Sep 17 10:47:21 2017 New Revision: 323674 URL: https://svnweb.freebsd.org/changeset/base/323674 Log: MFC r323387, r323388: Add definitions of (new) bits for TCO registers from the Lewisburg/Sunrise Point documentation. Modified: stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:45:08 2017 (r323673) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:47:21 2017 (r323674) @@ -309,6 +309,8 @@ struct ichwd_softc { #define TCO2_CNT 0x08 /* TCO Control 2 */ #define TCO_MESSAGE1 0x0c /* TCO Message 1 */ #define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_WDSTATUS 0x0e /* TCO Watchdog status */ +#define TCO_TMR 0x12 /* TCP Reload value */ /* bit definitions for SMI_EN and SMI_STS */ #define SMI_TCO_EN 0x2000 @@ -317,23 +319,45 @@ struct ichwd_softc { /* timer value mask for TCO_RLD and TCO_TMR */ #define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK2 0x2f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_SLVSEL 0x2000 /* TCO Slave Select Soft Strap */ +#define TCO_CPUSERR_STS 0x1000 +#define TCO_CPUSMI_STS 0x0400 +#define TCO_CPUSCI_STS 0x0200 +#define TCO_BIOSWR_STS 0x0100 +#define TCO_NEWCENTURY 0x0080 /* set for RTC year roll over + (99 to 00) */ +#define TCO_TIMEOUT 0x0008 /* timed out */ +#define TCO_INT_STS 0x0004 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x0002 /* data in (DO NOT USE) */ +#define TCO_NMI2SMI_STS 0x0001 /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_SMLINK_SLAVE_SMI 0x0010 +#define TCO_BOOT_STS 0x0004 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x0002 /* ran down twice */ +#define TCO_INTRD_DET 0x0001 /* control bits for TCO1_CNT */ +#define TCO_LOCK 0x1000 /* SMI_BASE.TCO_EN locked */ #define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ #define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ #define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ #define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +/* control bits for TCO2_CNT */ +#define TCO_OS_POLICY 0x0030 /* mask */ +#define TCO_OS_POLICY_BOOT 0x0000 +#define TCO_OS_POLICY_SHUTD 0x0010 +#define TCO_OS_POLICY_NOLOAD 0x0020 +#define TCO_SMB_ALERT_DISABLE 0x0008 +#define TCO_INTRD_SEL 0x0003 /* mask */ +#define TCO_INTRD_SEL_SILENT 0x0000 +#define TCO_INTRD_SEL_INTR 0x0001 +#define TCO_INTRD_SEL_SMI 0x0002 + /* * Masks for the TCO timer value field in TCO_RLD. * If the datasheets are to be believed, the minimum value actually varies @@ -345,9 +369,15 @@ struct ichwd_softc { #define TCO_RLD1_TMR_MAX 0x003f #define TCO_RLD2_TMR_MAX 0x03ff -/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 0.6 sec) + * for TCO v1/v2/v4 + */ #define ICHWD_TICK 600000000 -/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 1.0 sec) + * for TCO v3 + */ #define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-stable-11@freebsd.org Sun Sep 17 15:45:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9A83E1A037; Sun, 17 Sep 2017 15:45:40 +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 A5A9B3C70; Sun, 17 Sep 2017 15:45:40 +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 v8HFjdxj021566; Sun, 17 Sep 2017 15:45:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HFjdI9021560; Sun, 17 Sep 2017 15:45:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709171545.v8HFjdI9021560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 Sep 2017 15:45: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: r323677 - in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Commit-Revision: 323677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:45:40 -0000 Author: markj Date: Sun Sep 17 15:45:39 2017 New Revision: 323677 URL: https://svnweb.freebsd.org/changeset/base/323677 Log: MFC r322405, r322406: Modify vm_page_grab_pages() to handle VM_ALLOC_NOWAIT, use it in sendfile_swapin(). Modified: stable/11/sys/kern/kern_sendfile.c stable/11/sys/kern/vfs_bio.c stable/11/sys/sparc64/sparc64/pmap.c stable/11/sys/vm/vm_glue.c stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/kern/kern_sendfile.c Sun Sep 17 15:45:39 2017 (r323677) @@ -308,7 +308,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o int npages, int rhpages, int flags) { vm_page_t *pa = sfio->pa; - int nios; + int grabbed, nios; nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; @@ -318,14 +318,14 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o * only required pages. Readahead pages are dealt with later. */ VM_OBJECT_WLOCK(obj); - for (int i = 0; i < npages; i++) { - pa[i] = vm_page_grab(obj, OFF_TO_IDX(vmoff(i, off)), - VM_ALLOC_WIRED | VM_ALLOC_NORMAL | flags); - if (pa[i] == NULL) { - npages = i; - rhpages = 0; - break; - } + + grabbed = vm_page_grab_pages(obj, OFF_TO_IDX(off), + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); + if (grabbed < npages) { + for (int i = grabbed; i < npages; i++) + pa[i] = NULL; + npages = grabbed; + rhpages = 0; } for (int i = 0; i < npages;) { Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/kern/vfs_bio.c Sun Sep 17 15:45:39 2017 (r323677) @@ -2756,7 +2756,7 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int * deadlocks once allocbuf() is called after * pages are vfs_busy_pages(). */ - vm_page_grab_pages(obj, + (void)vm_page_grab_pages(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, VM_ALLOC_SYSTEM | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, Modified: stable/11/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 15:45:39 2017 (r323677) @@ -1252,7 +1252,7 @@ pmap_pinit(pmap_t pm) CPU_ZERO(&pm->pm_active); VM_OBJECT_WLOCK(pm->pm_tsb_obj); - vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | + (void)vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO, ma, TSB_PAGES); VM_OBJECT_WUNLOCK(pm->pm_tsb_obj); for (i = 0; i < TSB_PAGES; i++) Modified: stable/11/sys/vm/vm_glue.c ============================================================================== --- stable/11/sys/vm/vm_glue.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_glue.c Sun Sep 17 15:45:39 2017 (r323677) @@ -391,7 +391,7 @@ vm_thread_new(struct thread *td, int pages) * page of stack. */ VM_OBJECT_WLOCK(ksobj); - vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, ma, pages); for (i = 0; i < pages; i++) ma[i]->valid = VM_PAGE_BITS_ALL; @@ -568,7 +568,7 @@ vm_thread_swapin(struct thread *td) pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); - vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, + (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, pages); for (int i = 0; i < pages;) { int j, a, count, rv; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_page.c Sun Sep 17 15:45:39 2017 (r323677) @@ -3147,13 +3147,15 @@ retrylookup: * optional allocation flags: * VM_ALLOC_IGN_SBUSY do not sleep on soft busy pages * VM_ALLOC_NOBUSY do not exclusive busy the page + * VM_ALLOC_NOWAIT do not sleep * VM_ALLOC_SBUSY set page to sbusy state * VM_ALLOC_WIRED wire the pages * VM_ALLOC_ZERO zero and validate any invalid pages * - * This routine may sleep. + * If VM_ALLOC_NOWAIT is not specified, this routine may sleep. Otherwise, it + * may return a partial prefix of the requested range. */ -void +int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count) { @@ -3171,7 +3173,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pin (allocflags & VM_ALLOC_IGN_SBUSY) != 0, ("vm_page_grab_pages: VM_ALLOC_SBUSY/IGN_SBUSY mismatch")); if (count == 0) - return; + return (0); i = 0; retrylookup: m = vm_page_lookup(object, pindex + i); @@ -3180,6 +3182,8 @@ retrylookup: sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? vm_page_xbusied(m) : vm_page_busied(m); if (sleep) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + break; /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -3207,6 +3211,8 @@ retrylookup: m = vm_page_alloc(object, pindex + i, (allocflags & ~VM_ALLOC_IGN_SBUSY) | VM_ALLOC_COUNT(count - i)); if (m == NULL) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + break; VM_OBJECT_WUNLOCK(object); VM_WAIT; VM_OBJECT_WLOCK(object); @@ -3221,6 +3227,7 @@ retrylookup: ma[i] = m; m = vm_page_next(m); } + return (i); } /* Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_page.h Sun Sep 17 15:45:39 2017 (r323677) @@ -414,7 +414,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_IGN_SBUSY 0x1000 /* (gp) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #define VM_ALLOC_SBUSY 0x4000 /* (acgp) Shared busy the page */ -#define VM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ +#define VM_ALLOC_NOWAIT 0x8000 /* (gp) Do not sleep */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) @@ -454,7 +454,7 @@ vm_page_t vm_page_alloc_contig(vm_object_t object, vm_ vm_page_t vm_page_alloc_freelist(int, int); void vm_page_change_lock(vm_page_t m, struct mtx **mtx); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); -void vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, +int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count); int vm_page_try_to_free (vm_page_t); void vm_page_deactivate (vm_page_t); From owner-svn-src-stable-11@freebsd.org Sun Sep 17 16:45:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 893E6E1D60B; Sun, 17 Sep 2017 16:45:51 +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 57FFD64BA5; Sun, 17 Sep 2017 16:45:51 +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 v8HGjopt046767; Sun, 17 Sep 2017 16:45:50 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HGjoKV046764; Sun, 17 Sep 2017 16:45:50 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709171645.v8HGjoKV046764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 16:45:50 +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: r323681 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 323681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 16:45:51 -0000 Author: alc Date: Sun Sep 17 16:45:50 2017 New Revision: 323681 URL: https://svnweb.freebsd.org/changeset/base/323681 Log: MFC r321840,322041 The blist_meta_* routines that process a subtree take arguments 'radix' and 'skip', which denote, respectively, the largest number of blocks that can be managed by a subtree of that height, and one less than the number of nodes in a subtree of that height. This change removes the 'skip' argument from those functions because 'skip' can be trivially computed from 'radius'. This change also redefines 'skip' so that it denotes the number of nodes in the subtree, and so changes loop upper bound tests from '<= skip' to '< skip' to account for the change. The 'skip' field is also removed from the blist struct. The self-test program is changed so that the print command includes the cursor value in the output. In case readers are misled by expressions that combine multiplication and division, add parentheses to make the precedence explicit. Modified: stable/11/sys/kern/subr_blist.c stable/11/sys/sys/blist.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 16:45:12 2017 (r323680) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 16:45:50 2017 (r323681) @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) #define free(a,b) free(a) +#define CTASSERT(expr) #include @@ -123,27 +124,52 @@ void panic(const char *ctl, ...); static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t cursor); + daddr_t radix, 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, daddr_t skip, daddr_t blk); + daddr_t radix, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, blist_t dest, daddr_t count); + blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t blk); -static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, - daddr_t count); + daddr_t radix, daddr_t blk); +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count); #ifndef _KERNEL static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, int tab); + int tab); #endif #ifdef _KERNEL static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif +CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); + /* + * For a subtree that can represent the state of up to 'radix' blocks, the + * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. If 'm' + * is short for BLIST_META_RADIX, then for a tree of height h with L=m**h + * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... + m**h, + * or, equivalently, (m**(h+1)-1)/(m-1). This quantity is called 'skip' + * in the 'meta' functions that process subtrees. Since integer division + * discards remainders, we can express this computation as + * skip = (m * m**h) / (m - 1) + * skip = (m * (radix / BLIST_BMAP_RADIX)) / (m - 1) + * and since m divides BLIST_BMAP_RADIX, we can simplify further to + * skip = (radix / (BLIST_BMAP_RADIX / m)) / (m - 1) + * skip = radix / ((BLIST_BMAP_RADIX / m) * (m - 1)) + * so that simple integer division by a constant can safely be used for the + * calculation. + */ +static inline daddr_t +radix_to_skip(daddr_t radix) +{ + + return (radix / + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1))); +} + +/* * blist_create() - create a blist capable of handling up to the specified * number of blocks * @@ -157,18 +183,16 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - daddr_t nodes, radix, skip; + daddr_t nodes, radix; /* - * Calculate radix and skip field used for scanning. + * Calculate the radix field used for scanning. */ radix = BLIST_BMAP_RADIX; - skip = 0; while (radix < blocks) { radix *= BLIST_META_RADIX; - skip = (skip + 1) * BLIST_META_RADIX; } - nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); + nodes = 1 + blst_radix_init(NULL, radix, blocks); bl = malloc(sizeof(struct blist), M_SWAP, flags); if (bl == NULL) @@ -176,14 +200,13 @@ blist_create(daddr_t blocks, int flags) bl->bl_blocks = blocks; bl->bl_radix = radix; - bl->bl_skip = skip; bl->bl_cursor = 0; bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { free(bl, M_SWAP); return (NULL); } - blst_radix_init(bl->bl_root, radix, skip, blocks); + blst_radix_init(bl->bl_root, radix, blocks); #if defined(BLIST_DEBUG) printf( @@ -225,7 +248,7 @@ blist_alloc(blist_t bl, daddr_t count) */ while (count <= bl->bl_root->bm_bighint) { blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, - bl->bl_skip, bl->bl_cursor); + bl->bl_cursor); if (blk != SWAPBLK_NONE) { bl->bl_cursor = blk + count; return (blk); @@ -257,7 +280,7 @@ void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { - blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); + blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, 0); } /* @@ -270,8 +293,7 @@ daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, - bl->bl_skip, 0)); + return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, 0)); } /* @@ -290,7 +312,7 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, *pbl = newbl; if (count > save->bl_blocks) count = save->bl_blocks; - blst_copy(save->bl_root, 0, save->bl_radix, save->bl_skip, newbl, count); + blst_copy(save->bl_root, 0, save->bl_radix, newbl, count); /* * If resizing upwards, should we free the new space or not? @@ -309,8 +331,8 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, void blist_print(blist_t bl) { - printf("BLIST {\n"); - blst_radix_print(bl->bl_root, 0, bl->bl_radix, bl->bl_skip, 4); + printf("BLIST cursor = %08jx {\n", (uintmax_t)bl->bl_cursor); + blst_radix_print(bl->bl_root, 0, bl->bl_radix, 4); printf("}\n"); } @@ -426,9 +448,9 @@ 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, - daddr_t skip, daddr_t cursor) + daddr_t cursor) { - daddr_t i, next_skip, r; + daddr_t i, next_skip, r, skip; int child; bool scan_from_start; @@ -443,6 +465,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -456,7 +479,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -477,13 +500,13 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan_from_start = cursor == blk; child = (cursor - blk) / radix; blk += child * radix; - for (i = 1 + child * next_skip; i <= skip; i += next_skip) { + 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. */ r = blst_meta_alloc(&scan[i], blk, count, radix, - next_skip - 1, cursor > blk ? cursor : blk); + cursor > blk ? cursor : blk); if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; return (r); @@ -552,15 +575,16 @@ blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) */ static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, next_skip, v; + daddr_t i, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) panic("freeing invalid range"); if (radix == BLIST_BMAP_RADIX) return (blst_leaf_free(scan, freeBlk, count)); + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -572,7 +596,7 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ scan->bm_bighint = count; if (count != radix) { - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; scan[i].bm_bighint = 0; @@ -609,11 +633,11 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ child = (freeBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < freeBlk + count) { + while (i < skip && blk < freeBlk + count) { v = blk + radix - freeBlk; if (v > count) v = count; - blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); + blst_meta_free(&scan[i], freeBlk, v, radix, blk); if (scan->bm_bighint < scan[i].bm_bighint) scan->bm_bighint = scan[i].bm_bighint; count -= v; @@ -630,10 +654,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ * tree. The space may not already be free in the destination. */ static void -blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - blist_t dest, daddr_t count) +blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, blist_t dest, + daddr_t count) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; /* * Leaf node @@ -677,21 +701,20 @@ blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; count && i <= skip; i += next_skip) { + for (i = 1; count && i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; if (count >= radix) { - blst_copy(&scan[i], blk, radix, next_skip - 1, dest, - radix); + blst_copy(&scan[i], blk, radix, dest, radix); count -= radix; } else { if (count) { - blst_copy(&scan[i], blk, radix, next_skip - 1, - dest, count); + blst_copy(&scan[i], blk, radix, dest, count); } count = 0; } @@ -733,9 +756,9 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) */ static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, nblks, next_skip, v; + daddr_t i, nblks, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) @@ -758,6 +781,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr scan->bm_bighint = 0; return (nblks); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -771,7 +795,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -786,12 +810,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr child = (allocBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < allocBlk + count) { + while (i < skip && blk < allocBlk + count) { v = blk + radix - allocBlk; if (v > count) v = count; - nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, - next_skip - 1, blk); + nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, blk); count -= v; allocBlk += v; blk += radix; @@ -810,9 +833,9 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * RADIX values we use. */ static daddr_t -blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) +blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count) { - daddr_t i, memindex, next_skip; + daddr_t i, memindex, next_skip, skip; memindex = 0; @@ -839,17 +862,18 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t scan->u.bmu_avail = 0; } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (count >= radix) { /* * Allocate the entire object */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, radix); + radix); count -= radix; } else if (count > 0) { /* @@ -857,7 +881,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, count); + count); count = 0; } else { /* @@ -876,10 +900,9 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t #ifdef BLIST_DEBUG static void -blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - int tab) +blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int tab) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; if (radix == BLIST_BMAP_RADIX) { printf( @@ -920,11 +943,12 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t (long long)scan->bm_bighint ); - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; tab += 4; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) { printf( "%*.*s(%08llx,%lld): Terminator\n", @@ -933,7 +957,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); break; } - blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); + blst_radix_print(&scan[i], blk, radix, tab); blk += radix; } tab -= 4; Modified: stable/11/sys/sys/blist.h ============================================================================== --- stable/11/sys/sys/blist.h Sun Sep 17 16:45:12 2017 (r323680) +++ stable/11/sys/sys/blist.h Sun Sep 17 16:45:50 2017 (r323681) @@ -81,7 +81,6 @@ typedef struct blmeta { 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-stable-11@freebsd.org Mon Sep 18 00:13:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 465C3E0FFCD; Mon, 18 Sep 2017 00:13:50 +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 12F0E73CBE; Mon, 18 Sep 2017 00:13: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 v8I0Dm2k033108; Mon, 18 Sep 2017 00:13:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0DmGP033107; Mon, 18 Sep 2017 00:13:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180013.v8I0DmGP033107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:13: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: r323693 - in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Commit-Revision: 323693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:13:50 -0000 Author: cy Date: Mon Sep 18 00:13:48 2017 New Revision: 323693 URL: https://svnweb.freebsd.org/changeset/base/323693 Log: MFC r322112: krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5. As kerberos5/lib/krb5 include files are already referenced it makes no sense to generate it again here. Modified: stable/11/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/11/kerberos5/lib/libkafs5/Makefile ============================================================================== --- stable/11/kerberos5/lib/libkafs5/Makefile Sun Sep 17 23:40:16 2017 (r323692) +++ stable/11/kerberos5/lib/libkafs5/Makefile Mon Sep 18 00:13:48 2017 (r323693) @@ -22,7 +22,7 @@ MLINKS= kafs5.3 k_afs_cell_of_file.3 \ kafs5.3 krb_afslog.3 \ kafs5.3 krb_afslog_uid.3 -SRCS= afssys.c afskrb5.c common.c krb5_err.h +SRCS= afssys.c afskrb5.c common.c CFLAGS+= -I${KRB5DIR}/lib/kafs \ -I${KRB5DIR}/lib/krb5 \ From owner-svn-src-stable-11@freebsd.org Mon Sep 18 00:17:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EF0CE10445; Mon, 18 Sep 2017 00:17:55 +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 EE79F73F8A; Mon, 18 Sep 2017 00:17:54 +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 v8I0Hs2V033290; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0HsmV033289; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180017.v8I0HsmV033289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:17: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: r323694 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:17:55 -0000 Author: cy Date: Mon Sep 18 00:17:53 2017 New Revision: 323694 URL: https://svnweb.freebsd.org/changeset/base/323694 Log: MFC r323478: Improve the wording of a comment describing why EAGAIN is the error code. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:13:48 2017 (r323693) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:17:53 2017 (r323694) @@ -1383,10 +1383,10 @@ ipf_state_add(softc, fin, stsave, flags) int out; /* - * If a packet that was created locally is trying to go out but we - * do not match here here because of this lock, it is likely that - * the policy will block it and return network unreachable back up - * the stack. To mitigate this error, EAGAIN is returned instead, + * If a locally created packet is trying to egress but it + * does not match because of this lock, it is likely that + * the policy will block it and return network unreachable further + * up the stack. To mitigate this error, EAGAIN is returned instead, * telling the IP stack to try sending this packet again later. */ if (softs->ipf_state_lock) { From owner-svn-src-stable-11@freebsd.org Mon Sep 18 20:01:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FE69E034C9; Mon, 18 Sep 2017 20:01:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D0B7D985; Mon, 18 Sep 2017 20:01:17 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK1HSH027457; Mon, 18 Sep 2017 20:01:17 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK1HJo027456; Mon, 18 Sep 2017 20:01:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182001.v8IK1HJo027456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:01: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: r323718 - stable/11/usr.sbin/zic/zic X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/usr.sbin/zic/zic X-SVN-Commit-Revision: 323718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:01:18 -0000 Author: rlibby Date: Mon Sep 18 20:01:16 2017 New Revision: 323718 URL: https://svnweb.freebsd.org/changeset/base/323718 Log: MFC r323572: zic: -Wno-error=strict-overflow Modified: stable/11/usr.sbin/zic/zic/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/zic/zic/Makefile ============================================================================== --- stable/11/usr.sbin/zic/zic/Makefile Mon Sep 18 20:01:01 2017 (r323717) +++ stable/11/usr.sbin/zic/zic/Makefile Mon Sep 18 20:01:16 2017 (r323718) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/contrib/tzcode/zic PROG= zic @@ -12,5 +14,9 @@ CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 + +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 +CWARNFLAGS+= -Wno-error=strict-overflow +.endif .include From owner-svn-src-stable-11@freebsd.org Mon Sep 18 20:07:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 228ECE03A88; Mon, 18 Sep 2017 20:07:50 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E43127DE37; Mon, 18 Sep 2017 20:07:49 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK7nSa029854; Mon, 18 Sep 2017 20:07:49 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK7ncX029853; Mon, 18 Sep 2017 20:07:49 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182007.v8IK7ncX029853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:07:49 +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: r323719 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 323719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:07:50 -0000 Author: rlibby Date: Mon Sep 18 20:07:48 2017 New Revision: 323719 URL: https://svnweb.freebsd.org/changeset/base/323719 Log: MFC r304877,r323573: r304877 (by bapt): Remove warning on struct-overflow on gcc 5.3.0 as zic(8) dies on it r323573: gcc builds: reenable -Wstrict-overflow for bsd.sys.mk This effectively reverts r304877, after having relegated the warning suppression to the zic(8) makefile in r323572. Effectively this is a record-only merge of r304877 and r323573. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Mon Sep 18 20:09:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD416E03C16; Mon, 18 Sep 2017 20:09:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA247DFB1; Mon, 18 Sep 2017 20:09:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK9HKC029962; Mon, 18 Sep 2017 20:09:17 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK9H7g029961; Mon, 18 Sep 2017 20:09:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182009.v8IK9H7g029961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:09: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: r323720 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 323720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:09:18 -0000 Author: rlibby Date: Mon Sep 18 20:09:17 2017 New Revision: 323720 URL: https://svnweb.freebsd.org/changeset/base/323720 Log: MFC r323574: gcc builds: reenable -Wstrict-overflow for kern.mk Modified: stable/11/sys/conf/kern.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Mon Sep 18 20:07:48 2017 (r323719) +++ stable/11/sys/conf/kern.mk Mon Sep 18 20:09:17 2017 (r323720) @@ -58,7 +58,6 @@ CWARNEXTRA?= -Wno-error=address \ -Wno-error=maybe-uninitialized \ -Wno-error=overflow \ -Wno-error=sequence-point \ - -Wno-error=strict-overflow \ -Wno-error=unused-but-set-variable .if ${COMPILER_VERSION} >= 60100 CWARNEXTRA+= -Wno-error=misleading-indentation \ From owner-svn-src-stable-11@freebsd.org Tue Sep 19 07:18:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC542E00EE7; Tue, 19 Sep 2017 07:18: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 8B6186DE7C; Tue, 19 Sep 2017 07:18: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 v8J7IMil005269; Tue, 19 Sep 2017 07:18:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7IM08005268; Tue, 19 Sep 2017 07:18:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190718.v8J7IM08005268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:18:22 +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: r323732 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 323732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:18:23 -0000 Author: avg Date: Tue Sep 19 07:18:22 2017 New Revision: 323732 URL: https://svnweb.freebsd.org/changeset/base/323732 Log: MFC r319212: fix indentation Modified: stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/identcpu.c ============================================================================== --- stable/11/sys/x86/x86/identcpu.c Tue Sep 19 07:02:02 2017 (r323731) +++ stable/11/sys/x86/x86/identcpu.c Tue Sep 19 07:18:22 2017 (r323732) @@ -906,7 +906,7 @@ printcpuinfo(void) "\033DBE" /* Data Breakpoint extension */ "\034PTSC" /* Performance TSC */ "\035PL2I" /* L2I perf count */ - "\036MWAITX" /* MONITORX/MWAITX instructions */ + "\036MWAITX" /* MONITORX/MWAITX instructions */ "\037" "\040" ); From owner-svn-src-stable-11@freebsd.org Tue Sep 19 07:31:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 932BAE0185F; Tue, 19 Sep 2017 07:31: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 568976E549; Tue, 19 Sep 2017 07:31:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8J7VL10010235; Tue, 19 Sep 2017 07:31:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7VLlE010231; Tue, 19 Sep 2017 07:31:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190731.v8J7VLlE010231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:31: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: r323734 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Commit-Revision: 323734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:31:22 -0000 Author: avg Date: Tue Sep 19 07:31:21 2017 New Revision: 323734 URL: https://svnweb.freebsd.org/changeset/base/323734 Log: MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized incorrectly illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f https://www.illumos.org/issues/8269 It seems that currently normalization of stddev aggregation is done incorrectly. We divide both the sum of values and the sum of their squares by the normalization factor. But we should divide the sum of squares by the normalization factor squared to scale the original values properly. FreeBSD note: the actual change was committed in r316853, this commit adds the test files and record merge information. Reviewed by: Bryan Cantrill Approved by: Robert Mustacchi Author: Andriy Gapon Sponsored by: Panzura Added: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Modified: stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Directory Properties: stable/11/ (props changed) Copied: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d Tue Sep 19 07:31:21 2017 (r323734, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) @@ -0,0 +1,46 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Panzura. All rights reserved. + */ + +/* + * ASSERTION: + * Positive test for normalization() of stddev() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; +} + +tick-100ms +/i < 11/ +{ + @ = stddev(i * 100); + i++; +} + +tick-100ms +/i == 11/ +{ + printf("normalized data:\n"); + normalize(@, 10); + exit(0); +} Copied: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Tue Sep 19 07:31:21 2017 (r323734, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) @@ -0,0 +1,3 @@ +normalized data: + + 31 Modified: stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:19:27 2017 (r323733) +++ stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:31:21 2017 (r323734) @@ -169,6 +169,8 @@ ${PACKAGE}FILES= \ tst.sizedkeys.d.out \ tst.stddev.d \ tst.stddev.d.out \ + tst.stddev.normalize.d \ + tst.stddev.normalize.d.out \ tst.subr.d \ tst.sum.d \ tst.sum.d.out \ From owner-svn-src-stable-11@freebsd.org Tue Sep 19 07:39:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 399FEE01F70; Tue, 19 Sep 2017 07:39:34 +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 088A36EAE8; Tue, 19 Sep 2017 07:39:33 +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 v8J7dW4H013737; Tue, 19 Sep 2017 07:39:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7dWqL013736; Tue, 19 Sep 2017 07:39:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190739.v8J7dWqL013736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:39:32 +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: r323736 - stable/11/sys/cam/ata X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cam/ata X-SVN-Commit-Revision: 323736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:39:34 -0000 Author: avg Date: Tue Sep 19 07:39:32 2017 New Revision: 323736 URL: https://svnweb.freebsd.org/changeset/base/323736 Log: MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport The motivation for this is two-fold. 1. Some old WD SATA disks may appear as if they need to be spun up when they are already spinning. Those disks would respond with an error to the spin-up request. 2. Even if we really fail to spin up the disk, we still can try to proceed to the subsequent phases. If we fail later on, then no difference. Otherwise we get a chance to communicate with the disk which is better than completely ignoring it, because a user can try to recover the disk. Modified: stable/11/sys/cam/ata/ata_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:31:53 2017 (r323735) +++ stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:39:32 2017 (r323736) @@ -740,6 +740,16 @@ out: goto noerror; /* + * Some old WD SATA disks have broken SPINUP handling. + * If we really fail to spin up the disk, then there will be + * some media access errors later on, but at least we will + * have a device to interact with for recovery attempts. + */ + } else if (softc->action == PROBE_SPINUP && + status == CAM_ATA_STATUS_ERROR) { + goto noerror; + + /* * Some HP SATA disks report supported DMA Auto-Activation, * but return ABORT on attempt to enable it. */ From owner-svn-src-stable-11@freebsd.org Tue Sep 19 07:56:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7055E02C6D; Tue, 19 Sep 2017 07:56:25 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FC46F4F0; Tue, 19 Sep 2017 07:56:25 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8J7uOUt022057; Tue, 19 Sep 2017 07:56:24 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7uOg4022056; Tue, 19 Sep 2017 07:56:24 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201709190756.v8J7uOg4022056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 19 Sep 2017 07:56:24 +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: r323738 - stable/11/tools/tools/nanobsd/embedded X-SVN-Group: stable-11 X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: stable/11/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 323738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:56:25 -0000 Author: n_hibma Date: Tue Sep 19 07:56:24 2017 New Revision: 323738 URL: https://svnweb.freebsd.org/changeset/base/323738 Log: MFC 323197: Bug fix: Don't treat NANO_IMAGES as a directory. This was accidentally broken in r295377 . Submitted by: Igor Serikov Modified: stable/11/tools/tools/nanobsd/embedded/common Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/nanobsd/embedded/common ============================================================================== --- stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:39:39 2017 (r323737) +++ stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:56:24 2017 (r323738) @@ -106,8 +106,6 @@ mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) -mkdir -p ${NANO_IMAGES} -NANO_IMAGES=$(realpath ${NANO_IMAGES}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} From owner-svn-src-stable-11@freebsd.org Tue Sep 19 08:19:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E617AE03F99; Tue, 19 Sep 2017 08:19: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 B4ABD702EF; Tue, 19 Sep 2017 08:19: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 v8J8JlZj030277; Tue, 19 Sep 2017 08:19:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8JlKL030276; Tue, 19 Sep 2017 08:19:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190819.v8J8JlKL030276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:19: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: r323740 - stable/11/usr.sbin/bhyveload X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/usr.sbin/bhyveload X-SVN-Commit-Revision: 323740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:19:49 -0000 Author: avg Date: Tue Sep 19 08:19:47 2017 New Revision: 323740 URL: https://svnweb.freebsd.org/changeset/base/323740 Log: MFV r320195: 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 Modified: stable/11/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/11/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 08:19:20 2017 (r323739) +++ stable/11/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 08:19:47 2017 (r323740) @@ -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-stable-11@freebsd.org Tue Sep 19 08:29:10 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050D5E046BF; Tue, 19 Sep 2017 08:29: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 C6609708B9; Tue, 19 Sep 2017 08:29: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 v8J8T8Zg034512; Tue, 19 Sep 2017 08:29:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8T8tG034511; Tue, 19 Sep 2017 08:29:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190829.v8J8T8tG034511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:29:08 +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: r323741 - stable/11/sys/dev/jedec_ts X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/jedec_ts X-SVN-Commit-Revision: 323741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:29:10 -0000 Author: avg Date: Tue Sep 19 08:29:08 2017 New Revision: 323741 URL: https://svnweb.freebsd.org/changeset/base/323741 Log: MFC r320266: jedec_ts: add support for devices manufactured by IDT Full manufacturer name is Integrated Device Technology, Inc. Supported devices include TSE2002B3C and TS3000B3A. Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/11/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:19:47 2017 (r323740) +++ stable/11/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:29:08 2017 (r323741) @@ -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-stable-11@freebsd.org Tue Sep 19 08:34:04 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D37A4E04CAD; Tue, 19 Sep 2017 08:34:04 +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 A0B8A70F62; Tue, 19 Sep 2017 08:34:04 +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 v8J8Y3c6038368; Tue, 19 Sep 2017 08:34:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8Y3gY038367; Tue, 19 Sep 2017 08:34:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190834.v8J8Y3gY038367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:34:03 +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: r323743 - stable/11/contrib/tcp_wrappers X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/contrib/tcp_wrappers X-SVN-Commit-Revision: 323743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:34:04 -0000 Author: avg Date: Tue Sep 19 08:34:03 2017 New Revision: 323743 URL: https://svnweb.freebsd.org/changeset/base/323743 Log: MFC r320151: 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. Modified: stable/11/contrib/tcp_wrappers/scaffold.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tcp_wrappers/scaffold.c ============================================================================== --- stable/11/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:29:53 2017 (r323742) +++ stable/11/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:34:03 2017 (r323743) @@ -27,10 +27,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-stable-11@freebsd.org Tue Sep 19 08:43:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 669CFE0562D; Tue, 19 Sep 2017 08:43:17 +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 34A8071765; Tue, 19 Sep 2017 08:43:17 +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 v8J8hGxu042701; Tue, 19 Sep 2017 08:43:16 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8hG8x042700; Tue, 19 Sep 2017 08:43:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190843.v8J8hG8x042700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:43:16 +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: r323746 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:43:17 -0000 Author: avg Date: Tue Sep 19 08:43:16 2017 New Revision: 323746 URL: https://svnweb.freebsd.org/changeset/base/323746 Log: MFC r321471: spa_import_rootpool should be able to handle an imported root pool That is required to support reboot -r with a new root filesystem being on an already imported pool. PR: 210721 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:39:54 2017 (r323745) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:16 2017 (r323746) @@ -4275,6 +4275,16 @@ spa_import_rootpool(const char *name) if ((spa = spa_lookup(pname)) != NULL) { /* + * The pool could already be imported, + * e.g., after reboot -r. + */ + if (spa->spa_state == POOL_STATE_ACTIVE) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + return (0); + } + + /* * Remove the existing root pool from the namespace so * that we can replace it with the correct config * we just read in. From owner-svn-src-stable-11@freebsd.org Tue Sep 19 08:53:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3664EE05F8F; Tue, 19 Sep 2017 08:53:15 +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 1045A71FAF; Tue, 19 Sep 2017 08:53: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 v8J8rEIO047247; Tue, 19 Sep 2017 08:53:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8rD2Q047243; Tue, 19 Sep 2017 08:53:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190853.v8J8rD2Q047243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:53:13 +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: r323748 - in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:53:15 -0000 Author: avg Date: Tue Sep 19 08:53:13 2017 New Revision: 323748 URL: https://svnweb.freebsd.org/changeset/base/323748 Log: MFC r322226: MFV r322223: 8378 crash due to bp in-memory modification of nopwrite block illumos/illumos-gate@b7edcb940884114e61382937505433c4c38c0278 https://github.com/illumos/illumos-gate/commit/b7edcb940884114e61382937505433c4c38c0278 https://www.illumos.org/issues/8378 The problem is that zfs_get_data() supplies a stale zgd_bp to dmu_sync(), which we then nopwrite against. zfs_get_data() doesn't hold any DMU-related locks, so after it copies db_blkptr to zgd_bp, dbuf_write_ready() could change db_blkptr, and dbuf_write_done() could remove the dirty record. dmu_sync() then sees the stale BP and that the dbuf it not dirty, so it is eligible for nop-writing. The fix is for dmu_sync() to copy db_blkptr to zgd_bp after acquiring the db_mtx. We could still see a stale db_blkptr, but if it is stale then the dirty record will still exist and thus we won't attempt to nopwrite. Reviewed by: Prakash Surya Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1838,7 +1838,6 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, z uint64_t object = lr->lr_foid; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; - blkptr_t *bp = &lr->lr_blkptr; uint64_t txg = lr->lr_common.lrc_txg; uint64_t crtxg; dmu_object_info_t doi; @@ -1892,11 +1891,7 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, z DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1657,6 +1657,7 @@ dmu_sync_done(zio_t *zio, arc_buf_t *buf, void *varg) uint8_t chksum = BP_GET_CHECKSUM(bp_orig); ASSERT(BP_EQUAL(bp, bp_orig)); + VERIFY(BP_EQUAL(bp, db->db_blkptr)); ASSERT(zio->io_prop.zp_compress != ZIO_COMPRESS_OFF); ASSERT(zio_checksum_table[chksum].ci_flags & ZCHECKSUM_FLAG_NOPWRITE); @@ -1697,19 +1698,11 @@ dmu_sync_late_arrival_done(zio_t *zio) blkptr_t *bp_orig = &zio->io_bp_orig; if (zio->io_error == 0 && !BP_IS_HOLE(bp)) { - /* - * If we didn't allocate a new block (i.e. ZIO_FLAG_NOPWRITE) - * then there is nothing to do here. Otherwise, free the - * newly allocated block in this txg. - */ - if (zio->io_flags & ZIO_FLAG_NOPWRITE) { - ASSERT(BP_EQUAL(bp, bp_orig)); - } else { - ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); - ASSERT(zio->io_bp->blk_birth == zio->io_txg); - ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); - zio_free(zio->io_spa, zio->io_txg, zio->io_bp); - } + ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE)); + ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); + ASSERT(zio->io_bp->blk_birth == zio->io_txg); + ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); + zio_free(zio->io_spa, zio->io_txg, zio->io_bp); } dmu_tx_commit(dsa->dsa_tx); @@ -1741,6 +1734,29 @@ dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sy dsa->dsa_zgd = zgd; dsa->dsa_tx = tx; + /* + * Since we are currently syncing this txg, it's nontrivial to + * determine what BP to nopwrite against, so we disable nopwrite. + * + * When syncing, the db_blkptr is initially the BP of the previous + * txg. We can not nopwrite against it because it will be changed + * (this is similar to the non-late-arrival case where the dbuf is + * dirty in a future txg). + * + * Then dbuf_write_ready() sets bp_blkptr to the location we will write. + * We can not nopwrite against it because although the BP will not + * (typically) be changed, the data has not yet been persisted to this + * location. + * + * Finally, when dbuf_write_done() is called, it is theoretically + * possible to always nopwrite, because the data that was written in + * this txg is the same data that we are trying to write. However we + * would need to check that this dbuf is not dirty in any future + * txg's (as we do in the normal dmu_sync() path). For simplicity, we + * don't nopwrite in this case. + */ + zp->zp_nopwrite = B_FALSE; + zio_nowait(zio_write(pio, os->os_spa, dmu_tx_get_txg(tx), zgd->zgd_bp, abd_get_from_buf(zgd->zgd_db->db_data, zgd->zgd_db->db_size), zgd->zgd_db->db_size, zgd->zgd_db->db_size, zp, @@ -1778,7 +1794,6 @@ dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sy int dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd) { - blkptr_t *bp = zgd->zgd_bp; dmu_buf_impl_t *db = (dmu_buf_impl_t *)zgd->zgd_db; objset_t *os = db->db_objset; dsl_dataset_t *ds = os->os_dsl_dataset; @@ -1845,6 +1860,21 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done ASSERT(dr->dr_next == NULL || dr->dr_next->dr_txg < txg); + if (db->db_blkptr != NULL) { + /* + * We need to fill in zgd_bp with the current blkptr so that + * the nopwrite code can check if we're writing the same + * data that's already on disk. We can only nopwrite if we + * are sure that after making the copy, db_blkptr will not + * change until our i/o completes. We ensure this by + * holding the db_mtx, and only allowing nopwrite if the + * block is not already dirty (see below). This is verified + * by dmu_sync_done(), which VERIFYs that the db_blkptr has + * not changed. + */ + *zgd->zgd_bp = *db->db_blkptr; + } + /* * Assume the on-disk data is X, the current syncing data (in * txg - 1) is Y, and the current in-memory data is Z (currently @@ -1896,7 +1926,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done dsa->dsa_tx = NULL; zio_nowait(arc_write(pio, os->os_spa, txg, - bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), + zgd->zgd_bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), &zp, dmu_sync_ready, NULL, NULL, dmu_sync_done, dsa, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL, &zb)); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1296,7 +1296,6 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio uint64_t object = lr->lr_foid; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; - blkptr_t *bp = &lr->lr_blkptr; dmu_buf_t *db; zgd_t *zgd; int error = 0; @@ -1373,11 +1372,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 19 08:53:13 2017 (r323748) @@ -27,7 +27,7 @@ * Portions Copyright 2010 Robert Milkowski * * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1340,7 +1340,6 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi uint64_t object = ZVOL_OBJ; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; /* length of user data */ - blkptr_t *bp = &lr->lr_blkptr; dmu_buf_t *db; zgd_t *zgd; int error; @@ -1368,11 +1367,7 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi error = dmu_buf_hold(os, object, offset, zgd, &db, DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; From owner-svn-src-stable-11@freebsd.org Tue Sep 19 08:54:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09DEAE060A9; Tue, 19 Sep 2017 08:54:43 +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 C9F4472106; Tue, 19 Sep 2017 08:54: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 v8J8sgd9047369; Tue, 19 Sep 2017 08:54:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8sgHj047368; Tue, 19 Sep 2017 08:54:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190854.v8J8sgHj047368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:54: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: r323749 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:54:43 -0000 Author: avg Date: Tue Sep 19 08:54:41 2017 New Revision: 323749 URL: https://svnweb.freebsd.org/changeset/base/323749 Log: MFC r322233: MFV r322232: 8426 mark immutable buffer arguments as such in abd.h illumos/illumos-gate@9b195260e22529ac0e2580faaf89402420589c1c https://github.com/illumos/illumos-gate/commit/9b195260e22529ac0e2580faaf89402420589c1c https://www.illumos.org/issues/8426 abd_copy_from_buf and abd_cmp_buf do not modify their void *buf arguments, so qualify them with const. abd_copy_from_buf_off and abd_cmp_buf_off already had that type for the corresponding arguments. Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Tue Sep 19 08:53:13 2017 (r323748) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Tue Sep 19 08:54:41 2017 (r323749) @@ -117,7 +117,7 @@ abd_copy(abd_t *dabd, abd_t *sabd, size_t size) } inline void -abd_copy_from_buf(abd_t *abd, void *buf, size_t size) +abd_copy_from_buf(abd_t *abd, const void *buf, size_t size) { abd_copy_from_buf_off(abd, buf, 0, size); } @@ -129,7 +129,7 @@ abd_copy_to_buf(void* buf, abd_t *abd, size_t size) } inline int -abd_cmp_buf(abd_t *abd, void *buf, size_t size) +abd_cmp_buf(abd_t *abd, const void *buf, size_t size) { return (abd_cmp_buf_off(abd, buf, 0, size)); } From owner-svn-src-stable-11@freebsd.org Tue Sep 19 08:57:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D9DEE0625A; Tue, 19 Sep 2017 08:57:20 +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 79D2B72291; Tue, 19 Sep 2017 08:57:20 +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 v8J8vJLH047541; Tue, 19 Sep 2017 08:57:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8vJrM047540; Tue, 19 Sep 2017 08:57:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190857.v8J8vJrM047540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:57:19 +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: r323750 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:57:20 -0000 Author: avg Date: Tue Sep 19 08:57:19 2017 New Revision: 323750 URL: https://svnweb.freebsd.org/changeset/base/323750 Log: MFC r322237: MFV r322236: 8126 ztest assertion failed in dbuf_dirty due to dn_nlevels changing illumos/illumos-gate@dcb6872c565819ac88acbc2ece999ef241c8b982 https://github.com/illumos/illumos-gate/commit/dcb6872c565819ac88acbc2ece999ef241c8b982 https://www.illumos.org/issues/8126 The sync thread is concurrently modifying dn_phys->dn_nlevels while dbuf_dirty() is trying to assert something about it, without holding the necessary lock. We need to move this assertion further down in the function, after we have acquired the dn_struct_rwlock. Reviewed by: Pavel Zakharov Reviewed by: Serapheim Dimitropoulos Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Sep 19 08:54:41 2017 (r323749) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Sep 19 08:57:19 2017 (r323750) @@ -1542,11 +1542,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) (dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN)); ASSERT3U(dn->dn_nlevels, >, db->db_level); - ASSERT((dn->dn_phys->dn_nlevels == 0 && db->db_level == 0) || - dn->dn_phys->dn_nlevels > db->db_level || - dn->dn_next_nlevels[txgoff] > db->db_level || - dn->dn_next_nlevels[(tx->tx_txg-1) & TXG_MASK] > db->db_level || - dn->dn_next_nlevels[(tx->tx_txg-2) & TXG_MASK] > db->db_level); /* * We should only be dirtying in syncing context if it's the @@ -1662,6 +1657,16 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) rw_enter(&dn->dn_struct_rwlock, RW_READER); drop_struct_lock = TRUE; } + + /* + * We need to hold the dn_struct_rwlock to make this assertion, + * because it protects dn_phys / dn_next_nlevels from changing. + */ + ASSERT((dn->dn_phys->dn_nlevels == 0 && db->db_level == 0) || + dn->dn_phys->dn_nlevels > db->db_level || + dn->dn_next_nlevels[txgoff] > db->db_level || + dn->dn_next_nlevels[(tx->tx_txg-1) & TXG_MASK] > db->db_level || + dn->dn_next_nlevels[(tx->tx_txg-2) & TXG_MASK] > db->db_level); /* * If we are overwriting a dedup BP, then unless it is snapshotted, From owner-svn-src-stable-11@freebsd.org Tue Sep 19 08:59:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFE14E0635D; Tue, 19 Sep 2017 08:59:12 +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 8892C723E4; Tue, 19 Sep 2017 08:59:12 +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 v8J8xBJP047691; Tue, 19 Sep 2017 08:59:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8xBs4047690; Tue, 19 Sep 2017 08:59:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190859.v8J8xBs4047690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:59:11 +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: r323751 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 323751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:59:12 -0000 Author: avg Date: Tue Sep 19 08:59:11 2017 New Revision: 323751 URL: https://svnweb.freebsd.org/changeset/base/323751 Log: MFC r322218: MFV r322217: 8418 zfs_prop_get_table() call in zfs_validate_name() is a no-op illumos/illumos-gate@e09ba01dcda5e24964b8632718777b39166d86e4 https://github.com/illumos/illumos-gate/commit/e09ba01dcda5e24964b8632718777b39166d86e4 https://www.illumos.org/issues/8418 The following line in zfs_validate_name() is just a no-op and it should be removed: 108 (void) zfs_prop_get_table(); Reviewed by: Vitaliy Gusev Approved by: Matthew Ahrens Author: Marcel Telka Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 08:57:19 2017 (r323750) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 08:59:11 2017 (r323751) @@ -103,7 +103,6 @@ zfs_validate_name(libzfs_handle_t *hdl, const char *pa namecheck_err_t why; char what; - (void) zfs_prop_get_table(); if (entity_namecheck(path, &why, &what) != 0) { if (hdl != NULL) { switch (why) { From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:02:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED79E069BB; Tue, 19 Sep 2017 09:02: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 19DCF72A0E; Tue, 19 Sep 2017 09:02: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 v8J92Qej051723; Tue, 19 Sep 2017 09:02:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J92Qpk051722; Tue, 19 Sep 2017 09:02:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190902.v8J92Qpk051722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:02: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: r323752 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:02:27 -0000 Author: avg Date: Tue Sep 19 09:02:26 2017 New Revision: 323752 URL: https://svnweb.freebsd.org/changeset/base/323752 Log: MFC r322239: MFV r322238: 7915 checks in l2arc_evict could use some cleaning up illumos/illumos-gate@267ae6c3a88d2fc39276af66caafa978b0935b82 https://github.com/illumos/illumos-gate/commit/267ae6c3a88d2fc39276af66caafa978b0935b82 https://www.illumos.org/issues/7915 l2arc_evict() is strictly serialized with respect to l2arc_write_buffers() and l2arc_write_done(). Normally, l2arc_evict() and l2arc_write_buffers() are called from the same thread, so they can not be concurrent. Also, l2arc_write_buffers() uses zio_wait() on the parent zio of all cache zio-s. That ensures that l2arc_write_done() is completed before l2arc_write_buffers() returns. Finally, if a cache device is removed, then l2arc_evict() is called under SCL_ALL in the exclusive mode. That ensures that it can not be concurrent with the normal L2ARC accesses to the device (including writing and evicting buffers). Given the above, some checks and actions in l2arc_evict() do not make sense. For instance, it must never encounter the write head header let alone remove it from the buffer list. Reviewed by: Dan Kimmel Reviewed by: Prakash Surya Approved by: Matthew Ahrens Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 08:59:11 2017 (r323751) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 09:02:26 2017 (r323752) @@ -7314,18 +7314,16 @@ top: goto top; } - if (HDR_L2_WRITE_HEAD(hdr)) { - /* - * We hit a write head node. Leave it for - * l2arc_write_done(). - */ - list_remove(buflist, hdr); - mutex_exit(hash_lock); - continue; - } + /* + * A header can't be on this list if it doesn't have L2 header. + */ + ASSERT(HDR_HAS_L2HDR(hdr)); - if (!all && HDR_HAS_L2HDR(hdr) && - (hdr->b_l2hdr.b_daddr >= taddr || + /* Ensure this header has finished being written. */ + ASSERT(!HDR_L2_WRITING(hdr)); + ASSERT(!HDR_L2_WRITE_HEAD(hdr)); + + if (!all && (hdr->b_l2hdr.b_daddr >= taddr || hdr->b_l2hdr.b_daddr < dev->l2ad_hand)) { /* * We've evicted to the target address, @@ -7335,7 +7333,6 @@ top: break; } - ASSERT(HDR_HAS_L2HDR(hdr)); if (!HDR_HAS_L1HDR(hdr)) { ASSERT(!HDR_L2_READING(hdr)); /* @@ -7357,9 +7354,6 @@ top: ARCSTAT_BUMP(arcstat_l2_evict_reading); arc_hdr_set_flags(hdr, ARC_FLAG_L2_EVICTED); } - - /* Ensure this header has finished being written */ - ASSERT(!HDR_L2_WRITING(hdr)); arc_hdr_l2hdr_destroy(hdr); } From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:04:31 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31F26E06B54; Tue, 19 Sep 2017 09:04: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 EF77C72BAB; Tue, 19 Sep 2017 09:04:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8J94UNm051858; Tue, 19 Sep 2017 09:04:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J94Urh051857; Tue, 19 Sep 2017 09:04:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190904.v8J94Urh051857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:04:30 +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: r323753 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:04:31 -0000 Author: avg Date: Tue Sep 19 09:04:29 2017 New Revision: 323753 URL: https://svnweb.freebsd.org/changeset/base/323753 Log: MFC r322234: zfs: no need for __DECONST after abd constification in r322233 Note that vdev_label_write_pad2() is FreeBSD specific. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Sep 19 09:02:26 2017 (r323752) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Sep 19 09:04:29 2017 (r323753) @@ -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, __DECONST(void *, buf), size); + abd_copy_from_buf(pad2, buf, size); retry: zio = zio_root(spa, NULL, NULL, flags); From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:07:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3F9BE06FBD; Tue, 19 Sep 2017 09:07:52 +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 AEB9772FAC; Tue, 19 Sep 2017 09:07:52 +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 v8J97pEA052025; Tue, 19 Sep 2017 09:07:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J97pxL052024; Tue, 19 Sep 2017 09:07:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190907.v8J97pxL052024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:07: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: r323754 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:07:53 -0000 Author: avg Date: Tue Sep 19 09:07:51 2017 New Revision: 323754 URL: https://svnweb.freebsd.org/changeset/base/323754 Log: MFC r322222: MFV r322221: 7910 l2arc_write_buffers() may write beyond target_sz FreeBD note: the essence of this change was committed to FreeBSD in r314274. This commit catches up with differences between what was committed to FreeBSD and what was committed to OpenZFS, mainly more logical variable names. illumos/illumos-gate@16a7e5ac116c85d965007a5f201104b564e82210 https://github.com/illumos/illumos-gate/commit/16a7e5ac116c85d965007a5f201104b564e82210 https://www.illumos.org/issues/7910 It seems that the change in issue #6950 resurrected the problem that was earlier fixed by the change in issue #5219. Please also see the following FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216178 Reviewed by: George Wilson Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 09:04:29 2017 (r323753) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 09:07:51 2017 (r323754) @@ -722,8 +722,8 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_abort_lowmem; kstat_named_t arcstat_l2_cksum_bad; kstat_named_t arcstat_l2_io_error; - kstat_named_t arcstat_l2_size; - kstat_named_t arcstat_l2_asize; + kstat_named_t arcstat_l2_lsize; + kstat_named_t arcstat_l2_psize; kstat_named_t arcstat_l2_hdr_size; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; @@ -3366,19 +3366,19 @@ arc_hdr_l2hdr_destroy(arc_buf_hdr_t *hdr) { l2arc_buf_hdr_t *l2hdr = &hdr->b_l2hdr; l2arc_dev_t *dev = l2hdr->b_dev; - uint64_t asize = arc_hdr_size(hdr); + uint64_t psize = arc_hdr_size(hdr); ASSERT(MUTEX_HELD(&dev->l2ad_mtx)); ASSERT(HDR_HAS_L2HDR(hdr)); list_remove(&dev->l2ad_buflist, hdr); - ARCSTAT_INCR(arcstat_l2_asize, -asize); - ARCSTAT_INCR(arcstat_l2_size, -HDR_GET_LSIZE(hdr)); + ARCSTAT_INCR(arcstat_l2_psize, -psize); + ARCSTAT_INCR(arcstat_l2_lsize, -HDR_GET_LSIZE(hdr)); - vdev_space_update(dev->l2ad_vdev, -asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, -psize, 0, 0); - (void) refcount_remove_many(&dev->l2ad_alloc, asize, hdr); + (void) refcount_remove_many(&dev->l2ad_alloc, psize, hdr); arc_hdr_clear_flags(hdr, ARC_FLAG_HAS_L2HDR); } @@ -7081,8 +7081,8 @@ top: l2arc_trim(hdr); arc_hdr_clear_flags(hdr, ARC_FLAG_HAS_L2HDR); - ARCSTAT_INCR(arcstat_l2_asize, -arc_hdr_size(hdr)); - ARCSTAT_INCR(arcstat_l2_size, -HDR_GET_LSIZE(hdr)); + ARCSTAT_INCR(arcstat_l2_psize, -arc_hdr_size(hdr)); + ARCSTAT_INCR(arcstat_l2_lsize, -HDR_GET_LSIZE(hdr)); bytes_dropped += arc_hdr_size(hdr); (void) refcount_remove_many(&dev->l2ad_alloc, @@ -7338,7 +7338,7 @@ top: /* * This doesn't exist in the ARC. Destroy. * arc_hdr_destroy() will call list_remove() - * and decrement arcstat_l2_size. + * and decrement arcstat_l2_lsize. */ arc_change_state(arc_anon, hdr, hash_lock); arc_hdr_destroy(hdr); @@ -7377,7 +7377,7 @@ static uint64_t l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) { arc_buf_hdr_t *hdr, *hdr_prev, *head; - uint64_t write_asize, write_psize, write_sz, headroom; + uint64_t write_asize, write_psize, write_lsize, headroom; boolean_t full; l2arc_write_callback_t *cb; zio_t *pio, *wzio; @@ -7387,7 +7387,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ASSERT3P(dev->l2ad_vdev, !=, NULL); pio = NULL; - write_sz = write_asize = write_psize = 0; + write_lsize = write_asize = write_psize = 0; full = B_FALSE; head = kmem_cache_alloc(hdr_l2only_cache, KM_PUSHPAGE); arc_hdr_set_flags(head, ARC_FLAG_L2_WRITE_HEAD | ARC_FLAG_HAS_L2HDR); @@ -7464,11 +7464,11 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ASSERT3U(HDR_GET_PSIZE(hdr), >, 0); ASSERT3P(hdr->b_l1hdr.b_pabd, !=, NULL); ASSERT3U(arc_hdr_size(hdr), >, 0); - uint64_t size = arc_hdr_size(hdr); + uint64_t psize = arc_hdr_size(hdr); uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, - size); + psize); - if ((write_psize + asize) > target_sz) { + if ((write_asize + asize) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_l2_write_full); @@ -7503,7 +7503,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint list_insert_head(&dev->l2ad_buflist, hdr); mutex_exit(&dev->l2ad_mtx); - (void) refcount_add_many(&dev->l2ad_alloc, size, hdr); + (void) refcount_add_many(&dev->l2ad_alloc, psize, hdr); /* * Normally the L2ARC can use the hdr's data, but if @@ -7520,15 +7520,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint * add it to the l2arc_free_on_write queue. */ abd_t *to_write; - if (!HDR_SHARED_DATA(hdr) && size == asize) { + if (!HDR_SHARED_DATA(hdr) && psize == asize) { to_write = hdr->b_l1hdr.b_pabd; } else { to_write = abd_alloc_for_io(asize, HDR_ISTYPE_METADATA(hdr)); - abd_copy(to_write, hdr->b_l1hdr.b_pabd, size); - if (asize != size) { - abd_zero_off(to_write, size, - asize - size); + abd_copy(to_write, hdr->b_l1hdr.b_pabd, psize); + if (asize != psize) { + abd_zero_off(to_write, psize, + asize - psize); } l2arc_free_abd_on_write(to_write, asize, arc_buf_type(hdr)); @@ -7539,12 +7539,12 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_CANFAIL, B_FALSE); - write_sz += HDR_GET_LSIZE(hdr); + write_lsize += HDR_GET_LSIZE(hdr); DTRACE_PROBE2(l2arc__write, vdev_t *, dev->l2ad_vdev, zio_t *, wzio); - write_asize += size; - write_psize += asize; + write_psize += psize; + write_asize += asize; dev->l2ad_hand += asize; mutex_exit(hash_lock); @@ -7560,7 +7560,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint /* No buffers selected for writing? */ if (pio == NULL) { - ASSERT0(write_sz); + ASSERT0(write_lsize); ASSERT(!HDR_HAS_L1HDR(head)); kmem_cache_free(hdr_l2only_cache, head); return (0); @@ -7568,10 +7568,10 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ASSERT3U(write_psize, <=, target_sz); ARCSTAT_BUMP(arcstat_l2_writes_sent); - ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); - ARCSTAT_INCR(arcstat_l2_size, write_sz); - ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + ARCSTAT_INCR(arcstat_l2_write_bytes, write_psize); + ARCSTAT_INCR(arcstat_l2_lsize, write_lsize); + ARCSTAT_INCR(arcstat_l2_psize, write_psize); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:11:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E44B9E073AE; Tue, 19 Sep 2017 09:11: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 B0FC7733A1; Tue, 19 Sep 2017 09:11: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 v8J9B7Bf052984; Tue, 19 Sep 2017 09:11:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9B7Wh052983; Tue, 19 Sep 2017 09:11:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190911.v8J9B7Wh052983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:11: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: r323755 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:11:09 -0000 Author: avg Date: Tue Sep 19 09:11:07 2017 New Revision: 323755 URL: https://svnweb.freebsd.org/changeset/base/323755 Log: MFC r322228: MFV r322227: 8377 Panic in bookmark deletion illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e https://www.illumos.org/issues/8377 The problem is that when dsl_bookmark_destroy_check() is executed from open context (the pre-check), it fills in dbda_success based on the existence of the bookmark. But the bookmark (or containing filesystem as in this case) can be destroyed before we get to syncing context. When we re-run dsl_bookmark_destroy_check() in syncing context, it will not add the deleted bookmark to dbda_success, intending for dsl_bookmark_destroy_sync() to not process it. But because the bookmark is still in dbda_success from the open-context call, we do try to destroy it. The fix is that dsl_bookmark_destroy_check() should not modify dbda_success when called from open context. Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:07:51 2017 (r323754) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:11:07 2017 (r323755) @@ -354,6 +354,9 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) dsl_pool_t *dp = dmu_tx_pool(tx); int rv = 0; + ASSERT(nvlist_empty(dbda->dbda_success)); + ASSERT(nvlist_empty(dbda->dbda_errors)); + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_BOOKMARKS)) return (0); @@ -383,7 +386,10 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) } } if (error == 0) { - fnvlist_add_boolean(dbda->dbda_success, fullname); + if (dmu_tx_is_syncing(tx)) { + fnvlist_add_boolean(dbda->dbda_success, + fullname); + } } else { fnvlist_add_int32(dbda->dbda_errors, fullname, error); rv = error; From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:19:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5CEEE07AA4; Tue, 19 Sep 2017 09:19:20 +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 A66C173873; Tue, 19 Sep 2017 09:19:20 +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 v8J9JJSF056160; Tue, 19 Sep 2017 09:19:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9JJY0056154; Tue, 19 Sep 2017 09:19:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190919.v8J9JJY0056154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:19:19 +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: r323757 - in stable/11: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/openso... X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/s... X-SVN-Commit-Revision: 323757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:19:21 -0000 Author: avg Date: Tue Sep 19 09:19:19 2017 New Revision: 323757 URL: https://svnweb.freebsd.org/changeset/base/323757 Log: MFC r322230: MFV r322229: 7600 zfs rollback should pass target snapshot to kernel illumos/illumos-gate@77b171372ed21642e04c873ef1e87fe2365520df https://github.com/illumos/illumos-gate/commit/77b171372ed21642e04c873ef1e87fe2365520df https://www.illumos.org/issues/7600 At present, the kernel side code seems to blindly rollback to whatever happens to be the latest snapshot at the time when the rollback task is processed. The expected target's name should be passed to the kernel driver and the sync task should validate that the target exists and that it is the latest snapshot indeed. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 09:19:19 2017 (r323757) @@ -3957,14 +3957,19 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, bo } /* - * We rely on zfs_iter_children() to verify that there are no - * newer snapshots for the given dataset. Therefore, we can - * simply pass the name on to the ioctl() call. There is still - * an unlikely race condition where the user has taken a - * snapshot since we verified that this was the most recent. + * Pass both the filesystem and the wanted snapshot names, + * we would get an error back if the snapshot is destroyed or + * a new snapshot is created before this request is processed. */ - err = lzc_rollback(zhp->zfs_name, NULL, 0); - if (err != 0) { + err = lzc_rollback_to(zhp->zfs_name, snap->zfs_name); + if (err == EXDEV) { + zfs_error_aux(zhp->zfs_hdl, dgettext(TEXT_DOMAIN, + "'%s' is not the latest snapshot"), snap->zfs_name); + (void) zfs_error_fmt(zhp->zfs_hdl, EZFS_BUSY, + dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), + zhp->zfs_name); + return (err); + } else if (err != 0) { (void) zfs_standard_error_fmt(zhp->zfs_hdl, errno, dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), zhp->zfs_name); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Sep 19 09:19:19 2017 (r323757) @@ -765,6 +765,9 @@ lzc_receive_with_header(const char *snapname, nvlist_t * Roll back this filesystem or volume to its most recent snapshot. * If snapnamebuf is not NULL, it will be filled in with the name * of the most recent snapshot. + * Note that the latest snapshot may change if a new one is concurrently + * created or the current one is destroyed. lzc_rollback_to can be used + * to roll back to a specific latest snapshot. * * Return 0 on success or an errno on failure. */ @@ -784,6 +787,27 @@ lzc_rollback(const char *fsname, char *snapnamebuf, in } nvlist_free(result); + return (err); +} + +/* + * Roll back this filesystem or volume to the specified snapshot, + * if possible. + * + * Return 0 on success or an errno on failure. + */ +int +lzc_rollback_to(const char *fsname, const char *snapname) +{ + nvlist_t *args; + nvlist_t *result; + int err; + + args = fnvlist_alloc(); + fnvlist_add_string(args, "target", snapname); + err = lzc_ioctl(ZFS_IOC_ROLLBACK, fsname, args, &result); + nvlist_free(args); + nvlist_free(result); return (err); } Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Sep 19 09:19:19 2017 (r323757) @@ -84,6 +84,7 @@ int lzc_receive_with_header(const char *, nvlist_t *, boolean_t lzc_exists(const char *); int lzc_rollback(const char *, char *, int); +int lzc_rollback_to(const char *, const char *); #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Sep 19 09:19:19 2017 (r323757) @@ -2259,6 +2259,7 @@ dsl_dataset_handoff_check(dsl_dataset_t *ds, void *own typedef struct dsl_dataset_rollback_arg { const char *ddra_fsname; + const char *ddra_tosnap; void *ddra_owner; nvlist_t *ddra_result; } dsl_dataset_rollback_arg_t; @@ -2300,6 +2301,18 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) return (SET_ERROR(EAGAIN)); } + /* + * If the expected target snapshot is specified, then check that + * the latest snapshot is it. + */ + if (ddra->ddra_tosnap != NULL) { + char namebuf[ZFS_MAX_DATASET_NAME_LEN]; + + dsl_dataset_name(ds->ds_prev, namebuf); + if (strcmp(namebuf, ddra->ddra_tosnap) != 0) + return (SET_ERROR(EXDEV)); + } + /* must not have any bookmarks after the most recent snapshot */ nvlist_t *proprequest = fnvlist_alloc(); fnvlist_add_boolean(proprequest, zfs_prop_to_name(ZFS_PROP_CREATETXG)); @@ -2401,11 +2414,13 @@ dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) * notes above zfs_suspend_fs() for further details. */ int -dsl_dataset_rollback(const char *fsname, void *owner, nvlist_t *result) +dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner, + nvlist_t *result) { dsl_dataset_rollback_arg_t ddra; ddra.ddra_fsname = fsname; + ddra.ddra_tosnap = tosnap; ddra.ddra_owner = owner; ddra.ddra_result = result; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Sep 19 09:19:19 2017 (r323757) @@ -334,7 +334,8 @@ void dsl_dataset_set_refreservation_sync_impl(dsl_data void dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx); boolean_t dsl_dataset_is_zapified(dsl_dataset_t *ds); boolean_t dsl_dataset_has_resume_receive_state(dsl_dataset_t *ds); -int dsl_dataset_rollback(const char *fsname, void *owner, nvlist_t *result); +int dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner, + nvlist_t *result); void dsl_dataset_deactivate_feature(uint64_t dsobj, spa_feature_t f, dmu_tx_t *tx); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 19 09:19:19 2017 (r323757) @@ -3779,18 +3779,29 @@ zfs_ioc_destroy(zfs_cmd_t *zc) /* * fsname is name of dataset to rollback (to most recent snapshot) * - * innvl is not used. + * innvl may contain name of expected target snapshot * * outnvl: "target" -> name of most recent snapshot * } */ /* ARGSUSED */ static int -zfs_ioc_rollback(const char *fsname, nvlist_t *args, nvlist_t *outnvl) +zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) { zfsvfs_t *zfsvfs; + char *target = NULL; int error; + (void) nvlist_lookup_string(innvl, "target", &target); + if (target != NULL) { + int fslen = strlen(fsname); + + if (strncmp(fsname, target, fslen) != 0) + return (SET_ERROR(EINVAL)); + if (target[fslen] != '@') + return (SET_ERROR(EINVAL)); + } + if (getzfsvfs(fsname, &zfsvfs) == 0) { dsl_dataset_t *ds; @@ -3799,7 +3810,8 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, n if (error == 0) { int resume_err; - error = dsl_dataset_rollback(fsname, zfsvfs, outnvl); + error = dsl_dataset_rollback(fsname, target, zfsvfs, + outnvl); resume_err = zfs_resume_fs(zfsvfs, ds); error = error ? error : resume_err; } @@ -3809,7 +3821,7 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, n vfs_unbusy(zfsvfs->z_vfs); #endif } else { - error = dsl_dataset_rollback(fsname, NULL, outnvl); + error = dsl_dataset_rollback(fsname, target, NULL, outnvl); } return (error); } From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:23:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58FC0E07F0E; Tue, 19 Sep 2017 09:23: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 274A373D45; Tue, 19 Sep 2017 09:23: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 v8J9NdjY060133; Tue, 19 Sep 2017 09:23:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9NdXM060132; Tue, 19 Sep 2017 09:23:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190923.v8J9NdXM060132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:23: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: r323758 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:23:40 -0000 Author: avg Date: Tue Sep 19 09:23:39 2017 New Revision: 323758 URL: https://svnweb.freebsd.org/changeset/base/323758 Log: MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothly merging zpool checkpoint & MMP in ZFS illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://www.illumos.org/issues/8491 The zpool checkpoint feature in DxOS added a new field in the uberblock. The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279). As these two changes come from two different sources and once upstreamed and deployed will introduce an incompatibility with each other we want to upstream a change that will reserve the padding for both of them so integration goes smoothly and everyone gets both features. Reviewed by: Matthew Ahrens Reviewed by: Brian Behlendorf Reviewed by: Olaf Faaland Approved by: Gordon Ross Author: Serapheim Dimitropoulos Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:19:19 2017 (r323757) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:23:39 2017 (r323758) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017 by Delphix. All rights reserved. */ #ifndef _SYS_UBERBLOCK_IMPL_H @@ -54,6 +55,12 @@ struct uberblock { /* highest SPA_VERSION supported by software that wrote this txg */ uint64_t ub_software_version; + + /* These fields are reserved for features that are under development: */ + uint64_t ub_mmp_magic; + uint64_t ub_mmp_delay; + uint64_t ub_mmp_seq; + uint64_t ub_checkpoint_txg; }; #ifdef __cplusplus From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:35:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 118BBE08939; Tue, 19 Sep 2017 09:35: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 E03667451D; Tue, 19 Sep 2017 09:35: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 v8J9Z8LG064494; Tue, 19 Sep 2017 09:35:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9Z87t064493; Tue, 19 Sep 2017 09:35:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190935.v8J9Z87t064493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:35:08 +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: r323760 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:35:09 -0000 Author: avg Date: Tue Sep 19 09:35:07 2017 New Revision: 323760 URL: https://svnweb.freebsd.org/changeset/base/323760 Log: MFC r323435: MFV r323111: 8569 problem with inline functions in abd.h illumos/illumos-gate@37e84ab74e939caf52150fc3352081786ecc0c29 https://github.com/illumos/illumos-gate/commit/37e84ab74e939caf52150fc3352081786ecc0c29 https://www.illumos.org/issues/8569 C [C99] has peculiar rules for inline functions that are different from the C++ rules. Unlike C++ where inline is "fire and forget", in C a programmer must pay attention to the function's storage class / visibility. The main problem is with the case where a compiler decides to not inline a call to the function declared as inline. Some relevant links: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15831.html - http://www.drdobbs.com/the-new-c-inline-functions/184401540 The summary is that either the inline functions should be declared 'static inline' or one of the compilation units (.c files) must provide a callable externally visible function definition. In the former case, the compiler would automatically create a local non-inlined function instance in every compilation unit where it's needed. In the latter case the single external definition is used to satisfy any non-inlined calls in all compilation units. As things stand right now, we can get an undefined reference error under certain combinations of compilers and compiler options. For example, this is what I get on FreeBSD when compiling with clang 4.0.0 and -O1: In function `abd_free': /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:385: undefined reference to `abd_is_linear' Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Sep 19 09:26:13 2017 (r323759) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Sep 19 09:35:07 2017 (r323760) @@ -157,6 +157,13 @@ extern vmem_t *zio_alloc_arena; kmem_cache_t *abd_chunk_cache; static kstat_t *abd_ksp; +extern inline boolean_t abd_is_linear(abd_t *abd); +extern inline void abd_copy(abd_t *dabd, abd_t *sabd, size_t size); +extern inline void abd_copy_from_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_copy_to_buf(void* buf, abd_t *abd, size_t size); +extern inline int abd_cmp_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_zero(abd_t *abd, size_t size); + static void * abd_alloc_chunk() { From owner-svn-src-stable-11@freebsd.org Tue Sep 19 09:39:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA34E08C4E; Tue, 19 Sep 2017 09:39:49 +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 9DB4774757; Tue, 19 Sep 2017 09:39: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 v8J9dmLG064701; Tue, 19 Sep 2017 09:39:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9dmE9064700; Tue, 19 Sep 2017 09:39:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190939.v8J9dmE9064700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:39: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: r323761 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:39:49 -0000 Author: avg Date: Tue Sep 19 09:39:48 2017 New Revision: 323761 URL: https://svnweb.freebsd.org/changeset/base/323761 Log: MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives None of the tagged functions had unused parameters. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 19 09:35:07 2017 (r323760) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 19 09:39:48 2017 (r323761) @@ -434,7 +434,6 @@ zfsctl_root(zfsvfs_t *zfsvfs, int flags, vnode_t **vpp /* * Common open routine. Disallow any write access. */ -/* ARGSUSED */ static int zfsctl_common_open(struct vop_open_args *ap) { @@ -459,7 +458,6 @@ zfsctl_common_close(struct vop_close_args *ap) /* * Common access routine. Disallow writes. */ -/* ARGSUSED */ static int zfsctl_common_access(ap) struct vop_access_args /* { @@ -515,7 +513,6 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nlink = 2; } -/*ARGSUSED*/ static int zfsctl_common_fid(ap) struct vop_fid_args /* { @@ -569,7 +566,6 @@ zfsctl_common_print(ap) /* * Get root directory attributes. */ -/* ARGSUSED */ static int zfsctl_root_getattr(ap) struct vop_getattr_args /* { @@ -821,7 +817,6 @@ zfsctl_snapshot_vnode_setup(vnode_t *vp, void *arg) * snapshot if it exist, creating the pseudo filesystem vnode as necessary. * Perform a mount of the associated dataset on top of the vnode. */ -/* ARGSUSED */ int zfsctl_snapdir_lookup(ap) struct vop_lookup_args /* { @@ -1013,7 +1008,6 @@ zfsctl_snapdir_readdir(ap) /* NOTREACHED */ } -/* ARGSUSED */ static int zfsctl_snapdir_getattr(ap) struct vop_getattr_args /* { From owner-svn-src-stable-11@freebsd.org Tue Sep 19 16:51:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43FF4E1CF09; Tue, 19 Sep 2017 16:51:53 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E84E32F7; Tue, 19 Sep 2017 16:51:53 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JGpq80048495; Tue, 19 Sep 2017 16:51:52 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JGpp5v048489; Tue, 19 Sep 2017 16:51:51 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201709191651.v8JGpp5v048489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 19 Sep 2017 16:51: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: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jpaetzel X-SVN-Commit-Paths: in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Commit-Revision: 323770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:51:53 -0000 Author: jpaetzel Date: Tue Sep 19 16:51:51 2017 New Revision: 323770 URL: https://svnweb.freebsd.org/changeset/base/323770 Log: MFC: 323068 Allow kldload tcpmd5 PR: 220170 Modified: stable/11/sys/amd64/conf/GENERIC stable/11/sys/arm64/conf/GENERIC stable/11/sys/i386/conf/GENERIC stable/11/sys/powerpc/conf/GENERIC stable/11/sys/riscv/conf/GENERIC stable/11/sys/sparc64/conf/GENERIC Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/amd64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -29,6 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/arm64/conf/GENERIC ============================================================================== --- stable/11/sys/arm64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/arm64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -29,6 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/i386/conf/GENERIC ============================================================================== --- stable/11/sys/i386/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/i386/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/powerpc/conf/GENERIC ============================================================================== --- stable/11/sys/powerpc/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/powerpc/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -38,6 +38,7 @@ options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support Modified: stable/11/sys/riscv/conf/GENERIC ============================================================================== --- stable/11/sys/riscv/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/riscv/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -32,6 +32,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/sparc64/conf/GENERIC ============================================================================== --- stable/11/sys/sparc64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/sparc64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support From owner-svn-src-stable-11@freebsd.org Wed Sep 20 06:28:42 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81CB5E2593C; Wed, 20 Sep 2017 06:28: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 5D81581E94; Wed, 20 Sep 2017 06:28: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 v8K6SfNB083138; Wed, 20 Sep 2017 06:28:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K6SfYa083137; Wed, 20 Sep 2017 06:28:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200628.v8K6SfYa083137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 06:28:41 +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: r323787 - stable/11/sys/dev/jedec_ts X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/jedec_ts X-SVN-Commit-Revision: 323787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 06:28:42 -0000 Author: avg Date: Wed Sep 20 06:28:41 2017 New Revision: 323787 URL: https://svnweb.freebsd.org/changeset/base/323787 Log: MFC r323540: jedec_ts: add many more devices from various vendors The new IDs are taken from the hardware to which I have access and from open datasheets. Also, the hardware probing is moved to the device probe method. Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/11/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 04:59:52 2017 (r323786) +++ stable/11/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 06:28:41 2017 (r323787) @@ -42,6 +42,116 @@ __FBSDID("$FreeBSD$"); /* + * General device identification notes. + * + * The JEDEC TSE2004av specification defines the device ID that all compliant + * devices should use, but very few do in practice. Maybe that's because + * TSE2002av was rather vague about that. + * Rare examples are IDT TSE2004GB2B0 and Atmel AT30TSE004A, not sure if + * they are TSE2004av compliant by design or by accident. + * Also, the specification mandates that PCI SIG manufacturer IDs are to be + * used, but in practice the JEDEC manufacturer IDs are often used. + */ + +const struct ts_dev { + uint16_t vendor_id; + uint8_t device_id; + const char *description; +} known_devices[] = { + /* + * Analog Devices ADT7408. + * http://www.analog.com/media/en/technical-documentation/data-sheets/ADT7408.pdf + */ + { 0x11d4, 0x08, "Analog Devices DIMM temperature sensor" }, + + /* + * Atmel AT30TSE002B, AT30TSE004A. + * http://www.atmel.com/images/doc8711.pdf + * http://www.atmel.com/images/atmel-8868-dts-at30tse004a-datasheet.pdf + * Note how one chip uses the JEDEC Manufacturer ID while the other + * uses the PCI SIG one. + */ + { 0x001f, 0x82, "Atmel DIMM temperature sensor" }, + { 0x1114, 0x22, "Atmel DIMM temperature sensor" }, + + /* + * Integrated Device Technology (IDT) TS3000B3A, TSE2002B3C, + * TSE2004GB2B0 chips and their variants. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + * https://www.idt.com/document/dst/tse2004gb2b0-datasheet + */ + { 0x00b3, 0x29, "IDT DIMM temperature sensor" }, + { 0x00b3, 0x22, "IDT DIMM temperature sensor" }, + + /* + * Maxim Integrated MAX6604. + * Different document revisions specify different Device IDs. + * Document 19-3837; Rev 0; 10/05 has 0x3e00 while + * 19-3837; Rev 3; 10/11 has 0x5400. + * http://datasheets.maximintegrated.com/en/ds/MAX6604.pdf + */ + { 0x004d, 0x3e, "Maxim Integrated DIMM temperature sensor" }, + { 0x004d, 0x54, "Maxim Integrated DIMM temperature sensor" }, + + /* + * Microchip Technology MCP9805, MCP9843, MCP98242, MCP98243 + * and their variants. + * http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + * Microchip Technology EMC1501. + * http://ww1.microchip.com/downloads/en/DeviceDoc/00001605A.pdf + */ + { 0x0054, 0x00, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x20, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x21, "Microchip DIMM temperature sensor" }, + { 0x1055, 0x08, "Microchip DIMM temperature sensor" }, + + /* + * NXP Semiconductors SE97 and SE98. + * http://www.nxp.com/docs/en/data-sheet/SE97B.pdf + */ + { 0x1131, 0xa1, "NXP DIMM temperature sensor" }, + { 0x1131, 0xa2, "NXP DIMM temperature sensor" }, + + /* + * ON Semiconductor CAT34TS02 revisions B and C, CAT6095 and compatible. + * https://www.onsemi.com/pub/Collateral/CAT34TS02-D.PDF + * http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF + */ + { 0x1b09, 0x08, "ON Semiconductor DIMM temperature sensor" }, + { 0x1b09, 0x0a, "ON Semiconductor DIMM temperature sensor" }, + + /* + * ST[Microelectronics] STTS424E02, STTS2002 and others. + * http://www.st.com/resource/en/datasheet/cd00157558.pdf + * http://www.st.com/resource/en/datasheet/stts2002.pdf + */ + { 0x104a, 0x00, "ST DIMM temperature sensor" }, + { 0x104a, 0x03, "ST DIMM temperature sensor" }, +}; + +static const char * +ts_match_device(uint16_t vid, uint16_t did) +{ + const struct ts_dev *d; + int i; + + for (i = 0; i < nitems(known_devices); i++) { + d = &known_devices[i]; + if (vid == d->vendor_id && (did >> 8) == d->device_id) + return (d->description); + } + + /* + * If no match for a specific device, then check + * for a generic TSE2004av compliant device. + */ + if ((did >> 8) == 0x22) + return ("TSE2004av compliant DIMM temperature sensor"); + return (NULL); +} + +/* * SMBus specification defines little-endian byte order, * but it seems that the JEDEC devices expect it to * be big-endian. @@ -89,15 +199,7 @@ ts_temp_sysctl(SYSCTL_HANDLER_ARGS) static int ts_probe(device_t dev) { - device_set_desc(dev, "DIMM memory sensor"); - return (BUS_PROBE_DEFAULT); -} - -static int -ts_attach(device_t dev) -{ - struct sysctl_ctx_list *ctx; - struct sysctl_oid_list *tree; + const char *match; int err; uint16_t vendorid; uint16_t devid; @@ -119,26 +221,9 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Device ID\n"); return (ENXIO); } - if ((devid & 0xff00) == 0x2200) { - /* - * Defined by JEDEC Standard No. 21-C, Release 26, - * Page 4.1.6 – 24 - */ - } else if (vendorid == 0x104a) { - /* - * STMicroelectronics datasheets say that - * device ID and revision can vary. - * E.g. STT424E02, Doc ID 13448 Rev 8, - * section 4.6, page 26. - */ - } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { - /* - * IDT TS3000B3A and TSE2002B3C chips and their variants. - * Revision IDs (the lower byte) can vary. - * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf - * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf - */ - } else { + + match = ts_match_device(vendorid, devid); + if (match == NULL) { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" ", 0x%x and 0x%x\n", vendorid, devid); @@ -146,9 +231,18 @@ ts_attach(device_t dev) return (ENXIO); } + device_set_desc(dev, match); + return (BUS_PROBE_DEFAULT); +} + +static int +ts_attach(device_t dev) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temp", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, ts_temp_sysctl, "IK4", "Current temperature"); From owner-svn-src-stable-11@freebsd.org Wed Sep 20 07:42:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E666E0070C; Wed, 20 Sep 2017 07:42:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28A8DEA8; Wed, 20 Sep 2017 07:42:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id i195so1255511pgd.9; Wed, 20 Sep 2017 00:42:52 -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=3MFIfyNo5XmoQLxZzh1BPfuigm0k9Yl8WKAK4vdP9AI=; b=BxfH4paJZKLJG2i8g2ai36/66Gww/28Fp3EIOTapzPzsuFmmTNnKOAJWqRUQREHiuD xKoO7Nyp5otTzaRNLj/LBHq9NpuKJciI4T+qloU4gvJqppU1s8b2jBknbDhBA/8t5Bc8 MfYNMvYCkyUEhx8LdThtow/rr/R+o6Klm0FB2Xs9QlWXq5owsqC6rgtRZmEa0Gz17JKS xKQjPWlsvBU82mZmsymzn9xjBRpF4ipzBMrI8A8ekVQfm5EfLYOpUg4OEGNiG44ImM/A kn9Fo5amBIdTt2+3Uwlh6RiCsle6W+HDsO0hohJunFDggp1XEFtPVEfzhlGON02dQQ7y dm9A== 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=3MFIfyNo5XmoQLxZzh1BPfuigm0k9Yl8WKAK4vdP9AI=; b=IByH4PL32waF8iKOpJMHdSRCsharWAmhNNf/8upX0UcKEAoatOyJVEMp9xKUHHrKIr AVo/ZwkjKyMRzfEXToMbCXfVvEaKUqgASn6CVZFgKs8lA2o+/TPQlcl36JBldZRWTuaV 2YgWgv0vBNYtIJluoIP7wJhr3RXxYtZm6doaey+uhLR13SD/d3rNMUAxf7GgpJzKUGDV HQ1+yHKJkIzvYtjOrSTnSXEmaf2G3Rrp25NctSVuStYLmoi1A1e3G5T7RmDARXsEZPAP 2FF8FSljYse2HoGOCQ+K9HOi+XYP4HKWh4UBRF4kElPgAIa6zM9w+2vWtCzOwR0tE/VA jgfw== X-Gm-Message-State: AHPjjUiiUGBjjOVScx933QdcQmZXYY8o0fd0WNVStFgYRFo2ZBsKpa3V xdOC90/E9XK2zgvBt8X8o9/v8cOj X-Google-Smtp-Source: AOwi7QA5TDRTvMDbYr+Gqudt9sAaBVOPgb7hMbLyGOK9JUHX8qYrI5RfQEJgDpSknCfsrXaHQeR0sw== X-Received: by 10.84.129.226 with SMTP id b89mr1234659plb.0.1505893371095; Wed, 20 Sep 2017 00:42:51 -0700 (PDT) Received: from [192.168.3.133] (70-90-173-49-California.hfc.comcastbusiness.net. [70.90.173.49]) by smtp.gmail.com with ESMTPSA id x13sm6554814pgt.16.2017.09.20.00.42.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Sep 2017 00:42:50 -0700 (PDT) Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201709191651.v8JGpp5v048489@repo.freebsd.org> Date: Wed, 20 Sep 2017 00:41:13 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-Id: <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> To: Josh Paetzel X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:42:52 -0000 --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: >=20 > Author: jpaetzel > Date: Tue Sep 19 16:51:51 2017 > New Revision: 323770 > URL: https://svnweb.freebsd.org/changeset/base/323770 >=20 > Log: > MFC: 323068 >=20 > Allow kldload tcpmd5 Wasn=E2=80=99t this reverted on ^/head ? Thanks, -Ngie --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC 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 iQIcBAEBCgAGBQJZwhuaAAoJEPWDqSZpMIYVIfAP/j1HqqhS1qX8kRJNjjxp9DcW LiCJaa8Q6y+TH3RELC48AVtdbiXU1yRi1/tquM1+P04BUIIot4eBPfIV2asBTPjk vwf/4WoVMbWTMMYikqj74Cb9vr769m1RDP1fPti/vVSPR1OvFyytFBa++NtVuDqR LvuQw1leEGJemhAu/4pBxaPePe/LU8IfAg6B2b/+m2P7XFkEzskT5nMbWdrK7oE9 6WjmhEzPP0Gp6yG+wOEFncJRLGLSwQ5rcHKPkgVzVhjL7IruWgmjMIlzysPp7AeN +uU+zWxyjrh3AGvQKe3QF/ozssiP4LqEOf5hhaL6wUoo1yCw/91IbN6gcZn6vf0H nL39J5z/06h2WmqGoshGAM4Wo5p4I52vxJS3QDKWKgiMxypzbmKmUDcM3vi4CVJJ iquUOub/pa3oSWTkCJay+JJ9NRdiDSRk6z8J/isJtFLGVIE2zwU/O17PfYOZA0pX P/qtqfziA3hHFVvjki2gS5P1oyMixNWfNRMf6Xjqn73bfVrxpXu24JjLCoXhlWB+ Uuv0yxL1jMfbfb8MzpKMCSdykyV6QK02K2SG3gx2y3PhJZ5fEnjemwcxXyhdMzJy 6L6XcBobWIFedpliuzeThrGWHF3nzTR0sK0QXMsqpzLj8M5qDcyXzoNqww6iLKD1 uS5JqlX4NLn54kw/PGV3 =AM2d -----END PGP SIGNATURE----- --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC-- From owner-svn-src-stable-11@freebsd.org Wed Sep 20 08:41:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11AE9E02FB1; Wed, 20 Sep 2017 08:41: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 D0DC52CF9; Wed, 20 Sep 2017 08:41:47 +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 v8K8fkqA037862; Wed, 20 Sep 2017 08:41:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8fkJg037861; Wed, 20 Sep 2017 08:41:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200841.v8K8fkJg037861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:41:46 +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: r323798 - stable/11/lib/libpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libpmc X-SVN-Commit-Revision: 323798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:41:48 -0000 Author: kib Date: Wed Sep 20 08:41:46 2017 New Revision: 323798 URL: https://svnweb.freebsd.org/changeset/base/323798 Log: MFC r323229: Minor style changes to make forthcoming code stand out less. Modified: stable/11/lib/libpmc/libpmc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/libpmc.c ============================================================================== --- stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:36:31 2017 (r323797) +++ stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:41:46 2017 (r323798) @@ -1017,20 +1017,20 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE || cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE_XEON || - cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE || - cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE_XEON ) { + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE || + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE_XEON ) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp); } else return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL || - cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { + cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { 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_BROADWELL || - cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { + 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); @@ -3595,7 +3595,8 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype break; case PMC_CPU_INTEL_SKYLAKE: ev = skylake_event_table; - evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + evfence = skylake_event_table + + PMC_EVENT_TABLE_SIZE(skylake); break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; From owner-svn-src-stable-11@freebsd.org Wed Sep 20 08:45:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6260E03247; Wed, 20 Sep 2017 08:45: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 5764430E1; Wed, 20 Sep 2017 08:45: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 v8K8jgsC040380; Wed, 20 Sep 2017 08:45:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8jgBi040377; Wed, 20 Sep 2017 08:45:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200845.v8K8jgBi040377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:45: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: r323799 - in stable/11: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: lib/libpmc sys/dev/hwpmc X-SVN-Commit-Revision: 323799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:45:43 -0000 Author: kib Date: Wed Sep 20 08:45:42 2017 New Revision: 323799 URL: https://svnweb.freebsd.org/changeset/base/323799 Log: MFC r323230: Skylake server core PMC support for hwpmc(4). Modified: stable/11/lib/libpmc/libpmc.c stable/11/sys/dev/hwpmc/hwpmc_core.c stable/11/sys/dev/hwpmc/hwpmc_intel.c stable/11/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/libpmc.c ============================================================================== --- stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:41:46 2017 (r323798) +++ stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:45:42 2017 (r323799) @@ -232,6 +232,11 @@ static const struct pmc_event_descr skylake_event_tabl __PMC_EV_ALIAS_SKYLAKE() }; +static const struct pmc_event_descr skylake_xeon_event_table[] = +{ + __PMC_EV_ALIAS_SKYLAKE_XEON() +}; + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -328,6 +333,7 @@ PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_ 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(skylake_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); 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); @@ -383,6 +389,7 @@ PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell_xeon, 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(skylake_xeon, IAP, skylake_xeon, 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); @@ -721,6 +728,8 @@ static struct pmc_event_alias core2_aliases_without_ia #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 skylake_xeon_aliases core2_aliases +#define skylake_xeon_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 @@ -1037,7 +1046,8 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, } else return (-1); - } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE) { + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE || + cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_skylake, p, &rsp); } else @@ -3007,6 +3017,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = skylake_event_table; count = PMC_EVENT_TABLE_SIZE(skylake); break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + ev = skylake_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(skylake_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -3386,6 +3400,9 @@ pmc_init(void) case PMC_CPU_INTEL_SKYLAKE: PMC_MDEP_INIT_INTEL_V2(skylake); break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + PMC_MDEP_INIT_INTEL_V2(skylake_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3597,6 +3614,11 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype ev = skylake_event_table; evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + ev = skylake_xeon_event_table; + evfence = skylake_xeon_event_table + + PMC_EVENT_TABLE_SIZE(skylake_xeon); break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_core.c Wed Sep 20 08:41:46 2017 (r323798) +++ stable/11/sys/dev/hwpmc/hwpmc_core.c Wed Sep 20 08:45:42 2017 (r323799) @@ -582,6 +582,7 @@ struct iap_event_descr { #define IAP_F_BW (1 << 13) /* CPU: Broadwell */ #define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ #define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_SLX (1 << 16) /* CPU: Skylake Xeon AKA scalable */ #define IAP_F_FM (1 << 18) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ @@ -626,12 +627,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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), @@ -670,7 +671,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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), @@ -679,22 +680,24 @@ static struct iap_event_descr iap_events[] = { 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX), + IAP_F_BW | IAP_F_BWX | IAP_F_SLX), 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), + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), 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_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SLX), 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_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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), + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), @@ -717,19 +720,21 @@ 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_01H, 0x0D, 0x80, IAP_F_FM | IAP_F_SLX), 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, 0x80, IAP_F_FM | IAP_F_SL), + IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL | IAP_F_SLX), 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 | - 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | + IAP_F_SLX), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -782,7 +787,7 @@ 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | @@ -824,21 +829,27 @@ static struct iap_event_descr iap_events[] = { 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 | - 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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, 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_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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 | - 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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 | @@ -846,19 +857,20 @@ 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, 0xD8, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL | IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_SLX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -900,10 +912,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_07H, 0x28, 0x07, IAP_F_FM | IAP_F_SLX), IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_18H, 0x28, 0x18, IAP_F_SLX), + IAPDESCR(28H_20H, 0x28, 0x20, IAP_F_SLX), + IAPDESCR(28H_40H, 0x28, 0x40, IAP_F_SLX), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, @@ -917,10 +933,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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -936,11 +952,14 @@ 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL | + IAP_F_SLX), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -981,24 +1000,27 @@ 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SLX), 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), + IAPDESCR(49H_08H, 0x49, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | @@ -1012,7 +1034,8 @@ 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_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX), @@ -1028,11 +1051,12 @@ 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | @@ -1044,6 +1068,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(54H_01H, 0x54, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_02H, 0x54, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_04H, 0x54, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_08H, 0x54, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_10H, 0x54, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_20H, 0x54, 0x20, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_40H, 0x54, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 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 | @@ -1067,8 +1099,15 @@ static struct iap_event_descr iap_events[] = { 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_BW | IAP_F_BWX), + IAPDESCR(5DH_01H, 0x5d, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_02H, 0x5d, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_04H, 0x5d, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_08H, 0x5d, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_10H, 0x5d, 0x10, IAP_F_FM | IAP_F_SLX), + 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), @@ -1076,16 +1115,17 @@ static struct iap_event_descr iap_events[] = { 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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, 0x60, 0x10, IAP_F_FM | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(60H_10H, 0x60, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1145,23 +1185,24 @@ 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, 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | + IAP_F_BWX | IAP_F_SLX), 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, 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + 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 | IAP_F_SLX), 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, 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), - + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + 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 | IAP_F_SLX), 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), - + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1184,7 +1225,8 @@ static struct iap_event_descr iap_events[] = { 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 | IAP_F_SL), /* SL may have a spec bug two with same entry no cmask */ + IAP_F_IBX | IAP_F_SL | IAP_F_SLX), /* 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), @@ -1197,23 +1239,29 @@ 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 | IAP_F_SL), - IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL | IAP_F_SLX), + IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(83H_04H, 0x83, 0x04, IAP_F_FM | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX), + IAP_F_BW | IAP_F_BWX | IAP_F_SLX), 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 | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_SLX), + IAPDESCR(85H_08H, 0x85, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), @@ -1223,7 +1271,7 @@ 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), @@ -1305,41 +1353,42 @@ static struct iap_event_descr iap_events[] = { 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | @@ -1347,7 +1396,7 @@ static struct iap_event_descr iap_events[] = { 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX), @@ -1358,30 +1407,35 @@ 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 | IAP_F_SL), - 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_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(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 | IAP_F_SLX), + 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 | IAP_F_SLX), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | + IAP_F_HWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | 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(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A6H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_40H, 0xA3, 0x40, IAP_F_FM | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1391,7 +1445,8 @@ 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_BW | IAP_F_BWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | + IAP_F_SLX), 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 | @@ -1400,34 +1455,38 @@ static struct iap_event_descr iap_events[] = { 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | - 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_SL), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | + IAP_F_SL | IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SLX), IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1436,7 +1495,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_WM), IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_SBX), + IAP_F_SB | IAP_F_SBX | IAP_F_SLX), IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_I7O), @@ -1487,18 +1546,19 @@ static struct iap_event_descr iap_events[] = { 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_SL), /* spec bug SL? */ + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), /* 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), 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), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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_BW | IAP_F_BWX), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1514,7 +1574,7 @@ 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, 0x3F, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_3FH, 0xC1, 0x3F, IAP_F_FM | IAP_F_SL | IAP_F_SLX), 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_FM |IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1522,10 +1582,12 @@ static struct iap_event_descr iap_events[] = { 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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), @@ -1535,13 +1597,15 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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 | @@ -1549,27 +1613,34 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C4H_00H, 0xC4, 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_01H, 0xC4, 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), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_02H, 0xC4, 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_04H, 0xC4, 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_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_08H, 0xC4, 0x08, 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), IAPDESCR(C4H_10H, 0xC4, 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_20H, 0xC4, 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), @@ -1581,18 +1652,20 @@ static struct iap_event_descr iap_events[] = { 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 | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C5H_01H, 0xC5, 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 | IAP_F_BW | IAP_F_BWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SLX), IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C5H_04H, 0xC5, 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 | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + 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(C5H_10H, 0xC5, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), 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), @@ -1604,27 +1677,45 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), /* For SL C6_01 needs EV_SEL? 0x11, 0x12, 0x13, 0x14, 0x15? */ - IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), + IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL), + IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(C7H_40H, 0xc7, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C7H_80H, 0xc7, 0x80, IAP_F_FM | IAP_F_SLX), 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), + IAPDESCR(C8H_01H, 0xC8, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_02H, 0xC8, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_04H, 0xC8, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_08H, 0xC8, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_10H, 0xC8, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SLX), + IAPDESCR(C8H_40H, 0xC8, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_80H, 0xC8, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C9H_01H, 0xC9, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_02H, 0xC9, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_04H, 0xC9, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_08H, 0xC9, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_10H, 0xC9, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_20H, 0xC9, 0x20, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_40H, 0xC9, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_80H, 0xC9, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -1640,13 +1731,14 @@ static struct iap_event_descr iap_events[] = { 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, 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), 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), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_SL | IAP_F_SLX), IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1666,12 +1758,13 @@ static struct iap_event_descr iap_events[] = { IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_20H, 0xCC, 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SLX), IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | 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), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -1682,50 +1775,62 @@ static struct iap_event_descr iap_events[] = { 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), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), 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 | IAP_F_BW | - IAP_F_BWX | IAP_F_SL), + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_02H, 0xD1, 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_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), 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 | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Wed Sep 20 08:51:04 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9F8BE034EA; Wed, 20 Sep 2017 08:51:04 +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 76392337B; Wed, 20 Sep 2017 08:51:04 +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 v8K8p31E041482; Wed, 20 Sep 2017 08:51:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8p3vm041480; Wed, 20 Sep 2017 08:51:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200851.v8K8p3vm041480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:51:03 +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: r323800 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:51:04 -0000 Author: kib Date: Wed Sep 20 08:51:03 2017 New Revision: 323800 URL: https://svnweb.freebsd.org/changeset/base/323800 Log: MFC r323558: Use existing tag name for the vm_object' memq. Modified: stable/11/sys/vm/vm_object.h stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 08:45:42 2017 (r323799) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 08:51:03 2017 (r323800) @@ -87,12 +87,17 @@ * */ +#ifndef VM_PAGE_HAVE_PGLIST +TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif + struct vm_object { struct rwlock lock; TAILQ_ENTRY(vm_object) object_list; /* list of all objects */ LIST_HEAD(, vm_object) shadow_head; /* objects that this is a shadow for */ LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ - TAILQ_HEAD(respgs, vm_page) memq; /* list of resident pages */ + struct pglist memq; /* list of resident pages */ struct vm_radix rtree; /* root of the resident page radix trie*/ vm_pindex_t size; /* Object size */ int generation; /* generation ID */ Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Wed Sep 20 08:45:42 2017 (r323799) +++ stable/11/sys/vm/vm_page.h Wed Sep 20 08:51:03 2017 (r323800) @@ -209,7 +209,10 @@ struct vm_page { #define PQ_LAUNDRY 2 #define PQ_COUNT 3 +#ifndef VM_PAGE_HAVE_PGLIST TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif SLIST_HEAD(spglist, vm_page); struct vm_pagequeue { From owner-svn-src-stable-11@freebsd.org Wed Sep 20 09:11:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E99D8E0452A; Wed, 20 Sep 2017 09:11: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 C291B6348B; Wed, 20 Sep 2017 09:11: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 v8K9BREH051783; Wed, 20 Sep 2017 09:11:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9BRL8051781; Wed, 20 Sep 2017 09:11:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200911.v8K9BRL8051781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:11: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: r323801 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:11:29 -0000 Author: kib Date: Wed Sep 20 09:11:27 2017 New Revision: 323801 URL: https://svnweb.freebsd.org/changeset/base/323801 Log: MFC r323559: Split vm_page_free_toq(). Modified: stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Wed Sep 20 08:51:03 2017 (r323800) +++ stable/11/sys/vm/vm_page.c Wed Sep 20 09:11:27 2017 (r323801) @@ -158,6 +158,7 @@ static uma_zone_t fakepg_zone; static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); +static void vm_page_free_phys(vm_page_t m); static void vm_page_free_wakeup(void); static void vm_page_init_fakepg(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, @@ -2367,13 +2368,7 @@ unlock: mtx_lock(&vm_page_queue_free_mtx); do { SLIST_REMOVE_HEAD(&free, plinks.s.ss); - vm_phys_freecnt_adj(m, 1); -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (true) -#endif - vm_phys_free_pages(m, 0); + vm_page_free_phys(m); } while ((m = SLIST_FIRST(&free)) != NULL); vm_page_zero_idle_wakeup(); vm_page_free_wakeup(); @@ -2736,15 +2731,18 @@ vm_page_free_wakeup(void) } /* - * vm_page_free_toq: + * vm_page_free_prep: * - * Returns the given page to the free list, - * disassociating it with any VM object. + * Prepares the given page to be put on the free list, + * disassociating it from any VM object. The caller may return + * the page to the free list only if this function returns true. * - * The object must be locked. The page must be locked if it is managed. + * The object must be locked. The page must be locked if it is + * managed. For a queued managed page, the pagequeue_locked + * argument specifies whether the page queue is already locked. */ -void -vm_page_free_toq(vm_page_t m) +bool +vm_page_free_prep(vm_page_t m, bool pagequeue_locked) { if ((m->oflags & VPO_UNMANAGED) == 0) { @@ -2765,16 +2763,20 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - vm_page_remque(m); + if (m->queue != PQ_NONE) { + if (pagequeue_locked) + vm_page_dequeue_locked(m); + else + vm_page_dequeue(m); + } vm_page_remove(m); /* * If fictitious remove object association and * return, otherwise delay object association removal. */ - if ((m->flags & PG_FICTITIOUS) != 0) { - return; - } + if ((m->flags & PG_FICTITIOUS) != 0) + return (false); m->valid = 0; vm_page_undirty(m); @@ -2786,32 +2788,70 @@ vm_page_free_toq(vm_page_t m) KASSERT((m->flags & PG_UNHOLDFREE) == 0, ("vm_page_free: freeing PG_UNHOLDFREE page %p", m)); m->flags |= PG_UNHOLDFREE; - } else { - /* - * Restore the default memory attribute to the page. - */ - if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) - pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + return (false); + } - /* - * Insert the page into the physical memory allocator's free - * page queues. - */ - mtx_lock(&vm_page_queue_free_mtx); - vm_phys_freecnt_adj(m, 1); + /* + * Restore the default memory attribute to the page. + */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + + return (true); +} + +/* + * Insert the page into the physical memory allocator's free page + * queues. This is the last step to free a page. + */ +static void +vm_page_free_phys(vm_page_t m) +{ + + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + + vm_phys_freecnt_adj(m, 1); #if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (TRUE) + if (!vm_reserv_free_page(m)) #endif vm_phys_free_pages(m, 0); - if ((m->flags & PG_ZERO) != 0) - ++vm_page_zero_count; - else - vm_page_zero_idle_wakeup(); - vm_page_free_wakeup(); - mtx_unlock(&vm_page_queue_free_mtx); - } + if ((m->flags & PG_ZERO) != 0) + ++vm_page_zero_count; + else + vm_page_zero_idle_wakeup(); +} + +void +vm_page_free_phys_pglist(struct pglist *tq) +{ + vm_page_t m; + + mtx_lock(&vm_page_queue_free_mtx); + TAILQ_FOREACH(m, tq, listq) + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); +} + +/* + * vm_page_free_toq: + * + * Returns the given page to the free list, disassociating it + * from any VM object. + * + * The object must be locked. The page must be locked if it is + * managed. + */ +void +vm_page_free_toq(vm_page_t m) +{ + + if (!vm_page_free_prep(m, false)) + return; + mtx_lock(&vm_page_queue_free_mtx); + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); } /* Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Wed Sep 20 08:51:03 2017 (r323800) +++ stable/11/sys/vm/vm_page.h Wed Sep 20 09:11:27 2017 (r323801) @@ -465,6 +465,8 @@ void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); void vm_page_dequeue_locked(vm_page_t m); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); +void vm_page_free_phys_pglist(struct pglist *tq); +bool vm_page_free_prep(vm_page_t m, bool pagequeue_locked); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); From owner-svn-src-stable-11@freebsd.org Wed Sep 20 09:17:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFCE1E049F7; Wed, 20 Sep 2017 09:17: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 9C5576375B; Wed, 20 Sep 2017 09:17: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 v8K9HmLV052787; Wed, 20 Sep 2017 09:17:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9Hmve052786; Wed, 20 Sep 2017 09:17:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200917.v8K9Hmve052786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:17: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: r323802 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:17:49 -0000 Author: kib Date: Wed Sep 20 09:17:48 2017 New Revision: 323802 URL: https://svnweb.freebsd.org/changeset/base/323802 Log: MFC r321330 (by br): Style. Modified: stable/11/sys/vm/vm_object.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 09:11:27 2017 (r323801) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 09:17:48 2017 (r323802) @@ -176,11 +176,11 @@ struct vm_object { #define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */ #define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */ #define OBJ_POPULATE 0x0004 /* pager implements populate() */ -#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ +#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ #define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ -#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ -#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ +#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ +#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ #define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ #define OBJ_COLORED 0x1000 /* pg_color is defined */ From owner-svn-src-stable-11@freebsd.org Wed Sep 20 09:22:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8204E04DE5; Wed, 20 Sep 2017 09:22: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 91DD063B5C; Wed, 20 Sep 2017 09:22: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 v8K9MlfU056748; Wed, 20 Sep 2017 09:22:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9Mlv2056746; Wed, 20 Sep 2017 09:22:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200922.v8K9Mlv2056746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:22: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: r323803 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:22:48 -0000 Author: kib Date: Wed Sep 20 09:22:47 2017 New Revision: 323803 URL: https://svnweb.freebsd.org/changeset/base/323803 Log: MFC r322571 (by br): Add OBJ_PG_DTOR flag to VM object. Modified: stable/11/sys/vm/vm_object.c stable/11/sys/vm/vm_object.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Wed Sep 20 09:17:48 2017 (r323802) +++ stable/11/sys/vm/vm_object.c Wed Sep 20 09:22:47 2017 (r323803) @@ -706,6 +706,54 @@ vm_object_destroy(vm_object_t object) } /* + * vm_object_terminate_pages removes any remaining pageable pages + * from the object and resets the object to an empty state. + */ +static void +vm_object_terminate_pages(vm_object_t object) +{ + vm_page_t p, p_next; + + VM_OBJECT_ASSERT_WLOCKED(object); + + /* + * Free any remaining pageable pages. This also removes them from the + * paging queues. However, don't free wired pages, just remove them + * from the object. Rather than incrementally removing each page from + * the object, the page and object are reset to any empty state. + */ + TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { + vm_page_assert_unbusied(p); + vm_page_lock(p); + /* + * Optimize the page's removal from the object by resetting + * its "object" field. Specifically, if the page is not + * wired, then the effect of this assignment is that + * vm_page_free()'s call to vm_page_remove() will return + * immediately without modifying the page or the object. + */ + p->object = NULL; + if (p->wire_count == 0) { + vm_page_free(p); + PCPU_INC(cnt.v_pfree); + } + vm_page_unlock(p); + } + /* + * If the object contained any pages, then reset it to an empty state. + * None of the object's fields, including "resident_page_count", were + * modified by the preceding loop. + */ + if (object->resident_page_count != 0) { + vm_radix_reclaim_allnodes(&object->rtree); + TAILQ_INIT(&object->memq); + object->resident_page_count = 0; + if (object->type == OBJT_VNODE) + vdrop(object->handle); + } +} + +/* * vm_object_terminate actually destroys the specified object, freeing * up all previously used resources. * @@ -715,7 +763,6 @@ vm_object_destroy(vm_object_t object) void vm_object_terminate(vm_object_t object) { - vm_page_t p, p_next; VM_OBJECT_ASSERT_WLOCKED(object); @@ -758,41 +805,8 @@ vm_object_terminate(vm_object_t object) ("vm_object_terminate: object with references, ref_count=%d", object->ref_count)); - /* - * Free any remaining pageable pages. This also removes them from the - * paging queues. However, don't free wired pages, just remove them - * from the object. Rather than incrementally removing each page from - * the object, the page and object are reset to any empty state. - */ - TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { - vm_page_assert_unbusied(p); - vm_page_lock(p); - /* - * Optimize the page's removal from the object by resetting - * its "object" field. Specifically, if the page is not - * wired, then the effect of this assignment is that - * vm_page_free()'s call to vm_page_remove() will return - * immediately without modifying the page or the object. - */ - p->object = NULL; - if (p->wire_count == 0) { - vm_page_free(p); - PCPU_INC(cnt.v_pfree); - } - vm_page_unlock(p); - } - /* - * If the object contained any pages, then reset it to an empty state. - * None of the object's fields, including "resident_page_count", were - * modified by the preceding loop. - */ - if (object->resident_page_count != 0) { - vm_radix_reclaim_allnodes(&object->rtree); - TAILQ_INIT(&object->memq); - object->resident_page_count = 0; - if (object->type == OBJT_VNODE) - vdrop(object->handle); - } + if ((object->flags & OBJ_PG_DTOR) == 0) + vm_object_terminate_pages(object); #if VM_NRESERVLEVEL > 0 if (__predict_false(!LIST_EMPTY(&object->rvq))) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 09:17:48 2017 (r323802) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 09:22:47 2017 (r323803) @@ -180,6 +180,7 @@ struct vm_object { #define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ +#define OBJ_PG_DTOR 0x0080 /* dont reset object, leave that for dtor */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ #define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ From owner-svn-src-stable-11@freebsd.org Wed Sep 20 09:29:04 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9745E052CC; Wed, 20 Sep 2017 09:29:04 +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 941F063FCF; Wed, 20 Sep 2017 09:29:04 +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 v8K9T3bE057183; Wed, 20 Sep 2017 09:29:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9T30i057182; Wed, 20 Sep 2017 09:29:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200929.v8K9T30i057182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:29:03 +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: r323804 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:29:04 -0000 Author: kib Date: Wed Sep 20 09:29:03 2017 New Revision: 323804 URL: https://svnweb.freebsd.org/changeset/base/323804 Log: MFC r323561: Do not relock free queue mutex for each page, free whole terminating object' page queue under the single mutex lock. Modified: stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Wed Sep 20 09:22:47 2017 (r323803) +++ stable/11/sys/vm/vm_object.c Wed Sep 20 09:29:03 2017 (r323804) @@ -713,9 +713,14 @@ static void vm_object_terminate_pages(vm_object_t object) { vm_page_t p, p_next; + struct mtx *mtx, *mtx1; + struct vm_pagequeue *pq, *pq1; VM_OBJECT_ASSERT_WLOCKED(object); + mtx = NULL; + pq = NULL; + /* * Free any remaining pageable pages. This also removes them from the * paging queues. However, don't free wired pages, just remove them @@ -724,21 +729,51 @@ vm_object_terminate_pages(vm_object_t object) */ TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { vm_page_assert_unbusied(p); - vm_page_lock(p); - /* - * Optimize the page's removal from the object by resetting - * its "object" field. Specifically, if the page is not - * wired, then the effect of this assignment is that - * vm_page_free()'s call to vm_page_remove() will return - * immediately without modifying the page or the object. - */ + if ((object->flags & OBJ_UNMANAGED) == 0) { + /* + * vm_page_free_prep() only needs the page + * lock for managed pages. + */ + mtx1 = vm_page_lockptr(p); + if (mtx1 != mtx) { + if (mtx != NULL) + mtx_unlock(mtx); + if (pq != NULL) { + vm_pagequeue_unlock(pq); + pq = NULL; + } + mtx = mtx1; + mtx_lock(mtx); + } + } p->object = NULL; - if (p->wire_count == 0) { - vm_page_free(p); - PCPU_INC(cnt.v_pfree); + if (p->wire_count != 0) + goto unlist; + PCPU_INC(cnt.v_pfree); + p->flags &= ~PG_ZERO; + if (p->queue != PQ_NONE) { + KASSERT(p->queue < PQ_COUNT, ("vm_object_terminate: " + "page %p is not queued", p)); + pq1 = vm_page_pagequeue(p); + if (pq != pq1) { + if (pq != NULL) + vm_pagequeue_unlock(pq); + pq = pq1; + vm_pagequeue_lock(pq); + } } - vm_page_unlock(p); + if (vm_page_free_prep(p, true)) + continue; +unlist: + TAILQ_REMOVE(&object->memq, p, listq); } + if (pq != NULL) + vm_pagequeue_unlock(pq); + if (mtx != NULL) + mtx_unlock(mtx); + + vm_page_free_phys_pglist(&object->memq); + /* * If the object contained any pages, then reset it to an empty state. * None of the object's fields, including "resident_page_count", were From owner-svn-src-stable-11@freebsd.org Wed Sep 20 09:31:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20BD1E0543B; Wed, 20 Sep 2017 09:31: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 E46D2642C8; Wed, 20 Sep 2017 09:31:17 +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 v8K9VHkx059457; Wed, 20 Sep 2017 09:31:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9VHg5059456; Wed, 20 Sep 2017 09:31:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200931.v8K9VHg5059456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:31: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: r323805 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:31:18 -0000 Author: kib Date: Wed Sep 20 09:31:16 2017 New Revision: 323805 URL: https://svnweb.freebsd.org/changeset/base/323805 Log: MFC r323562: Remove inline specifier from vm_page_free_wakeup(), do not micro-manage compiler. 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 Sep 20 09:29:03 2017 (r323804) +++ stable/11/sys/vm/vm_page.c Wed Sep 20 09:31:16 2017 (r323805) @@ -2705,7 +2705,7 @@ vm_page_activate(vm_page_t m) * * The page queues must be locked. */ -static inline void +static void vm_page_free_wakeup(void) { From owner-svn-src-stable-11@freebsd.org Wed Sep 20 14:42:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3731E115C4; Wed, 20 Sep 2017 14:42:22 +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 9F5846DCF0; Wed, 20 Sep 2017 14:42:22 +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 v8KEgLb0090438; Wed, 20 Sep 2017 14:42:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KEgLl0090436; Wed, 20 Sep 2017 14:42:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709201442.v8KEgLl0090436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Sep 2017 14:42: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: r323808 - in stable/11/sys/dev/usb: . quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . quirk X-SVN-Commit-Revision: 323808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:42:22 -0000 Author: hselasky Date: Wed Sep 20 14:42:21 2017 New Revision: 323808 URL: https://svnweb.freebsd.org/changeset/base/323808 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221328 PR: 221775 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 10:24:45 2017 (r323807) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:42:21 2017 (r323808) @@ -335,7 +335,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, - UQ_MSC_NO_SYNC_CACHE), + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), @@ -509,6 +509,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(ROLAND, PCR300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(EGO, M4U, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(LOGILINK, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY), Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Wed Sep 20 10:24:45 2017 (r323807) +++ stable/11/sys/dev/usb/usbdevs Wed Sep 20 14:42:21 2017 (r323808) @@ -3866,6 +3866,7 @@ product ROLAND UM550 0x0023 UM-550 MIDI I/F product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F +product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-stable-11@freebsd.org Wed Sep 20 16:31:07 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF850E15EB9; Wed, 20 Sep 2017 16:31:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA1D171076; Wed, 20 Sep 2017 16:31:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KGV6m3031689; Wed, 20 Sep 2017 16:31:06 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KGV6xH031685; Wed, 20 Sep 2017 16:31:06 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201709201631.v8KGV6xH031685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 20 Sep 2017 16:31:06 +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: r323814 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/funcs lib/libdtrace X-SVN-Group: stable-11 X-SVN-Commit-Author: gnn X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/funcs lib/libdtrace X-SVN-Commit-Revision: 323814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 16:31:08 -0000 Author: gnn Date: Wed Sep 20 16:31:06 2017 New Revision: 323814 URL: https://svnweb.freebsd.org/changeset/base/323814 Log: MFC: 323253, 323499 Add D definitions for the named values in socket.h (gnn@) Fix DTrace test tst_inet_ntop_d: remove definitions are already in libdtrace (lwhsu@) Added: stable/11/cddl/lib/libdtrace/socket.d - copied unchanged from r323253, head/cddl/lib/libdtrace/socket.d Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d stable/11/cddl/lib/libdtrace/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Wed Sep 20 16:31:00 2017 (r323813) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Wed Sep 20 16:31:06 2017 (r323814) @@ -28,9 +28,6 @@ #pragma D option quiet -inline int AF_INET = 2; -inline int AF_INET6 = 28; - in_addr_t *ip4a; in_addr_t *ip4b; in_addr_t *ip4c; Modified: stable/11/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/11/cddl/lib/libdtrace/Makefile Wed Sep 20 16:31:00 2017 (r323813) +++ stable/11/cddl/lib/libdtrace/Makefile Wed Sep 20 16:31:06 2017 (r323814) @@ -53,6 +53,7 @@ DSRCS= errno.d \ siftr.d \ signal.d \ tcp.d \ + socket.d \ udp.d \ unistd.d Copied: stable/11/cddl/lib/libdtrace/socket.d (from r323253, head/cddl/lib/libdtrace/socket.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/lib/libdtrace/socket.d Wed Sep 20 16:31:06 2017 (r323814, copy of r323253, head/cddl/lib/libdtrace/socket.d) @@ -0,0 +1,301 @@ +/* + * Copyright (c) 2017 George V. Neville-Neil + * 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$ + * + * Translators and flags for the socket structure. FreeBSD specific code. + */ + +#pragma D depends_on module kernel + +/* + * Option flags per-socket. + */ +#pragma D binding "1.13" SO_DEBUG +inline int SO_DEBUG = 0x0001; /* turn on debugging info recording */ +#pragma D binding "1.13" SO_ACCEPTCONN +inline int SO_ACCEPTCONN = 0x0002; /* socket has had listen() */ +#pragma D binding "1.13" SO_REUSEADDR +inline int SO_REUSEADDR = 0x0004; /* allow local address reuse */ +#pragma D binding "1.13" SO_KEEPALIVE +inline int SO_KEEPALIVE = 0x0008; /* keep connections alive */ +#pragma D binding "1.13" SO_DONTROUTE +inline int SO_DONTROUTE = 0x0010; /* just use interface addresses */ +#pragma D binding "1.13" SO_BROADCAST +inline int SO_BROADCAST = 0x0020; /* permit sending of broadcast msgs */ +#pragma D binding "1.13" SO_USELOOPBACK +inline int SO_USELOOPBACK = 0x0040; /* bypass hardware when possible */ +#pragma D binding "1.13" SO_LINGER +inline int SO_LINGER = 0x0080; /* linger on close if data present */ +#pragma D binding "1.13" SO_OOBINLINE +inline int SO_OOBINLINE = 0x0100; /* leave received OOB data in line */ +#pragma D binding "1.13" SO_REUSEPORT +inline int SO_REUSEPORT = 0x0200; /* allow local address & port reuse */ +#pragma D binding "1.13" SO_TIMESTAMP +inline int SO_TIMESTAMP = 0x0400; /* timestamp received dgram traffic */ +#pragma D binding "1.13" SO_NOSIGPIPE +inline int SO_NOSIGPIPE = 0x0800; /* no SIGPIPE from EPIPE */ +#pragma D binding "1.13" SO_ACCEPTFILTER +inline int SO_ACCEPTFILTER = 0x1000; /* there is an accept filter */ +#pragma D binding "1.13" SO_BINTIME +inline int SO_BINTIME = 0x2000; /* timestamp received dgram traffic */ +#pragma D binding "1.13" SO_NO_OFFLOAD +inline int SO_NO_OFFLOAD = 0x4000; /* socket cannot be offloaded */ +#pragma D binding "1.13" SO_NO_DDP +inline int SO_NO_DDP = 0x8000; /* disable direct data placement */ + +/* + * Additional options, not kept in so_options. + */ +#pragma D binding "1.13" SO_SNDBUF +inline int SO_SNDBUF = 0x1001; /* send buffer size */ +#pragma D binding "1.13" SO_RCVBUF +inline int SO_RCVBUF = 0x1002; /* receive buffer size */ +#pragma D binding "1.13" SO_SNDLOWAT +inline int SO_SNDLOWAT = 0x1003; /* send low-water mark */ +#pragma D binding "1.13" SO_RCVLOWAT +inline int SO_RCVLOWAT = 0x1004; /* receive low-water mark */ +#pragma D binding "1.13" SO_SNDTIMEO +inline int SO_SNDTIMEO = 0x1005; /* send timeout */ +#pragma D binding "1.13" SO_RCVTIMEO +inline int SO_RCVTIMEO = 0x1006; /* receive timeout */ +#pragma D binding "1.13" SO_ERROR +inline int SO_ERROR = 0x1007; /* get error status and clear */ +#pragma D binding "1.13" SO_TYPE +inline int SO_TYPE = 0x1008; /* get socket type */ +#pragma D binding "1.13" SO_LABEL +inline int SO_LABEL = 0x1009; /* socket's MAC label */ +#pragma D binding "1.13" SO_PEERLABEL +inline int SO_PEERLABEL = 0x1010; /* socket's peer's MAC label */ +#pragma D binding "1.13" SO_LISTENQLIMIT +inline int SO_LISTENQLIMIT = 0x1011; /* socket's backlog limit */ +#pragma D binding "1.13" SO_LISTENQLEN +inline int SO_LISTENQLEN = 0x1012; /* socket's complete queue length */ +#pragma D binding "1.13" SO_LISTENINCQLEN +inline int SO_LISTENINCQLEN = 0x1013; /* socket's incomplete queue length */ +#pragma D binding "1.13" SO_SETFIB +inline int SO_SETFIB = 0x1014; /* use this FIB to route */ +#pragma D binding "1.13" SO_USER_COOKIE +inline int SO_USER_COOKIE = 0x1015; /* user cookie (dummynet etc.) */ +#pragma D binding "1.13" SO_PROTOCOL +inline int SO_PROTOCOL = 0x1016; /* get socket protocol (Linux name) */ +#pragma D binding "1.13" SO_PROTOTYPE +inline int SO_PROTOTYPE = SO_PROTOCOL; /* alias for SO_PROTOCOL (SunOS name) */ +#pragma D binding "1.13" SO_TS_CLOCK +inline int SO_TS_CLOCK = 0x1017; /* clock type used for SO_TIMESTAMP */ +#pragma D binding "1.13" SO_MAX_PACING_RATE +inline int SO_MAX_PACING_RATE = 0x1018; /* socket's max TX pacing rate (Linux name) */ + +#pragma D binding "1.13" SO_TS_REALTIME_MICRO +inline int SO_TS_REALTIME_MICRO = 0; /* microsecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_BINTIME +inline int SO_TS_BINTIME = 1; /* sub-nanosecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_REALTIME +inline int SO_TS_REALTIME = 2; /* nanosecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_MONOTONIC +inline int SO_TS_MONOTONIC = 3; /* nanosecond resolution, monotonic */ +#pragma D binding "1.13" SO_TS_DEFAULT +inline int SO_TS_DEFAULT = SO_TS_REALTIME_MICRO; +#pragma D binding "1.13" SO_TS_CLOCK_MAX +inline int SO_TS_CLOCK_MAX = SO_TS_MONOTONIC; + +#pragma D binding "1.13" AF_UNSPEC +inline int AF_UNSPEC = 0; /* unspecified */ +#pragma D binding "1.13" AF_UNIX +inline int AF_UNIX = 1; /* standardized name for AF_LOCAL */ +#pragma D binding "1.13" AF_LOCAL +inline int AF_LOCAL = AF_UNIX; /* local to host (pipes, portals) */ +#pragma D binding "1.13" AF_INET +inline int AF_INET = 2; /* internetwork: UDP, TCP, etc. */ +#pragma D binding "1.13" AF_IMPLINK +inline int AF_IMPLINK = 3; /* arpanet imp addresses */ +#pragma D binding "1.13" AF_PUP +inline int AF_PUP = 4; /* pup protocols: e.g. BSP */ +#pragma D binding "1.13" AF_CHAOS +inline int AF_CHAOS = 5; /* mit CHAOS protocols */ +#pragma D binding "1.13" AF_NETBIOS +inline int AF_NETBIOS = 6; /* SMB protocols */ +#pragma D binding "1.13" AF_ISO +inline int AF_ISO = 7; /* ISO protocols */ +#pragma D binding "1.13" AF_OSI +inline int AF_OSI = AF_ISO; +#pragma D binding "1.13" AF_ECMA +inline int AF_ECMA = 8; /* European computer manufacturers */ +#pragma D binding "1.13" AF_DATAKIT +inline int AF_DATAKIT = 9; /* datakit protocols */ +#pragma D binding "1.13" AF_CCITT +inline int AF_CCITT = 10; /* CCITT protocols, X.25 etc */ +#pragma D binding "1.13" AF_SNA +inline int AF_SNA = 11; /* IBM SNA */ +#pragma D binding "1.13" AF_DECnet +inline int AF_DECnet = 12; /* DECnet */ +#pragma D binding "1.13" AF_DLI +inline int AF_DLI = 13; /* DEC Direct data link interface */ +#pragma D binding "1.13" AF_LAT +inline int AF_LAT = 14; /* LAT */ +#pragma D binding "1.13" AF_HYLINK +inline int AF_HYLINK = 15; /* NSC Hyperchannel */ +#pragma D binding "1.13" AF_APPLETALK +inline int AF_APPLETALK = 16; /* Apple Talk */ +#pragma D binding "1.13" AF_ROUTE +inline int AF_ROUTE = 17; /* Internal Routing Protocol */ +#pragma D binding "1.13" AF_LINK +inline int AF_LINK = 18; /* Link layer interface */ +#pragma D binding "1.13" pseudo_AF_XTP +inline int pseudo_AF_XTP = 19; /* eXpress Transfer Protocol (no AF) */ +#pragma D binding "1.13" AF_COIP +inline int AF_COIP = 20; /* connection-oriented IP, aka ST II */ +#pragma D binding "1.13" AF_CNT +inline int AF_CNT = 21; /* Computer Network Technology */ +#pragma D binding "1.13" pseudo_AF_RTIP +inline int pseudo_AF_RTIP = 22; /* Help Identify RTIP packets */ +#pragma D binding "1.13" AF_IPX +inline int AF_IPX = 23; /* Novell Internet Protocol */ +#pragma D binding "1.13" AF_SIP +inline int AF_SIP = 24; /* Simple Internet Protocol */ +#pragma D binding "1.13" pseudo_AF_PIP +inline int pseudo_AF_PIP = 25; /* Help Identify PIP packets */ +#pragma D binding "1.13" AF_ISDN +inline int AF_ISDN = 26; /* Integrated Services Digital Network*/ +#pragma D binding "1.13" AF_E164 +inline int AF_E164 = AF_ISDN; /* CCITT E.164 recommendation */ +#pragma D binding "1.13" pseudo_AF_KEY +inline int pseudo_AF_KEY = 27; /* Internal key-management function */ +#pragma D binding "1.13" AF_INET6 +inline int AF_INET6 = 28; /* IPv6 */ +#pragma D binding "1.13" AF_NATM +inline int AF_NATM = 29; /* native ATM access */ +#pragma D binding "1.13" AF_ATM +inline int AF_ATM = 30; /* ATM */ +#pragma D binding "1.13" pseudo_AF_HDRCMPLT +inline int pseudo_AF_HDRCMPLT = 31; /* Used by BPF to not rewrite headers + * in interface output routine + */ +#pragma D binding "1.13" AF_NETGRAPH +inline int AF_NETGRAPH = 32; /* Netgraph sockets */ +#pragma D binding "1.13" AF_SLOW +inline int AF_SLOW = 33; /* 802.3ad slow protocol */ +#pragma D binding "1.13" AF_SCLUSTER +inline int AF_SCLUSTER = 34; /* Sitara cluster protocol */ +#pragma D binding "1.13" AF_ARP +inline int AF_ARP = 35; /* Address Resolution Protocol */ +#pragma D binding "1.13" AF_BLUETOOTH +inline int AF_BLUETOOTH = 36; /* Bluetooth sockets */ +#pragma D binding "1.13" AF_IEEE80211 +inline int AF_IEEE80211 = 37; /* IEEE 802.11 protocol */ +#pragma D binding "1.13" AF_INET_SDP +inline int AF_INET_SDP = 40; /* OFED Socket Direct Protocol ipv4 */ +#pragma D binding "1.13" AF_INET6_SDP +inline int AF_INET6_SDP = 42; /* OFED Socket Direct Protocol ipv6 */ +#pragma D binding "1.13" AF_MAX +inline int AF_MAX = 42; + +/* + * Protocol families, same as address families for now. + */ +#pragma D binding "1.13" PF_UNSPEC +inline int PF_UNSPEC = AF_UNSPEC; +#pragma D binding "1.13" PF_LOCAL +inline int PF_LOCAL = AF_LOCAL; +#pragma D binding "1.13" PF_UNIX +inline int PF_UNIX = PF_LOCAL; /* backward compatibility */ +#pragma D binding "1.13" PF_INET +inline int PF_INET = AF_INET; +#pragma D binding "1.13" PF_IMPLINK +inline int PF_IMPLINK = AF_IMPLINK; +#pragma D binding "1.13" PF_PUP +inline int PF_PUP = AF_PUP; +#pragma D binding "1.13" PF_CHAOS +inline int PF_CHAOS = AF_CHAOS; +#pragma D binding "1.13" PF_NETBIOS +inline int PF_NETBIOS = AF_NETBIOS; +#pragma D binding "1.13" PF_ISO +inline int PF_ISO = AF_ISO; +#pragma D binding "1.13" PF_OSI +inline int PF_OSI = AF_ISO; +#pragma D binding "1.13" PF_ECMA +inline int PF_ECMA = AF_ECMA; +#pragma D binding "1.13" PF_DATAKIT +inline int PF_DATAKIT = AF_DATAKIT; +#pragma D binding "1.13" PF_CCITT +inline int PF_CCITT = AF_CCITT; +#pragma D binding "1.13" PF_SNA +inline int PF_SNA = AF_SNA; +#pragma D binding "1.13" PF_DECnet +inline int PF_DECnet = AF_DECnet; +#pragma D binding "1.13" PF_DLI +inline int PF_DLI = AF_DLI; +#pragma D binding "1.13" PF_LAT +inline int PF_LAT = AF_LAT; +#pragma D binding "1.13" PF_HYLINK +inline int PF_HYLINK = AF_HYLINK; +#pragma D binding "1.13" PF_APPLETALK +inline int PF_APPLETALK = AF_APPLETALK; +#pragma D binding "1.13" PF_ROUTE +inline int PF_ROUTE = AF_ROUTE; +#pragma D binding "1.13" PF_LINK +inline int PF_LINK = AF_LINK; +#pragma D binding "1.13" PF_XTP +inline int PF_XTP = pseudo_AF_XTP; /* really just proto family, no AF */ +#pragma D binding "1.13" PF_COIP +inline int PF_COIP = AF_COIP; +#pragma D binding "1.13" PF_CNT +inline int PF_CNT = AF_CNT; +#pragma D binding "1.13" PF_SIP +inline int PF_SIP = AF_SIP; +#pragma D binding "1.13" PF_IPX +inline int PF_IPX = AF_IPX; +#pragma D binding "1.13" PF_RTIP +inline int PF_RTIP = pseudo_AF_RTIP; /* same format as AF_INET */ +#pragma D binding "1.13" PF_PIP +inline int PF_PIP = pseudo_AF_PIP; +#pragma D binding "1.13" PF_ISDN +inline int PF_ISDN = AF_ISDN; +#pragma D binding "1.13" PF_KEY +inline int PF_KEY = pseudo_AF_KEY; +#pragma D binding "1.13" PF_INET6 +inline int PF_INET6 = AF_INET6; +#pragma D binding "1.13" PF_NATM +inline int PF_NATM = AF_NATM; +#pragma D binding "1.13" PF_ATM +inline int PF_ATM = AF_ATM; +#pragma D binding "1.13" PF_NETGRAPH +inline int PF_NETGRAPH = AF_NETGRAPH; +#pragma D binding "1.13" PF_SLOW +inline int PF_SLOW = AF_SLOW; +#pragma D binding "1.13" PF_SCLUSTER +inline int PF_SCLUSTER = AF_SCLUSTER; +#pragma D binding "1.13" PF_ARP +inline int PF_ARP = AF_ARP; +#pragma D binding "1.13" PF_BLUETOOTH +inline int PF_BLUETOOTH = AF_BLUETOOTH; +#pragma D binding "1.13" PF_IEEE80211 +inline int PF_IEEE80211 = AF_IEEE80211; +#pragma D binding "1.13" PF_INET_SDP +inline int PF_INET_SDP= AF_INET_SDP; +#pragma D binding "1.13" PF_INET6_SDP +inline int PF_INET6_SDP= AF_INET6_SDP; +#pragma D binding "1.13" PF_MAX +inline int PF_MAX = AF_MAX; From owner-svn-src-stable-11@freebsd.org Wed Sep 20 17:09:06 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75A3CE1842D; Wed, 20 Sep 2017 17:09:06 +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 40B3773725; Wed, 20 Sep 2017 17:09:06 +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 v8KH953f050653; Wed, 20 Sep 2017 17:09:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KH95s4050651; Wed, 20 Sep 2017 17:09:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201709.v8KH95s4050651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:09:05 +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: r323815 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:09:06 -0000 Author: gjb Date: Wed Sep 20 17:09:04 2017 New Revision: 323815 URL: https://svnweb.freebsd.org/changeset/base/323815 Log: MFC r323812: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/arm.subr stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/arm.subr stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/11/release/tools/arm.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/11/release/tools/vmimage.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -122,6 +122,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo "/dev/${ROOTLABEL}/rootfs / ufs rw 1 1" \ From owner-svn-src-stable-11@freebsd.org Wed Sep 20 17:15:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7417E18A5C; Wed, 20 Sep 2017 17:15:59 +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 8B7F673CAD; Wed, 20 Sep 2017 17:15:59 +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 v8KHFwmL054503; Wed, 20 Sep 2017 17:15:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHFwxw054502; Wed, 20 Sep 2017 17:15:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201715.v8KHFwxw054502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:15: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: r323816 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 323816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:15:59 -0000 Author: gjb Date: Wed Sep 20 17:15:58 2017 New Revision: 323816 URL: https://svnweb.freebsd.org/changeset/base/323816 Log: MFC r323557: Remove an unneeded sentence stop. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man4/siba.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/siba.4 ============================================================================== --- stable/11/share/man/man4/siba.4 Wed Sep 20 17:09:04 2017 (r323815) +++ stable/11/share/man/man4/siba.4 Wed Sep 20 17:15:58 2017 (r323816) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2016 +.Dd September 13, 2017 .Dt SIBA 4 .Os .Sh NAME @@ -75,7 +75,7 @@ The device driver first appeared in .Fx 8.0 . The driver was rewritten for -.Fx 11.0 . +.Fx 11.0 to support the common Broadcom .Xr bhnd 4 bus interface. From owner-svn-src-stable-11@freebsd.org Wed Sep 20 17:49:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9EDE1A314; Wed, 20 Sep 2017 17:49:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6951874E9F; Wed, 20 Sep 2017 17:49:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KHnvmx066970; Wed, 20 Sep 2017 17:49:57 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHnvZ3066965; Wed, 20 Sep 2017 17:49:57 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201709201749.v8KHnvZ3066965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 20 Sep 2017 17:49: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: r323819 - stable/11/sys/dev/mrsas X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/11/sys/dev/mrsas X-SVN-Commit-Revision: 323819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:49:58 -0000 Author: jkim Date: Wed Sep 20 17:49:57 2017 New Revision: 323819 URL: https://svnweb.freebsd.org/changeset/base/323819 Log: MFC: r309284-r309294 (kadesai) r309294 This patch upgrades driver version to 06.712.04.00-fbsd r309293 This patch will add code to refire IOCTL commands after OCR. r309292 This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. r309291 Wait for AEN task to be completed(if in queue) before resetting the controller and return without processing event in AEN thread, if controller reset is in progress. r309290 This patch will add task management support in driver. Below is high level description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. r309289 Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR. r309288 Clean up reference to AEN command if abort AEN is succesful as the command is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. r309287 Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved. r309286 Add sanity check in IO and IOCTL path not to process command further if controller is in HW_CRITICAL_ERROR. r309285 Use a variable to indicate Gen3 controllers and remove all PCI ids based checks used for gen3 controllers. r309284 High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list. Modified: stable/11/sys/dev/mrsas/mrsas.c stable/11/sys/dev/mrsas/mrsas.h stable/11/sys/dev/mrsas/mrsas_cam.c stable/11/sys/dev/mrsas/mrsas_fp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mrsas/mrsas.c ============================================================================== --- stable/11/sys/dev/mrsas/mrsas.c Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas.c Wed Sep 20 17:49:57 2017 (r323819) @@ -110,6 +110,7 @@ int mrsas_issue_polled(struct mrsas_softc *sc, struct int mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t reset_reason); int mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_int8_t check_reason); int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); +int mrsas_reset_targets(struct mrsas_softc *sc); int mrsas_issue_blocked_cmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); @@ -153,7 +154,6 @@ extern void mrsas_cam_detach(struct mrsas_softc *sc); extern void mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd); extern void mrsas_free_frame(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); extern int mrsas_alloc_mfi_cmds(struct mrsas_softc *sc); -extern void mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd); extern struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_softc *sc); extern int mrsas_passthru(struct mrsas_softc *sc, void *arg, u_long ioctlCmd); extern uint8_t MR_ValidateMapInfo(struct mrsas_softc *sc); @@ -307,28 +307,11 @@ mrsas_enable_intr(struct mrsas_softc *sc) static int mrsas_clear_intr(struct mrsas_softc *sc) { - u_int32_t status, fw_status, fw_state; + u_int32_t status; /* Read received interrupt */ status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - /* - * If FW state change interrupt is received, write to it again to - * clear - */ - if (status & MRSAS_FW_STATE_CHNG_INTERRUPT) { - fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, - outbound_scratch_pad)); - fw_state = fw_status & MFI_STATE_MASK; - if (fw_state == MFI_STATE_FAULT) { - device_printf(sc->mrsas_dev, "FW is in FAULT state!\n"); - if (sc->ocr_thread_active) - wakeup(&sc->ocr_chan); - } - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), status); - mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - return (1); - } /* Not our interrupt, so just return */ if (!(status & MFI_FUSION_ENABLE_INTERRUPT_MASK)) return (0); @@ -449,6 +432,11 @@ mrsas_setup_sysctl(struct mrsas_softc *sc) OID_AUTO, "reset_in_progress", CTLFLAG_RD, &sc->reset_in_progress, 0, "ocr in progress status"); + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "block_sync_cache", CTLFLAG_RW, + &sc->block_sync_cache, 0, + "Block SYNC CACHE at driver. "); + } /* @@ -468,6 +456,7 @@ mrsas_get_tunables(struct mrsas_softc *sc) sc->mrsas_fw_fault_check_delay = 1; sc->reset_count = 0; sc->reset_in_progress = 0; + sc->block_sync_cache = 0; /* * Grab the global variables. @@ -674,16 +663,15 @@ mrsas_register_aen(struct mrsas_softc *sc, u_int32_t s sc->aen_cmd); if (ret_val) { - printf("mrsas: Failed to abort " - "previous AEN command\n"); + printf("mrsas: Failed to abort previous AEN command\n"); return ret_val; - } + } else + sc->aen_cmd = NULL; } } cmd = mrsas_get_mfi_cmd(sc); - if (!cmd) - return -ENOMEM; + return ENOMEM; dcmd = &cmd->frame->dcmd; @@ -835,6 +823,15 @@ mrsas_attach(device_t dev) sc->mrsas_dev = dev; sc->device_id = pci_get_device(dev); + if ((sc->device_id == MRSAS_INVADER) || + (sc->device_id == MRSAS_FURY) || + (sc->device_id == MRSAS_INTRUDER) || + (sc->device_id == MRSAS_INTRUDER_24) || + (sc->device_id == MRSAS_CUTLASS_52) || + (sc->device_id == MRSAS_CUTLASS_53)) { + sc->mrsas_gen3_ctrl = 1; + } + mrsas_get_tunables(sc); /* @@ -875,6 +872,7 @@ mrsas_attach(device_t dev) TAILQ_INIT(&sc->mrsas_mfi_cmd_list_head); mrsas_atomic_set(&sc->fw_outstanding, 0); + mrsas_atomic_set(&sc->target_reset_outstanding, 0); sc->io_cmds_highwater = 0; @@ -953,8 +951,7 @@ mrsas_ich_startup(void *arg) /* * Intialize a counting Semaphore to take care no. of concurrent IOCTLs */ - sema_init(&sc->ioctl_count_sema, - MRSAS_MAX_MFI_CMDS - 5, + sema_init(&sc->ioctl_count_sema, MRSAS_MAX_IOCTL_CMDS, IOCTL_SEMA_DESCRIPTION); /* Create a /dev entry for mrsas controller. */ @@ -1070,7 +1067,7 @@ mrsas_detach(device_t dev) mtx_destroy(&sc->raidmap_lock); /* Wait for all the semaphores to be released */ - while (sema_value(&sc->ioctl_count_sema) != (MRSAS_MAX_MFI_CMDS - 5)) + while (sema_value(&sc->ioctl_count_sema) != MRSAS_MAX_IOCTL_CMDS) pause("mr_shutdown", hz); /* Destroy the counting semaphore created for Ioctl */ @@ -1354,9 +1351,11 @@ mrsas_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, if (!sc) return ENOENT; - if (sc->remove_in_progress) { + if (sc->remove_in_progress || + (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR)) { mrsas_dprint(sc, MRSAS_INFO, - "Driver remove or shutdown called.\n"); + "Either driver remove or shutdown called or " + "HW is in unrecoverable critical error state.\n"); return ENOENT; } mtx_lock_spin(&sc->ioctl_lock); @@ -1548,8 +1547,11 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M PLD_LOAD_BALANCE_INFO lbinfo; u_int32_t device_id; int threshold_reply_count = 0; +#if TM_DEBUG + MR_TASK_MANAGE_REQUEST *mr_tm_req; + MPI2_SCSI_TASK_MANAGE_REQUEST *mpi_tm_req; +#endif - /* If we have a hardware error, not need to continue */ if (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR) return (DONE); @@ -1575,6 +1577,16 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M extStatus = scsi_io_req->RaidContext.exStatus; switch (scsi_io_req->Function) { + case MPI2_FUNCTION_SCSI_TASK_MGMT: +#if TM_DEBUG + mr_tm_req = (MR_TASK_MANAGE_REQUEST *) cmd_mpt->io_request; + mpi_tm_req = (MPI2_SCSI_TASK_MANAGE_REQUEST *) + &mr_tm_req->TmRequest; + device_printf(sc->mrsas_dev, "TM completion type 0x%X, " + "TaskMID: 0x%X", mpi_tm_req->TaskType, mpi_tm_req->TaskMID); +#endif + wakeup_one((void *)&sc->ocr_chan); + break; case MPI2_FUNCTION_SCSI_IO_REQUEST: /* Fast Path IO. */ device_id = cmd_mpt->ccb_ptr->ccb_h.target_id; lbinfo = &sc->load_balance_info[device_id]; @@ -1592,9 +1604,16 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ cmd_mfi = sc->mfi_cmd_list[cmd_mpt->sync_cmd_idx]; - mrsas_complete_mptmfi_passthru(sc, cmd_mfi, status); - cmd_mpt->flags = 0; - mrsas_release_mpt_cmd(cmd_mpt); + /* + * Make sure NOT TO release the mfi command from the called + * function's context if it is fired with issue_polled call. + * And also make sure that the issue_polled call should only be + * used if INTERRUPT IS DISABLED. + */ + if (cmd_mfi->frame->hdr.flags & MFI_FRAME_DONT_POST_IN_REPLY_QUEUE) + mrsas_release_mfi_cmd(cmd_mfi); + else + mrsas_complete_mptmfi_passthru(sc, cmd_mfi, status); break; } @@ -1629,12 +1648,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M */ if (threshold_reply_count >= THRESHOLD_REPLY_COUNT) { if (sc->msix_enable) { - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) + if (sc->mrsas_gen3_ctrl) mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -1655,12 +1669,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M /* Clear response interrupt */ if (sc->msix_enable) { - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -2435,12 +2444,21 @@ mrsas_ioc_init(struct mrsas_softc *sc) u_int8_t max_wait = MRSAS_IOC_INIT_WAIT_TIME; bus_addr_t phys_addr; int i, retcode = 0; + u_int32_t scratch_pad_2; /* Allocate memory for the IOC INIT command */ if (mrsas_alloc_ioc_cmd(sc)) { device_printf(sc->mrsas_dev, "Cannot allocate IOC command.\n"); return (1); } + + if (!sc->block_sync_cache) { + scratch_pad_2 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, + outbound_scratch_pad_2)); + sc->fw_sync_cache_support = (scratch_pad_2 & + MR_CAN_HANDLE_SYNC_CACHE_OFFSET) ? 1 : 0; + } + IOCInitMsg = (pMpi2IOCInitRequest_t)(((char *)sc->ioc_init_mem) + 1024); IOCInitMsg->Function = MPI2_FUNCTION_IOC_INIT; IOCInitMsg->WhoInit = MPI2_WHOINIT_HOST_DRIVER; @@ -2458,12 +2476,7 @@ mrsas_ioc_init(struct mrsas_softc *sc) init_frame->flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; /* driver support Extended MSIX */ - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { init_frame->driver_operations. mfi_capabilities.support_additional_msix = 1; } @@ -2585,7 +2598,7 @@ mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) memset(cmd, 0, sizeof(struct mrsas_mpt_cmd)); cmd->index = i + 1; cmd->ccb_ptr = NULL; - callout_init(&cmd->cm_callout, 0); + callout_init_mtx(&cmd->cm_callout, &sc->sim_lock, 0); cmd->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; cmd->sc = sc; cmd->io_request = (MRSAS_RAID_SCSI_IO_REQUEST *) (io_req_base + offset); @@ -2780,6 +2793,7 @@ mrsas_ocr_thread(void *arg) { struct mrsas_softc *sc; u_int32_t fw_status, fw_state; + u_int8_t tm_target_reset_failed = 0; sc = (struct mrsas_softc *)arg; @@ -2802,20 +2816,66 @@ mrsas_ocr_thread(void *arg) fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad)); fw_state = fw_status & MFI_STATE_MASK; - if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset) { - device_printf(sc->mrsas_dev, "%s started due to %s!\n", - sc->disableOnlineCtrlReset ? "Kill Adapter" : "OCR", - sc->do_timedout_reset ? "IO Timeout" : - "FW fault detected"); - mtx_lock_spin(&sc->ioctl_lock); - sc->reset_in_progress = 1; - sc->reset_count++; - mtx_unlock_spin(&sc->ioctl_lock); + if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset || + mrsas_atomic_read(&sc->target_reset_outstanding)) { + + /* First, freeze further IOs to come to the SIM */ mrsas_xpt_freeze(sc); - mrsas_reset_ctrl(sc, sc->do_timedout_reset); - mrsas_xpt_release(sc); - sc->reset_in_progress = 0; - sc->do_timedout_reset = 0; + + /* If this is an IO timeout then go for target reset */ + if (mrsas_atomic_read(&sc->target_reset_outstanding)) { + device_printf(sc->mrsas_dev, "Initiating Target RESET " + "because of SCSI IO timeout!\n"); + + /* Let the remaining IOs to complete */ + msleep(&sc->ocr_chan, &sc->sim_lock, PRIBIO, + "mrsas_reset_targets", 5 * hz); + + /* Try to reset the target device */ + if (mrsas_reset_targets(sc) == FAIL) + tm_target_reset_failed = 1; + } + + /* If this is a DCMD timeout or FW fault, + * then go for controller reset + */ + if (fw_state == MFI_STATE_FAULT || tm_target_reset_failed || + (sc->do_timedout_reset == MFI_DCMD_TIMEOUT_OCR)) { + if (tm_target_reset_failed) + device_printf(sc->mrsas_dev, "Initiaiting OCR because of " + "TM FAILURE!\n"); + else + device_printf(sc->mrsas_dev, "Initiaiting OCR " + "because of %s!\n", sc->do_timedout_reset ? + "DCMD IO Timeout" : "FW fault"); + + mtx_lock_spin(&sc->ioctl_lock); + sc->reset_in_progress = 1; + mtx_unlock_spin(&sc->ioctl_lock); + sc->reset_count++; + + /* + * Wait for the AEN task to be completed if it is running. + */ + mtx_unlock(&sc->sim_lock); + taskqueue_drain(sc->ev_tq, &sc->ev_task); + mtx_lock(&sc->sim_lock); + + taskqueue_block(sc->ev_tq); + /* Try to reset the controller */ + mrsas_reset_ctrl(sc, sc->do_timedout_reset); + + sc->do_timedout_reset = 0; + sc->reset_in_progress = 0; + tm_target_reset_failed = 0; + mrsas_atomic_set(&sc->target_reset_outstanding, 0); + memset(sc->target_reset_pool, 0, + sizeof(sc->target_reset_pool)); + taskqueue_unblock(sc->ev_tq); + } + + /* Now allow IOs to come to the SIM */ + mrsas_xpt_release(sc); } } mtx_unlock(&sc->sim_lock); @@ -2867,6 +2927,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese struct mrsas_mfi_cmd *mfi_cmd; struct mrsas_mpt_cmd *mpt_cmd; union mrsas_evt_class_locale class_locale; + MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc; if (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR) { device_printf(sc->mrsas_dev, @@ -2994,13 +3055,25 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese mpt_cmd = sc->mpt_cmd_list[j]; if (mpt_cmd->sync_cmd_idx != (u_int32_t)MRSAS_ULONG_MAX) { mfi_cmd = sc->mfi_cmd_list[mpt_cmd->sync_cmd_idx]; - mrsas_release_mfi_cmd(mfi_cmd); - mrsas_release_mpt_cmd(mpt_cmd); + /* If not an IOCTL then release the command else re-fire */ + if (!mfi_cmd->sync_cmd) { + mrsas_release_mfi_cmd(mfi_cmd); + } else { + req_desc = mrsas_get_request_desc(sc, + mfi_cmd->cmd_id.context.smid - 1); + mrsas_dprint(sc, MRSAS_OCR, + "Re-fire command DCMD opcode 0x%x index %d\n ", + mfi_cmd->frame->dcmd.opcode, j); + if (!req_desc) + device_printf(sc->mrsas_dev, + "Cannot build MPT cmd.\n"); + else + mrsas_fire_cmd(sc, req_desc->addr.u.low, + req_desc->addr.u.high); + } } } - sc->aen_cmd = NULL; - /* Reset load balance info */ memset(sc->load_balance_info, 0, sizeof(LD_LOAD_BALANCE_INFO) * MAX_LOGICAL_DRIVES_EXT); @@ -3015,17 +3088,6 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese megasas_setup_jbod_map(sc); - memset(sc->pd_list, 0, - MRSAS_MAX_PD * sizeof(struct mrsas_pd_list)); - if (mrsas_get_pd_list(sc) != SUCCESS) { - device_printf(sc->mrsas_dev, "Get PD list failed from OCR.\n" - "Will get the latest PD LIST after OCR on event.\n"); - } - memset(sc->ld_ids, 0xff, MRSAS_MAX_LD_IDS); - if (mrsas_get_ld_list(sc) != SUCCESS) { - device_printf(sc->mrsas_dev, "Get LD lsit failed from OCR.\n" - "Will get the latest LD LIST after OCR on event.\n"); - } mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; @@ -3035,6 +3097,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese class_locale.members.locale = MR_EVT_LOCALE_ALL; class_locale.members.class = MR_EVT_CLASS_DEBUG; + mtx_unlock(&sc->sim_lock); if (mrsas_register_aen(sc, sc->last_seq_num, class_locale.word)) { device_printf(sc->mrsas_dev, @@ -3044,6 +3107,8 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese "or the controller does not support AEN.\n" "Please contact to the SUPPORT TEAM if the problem persists\n"); } + mtx_lock(&sc->sim_lock); + /* Adapter reset completed successfully */ device_printf(sc->mrsas_dev, "Reset successful\n"); retval = SUCCESS; @@ -3140,6 +3205,11 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_i if (fw_state == MFI_STATE_FAULT) { mrsas_dprint(sc, MRSAS_OCR, "Found FW in FAULT state, will reset adapter.\n"); + count = sc->msix_vectors > 0 ? sc->msix_vectors : 1; + mtx_unlock(&sc->sim_lock); + for (MSIxIndex = 0; MSIxIndex < count; MSIxIndex++) + mrsas_complete_cmd(sc, MSIxIndex); + mtx_lock(&sc->sim_lock); retval = 1; goto out; } @@ -3157,8 +3227,10 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_i mrsas_dprint(sc, MRSAS_OCR, "[%2d]waiting for %d " "commands to complete\n", i, outstanding); count = sc->msix_vectors > 0 ? sc->msix_vectors : 1; + mtx_unlock(&sc->sim_lock); for (MSIxIndex = 0; MSIxIndex < count; MSIxIndex++) mrsas_complete_cmd(sc, MSIxIndex); + mtx_lock(&sc->sim_lock); } DELAY(1000 * 1000); } @@ -3177,17 +3249,33 @@ out: * mrsas_release_mfi_cmd: Return a cmd to free command pool * input: Command packet for return to free cmd pool * - * This function returns the MFI command to the command list. + * This function returns the MFI & MPT command to the command list. */ void -mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd) +mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd_mfi) { - struct mrsas_softc *sc = cmd->sc; + struct mrsas_softc *sc = cmd_mfi->sc; + struct mrsas_mpt_cmd *cmd_mpt; + mtx_lock(&sc->mfi_cmd_pool_lock); - cmd->ccb_ptr = NULL; - cmd->cmd_id.frame_count = 0; - TAILQ_INSERT_TAIL(&(sc->mrsas_mfi_cmd_list_head), cmd, next); + /* + * Release the mpt command (if at all it is allocated + * associated with the mfi command + */ + if (cmd_mfi->cmd_id.context.smid) { + mtx_lock(&sc->mpt_cmd_pool_lock); + /* Get the mpt cmd from mfi cmd frame's smid value */ + cmd_mpt = sc->mpt_cmd_list[cmd_mfi->cmd_id.context.smid-1]; + cmd_mpt->flags = 0; + cmd_mpt->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; + TAILQ_INSERT_HEAD(&(sc->mrsas_mpt_cmd_list_head), cmd_mpt, next); + mtx_unlock(&sc->mpt_cmd_pool_lock); + } + /* Release the mfi command */ + cmd_mfi->ccb_ptr = NULL; + cmd_mfi->cmd_id.frame_count = 0; + TAILQ_INSERT_HEAD(&(sc->mrsas_mfi_cmd_list_head), cmd_mfi, next); mtx_unlock(&sc->mfi_cmd_pool_lock); return; @@ -3236,7 +3324,11 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc) dcmd->sgl.sge32[0].phys_addr = sc->ctlr_info_phys_addr; dcmd->sgl.sge32[0].length = sizeof(struct mrsas_ctrl_info); - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; else @@ -3247,13 +3339,16 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc) sc->use_seqnum_jbod_fp = sc->ctrl_info->adapterOperations3.useSeqNumJbodFP; + sc->disableOnlineCtrlReset = + sc->ctrl_info->properties.OnOffProperties.disableOnlineCtrlReset; dcmd_timeout: mrsas_free_ctlr_info_cmd(sc); if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -3496,12 +3591,7 @@ mrsas_build_mptmfi_passthru(struct mrsas_softc *sc, st io_req = mpt_cmd->io_request; - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { pMpi25IeeeSgeChain64_t sgl_ptr_end = (pMpi25IeeeSgeChain64_t)&io_req->SGL; sgl_ptr_end += sc->max_sge_in_main_msg - 1; @@ -3869,8 +3959,6 @@ megasas_sync_pd_seq_num(struct mrsas_softc *sc, boolea dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else - mrsas_release_mfi_cmd(cmd); return (retcode); } @@ -3947,8 +4035,6 @@ mrsas_get_ld_map_info(struct mrsas_softc *sc) retcode = mrsas_issue_polled(sc, cmd); if (retcode == ETIMEDOUT) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else - mrsas_release_mfi_cmd(cmd); return (retcode); } @@ -3975,9 +4061,8 @@ mrsas_sync_map_info(struct mrsas_softc *sc) cmd = mrsas_get_mfi_cmd(sc); if (!cmd) { - device_printf(sc->mrsas_dev, - "Cannot alloc for sync map info cmd\n"); - return 1; + device_printf(sc->mrsas_dev, "Cannot alloc for sync map info cmd\n"); + return ENOMEM; } map = sc->ld_drv_map[sc->map_id & 1]; num_lds = map->raidMap.ldCount; @@ -4077,7 +4162,11 @@ mrsas_get_pd_list(struct mrsas_softc *sc) dcmd->sgl.sge32[0].phys_addr = pd_list_phys_addr; dcmd->sgl.sge32[0].length = MRSAS_MAX_PD * sizeof(struct MR_PD_LIST); - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; @@ -4108,7 +4197,8 @@ dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -4170,7 +4260,11 @@ mrsas_get_ld_list(struct mrsas_softc *sc) dcmd->sgl.sge32[0].length = sizeof(struct MR_LD_LIST); dcmd->pad_0 = 0; - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; @@ -4196,7 +4290,7 @@ dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -4360,6 +4454,11 @@ mrsas_aen_handler(struct mrsas_softc *sc) printf("invalid instance!\n"); return; } + if (sc->remove_in_progress || sc->reset_in_progress) { + device_printf(sc->mrsas_dev, "Returning from %s, line no %d\n", + __func__, __LINE__); + return; + } if (sc->evt_detail_mem) { switch (sc->evt_detail_mem->code) { case MR_EVT_PD_INSERTED: @@ -4368,7 +4467,6 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_1); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_PD_REMOVED: fail_aen = mrsas_get_pd_list(sc); @@ -4376,13 +4474,11 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_1); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_LD_OFFLINE: case MR_EVT_CFG_CLEARED: case MR_EVT_LD_DELETED: mrsas_bus_scan_sim(sc, sc->sim_0); - doscan = 0; break; case MR_EVT_LD_CREATED: fail_aen = mrsas_get_ld_list(sc); @@ -4390,15 +4486,18 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_0); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED: case MR_EVT_FOREIGN_CFG_IMPORTED: case MR_EVT_LD_STATE_CHANGE: doscan = 1; break; + case MR_EVT_CTRL_PROP_CHANGED: + fail_aen = mrsas_get_ctrl_info(sc); + if (fail_aen) + goto skip_register_aen; + break; default: - doscan = 0; break; } } else { @@ -4474,8 +4573,7 @@ mrsas_complete_aen(struct mrsas_softc *sc, struct mrsa sc->aen_cmd = NULL; mrsas_release_mfi_cmd(cmd); - if (!sc->remove_in_progress) - taskqueue_enqueue(sc->ev_tq, &sc->ev_task); + taskqueue_enqueue(sc->ev_tq, &sc->ev_task); return; } Modified: stable/11/sys/dev/mrsas/mrsas.h ============================================================================== --- stable/11/sys/dev/mrsas/mrsas.h Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas.h Wed Sep 20 17:49:57 2017 (r323819) @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.709.07.00-fbsd" +#define MRSAS_VERSION "06.712.04.00-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0 @@ -205,7 +205,9 @@ typedef struct _RAID_CONTEXT { #define MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD (0x0100) #define MPI2_SCSIIO_EEDPFLAGS_INSERT_OP (0x0004) #define MPI2_FUNCTION_SCSI_IO_REQUEST (0x00) /* SCSI IO */ -#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x06) +#define MPI2_FUNCTION_SCSI_TASK_MGMT (0x01) +#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x03) +#define MPI2_REQ_DESCRIPT_FLAGS_FP_IO (0x06) #define MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO (0x00) #define MPI2_SGE_FLAGS_64_BIT_ADDRESSING (0x02) #define MPI2_SCSIIO_CONTROL_WRITE (0x01000000) @@ -314,6 +316,91 @@ typedef union { } MPI2_SCSI_IO_CDB_UNION, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_UNION, Mpi2ScsiIoCdb_t, MPI2_POINTER pMpi2ScsiIoCdb_t; +/**************************************************************************** + * * SCSI Task Management messages + * ****************************************************************************/ + +/*SCSI Task Management Request Message */ +typedef struct _MPI2_SCSI_TASK_MANAGE_REQUEST { + u_int16_t DevHandle; /*0x00 */ + u_int8_t ChainOffset; /*0x02 */ + u_int8_t Function; /*0x03 */ + u_int8_t Reserved1; /*0x04 */ + u_int8_t TaskType; /*0x05 */ + u_int8_t Reserved2; /*0x06 */ + u_int8_t MsgFlags; /*0x07 */ + u_int8_t VP_ID; /*0x08 */ + u_int8_t VF_ID; /*0x09 */ + u_int16_t Reserved3; /*0x0A */ + u_int8_t LUN[8]; /*0x0C */ + u_int32_t Reserved4[7]; /*0x14 */ + u_int16_t TaskMID; /*0x30 */ + u_int16_t Reserved5; /*0x32 */ +} MPI2_SCSI_TASK_MANAGE_REQUEST; + +/*SCSI Task Management Reply Message */ +typedef struct _MPI2_SCSI_TASK_MANAGE_REPLY { + u_int16_t DevHandle; /*0x00 */ + u_int8_t MsgLength; /*0x02 */ + u_int8_t Function; /*0x03 */ + u_int8_t ResponseCode; /*0x04 */ + u_int8_t TaskType; /*0x05 */ + u_int8_t Reserved1; /*0x06 */ + u_int8_t MsgFlags; /*0x07 */ + u_int8_t VP_ID; /*0x08 */ + u_int8_t VF_ID; /*0x09 */ + u_int16_t Reserved2; /*0x0A */ + u_int16_t Reserved3; /*0x0C */ + u_int16_t IOCStatus; /*0x0E */ + u_int32_t IOCLogInfo; /*0x10 */ + u_int32_t TerminationCount; /*0x14 */ + u_int32_t ResponseInfo; /*0x18 */ +} MPI2_SCSI_TASK_MANAGE_REPLY; + +typedef struct _MR_TM_REQUEST { + char request[128]; +} MR_TM_REQUEST; + +typedef struct _MR_TM_REPLY { + char reply[128]; +} MR_TM_REPLY; + +/* SCSI Task Management Request Message */ +typedef struct _MR_TASK_MANAGE_REQUEST { + /*To be type casted to struct MPI2_SCSI_TASK_MANAGE_REQUEST */ + MR_TM_REQUEST TmRequest; + union { + struct { + u_int32_t isTMForLD:1; + u_int32_t isTMForPD:1; + u_int32_t reserved1:30; + u_int32_t reserved2; + } tmReqFlags; + MR_TM_REPLY TMReply; + } uTmReqReply; +} MR_TASK_MANAGE_REQUEST; + +/* TaskType values */ +#define MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK (0x01) +#define MPI2_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02) +#define MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03) +#define MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05) +#define MPI2_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06) +#define MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07) +#define MPI2_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_TASK_SET (0x09) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT (0x0A) + +/* ResponseCode values */ +#define MPI2_SCSITASKMGMT_RSP_TM_COMPLETE (0x00) +#define MPI2_SCSITASKMGMT_RSP_INVALID_FRAME (0x02) +#define MPI2_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED (0x04) +#define MPI2_SCSITASKMGMT_RSP_TM_FAILED (0x05) +#define MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08) +#define MPI2_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09) +#define MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG (0x0A) +#define MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80) + /* * RAID SCSI IO Request Message Total SGE count will be one less than * _MPI2_SCSI_IO_REQUEST @@ -584,8 +671,8 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MAX_RAIDMAP_PHYSICAL_DEVICES (MAX_PHYSICAL_DEVICES) #define MR_DCMD_LD_MAP_GET_INFO 0x0300e101 #define MR_DCMD_SYSTEM_PD_MAP_GET_INFO 0x0200e102 +#define MR_DCMD_PD_MFI_TASK_MGMT 0x0200e100 - #define MRSAS_MAX_PD_CHANNELS 1 #define MRSAS_MAX_LD_CHANNELS 1 #define MRSAS_MAX_DEV_PER_CHANNEL 256 @@ -599,8 +686,8 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define VD_EXT_DEBUG 0 +#define TM_DEBUG 1 - /******************************************************************* * RAID map related structures ********************************************************************/ @@ -659,7 +746,8 @@ typedef struct _MR_LD_RAID { u_int32_t fpWriteAcrossStripe:1; u_int32_t fpReadAcrossStripe:1; u_int32_t fpNonRWCapable:1; - u_int32_t reserved4:7; + u_int32_t tmCapable:1; + u_int32_t reserved4:6; } capability; u_int32_t reserved6; u_int64_t size; @@ -876,7 +964,11 @@ struct IO_REQUEST_INFO { struct MR_PD_CFG_SEQ { u_int16_t seqNum; u_int16_t devHandle; - u_int8_t reserved[4]; + struct { + u_int8_t tmCapable:1; + u_int8_t reserved:7; + } capability; + u_int8_t reserved[3]; } __packed; struct MR_PD_CFG_SEQ_NUM_SYNC { @@ -1242,7 +1334,6 @@ enum MR_EVT_ARGS { MR_EVT_ARGS_GENERIC, }; - /* * Thunderbolt (and later) Defines */ @@ -1256,7 +1347,8 @@ enum MR_EVT_ARGS { #define HOST_DIAG_WRITE_ENABLE 0x80 #define HOST_DIAG_RESET_ADAPTER 0x4 #define MRSAS_TBOLT_MAX_RESET_TRIES 3 -#define MRSAS_MAX_MFI_CMDS 32 +#define MRSAS_MAX_MFI_CMDS 16 +#define MRSAS_MAX_IOCTL_CMDS 3 /* * Invader Defines @@ -1395,6 +1487,7 @@ struct mrsas_mpt_cmd { union ccb *ccb_ptr; struct callout cm_callout; struct mrsas_softc *sc; + boolean_t tmCapable; TAILQ_ENTRY(mrsas_mpt_cmd) next; }; @@ -1448,6 +1541,7 @@ enum MR_PD_QUERY_TYPE { #define MR_EVT_LD_DELETED 0x008b #define MR_EVT_FOREIGN_CFG_IMPORTED 0x00db #define MR_EVT_LD_OFFLINE 0x00fc +#define MR_EVT_CTRL_PROP_CHANGED 0x012f #define MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED 0x0152 enum MR_PD_STATE { @@ -1990,6 +2084,11 @@ struct mrsas_ctrl_info { #define MR_MAX_MSIX_REG_ARRAY 16 /* + * SYNC CACHE offset define + */ +#define MR_CAN_HANDLE_SYNC_CACHE_OFFSET 0X01000000 + +/* * FW reports the maximum of number of commands that it can accept (maximum * commands that can be outstanding) at any time. The driver must report a * lower number to the mid layer because it can issue a few internal commands @@ -2470,8 +2569,7 @@ struct mrsas_irq_context { enum MEGASAS_OCR_REASON { FW_FAULT_OCR = 0, - SCSIIO_TIMEOUT_OCR = 1, - MFI_DCMD_TIMEOUT_OCR = 2, + MFI_DCMD_TIMEOUT_OCR = 1, }; /* Controller management info added to support Linux Emulator */ @@ -2746,6 +2844,11 @@ struct mrsas_softc { u_int8_t do_timedout_reset; u_int32_t reset_in_progress; u_int32_t reset_count; + u_int32_t block_sync_cache; + u_int8_t fw_sync_cache_support; + mrsas_atomic_t target_reset_outstanding; +#define MRSAS_MAX_TM_TARGETS (MRSAS_MAX_PD + MRSAS_MAX_LD_IDS) + struct mrsas_mpt_cmd *target_reset_pool[MRSAS_MAX_TM_TARGETS]; bus_dma_tag_t jbodmap_tag[2]; bus_dmamap_t jbodmap_dmamap[2]; @@ -2794,6 +2897,7 @@ struct mrsas_softc { LD_LOAD_BALANCE_INFO load_balance_info[MAX_LOGICAL_DRIVES_EXT]; LD_SPAN_INFO log_to_span[MAX_LOGICAL_DRIVES_EXT]; + u_int8_t mrsas_gen3_ctrl; u_int8_t secure_jbod_support; u_int8_t use_seqnum_jbod_fp; u_int8_t max256vdSupport; Modified: stable/11/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/11/sys/dev/mrsas/mrsas_cam.c Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas_cam.c Wed Sep 20 17:49:57 2017 (r323819) @@ -95,6 +95,11 @@ static void mrsas_freeze_simq(struct mrsas_mpt_cmd *cm static void mrsas_cam_poll(struct cam_sim *sim); static void mrsas_action(struct cam_sim *sim, union ccb *ccb); static void mrsas_scsiio_timeout(void *data); +static int mrsas_track_scsiio(struct mrsas_softc *sc, target_id_t id, u_int32_t bus_id); +static void mrsas_tm_response_code(struct mrsas_softc *sc, + MPI2_SCSI_TASK_MANAGE_REPLY *mpi_reply); +static int mrsas_issue_tm(struct mrsas_softc *sc, + MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc); static void mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); @@ -105,6 +110,10 @@ struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_s MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_get_request_desc(struct mrsas_softc *sc, u_int16_t index); +extern void +mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, + u_int8_t extStatus); +extern int mrsas_reset_targets(struct mrsas_softc *sc); extern u_int16_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); extern u_int32_t MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map, @@ -125,6 +134,9 @@ extern u_int8_t megasas_get_best_arm(PLD_LOAD_BALANCE_INFO lbInfo, u_int8_t arm, u_int64_t block, u_int32_t count); extern int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); +extern MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); +extern void mrsas_disable_intr(struct mrsas_softc *sc); +extern void mrsas_enable_intr(struct mrsas_softc *sc); /* @@ -260,6 +272,17 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) struct ccb_hdr *ccb_h = &(ccb->ccb_h); u_int32_t device_id; + /* + * Check if the system going down + * or the adapter is in unrecoverable critical error + */ + if (sc->remove_in_progress || + (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR)) { + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + xpt_done(ccb); + return; + } + switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: { @@ -375,7 +398,11 @@ mrsas_scsiio_timeout(void *data) { struct mrsas_mpt_cmd *cmd; struct mrsas_softc *sc; + u_int32_t target_id; + if (!data) + return; + cmd = (struct mrsas_mpt_cmd *)data; sc = cmd->sc; @@ -383,6 +410,7 @@ mrsas_scsiio_timeout(void *data) printf("command timeout with NULL ccb\n"); return; } + /* * Below callout is dummy entry so that it will be cancelled from * mrsas_cmd_done(). Now Controller will go to OCR/Kill Adapter based @@ -390,15 +418,25 @@ mrsas_scsiio_timeout(void *data) * context. */ #if (__FreeBSD_version >= 1000510) - callout_reset_sbt(&cmd->cm_callout, SBT_1S * 600, 0, + callout_reset_sbt(&cmd->cm_callout, SBT_1S * 180, 0, mrsas_scsiio_timeout, cmd, 0); #else - callout_reset(&cmd->cm_callout, (600000 * hz) / 1000, + callout_reset(&cmd->cm_callout, (180000 * hz) / 1000, mrsas_scsiio_timeout, cmd); #endif - sc->do_timedout_reset = SCSIIO_TIMEOUT_OCR; - if (sc->ocr_thread_active) - wakeup(&sc->ocr_chan); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Wed Sep 20 20:48:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88519E22B6D; Wed, 20 Sep 2017 20:48:23 +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 54AE17EE76; Wed, 20 Sep 2017 20:48:23 +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 v8KKmMlX041120; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKmM94041119; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709202048.v8KKmM94041119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Sep 2017 20:48:22 +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: r323826 - in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Commit-Revision: 323826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:48:23 -0000 Author: jhb Date: Wed Sep 20 20:48:21 2017 New Revision: 323826 URL: https://svnweb.freebsd.org/changeset/base/323826 Log: MFC 322270: Fix a NULL pointer dereference in mly_user_command(). If mly_user_command fails to allocate a command slot it jumps to an 'out' label used for error handling. The error handling code checks for a data buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by just returning directly if we fail to allocate a command and only using the 'out' label for subsequent errors when there is actual cleanup to perform. PR: 217747 Reported by: PVS-Studio Modified: stable/11/sys/dev/mly/mly.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/mly/mly.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/mly/mly.c ============================================================================== --- stable/11/sys/dev/mly/mly.c Wed Sep 20 20:40:49 2017 (r323825) +++ stable/11/sys/dev/mly/mly.c Wed Sep 20 20:48:21 2017 (r323826) @@ -2892,8 +2892,7 @@ mly_user_command(struct mly_softc *sc, struct mly_user MLY_LOCK(sc); if (mly_alloc_command(sc, &mc)) { MLY_UNLOCK(sc); - error = ENOMEM; - goto out; /* XXX Linux version will wait for a command */ + return (ENOMEM); /* XXX Linux version will wait for a command */ } MLY_UNLOCK(sc); @@ -2952,11 +2951,9 @@ mly_user_command(struct mly_softc *sc, struct mly_user out: if (mc->mc_data != NULL) free(mc->mc_data, M_DEVBUF); - if (mc != NULL) { - MLY_LOCK(sc); - mly_release_command(mc); - MLY_UNLOCK(sc); - } + MLY_LOCK(sc); + mly_release_command(mc); + MLY_UNLOCK(sc); return(error); } From owner-svn-src-stable-11@freebsd.org Wed Sep 20 20:59:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96DE0E23228; Wed, 20 Sep 2017 20:59:29 +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 652797F4FA; Wed, 20 Sep 2017 20:59:29 +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 v8KKxSIj045338; Wed, 20 Sep 2017 20:59:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKxS88045337; Wed, 20 Sep 2017 20:59:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709202059.v8KKxS88045337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Sep 2017 20:59: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: r323827 - stable/11/contrib/compiler-rt/lib/builtins X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/contrib/compiler-rt/lib/builtins X-SVN-Commit-Revision: 323827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:59:29 -0000 Author: jhb Date: Wed Sep 20 20:59:28 2017 New Revision: 323827 URL: https://svnweb.freebsd.org/changeset/base/323827 Log: MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32. This fixes infinite recursion in /sbin/init for MIPS N32. Sponsored by: DARPA / AFRL Modified: stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/compiler-rt/lib/builtins/int_lib.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Wed Sep 20 20:48:21 2017 (r323826) +++ stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Wed Sep 20 20:59:28 2017 (r323827) @@ -95,12 +95,13 @@ * does not have dedicated bit counting instructions. */ #if defined(__FreeBSD__) && (defined(__sparc64__) || \ - defined(__mips_n64) || defined(__mips_o64) || defined(__riscv__)) + defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) || \ + defined(__riscv__)) si_int __clzsi2(si_int); si_int __ctzsi2(si_int); #define __builtin_clz __clzsi2 #define __builtin_ctz __ctzsi2 -#endif /* FreeBSD && (sparc64 || mips_n64 || mips_o64) */ +#endif /* FreeBSD && (sparc64 || mips_n32 || mips_n64 || mips_o64 || riscv) */ COMPILER_RT_ABI si_int __paritysi2(si_int a); COMPILER_RT_ABI si_int __paritydi2(di_int a); From owner-svn-src-stable-11@freebsd.org Wed Sep 20 22:11:02 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF05BE2620E; Wed, 20 Sep 2017 22:11:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC028823CA; Wed, 20 Sep 2017 22:11:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KMB1vw077627; Wed, 20 Sep 2017 22:11:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KMB13q077626; Wed, 20 Sep 2017 22:11:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709202211.v8KMB13q077626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 20 Sep 2017 22:11: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: r323837 - stable/11/sys/modules X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/modules X-SVN-Commit-Revision: 323837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:11:03 -0000 Author: emaste Date: Wed Sep 20 22:11:01 2017 New Revision: 323837 URL: https://svnweb.freebsd.org/changeset/base/323837 Log: MFC r323539: qlnx: exclude if WITHOUT_SOURCELESS_UCODE set PR: 222277 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Wed Sep 20 22:00:06 2017 (r323836) +++ stable/11/sys/modules/Makefile Wed Sep 20 22:11:01 2017 (r323837) @@ -715,8 +715,8 @@ _qlxge= qlxge _qlxgb= qlxgb .if ${MK_SOURCELESS_UCODE} != "no" _qlxgbe= qlxgbe -.endif _qlnx= qlnx +.endif _sfxge= sfxge .if ${MK_BHYVE} != "no" || defined(ALL_MODULES) From owner-svn-src-stable-11@freebsd.org Thu Sep 21 03:18:13 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38CF3E0E3A0; Thu, 21 Sep 2017 03:18:13 +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 06DB165F36; Thu, 21 Sep 2017 03:18:12 +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 v8L3ICVb000924; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L3ICx9000923; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709210318.v8L3ICx9000923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 21 Sep 2017 03:18:12 +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: r323842 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 03:18:13 -0000 Author: cy Date: Thu Sep 21 03:18:11 2017 New Revision: 323842 URL: https://svnweb.freebsd.org/changeset/base/323842 Log: MFC r323715: Don't use an apostrophe in a possesive pronoun. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 00:41:12 2017 (r323841) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 03:18:11 2017 (r323842) @@ -1449,7 +1449,7 @@ ipf_state_add(softc, fin, stsave, flags) is->is_die = 1 + softc->ipf_ticks; /* * We want to check everything that is a property of this packet, - * but we don't (automatically) care about it's fragment status as + * but we don't (automatically) care about its fragment status as * this may change. */ is->is_pass = pass; From owner-svn-src-stable-11@freebsd.org Thu Sep 21 07:35:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF7D6E19DE7; Thu, 21 Sep 2017 07:35:23 +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 AE22A6D5F2; Thu, 21 Sep 2017 07:35:23 +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 v8L7ZMXi006328; Thu, 21 Sep 2017 07:35:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L7ZMDu006327; Thu, 21 Sep 2017 07:35:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709210735.v8L7ZMDu006327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 21 Sep 2017 07:35:22 +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: r323844 - stable/11/sys/dev/ntb/ntb_hw X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 323844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 07:35:24 -0000 Author: mav Date: Thu Sep 21 07:35:22 2017 New Revision: 323844 URL: https://svnweb.freebsd.org/changeset/base/323844 Log: MFC r323575: Add second entry to LUT on a link side in B2B mode. Each of two entries on a virtual side should have its counterpart on a peer's link side. Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 21 05:46:28 2017 (r323843) +++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 21 07:35:22 2017 (r323844) @@ -197,8 +197,8 @@ ntb_plx_init(device_t dev) } } - /* Enable Link Interface LUT entry 0 for 0:0.0. */ - PNTX_WRITE(sc, 0xdb4, 1); + /* Enable Link Interface LUT entries 0/1 for peer 0/1. */ + PNTX_WRITE(sc, 0xdb4, 0x00090001); } /* @@ -631,13 +631,12 @@ ntb_plx_mw_set_trans_internal(device_t dev, unsigned m val64 = 0; if (size > 0) val64 = (~(size - 1) & ~0xfffff); - val64 |= 0x4; + val64 |= 0xc; PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); /* Set Link Interface BAR address. */ val64 = 0x2000000000000000 * mw->mw_bar + off; - val64 |= 0x4; PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); } From owner-svn-src-stable-11@freebsd.org Thu Sep 21 08:16:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23706E1BEAC; Thu, 21 Sep 2017 08:16:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E63F86E78D; Thu, 21 Sep 2017 08:16:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L8GM14022585; Thu, 21 Sep 2017 08:16:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L8GMcj022584; Thu, 21 Sep 2017 08:16:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709210816.v8L8GMcj022584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 21 Sep 2017 08:16:22 +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: r323845 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: stable/11/sys/arm64/arm64 X-SVN-Commit-Revision: 323845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 08:16:23 -0000 Author: andrew Date: Thu Sep 21 08:16:21 2017 New Revision: 323845 URL: https://svnweb.freebsd.org/changeset/base/323845 Log: MFC r322797: Fix a bug in pmap_protect where we invalidate the wrong page. With this we can now remove an unneeded call to invalidate all entries. Sponsored by: DARPA, AFRL Modified: stable/11/sys/arm64/arm64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 07:35:22 2017 (r323844) +++ stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:16:21 2017 (r323845) @@ -2626,13 +2626,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t pmap_set(l3p, nbits); PTE_SYNC(l3p); /* XXX: Use pmap_invalidate_range */ - pmap_invalidate_page(pmap, va); + pmap_invalidate_page(pmap, sva); } } PMAP_UNLOCK(pmap); - - /* TODO: Only invalidate entries we are touching */ - pmap_invalidate_all(pmap); } /* From owner-svn-src-stable-11@freebsd.org Thu Sep 21 08:20:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC11E1C2A3; Thu, 21 Sep 2017 08:20:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5976E959; Thu, 21 Sep 2017 08:20:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L8KXAJ022797; Thu, 21 Sep 2017 08:20:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L8KXdf022796; Thu, 21 Sep 2017 08:20:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709210820.v8L8KXdf022796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 21 Sep 2017 08:20:33 +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: r323846 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: stable/11/sys/arm64/arm64 X-SVN-Commit-Revision: 323846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 08:20:34 -0000 Author: andrew Date: Thu Sep 21 08:20:33 2017 New Revision: 323846 URL: https://svnweb.freebsd.org/changeset/base/323846 Log: MFC r322800: Remove an unneeded call to pmap_invalidate_all. This was never called as the anyvalid variable is never set. Sponsored by: DARPA, AFRL Modified: stable/11/sys/arm64/arm64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:16:21 2017 (r323845) +++ stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:20:33 2017 (r323846) @@ -2335,7 +2335,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t pd_entry_t *l0, *l1, *l2; pt_entry_t l3_paddr, *l3; struct spglist free; - int anyvalid; /* * Perform an unsynchronized read. This is, however, safe. @@ -2343,7 +2342,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (pmap->pm_stats.resident_count == 0) return; - anyvalid = 0; SLIST_INIT(&free); PMAP_LOCK(pmap); @@ -2430,8 +2428,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t } if (lock != NULL) rw_wunlock(lock); - if (anyvalid) - pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); pmap_free_zero_pages(&free); } From owner-svn-src-stable-11@freebsd.org Thu Sep 21 10:16:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13EE0E221FF; Thu, 21 Sep 2017 10:16:27 +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 D4ACF72BDB; Thu, 21 Sep 2017 10:16: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 v8LAGQjc073016; Thu, 21 Sep 2017 10:16:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAGPqb073014; Thu, 21 Sep 2017 10:16:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709211016.v8LAGPqb073014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Sep 2017 10:16: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: r323857 - stable/11/lib/libc/net X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/net X-SVN-Commit-Revision: 323857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:16:27 -0000 Author: kib Date: Thu Sep 21 10:16:25 2017 New Revision: 323857 URL: https://svnweb.freebsd.org/changeset/base/323857 Log: MFC r323597: Handle freeaddrinfo(NULL). Modified: stable/11/lib/libc/net/getaddrinfo.3 stable/11/lib/libc/net/getaddrinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/11/lib/libc/net/getaddrinfo.3 Thu Sep 21 10:14:43 2017 (r323856) +++ stable/11/lib/libc/net/getaddrinfo.3 Thu Sep 21 10:16:25 2017 (r323857) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2015 +.Dd September 13, 2017 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -351,6 +351,17 @@ pointer should be a .Li addrinfo structure created by a call to .Fn getaddrinfo . +.Sh IMPLEMENTATION NOTES +The behavior of +.Li freeadrinfo(NULL) +is left unspecified by both +.St -susv4 +and +.Dv "RFC 3493" . +The current implementation ignores a +.Dv NULL +argument for compatibility with programs that rely on the implementation +details of other operating systems. .Sh RETURN VALUES .Fn getaddrinfo returns zero on success or one of the error codes listed in Modified: stable/11/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/11/lib/libc/net/getaddrinfo.c Thu Sep 21 10:14:43 2017 (r323856) +++ stable/11/lib/libc/net/getaddrinfo.c Thu Sep 21 10:16:25 2017 (r323857) @@ -35,7 +35,7 @@ * in the source code. This is because RFC2553 is silent about which error * code must be returned for which situation. * - freeaddrinfo(NULL). RFC2553 is silent about it. XNET 5.2 says it is - * invalid. current code - SEGV on freeaddrinfo(NULL) + * invalid. Current code accepts NULL to be compatible with other OSes. * * Note: * - The code filters out AFs that are not supported by the kernel, @@ -359,14 +359,13 @@ freeaddrinfo(struct addrinfo *ai) { struct addrinfo *next; - do { + while (ai != NULL) { next = ai->ai_next; - if (ai->ai_canonname) - free(ai->ai_canonname); + free(ai->ai_canonname); /* no need to free(ai->ai_addr) */ free(ai); ai = next; - } while (ai); + } } static int From owner-svn-src-stable-11@freebsd.org Thu Sep 21 12:31:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39540E0125C; Thu, 21 Sep 2017 12:31: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 05F9B77B3B; Thu, 21 Sep 2017 12:31:51 +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 v8LCVp6q029978; Thu, 21 Sep 2017 12:31:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LCVpIh029977; Thu, 21 Sep 2017 12:31:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709211231.v8LCVpIh029977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Sep 2017 12:31: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: r323862 - stable/11/sys/contrib/octeon-sdk X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/contrib/octeon-sdk X-SVN-Commit-Revision: 323862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 12:31:52 -0000 Author: emaste Date: Thu Sep 21 12:31:51 2017 New Revision: 323862 URL: https://svnweb.freebsd.org/changeset/base/323862 Log: MFC r323587: octeon sdk: initialize variable to quiet Clang warning Clang complains "variable 'dummy' is uninitialized when used here". Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 21 11:56:31 2017 (r323861) +++ stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 21 12:31:51 2017 (r323862) @@ -339,7 +339,7 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter) static void fault_in(uint64_t addr, int len) { volatile char *ptr; - volatile char dummy; + volatile char dummy = 0; /* * Adjust addr and length so we get all cache lines even for * small ranges spanning two cache lines. From owner-svn-src-stable-11@freebsd.org Thu Sep 21 12:37:13 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 956AAE01635; Thu, 21 Sep 2017 12:37:13 +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 60E527C172; Thu, 21 Sep 2017 12:37:13 +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 v8LCbCnR031207; Thu, 21 Sep 2017 12:37:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LCbCr5031206; Thu, 21 Sep 2017 12:37:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709211237.v8LCbCr5031206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 21 Sep 2017 12:37:12 +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: r323863 - stable/11/usr.bin/ktrdump X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/usr.bin/ktrdump X-SVN-Commit-Revision: 323863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 12:37:13 -0000 Author: markj Date: Thu Sep 21 12:37:12 2017 New Revision: 323863 URL: https://svnweb.freebsd.org/changeset/base/323863 Log: MFC r323439: Provide an error message if KTR symbols in a vmcore cannot be resolved. Modified: stable/11/usr.bin/ktrdump/ktrdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ktrdump/ktrdump.c ============================================================================== --- stable/11/usr.bin/ktrdump/ktrdump.c Thu Sep 21 12:31:51 2017 (r323862) +++ stable/11/usr.bin/ktrdump/ktrdump.c Thu Sep 21 12:37:12 2017 (r323863) @@ -93,6 +93,7 @@ main(int ac, char **av) char *p; int version; int entries; + int count; int index, index2; int parm; int in; @@ -162,8 +163,12 @@ main(int ac, char **av) if ((kd = kvm_openfiles(Nflag ? execfile : NULL, Mflag ? corefile : NULL, NULL, O_RDONLY, errbuf)) == NULL) errx(1, "%s", errbuf); - if (kvm_nlist(kd, nl) != 0 || - kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) + count = kvm_nlist(kd, nl); + if (count == -1) + errx(1, "%s", kvm_geterr(kd)); + if (count > 0) + errx(1, "failed to resolve ktr symbols"); + if (kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) errx(1, "%s", kvm_geterr(kd)); if (version != KTR_VERSION) errx(1, "ktr version mismatch"); From owner-svn-src-stable-11@freebsd.org Thu Sep 21 18:38:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AD4FE187DD; Thu, 21 Sep 2017 18:38:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 476496555F; Thu, 21 Sep 2017 18:38:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 5A03410A8BB; Thu, 21 Sep 2017 14:38:52 -0400 (EDT) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" Cc: Josh Paetzel , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Date: Thu, 21 Sep 2017 10:01:25 -0700 Message-ID: <5939056.dt9NlW2kID@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 21 Sep 2017 14:38:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 18:38:54 -0000 On Wednesday, September 20, 2017 12:41:13 AM Ngie Cooper wrote: >=20 > > On Sep 19, 2017, at 09:51, Josh Paetzel wrot= e: > >=20 > > Author: jpaetzel > > Date: Tue Sep 19 16:51:51 2017 > > New Revision: 323770 > > URL: https://svnweb.freebsd.org/changeset/base/323770 > >=20 > > Log: > > MFC: 323068 > >=20 > > Allow kldload tcpmd5 >=20 > Wasn=E2=80=99t this reverted on ^/head ? I thought only the removal of IPSEC (r323087) was reverted in r323103? --=20 John Baldwin From owner-svn-src-stable-11@freebsd.org Thu Sep 21 20:59:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2ECCE222D1; Thu, 21 Sep 2017 20:59:37 +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 9F3796A98B; Thu, 21 Sep 2017 20:59:37 +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 v8LKxaFn041988; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKxa1P041987; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212059.v8LKxa1P041987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 20:59:36 +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: r323877 - in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Commit-Revision: 323877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:59:37 -0000 Author: jhb Date: Thu Sep 21 20:59:36 2017 New Revision: 323877 URL: https://svnweb.freebsd.org/changeset/base/323877 Log: MFC 323025: Read max_stack_flags from correct object. 'obj' is not initialized here. Sponsored by: DARPA / AFRL Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Thu Sep 21 20:34:33 2017 (r323876) +++ stable/11/libexec/rtld-elf/rtld.c Thu Sep 21 20:59:36 2017 (r323877) @@ -571,7 +571,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr close(fd); if (obj_main == NULL) rtld_die(); - max_stack_flags = obj->stack_flags; + max_stack_flags = obj_main->stack_flags; } else { /* Main program already loaded. */ dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); From owner-svn-src-stable-11@freebsd.org Thu Sep 21 23:11:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CD9CE28D6A; Thu, 21 Sep 2017 23:11:00 +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 439476EC58; Thu, 21 Sep 2017 23:11:00 +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 v8LNAxfm095253; Thu, 21 Sep 2017 23:10:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNAxta095251; Thu, 21 Sep 2017 23:10:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212310.v8LNAxta095251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 23:10:59 +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: r323884 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 323884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:11:00 -0000 Author: jhb Date: Thu Sep 21 23:10:59 2017 New Revision: 323884 URL: https://svnweb.freebsd.org/changeset/base/323884 Log: MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request. To optimize the case of ping-ponging between two buffers, the DDP code caches the last two buffers used keeping the pages wired and page pods stored in the NIC's RAM. If a new aio_read() request uses one of the same buffers, then the work of holding pages, etc. can be avoided. However, the starting virtual address of an aio buffer was not saved, only the page count, length, and initial page offset. Thus, an aio_read() request could match a different buffer in the address space. (Earlier during development vm_fault_hold_quick_pages() was always called and the vm_page_t values were compared, but that was eventually removed without being adequately replaced.) Fix by storing the starting virtual address and comparing that (along with other fields) to determine if a buffer can be reused. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 21 23:10:56 2017 (r323883) +++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 21 23:10:59 2017 (r323884) @@ -1277,7 +1277,8 @@ pscmp(struct pageset *ps, struct vmspace *vm, vm_offse int pgoff, int len) { - if (ps->npages != npages || ps->offset != pgoff || ps->len != len) + if (ps->start != start || ps->npages != npages || + ps->offset != pgoff || ps->len != len) return (1); return (ps->vm != vm || ps->vm_timestamp != vm->vm_map.timestamp); @@ -1378,6 +1379,7 @@ hold_aio(struct toepcb *toep, struct kaiocb *job, stru ps->len = job->uaiocb.aio_nbytes; atomic_add_int(&vm->vm_refcnt, 1); ps->vm = vm; + ps->start = start; CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", __func__, toep->tid, ps, job, ps->npages); Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Thu Sep 21 23:10:56 2017 (r323883) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Thu Sep 21 23:10:59 2017 (r323884) @@ -112,6 +112,7 @@ struct pageset { int len; struct ppod_reservation prsv; struct vmspace *vm; + vm_offset_t start; u_int vm_timestamp; }; From owner-svn-src-stable-11@freebsd.org Fri Sep 22 06:16:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01CE5E18B96; Fri, 22 Sep 2017 06:16:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C45EA7FE9B; Fri, 22 Sep 2017 06:16:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8M6GLE8072591; Fri, 22 Sep 2017 06:16:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M6GLHJ072590; Fri, 22 Sep 2017 06:16:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709220616.v8M6GLHJ072590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Sep 2017 06:16: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: r323903 - stable/11/usr.bin/grep/regex X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.bin/grep/regex X-SVN-Commit-Revision: 323903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 06:16:23 -0000 Author: emaste Date: Fri Sep 22 06:16:21 2017 New Revision: 323903 URL: https://svnweb.freebsd.org/changeset/base/323903 Log: MFC r323611: fastmatch.h: remove duplicate #defines Modified: stable/11/usr.bin/grep/regex/fastmatch.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/grep/regex/fastmatch.h ============================================================================== --- stable/11/usr.bin/grep/regex/fastmatch.h Fri Sep 22 06:07:47 2017 (r323902) +++ stable/11/usr.bin/grep/regex/fastmatch.h Fri Sep 22 06:16:21 2017 (r323903) @@ -92,17 +92,4 @@ tre_fastwnexec(const fastmatch_t *preg, const wchar_t #define fastexec tre_fastexec #define fastwnexec tre_fastwnexec #define fastwexec tre_fastwexec -#define fixcomp tre_fixcomp -#define fastcomp tre_fastcomp -#define fastexec tre_fastexec -#define fastfree tre_fastfree -#define fixwcomp tre_fixwcomp -#define fastwcomp tre_fastwcomp -#define fastwexec tre_fastwexec -#define fixncomp tre_fixncomp -#define fastncomp tre_fastncomp -#define fastnexec tre_fastnexec -#define fixwncomp tre_fixwncomp -#define fastwncomp tre_fastwncomp -#define fastwnexec tre_fastwnexec #endif /* FASTMATCH_H */ From owner-svn-src-stable-11@freebsd.org Fri Sep 22 10:45:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5A5E235F0; Fri, 22 Sep 2017 10:45:52 +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 4BCCC65804; Fri, 22 Sep 2017 10:45:52 +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 v8MAjpER087304; Fri, 22 Sep 2017 10:45:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MAjppc087303; Fri, 22 Sep 2017 10:45:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221045.v8MAjppc087303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:45: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: r323919 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:45:52 -0000 Author: kib Date: Fri Sep 22 10:45:51 2017 New Revision: 323919 URL: https://svnweb.freebsd.org/changeset/base/323919 Log: MFC r323616: Batch freeing of the pages in vm_object_page_remove(). Modified: stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Fri Sep 22 08:27:27 2017 (r323918) +++ stable/11/sys/vm/vm_object.c Fri Sep 22 10:45:51 2017 (r323919) @@ -1960,6 +1960,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t { vm_page_t p, next; struct mtx *mtx; + struct pglist pgl; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1968,6 +1969,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t if (object->resident_page_count == 0) return; vm_object_pip_add(object, 1); + TAILQ_INIT(&pgl); again: p = vm_page_find_least(object, start); mtx = NULL; @@ -2019,10 +2021,13 @@ again: } if ((options & OBJPR_NOTMAPPED) == 0) pmap_remove_all(p); - vm_page_free(p); + p->flags &= ~PG_ZERO; + if (vm_page_free_prep(p, false)) + TAILQ_INSERT_TAIL(&pgl, p, listq); } if (mtx != NULL) mtx_unlock(mtx); + vm_page_free_phys_pglist(&pgl); vm_object_pip_wakeup(object); } From owner-svn-src-stable-11@freebsd.org Fri Sep 22 10:49:06 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 317F3E2382B; Fri, 22 Sep 2017 10:49:06 +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 0976F65AE0; Fri, 22 Sep 2017 10:49:05 +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 v8MAn51Q092321; Fri, 22 Sep 2017 10:49:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MAn5j8092319; Fri, 22 Sep 2017 10:49:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221049.v8MAn5j8092319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:49:05 +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: r323920 - in stable/11/sys/x86: include x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/x86: include x86 X-SVN-Commit-Revision: 323920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:49:06 -0000 Author: kib Date: Fri Sep 22 10:49:04 2017 New Revision: 323920 URL: https://svnweb.freebsd.org/changeset/base/323920 Log: MFC r323325, r323450: If IOAPIC has PCI binding, match the PCI device against MADT enumerated IOAPIC. Modified: stable/11/sys/x86/include/apicvar.h stable/11/sys/x86/x86/io_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/apicvar.h ============================================================================== --- stable/11/sys/x86/include/apicvar.h Fri Sep 22 10:45:51 2017 (r323919) +++ stable/11/sys/x86/include/apicvar.h Fri Sep 22 10:49:04 2017 (r323920) @@ -474,6 +474,8 @@ void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +int ioapic_get_rid(u_int apic_id, uint16_t *ridp); + extern int x2apic_mode; extern int lapic_eoi_suppression; Modified: stable/11/sys/x86/x86/io_apic.c ============================================================================== --- stable/11/sys/x86/x86/io_apic.c Fri Sep 22 10:45:51 2017 (r323919) +++ stable/11/sys/x86/x86/io_apic.c Fri Sep 22 10:49:04 2017 (r323920) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -99,6 +100,9 @@ struct ioapic { volatile ioapic_t *io_addr; /* XXX: should use bus_space */ vm_paddr_t io_paddr; STAILQ_ENTRY(ioapic) io_next; + device_t pci_dev; /* matched pci device, if found */ + struct resource *pci_wnd; /* BAR 0, should be same or alias to + io_paddr */ struct ioapic_intsrc io_pins[0]; }; @@ -622,6 +626,8 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int in io = malloc(sizeof(struct ioapic) + numintr * sizeof(struct ioapic_intsrc), M_IOAPIC, M_WAITOK); io->io_pic = ioapic_template; + io->pci_dev = NULL; + io->pci_wnd = NULL; mtx_lock_spin(&icu_lock); io->io_id = next_id++; io->io_apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; @@ -954,7 +960,72 @@ ioapic_pci_probe(device_t dev) static int ioapic_pci_attach(device_t dev) { + struct resource *res; + volatile ioapic_t *apic; + struct ioapic *io; + int rid; + u_int apic_id; + /* + * Try to match the enumerated ioapic. Match BAR start + * against io_paddr. Due to a fear that PCI window is not the + * same as the MADT reported io window, but an alias, read the + * APIC ID from the mapped BAR and match against it. + */ + rid = PCIR_BAR(0); + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (res == NULL) { + if (bootverbose) + device_printf(dev, "cannot activate BAR0\n"); + return (ENXIO); + } + apic = (volatile ioapic_t *)rman_get_virtual(res); + if (rman_get_size(res) < IOAPIC_WND_SIZE) { + if (bootverbose) + device_printf(dev, + "BAR0 too small (%jd) for IOAPIC window\n", + (uintmax_t)rman_get_size(res)); + goto fail; + } + mtx_lock_spin(&icu_lock); + apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; + /* First match by io window address */ + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_paddr == (vm_paddr_t)rman_get_start(res)) + goto found; + } + /* Then by apic id */ + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_apic_id == apic_id) + goto found; + } + mtx_unlock_spin(&icu_lock); + if (bootverbose) + device_printf(dev, + "cannot match pci bar apic id %d against MADT\n", + apic_id); +fail: + bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + return (ENXIO); +found: + KASSERT(io->pci_dev == NULL, + ("ioapic %d pci_dev not NULL", io->io_id)); + KASSERT(io->pci_wnd == NULL, + ("ioapic %d pci_wnd not NULL", io->io_id)); + + io->pci_dev = dev; + io->pci_wnd = res; + if (bootverbose && (io->io_paddr != (vm_paddr_t)rman_get_start(res) || + io->io_apic_id != apic_id)) { + device_printf(dev, "pci%d:%d:%d:%d pci BAR0@%jx id %d " + "MADT id %d paddr@%jx\n", + pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), pci_get_function(dev), + (uintmax_t)rman_get_start(res), apic_id, + io->io_apic_id, (uintmax_t)io->io_paddr); + } + mtx_unlock_spin(&icu_lock); return (0); } @@ -971,6 +1042,28 @@ DEFINE_CLASS_0(ioapic, ioapic_pci_driver, ioapic_pci_m static devclass_t ioapic_devclass; DRIVER_MODULE(ioapic, pci, ioapic_pci_driver, ioapic_devclass, 0, 0); +int +ioapic_get_rid(u_int apic_id, uint16_t *ridp) +{ + struct ioapic *io; + uintptr_t rid; + int error; + + mtx_lock_spin(&icu_lock); + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_apic_id == apic_id) + break; + } + mtx_unlock_spin(&icu_lock); + if (io == NULL || io->pci_dev == NULL) + return (EINVAL); + error = pci_get_id(io->pci_dev, PCI_ID_RID, &rid); + if (error != 0) + return (error); + *ridp = rid; + return (0); +} + /* * A new-bus driver to consume the memory resources associated with * the APICs in the system. On some systems ACPI or PnPBIOS system @@ -1008,7 +1101,7 @@ apic_add_resource(device_t dev, int rid, vm_paddr_t ba if (error) panic("apic_add_resource: resource %d failed set with %d", rid, error); - bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_SHAREABLE); } static int From owner-svn-src-stable-11@freebsd.org Fri Sep 22 10:51:33 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C0EFE23BD1; Fri, 22 Sep 2017 10:51:33 +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 5874966190; Fri, 22 Sep 2017 10:51:33 +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 v8MApWGx093262; Fri, 22 Sep 2017 10:51:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MApWf8093261; Fri, 22 Sep 2017 10:51:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221051.v8MApWf8093261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:51:32 +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: r323921 - stable/11/sys/x86/iommu X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/x86/iommu X-SVN-Commit-Revision: 323921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:51:33 -0000 Author: kib Date: Fri Sep 22 10:51:32 2017 New Revision: 323921 URL: https://svnweb.freebsd.org/changeset/base/323921 Log: MFC r323326: Use IOAPIC PCI rid as the interrupt TLP source id for DMAR interrupt remapping. Modified: stable/11/sys/x86/iommu/intel_drv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/iommu/intel_drv.c ============================================================================== --- stable/11/sys/x86/iommu/intel_drv.c Fri Sep 22 10:49:04 2017 (r323920) +++ stable/11/sys/x86/iommu/intel_drv.c Fri Sep 22 10:51:32 2017 (r323921) @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_APIC #include "pcib_if.h" +#include +#include +#include #endif #define DMAR_FAULT_IRQ_RID 0 @@ -788,6 +791,9 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t ACPI_DMAR_DEVICE_SCOPE *devscope; ACPI_DMAR_PCI_PATH *path; char *ptr, *ptrend; +#ifdef DEV_APIC + int error; +#endif int i; for (i = 0; i < dmar_devcnt; i++) { @@ -809,6 +815,17 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t continue; if (devscope->EnumerationId != id) continue; +#ifdef DEV_APIC + if (entry_type == ACPI_DMAR_SCOPE_TYPE_IOAPIC) { + error = ioapic_get_rid(id, rid); + /* + * If our IOAPIC has PCI bindings then + * use the PCI device rid. + */ + if (error == 0) + return (unit); + } +#endif if (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE) == 2) { if (rid != NULL) { @@ -818,12 +835,11 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t path->Device, path->Function); } return (unit); - } else { - /* XXXKIB */ - printf( - "dmar_find_nonpci: id %d type %d path length != 2\n", - id, entry_type); } + printf( + "dmar_find_nonpci: id %d type %d path length != 2\n", + id, entry_type); + break; } } return (NULL); From owner-svn-src-stable-11@freebsd.org Fri Sep 22 14:40:05 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E82C9E0001E; Fri, 22 Sep 2017 14:40:05 +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 B3ED86E7D4; Fri, 22 Sep 2017 14:40:05 +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 v8MEe46H089531; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MEe4Nr089530; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709221440.v8MEe4Nr089530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Sep 2017 14:40:04 +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: r323925 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 14:40:06 -0000 Author: gjb Date: Fri Sep 22 14:40:04 2017 New Revision: 323925 URL: https://svnweb.freebsd.org/changeset/base/323925 Log: MFC r323924: Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/arm.subr Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Fri Sep 22 14:34:27 2017 (r323924) +++ stable/11/release/tools/arm.subr Fri Sep 22 14:40:04 2017 (r323925) @@ -99,16 +99,6 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution - - # Bootstrap etcupdate(8) and mergemaster(8) databases. - mkdir -p ${DESTDIR}/var/db/etcupdate - etcupdate extract -B \ - -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate - sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ - -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -D ${DESTDIR} - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-svn-src-stable-11@freebsd.org Fri Sep 22 15:40:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17ABBE02396; Fri, 22 Sep 2017 15:40:58 +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 E568C70DD9; Fri, 22 Sep 2017 15:40:57 +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 v8MFeuwx016218; Fri, 22 Sep 2017 15:40:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFeuxS016212; Fri, 22 Sep 2017 15:40:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221540.v8MFeuxS016212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:40: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: r323929 - in stable/11/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Commit-Revision: 323929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:40:58 -0000 Author: ian Date: Fri Sep 22 15:40:56 2017 New Revision: 323929 URL: https://svnweb.freebsd.org/changeset/base/323929 Log: MFC r323642: Add a missing header file to SRCS to fix out-of-kernel builds. PR: 222354 Submitted by: eugen@ Pointy hat: ian@ Modified: stable/11/sys/modules/i2c/ds1307/Makefile stable/11/sys/modules/i2c/ds13rtc/Makefile stable/11/sys/modules/i2c/ds3231/Makefile stable/11/sys/modules/i2c/isl12xx/Makefile stable/11/sys/modules/i2c/nxprtc/Makefile stable/11/sys/modules/i2c/s35390a/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/i2c/ds1307/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds1307/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds1307/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds1307 -SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/ds13rtc/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds13rtc/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds13rtc/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds13rtc -SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/ds3231/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds3231/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds3231/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds3231 -SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/isl12xx/Makefile ============================================================================== --- stable/11/sys/modules/i2c/isl12xx/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/isl12xx/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = isl12xx -SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/nxprtc/Makefile ============================================================================== --- stable/11/sys/modules/i2c/nxprtc/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/nxprtc/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = nxprtc -SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/s35390a/Makefile ============================================================================== --- stable/11/sys/modules/i2c/s35390a/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/s35390a/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = s35390a -SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include From owner-svn-src-stable-11@freebsd.org Fri Sep 22 15:47:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E83DE026D4; Fri, 22 Sep 2017 15:47:37 +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 2AC0671276; Fri, 22 Sep 2017 15:47:37 +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 v8MFlaMM019385; Fri, 22 Sep 2017 15:47:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFlauh019384; Fri, 22 Sep 2017 15:47:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221547.v8MFlauh019384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:47:36 +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: r323930 - stable/11/usr.sbin/i2c X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/usr.sbin/i2c X-SVN-Commit-Revision: 323930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:47:37 -0000 Author: ian Date: Fri Sep 22 15:47:35 2017 New Revision: 323930 URL: https://svnweb.freebsd.org/changeset/base/323930 Log: MFC r323465: Make i2c -s (device scan) work on hardware that supports only full xfers. The existing scan code is based on sending an i2c START condition and if there is no error it assumes there is a device at that i2c address. Some i2c controllers don't support sending individual start/stop signals on the bus, they can only perform complete data transfers with start/stop handled in the silicon. This adds a fallback mechanism that attempts to read a single byte from each i2c address. It's less reliable than looking for an an ACK repsonse to a start, because some devices will NAK an attempt to read that isn't preceeded by a write of a register address. Writing to devices to probe them is too dangerous to even consider. The user is told that a less-reliable scan is being done, so even if the read-scan comes up empty too, it's still a vast improvement over the old situation where it would just claim there were no devices on the bus even though the devices were there and working fine. If the i2c controller responds with a proper ENODEV (device doesn't support operation) or an almost-proper EOPNOTSUPP, the START/STOP scan is switched to a read-scan right away. Most controllers respond with ENXIO or EIO if they don't support START/STOP, so no quick-out is available. For those, if a scan of all 127 addresses and come up empty, the scan is re-done using the read method. Reported by: Maxim Filimonov Modified: stable/11/usr.sbin/i2c/i2c.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/i2c/i2c.c ============================================================================== --- stable/11/usr.sbin/i2c/i2c.c Fri Sep 22 15:40:56 2017 (r323929) +++ stable/11/usr.sbin/i2c/i2c.c Fri Sep 22 15:47:35 2017 (r323930) @@ -121,9 +121,12 @@ skip_get_tokens(char *skip_addr, int *sk_addr, int max static int scan_bus(struct iiccmd cmd, char *dev, int skip, char *skip_addr) { + struct iic_msg rdmsg; + struct iic_rdwr_data rdwrdata; struct skip_range addr_range = { 0, 0 }; int *tokens, fd, error, i, index, j; - int len = 0, do_skip = 0, no_range = 1; + int len = 0, do_skip = 0, no_range = 1, num_found = 0, use_read_xfer = 0; + uint8_t rdbyte; fd = open(dev, O_RDWR); if (fd == -1) { @@ -157,6 +160,14 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char } printf("Scanning I2C devices on %s: ", dev); + +start_over: + if (use_read_xfer) { + fprintf(stderr, + "Hardware may not support START/STOP scanning; " + "trying less-reliable read method.\n"); + } + for (i = 1; i < 127; i++) { if (skip && ( addr_range.start < addr_range.end)) { @@ -180,17 +191,46 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char cmd.last = 1; cmd.count = 0; error = ioctl(fd, I2CRSTCARD, &cmd); - if (error) + if (error) { + fprintf(stderr, "Controller reset failed\n"); goto out; - - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTART, &cmd); - if (!error) - printf("%x ", i); - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTOP, &cmd); + } + if (use_read_xfer) { + rdmsg.buf = &rdbyte; + rdmsg.len = 1; + rdmsg.flags = IIC_M_RD; + rdmsg.slave = i << 1; + rdwrdata.msgs = &rdmsg; + rdwrdata.nmsgs = 1; + error = ioctl(fd, I2CRDWR, &rdwrdata); + } else { + cmd.slave = i << 1; + cmd.last = 1; + error = ioctl(fd, I2CSTART, &cmd); + if (errno == ENODEV || errno == EOPNOTSUPP) { + /* If START not supported try reading. */ + use_read_xfer = 1; + goto start_over; + } + cmd.slave = i << 1; + cmd.last = 1; + ioctl(fd, I2CSTOP, &cmd); + } + if (error == 0) { + ++num_found; + printf("%02x ", i); + } + } + /* + * If we found nothing, maybe START is not supported and returns a + * generic error code such as EIO or ENXIO, so try again using reads. + */ + if (num_found == 0) { + if (!use_read_xfer) { + use_read_xfer = 1; + goto start_over; + } + printf(""); } printf("\n"); From owner-svn-src-stable-11@freebsd.org Fri Sep 22 15:53:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2855FE02F59; Fri, 22 Sep 2017 15:53:24 +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 042B871DC0; Fri, 22 Sep 2017 15:53:23 +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 v8MFrNkV024285; Fri, 22 Sep 2017 15:53:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFrM6J024277; Fri, 22 Sep 2017 15:53:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221553.v8MFrM6J024277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:53:22 +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: r323931 - in stable/11/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic dev/iicbus modules/i2c modules/i2c/icee X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic dev/iicbus modules/i2c modules/i2c/icee X-SVN-Commit-Revision: 323931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:53:24 -0000 Author: ian Date: Fri Sep 22 15:53:22 2017 New Revision: 323931 URL: https://svnweb.freebsd.org/changeset/base/323931 Log: MFC r323474, r323553, r323691 r323474: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms. r323553: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers. This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early. r323691: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it. Added: stable/11/sys/modules/i2c/icee/ - copied from r323691, head/sys/modules/i2c/icee/ Modified: stable/11/sys/arm/at91/at91_twi.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/11/sys/arm/freescale/imx/imx_i2c.c stable/11/sys/arm/ti/ti_i2c.c stable/11/sys/dev/glxiic/glxiic.c stable/11/sys/dev/iicbus/icee.c stable/11/sys/dev/iicbus/iicbus_if.m stable/11/sys/modules/i2c/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/at91/at91_twi.c ============================================================================== --- stable/11/sys/arm/at91/at91_twi.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/at91/at91_twi.c Fri Sep 22 15:53:22 2017 (r323931) @@ -161,8 +161,8 @@ at91_twi_attach(device_t dev) if ((sc->iicbus = device_add_child(dev, "iicbus", -1)) == NULL) device_printf(dev, "could not allocate iicbus instance\n"); - /* probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) at91_twi_deactivate(dev); Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Sep 22 15:53:22 2017 (r323931) @@ -308,7 +308,10 @@ bcm_bsc_attach(device_t dev) return (ENXIO); } - return (bus_generic_attach(dev)); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + + return (0); } static int Modified: stable/11/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx_i2c.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/freescale/imx/imx_i2c.c Fri Sep 22 15:53:22 2017 (r323931) @@ -444,7 +444,8 @@ no_recovery: /* We don't do a hardware reset here because iicbus_attach() does it. */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); return (0); } Modified: stable/11/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/11/sys/arm/ti/ti_i2c.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/ti/ti_i2c.c Fri Sep 22 15:53:22 2017 (r323931) @@ -37,11 +37,6 @@ * incorporate that sometime in the future. The idea being that for transaction * larger than a certain size the DMA engine is used, for anything less the * normal interrupt/fifo driven option is used. - * - * - * WARNING: This driver uses mtx_sleep and interrupts to perform transactions, - * which means you can't do a transaction during startup before the interrupts - * have been enabled. Hint - the freebsd function config_intrhook_establish(). */ #include @@ -909,8 +904,8 @@ ti_i2c_attach(device_t dev) goto out; } - /* Probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) { Modified: stable/11/sys/dev/glxiic/glxiic.c ============================================================================== --- stable/11/sys/dev/glxiic/glxiic.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/glxiic/glxiic.c Fri Sep 22 15:53:22 2017 (r323931) @@ -408,11 +408,10 @@ glxiic_attach(device_t dev) glxiic_gpio_enable(sc); glxiic_smb_enable(sc, IIC_FASTEST, 0); - error = bus_generic_attach(dev); - if (error != 0) { - device_printf(dev, "Could not probe and attach children\n"); - error = ENXIO; - } + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + error = 0; + out: if (error != 0) { callout_drain(&sc->callout); Modified: stable/11/sys/dev/iicbus/icee.c ============================================================================== --- stable/11/sys/dev/iicbus/icee.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/iicbus/icee.c Fri Sep 22 15:53:22 2017 (r323931) @@ -206,17 +206,34 @@ icee_attach(device_t dev) return (0); } +static int +icee_detach(device_t dev) +{ + struct icee_softc *sc = device_get_softc(dev); + + destroy_dev(sc->cdev); + return (0); +} + static int icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + if (device_get_state(sc->dev) < DS_BUSY) + device_busy(sc->dev); + return (0); } static int icee_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + device_unbusy(sc->dev); return (0); } @@ -345,6 +362,7 @@ icee_write(struct cdev *dev, struct uio *uio, int iofl static device_method_t icee_methods[] = { DEVMETHOD(device_probe, icee_probe), DEVMETHOD(device_attach, icee_attach), + DEVMETHOD(device_detach, icee_detach), DEVMETHOD_END }; Modified: stable/11/sys/dev/iicbus/iicbus_if.m ============================================================================== --- stable/11/sys/dev/iicbus/iicbus_if.m Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/iicbus/iicbus_if.m Fri Sep 22 15:53:22 2017 (r323931) @@ -32,6 +32,12 @@ INTERFACE iicbus; CODE { + static int iicbus_nosupport(void) + { + + return (ENODEV); + } + static u_int iicbus_default_frequency(device_t bus, u_char speed) { @@ -69,7 +75,7 @@ METHOD int repeated_start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send START condition @@ -78,14 +84,14 @@ METHOD int start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send STOP condition # METHOD int stop { device_t dev; -}; +} DEFAULT iicbus_nosupport; # # Read from I2C bus @@ -97,7 +103,7 @@ METHOD int read { int *bytes; int last; int delay; -}; +} DEFAULT iicbus_nosupport; # # Write to the I2C bus @@ -108,7 +114,7 @@ METHOD int write { int len; int *bytes; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Reset I2C bus Modified: stable/11/sys/modules/i2c/Makefile ============================================================================== --- stable/11/sys/modules/i2c/Makefile Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/modules/i2c/Makefile Fri Sep 22 15:53:22 2017 (r323931) @@ -6,6 +6,7 @@ SUBDIR = \ ds1307 \ ds13rtc \ ds3231 \ + icee \ if_ic \ iic \ iicbb \ From owner-svn-src-stable-11@freebsd.org Sat Sep 23 12:28:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E84EE045FD; Sat, 23 Sep 2017 12:28:57 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC8F71BED; Sat, 23 Sep 2017 12:28:57 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NCSunL028911; Sat, 23 Sep 2017 12:28:56 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCSuJ6028910; Sat, 23 Sep 2017 12:28:56 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709231228.v8NCSuJ6028910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 23 Sep 2017 12:28: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: r323949 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 323949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:28:57 -0000 Author: oshogbo Date: Sat Sep 23 12:28:56 2017 New Revision: 323949 URL: https://svnweb.freebsd.org/changeset/base/323949 Log: MFC r323654: Fix names of the array functions in the nv man page. Submitted by: def@ Modified: stable/11/share/man/man9/nv.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/nv.9 ============================================================================== --- stable/11/share/man/man9/nv.9 Sat Sep 23 11:09:25 2017 (r323948) +++ stable/11/share/man/man9/nv.9 Sat Sep 23 12:28:56 2017 (r323949) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2015 +.Dd September 16, 2017 .Dt NV 9 .Os .Sh NAME @@ -201,11 +201,11 @@ .Ft "const bool *" .Fn nvlist_get_bool_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const uint64_t *" -.Fn nvlist_get_number "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_number_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const char * const *" -.Fn nvlist_get_string "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_string_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t * const *" -.Fn nvlist_get_nvlist "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_nvlist_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const int *" .Fn nvlist_get_descriptor_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t *" @@ -230,13 +230,13 @@ .Ft "bool *" .Fn nvlist_take_bool_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "uint64_t **" -.Fn nvlist_take_number "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_number_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "char **" -.Fn nvlist_take_string "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_string_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "nvlist_t **" -.Fn nvlist_take_nvlist "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_nvlist_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "int *" -.Fn nvlist_take_descriptor "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_descriptor_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .\" .Ft void .Fn nvlist_free "nvlist_t *nvl" "const char *name" From owner-svn-src-stable-11@freebsd.org Sat Sep 23 12:32:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B348DE047F0; Sat, 23 Sep 2017 12:32:12 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8914871F1E; Sat, 23 Sep 2017 12:32:12 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NCWB8L033022; Sat, 23 Sep 2017 12:32:11 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCWBeg033021; Sat, 23 Sep 2017 12:32:11 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709231232.v8NCWBeg033021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 23 Sep 2017 12:32:11 +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: r323950 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 323950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:32:12 -0000 Author: oshogbo Date: Sat Sep 23 12:32:11 2017 New Revision: 323950 URL: https://svnweb.freebsd.org/changeset/base/323950 Log: MFC r323655: Add missing links to the nv man page. Modified: stable/11/share/man/man9/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Sat Sep 23 12:28:56 2017 (r323949) +++ stable/11/share/man/man9/Makefile Sat Sep 23 12:32:11 2017 (r323950) @@ -1207,13 +1207,18 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist.9 \ nv.9 nvlist_add_binary.9 \ nv.9 nvlist_add_bool.9 \ + nv.9 nvlist_add_bool_array.9 \ nv.9 nvlist_add_descriptor.9 \ + nv.9 nvlist_add_descriptor_array.9 \ nv.9 nvlist_add_null.9 \ nv.9 nvlist_add_number.9 \ + nv.9 nvlist_add_number_array.9 \ nv.9 nvlist_add_nvlist.9 \ + nv.9 nvlist_add_nvlist_array.9 \ nv.9 nvlist_add_string.9 \ nv.9 nvlist_add_stringf.9 \ nv.9 nvlist_add_stringv.9 \ + nv.9 nvlist_add_string_array.9 \ nv.9 nvlist_clone.9 \ nv.9 nvlist_create.9 \ nv.9 nvlist_destroy.9 \ @@ -1223,10 +1228,14 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_exists.9 \ nv.9 nvlist_exists_binary.9 \ nv.9 nvlist_exists_bool.9 \ + nv.9 nvlist_exists_bool_array.9 \ nv.9 nvlist_exists_descriptor.9 \ + nv.9 nvlist_exists_descriptor_array.9 \ nv.9 nvlist_exists_null.9 \ nv.9 nvlist_exists_number.9 \ + nv.9 nvlist_exists_number_array.9 \ nv.9 nvlist_exists_nvlist.9 \ + nv.9 nvlist_exists_nvlist_array.9 \ nv.9 nvlist_exists_string.9 \ nv.9 nvlist_exists_type.9 \ nv.9 nvlist_fdump.9 \ @@ -1234,23 +1243,36 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_free.9 \ nv.9 nvlist_free_binary.9 \ nv.9 nvlist_free_bool.9 \ + nv.9 nvlist_free_bool_array.9 \ nv.9 nvlist_free_descriptor.9 \ + nv.9 nvlist_free_descriptor_array.9 \ nv.9 nvlist_free_null.9 \ nv.9 nvlist_free_number.9 \ + nv.9 nvlist_free_number_array.9 \ nv.9 nvlist_free_nvlist.9 \ + nv.9 nvlist_free_nvlist_array.9 \ nv.9 nvlist_free_string.9 \ + nv.9 nvlist_free_string_array.9 \ nv.9 nvlist_free_type.9 \ nv.9 nvlist_get_binary.9 \ nv.9 nvlist_get_bool.9 \ + nv.9 nvlist_get_bool_array.9 \ nv.9 nvlist_get_descriptor.9 \ + nv.9 nvlist_get_descriptor_array.9 \ nv.9 nvlist_get_number.9 \ + nv.9 nvlist_get_number_array.9 \ nv.9 nvlist_get_nvlist.9 \ + nv.9 nvlist_get_nvlist_array.9 \ nv.9 nvlist_get_parent.9 \ nv.9 nvlist_get_string.9 \ + nv.9 nvlist_get_string_array.9 \ nv.9 nvlist_move_binary.9 \ nv.9 nvlist_move_descriptor.9 \ + nv.9 nvlist_move_descriptor_array.9 \ nv.9 nvlist_move_nvlist.9 \ + nv.9 nvlist_move_nvlist_array.9 \ nv.9 nvlist_move_string.9 \ + nv.9 nvlist_move_string_array.9 \ nv.9 nvlist_next.9 \ nv.9 nvlist_pack.9 \ nv.9 nvlist_recv.9 \ @@ -1259,10 +1281,15 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_size.9 \ nv.9 nvlist_take_binary.9 \ nv.9 nvlist_take_bool.9 \ + nv.9 nvlist_take_bool_array.9 \ nv.9 nvlist_take_descriptor.9 \ + nv.9 nvlist_take_descriptor_array.9 \ nv.9 nvlist_take_number.9 \ + nv.9 nvlist_take_number_array.9 \ nv.9 nvlist_take_nvlist.9 \ + nv.9 nvlist_take_nvlist_array.9 \ nv.9 nvlist_take_string.9 \ + nv.9 nvlist_take_string_array.9 \ nv.9 nvlist_unpack.9 \ nv.9 nvlist_xfer.9 MLINKS+=osd.9 osd_call.9 \