From owner-svn-src-stable-12@freebsd.org Sun Jun 14 05:25:07 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34AD232F021; Sun, 14 Jun 2020 05:25:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49l2wM0bNkz3gF8; Sun, 14 Jun 2020 05:25:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA1A8276BB; Sun, 14 Jun 2020 05:25:06 +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 05E5P6ZW061061; Sun, 14 Jun 2020 05:25:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05E5P6TB061059; Sun, 14 Jun 2020 05:25:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006140525.05E5P6TB061059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 14 Jun 2020 05:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362166 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 362166 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2020 05:25:07 -0000 Author: hselasky Date: Sun Jun 14 05:25:06 2020 New Revision: 362166 URL: https://svnweb.freebsd.org/changeset/base/362166 Log: MFC r362056: Add missing range checks when receiving USB ethernet packets. Found by: Ilja Van Sprundel, IOActive Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/net/if_cdceem.c stable/12/sys/dev/usb/net/if_muge.c stable/12/sys/dev/usb/net/if_smsc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_cdceem.c ============================================================================== --- stable/12/sys/dev/usb/net/if_cdceem.c Sun Jun 14 05:08:15 2020 (r362165) +++ stable/12/sys/dev/usb/net/if_cdceem.c Sun Jun 14 05:25:06 2020 (r362166) @@ -426,9 +426,10 @@ cdceem_handle_data(struct usb_xfer *xfer, uint16_t hdr struct usb_ether *ue; struct ifnet *ifp; struct mbuf *m; - int actlen, off; uint32_t computed_crc, received_crc; - uint16_t pktlen; + int pktlen; + int actlen; + int off; off = *offp; sc = usbd_xfer_softc(xfer); @@ -442,7 +443,7 @@ cdceem_handle_data(struct usb_xfer *xfer, uint16_t hdr (hdr & CDCEEM_DATA_CRC) ? "valid" : "absent", pktlen); - if (pktlen < ETHER_HDR_LEN) { + if (pktlen < (ETHER_HDR_LEN + 4)) { CDCEEM_WARN(sc, "bad ethernet frame length %d, should be at least %d", pktlen, ETHER_HDR_LEN); @@ -466,6 +467,14 @@ cdceem_handle_data(struct usb_xfer *xfer, uint16_t hdr } pktlen -= 4; /* Subtract the CRC. */ + + if (pktlen > m->m_len) { + CDCEEM_WARN(sc, "buffer too small %d vs %d bytes", + pktlen, m->m_len); + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + m_freem(m); + return; + } usbd_copy_out(pc, off, mtod(m, uint8_t *), pktlen); off += pktlen; @@ -512,7 +521,7 @@ cdceem_bulk_read_callback(struct usb_xfer *xfer, usb_e pc = usbd_xfer_get_frame(xfer, 0); off = 0; - while (off < actlen) { + while ((off + sizeof(hdr)) <= actlen) { usbd_copy_out(pc, off, &hdr, sizeof(hdr)); CDCEEM_DEBUG(sc, "hdr = %#x", hdr); off += sizeof(hdr); Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Sun Jun 14 05:08:15 2020 (r362165) +++ stable/12/sys/dev/usb/net/if_muge.c Sun Jun 14 05:25:06 2020 (r362166) @@ -1166,9 +1166,9 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err struct ifnet *ifp = uether_getifp(ue); struct mbuf *m; struct usb_page_cache *pc; - uint16_t pktlen; uint32_t rx_cmd_a, rx_cmd_b; uint16_t rx_cmd_c; + int pktlen; int off; int actlen; @@ -1246,7 +1246,14 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err 1); goto tr_setup; } - + if (pktlen > m->m_len) { + muge_dbg_printf(sc, + "buffer too small %d vs %d bytes", + pktlen, m->m_len); + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + m_freem(m); + goto tr_setup; + } usbd_copy_out(pc, off, mtod(m, uint8_t *), pktlen); Modified: stable/12/sys/dev/usb/net/if_smsc.c ============================================================================== --- stable/12/sys/dev/usb/net/if_smsc.c Sun Jun 14 05:08:15 2020 (r362165) +++ stable/12/sys/dev/usb/net/if_smsc.c Sun Jun 14 05:25:06 2020 (r362166) @@ -973,7 +973,7 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err struct mbuf *m; struct usb_page_cache *pc; uint32_t rxhdr; - uint16_t pktlen; + int pktlen; int off; int actlen; @@ -999,6 +999,9 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err /* The frame header is always aligned on a 4 byte boundary */ off = ((off + 0x3) & ~0x3); + if ((off + sizeof(rxhdr)) > actlen) + goto tr_setup; + usbd_copy_out(pc, off, &rxhdr, sizeof(rxhdr)); off += (sizeof(rxhdr) + ETHER_ALIGN); rxhdr = le32toh(rxhdr); @@ -1027,7 +1030,13 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); goto tr_setup; } - + if (pktlen > m->m_len) { + smsc_dbg_printf(sc, "buffer too small %d vs %d bytes", + pktlen, m->m_len); + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + m_freem(m); + goto tr_setup; + } usbd_copy_out(pc, off, mtod(m, uint8_t *), pktlen); /* Check if RX TCP/UDP checksumming is being offloaded */ From owner-svn-src-stable-12@freebsd.org Sun Jun 14 17:36:46 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFAFC340735; Sun, 14 Jun 2020 17:36:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lM8Z3hglz4hs9; Sun, 14 Jun 2020 17:36:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7944E1021D; Sun, 14 Jun 2020 17:36:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05EHakWx019513; Sun, 14 Jun 2020 17:36:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05EHainf019500; Sun, 14 Jun 2020 17:36:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006141736.05EHainf019500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 14 Jun 2020 17:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362180 - in stable/12: contrib/apr contrib/apr-util contrib/apr-util/buckets contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbd/unsupported contrib/apr-util/dbm/sdbm con... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: contrib/apr contrib/apr-util contrib/apr-util/buckets contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbd/unsupported contrib/apr-util/dbm/sdbm contrib/apr-util/include con... X-SVN-Commit-Revision: 362180 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2020 17:36:46 -0000 Author: dim Date: Sun Jun 14 17:36:43 2020 New Revision: 362180 URL: https://svnweb.freebsd.org/changeset/base/362180 Log: Update Subversion and dependencies to 1.14.0 LTS. MFC r344438 (by emaste): svn: support building with WITH_PIE Subversion builds and links against its own .a archives using local rules, so did not benefit from with the WITH_PIE library support added in r344179. Apply the same _pie suffix locally. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D19246 MFC r352156 (by imp): Remove directory empty after r266735 MFC r357299 (by cem): contrib/apr: Remove scope leak UB In apr_vformatter, the variable buf was declared inside a limited scope region, but a pointer to it is leaked outside of that region and used later. This is undefined behavior. Fix by moving the buf variable to function scope. Reported by: Coverity CID: 1192541 MFC r357301 (by cem): contrib/apr: Rip out bogus [CS]PRNG implementation This construction used some relatively slow design involving SHA2; even if it were fed real entropy (unclear; external to the design), it did not handle fork in a safe way, and it was difficult to audit for correctness. So just rip it out and use the very simple and known-correct arc4random(3) interface in its place. MFC r361677: Change Makefiles under usr.bin/svn to make them easier to incrementally update. No functional change intended. MFC r361678: Update apr to 1.7.0. See contrib/apr/CHANGES for a summary of changes. MFC r361681: Change more Makefiles under usr.bin/svn to make them easier to incrementally update. No functional change intended. MFC r361684 (by kevans): apr: build some needed emulated 64-bit atomic bits after r361678 This should fix the build on armv{6,7}, mips, and mips64, which all need emulated 64-bit atomics for apr. MFC r361691: Follow-up r361678 (update apr to 1.7.0) by also regenerating the apr internal headers through the upstream configure script, with some minor custom tweaks. MFC r361692: Update apr-util to 1.6.1. See contrib/apr-util/CHANGES for a summary of changes. MFC r361693: Update Subversion to 1.14.0 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: https://subversion.apache.org/docs/release-notes/1.14 NOTE: there is no need to dump and reload repositories, and the working copy format is still the same as Subversion 1.8 through 1.13. Relnotes: yes Added: stable/12/contrib/apr-util/CMakeLists.txt - copied unchanged from r361692, head/contrib/apr-util/CMakeLists.txt stable/12/contrib/apr-util/README.FREETDS - copied unchanged from r361692, head/contrib/apr-util/README.FREETDS stable/12/contrib/apr-util/README.cmake - copied unchanged from r361692, head/contrib/apr-util/README.cmake stable/12/contrib/apr-util/crypto/apr_crypto_commoncrypto.c - copied unchanged from r361692, head/contrib/apr-util/crypto/apr_crypto_commoncrypto.c stable/12/contrib/apr-util/crypto/apr_siphash.c - copied unchanged from r361692, head/contrib/apr-util/crypto/apr_siphash.c stable/12/contrib/apr-util/dbd/unsupported/ - copied from r361692, head/contrib/apr-util/dbd/unsupported/ stable/12/contrib/apr-util/include/apr_ldap.hwc - copied unchanged from r361692, head/contrib/apr-util/include/apr_ldap.hwc stable/12/contrib/apr-util/include/apr_redis.h - copied unchanged from r361692, head/contrib/apr-util/include/apr_redis.h stable/12/contrib/apr-util/include/apr_siphash.h - copied unchanged from r361692, head/contrib/apr-util/include/apr_siphash.h stable/12/contrib/apr-util/include/apu.hwc - copied unchanged from r361692, head/contrib/apr-util/include/apu.hwc stable/12/contrib/apr-util/redis/ - copied from r361692, head/contrib/apr-util/redis/ stable/12/contrib/apr-util/test/testredis.c - copied unchanged from r361692, head/contrib/apr-util/test/testredis.c stable/12/contrib/apr-util/test/testsiphash.c - copied unchanged from r361692, head/contrib/apr-util/test/testsiphash.c stable/12/contrib/apr/atomic/unix/builtins64.c - copied unchanged from r361678, head/contrib/apr/atomic/unix/builtins64.c stable/12/contrib/apr/atomic/unix/mutex64.c - copied unchanged from r361678, head/contrib/apr/atomic/unix/mutex64.c stable/12/contrib/apr/encoding/apr_encode.c - copied unchanged from r361678, head/contrib/apr/encoding/apr_encode.c stable/12/contrib/apr/include/apr_cstr.h - copied unchanged from r361678, head/contrib/apr/include/apr_cstr.h stable/12/contrib/apr/include/apr_encode.h - copied unchanged from r361678, head/contrib/apr/include/apr_encode.h stable/12/contrib/apr/include/apr_perms_set.h - copied unchanged from r361678, head/contrib/apr/include/apr_perms_set.h stable/12/contrib/apr/poll/unix/wakeup.c - copied unchanged from r361678, head/contrib/apr/poll/unix/wakeup.c stable/12/contrib/apr/strings/apr_cstr.c - copied unchanged from r361678, head/contrib/apr/strings/apr_cstr.c stable/12/contrib/subversion/.swig_pl_checked - copied unchanged from r361693, head/contrib/subversion/.swig_pl_checked stable/12/contrib/subversion/.swig_py_checked - copied unchanged from r361693, head/contrib/subversion/.swig_py_checked stable/12/contrib/subversion/.swig_rb_checked - copied unchanged from r361693, head/contrib/subversion/.swig_rb_checked stable/12/contrib/subversion/subversion/include/private/svn_client_shelf.h - copied unchanged from r361693, head/contrib/subversion/subversion/include/private/svn_client_shelf.h stable/12/contrib/subversion/subversion/include/private/svn_client_shelf2.h - copied unchanged from r361693, head/contrib/subversion/subversion/include/private/svn_client_shelf2.h stable/12/contrib/subversion/subversion/include/private/svn_dirent_uri_private.h - copied unchanged from r361693, head/contrib/subversion/subversion/include/private/svn_dirent_uri_private.h stable/12/contrib/subversion/subversion/include/svn_opt_impl.h - copied unchanged from r361693, head/contrib/subversion/subversion/include/svn_opt_impl.h stable/12/contrib/subversion/subversion/include/svn_types_impl.h - copied unchanged from r361693, head/contrib/subversion/subversion/include/svn_types_impl.h stable/12/contrib/subversion/subversion/libsvn_client/layout.c - copied unchanged from r361693, head/contrib/subversion/subversion/libsvn_client/layout.c stable/12/contrib/subversion/subversion/libsvn_client/shelf.c - copied unchanged from r361693, head/contrib/subversion/subversion/libsvn_client/shelf.c stable/12/contrib/subversion/subversion/libsvn_client/shelf2.c - copied unchanged from r361693, head/contrib/subversion/subversion/libsvn_client/shelf2.c stable/12/contrib/subversion/subversion/libsvn_client/wc_editor.c - copied unchanged from r361693, head/contrib/subversion/subversion/libsvn_client/wc_editor.c stable/12/contrib/subversion/subversion/libsvn_repos/dump_editor.c - copied unchanged from r361693, head/contrib/subversion/subversion/libsvn_repos/dump_editor.c stable/12/contrib/subversion/subversion/svn/filesize.c - copied unchanged from r361693, head/contrib/subversion/subversion/svn/filesize.c stable/12/contrib/subversion/subversion/svn/shelf-cmd.c - copied unchanged from r361693, head/contrib/subversion/subversion/svn/shelf-cmd.c stable/12/contrib/subversion/subversion/svn/shelf-cmd.h - copied unchanged from r361693, head/contrib/subversion/subversion/svn/shelf-cmd.h stable/12/contrib/subversion/subversion/svn/shelf2-cmd.c - copied unchanged from r361693, head/contrib/subversion/subversion/svn/shelf2-cmd.c stable/12/contrib/subversion/subversion/svn/shelf2-cmd.h - copied unchanged from r361693, head/contrib/subversion/subversion/svn/shelf2-cmd.h stable/12/usr.bin/svn/lib/libapr/apr_escape_test_char.h - copied unchanged from r361678, head/usr.bin/svn/lib/libapr/apr_escape_test_char.h Replaced: stable/12/contrib/apr/include/private/ - copied from r361678, head/contrib/apr/include/private/ Deleted: stable/12/contrib/apr-util/dbd/NWGNUdbdfreetds stable/12/contrib/apr-util/dbd/apr_dbd_freetds.c stable/12/contrib/subversion/doc/programmer/gtest-guide.txt stable/12/contrib/subversion/subversion/libsvn_client/copy_foreign.c stable/12/contrib/subversion/subversion/libsvn_client/shelve.c stable/12/contrib/subversion/subversion/svn/shelve-cmd.c Modified: stable/12/contrib/apr-util/CHANGES stable/12/contrib/apr-util/LICENSE stable/12/contrib/apr-util/Makefile.in stable/12/contrib/apr-util/Makefile.win stable/12/contrib/apr-util/NOTICE stable/12/contrib/apr-util/NWGNUmakefile stable/12/contrib/apr-util/README stable/12/contrib/apr-util/apr-util.spec stable/12/contrib/apr-util/aprutil.dsw stable/12/contrib/apr-util/apu-config.in stable/12/contrib/apr-util/buckets/apr_buckets_alloc.c stable/12/contrib/apr-util/buckets/apr_buckets_file.c stable/12/contrib/apr-util/build-outputs.mk stable/12/contrib/apr-util/build.conf stable/12/contrib/apr-util/buildconf stable/12/contrib/apr-util/configure stable/12/contrib/apr-util/configure.in stable/12/contrib/apr-util/crypto/apr_crypto.c stable/12/contrib/apr-util/crypto/apr_crypto_nss.c stable/12/contrib/apr-util/crypto/apr_crypto_openssl.c stable/12/contrib/apr-util/crypto/crypt_blowfish.c stable/12/contrib/apr-util/dbd/NWGNUmakefile stable/12/contrib/apr-util/dbd/apr_dbd.c stable/12/contrib/apr-util/dbm/sdbm/sdbm.c stable/12/contrib/apr-util/dbm/sdbm/sdbm_pair.c stable/12/contrib/apr-util/include/apr_buckets.h stable/12/contrib/apr-util/include/apr_crypto.h stable/12/contrib/apr-util/include/apr_dbd.h stable/12/contrib/apr-util/include/apr_xml.h stable/12/contrib/apr-util/include/apu.h.in stable/12/contrib/apr-util/include/apu.hnw stable/12/contrib/apr-util/include/apu.hw stable/12/contrib/apr-util/include/apu_version.h stable/12/contrib/apr-util/include/private/apr_crypto_internal.h stable/12/contrib/apr-util/include/private/apu_config.h.in stable/12/contrib/apr-util/memcache/apr_memcache.c stable/12/contrib/apr-util/test/Makefile.in stable/12/contrib/apr-util/test/Makefile.win stable/12/contrib/apr-util/test/NWGNUaputest stable/12/contrib/apr-util/test/abts_tests.h stable/12/contrib/apr-util/test/testall.dsw stable/12/contrib/apr-util/test/testcrypto.c stable/12/contrib/apr-util/test/testutil.h stable/12/contrib/apr-util/xml/apr_xml.c stable/12/contrib/apr/CHANGES stable/12/contrib/apr/CMakeLists.txt stable/12/contrib/apr/Makefile.in stable/12/contrib/apr/Makefile.win stable/12/contrib/apr/NOTICE stable/12/contrib/apr/NWGNUmakefile stable/12/contrib/apr/apr.dsp stable/12/contrib/apr/apr.mak stable/12/contrib/apr/apr.spec stable/12/contrib/apr/atomic/unix/ia32.c stable/12/contrib/apr/atomic/unix/mutex.c stable/12/contrib/apr/atomic/unix/ppc.c stable/12/contrib/apr/atomic/unix/s390.c stable/12/contrib/apr/atomic/unix/solaris.c stable/12/contrib/apr/build-outputs.mk stable/12/contrib/apr/buildconf stable/12/contrib/apr/config.layout stable/12/contrib/apr/configure stable/12/contrib/apr/configure.in stable/12/contrib/apr/docs/APRDesign.html stable/12/contrib/apr/docs/canonical_filenames.html stable/12/contrib/apr/docs/incomplete_types stable/12/contrib/apr/docs/pool-design.html stable/12/contrib/apr/encoding/apr_escape.c stable/12/contrib/apr/file_io/unix/copy.c stable/12/contrib/apr/file_io/unix/dir.c stable/12/contrib/apr/file_io/unix/flock.c stable/12/contrib/apr/file_io/unix/pipe.c stable/12/contrib/apr/file_io/unix/readwrite.c stable/12/contrib/apr/file_io/unix/seek.c stable/12/contrib/apr/include/apr.h.in stable/12/contrib/apr/include/apr.hnw stable/12/contrib/apr/include/apr.hw stable/12/contrib/apr/include/apr.hwc stable/12/contrib/apr/include/apr_allocator.h stable/12/contrib/apr/include/apr_atomic.h stable/12/contrib/apr/include/apr_errno.h stable/12/contrib/apr/include/apr_escape.h stable/12/contrib/apr/include/apr_file_info.h stable/12/contrib/apr/include/apr_file_io.h stable/12/contrib/apr/include/apr_general.h stable/12/contrib/apr/include/apr_global_mutex.h stable/12/contrib/apr/include/apr_hash.h stable/12/contrib/apr/include/apr_network_io.h stable/12/contrib/apr/include/apr_poll.h stable/12/contrib/apr/include/apr_portable.h stable/12/contrib/apr/include/apr_proc_mutex.h stable/12/contrib/apr/include/apr_shm.h stable/12/contrib/apr/include/apr_skiplist.h stable/12/contrib/apr/include/apr_strings.h stable/12/contrib/apr/include/apr_tables.h stable/12/contrib/apr/include/apr_thread_mutex.h stable/12/contrib/apr/include/apr_thread_proc.h stable/12/contrib/apr/include/apr_time.h stable/12/contrib/apr/include/apr_version.h stable/12/contrib/apr/include/arch/unix/apr_arch_atomic.h stable/12/contrib/apr/include/arch/unix/apr_arch_networkio.h stable/12/contrib/apr/include/arch/unix/apr_arch_poll_private.h stable/12/contrib/apr/include/arch/unix/apr_arch_proc_mutex.h stable/12/contrib/apr/include/arch/unix/apr_arch_shm.h stable/12/contrib/apr/include/arch/unix/apr_arch_thread_mutex.h stable/12/contrib/apr/include/arch/unix/apr_arch_threadproc.h stable/12/contrib/apr/include/arch/unix/apr_private.h.in stable/12/contrib/apr/libapr.dsp stable/12/contrib/apr/libapr.mak stable/12/contrib/apr/locks/unix/global_mutex.c stable/12/contrib/apr/locks/unix/proc_mutex.c stable/12/contrib/apr/locks/unix/thread_cond.c stable/12/contrib/apr/locks/unix/thread_mutex.c stable/12/contrib/apr/memory/unix/apr_pools.c stable/12/contrib/apr/misc/unix/errorcodes.c stable/12/contrib/apr/misc/unix/rand.c stable/12/contrib/apr/network_io/unix/multicast.c stable/12/contrib/apr/network_io/unix/sockaddr.c stable/12/contrib/apr/network_io/unix/sockets.c stable/12/contrib/apr/network_io/unix/sockopt.c stable/12/contrib/apr/poll/unix/epoll.c stable/12/contrib/apr/poll/unix/kqueue.c stable/12/contrib/apr/poll/unix/poll.c stable/12/contrib/apr/poll/unix/pollcb.c stable/12/contrib/apr/poll/unix/pollset.c stable/12/contrib/apr/poll/unix/port.c stable/12/contrib/apr/poll/unix/select.c stable/12/contrib/apr/poll/unix/z_asio.c stable/12/contrib/apr/random/unix/apr_random.c stable/12/contrib/apr/shmem/unix/shm.c stable/12/contrib/apr/strings/apr_cpystrn.c stable/12/contrib/apr/strings/apr_fnmatch.c stable/12/contrib/apr/strings/apr_snprintf.c stable/12/contrib/apr/tables/apr_skiplist.c stable/12/contrib/apr/tables/apr_tables.c stable/12/contrib/apr/threadproc/unix/proc.c stable/12/contrib/apr/threadproc/unix/signals.c stable/12/contrib/apr/tools/gen_test_char.c stable/12/contrib/subversion/.editorconfig stable/12/contrib/subversion/CHANGES stable/12/contrib/subversion/COMMITTERS stable/12/contrib/subversion/INSTALL stable/12/contrib/subversion/LICENSE stable/12/contrib/subversion/Makefile.in stable/12/contrib/subversion/NOTICE stable/12/contrib/subversion/aclocal.m4 stable/12/contrib/subversion/autogen.sh stable/12/contrib/subversion/build-outputs.mk stable/12/contrib/subversion/build.conf stable/12/contrib/subversion/configure stable/12/contrib/subversion/configure.ac stable/12/contrib/subversion/doc/doxygen.conf stable/12/contrib/subversion/doc/user/svn-best-practices.html stable/12/contrib/subversion/gen-make.py stable/12/contrib/subversion/get-deps.sh stable/12/contrib/subversion/subversion/include/private/svn_branch.h stable/12/contrib/subversion/subversion/include/private/svn_client_mtcc.h stable/12/contrib/subversion/subversion/include/private/svn_client_private.h stable/12/contrib/subversion/subversion/include/private/svn_dep_compat.h stable/12/contrib/subversion/subversion/include/private/svn_diff_tree.h stable/12/contrib/subversion/subversion/include/private/svn_element.h stable/12/contrib/subversion/subversion/include/private/svn_fs_fs_private.h stable/12/contrib/subversion/subversion/include/private/svn_repos_private.h stable/12/contrib/subversion/subversion/include/private/svn_sorts_private.h stable/12/contrib/subversion/subversion/include/private/svn_subr_private.h stable/12/contrib/subversion/subversion/include/private/svn_wc_private.h stable/12/contrib/subversion/subversion/include/svn_client.h stable/12/contrib/subversion/subversion/include/svn_config.h stable/12/contrib/subversion/subversion/include/svn_delta.h stable/12/contrib/subversion/subversion/include/svn_diff.h stable/12/contrib/subversion/subversion/include/svn_dirent_uri.h stable/12/contrib/subversion/subversion/include/svn_error_codes.h stable/12/contrib/subversion/subversion/include/svn_fs.h stable/12/contrib/subversion/subversion/include/svn_opt.h stable/12/contrib/subversion/subversion/include/svn_props.h stable/12/contrib/subversion/subversion/include/svn_ra.h stable/12/contrib/subversion/subversion/include/svn_ra_svn.h stable/12/contrib/subversion/subversion/include/svn_repos.h stable/12/contrib/subversion/subversion/include/svn_time.h stable/12/contrib/subversion/subversion/include/svn_types.h stable/12/contrib/subversion/subversion/include/svn_utf.h stable/12/contrib/subversion/subversion/include/svn_version.h stable/12/contrib/subversion/subversion/include/svn_wc.h stable/12/contrib/subversion/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c stable/12/contrib/subversion/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in stable/12/contrib/subversion/subversion/libsvn_auth_kwallet/kwallet.cpp stable/12/contrib/subversion/subversion/libsvn_auth_kwallet/libsvn_auth_kwallet.pc.in stable/12/contrib/subversion/subversion/libsvn_client/add.c stable/12/contrib/subversion/subversion/libsvn_client/blame.c stable/12/contrib/subversion/subversion/libsvn_client/client.h stable/12/contrib/subversion/subversion/libsvn_client/commit.c stable/12/contrib/subversion/subversion/libsvn_client/commit_util.c stable/12/contrib/subversion/subversion/libsvn_client/conflicts.c stable/12/contrib/subversion/subversion/libsvn_client/copy.c stable/12/contrib/subversion/subversion/libsvn_client/delete.c stable/12/contrib/subversion/subversion/libsvn_client/deprecated.c stable/12/contrib/subversion/subversion/libsvn_client/diff.c stable/12/contrib/subversion/subversion/libsvn_client/diff_local.c stable/12/contrib/subversion/subversion/libsvn_client/diff_summarize.c stable/12/contrib/subversion/subversion/libsvn_client/export.c stable/12/contrib/subversion/subversion/libsvn_client/info.c stable/12/contrib/subversion/subversion/libsvn_client/libsvn_client.pc.in stable/12/contrib/subversion/subversion/libsvn_client/list.c stable/12/contrib/subversion/subversion/libsvn_client/merge.c stable/12/contrib/subversion/subversion/libsvn_client/mtcc.c stable/12/contrib/subversion/subversion/libsvn_client/patch.c stable/12/contrib/subversion/subversion/libsvn_client/ra.c stable/12/contrib/subversion/subversion/libsvn_client/repos_diff.c stable/12/contrib/subversion/subversion/libsvn_client/revert.c stable/12/contrib/subversion/subversion/libsvn_client/revisions.c stable/12/contrib/subversion/subversion/libsvn_client/status.c stable/12/contrib/subversion/subversion/libsvn_client/update.c stable/12/contrib/subversion/subversion/libsvn_client/upgrade.c stable/12/contrib/subversion/subversion/libsvn_client/util.c stable/12/contrib/subversion/subversion/libsvn_delta/branch.c stable/12/contrib/subversion/subversion/libsvn_delta/branch_compat.c stable/12/contrib/subversion/subversion/libsvn_delta/compat.c stable/12/contrib/subversion/subversion/libsvn_delta/debug_editor.c stable/12/contrib/subversion/subversion/libsvn_delta/deprecated.c stable/12/contrib/subversion/subversion/libsvn_delta/element.c stable/12/contrib/subversion/subversion/libsvn_delta/libsvn_delta.pc.in stable/12/contrib/subversion/subversion/libsvn_delta/path_driver.c stable/12/contrib/subversion/subversion/libsvn_diff/diff_file.c stable/12/contrib/subversion/subversion/libsvn_diff/diff_tree.c stable/12/contrib/subversion/subversion/libsvn_diff/libsvn_diff.pc.in stable/12/contrib/subversion/subversion/libsvn_diff/parse-diff.c stable/12/contrib/subversion/subversion/libsvn_fs/fs-loader.c stable/12/contrib/subversion/subversion/libsvn_fs/fs-loader.h stable/12/contrib/subversion/subversion/libsvn_fs/libsvn_fs.pc.in stable/12/contrib/subversion/subversion/libsvn_fs_base/fs.c stable/12/contrib/subversion/subversion/libsvn_fs_base/libsvn_fs_base.pc.in stable/12/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/cached_data.h stable/12/contrib/subversion/subversion/libsvn_fs_fs/dag.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/dump-index.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/fs.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.h stable/12/contrib/subversion/subversion/libsvn_fs_fs/id.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/index.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/libsvn_fs_fs.pc.in stable/12/contrib/subversion/subversion/libsvn_fs_fs/load-index.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/low_level.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/pack.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/recovery.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h stable/12/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.sql stable/12/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/revprops.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/revprops.h stable/12/contrib/subversion/subversion/libsvn_fs_fs/stats.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/temp_serializer.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/temp_serializer.h stable/12/contrib/subversion/subversion/libsvn_fs_fs/transaction.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/tree.c stable/12/contrib/subversion/subversion/libsvn_fs_fs/verify.c stable/12/contrib/subversion/subversion/libsvn_fs_util/libsvn_fs_util.pc.in stable/12/contrib/subversion/subversion/libsvn_fs_x/cached_data.c stable/12/contrib/subversion/subversion/libsvn_fs_x/changes.c stable/12/contrib/subversion/subversion/libsvn_fs_x/dag_cache.c stable/12/contrib/subversion/subversion/libsvn_fs_x/dag_cache.h stable/12/contrib/subversion/subversion/libsvn_fs_x/fs.c stable/12/contrib/subversion/subversion/libsvn_fs_x/fs_x.c stable/12/contrib/subversion/subversion/libsvn_fs_x/libsvn_fs_x.pc.in stable/12/contrib/subversion/subversion/libsvn_fs_x/low_level.c stable/12/contrib/subversion/subversion/libsvn_fs_x/pack.c stable/12/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h stable/12/contrib/subversion/subversion/libsvn_fs_x/revprops.c stable/12/contrib/subversion/subversion/libsvn_fs_x/temp_serializer.c stable/12/contrib/subversion/subversion/libsvn_fs_x/transaction.c stable/12/contrib/subversion/subversion/libsvn_fs_x/tree.c stable/12/contrib/subversion/subversion/libsvn_fs_x/verify.c stable/12/contrib/subversion/subversion/libsvn_ra/compat.c stable/12/contrib/subversion/subversion/libsvn_ra/deprecated.c stable/12/contrib/subversion/subversion/libsvn_ra/libsvn_ra.pc.in stable/12/contrib/subversion/subversion/libsvn_ra/ra_loader.c stable/12/contrib/subversion/subversion/libsvn_ra/ra_loader.h stable/12/contrib/subversion/subversion/libsvn_ra/wrapper_template.h stable/12/contrib/subversion/subversion/libsvn_ra_local/libsvn_ra_local.pc.in stable/12/contrib/subversion/subversion/libsvn_ra_local/ra_plugin.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/commit.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/libsvn_ra_serf.pc.in stable/12/contrib/subversion/subversion/libsvn_ra_serf/list.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/lock.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/options.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/ra_serf.h stable/12/contrib/subversion/subversion/libsvn_ra_serf/replay.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/serf.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/update.c stable/12/contrib/subversion/subversion/libsvn_ra_serf/util.c stable/12/contrib/subversion/subversion/libsvn_ra_svn/client.c stable/12/contrib/subversion/subversion/libsvn_ra_svn/editorp.c stable/12/contrib/subversion/subversion/libsvn_ra_svn/libsvn_ra_svn.pc.in stable/12/contrib/subversion/subversion/libsvn_ra_svn/protocol stable/12/contrib/subversion/subversion/libsvn_repos/authz.c stable/12/contrib/subversion/subversion/libsvn_repos/authz.h stable/12/contrib/subversion/subversion/libsvn_repos/authz_info.c stable/12/contrib/subversion/subversion/libsvn_repos/authz_parse.c stable/12/contrib/subversion/subversion/libsvn_repos/commit.c stable/12/contrib/subversion/subversion/libsvn_repos/config_file.c stable/12/contrib/subversion/subversion/libsvn_repos/config_file.h stable/12/contrib/subversion/subversion/libsvn_repos/delta.c stable/12/contrib/subversion/subversion/libsvn_repos/deprecated.c stable/12/contrib/subversion/subversion/libsvn_repos/dump.c stable/12/contrib/subversion/subversion/libsvn_repos/fs-wrap.c stable/12/contrib/subversion/subversion/libsvn_repos/libsvn_repos.pc.in stable/12/contrib/subversion/subversion/libsvn_repos/list.c stable/12/contrib/subversion/subversion/libsvn_repos/load-fs-vtable.c stable/12/contrib/subversion/subversion/libsvn_repos/load.c stable/12/contrib/subversion/subversion/libsvn_repos/log.c stable/12/contrib/subversion/subversion/libsvn_repos/replay.c stable/12/contrib/subversion/subversion/libsvn_repos/repos.c stable/12/contrib/subversion/subversion/libsvn_subr/cmdline.c stable/12/contrib/subversion/subversion/libsvn_subr/compress_lz4.c stable/12/contrib/subversion/subversion/libsvn_subr/config_file.c stable/12/contrib/subversion/subversion/libsvn_subr/config_keys.inc stable/12/contrib/subversion/subversion/libsvn_subr/config_win.c stable/12/contrib/subversion/subversion/libsvn_subr/deprecated.c stable/12/contrib/subversion/subversion/libsvn_subr/dirent_uri.c stable/12/contrib/subversion/subversion/libsvn_subr/error.c stable/12/contrib/subversion/subversion/libsvn_subr/gpg_agent.c stable/12/contrib/subversion/subversion/libsvn_subr/internal_statements.h stable/12/contrib/subversion/subversion/libsvn_subr/io.c stable/12/contrib/subversion/subversion/libsvn_subr/iter.c stable/12/contrib/subversion/subversion/libsvn_subr/libsvn_subr.pc.in stable/12/contrib/subversion/subversion/libsvn_subr/lz4/lz4.c stable/12/contrib/subversion/subversion/libsvn_subr/lz4/lz4internal.h stable/12/contrib/subversion/subversion/libsvn_subr/mergeinfo.c stable/12/contrib/subversion/subversion/libsvn_subr/object_pool.c stable/12/contrib/subversion/subversion/libsvn_subr/opt.c stable/12/contrib/subversion/subversion/libsvn_subr/pool.c stable/12/contrib/subversion/subversion/libsvn_subr/sorts.c stable/12/contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c stable/12/contrib/subversion/subversion/libsvn_subr/ssl_client_cert_pw_providers.c stable/12/contrib/subversion/subversion/libsvn_subr/stream.c stable/12/contrib/subversion/subversion/libsvn_subr/sysinfo.c stable/12/contrib/subversion/subversion/libsvn_subr/utf.c stable/12/contrib/subversion/subversion/libsvn_subr/utf8proc/utf8proc_data.c stable/12/contrib/subversion/subversion/libsvn_subr/version.c stable/12/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c stable/12/contrib/subversion/subversion/libsvn_subr/win32_crypto.c stable/12/contrib/subversion/subversion/libsvn_subr/x509info.c stable/12/contrib/subversion/subversion/libsvn_subr/x509parse.c stable/12/contrib/subversion/subversion/libsvn_wc/README stable/12/contrib/subversion/subversion/libsvn_wc/conflicts.c stable/12/contrib/subversion/subversion/libsvn_wc/conflicts.h stable/12/contrib/subversion/subversion/libsvn_wc/deprecated.c stable/12/contrib/subversion/subversion/libsvn_wc/diff_local.c stable/12/contrib/subversion/subversion/libsvn_wc/entries.c stable/12/contrib/subversion/subversion/libsvn_wc/libsvn_wc.pc.in stable/12/contrib/subversion/subversion/libsvn_wc/node.c stable/12/contrib/subversion/subversion/libsvn_wc/props.c stable/12/contrib/subversion/subversion/libsvn_wc/questions.c stable/12/contrib/subversion/subversion/libsvn_wc/revert.c stable/12/contrib/subversion/subversion/libsvn_wc/tree_conflicts.c stable/12/contrib/subversion/subversion/libsvn_wc/update_editor.c stable/12/contrib/subversion/subversion/libsvn_wc/upgrade.c stable/12/contrib/subversion/subversion/libsvn_wc/wc-checks.h stable/12/contrib/subversion/subversion/libsvn_wc/wc-metadata.h stable/12/contrib/subversion/subversion/libsvn_wc/wc-queries.h stable/12/contrib/subversion/subversion/libsvn_wc/wc-queries.sql stable/12/contrib/subversion/subversion/libsvn_wc/wc.h stable/12/contrib/subversion/subversion/libsvn_wc/wc_db.c stable/12/contrib/subversion/subversion/libsvn_wc/wc_db.h stable/12/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c stable/12/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c stable/12/contrib/subversion/subversion/libsvn_wc/wcroot_anchor.c stable/12/contrib/subversion/subversion/svn/auth-cmd.c stable/12/contrib/subversion/subversion/svn/blame-cmd.c stable/12/contrib/subversion/subversion/svn/cl.h stable/12/contrib/subversion/subversion/svn/conflict-callbacks.c stable/12/contrib/subversion/subversion/svn/diff-cmd.c stable/12/contrib/subversion/subversion/svn/help-cmd.c stable/12/contrib/subversion/subversion/svn/info-cmd.c stable/12/contrib/subversion/subversion/svn/list-cmd.c stable/12/contrib/subversion/subversion/svn/log-cmd.c stable/12/contrib/subversion/subversion/svn/merge-cmd.c stable/12/contrib/subversion/subversion/svn/notify.c stable/12/contrib/subversion/subversion/svn/propset-cmd.c stable/12/contrib/subversion/subversion/svn/resolve-cmd.c stable/12/contrib/subversion/subversion/svn/revert-cmd.c stable/12/contrib/subversion/subversion/svn/svn.c stable/12/contrib/subversion/subversion/svn/util.c stable/12/contrib/subversion/subversion/svn_private_config.h.in stable/12/contrib/subversion/subversion/svnadmin/svnadmin.c stable/12/contrib/subversion/subversion/svnbench/cl.h stable/12/contrib/subversion/subversion/svnbench/help-cmd.c stable/12/contrib/subversion/subversion/svnbench/svnbench.c stable/12/contrib/subversion/subversion/svndumpfilter/svndumpfilter.c stable/12/contrib/subversion/subversion/svnfsfs/dump-index-cmd.c stable/12/contrib/subversion/subversion/svnfsfs/load-index-cmd.c stable/12/contrib/subversion/subversion/svnfsfs/stats-cmd.c stable/12/contrib/subversion/subversion/svnfsfs/svnfsfs.c stable/12/contrib/subversion/subversion/svnlook/svnlook.c stable/12/contrib/subversion/subversion/svnmucc/svnmucc.c stable/12/contrib/subversion/subversion/svnrdump/dump_editor.c stable/12/contrib/subversion/subversion/svnrdump/load_editor.c stable/12/contrib/subversion/subversion/svnrdump/svnrdump.c stable/12/contrib/subversion/subversion/svnrdump/svnrdump.h stable/12/contrib/subversion/subversion/svnrdump/util.c stable/12/contrib/subversion/subversion/svnserve/logger.c stable/12/contrib/subversion/subversion/svnserve/logger.h stable/12/contrib/subversion/subversion/svnserve/serve.c stable/12/contrib/subversion/subversion/svnserve/svnserve.c stable/12/contrib/subversion/subversion/svnsync/svnsync.c stable/12/contrib/subversion/subversion/svnversion/svnversion.c stable/12/contrib/subversion/win-tests.py stable/12/usr.bin/svn/Makefile stable/12/usr.bin/svn/Makefile.inc stable/12/usr.bin/svn/lib/Makefile stable/12/usr.bin/svn/lib/libapr/Makefile stable/12/usr.bin/svn/lib/libapr/apr.h stable/12/usr.bin/svn/lib/libapr/apr_private.h stable/12/usr.bin/svn/lib/libapr_util/Makefile stable/12/usr.bin/svn/lib/libapr_util/apu.h stable/12/usr.bin/svn/lib/libapr_util/apu_config.h stable/12/usr.bin/svn/lib/libserf/Makefile stable/12/usr.bin/svn/lib/libsvn_client/Makefile stable/12/usr.bin/svn/lib/libsvn_delta/Makefile stable/12/usr.bin/svn/lib/libsvn_diff/Makefile stable/12/usr.bin/svn/lib/libsvn_fs/Makefile stable/12/usr.bin/svn/lib/libsvn_fs_fs/Makefile stable/12/usr.bin/svn/lib/libsvn_fs_util/Makefile stable/12/usr.bin/svn/lib/libsvn_fs_x/Makefile stable/12/usr.bin/svn/lib/libsvn_ra/Makefile stable/12/usr.bin/svn/lib/libsvn_ra_local/Makefile stable/12/usr.bin/svn/lib/libsvn_ra_serf/Makefile stable/12/usr.bin/svn/lib/libsvn_ra_svn/Makefile stable/12/usr.bin/svn/lib/libsvn_repos/Makefile stable/12/usr.bin/svn/lib/libsvn_subr/Makefile stable/12/usr.bin/svn/lib/libsvn_wc/Makefile stable/12/usr.bin/svn/svn/Makefile stable/12/usr.bin/svn/svn_private_config.h stable/12/usr.bin/svn/svnadmin/Makefile stable/12/usr.bin/svn/svnbench/Makefile stable/12/usr.bin/svn/svndumpfilter/Makefile stable/12/usr.bin/svn/svnfsfs/Makefile stable/12/usr.bin/svn/svnlook/Makefile stable/12/usr.bin/svn/svnmucc/Makefile stable/12/usr.bin/svn/svnrdump/Makefile stable/12/usr.bin/svn/svnserve/Makefile stable/12/usr.bin/svn/svnsync/Makefile stable/12/usr.bin/svn/svnversion/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/apr-util/CHANGES ============================================================================== --- stable/12/contrib/apr-util/CHANGES Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/CHANGES Sun Jun 14 17:36:43 2020 (r362180) @@ -1,141 +1,62 @@ -*- coding: utf-8 -*- -Changes with APR-util 1.5.4 +Changes with APR-util 1.6.1 - *) MySQL driver: Fix incorrect handling of bad parameter in the - driver support for apr_dbd_transaction_end(). PR 56330. - [Weiqiang Li ] + *) Win32: Add function exports from new apr_crypto API's missing in 1.6.0. - *) apr_crypto_get_driver(): Fix invalid storage reference on error path. - [Philip Martin ] + *) Win32: Introduce XML_PARSER build-time variable to select the expat + library name to be linked to libaprutil-1.dll. See Makefile.win - *) Fix compile failure for Android. PR 56627. [Fredrik Fornwall - , Jeff Trawick] + *) Win32: Removed lingering xml/xml.dsp project forked from the expat + Project in the 1.9x era. Use expat's maintained build schema instead, + prior to building apr-util. - *) Fix to let ODBC driver build with MSVC6, which does not have intptr_t - [Tom Donovan] + *) apr_crypto: Fix compatibility with LibreSSL. PR 61596. + [Bernard Spil , Yann Ylavic] - *) Windows cmake build: Fix incompatiblities with Visual Studio - generators with all cmake versions, and the NMake Makefile generator - with cmake 2.8.12 and later. PR 56616 and other bugs. [Jeff Trawick, - Bert Huijben] + *) sdbm: better database/page validation to fail cleanly when corrupted. + [Yann Ylavic] - *) Fix detection of Berkeley DB 6.0. PR 55277. - [Lars Wendler ] +Changes with APR-util 1.6.0 - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) The expat dependency of apr-util is no longer built with apr-util. + Install expat (including development headers and libraries) first + before building apr-util. [https://libexpat.github.io/] -Changes with APR-util 1.5.3 + *) Mark apr_dbd_freetds as unsupported, and remove it from all builds + [Nick Kew] - *) Cygwin: Use correct file extension when loading APR DSOs. PR 55587. - [Carlo Bramini ] + *) Update MySQL build to stop using libmysqlclient_r. + [Petr Sumbera ] - *) Add experimental cmake-based build system for Windows. Refer to - README.cmake for more information. [Jeff Trawick, Tom Donovan] + *) apr_buckets: Add apr_bucket_file_set_buf_size() which allows to configure + the size of the buffer used to read files. [Yann Ylavic] - *) Fix warnings in odbc driver on 64bit systems. - PR 55197 [Tom Donovan] + *) apr_crypto: avoid excessive iteration in bcrypt hash. + [Hanno Böck ] - *) Add support to apr_memcache for unix domain sockets. PR 54573 [Remi - Gacogne ] + *) apr_siphash: Implement keyed hash function SipHash. [Yann Ylavic] - *) Add support for Berkeley DB 6.0. [Rainer Jung] + *) apr_crypto: Add apr_crypto_key() function which supports keys + generated from a passphrase or a raw secret provided by the caller. + Deprecate apr_crypto_passphrase(). [Graham Leggett] - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) apr_crypto_nss: Ensure the SECItem returned by PK11_ParamFromIV + is properly freed. [Graham Leggett] -Changes with APR-util 1.5.2 + *) apr_crypto: Don't cache the driver if initialisation fails. This + stops the second and subsequent attempt to use the API from failing + claiming the library is not initialised. [Graham Leggett] - *) Windows: Add command line makefiles. [Gregg Smith] + *) apr_crypto: Add a native CommonCrypto implementation for iOS and OSX + where OpenSSL has been deprecated. [Graham Leggett] - *) apr_uri_parse(): Do not accept invalid characters in the scheme. - Per RFC 3986 3.3, enforce that the first segment of a relative path does - not contain a colon. PR 52479. [Stefan Fritsch] + *) apr_xml_to_text: Add style APR_XML_X2T_PARSED to maintain a + consistent namespace prefix. [Jari Urpalainen + ] - *) Fix memory leak in hook sorting function. PR 51256. - [] +Changes with APR-util 1.5.x and later: - *) Speedup md5 calculation by avoiding some copying on little endian - architectures. PR 49011. [Stefan Fritsch, Stefan Fuhrmann - ] - - *) Use heap memory for crypt in apr_password_validate(), to reduce stack - usage. PR 54572. [Stefan Fritsch] - - *) Fix password validation failure for all crypt and crypt_r based - algorithms. PR 54603. [Harvey Eneman ] - - *) Fix syntax error in crypto/apr_passwd.c on non-glibc systems. PR 54275. - [Stefan Fritsch] - - *) Fix potential data corruption in apr_brigade_write() and friends if - the last bucket of the brigade is a heap bucket that has been split, - and there are still references to the next part of the original bucket - in use. [Stefan Fritsch] - - *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe - Jaillet ] - - *) apr_crypto: If --with-crypto is passed to configure but no crypto - libraries are enabled, autodetect available libraries. [Jeff Trawick] - - *) memcache: Fix dead server retry logic. [Gavin Shelley ] - -Changes with APR-util 1.5.1 - - *) testmemcache: Fix crash. PR 52705. [Peter Poeml ] - - *) MinGW: Support shared builds of apr-util when apr is shared. - PR 46175. [Carlo Bramini , Jeff Trawick] - - *) Add support for Berkeley DB 5.2 and 5.3. Simplify detection script. - PR 53684. [Rainer Jung] - - *) configure: Allow to specify library specific custom linker flags - via the LDADD_XXX variables. [Rainer Jung] - - *) apr_password_validate(): Fix intermittent errors on systems - such as FreeBSD where the crypt() function is used. - (Broken only in 1.5.0) [Jeff Trawick] - - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] - -Changes with APR-util 1.5.0 - - *) dbd_pgsql_escape: Use PQescapeStringConn. [Nick Kew] - - *) apr_password_validate, apr_bcrypt_encode: Add support for bcrypt encoded - passwords. The bcrypt implementation uses code from crypt_blowfish - written by Solar Designer . apr_bcrypt_encode creates - hashes with "$2y$" prefix, but apr_password_validate also accepts the old - prefix "$2a$". PR 49288. [Stefan Fritsch] - - *) APR dbd: Allow to use apr_dbd_get_row() with a different pool than - apr_dbd_select(). PR 53533. [] - - *) APR dbd FreeTDS support: Fix spurious API errors caused by uninitialized - fields. [TROY.LIU 劉春偉 ] - - *) apr_password_validate: Increase maximum hash string length to allow - more than 9999 rounds with sha512-crypt. PR 53410. [Stefan Fritsch] - - *) Fix segfaults in crypt() and crypt_r() failure modes. - PR 47272. [Arkadiusz Miskiewicz ] - - *) apr_crypto: Ensure that the if/else that governs the static - initialisation of each crypto driver works when the first driver - isn't in use. [Graham Leggett] - - *) apr_crypto: Ensure the *driver variable is initialised when a statically - compiled library is initialised for the first time. [Graham Leggett] - - *) apr_crypto: Ensure the *driver variable is initialised when the library - has already been loaded. Fix ported from apr_dbd. [Graham Leggett] - - *) apr_crypto: Move the static initialisation of DRIVER_LOAD from - apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose - the parameters. [Graham Leggett] + *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CHANGES?view=markup Changes with APR-util 1.4.x and later: Copied: stable/12/contrib/apr-util/CMakeLists.txt (from r361692, head/contrib/apr-util/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/apr-util/CMakeLists.txt Sun Jun 14 17:36:43 2020 (r362180, copy of r361692, head/contrib/apr-util/CMakeLists.txt) @@ -0,0 +1,355 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Read README.cmake before using this. + +PROJECT(APR-Util C) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +FIND_PACKAGE(OpenSSL) + +FIND_PACKAGE(expat) + +OPTION(APU_HAVE_CRYPTO "Crypto support" OFF) +OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) +OPTION(APR_HAS_LDAP "LDAP support" ON) +OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) +OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) +OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") +SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") + +IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +ENDIF() +FOREACH(onelib ${APR_LIBRARIES}) + IF(NOT EXISTS ${onelib}) + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() +ENDFOREACH() + +IF(APU_HAVE_CRYPTO) +IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "OpenSSL is the only supported crypto implementation, and it wasn't found!") +ENDIF() +ENDIF() + +# create 1-or-0 representation of feature tests for apu.h + +SET(apu_have_crypto_10 0) +SET(apu_have_apr_iconv_10 0) # not yet implemented +SET(apr_has_ldap_10 0) + +IF(APU_HAVE_CRYPTO) + SET(apu_have_crypto_10 1) +ENDIF() + +IF(APR_HAS_LDAP) + SET(apr_has_ldap_10 1) +ENDIF() + +IF(NOT EXPAT_FOUND) + MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") +ENDIF() + +SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) +SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) + +SET(LDAP_LIBRARIES) +IF(APR_HAS_LDAP) + SET(LDAP_LIBRARIES wldap32) +ENDIF() + +CONFIGURE_FILE(include/apu.hwc + ${PROJECT_BINARY_DIR}/apu.h) +CONFIGURE_FILE(include/apr_ldap.hwc + ${PROJECT_BINARY_DIR}/apr_ldap.h) +# "COPYONLY" just because anything else isn't implemented ;) +CONFIGURE_FILE(include/private/apu_config.hw + ${PROJECT_BINARY_DIR}/apu_config.h + COPYONLY) +CONFIGURE_FILE(include/private/apu_select_dbm.hw + ${PROJECT_BINARY_DIR}/apu_select_dbm.h + COPYONLY) +CONFIGURE_FILE(include/apu_want.hw + ${PROJECT_BINARY_DIR}/apu_want.h + COPYONLY) + +# Generated .h files are stored in PROJECT_BINARY_DIR, not the +# source tree. +# +# BROKEN: not searching PROJECT_BINARY_DIR first, so you have to +# manually delete apu.h in PROJECT_SOURCE_DIR/include if +# you've generated apu.h before using a different build + +SET(APR_INCLUDE_DIRECTORIES + ${PROJECT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/private + ${APR_INCLUDE_DIR} +) + +INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES} ${XMLLIB_INCLUDE_DIR}) + +SET(APR_PUBLIC_HEADERS_STATIC + include/apr_anylock.h + include/apr_base64.h + include/apr_buckets.h + include/apr_crypto.h + include/apr_date.h + include/apr_dbd.h + include/apr_dbm.h + include/apr_hooks.h + include/apr_ldap_init.h + include/apr_ldap_option.h + include/apr_ldap_rebind.h + include/apr_ldap_url.h + include/apr_md4.h + include/apr_md5.h + include/apr_memcache.h + include/apr_optional.h + include/apr_optional_hooks.h + include/apr_queue.h + include/apr_redis.h + include/apr_reslist.h + include/apr_rmm.h + include/apr_sdbm.h + include/apr_sha1.h + include/apr_siphash.h + include/apr_strmatch.h + include/apr_thread_pool.h + include/apr_uri.h + include/apr_uuid.h + include/apr_xlate.h + include/apr_xml.h + include/apu_errno.h + include/apu_version.h +) + +# apu_config.h and apu_select_dbm.h are private +SET(APR_PUBLIC_HEADERS_GENERATED + ${PROJECT_BINARY_DIR}/apu.h + ${PROJECT_BINARY_DIR}/apr_ldap.h + ${PROJECT_BINARY_DIR}/apu_want.h +) + +SET(APR_SOURCES + buckets/apr_brigade.c + buckets/apr_buckets.c + buckets/apr_buckets_alloc.c + buckets/apr_buckets_eos.c + buckets/apr_buckets_file.c + buckets/apr_buckets_flush.c + buckets/apr_buckets_heap.c + buckets/apr_buckets_mmap.c + buckets/apr_buckets_pipe.c + buckets/apr_buckets_pool.c + buckets/apr_buckets_refcount.c + buckets/apr_buckets_simple.c + buckets/apr_buckets_socket.c + crypto/apr_crypto.c + crypto/apr_md4.c + crypto/apr_md5.c + crypto/apr_passwd.c + crypto/apr_sha1.c + crypto/apr_siphash.c + crypto/crypt_blowfish.c + crypto/getuuid.c + crypto/uuid.c + dbd/apr_dbd.c + dbm/apr_dbm.c + dbm/apr_dbm_sdbm.c + dbm/sdbm/sdbm.c + dbm/sdbm/sdbm_hash.c + dbm/sdbm/sdbm_lock.c + dbm/sdbm/sdbm_pair.c + encoding/apr_base64.c + hooks/apr_hooks.c + memcache/apr_memcache.c + misc/apr_date.c + misc/apr_queue.c + misc/apr_reslist.c + misc/apr_rmm.c + misc/apr_thread_pool.c + misc/apu_dso.c + misc/apu_version.c + redis/apr_redis.c + strmatch/apr_strmatch.c + uri/apr_uri.c + xlate/xlate.c + xml/apr_xml.c +) + +IF(APR_HAS_LDAP) + SET(APR_SOURCES ${APR_SOURCES} ldap/apr_ldap_stub.c ldap/apr_ldap_url.c) +ENDIF() + +SET(APR_TEST_SOURCES + test/abts.c + test/testbuckets.c + test/testcrypto.c + test/testdate.c + test/testdbd.c + test/testdbm.c + test/testldap.c + test/testmd4.c + test/testmd5.c + test/testmemcache.c + test/testpass.c + test/testqueue.c + test/testredis.c + test/testreslist.c + test/testrmm.c + test/testsiphash.c + test/teststrmatch.c + test/testuri.c + test/testutil.c + test/testuuid.c + test/testxlate.c + test/testxml.c +) + +SET(install_targets) +SET(install_bin_pdb) +SET(dbd_drivers) + +# Note: The WINNT definition on some targets is used only by libaprutil.rc. + +# libaprutil-1 is shared, aprutil-1 is static +ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) +SET(install_targets ${install_targets} libaprutil-1) +SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) +TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") + +ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) +SET(install_targets ${install_targets} aprutil-1) +TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") + +IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") + ENDIF() + ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c libaprutil.rc) + SET(install_targets ${install_targets} apr_crypto_openssl-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") + TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) +ENDIF() + +IF(APU_HAVE_ODBC) + ADD_LIBRARY(apr_dbd_odbc-1 SHARED dbd/apr_dbd_odbc.c libaprutil.rc) + SET(install_targets ${install_targets} apr_dbd_odbc-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_dbd_odbc-1.pdb) + SET(dbd_drivers ${dbd_drivers} odbc) + TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) + SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) + SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") + SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") +ENDIF() + +IF(APR_HAS_LDAP) + ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c + ldap/apr_ldap_rebind.c libaprutil.rc) + SET(install_targets ${install_targets} apr_ldap-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) + TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") + SET(apr_ldap_libraries apr_ldap-1) +ELSE() + SET(apr_ldap_libraries) +ENDIF() + +IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() + # Create a "check" target that displays test program output to the console. + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) + + # copy data files to build directory so that we can run programs from there + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory + ${PROJECT_BINARY_DIR}/data) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) + + IF(TEST_STATIC_LIBS) + SET(whichapr aprutil-1) + SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") + ELSE() + SET(whichapr libaprutil-1) + SET(apiflag) + ENDIF() + + ADD_EXECUTABLE(testall ${APR_TEST_SOURCES}) + TARGET_LINK_LIBRARIES(testall ${whichapr} ${apr_ldap_libraries} ${XMLLIB_LIBRARIES} ${LDAP_LIBRARIES}) + IF(apiflag) + SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + ADD_TEST(NAME testall COMMAND testall) + + ADD_EXECUTABLE(dbd test/dbd.c) + TARGET_LINK_LIBRARIES(dbd ${whichapr}) + IF(apiflag) + SET_TARGET_PROPERTIES(dbd PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + + # dbd is run multiple times with different parameters. + FOREACH(somedbd ${dbd_drivers}) + ADD_TEST(NAME dbd-${somedbd} COMMAND dbd ${somedbd}) + ENDFOREACH() + +ENDIF (APR_BUILD_TESTAPR) + +# Installation + +INSTALL(TARGETS ${install_targets} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) + +IF(INSTALL_PDB) + INSTALL(FILES ${install_bin_pdb} + DESTINATION bin + CONFIGURATIONS RelWithDebInfo Debug) +ENDIF() + +INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) + +STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) +MESSAGE(STATUS "") +MESSAGE(STATUS "") +MESSAGE(STATUS "APR-Util configuration summary:") +MESSAGE(STATUS "") +MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}") +MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") +MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") +MESSAGE(STATUS " APR include directory ........... : ${APR_INCLUDE_DIR}") +MESSAGE(STATUS " APR libraries ................... : ${APR_LIBRARIES}") +MESSAGE(STATUS " DBD ODBC driver ................. : ${APU_HAVE_ODBC}") +MESSAGE(STATUS " APU_HAVE_CRYPTO ................. : ${APU_HAVE_CRYPTO}") +MESSAGE(STATUS " APR_HAS_LDAP .................... : ${APR_HAS_LDAP}") +MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}") +IF(TEST_STATIC_LIBS) +MESSAGE(STATUS " (testing static libraries)") +ELSE() +MESSAGE(STATUS " (testing dynamic libraries)") +ENDIF() Modified: stable/12/contrib/apr-util/LICENSE ============================================================================== --- stable/12/contrib/apr-util/LICENSE Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/LICENSE Sun Jun 14 17:36:43 2020 (r362180) @@ -312,6 +312,22 @@ For the crypto\apr_md4.c component: * documentation and/or software. */ +For the crypto\crypt_blowfish.c(.h) component: + + * Written by Solar Designer in 1998-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 1998-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + + See crypto/crypt_blowfish.c for more information. + For the include\apr_md4.h component: * Modified: stable/12/contrib/apr-util/Makefile.in ============================================================================== --- stable/12/contrib/apr-util/Makefile.in Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/Makefile.in Sun Jun 14 17:36:43 2020 (r362180) @@ -15,8 +15,8 @@ APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@ APRUTIL_LIBS = @APRUTIL_LIBS@ TARGET_LIB = lib@APRUTIL_LIBNAME@.la -INSTALL_SUBDIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ -EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ +INSTALL_SUBDIRS = @APR_ICONV_DIR@ +EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config INSTALL = @INSTALL@ @@ -35,7 +35,6 @@ LDADD_dbd_oracle = @LDADD_dbd_oracle@ LDADD_dbd_sqlite2 = @LDADD_dbd_sqlite2@ LDADD_dbd_sqlite3 = @LDADD_dbd_sqlite3@ LDADD_dbd_mysql = @LDADD_dbd_mysql@ -LDADD_dbd_freetds = @LDADD_dbd_freetds@ LDADD_dbd_odbc = @LDADD_dbd_odbc@ LDADD_dbm_db = @LDADD_dbm_db@ LDADD_dbm_gdbm = @LDADD_dbm_gdbm@ @@ -43,6 +42,7 @@ LDADD_dbm_ndbm = @LDADD_dbm_ndbm@ LDADD_ldap = @LDADD_ldap@ LDADD_crypto_openssl = @LDADD_crypto_openssl@ LDADD_crypto_nss = @LDADD_crypto_nss@ +LDADD_crypto_commoncrypto = @LDADD_crypto_commoncrypto@ TARGETS = $(TARGET_LIB) aprutil.exp apu-config.out $(APU_MODULES) @@ -50,7 +50,7 @@ TARGETS = $(TARGET_LIB) aprutil.exp apu-config.out $(A @INCLUDE_RULES@ @INCLUDE_OUTPUTS@ -CLEAN_SUBDIRS = test @APR_ICONV_DIR@ @APR_XML_DIR@ +CLEAN_SUBDIRS = test @APR_ICONV_DIR@ CLEAN_TARGETS = exports.c export_vars.c aprutil.exp .make.dirs apu-config.out DISTCLEAN_TARGETS = config.cache config.log config.status libtool \ Modified: stable/12/contrib/apr-util/Makefile.win ============================================================================== --- stable/12/contrib/apr-util/Makefile.win Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/Makefile.win Sun Jun 14 17:36:43 2020 (r362180) @@ -51,6 +51,13 @@ # # CRYPTO_LIST="nss openssl" # +# Provide the XML_PARSER argument after configuring LIB and INCLUDE with +# the expat path of the corresponding xml parser, e.g. libexpatMT to choose +# static, or libexpat (default) to choose the dynamic library for aprutil-1.dll +# (Static libaprutil-1.lib always presumes libexpatMT with XML_STATIC flag.) +# +# XML_PARSER="libexpat" +# # For example; # # nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean @@ -73,6 +80,20 @@ USEDSW=1 PREFIX=..\apr-dist +!IF EXIST("..\openssl") +!IF EXIST("..\openssl\libcrypto.lib") +SSLOPT=_HAVE_OSSL110=1 +!ENDIF +!ENDIF + +# Legacy default (and unwise alternative) for libapr-1.dll is libexpatMT +XML_PARSER="libexpat" +!IF "$(XML_PARSER)" == "libexpat" +XMLOPT=XML_PARSER=$(XML_PARSER) +!ELSE +XMLOPT=XML_PARSER=$(XML_PARSER) XML_OPTIONS="/D XML_STATIC" +!ENDIF + !IF [$(COMSPEC) /c cl /nologo /? \ | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0 ARCH=x64 Release @@ -197,11 +218,9 @@ buildall: BUILD_MODE="$(ARCH)" BIND_MODE=shared cd .. !ENDIF - cd $(APU_PATH)\xml\expat\lib - $(MAKE) $(MAKEOPT) -f xml.mak CFG="xml - $(ARCH)" RECURSE=0 $(CTARGET) - cd ..\..\.. - $(MAKE) $(MAKEOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET) - $(MAKE) $(MAKEOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET) + cd $(APU_PATH) + $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET) cd ldap $(MAKE) $(MAKEOPT) -f apr_ldap.mak CFG="apr_ldap - $(ARCH)" RECURSE=0 $(CTARGET) cd .. @@ -215,7 +234,7 @@ buildall: cd .. cd crypto for %d in ($(CRYPTO_LIST) x) do if not %d == x \ - $(MAKE) $(MAKEOPT) -f apr_crypto_%d.mak CFG="apr_crypto_%d - $(ARCH)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) -f apr_crypto_%d.mak CFG="apr_crypto_%d - $(ARCH)" RECURSE=0 $(CTARGET) cd .. !ELSEIF $(USESLN) == 1 @@ -306,7 +325,7 @@ checkapr: checkapu: cd $(APU_PATH) cd test - $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \ + $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \ OUTDIR=$(LIBSPATH) APROUTDIR=$(LIBSOSPATH) \ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \ Modified: stable/12/contrib/apr-util/NOTICE ============================================================================== --- stable/12/contrib/apr-util/NOTICE Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/NOTICE Sun Jun 14 17:36:43 2020 (r362180) @@ -1,5 +1,5 @@ Apache Portable Runtime Utility Library -Copyright (c) 2000-2014 The Apache Software Foundation. +Copyright (c) 2000-2016 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Modified: stable/12/contrib/apr-util/NWGNUmakefile ============================================================================== --- stable/12/contrib/apr-util/NWGNUmakefile Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/NWGNUmakefile Sun Jun 14 17:36:43 2020 (r362180) @@ -261,9 +261,11 @@ FILES_lib_objs = \ $(OBJDIR)/apr_memcache.o \ $(OBJDIR)/apr_passwd.o \ $(OBJDIR)/apr_queue.o \ + $(OBJDIR)/apr_redis.o \ $(OBJDIR)/apr_reslist.o \ $(OBJDIR)/apr_rmm.o \ $(OBJDIR)/apr_sha1.o \ + $(OBJDIR)/apr_siphash.o \ $(OBJDIR)/apu_version.o \ $(OBJDIR)/getuuid.o \ $(OBJDIR)/uuid.o \ @@ -296,7 +298,7 @@ install :: nlms FORCE # Any specialized rules here # -vpath %.c buckets:crypto:dbd:dbm:dbm/sdbm:encoding:hooks:ldap:memcache:misc:strmatch:uri:xlate:xml +vpath %.c buckets:crypto:dbd:dbm:dbm/sdbm:encoding:hooks:ldap:memcache:redis:misc:strmatch:uri:xlate:xml # # Include the 'tail' makefile that has targets that depend on variables defined Modified: stable/12/contrib/apr-util/README ============================================================================== --- stable/12/contrib/apr-util/README Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/README Sun Jun 14 17:36:43 2020 (r362180) @@ -34,7 +34,7 @@ Apache Portable Runtime Utility Library README String filename-style pattern matching URI Parsing Charset translation (iconv based) - XML parsing (expat based) + XML parsing (expat) For a more complete list, please refer to the following URLs: @@ -66,7 +66,7 @@ for your compiled code. Similarly, the bindings for p such as Oracle (--with-oracle option) must also be explicitly enabled. On windows, selection of supported drivers is via the environment values -DBD_LIST (for freetds, mysql, oracle, pgsql, sqlite2 and/or sqlite3) +DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3) and DBM_LIST (db and/or gdbm). DBD odbc and DBM sdbm are unconditionally compiled and installed, do not include these in the list. Copied: stable/12/contrib/apr-util/README.FREETDS (from r361692, head/contrib/apr-util/README.FREETDS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/apr-util/README.FREETDS Sun Jun 14 17:36:43 2020 (r362180, copy of r361692, head/contrib/apr-util/README.FREETDS) @@ -0,0 +1,11 @@ +The APR DBD Driver for FreeTDS has been removed from the build. +It is known to have problems, and we are not able to maintain it. + +The source code is still available. If you want it and are able +to manage maintenance for yourself, you can patch the build and +work through issues that affect you, but you're on your own. + +We expect that for most users, the ODBC driver will serve as +an alternative. + +Sorry. Copied: stable/12/contrib/apr-util/README.cmake (from r361692, head/contrib/apr-util/README.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/apr-util/README.cmake Sun Jun 14 17:36:43 2020 (r362180, copy of r361692, head/contrib/apr-util/README.cmake) @@ -0,0 +1,139 @@ +Experimental cmake-based build support for APR-Util on Microsoft Windows + +Status +------ + +This build support is currently intended only for Microsoft Windows. +Only Windows NT-based systems can be targeted. (The traditional +Windows build support for APR can target Windows 9x as well.) + +This build support is experimental. Specifically, + +* It does not support all features of APR-Util. +* Some components may not be built correctly and/or in a manner + compatible with the previous Windows build support. +* Build interfaces, such as the mechanisms which are used to enable + optional functionality or specify prerequisites, may change from + release to release as feedback is received from users and bugs and + limitations are resolved. + +Important: Refer to the "Known Bugs and Limitations" section for further + information. + + It is beyond the scope of this document to document or explain + how to utilize the various cmake features, such as different + build backends or provisions for finding support libraries. + + Please refer to the cmake documentation for additional information + that applies to building any project with cmake. + +Prerequisites +------------- + +The following tools must be in PATH: + +* cmake, version 2.8 or later + cmake version 3.1.3 or later is required to work with current OpenSSL + releases. (OpenSSL is an optional prerequisite of APR-Util.) +* If using a command-line compiler: compiler and linker and related tools + (Refer to the cmake documentation for more information.) + +The following support libraries are mandatory: + +* APR 1.4.x or APR 1.5.x, built with cmake + +Optional support libraries allow optional features of APR to be enabled: + +* OpenSSL +* many others potentially, though the build support isn't currently + implemented + +How to build +------------ + +1. cd to a clean directory for building (i.e., don't build in your + source tree) + +2. Some cmake backends may want your compile tools in PATH. (Hint: "Visual + Studio Command Prompt") + +3. set CMAKE_LIBRARY_PATH=d:\path\to\prereq1\lib;d:\path\to\prereq2\lib;... + +4. set CMAKE_INCLUDE_PATH=d:\path\to\prereq1\include;d:\path\to\prereq2\include;... + +5. cmake -G "some backend, like 'NMake Makefiles'" + -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst + -DAPR-Util-specific-flags + d:/path/to/aprutilsource + + If APR 1.x was installed to a different directory than APR-Util, + also pass these additional arguments: + + -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include + -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib + + Alternately, use cmake-gui and update settings in the GUI. + + APR-Util feature flags: + + APU_HAVE_CRYPTO Build crypt support (only the OpenSSL + implementation is currently supported) + Default: OFF + APU_HAVE_ODBC Build ODBC DBD driver + Default: ON + APR_BUILD_TESTAPR Build APR-Util test suite + Default: OFF + TEST_STATIC_LIBS Build the test suite to test the APR static + library instead of the APR dynamic library. + Default: OFF + In order to build the test suite against both + static and dynamic libraries, separate builds + will be required, one with TEST_STATIC_LIBS + set to ON. + INSTALL_PDB Install .pdb files if generated. + Default: ON + + CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL + + CMAKE_BUILD_TYPE + + For NMake Makefiles the choices are at least DEBUG, RELEASE, + RELWITHDEBINFO, and MINSIZEREL + Other backends make have other selections. + +6. build using chosen backend (e.g., "nmake install") + +Known Bugs and Limitations +-------------------------- + +* If include/apu.h or other generated files have been created in the source + directory by another build system, they will be used unexpectedly and + cause the build to fail. +* Options should be provided for remaining features, along with finding any + necessary libraries + + DBM: + . APU_HAVE_GDBM + . APU_HAVE_NDBM + . APU_HAVE_DB + + DBD: + . APU_HAVE_PGSQL + . APU_HAVE_MYSQL + . APU_HAVE_SQLITE3 + . APU_HAVE_SQLITE2 + . APU_HAVE_ORACLE + + CRYPTO: + . APU_HAVE_NSS + + XLATE, APU_HAVE_ICONV (no way to consume an apr-iconv build yet) +* Static builds of APR modules are not supported. +* CHANGES/LICENSE/NOTICE is not installed, unlike Makefile.win. + (But unlike Makefile.win we want to call them APR-Util-CHANGES.txt + and so on.) But perhaps that is a job for a higher-level script. + +Generally: + +* Many APR-Util features have not been tested with this build. +* Developers need to examine the existing Windows build in great detail and see + what is missing from the cmake-based build, whether a feature or some build + nuance. +* Any feedback you can provide on your experiences with this build will be + helpful. Modified: stable/12/contrib/apr-util/apr-util.spec ============================================================================== --- stable/12/contrib/apr-util/apr-util.spec Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/apr-util.spec Sun Jun 14 17:36:43 2020 (r362180) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.5.4 +Version: 1.6.1 Release: 1 License: Apache Software License Group: System Environment/Libraries @@ -70,16 +70,6 @@ Requires: apr-util = %{version}-%{release} This package provides the SQLite driver for the apr-util DBD (database abstraction) interface. -%package freetds -Group: Development/Libraries -Summary: APR utility library FreeTDS DBD driver -BuildRequires: freetds-devel -Requires: apr-util = %{version}-%{release} - -%description freetds -This package provides the FreeTDS driver for the apr-util DBD -(database abstraction) interface. - %package odbc Group: Development/Libraries Summary: APR utility library ODBC DBD driver @@ -124,7 +114,7 @@ This package provides crypto support for apr-util base %configure --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{apuver} \ --with-ldap --without-gdbm \ - --with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \ + --with-sqlite3 --with-pgsql --with-mysql --with-odbc \ --with-berkeley-db \ --with-crypto --with-openssl --with-nss \ --without-sqlite2 @@ -176,10 +166,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite* -%files freetds -%defattr(-,root,root,-) -%{_libdir}/apr-util-%{apuver}/apr_dbd_freetds* - %files odbc %defattr(-,root,root,-) %{_libdir}/apr-util-%{apuver}/apr_dbd_odbc* @@ -203,7 +189,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libaprutil-%{apuver}.so %{_libdir}/pkgconfig/apr-util-%{apuver}.pc %{_includedir}/apr-%{apuver}/*.h -%doc --parents html +%doc html %changelog * Tue Jun 22 2004 Graham Leggett 1.0.0-1 Modified: stable/12/contrib/apr-util/aprutil.dsw ============================================================================== --- stable/12/contrib/apr-util/aprutil.dsw Sun Jun 14 16:47:16 2020 (r362179) +++ stable/12/contrib/apr-util/aprutil.dsw Sun Jun 14 17:36:43 2020 (r362180) @@ -51,24 +51,6 @@ Package=<4> ############################################################################### -Project: "apr_dbd_freetds"=".\dbd\apr_dbd_freetds.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libapr - End Project Dependency - Begin Project Dependency - Project_Dep_Name libaprutil - End Project Dependency -}}} - -############################################################################### - Project: "apr_dbd_mysql"=".\dbd\apr_dbd_mysql.dsp" - Package Owner=<4> Package=<5> @@ -275,9 +257,6 @@ Package=<4> Begin Project Dependency Project_Dep_Name apriconv End Project Dependency - Begin Project Dependency - Project_Dep_Name xml - End Project Dependency }}} ############################################################################### @@ -383,9 +362,6 @@ Package=<4> Begin Project Dependency Project_Dep_Name libapriconv_ces_modules End Project Dependency - Begin Project Dependency - Project_Dep_Name xml - End Project Dependency }}} ############################################################################### @@ -449,18 +425,6 @@ Package=<4> Begin Project Dependency Project_Dep_Name libapr End Project Dependency -}}} - -############################################################################### - -Project: "xml"=".\xml\expat\lib\xml.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Mon Jun 15 03:01:30 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 569E334C8E1; Mon, 15 Jun 2020 03:01:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lbhB1Gc9z401R; Mon, 15 Jun 2020 03:01:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23DED16E27; Mon, 15 Jun 2020 03:01:30 +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 05F31Ukg066542; Mon, 15 Jun 2020 03:01:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05F31Tuh066537; Mon, 15 Jun 2020 03:01:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006150301.05F31Tuh066537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 15 Jun 2020 03:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362187 - in stable/12/sys: compat/linux vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: compat/linux vm X-SVN-Commit-Revision: 362187 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 03:01:30 -0000 Author: markj Date: Mon Jun 15 03:01:28 2020 New Revision: 362187 URL: https://svnweb.freebsd.org/changeset/base/362187 Log: MFC r361945, r362036: Stop computing a "sharedram" value when emulating Linux sysinfo(2). Modified: stable/12/sys/compat/linux/linux_misc.c stable/12/sys/vm/vm_map.c stable/12/sys/vm/vm_map.h stable/12/sys/vm/vm_mmap.c stable/12/sys/vm/vm_unix.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Sun Jun 14 22:39:34 2020 (r362186) +++ stable/12/sys/compat/linux/linux_misc.c Mon Jun 15 03:01:28 2020 (r362187) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef COMPAT_LINUX32 @@ -150,7 +149,6 @@ int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) { struct l_sysinfo sysinfo; - vm_object_t object; int i, j; struct timespec ts; @@ -168,14 +166,13 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ sysinfo.totalram = physmem * PAGE_SIZE; sysinfo.freeram = sysinfo.totalram - vm_wire_count() * PAGE_SIZE; + /* + * sharedram counts pages allocated to named, swap-backed objects such + * as shared memory segments and tmpfs files. There is no cheap way to + * compute this, so just leave the field unpopulated. Linux itself only + * started setting this field in the 3.x timeframe. + */ sysinfo.sharedram = 0; - mtx_lock(&vm_object_list_mtx); - TAILQ_FOREACH(object, &vm_object_list, object_list) - if (object->shadow_count > 1) - sysinfo.sharedram += object->resident_page_count; - mtx_unlock(&vm_object_list_mtx); - - sysinfo.sharedram *= PAGE_SIZE; sysinfo.bufferram = 0; swap_pager_status(&i, &j); Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Sun Jun 14 22:39:34 2020 (r362186) +++ stable/12/sys/vm/vm_map.c Mon Jun 15 03:01:28 2020 (r362187) @@ -3097,7 +3097,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm u_long npages; u_int last_timestamp; int rv; - boolean_t need_wakeup, result, user_wire; + boolean_t need_wakeup, result, user_wire, user_wire_limit; vm_prot_t prot; VM_MAP_ASSERT_LOCKED(map); @@ -3108,6 +3108,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm if (flags & VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; user_wire = (flags & VM_MAP_WIRE_USER) ? TRUE : FALSE; + user_wire_limit = (flags & VM_MAP_WIRE_USER_LIMIT) ? TRUE : FALSE; VM_MAP_RANGE_CHECK(map, start, end); if (!vm_map_lookup_entry(map, start, &first_entry)) { if (flags & VM_MAP_WIRE_HOLESOK) @@ -3188,7 +3189,8 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm entry->wired_count++; npages = atop(entry->end - entry->start); - if (user_wire && !vm_map_wire_user_count_add(npages)) { + if (user_wire_limit && + !vm_map_wire_user_count_add(npages)) { vm_map_wire_entry_failure(map, entry, entry->start); end = entry->end; @@ -3250,7 +3252,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm last_timestamp = map->timestamp; if (rv != KERN_SUCCESS) { vm_map_wire_entry_failure(map, entry, faddr); - if (user_wire) + if (user_wire_limit) vm_map_wire_user_count_sub(npages); end = entry->end; goto done; @@ -3319,7 +3321,7 @@ done: */ if (entry->wired_count == 1) { vm_map_entry_unwire(map, entry); - if (user_wire) + if (user_wire_limit) vm_map_wire_user_count_sub( atop(entry->end - entry->start)); } else @@ -4455,7 +4457,8 @@ retry: if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE) != 0) { rv = vm_map_wire_locked(map, grow_start, grow_start + grow_amount, - VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | + VM_MAP_WIRE_NOHOLES); } vm_map_lock_downgrade(map); Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Sun Jun 14 22:39:34 2020 (r362186) +++ stable/12/sys/vm/vm_map.h Mon Jun 15 03:01:28 2020 (r362187) @@ -397,6 +397,8 @@ long vmspace_resident_count(struct vmspace *vmspace); #define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ +#define VM_MAP_WIRE_USER_LIMIT 8 /* Enfore the user wiring limit */ + #ifdef _KERNEL boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Sun Jun 14 22:39:34 2020 (r362186) +++ stable/12/sys/vm/vm_mmap.c Mon Jun 15 03:01:28 2020 (r362187) @@ -1046,7 +1046,7 @@ kern_mlock(struct proc *proc, struct ucred *cred, uint } #endif error = vm_map_wire(map, start, end, - VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | VM_MAP_WIRE_NOHOLES); #ifdef RACCT if (racct_enable && error != KERN_SUCCESS) { PROC_LOCK(proc); @@ -1111,7 +1111,8 @@ sys_mlockall(struct thread *td, struct mlockall_args * * calling vm_fault_wire() for each page in the region. */ error = vm_map_wire(map, vm_map_min(map), vm_map_max(map), - VM_MAP_WIRE_USER|VM_MAP_WIRE_HOLESOK); + VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | + VM_MAP_WIRE_HOLESOK); if (error == KERN_SUCCESS) error = 0; else if (error == KERN_RESOURCE_SHORTAGE) @@ -1589,6 +1590,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz if ((map->flags & MAP_WIREFUTURE) != 0) (void)vm_map_wire_locked(map, *addr, *addr + size, VM_MAP_WIRE_USER | + VM_MAP_WIRE_USER_LIMIT | ((flags & MAP_STACK) ? VM_MAP_WIRE_HOLESOK : VM_MAP_WIRE_NOHOLES)); vm_map_unlock(map); Modified: stable/12/sys/vm/vm_unix.c ============================================================================== --- stable/12/sys/vm/vm_unix.c Sun Jun 14 22:39:34 2020 (r362186) +++ stable/12/sys/vm/vm_unix.c Mon Jun 15 03:01:28 2020 (r362187) @@ -185,7 +185,8 @@ kern_break(struct thread *td, uintptr_t *addr) 0); if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE) != 0) { rv = vm_map_wire_locked(map, old, new, - VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | + VM_MAP_WIRE_NOHOLES); if (rv != KERN_SUCCESS) vm_map_delete(map, old, new); } From owner-svn-src-stable-12@freebsd.org Mon Jun 15 03:02:20 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D350C34CD2E; Mon, 15 Jun 2020 03:02:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lbj85Dfkz40np; Mon, 15 Jun 2020 03:02:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AED0A17007; Mon, 15 Jun 2020 03:02:20 +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 05F32KAI068470; Mon, 15 Jun 2020 03:02:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05F32JoI068465; Mon, 15 Jun 2020 03:02:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006150302.05F32JoI068465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 15 Jun 2020 03:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362188 - in stable/12/sys: compat/linux vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: compat/linux vm X-SVN-Commit-Revision: 362188 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 03:02:20 -0000 Author: markj Date: Mon Jun 15 03:02:19 2020 New Revision: 362188 URL: https://svnweb.freebsd.org/changeset/base/362188 Log: Revert r362187, it contained some unintended changes. This is a direct commit to stable/12. Modified: stable/12/sys/compat/linux/linux_misc.c stable/12/sys/vm/vm_map.c stable/12/sys/vm/vm_map.h stable/12/sys/vm/vm_mmap.c stable/12/sys/vm/vm_unix.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Jun 15 03:01:28 2020 (r362187) +++ stable/12/sys/compat/linux/linux_misc.c Mon Jun 15 03:02:19 2020 (r362188) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef COMPAT_LINUX32 @@ -149,6 +150,7 @@ int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) { struct l_sysinfo sysinfo; + vm_object_t object; int i, j; struct timespec ts; @@ -166,13 +168,14 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ sysinfo.totalram = physmem * PAGE_SIZE; sysinfo.freeram = sysinfo.totalram - vm_wire_count() * PAGE_SIZE; - /* - * sharedram counts pages allocated to named, swap-backed objects such - * as shared memory segments and tmpfs files. There is no cheap way to - * compute this, so just leave the field unpopulated. Linux itself only - * started setting this field in the 3.x timeframe. - */ sysinfo.sharedram = 0; + mtx_lock(&vm_object_list_mtx); + TAILQ_FOREACH(object, &vm_object_list, object_list) + if (object->shadow_count > 1) + sysinfo.sharedram += object->resident_page_count; + mtx_unlock(&vm_object_list_mtx); + + sysinfo.sharedram *= PAGE_SIZE; sysinfo.bufferram = 0; swap_pager_status(&i, &j); Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Mon Jun 15 03:01:28 2020 (r362187) +++ stable/12/sys/vm/vm_map.c Mon Jun 15 03:02:19 2020 (r362188) @@ -3097,7 +3097,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm u_long npages; u_int last_timestamp; int rv; - boolean_t need_wakeup, result, user_wire, user_wire_limit; + boolean_t need_wakeup, result, user_wire; vm_prot_t prot; VM_MAP_ASSERT_LOCKED(map); @@ -3108,7 +3108,6 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm if (flags & VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; user_wire = (flags & VM_MAP_WIRE_USER) ? TRUE : FALSE; - user_wire_limit = (flags & VM_MAP_WIRE_USER_LIMIT) ? TRUE : FALSE; VM_MAP_RANGE_CHECK(map, start, end); if (!vm_map_lookup_entry(map, start, &first_entry)) { if (flags & VM_MAP_WIRE_HOLESOK) @@ -3189,8 +3188,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm entry->wired_count++; npages = atop(entry->end - entry->start); - if (user_wire_limit && - !vm_map_wire_user_count_add(npages)) { + if (user_wire && !vm_map_wire_user_count_add(npages)) { vm_map_wire_entry_failure(map, entry, entry->start); end = entry->end; @@ -3252,7 +3250,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm last_timestamp = map->timestamp; if (rv != KERN_SUCCESS) { vm_map_wire_entry_failure(map, entry, faddr); - if (user_wire_limit) + if (user_wire) vm_map_wire_user_count_sub(npages); end = entry->end; goto done; @@ -3321,7 +3319,7 @@ done: */ if (entry->wired_count == 1) { vm_map_entry_unwire(map, entry); - if (user_wire_limit) + if (user_wire) vm_map_wire_user_count_sub( atop(entry->end - entry->start)); } else @@ -4457,8 +4455,7 @@ retry: if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE) != 0) { rv = vm_map_wire_locked(map, grow_start, grow_start + grow_amount, - VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | - VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); } vm_map_lock_downgrade(map); Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Mon Jun 15 03:01:28 2020 (r362187) +++ stable/12/sys/vm/vm_map.h Mon Jun 15 03:02:19 2020 (r362188) @@ -397,8 +397,6 @@ long vmspace_resident_count(struct vmspace *vmspace); #define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ -#define VM_MAP_WIRE_USER_LIMIT 8 /* Enfore the user wiring limit */ - #ifdef _KERNEL boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Mon Jun 15 03:01:28 2020 (r362187) +++ stable/12/sys/vm/vm_mmap.c Mon Jun 15 03:02:19 2020 (r362188) @@ -1046,7 +1046,7 @@ kern_mlock(struct proc *proc, struct ucred *cred, uint } #endif error = vm_map_wire(map, start, end, - VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); #ifdef RACCT if (racct_enable && error != KERN_SUCCESS) { PROC_LOCK(proc); @@ -1111,8 +1111,7 @@ sys_mlockall(struct thread *td, struct mlockall_args * * calling vm_fault_wire() for each page in the region. */ error = vm_map_wire(map, vm_map_min(map), vm_map_max(map), - VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | - VM_MAP_WIRE_HOLESOK); + VM_MAP_WIRE_USER|VM_MAP_WIRE_HOLESOK); if (error == KERN_SUCCESS) error = 0; else if (error == KERN_RESOURCE_SHORTAGE) @@ -1590,7 +1589,6 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz if ((map->flags & MAP_WIREFUTURE) != 0) (void)vm_map_wire_locked(map, *addr, *addr + size, VM_MAP_WIRE_USER | - VM_MAP_WIRE_USER_LIMIT | ((flags & MAP_STACK) ? VM_MAP_WIRE_HOLESOK : VM_MAP_WIRE_NOHOLES)); vm_map_unlock(map); Modified: stable/12/sys/vm/vm_unix.c ============================================================================== --- stable/12/sys/vm/vm_unix.c Mon Jun 15 03:01:28 2020 (r362187) +++ stable/12/sys/vm/vm_unix.c Mon Jun 15 03:02:19 2020 (r362188) @@ -185,8 +185,7 @@ kern_break(struct thread *td, uintptr_t *addr) 0); if (rv == KERN_SUCCESS && (map->flags & MAP_WIREFUTURE) != 0) { rv = vm_map_wire_locked(map, old, new, - VM_MAP_WIRE_USER | VM_MAP_WIRE_USER_LIMIT | - VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); if (rv != KERN_SUCCESS) vm_map_delete(map, old, new); } From owner-svn-src-stable-12@freebsd.org Mon Jun 15 03:03:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EF6934CAD6; Mon, 15 Jun 2020 03:03:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lbjw11DZz40mg; Mon, 15 Jun 2020 03:03:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DF2C1700F; Mon, 15 Jun 2020 03:03:00 +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 05F3303M071065; Mon, 15 Jun 2020 03:03:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05F32xX6071064; Mon, 15 Jun 2020 03:02:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006150302.05F32xX6071064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 15 Jun 2020 03:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362189 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 362189 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 03:03:00 -0000 Author: markj Date: Mon Jun 15 03:02:59 2020 New Revision: 362189 URL: https://svnweb.freebsd.org/changeset/base/362189 Log: MFC r361945, r362036: Stop computing a "sharedram" value when emulating Linux sysinfo(2). Modified: stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Jun 15 03:02:19 2020 (r362188) +++ stable/12/sys/compat/linux/linux_misc.c Mon Jun 15 03:02:59 2020 (r362189) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef COMPAT_LINUX32 @@ -150,7 +149,6 @@ int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) { struct l_sysinfo sysinfo; - vm_object_t object; int i, j; struct timespec ts; @@ -168,14 +166,13 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ sysinfo.totalram = physmem * PAGE_SIZE; sysinfo.freeram = sysinfo.totalram - vm_wire_count() * PAGE_SIZE; + /* + * sharedram counts pages allocated to named, swap-backed objects such + * as shared memory segments and tmpfs files. There is no cheap way to + * compute this, so just leave the field unpopulated. Linux itself only + * started setting this field in the 3.x timeframe. + */ sysinfo.sharedram = 0; - mtx_lock(&vm_object_list_mtx); - TAILQ_FOREACH(object, &vm_object_list, object_list) - if (object->shadow_count > 1) - sysinfo.sharedram += object->resident_page_count; - mtx_unlock(&vm_object_list_mtx); - - sysinfo.sharedram *= PAGE_SIZE; sysinfo.bufferram = 0; swap_pager_status(&i, &j); From owner-svn-src-stable-12@freebsd.org Mon Jun 15 03:10:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20C3434CF9D; Mon, 15 Jun 2020 03:10:57 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lbv50NQ3z419j; Mon, 15 Jun 2020 03:10:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02EA516F40; Mon, 15 Jun 2020 03:10:57 +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 05F3AuxD073305; Mon, 15 Jun 2020 03:10:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05F3AuP0073301; Mon, 15 Jun 2020 03:10:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006150310.05F3AuP0073301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 15 Jun 2020 03:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362190 - in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3 12/contrib/sqlite3/tea 12/contrib/sqlite3/tea/generic X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3 12/contrib/sqlite3/tea 12/contrib/sqlite3/tea/generic X-SVN-Commit-Revision: 362190 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 03:10:57 -0000 Author: cy Date: Mon Jun 15 03:10:53 2020 New Revision: 362190 URL: https://svnweb.freebsd.org/changeset/base/362190 Log: MFC r362095, r362145 r362095: MFV r362082: Update sqlite3 3.31.1 --> 3.32.0. PR: 247149 Reported by: spam123@bitbert.com Reminded by: emaste Security: CVE-2020-11655, CVE-2020-13434, CVE-2020-13435, CVE-2020-13630, CVE-2020-13631, CVE-2020-13632 r362145: MFV r362143: Update sqlite3 to 3.32.2 (3320200). CVE-2020-11655: SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function query because the AggInfo object's initialization is mishandled. CVE-2020-13434: SQLite through 3.32.0 has an integer overflow in sqlite3_str_vappendf in printf.c. CVE-2020-13435: SQLite through 3.32.0 has a segmentation fault in sqlite3ExprCodeTarget in expr.c. CVE-2020-13630: ext/fts3/fts3.c in SQLite before 3.32.0 has a use-after-free in fts3EvalNextRow, related to the snippet feature CVE-2020-13631: SQLite before 3.32.0 allows a virtual table to be renamed to the name of one of its shadow tables, related to alter.c and build.c. CVE-2020-13632: ext/fts3/fts3_snippet.c in SQLite before 3.32.0 ha s a NULL pointer dereference via a crafted matchinfo() query. PR: 247149 Reported by: spam123@bitbert.com Security: vuxml: c4ac9c79-ab37-11ea-8b5e-b42e99a1b9c3 https://nvd.nist.gov/vuln/detail/CVE-2020-11655 https://nvd.nist.gov/vuln/detail/CVE-2020-13434 https://nvd.nist.gov/vuln/detail/CVE-2020-13435 https://nvd.nist.gov/vuln/detail/CVE-2020-13630 https://nvd.nist.gov/vuln/detail/CVE-2020-13631 https://nvd.nist.gov/vuln/detail/CVE-2020-13632 Modified: stable/12/contrib/sqlite3/Makefile.msc stable/12/contrib/sqlite3/configure stable/12/contrib/sqlite3/configure.ac stable/12/contrib/sqlite3/shell.c stable/12/contrib/sqlite3/sqlite3.c stable/12/contrib/sqlite3/sqlite3.h stable/12/contrib/sqlite3/sqlite3ext.h stable/12/contrib/sqlite3/tea/configure stable/12/contrib/sqlite3/tea/configure.ac stable/12/contrib/sqlite3/tea/generic/tclsqlite3.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/sqlite3/Makefile.msc stable/11/contrib/sqlite3/configure stable/11/contrib/sqlite3/configure.ac stable/11/contrib/sqlite3/shell.c stable/11/contrib/sqlite3/sqlite3.c stable/11/contrib/sqlite3/sqlite3.h stable/11/contrib/sqlite3/sqlite3ext.h stable/11/contrib/sqlite3/tea/configure stable/11/contrib/sqlite3/tea/configure.ac stable/11/contrib/sqlite3/tea/generic/tclsqlite3.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/sqlite3/Makefile.msc ============================================================================== --- stable/12/contrib/sqlite3/Makefile.msc Mon Jun 15 03:02:59 2020 (r362189) +++ stable/12/contrib/sqlite3/Makefile.msc Mon Jun 15 03:10:53 2020 (r362190) @@ -196,6 +196,7 @@ OSTRACE = 0 DEBUG = 0 !ENDIF + # Enable use of available compiler optimizations? Normally, this should be # non-zero. Setting this to zero, thus disabling all compiler optimizations, # can be useful for testing. @@ -288,6 +289,7 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1 !ENDIF OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 Modified: stable/12/contrib/sqlite3/configure ============================================================================== --- stable/12/contrib/sqlite3/configure Mon Jun 15 03:02:59 2020 (r362189) +++ stable/12/contrib/sqlite3/configure Mon Jun 15 03:10:53 2020 (r362190) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.31.1. +# Generated by GNU Autoconf 2.69 for sqlite 3.32.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.31.1' -PACKAGE_STRING='sqlite 3.31.1' +PACKAGE_VERSION='3.32.2' +PACKAGE_STRING='sqlite 3.32.2' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.32.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.31.1:";; + short | recursive ) echo "Configuration of sqlite 3.32.2:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.31.1 +sqlite configure 3.32.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.31.1, which was +It was created by sqlite $as_me 3.32.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.31.1' + VERSION='3.32.2' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.31.1, which was +This file was extended by sqlite $as_me 3.32.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.31.1 +sqlite config.status 3.32.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/12/contrib/sqlite3/configure.ac ============================================================================== --- stable/12/contrib/sqlite3/configure.ac Mon Jun 15 03:02:59 2020 (r362189) +++ stable/12/contrib/sqlite3/configure.ac Mon Jun 15 03:10:53 2020 (r362190) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.31.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.32.2, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: stable/12/contrib/sqlite3/shell.c ============================================================================== --- stable/12/contrib/sqlite3/shell.c Mon Jun 15 03:02:59 2020 (r362189) +++ stable/12/contrib/sqlite3/shell.c Mon Jun 15 03:10:53 2020 (r362190) @@ -36,6 +36,14 @@ #endif /* +** Determine if we are dealing with WinRT, which provides only a subset of +** the full Win32 API. +*/ +#if !defined(SQLITE_OS_WINRT) +# define SQLITE_OS_WINRT 0 +#endif + +/* ** Warning pragmas copied from msvc.h in the core. */ #if defined(_MSC_VER) @@ -147,22 +155,26 @@ typedef unsigned char u8; #if defined(_WIN32) || defined(WIN32) -# include -# include -# define isatty(h) _isatty(h) -# ifndef access -# define access(f,m) _access((f),(m)) +# if SQLITE_OS_WINRT +# define SQLITE_OMIT_POPEN 1 +# else +# include +# include +# define isatty(h) _isatty(h) +# ifndef access +# define access(f,m) _access((f),(m)) +# endif +# ifndef unlink +# define unlink _unlink +# endif +# ifndef strdup +# define strdup _strdup +# endif +# undef popen +# define popen _popen +# undef pclose +# define pclose _pclose # endif -# ifndef unlink -# define unlink _unlink -# endif -# ifndef strdup -# define strdup _strdup -# endif -# undef popen -# define popen _popen -# undef pclose -# define pclose _pclose #else /* Make sure isatty() has a prototype. */ extern int isatty(int); @@ -191,6 +203,9 @@ typedef unsigned char u8; #define ToLower(X) (char)tolower((unsigned char)X) #if defined(_WIN32) || defined(WIN32) +#if SQLITE_OS_WINRT +#include +#endif #include /* string conversion routines only needed on Win32 */ @@ -206,7 +221,7 @@ extern LPWSTR sqlite3_win32_utf8_to_unicode(const char ** rendering quoted strings that contain \n characters). The following ** routines take care of that. */ -#if defined(_WIN32) || defined(WIN32) +#if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT static void setBinaryMode(FILE *file, int isOutput){ if( isOutput ) fflush(file); _setmode(_fileno(file), _O_BINARY); @@ -310,6 +325,7 @@ static int hasTimer(void){ if( getProcessTimesAddr ){ return 1; } else { +#if !SQLITE_OS_WINRT /* GetProcessTimes() isn't supported in WIN95 and some other Windows ** versions. See if the version we are running on has it, and if it ** does, save off a pointer to it and the current process handle. @@ -326,6 +342,7 @@ static int hasTimer(void){ FreeLibrary(hinstLib); } } +#endif } return 0; } @@ -415,7 +432,16 @@ static sqlite3 *globalDb = 0; */ static volatile int seenInterrupt = 0; +#ifdef SQLITE_DEBUG /* +** Out-of-memory simulator variables +*/ +static unsigned int oomCounter = 0; /* Simulate OOM when equals 1 */ +static unsigned int oomRepeat = 0; /* Number of OOMs in a row */ +static void*(*defaultMalloc)(int) = 0; /* The low-level malloc routine */ +#endif /* SQLITE_DEBUG */ + +/* ** This is the name of our program. It is set in main(), used ** in a number of other places, mostly for error messages. */ @@ -466,6 +492,49 @@ static void shell_out_of_memory(void){ exit(1); } +#ifdef SQLITE_DEBUG +/* This routine is called when a simulated OOM occurs. It is broken +** out as a separate routine to make it easy to set a breakpoint on +** the OOM +*/ +void shellOomFault(void){ + if( oomRepeat>0 ){ + oomRepeat--; + }else{ + oomCounter--; + } +} +#endif /* SQLITE_DEBUG */ + +#ifdef SQLITE_DEBUG +/* This routine is a replacement malloc() that is used to simulate +** Out-Of-Memory (OOM) errors for testing purposes. +*/ +static void *oomMalloc(int nByte){ + if( oomCounter ){ + if( oomCounter==1 ){ + shellOomFault(); + return 0; + }else{ + oomCounter--; + } + } + return defaultMalloc(nByte); +} +#endif /* SQLITE_DEBUG */ + +#ifdef SQLITE_DEBUG +/* Register the OOM simulator. This must occur before any memory +** allocations */ +static void registerOomSimulator(void){ + sqlite3_mem_methods mem; + sqlite3_config(SQLITE_CONFIG_GETMALLOC, &mem); + defaultMalloc = mem.xMalloc; + mem.xMalloc = oomMalloc; + sqlite3_config(SQLITE_CONFIG_MALLOC, &mem); +} +#endif + /* ** Write I/O traces to the following stream. */ @@ -2426,6 +2495,7 @@ static int writeFile( if( mtime>=0 ){ #if defined(_WIN32) +#if !SQLITE_OS_WINRT /* Windows */ FILETIME lastAccess; FILETIME lastWrite; @@ -2456,6 +2526,7 @@ static int writeFile( }else{ return 1; } +#endif #elif defined(AT_FDCWD) && 0 /* utimensat() is not universally available */ /* Recent unix */ struct timespec times[2]; @@ -4213,6 +4284,101 @@ int sqlite3MemTraceDeactivate(void){ } /************************* End ../ext/misc/memtrace.c ********************/ +/************************* Begin ../ext/misc/uint.c ******************/ +/* +** 2020-04-14 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** This SQLite extension implements the UINT collating sequence. +** +** UINT works like BINARY for text, except that embedded strings +** of digits compare in numeric order. +** +** * Leading zeros are handled properly, in the sense that +** they do not mess of the maginitude comparison of embedded +** strings of digits. "x00123y" is equal to "x123y". +** +** * Only unsigned integers are recognized. Plus and minus +** signs are ignored. Decimal points and exponential notation +** are ignored. +** +** * Embedded integers can be of arbitrary length. Comparison +** is *not* limited integers that can be expressed as a +** 64-bit machine integer. +*/ +/* #include "sqlite3ext.h" */ +SQLITE_EXTENSION_INIT1 +#include +#include +#include + +/* +** Compare text in lexicographic order, except strings of digits +** compare in numeric order. +*/ +static int uintCollFunc( + void *notUsed, + int nKey1, const void *pKey1, + int nKey2, const void *pKey2 +){ + const unsigned char *zA = (const unsigned char*)pKey1; + const unsigned char *zB = (const unsigned char*)pKey2; + int i=0, j=0, x; + (void)notUsed; + while( i +#include /* ** Implementation of the "sqlar_compress(X)" SQL function. @@ -7834,14 +8001,19 @@ int idxFindIndexes( /* int iParent = sqlite3_column_int(pExplain, 1); */ /* int iNotUsed = sqlite3_column_int(pExplain, 2); */ const char *zDetail = (const char*)sqlite3_column_text(pExplain, 3); - int nDetail = STRLEN(zDetail); + int nDetail; int i; + if( !zDetail ) continue; + nDetail = STRLEN(zDetail); + for(i=0; imodePrior = p->mode; + p->priorShFlgs = p->shellFlgs; memcpy(p->colSepPrior, p->colSeparator, sizeof(p->colSeparator)); memcpy(p->rowSepPrior, p->rowSeparator, sizeof(p->rowSeparator)); } static void outputModePop(ShellState *p){ p->mode = p->modePrior; + p->shellFlgs = p->priorShFlgs; memcpy(p->colSeparator, p->colSepPrior, sizeof(p->colSeparator)); memcpy(p->rowSeparator, p->rowSepPrior, sizeof(p->rowSeparator)); } @@ -10871,8 +11046,7 @@ static void set_table_name(ShellState *p, const char * */ static int run_table_dump_query( ShellState *p, /* Query context */ - const char *zSelect, /* SELECT statement to extract content */ - const char *zFirstRow /* Print before first row, if not NULL */ + const char *zSelect /* SELECT statement to extract content */ ){ sqlite3_stmt *pSelect; int rc; @@ -10889,10 +11063,6 @@ static int run_table_dump_query( rc = sqlite3_step(pSelect); nResult = sqlite3_column_count(pSelect); while( rc==SQLITE_ROW ){ - if( zFirstRow ){ - utf8_printf(p->out, "%s", zFirstRow); - zFirstRow = 0; - } z = (const char*)sqlite3_column_text(pSelect, 0); utf8_printf(p->out, "%s", z); for(i=1; idb, 0, 0); sqlite3_shathree_init(p->db, 0, 0); sqlite3_completion_init(p->db, 0, 0); + sqlite3_uint_init(p->db, 0, 0); #if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) sqlite3_dbdata_init(p->db, 0, 0); #endif @@ -13073,6 +13268,8 @@ struct ImportCtx { int n; /* Number of bytes in z */ int nAlloc; /* Space allocated for z[] */ int nLine; /* Current line number */ + int nRow; /* Number of rows imported */ + int nErr; /* Number of errors encountered */ int bNotFirst; /* True if one or more bytes already read */ int cTerm; /* Character that terminated the most recent field */ int cColSep; /* The column separator character. (Usually ",") */ @@ -13454,11 +13651,15 @@ static void output_reset(ShellState *p){ zCmd = sqlite3_mprintf("%s %s", zXdgOpenCmd, p->zTempFile); if( system(zCmd) ){ utf8_printf(stderr, "Failed: [%s]\n", zCmd); + }else{ + /* Give the start/open/xdg-open command some time to get + ** going before we continue, and potential delete the + ** p->zTempFile data file out from under it */ + sqlite3_sleep(2000); } sqlite3_free(zCmd); outputModePop(p); p->doXdgOpen = 0; - sqlite3_sleep(100); } #endif /* !defined(SQLITE_NOHAVE_SYSTEM) */ } @@ -13534,12 +13735,7 @@ static int shell_dbinfo_command(ShellState *p, int nAr "SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1", -1, &pStmt, 0); if( rc ){ - if( !sqlite3_compileoption_used("ENABLE_DBPAGE_VTAB") ){ - utf8_printf(stderr, "the \".dbinfo\" command requires the " - "-DSQLITE_ENABLE_DBPAGE_VTAB compile-time options\n"); - }else{ - utf8_printf(stderr, "error: %s\n", sqlite3_errmsg(p->db)); - } + utf8_printf(stderr, "error: %s\n", sqlite3_errmsg(p->db)); sqlite3_finalize(pStmt); return 1; } @@ -13748,9 +13944,21 @@ static void newTempFile(ShellState *p, const char *zSu sqlite3_file_control(p->db, 0, SQLITE_FCNTL_TEMPFILENAME, &p->zTempFile); } if( p->zTempFile==0 ){ + /* If p->db is an in-memory database then the TEMPFILENAME file-control + ** will not work and we will need to fallback to guessing */ + char *zTemp; sqlite3_uint64 r; sqlite3_randomness(sizeof(r), &r); - p->zTempFile = sqlite3_mprintf("temp%llx.%s", r, zSuffix); + zTemp = getenv("TEMP"); + if( zTemp==0 ) zTemp = getenv("TMP"); + if( zTemp==0 ){ +#ifdef _WIN32 + zTemp = "\\tmp"; +#else + zTemp = "/tmp"; +#endif + } + p->zTempFile = sqlite3_mprintf("%s/temp%llx.%s", zTemp, r, zSuffix); }else{ p->zTempFile = sqlite3_mprintf("%z.%s", p->zTempFile, zSuffix); } @@ -15774,7 +15982,8 @@ static int do_meta_command(char *zLine, ShellState *p) #endif /* !(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) */ if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){ - const char *zLike = 0; + char *zLike = 0; + char *zSql; int i; int savedShowHeader = p->showHeader; int savedShellFlags = p->shellFlgs; @@ -15802,12 +16011,10 @@ static int do_meta_command(char *zLine, ShellState *p) goto meta_command_exit; } }else if( zLike ){ - raw_printf(stderr, "Usage: .dump ?--preserve-rowids? " - "?--newlines? ?LIKE-PATTERN?\n"); - rc = 1; - goto meta_command_exit; + zLike = sqlite3_mprintf("%z OR name LIKE %Q ESCAPE '\\'", + zLike, azArg[i]); }else{ - zLike = azArg[i]; + zLike = sqlite3_mprintf("name LIKE %Q ESCAPE '\\'", azArg[i]); } } @@ -15825,35 +16032,25 @@ static int do_meta_command(char *zLine, ShellState *p) ** corrupt. */ sqlite3_exec(p->db, "SAVEPOINT dump; PRAGMA writable_schema=ON", 0, 0, 0); p->nErr = 0; - if( zLike==0 ){ - run_schema_dump_query(p, - "SELECT name, type, sql FROM sqlite_master " - "WHERE sql NOT NULL AND type=='table' AND name!='sqlite_sequence'" - ); - run_schema_dump_query(p, - "SELECT name, type, sql FROM sqlite_master " - "WHERE name=='sqlite_sequence'" - ); - run_table_dump_query(p, - "SELECT sql FROM sqlite_master " - "WHERE sql NOT NULL AND type IN ('index','trigger','view')", 0 - ); - }else{ - char *zSql; - zSql = sqlite3_mprintf( - "SELECT name, type, sql FROM sqlite_master " - "WHERE tbl_name LIKE %Q AND type=='table'" - " AND sql NOT NULL", zLike); - run_schema_dump_query(p,zSql); - sqlite3_free(zSql); - zSql = sqlite3_mprintf( - "SELECT sql FROM sqlite_master " - "WHERE sql NOT NULL" - " AND type IN ('index','trigger','view')" - " AND tbl_name LIKE %Q", zLike); - run_table_dump_query(p, zSql, 0); - sqlite3_free(zSql); - } + if( zLike==0 ) zLike = sqlite3_mprintf("true"); + zSql = sqlite3_mprintf( + "SELECT name, type, sql FROM sqlite_master " + "WHERE (%s) AND type=='table'" + " AND sql NOT NULL" + " ORDER BY tbl_name='sqlite_sequence', rowid", + zLike + ); + run_schema_dump_query(p,zSql); + sqlite3_free(zSql); + zSql = sqlite3_mprintf( + "SELECT sql FROM sqlite_master " + "WHERE (%s) AND sql NOT NULL" + " AND type IN ('index','trigger','view')", + zLike + ); + run_table_dump_query(p, zSql); + sqlite3_free(zSql); + sqlite3_free(zLike); if( p->writableSchema ){ raw_printf(p->out, "PRAGMA writable_schema=OFF;\n"); p->writableSchema = 0; @@ -15956,6 +16153,7 @@ static int do_meta_command(char *zLine, ShellState *p) { "tempfilename", SQLITE_FCNTL_TEMPFILENAME, "" }, { "has_moved", SQLITE_FCNTL_HAS_MOVED, "" }, { "lock_timeout", SQLITE_FCNTL_LOCK_TIMEOUT, "MILLISEC" }, + { "reserve_bytes", SQLITE_FCNTL_RESERVE_BYTES, "[N]" }, }; int filectrl = -1; int iCtrl = -1; @@ -15963,10 +16161,21 @@ static int do_meta_command(char *zLine, ShellState *p) int isOk = 0; /* 0: usage 1: %lld 2: no-result */ int n2, i; const char *zCmd = 0; + const char *zSchema = 0; open_db(p, 0); zCmd = nArg>=2 ? azArg[1] : "help"; + if( zCmd[0]=='-' + && (strcmp(zCmd,"--schema")==0 || strcmp(zCmd,"-schema")==0) + && nArg>=4 + ){ + zSchema = azArg[2]; + for(i=3; idb, 0, SQLITE_FCNTL_SIZE_LIMIT, &iRes); + sqlite3_file_control(p->db, zSchema, SQLITE_FCNTL_SIZE_LIMIT, &iRes); isOk = 1; break; } @@ -16017,7 +16226,7 @@ static int do_meta_command(char *zLine, ShellState *p) int x; if( nArg!=3 ) break; x = (int)integerValue(azArg[2]); - sqlite3_file_control(p->db, 0, filectrl, &x); + sqlite3_file_control(p->db, zSchema, filectrl, &x); isOk = 2; break; } @@ -16026,7 +16235,7 @@ static int do_meta_command(char *zLine, ShellState *p) int x; if( nArg!=2 && nArg!=3 ) break; x = nArg==3 ? booleanValue(azArg[2]) : -1; - sqlite3_file_control(p->db, 0, filectrl, &x); + sqlite3_file_control(p->db, zSchema, filectrl, &x); iRes = x; isOk = 1; break; @@ -16034,7 +16243,7 @@ static int do_meta_command(char *zLine, ShellState *p) case SQLITE_FCNTL_HAS_MOVED: { int x; if( nArg!=2 ) break; - sqlite3_file_control(p->db, 0, filectrl, &x); + sqlite3_file_control(p->db, zSchema, filectrl, &x); iRes = x; isOk = 1; break; @@ -16042,7 +16251,7 @@ static int do_meta_command(char *zLine, ShellState *p) case SQLITE_FCNTL_TEMPFILENAME: { char *z = 0; if( nArg!=2 ) break; - sqlite3_file_control(p->db, 0, filectrl, &z); + sqlite3_file_control(p->db, zSchema, filectrl, &z); if( z ){ utf8_printf(p->out, "%s\n", z); sqlite3_free(z); @@ -16050,6 +16259,18 @@ static int do_meta_command(char *zLine, ShellState *p) isOk = 2; break; } + case SQLITE_FCNTL_RESERVE_BYTES: { + int x; + if( nArg>=3 ){ + x = atoi(azArg[2]); + sqlite3_file_control(p->db, zSchema, filectrl, &x); + } + x = -1; + sqlite3_file_control(p->db, zSchema, filectrl, &x); + utf8_printf(p->out,"%d\n", x); + isOk = 2; + break; + } } } if( isOk==0 && iCtrl>=0 ){ @@ -16133,8 +16354,8 @@ static int do_meta_command(char *zLine, ShellState *p) }else if( c=='i' && strncmp(azArg[0], "import", n)==0 ){ - char *zTable; /* Insert data into this table */ - char *zFile; /* Name of file to extra content from */ + char *zTable = 0; /* Insert data into this table */ + char *zFile = 0; /* Name of file to extra content from */ sqlite3_stmt *pStmt = NULL; /* A statement */ int nCol; /* Number of columns in the table */ int nByte; /* Number of bytes in an SQL string */ @@ -16145,51 +16366,108 @@ static int do_meta_command(char *zLine, ShellState *p) ImportCtx sCtx; /* Reader context */ char *(SQLITE_CDECL *xRead)(ImportCtx*); /* Func to read one value */ int (SQLITE_CDECL *xCloser)(FILE*); /* Func to close file */ + int eVerbose = 0; /* Larger for more console output */ + int nSkip = 0; /* Initial lines to skip */ + int useOutputMode = 1; /* Use output mode to determine separators */ - if( nArg!=3 ){ - raw_printf(stderr, "Usage: .import FILE TABLE\n"); - goto meta_command_exit; - } - zFile = azArg[1]; - zTable = azArg[2]; - seenInterrupt = 0; memset(&sCtx, 0, sizeof(sCtx)); - open_db(p, 0); - nSep = strlen30(p->colSeparator); - if( nSep==0 ){ - raw_printf(stderr, - "Error: non-null column separator required for import\n"); - return 1; + if( p->mode==MODE_Ascii ){ + xRead = ascii_read_one_field; + }else{ + xRead = csv_read_one_field; } - if( nSep>1 ){ - raw_printf(stderr, "Error: multi-character column separators not allowed" - " for import\n"); - return 1; + for(i=1; iout, "ERROR: extra argument: \"%s\". Usage:\n", z); + showHelp(p->out, "import"); + rc = 1; + goto meta_command_exit; + } + }else if( strcmp(z,"-v")==0 ){ + eVerbose++; + }else if( strcmp(z,"-skip")==0 && iout, "ERROR: unknown option: \"%s\". Usage:\n", z); + showHelp(p->out, "import"); + rc = 1; + goto meta_command_exit; + } } - nSep = strlen30(p->rowSeparator); - if( nSep==0 ){ - raw_printf(stderr, "Error: non-null row separator required for import\n"); - return 1; + if( zTable==0 ){ + utf8_printf(p->out, "ERROR: missing %s argument. Usage:\n", + zFile==0 ? "FILE" : "TABLE"); + showHelp(p->out, "import"); + rc = 1; + goto meta_command_exit; } - if( nSep==2 && p->mode==MODE_Csv && strcmp(p->rowSeparator, SEP_CrLf)==0 ){ - /* When importing CSV (only), if the row separator is set to the - ** default output row separator, change it to the default input - ** row separator. This avoids having to maintain different input - ** and output row separators. */ - sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_Row); + seenInterrupt = 0; + open_db(p, 0); + if( useOutputMode ){ + /* If neither the --csv or --ascii options are specified, then set + ** the column and row separator characters from the output mode. */ + nSep = strlen30(p->colSeparator); + if( nSep==0 ){ + raw_printf(stderr, + "Error: non-null column separator required for import\n"); + rc = 1; + goto meta_command_exit; + } + if( nSep>1 ){ + raw_printf(stderr, + "Error: multi-character column separators not allowed" + " for import\n"); + rc = 1; + goto meta_command_exit; + } nSep = strlen30(p->rowSeparator); + if( nSep==0 ){ + raw_printf(stderr, + "Error: non-null row separator required for import\n"); + rc = 1; + goto meta_command_exit; + } + if( nSep==2 && p->mode==MODE_Csv && strcmp(p->rowSeparator,SEP_CrLf)==0 ){ + /* When importing CSV (only), if the row separator is set to the + ** default output row separator, change it to the default input + ** row separator. This avoids having to maintain different input + ** and output row separators. */ + sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_Row); + nSep = strlen30(p->rowSeparator); + } + if( nSep>1 ){ + raw_printf(stderr, "Error: multi-character row separators not allowed" + " for import\n"); + rc = 1; + goto meta_command_exit; + } + sCtx.cColSep = p->colSeparator[0]; + sCtx.cRowSep = p->rowSeparator[0]; } - if( nSep>1 ){ - raw_printf(stderr, "Error: multi-character row separators not allowed" - " for import\n"); - return 1; - } sCtx.zFile = zFile; sCtx.nLine = 1; if( sCtx.zFile[0]=='|' ){ #ifdef SQLITE_OMIT_POPEN raw_printf(stderr, "Error: pipes are not supported in this OS\n"); - return 1; + rc = 1; + goto meta_command_exit; #else sCtx.in = popen(sCtx.zFile+1, "r"); sCtx.zFile = ""; @@ -16199,17 +16477,26 @@ static int do_meta_command(char *zLine, ShellState *p) sCtx.in = fopen(sCtx.zFile, "rb"); xCloser = fclose; } - if( p->mode==MODE_Ascii ){ - xRead = ascii_read_one_field; - }else{ - xRead = csv_read_one_field; - } if( sCtx.in==0 ){ utf8_printf(stderr, "Error: cannot open \"%s\"\n", zFile); - return 1; + rc = 1; + goto meta_command_exit; } - sCtx.cColSep = p->colSeparator[0]; - sCtx.cRowSep = p->rowSeparator[0]; + if( eVerbose>=2 || (eVerbose>=1 && useOutputMode) ){ + char zSep[2]; + zSep[1] = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Mon Jun 15 15:59:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D861F3386CE; Mon, 15 Jun 2020 15:59:44 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lwy85hCzz3ZfC; Mon, 15 Jun 2020 15:59:44 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDFA51FC65; Mon, 15 Jun 2020 15:59:44 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05FFxixn050668; Mon, 15 Jun 2020 15:59:44 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FFxi1N050666; Mon, 15 Jun 2020 15:59:44 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202006151559.05FFxi1N050666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Mon, 15 Jun 2020 15:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362200 - in stable/12/tools/tools/locale: etc/final-maps tools X-SVN-Group: stable-12 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in stable/12/tools/tools/locale: etc/final-maps tools X-SVN-Commit-Revision: 362200 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 15:59:44 -0000 Author: yuripv Date: Mon Jun 15 15:59:44 2020 New Revision: 362200 URL: https://svnweb.freebsd.org/changeset/base/362200 Log: MFC r353127: Pre-generate Big5 charmap from CLDR data. The one used previously was missing the characters in 0-127 range, making various tools try to escape them in output. PR: 235100 Reviewed by: bapt Tested by: Ting-Wei Lan Differential Revision: https://reviews.freebsd.org/D21794 Modified: stable/12/tools/tools/locale/etc/final-maps/map.Big5 (contents, props changed) stable/12/tools/tools/locale/tools/finalize Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/etc/final-maps/map.Big5 ============================================================================== --- stable/12/tools/tools/locale/etc/final-maps/map.Big5 Mon Jun 15 14:58:40 2020 (r362199) +++ stable/12/tools/tools/locale/etc/final-maps/map.Big5 Mon Jun 15 15:59:44 2020 (r362200) @@ -1,13708 +1,13968 @@ +###################### +# POSIX charmap +# Generated automatically from the Unicode Character Database and Common Locale Data Repository +# see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html +# charset: Big5 +###################### +################################################################################################# +# Copyright 1991-2011 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in # +# http://www.unicode.org/copyright.html. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode # +# data files and any associated documentation (the "Data Files") or Unicode software and any # +# associated documentation (the "Software") to deal in the Data Files or Software without # +# restriction, including without limitation the rights to use, copy, modify, merge, publish, # +# distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom # +# the Data Files or Software are furnished to do so, provided that (a) the above copyright # +# notice(s) and this permission notice appear with all copies of the Data Files or Software, # +# (b) both the above copyright notice(s) and this permission notice appear in associated # +# documentation, and (c) there is clear notice in each modified Data File or in the Software as # +# well as in the documentation associated with the Data File(s) or Software that the data or # +# software has been modified. # +# # +# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT # +# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR # +# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # +# CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. # +################################################################################################# + "Big5" - 1 - 2 + 1 + 2 + CHARMAP - \xa1\x40 - \xa1\x41 - \xa1\x42 - \xa1\x43 - \xa1\x44 - \xa1\x45 - \xa1\x46 - \xa1\x47 - \xa1\x48 - \xa1\x49 - \xa1\x4a - \xa1\x4b - \xa1\x4c - \xa1\x4d - \xa1\x4e - \xa1\x4f - \xa1\x50 - \xa1\x51 - \xa1\x52 - \xa1\x53 - \xa1\x54 - \xa1\x55 - \xa1\x56 - \xa1\x57 - \xa1\x58 - \xa1\x59 - \xa1\x5b - \xa1\x5c - \xa1\x5d - \xa1\x5e - \xa1\x5f - \xa1\x60 - \xa1\x61 - \xa1\x62 - \xa1\x63 - \xa1\x64 - \xa1\x65 - \xa1\x66 - \xa1\x67 - \xa1\x68 - \xa1\x69 - \xa1\x6a - \xa1\x6b - \xa1\x6c - \xa1\x6d - \xa1\x6e - \xa1\x6f - \xa1\x70 - \xa1\x71 - \xa1\x72 - \xa1\x73 - \xa1\x74 - \xa1\x75 - \xa1\x76 - \xa1\x77 - \xa1\x78 - \xa1\x79 - \xa1\x7a - \xa1\x7b - \xa1\x7c - \xa1\x7d - \xa1\x7e - \xa1\xa1 - \xa1\xa2 - \xa1\xa3 - \xa1\xa4 - \xa1\xa5 - \xa1\xa6 - \xa1\xa7 - \xa1\xa8 - \xa1\xa9 - \xa1\xaa - \xa1\xab - \xa1\xac - \xa1\xad - \xa1\xae - \xa1\xaf - \xa1\xb0 - \xa1\xb1 - \xa1\xb2 - \xa1\xb3 - \xa1\xb4 - \xa1\xb5 - \xa1\xb6 - \xa1\xb7 - \xa1\xb8 - \xa1\xb9 - \xa1\xba - \xa1\xbb - \xa1\xbc - \xa1\xbd - \xa1\xbe - \xa1\xbf - \xa1\xc0 - \xa1\xc1 - \xa1\xc2 - \xa1\xc4 - \xa1\xc6 - \xa1\xc7 - \xa1\xc8 - \xa1\xc9 - \xa1\xca - \xa1\xcb - \xa1\xcc - \xa1\xcd - \xa1\xce - \xa1\xcf - \xa1\xd0 - \xa1\xd1 - \xa1\xd2 - \xa1\xd3 - \xa1\xd4 - \xa1\xd5 - \xa1\xd6 - \xa1\xd7 - \xa1\xd8 - \xa1\xd9 - \xa1\xda - \xa1\xdb - \xa1\xdc - \xa1\xdd - \xa1\xde - \xa1\xdf - \xa1\xe0 - \xa1\xe1 - \xa1\xe2 - \xa1\xe3 - \xa1\xe4 - \xa1\xe5 - \xa1\xe6 - \xa1\xe7 - \xa1\xe8 - \xa1\xe9 - \xa1\xea - \xa1\xeb - \xa1\xec - \xa1\xed - \xa1\xee - \xa1\xef - \xa1\xf0 - \xa1\xf1 - \xa1\xf2 - \xa1\xf3 - \xa1\xf4 - \xa1\xf5 - \xa1\xf6 - \xa1\xf7 - \xa1\xf8 - \xa1\xf9 - \xa1\xfa - \xa1\xfb - \xa1\xfc - \xa1\xfd - \xa2\x41 - \xa2\x42 - \xa2\x43 - \xa2\x44 - \xa2\x45 - \xa2\x46 - \xa2\x47 - \xa2\x48 - \xa2\x49 - \xa2\x4a - \xa2\x4b - \xa2\x4c - \xa2\x4d - \xa2\x4e - \xa2\x4f - \xa2\x50 - \xa2\x51 - \xa2\x52 - \xa2\x53 - \xa2\x54 - \xa2\x55 - \xa2\x56 - \xa2\x57 - \xa2\x58 - \xa2\x59 - \xa2\x5a - \xa2\x5b - \xa2\x5c - \xa2\x5d - \xa2\x5e - \xa2\x5f - \xa2\x60 - \xa2\x61 - \xa2\x62 - \xa2\x63 - \xa2\x64 - \xa2\x65 - \xa2\x66 - \xa2\x67 - \xa2\x68 - \xa2\x69 - \xa2\x6a - \xa2\x6b - \xa2\x6c - \xa2\x6d - \xa2\x6e - \xa2\x6f - \xa2\x70 - \xa2\x71 - \xa2\x72 - \xa2\x73 - \xa2\x74 - \xa2\x75 - \xa2\x76 - \xa2\x77 - \xa2\x78 - \xa2\x79 - \xa2\x7a - \xa2\x7b - \xa2\x7c - \xa2\x7d - \xa2\x7e - \xa2\xa1 - \xa2\xa2 - \xa2\xa3 - \xa2\xa4 - \xa2\xa5 - \xa2\xa6 - \xa2\xa7 - \xa2\xa8 - \xa2\xa9 - \xa2\xaa - \xa2\xab - \xa2\xac - \xa2\xad - \xa2\xae - \xa2\xaf - \xa2\xb0 - \xa2\xb1 - \xa2\xb2 - \xa2\xb3 - \xa2\xb4 - \xa2\xb5 - \xa2\xb6 - \xa2\xb7 - \xa2\xb8 - \xa2\xb9 - \xa2\xba - \xa2\xbb - \xa2\xbc - \xa2\xbd - \xa2\xbe - \xa2\xbf - \xa2\xc0 - \xa2\xc1 - \xa2\xc2 - \xa2\xc3 - \xa2\xc4 - \xa2\xc5 - \xa2\xc6 - \xa2\xc7 - \xa2\xc8 - \xa2\xc9 - \xa2\xca - \xa2\xcb - \xa2\xcd - \xa2\xcf - \xa2\xd0 - \xa2\xd1 - \xa2\xd2 - \xa2\xd3 - \xa2\xd4 - \xa2\xd5 - \xa2\xd6 - \xa2\xd7 - \xa2\xd8 - \xa2\xd9 - \xa2\xda - \xa2\xdb - \xa2\xdc - \xa2\xdd - \xa2\xde - \xa2\xdf - \xa2\xe0 - \xa2\xe1 - \xa2\xe2 - \xa2\xe3 - \xa2\xe4 - \xa2\xe5 - \xa2\xe6 - \xa2\xe7 - \xa2\xe8 - \xa2\xe9 - \xa2\xea - \xa2\xeb - \xa2\xec - \xa2\xed - \xa2\xee - \xa2\xef - \xa2\xf0 - \xa2\xf1 - \xa2\xf2 - \xa2\xf3 - \xa2\xf4 - \xa2\xf5 - \xa2\xf6 - \xa2\xf7 - \xa2\xf8 - \xa2\xf9 - \xa2\xfa - \xa2\xfb - \xa2\xfc - \xa2\xfd - \xa2\xfe - \xa3\x40 - \xa3\x41 - \xa3\x42 - \xa3\x43 - \xa3\x44 - \xa3\x45 - \xa3\x46 - \xa3\x47 - \xa3\x48 - \xa3\x49 - \xa3\x4a - \xa3\x4b - \xa3\x4c - \xa3\x4d - \xa3\x4e - \xa3\x4f - \xa3\x50 - \xa3\x51 - \xa3\x52 - \xa3\x53 - \xa3\x54 - \xa3\x55 - \xa3\x56 - \xa3\x57 - \xa3\x58 - \xa3\x59 - \xa3\x5a - \xa3\x5b - \xa3\x5c - \xa3\x5d - \xa3\x5e - \xa3\x5f - \xa3\x60 - \xa3\x61 - \xa3\x62 - \xa3\x63 - \xa3\x64 - \xa3\x65 - \xa3\x66 - \xa3\x67 - \xa3\x68 - \xa3\x69 - \xa3\x6a - \xa3\x6b - \xa3\x6c - \xa3\x6d - \xa3\x6e - \xa3\x6f - \xa3\x70 - \xa3\x71 - \xa3\x72 - \xa3\x73 - \xa3\x74 - \xa3\x75 - \xa3\x76 - \xa3\x77 - \xa3\x78 - \xa3\x79 - \xa3\x7a - \xa3\x7b - \xa3\x7c - \xa3\x7d - \xa3\x7e - \xa3\xa1 - \xa3\xa2 - \xa3\xa3 - \xa3\xa4 - \xa3\xa5 - \xa3\xa6 - \xa3\xa7 - \xa3\xa8 - \xa3\xa9 - \xa3\xaa - \xa3\xab - \xa3\xac - \xa3\xad - \xa3\xae - \xa3\xaf - \xa3\xb0 - \xa3\xb1 - \xa3\xb2 - \xa3\xb3 - \xa3\xb4 - \xa3\xb5 - \xa3\xb6 - \xa3\xb7 - \xa3\xb8 - \xa3\xb9 - \xa3\xba - \xa3\xbb - \xa3\xbc - \xa3\xbd - \xa3\xbe - \xa3\xbf - \xa4\x40 - \xa4\x41 - \xa4\x42 - \xa4\x43 - \xa4\x44 - \xa4\x45 - \xa4\x46 - \xa4\x47 - \xa4\x48 - \xa4\x49 - \xa4\x4a - \xa4\x4b - \xa4\x4c - \xa4\x4d - \xa4\x4e - \xa4\x4f - \xa4\x50 - \xa4\x51 - \xa4\x52 - \xa4\x53 - \xa4\x54 - \xa4\x55 - \xa4\x56 - \xa4\x57 - \xa4\x58 - \xa4\x59 - \xa4\x5a - \xa4\x5b - \xa4\x5c - \xa4\x5d - \xa4\x5e - \xa4\x5f - \xa4\x60 - \xa4\x61 - \xa4\x62 - \xa4\x63 - \xa4\x64 - \xa4\x65 - \xa4\x66 - \xa4\x67 - \xa4\x68 - \xa4\x69 - \xa4\x6a - \xa4\x6b - \xa4\x6c - \xa4\x6d - \xa4\x6e - \xa4\x6f - \xa4\x70 - \xa4\x71 - \xa4\x72 - \xa4\x73 - \xa4\x74 - \xa4\x75 - \xa4\x76 - \xa4\x77 - \xa4\x78 - \xa4\x79 - \xa4\x7a - \xa4\x7b - \xa4\x7c - \xa4\x7d - \xa4\x7e - \xa4\xa1 - \xa4\xa2 - \xa4\xa3 - \xa4\xa4 - \xa4\xa5 - \xa4\xa6 - \xa4\xa7 - \xa4\xa8 - \xa4\xa9 - \xa4\xaa - \xa4\xab - \xa4\xac - \xa4\xad - \xa4\xae - \xa4\xaf - \xa4\xb0 - \xa4\xb1 - \xa4\xb2 - \xa4\xb3 - \xa4\xb4 - \xa4\xb5 - \xa4\xb6 - \xa4\xb7 - \xa4\xb8 - \xa4\xb9 - \xa4\xba - \xa4\xbb - \xa4\xbc - \xa4\xbd - \xa4\xbe - \xa4\xbf - \xa4\xc0 - \xa4\xc1 - \xa4\xc2 - \xa4\xc3 - \xa4\xc4 - \xa4\xc5 - \xa4\xc6 - \xa4\xc7 - \xa4\xc8 - \xa4\xc9 - \xa4\xca - \xa4\xcb - \xa4\xcc - \xa4\xcd - \xa4\xce - \xa4\xcf - \xa4\xd0 - \xa4\xd1 - \xa4\xd2 - \xa4\xd3 - \xa4\xd4 - \xa4\xd5 - \xa4\xd6 - \xa4\xd7 - \xa4\xd8 - \xa4\xd9 - \xa4\xda - \xa4\xdb - \xa4\xdc - \xa4\xdd - \xa4\xde - \xa4\xdf - \xa4\xe0 - \xa4\xe1 - \xa4\xe2 - \xa4\xe3 - \xa4\xe4 - \xa4\xe5 - \xa4\xe6 - \xa4\xe7 - \xa4\xe8 - \xa4\xe9 - \xa4\xea - \xa4\xeb - \xa4\xec - \xa4\xed - \xa4\xee - \xa4\xef - \xa4\xf0 - \xa4\xf1 - \xa4\xf2 - \xa4\xf3 - \xa4\xf4 - \xa4\xf5 - \xa4\xf6 - \xa4\xf7 - \xa4\xf8 - \xa4\xf9 - \xa4\xfa - \xa4\xfb - \xa4\xfc - \xa4\xfd - \xa4\xfe - \xa5\x40 - \xa5\x41 - \xa5\x42 - \xa5\x43 - \xa5\x44 - \xa5\x45 - \xa5\x46 - \xa5\x47 - \xa5\x48 - \xa5\x49 - \xa5\x4a - \xa5\x4b - \xa5\x4c - \xa5\x4d - \xa5\x4e - \xa5\x4f - \xa5\x50 - \xa5\x51 - \xa5\x52 - \xa5\x53 - \xa5\x54 - \xa5\x55 - \xa5\x56 - \xa5\x57 - \xa5\x58 - \xa5\x59 - \xa5\x5a - \xa5\x5b - \xa5\x5c - \xa5\x5d - \xa5\x5e - \xa5\x5f - \xa5\x60 - \xa5\x61 - \xa5\x62 - \xa5\x63 - \xa5\x64 - \xa5\x65 - \xa5\x66 - \xa5\x67 - \xa5\x68 - \xa5\x69 - \xa5\x6a - \xa5\x6b - \xa5\x6c - \xa5\x6d - \xa5\x6e - \xa5\x6f - \xa5\x70 - \xa5\x71 - \xa5\x72 - \xa5\x73 - \xa5\x74 - \xa5\x75 - \xa5\x76 - \xa5\x77 - \xa5\x78 - \xa5\x79 - \xa5\x7a - \xa5\x7b - \xa5\x7c - \xa5\x7d - \xa5\x7e - \xa5\xa1 - \xa5\xa2 - \xa5\xa3 - \xa5\xa4 - \xa5\xa5 - \xa5\xa6 - \xa5\xa7 - \xa5\xa8 - \xa5\xa9 - \xa5\xaa - \xa5\xab - \xa5\xac - \xa5\xad - \xa5\xae - \xa5\xaf - \xa5\xb0 - \xa5\xb1 - \xa5\xb2 - \xa5\xb3 - \xa5\xb4 - \xa5\xb5 - \xa5\xb6 - \xa5\xb7 - \xa5\xb8 - \xa5\xb9 - \xa5\xba - \xa5\xbb - \xa5\xbc - \xa5\xbd - \xa5\xbe - \xa5\xbf - \xa5\xc0 - \xa5\xc1 - \xa5\xc2 - \xa5\xc3 - \xa5\xc4 - \xa5\xc5 - \xa5\xc6 - \xa5\xc7 - \xa5\xc8 - \xa5\xc9 - \xa5\xca - \xa5\xcb - \xa5\xcc - \xa5\xcd - \xa5\xce - \xa5\xcf - \xa5\xd0 - \xa5\xd1 - \xa5\xd2 - \xa5\xd3 - \xa5\xd4 - \xa5\xd5 - \xa5\xd6 - \xa5\xd7 - \xa5\xd8 - \xa5\xd9 - \xa5\xda - \xa5\xdb - \xa5\xdc - \xa5\xdd - \xa5\xde - \xa5\xdf - \xa5\xe0 - \xa5\xe1 - \xa5\xe2 - \xa5\xe3 - \xa5\xe4 - \xa5\xe5 - \xa5\xe6 - \xa5\xe7 - \xa5\xe8 - \xa5\xe9 - \xa5\xea - \xa5\xeb - \xa5\xec - \xa5\xed - \xa5\xee - \xa5\xef - \xa5\xf0 - \xa5\xf1 - \xa5\xf2 - \xa5\xf3 - \xa5\xf4 - \xa5\xf5 - \xa5\xf6 - \xa5\xf7 - \xa5\xf8 - \xa5\xf9 - \xa5\xfa - \xa5\xfb - \xa5\xfc - \xa5\xfd - \xa5\xfe - \xa6\x40 - \xa6\x41 - \xa6\x42 - \xa6\x43 - \xa6\x44 - \xa6\x45 - \xa6\x46 - \xa6\x47 - \xa6\x48 - \xa6\x49 - \xa6\x4a - \xa6\x4b - \xa6\x4c - \xa6\x4d - \xa6\x4e - \xa6\x4f - \xa6\x50 - \xa6\x51 - \xa6\x52 - \xa6\x53 - \xa6\x54 - \xa6\x55 - \xa6\x56 - \xa6\x57 - \xa6\x58 - \xa6\x59 - \xa6\x5a - \xa6\x5b - \xa6\x5c - \xa6\x5d - \xa6\x5e - \xa6\x5f - \xa6\x60 - \xa6\x61 - \xa6\x62 - \xa6\x63 - \xa6\x64 - \xa6\x65 - \xa6\x66 - \xa6\x67 - \xa6\x68 - \xa6\x69 - \xa6\x6a - \xa6\x6b - \xa6\x6c - \xa6\x6d - \xa6\x6e - \xa6\x6f - \xa6\x70 - \xa6\x71 - \xa6\x72 - \xa6\x73 - \xa6\x74 - \xa6\x75 - \xa6\x76 - \xa6\x77 - \xa6\x78 - \xa6\x79 - \xa6\x7a - \xa6\x7b - \xa6\x7c - \xa6\x7d - \xa6\x7e - \xa6\xa1 - \xa6\xa2 - \xa6\xa3 - \xa6\xa4 - \xa6\xa5 - \xa6\xa6 - \xa6\xa7 - \xa6\xa8 - \xa6\xa9 - \xa6\xaa - \xa6\xab - \xa6\xac - \xa6\xad - \xa6\xae - \xa6\xaf - \xa6\xb0 - \xa6\xb1 - \xa6\xb2 - \xa6\xb3 - \xa6\xb4 - \xa6\xb5 - \xa6\xb6 - \xa6\xb7 - \xa6\xb8 - \xa6\xb9 - \xa6\xba - \xa6\xbb - \xa6\xbc - \xa6\xbd - \xa6\xbe - \xa6\xbf - \xa6\xc0 - \xa6\xc1 - \xa6\xc2 - \xa6\xc3 - \xa6\xc4 - \xa6\xc5 - \xa6\xc6 - \xa6\xc7 - \xa6\xc8 - \xa6\xc9 - \xa6\xca - \xa6\xcb - \xa6\xcc - \xa6\xcd - \xa6\xce - \xa6\xcf - \xa6\xd0 - \xa6\xd1 - \xa6\xd2 - \xa6\xd3 - \xa6\xd4 - \xa6\xd5 - \xa6\xd6 - \xa6\xd7 - \xa6\xd8 - \xa6\xd9 - \xa6\xda - \xa6\xdb - \xa6\xdc - \xa6\xdd - \xa6\xde - \xa6\xdf - \xa6\xe0 - \xa6\xe1 - \xa6\xe2 - \xa6\xe3 - \xa6\xe4 - \xa6\xe5 - \xa6\xe6 - \xa6\xe7 - \xa6\xe8 - \xa6\xe9 - \xa6\xea - \xa6\xeb - \xa6\xec - \xa6\xed - \xa6\xee - \xa6\xef - \xa6\xf0 - \xa6\xf1 - \xa6\xf2 - \xa6\xf3 - \xa6\xf4 - \xa6\xf5 - \xa6\xf6 - \xa6\xf7 - \xa6\xf8 - \xa6\xf9 - \xa6\xfa - \xa6\xfb - \xa6\xfc - \xa6\xfd - \xa6\xfe - \xa7\x40 - \xa7\x41 - \xa7\x42 - \xa7\x43 - \xa7\x44 - \xa7\x45 - \xa7\x46 - \xa7\x47 - \xa7\x48 - \xa7\x49 - \xa7\x4a - \xa7\x4b - \xa7\x4c - \xa7\x4d - \xa7\x4e - \xa7\x4f - \xa7\x50 - \xa7\x51 - \xa7\x52 - \xa7\x53 - \xa7\x54 - \xa7\x55 - \xa7\x56 - \xa7\x57 - \xa7\x58 - \xa7\x59 - \xa7\x5a - \xa7\x5b - \xa7\x5c - \xa7\x5d - \xa7\x5e - \xa7\x5f - \xa7\x60 - \xa7\x61 - \xa7\x62 - \xa7\x63 - \xa7\x64 - \xa7\x65 - \xa7\x66 - \xa7\x67 - \xa7\x68 - \xa7\x69 - \xa7\x6a - \xa7\x6b - \xa7\x6c - \xa7\x6d - \xa7\x6e - \xa7\x6f - \xa7\x70 - \xa7\x71 - \xa7\x72 - \xa7\x73 - \xa7\x74 - \xa7\x75 - \xa7\x76 - \xa7\x77 - \xa7\x78 - \xa7\x79 - \xa7\x7a - \xa7\x7b - \xa7\x7c - \xa7\x7d - \xa7\x7e - \xa7\xa1 - \xa7\xa2 - \xa7\xa3 - \xa7\xa4 - \xa7\xa5 - \xa7\xa6 - \xa7\xa7 - \xa7\xa8 - \xa7\xa9 - \xa7\xaa - \xa7\xab - \xa7\xac - \xa7\xad - \xa7\xae - \xa7\xaf - \xa7\xb0 - \xa7\xb1 - \xa7\xb2 - \xa7\xb3 - \xa7\xb4 - \xa7\xb5 - \xa7\xb6 - \xa7\xb7 - \xa7\xb8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Mon Jun 15 22:33:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DFAA3454C7; Mon, 15 Jun 2020 22:33:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49m5gv6hlXz3cy0; Mon, 15 Jun 2020 22:32:59 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E10FE25012; Mon, 15 Jun 2020 22:32:59 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05FMWxb3042310; Mon, 15 Jun 2020 22:32:59 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FMWxrI042307; Mon, 15 Jun 2020 22:32:59 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202006152232.05FMWxrI042307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 15 Jun 2020 22:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362206 - stable/12/sys/dev/evdev X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/evdev X-SVN-Commit-Revision: 362206 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 22:33:00 -0000 Author: wulf Date: Mon Jun 15 22:32:59 2020 New Revision: 362206 URL: https://svnweb.freebsd.org/changeset/base/362206 Log: MFC r360624: [evdev] Add AT translated set1 scancodes for F-unlocked F1-12 keys. "F lock" is a switch between two sets of scancodes for function keys F1-F12 found on some Logitech and Microsoft PS/2 keyboards [1]. When "F lock" is pressed, then F1-F12 act as function keys and produce usual keyscans for these keys. When "F lock" is depressed, F1-F12 produced the same keyscans but prefixed with E0. Some laptops use [2] E0-prefixed F1-F12 scancodes for non-standard keys. [1] https://www.win.tue.nl/~aeb/linux/kbd/scancodes-6.html [2] https://reviews.freebsd.org/D21565 MFC r360625: [evdev] Sync event codes with Linux kernel 5.6 Modified: stable/12/sys/dev/evdev/evdev_utils.c stable/12/sys/dev/evdev/input-event-codes.h stable/12/sys/dev/evdev/input.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/12/sys/dev/evdev/evdev_utils.c Mon Jun 15 20:12:10 2020 (r362205) +++ stable/12/sys/dev/evdev/evdev_utils.c Mon Jun 15 22:32:59 2020 (r362206) @@ -166,16 +166,16 @@ static uint16_t evdev_at_set1_scancodes[] = { NONE, NONE, KEY_VOLUMEDOWN, NONE, KEY_VOLUMEUP, NONE, KEY_HOMEPAGE, NONE, NONE, KEY_KPSLASH, NONE, KEY_SYSRQ, - KEY_RIGHTALT, NONE, NONE, NONE, - NONE, NONE, NONE, NONE, + KEY_RIGHTALT, NONE, NONE, KEY_F13, + KEY_F14, KEY_F15, KEY_F16, KEY_F17, /* 0x40 - 0x5f. 0xE0 prefixed */ - NONE, NONE, NONE, NONE, - NONE, NONE, KEY_PAUSE, KEY_HOME, + KEY_F18, KEY_F19, KEY_F20, KEY_F21, + KEY_F22, NONE, KEY_PAUSE, KEY_HOME, KEY_UP, KEY_PAGEUP, NONE, KEY_LEFT, NONE, KEY_RIGHT, NONE, KEY_END, KEY_DOWN, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, - NONE, NONE, NONE, NONE, - NONE, NONE, NONE, KEY_LEFTMETA, + NONE, NONE, NONE, KEY_F23, + KEY_F24, NONE, NONE, KEY_LEFTMETA, KEY_RIGHTMETA, KEY_MENU, KEY_POWER, KEY_SLEEP, /* 0x60 - 0x7f. 0xE0 prefixed */ NONE, NONE, NONE, KEY_WAKEUP, Modified: stable/12/sys/dev/evdev/input-event-codes.h ============================================================================== --- stable/12/sys/dev/evdev/input-event-codes.h Mon Jun 15 20:12:10 2020 (r362205) +++ stable/12/sys/dev/evdev/input-event-codes.h Mon Jun 15 22:32:59 2020 (r362206) @@ -453,10 +453,12 @@ #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ @@ -618,6 +620,7 @@ #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ +#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ @@ -660,7 +663,87 @@ */ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 +/* Electronic privacy screen control */ +#define KEY_PRIVACY_SCREEN_TOGGLE 0x279 +/* Select an area of screen to be copied */ +#define KEY_SELECTIVE_SCREENSHOT 0x27a + +/* + * Some keyboards have keys which do not have a defined meaning, these keys + * are intended to be programmed / bound to macros by the user. For most + * keyboards with these macro-keys the key-sequence to inject, or action to + * take, is all handled by software on the host side. So from the kernel's + * point of view these are just normal keys. + * + * The KEY_MACRO# codes below are intended for such keys, which may be labeled + * e.g. G1-G18, or S1 - S30. The KEY_MACRO# codes MUST NOT be used for keys + * where the marking on the key does indicate a defined meaning / purpose. + * + * The KEY_MACRO# codes MUST also NOT be used as fallback for when no existing + * KEY_FOO define matches the marking / purpose. In this case a new KEY_FOO + * define MUST be added. + */ +#define KEY_MACRO1 0x290 +#define KEY_MACRO2 0x291 +#define KEY_MACRO3 0x292 +#define KEY_MACRO4 0x293 +#define KEY_MACRO5 0x294 +#define KEY_MACRO6 0x295 +#define KEY_MACRO7 0x296 +#define KEY_MACRO8 0x297 +#define KEY_MACRO9 0x298 +#define KEY_MACRO10 0x299 +#define KEY_MACRO11 0x29a +#define KEY_MACRO12 0x29b +#define KEY_MACRO13 0x29c +#define KEY_MACRO14 0x29d +#define KEY_MACRO15 0x29e +#define KEY_MACRO16 0x29f +#define KEY_MACRO17 0x2a0 +#define KEY_MACRO18 0x2a1 +#define KEY_MACRO19 0x2a2 +#define KEY_MACRO20 0x2a3 +#define KEY_MACRO21 0x2a4 +#define KEY_MACRO22 0x2a5 +#define KEY_MACRO23 0x2a6 +#define KEY_MACRO24 0x2a7 +#define KEY_MACRO25 0x2a8 +#define KEY_MACRO26 0x2a9 +#define KEY_MACRO27 0x2aa +#define KEY_MACRO28 0x2ab +#define KEY_MACRO29 0x2ac +#define KEY_MACRO30 0x2ad + +/* + * Some keyboards with the macro-keys described above have some extra keys + * for controlling the host-side software responsible for the macro handling: + * -A macro recording start/stop key. Note that not all keyboards which emit + * KEY_MACRO_RECORD_START will also emit KEY_MACRO_RECORD_STOP if + * KEY_MACRO_RECORD_STOP is not advertised, then KEY_MACRO_RECORD_START + * should be interpreted as a recording start/stop toggle; + * -Keys for switching between different macro (pre)sets, either a key for + * cycling through the configured presets or keys to directly select a preset. + */ +#define KEY_MACRO_RECORD_START 0x2b0 +#define KEY_MACRO_RECORD_STOP 0x2b1 +#define KEY_MACRO_PRESET_CYCLE 0x2b2 +#define KEY_MACRO_PRESET1 0x2b3 +#define KEY_MACRO_PRESET2 0x2b4 +#define KEY_MACRO_PRESET3 0x2b5 + +/* + * Some keyboards have a buildin LCD panel where the contents are controlled + * by the host. Often these have a number of keys directly below the LCD + * intended for controlling a menu shown on the LCD. These keys often don't + * have any labeling so we just name them KEY_KBD_LCD_MENU# + */ +#define KEY_KBD_LCD_MENU1 0x2b8 +#define KEY_KBD_LCD_MENU2 0x2b9 +#define KEY_KBD_LCD_MENU3 0x2ba +#define KEY_KBD_LCD_MENU4 0x2bb +#define KEY_KBD_LCD_MENU5 0x2bc + #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY2 0x2c1 @@ -722,6 +805,16 @@ #define REL_DIAL 0x07 #define REL_WHEEL 0x08 #define REL_MISC 0x09 +/* + * 0x0a is reserved and should not be used in input drivers. + * It was used by HID as REL_MISC+1 and userspace needs to detect if + * the next REL_* event is correct or is just REL_MISC + n. + * We define here REL_RESERVED so userspace can rely on it and detect + * the situation described above. + */ +#define REL_RESERVED 0x0a +#define REL_WHEEL_HI_RES 0x0b +#define REL_HWHEEL_HI_RES 0x0c #define REL_MAX 0x0f #define REL_CNT (REL_MAX+1) @@ -757,6 +850,15 @@ #define ABS_VOLUME 0x20 #define ABS_MISC 0x28 + +/* + * 0x2e is reserved and should not be used in input drivers. + * It was used by HID as ABS_MISC+6 and userspace needs to detect if + * the next ABS_* event is correct or is just ABS_MISC + n. + * We define here ABS_RESERVED so userspace can rely on it and detect + * the situation described above. + */ +#define ABS_RESERVED 0x2e #define ABS_MT_SLOT 0x2f /* MT slot being modified */ #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ Modified: stable/12/sys/dev/evdev/input.h ============================================================================== --- stable/12/sys/dev/evdev/input.h Mon Jun 15 20:12:10 2020 (r362205) +++ stable/12/sys/dev/evdev/input.h Mon Jun 15 22:32:59 2020 (r362206) @@ -148,10 +148,11 @@ struct input_keymap_entry { /* * MT_TOOL types */ -#define MT_TOOL_FINGER 0 -#define MT_TOOL_PEN 1 -#define MT_TOOL_PALM 2 -#define MT_TOOL_MAX 2 +#define MT_TOOL_FINGER 0x00 +#define MT_TOOL_PEN 0x01 +#define MT_TOOL_PALM 0x02 +#define MT_TOOL_DIAL 0x0a +#define MT_TOOL_MAX 0x0f /* * Values describing the status of a force-feedback effect From owner-svn-src-stable-12@freebsd.org Mon Jun 15 22:41:28 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB211345803; Mon, 15 Jun 2020 22:41:28 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49m5sh5ZqNz3dH2; Mon, 15 Jun 2020 22:41:28 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAE1024EC2; Mon, 15 Jun 2020 22:41:28 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05FMfSCa042867; Mon, 15 Jun 2020 22:41:28 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FMfST2042865; Mon, 15 Jun 2020 22:41:28 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202006152241.05FMfST2042865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 15 Jun 2020 22:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362208 - in stable/12: share/man/man4 sys/dev/atkbdc X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/atkbdc X-SVN-Commit-Revision: 362208 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 22:41:28 -0000 Author: wulf Date: Mon Jun 15 22:41:28 2020 New Revision: 362208 URL: https://svnweb.freebsd.org/changeset/base/362208 Log: MFC r361715: [psm] Do not disable trackpoint when hw.psm.elantech.touchpad_off is enabled PR: 246117 Reported by: Alexander Sieg MFC r361718: [psm] Workaround active PS/2 multiplexor hang which happens on some laptops after returning to legacy multiplexing mode at initialization stage. PR: 242542 Reported by: Felix Palmen Modified: stable/12/share/man/man4/psm.4 stable/12/sys/dev/atkbdc/psm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/psm.4 ============================================================================== --- stable/12/share/man/man4/psm.4 Mon Jun 15 22:35:39 2020 (r362207) +++ stable/12/share/man/man4/psm.4 Mon Jun 15 22:41:28 2020 (r362208) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2016 +.Dd June 2, 2020 .Dt PSM 4 .Os .Sh NAME @@ -361,6 +361,15 @@ the sysctl with the same name and by restarting .Xr moused 8 using .Pa /etc/rc.d/moused . +.Pp +Active multiplexing support can be disabled by setting +.Va hw.psm.mux_disabled +to +.Em 1 +at boot-time. +This will prevent +.Nm +from enabling active multiplexing mode needed for some Synaptics touchpads. .Sh IOCTLS There are a few .Xr ioctl 2 Modified: stable/12/sys/dev/atkbdc/psm.c ============================================================================== --- stable/12/sys/dev/atkbdc/psm.c Mon Jun 15 22:35:39 2020 (r362207) +++ stable/12/sys/dev/atkbdc/psm.c Mon Jun 15 22:41:28 2020 (r362208) @@ -516,6 +516,7 @@ static int verbose = PSM_DEBUG; static int synaptics_support = 1; static int trackpoint_support = 1; static int elantech_support = 1; +static int mux_disabled = 0; /* for backward compatibility */ #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) @@ -2984,6 +2985,9 @@ SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLF SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, &elantech_support, 0, "Enable support for Elantech touchpads"); +SYSCTL_INT(_hw_psm, OID_AUTO, mux_disabled, CTLFLAG_RDTUN, + &mux_disabled, 0, "Disable active multiplexing"); + static void psmintr(void *arg) { @@ -4436,7 +4440,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m *x = *y = *z = 0; ms->button = ms->obutton; - if (sc->syninfo.touchpad_off) + if (sc->syninfo.touchpad_off && pkt != ELANTECH_PKT_TRACKPOINT) return (0); /* Common legend @@ -6252,6 +6256,9 @@ enable_synaptics_mux(struct psm_softc *sc, enum probea int active_ports_count = 0; int active_ports_mask = 0; + if (mux_disabled != 0) + return (FALSE); + version = enable_aux_mux(kbdc); if (version == -1) return (FALSE); @@ -6288,6 +6295,21 @@ enable_synaptics_mux(struct psm_softc *sc, enum probea /* IRQ handler does not support active multiplexing mode */ disable_aux_mux(kbdc); + + /* Is MUX still alive after switching back to legacy mode? */ + if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) { + /* + * On some laptops e.g. Lenovo X121e dead AUX MUX can be + * brought back to life with resetting of keyboard. + */ + reset_kbd(kbdc); + if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) { + printf("psm%d: AUX MUX hang detected!\n", sc->unit); + printf("Consider adding hw.psm.mux_disabled=1 to " + "loader tunables\n"); + } + } + empty_both_buffers(kbdc, 10); /* remove stray data if any */ return (probe); } From owner-svn-src-stable-12@freebsd.org Tue Jun 16 12:21:59 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A7EA336BC2; Tue, 16 Jun 2020 12:21:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mS4R05Skz3brK; Tue, 16 Jun 2020 12:21:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC70BF269; Tue, 16 Jun 2020 12:21:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GCLwDn052545; Tue, 16 Jun 2020 12:21:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GCLwif052540; Tue, 16 Jun 2020 12:21:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006161221.05GCLwif052540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Jun 2020 12:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362224 - in stable: 10/lib/libusb 11/lib/libusb 12/lib/libusb 9/lib/libusb X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 10/lib/libusb 11/lib/libusb 12/lib/libusb 9/lib/libusb X-SVN-Commit-Revision: 362224 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 12:21:59 -0000 Author: kevans Date: Tue Jun 16 12:21:55 2020 New Revision: 362224 URL: https://svnweb.freebsd.org/changeset/base/362224 Log: MFC r361977: libusb: improve compatibility Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API. Descriptions and functionality for these derived from the documentation at [0]. The current set of capabilities are all supported by libusb. These were detected as missing after updating net/freerdp to 2.1.1, which attempted to use both. [0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html Modified: stable/12/lib/libusb/Makefile stable/12/lib/libusb/libusb.3 stable/12/lib/libusb/libusb.h stable/12/lib/libusb/libusb10.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libusb/Makefile stable/10/lib/libusb/libusb.3 stable/10/lib/libusb/libusb.h stable/10/lib/libusb/libusb10.c stable/11/lib/libusb/Makefile stable/11/lib/libusb/libusb.3 stable/11/lib/libusb/libusb.h stable/11/lib/libusb/libusb10.c stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/12/lib/libusb/Makefile ============================================================================== --- stable/12/lib/libusb/Makefile Tue Jun 16 12:16:35 2020 (r362223) +++ stable/12/lib/libusb/Makefile Tue Jun 16 12:21:55 2020 (r362224) @@ -69,6 +69,7 @@ CFLAGS+= -I ../../sys MLINKS += libusb.3 libusb_get_version.3 MLINKS += libusb.3 libusb_init.3 MLINKS += libusb.3 libusb_exit.3 +MLINKS += libusb.3 libusb_has_capability.3 MLINKS += libusb.3 libusb_strerror.3 MLINKS += libusb.3 libusb_error_name.3 MLINKS += libusb.3 libusb_set_debug.3 Modified: stable/12/lib/libusb/libusb.3 ============================================================================== --- stable/12/lib/libusb/libusb.3 Tue Jun 16 12:16:35 2020 (r362223) +++ stable/12/lib/libusb/libusb.3 Tue Jun 16 12:21:55 2020 (r362224) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 2018 +.Dd June 9, 2020 .Dt LIBUSB 3 .Os .Sh NAME @@ -60,6 +60,33 @@ failure. Deinitialise libusb. Must be called at the end of the application. Other libusb routines may not be called after this function. +.Pp +.Ft int +.Fn libusb_has_capability "uint32_t capability" +This function checks the runtime capabilities of +.Nm . +This function will return non-zero if the given +.Fa capability +is supported, 0 if it is not supported. +The valid values for +.Fa capability +are: +.Bl -tag -width LIBUSB_CAP -offset indent +.It Va LIBUSB_CAP_HAS_CAPABILITY +.Nm +supports +.Fn libusb_has_capability . +.It Va LIBUSB_CAP_HAS_HOTPLUG +.Nm +supports hotplug notifications. +.It Va LIBUSB_CAP_HAS_HID_ACCESS +.Nm +can access HID devices without requiring user intervention. +.It Va LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER +.Nm +supports detaching of the default USB driver with +.Fn libusb_detach_kernel_driver . +.El .Pp .Ft const char * .Fn libusb_strerror "int code" Modified: stable/12/lib/libusb/libusb.h ============================================================================== --- stable/12/lib/libusb/libusb.h Tue Jun 16 12:16:35 2020 (r362223) +++ stable/12/lib/libusb/libusb.h Tue Jun 16 12:21:55 2020 (r362224) @@ -54,6 +54,7 @@ enum libusb_class_code { LIBUSB_CLASS_AUDIO = 1, LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3, + LIBUSB_CLASS_PHYSICAL = 5, LIBUSB_CLASS_PTP = 6, LIBUSB_CLASS_IMAGE = 6, LIBUSB_CLASS_PRINTER = 7, @@ -178,6 +179,21 @@ enum libusb_bos_type { LIBUSB_BT_CONTAINER_ID = 4, }; +enum libusb_capability { + /* libusb supports libusb_has_capability(). */ + LIBUSB_CAP_HAS_CAPABILITY = 0, + /* Hotplug support is available. */ + LIBUSB_CAP_HAS_HOTPLUG, + /* Can access HID devices without requiring user intervention. */ + LIBUSB_CAP_HAS_HID_ACCESS, + + /* + * Supports detaching of the default USB driver with + * libusb_detach_kernel_driver(). + */ + LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER, +}; + enum libusb_error { LIBUSB_SUCCESS = 0, LIBUSB_ERROR_IO = -1, @@ -450,6 +466,7 @@ const char *libusb_strerror(int code); const char *libusb_error_name(int code); int libusb_init(libusb_context ** context); void libusb_exit(struct libusb_context *ctx); +int libusb_has_capability(uint32_t capability); /* Device handling and enumeration */ Modified: stable/12/lib/libusb/libusb10.c ============================================================================== --- stable/12/lib/libusb/libusb10.c Tue Jun 16 12:16:35 2020 (r362223) +++ stable/12/lib/libusb/libusb10.c Tue Jun 16 12:21:55 2020 (r362224) @@ -1716,3 +1716,18 @@ libusb_error_name(int code) return ("LIBUSB_ERROR_UNKNOWN"); } } + +int +libusb_has_capability(uint32_t capability) +{ + + switch (capability) { + case LIBUSB_CAP_HAS_CAPABILITY: + case LIBUSB_CAP_HAS_HOTPLUG: + case LIBUSB_CAP_HAS_HID_ACCESS: + case LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER: + return (1); + default: + return (0); + } +} From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:22:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0F7A3329F9; Tue, 16 Jun 2020 20:22:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mflP58Wfz4dSw; Tue, 16 Jun 2020 20:22:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9364B14E22; Tue, 16 Jun 2020 20:22:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKMvRB051332; Tue, 16 Jun 2020 20:22:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKMuwK051329; Tue, 16 Jun 2020 20:22:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162022.05GKMuwK051329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362237 - in stable/12: share/man/man9 sys/conf sys/dev/ofw X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/conf sys/dev/ofw X-SVN-Commit-Revision: 362237 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:22:57 -0000 Author: manu Date: Tue Jun 16 20:22:56 2020 New Revision: 362237 URL: https://svnweb.freebsd.org/changeset/base/362237 Log: MFC r346332: ofw_graph: Add functions for graph bindings Those functions are helpers to work on graph bindings. graphs are mostly use with video related devices. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/graph.txt?id=4436a3711e3249840e0679e92d3c951bcaf25515 Differential Revision: https://reviews.freebsd.org/D19877 Added: stable/12/share/man/man9/ofw_graph.9 - copied unchanged from r346332, head/share/man/man9/ofw_graph.9 stable/12/sys/dev/ofw/ofw_graph.c - copied unchanged from r346332, head/sys/dev/ofw/ofw_graph.c stable/12/sys/dev/ofw/ofw_graph.h - copied unchanged from r346332, head/sys/dev/ofw/ofw_graph.h Modified: stable/12/sys/conf/files Directory Properties: stable/12/ (props changed) Copied: stable/12/share/man/man9/ofw_graph.9 (from r346332, head/share/man/man9/ofw_graph.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man9/ofw_graph.9 Tue Jun 16 20:22:56 2020 (r362237, copy of r346332, head/share/man/man9/ofw_graph.9) @@ -0,0 +1,106 @@ +.\" Copyright (c) 2019 Emmanuel Vadot +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 10, 2019 +.Dt ofw_graph 9 +.Os +.Sh NAME +.Nm ofw_graph , +.Nm ofw_graph_get_port_by_idx , +.Nm ofw_graph_port_get_num_endpoints , +.Nm ofw_graph_get_endpoint_by_idx , +.Nm ofw_graph_get_remote_endpoint , +.Nm ofw_graph_get_remote_parent , +.Nm ofw_graph_get_device_by_port_ep , +.Nd Helpers for the graph bindings +.Sh SYNOPSIS +.In dev/ofw/openfirm.h +.In dev/ofw/ofw_graph.h +.Ft phandle_t +.Fn ofw_graph_get_port_by_idx "phandle_t node" "uint32_t idx" +.Ft size_t +.Fn ofw_graph_port_get_num_endpoints "phandle_t port" +.Ft phandle_t +.Fn ofw_graph_get_endpoint_by_idx "phandle_t port" "uint32_t idx" +.Ft phandle_t +.Fn ofw_graph_get_remote_endpoint "phandle_t endpoint" +.Ft phandle_t +.Fn ofw_graph_get_remote_parent "phandle_t remote" +.Ft device_t +.Fn ofw_graph_get_device_by_port_ep "phandle_t node" "uint32_t port_id" "uin32_t ep_id" +.Sh DESCRIPTION +.Pp +The ofw_graph functions are helpers to parse the DTS graph bindings +.Pp +.Fn ofw_graph_get_port_by_idx +return the port with id +.Fa idx . +It will first check node named +.Fa port@idx +and then fallback on checking the +.Fa ports +child for a child node matching the id. If no ports matching +.Fa idx +is found the function return 0. +.Pp +.Fn ofw_graph_port_get_num_endpoints +returns the number of endpoints a port node have. +.Pp +.Fn ofw_graph_get_endpoint_by_idx +return the endpoint with id +.Fa idx . +It will first check if there is a single child named +.Fa endpoint +and returns it if there is. If there is multiple endpoints it will check +the +.Fa reg +property and returns the correct +.Fa phandle_t +or 0 if none match. +.Pp +.Fn ofw_graph_get_remote_endpoint +returns the +.Fa remote-endpoint +property if it exists or 0. +.Pp +.Fn ofw_graph_get_remote_parent +returns the device node corresponding to the +.Fa remote-endpoint +phandle or 0 if none. +.Fn ofw_graph_get_device_by_port_ep +returns the device associated with the port and endpoint or +.Fa NULL +if none. The device driver should have called +.Fn OF_device_register_xref +before. +.Fn +.Sh HISTORY +The +.Nm ofw_graph +functions first appeared in +.Fx 13.0 . +The +.Nm ofw_graph +functions and manual page were written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Tue Jun 16 19:21:28 2020 (r362236) +++ stable/12/sys/conf/files Tue Jun 16 20:22:56 2020 (r362237) @@ -2628,6 +2628,7 @@ dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_graph.c optional fdt dev/ofw/ofw_subr.c optional fdt dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt Copied: stable/12/sys/dev/ofw/ofw_graph.c (from r346332, head/sys/dev/ofw/ofw_graph.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/ofw/ofw_graph.c Tue Jun 16 20:22:56 2020 (r362237, copy of r346332, head/sys/dev/ofw/ofw_graph.c) @@ -0,0 +1,186 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ofw_bus_if.h" + +#define PORT_MAX_NAME 8 + +phandle_t +ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx) +{ + phandle_t ports, child; + uint32_t reg; + char portnode[PORT_MAX_NAME]; + + /* First try to find a port@ node */ + snprintf(portnode, sizeof(portnode), "port@%d", idx); + child = ofw_bus_find_child(node, portnode); + if (child != 0) + return (child); + + /* Next try to look under ports */ + ports = ofw_bus_find_child(node, "ports"); + if (ports == 0) + return (0); + + for (child = OF_child(ports); child != 0; child = OF_peer(child)) { + if (OF_getencprop(child, "reg", ®, sizeof(uint32_t)) <= 0 || + reg != idx) + continue; + + return (child); + } + + return (0); +} + +size_t +ofw_graph_port_get_num_endpoints(phandle_t port) +{ + phandle_t child; + char *name; + size_t num = 0; + int ret; + + for (num = 0, child = OF_child(port); child != 0; + child = OF_peer(child)) { + ret = OF_getprop_alloc(child, "name", (void **)&name); + if (ret == -1) + continue; + if (strcmp(name, "endpoint") == 0) + num++; + else if (strncmp(name, "endpoint@", 9) == 0) + num++; + free(name, M_OFWPROP); + } + + return (num); +} + +phandle_t +ofw_graph_get_endpoint_by_idx(phandle_t port, uint32_t idx) +{ + phandle_t endpoint, child; + uint32_t reg; + + /* First test if we have only one endpoint */ + endpoint = ofw_bus_find_child(port, "endpoint"); + if (endpoint != 0) + return (endpoint); + + /* Then test all childs based on the reg property */ + for (child = OF_child(port); child != 0; child = OF_peer(child)) { + if (OF_getencprop(child, "reg", ®, sizeof(uint32_t)) <= 0 || + reg != idx) + continue; + + return (child); + } + + return (0); +} + +phandle_t +ofw_graph_get_remote_endpoint(phandle_t endpoint) +{ + phandle_t remote; + + if (OF_getencprop(endpoint, "remote-endpoint", &remote, + sizeof(phandle_t)) <= 0) + return (0); + + return (remote); +} + +phandle_t +ofw_graph_get_remote_parent(phandle_t remote) +{ + phandle_t node; + char *name; + int ret; + + /* get the endpoint node */ + node = OF_node_from_xref(remote); + + /* go to the port@X node */ + node = OF_parent(node); + /* go to the ports node or parent */ + node = OF_parent(node); + + /* if the node name is 'ports' we need to go up one last time */ + ret = OF_getprop_alloc(node, "name", (void **)&name); + if (ret == -1) { + printf("%s: Node %x don't have a name, abort\n", __func__, node); + node = 0; + goto end; + } + if (strcmp("ports", name) == 0) + node = OF_parent(node); + +end: + free(name, M_OFWPROP); + return (node); +} + +device_t +ofw_graph_get_device_by_port_ep(phandle_t node, uint32_t port_id, uint32_t ep_id) +{ + phandle_t outport, port, endpoint, remote; + + port = ofw_graph_get_port_by_idx(node, port_id); + if (port == 0) + return (NULL); + endpoint = ofw_graph_get_endpoint_by_idx(port, ep_id); + if (endpoint == 0) + return NULL; + remote = ofw_graph_get_remote_endpoint(endpoint); + if (remote == 0) + return (NULL); + outport = ofw_graph_get_remote_parent(remote); + if (outport == 0) + return (NULL); + + return (OF_device_from_xref(OF_xref_from_node(outport))); +} Copied: stable/12/sys/dev/ofw/ofw_graph.h (from r346332, head/sys/dev/ofw/ofw_graph.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/ofw/ofw_graph.h Tue Jun 16 20:22:56 2020 (r362237, copy of r346332, head/sys/dev/ofw/ofw_graph.h) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _OFW_GRAPH_H_ +#define _OFW_GRAPH_H_ + +phandle_t ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx); +phandle_t ofw_graph_get_remote_endpoint(phandle_t endpoint); +size_t ofw_graph_port_get_num_endpoints(phandle_t port); +phandle_t ofw_graph_get_endpoint_by_idx(phandle_t port, uint32_t idx); +phandle_t ofw_graph_get_remote_parent(phandle_t remote); + +device_t ofw_graph_get_device_by_port_ep(phandle_t node, uint32_t port_id, uint32_t ep_id); + +#endif /* _OFW_GRAPH_H_ */ + From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:23:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1A0A332C99; Tue, 16 Jun 2020 20:23:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mfmZ3JH5z4dlR; Tue, 16 Jun 2020 20:23:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C4A714FA3; Tue, 16 Jun 2020 20:23:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKNwA4051431; Tue, 16 Jun 2020 20:23:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKNw2e051430; Tue, 16 Jun 2020 20:23:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162023.05GKNw2e051430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362238 - stable/12/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 362238 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:23:58 -0000 Author: manu Date: Tue Jun 16 20:23:57 2020 New Revision: 362238 URL: https://svnweb.freebsd.org/changeset/base/362238 Log: MFC r346683: bsdinstall: up the interface before calling dhclient Modified: stable/12/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/12/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Tue Jun 16 20:22:56 2020 (r362237) +++ stable/12/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Tue Jun 16 20:23:57 2020 (r362238) @@ -49,6 +49,7 @@ esac dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then + ifconfig $INTERFACE up dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 err=$( dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:35:03 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF9CB332EE0; Tue, 16 Jun 2020 20:35:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mg1M3b03z4fWS; Tue, 16 Jun 2020 20:35:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 550021513B; Tue, 16 Jun 2020 20:35:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKZ288057473; Tue, 16 Jun 2020 20:35:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKZ29N057468; Tue, 16 Jun 2020 20:35:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162035.05GKZ29N057468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362240 - in stable/12/sys: arm64/arm64 dev/ahci dev/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/arm64 dev/ahci dev/pci X-SVN-Commit-Revision: 362240 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:35:03 -0000 Author: manu Date: Tue Jun 16 20:35:01 2020 New Revision: 362240 URL: https://svnweb.freebsd.org/changeset/base/362240 Log: MFC r347440, r347929-r347930, r349588 r347440: ahci: Check if bus is cache-coherent We do this for FDT systems but not for ACPI ones. Check the presence of the _CCA attribute. Sponsored by: Ampere Computing, LLC Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D20144 r347929: pci: ecam: Do not warn on mismatch of bus_end We cannot know the bus end number before parsing the MCFG table so don't set the bus_end before that. If the MCFG table doesn't exist we will set the configuration base address based on the _CBA value and set the bus_end to the maximal number allowed by PCI. Sponsored by: Ampere Computing, LLC Differential Revision: https://reviews.freebsd.org/D20213 r347930: pci: ecam: Correctly parse memory and IO region When activating a resource do not compare the resource id to the adress. Treat IO region as MEMORY region too. Submitted by: Tuan Phan (Original Version) Sponsored by: Ampere Computing, LLC Differential Revision: https://reviews.freebsd.org/D20214 r349588: arm64: efi: Map memory IO region as device Reviewed by: andrew Sponsored by: Ampere Computing, LLC Modified: stable/12/sys/arm64/arm64/efirt_machdep.c stable/12/sys/dev/ahci/ahci_generic.c stable/12/sys/dev/pci/pci_host_generic.c stable/12/sys/dev/pci/pci_host_generic_acpi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/efirt_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/efirt_machdep.c Tue Jun 16 20:35:00 2020 (r362239) +++ stable/12/sys/arm64/arm64/efirt_machdep.c Tue Jun 16 20:35:01 2020 (r362240) @@ -208,20 +208,14 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int mode = VM_MEMATTR_WRITE_THROUGH; else if ((p->md_attr & EFI_MD_ATTR_WC) != 0) mode = VM_MEMATTR_WRITE_COMBINING; - else if ((p->md_attr & EFI_MD_ATTR_UC) != 0) + else mode = VM_MEMATTR_DEVICE; - else { - if (bootverbose) - printf("EFI Runtime entry %d mapping " - "attributes unsupported\n", i); - mode = VM_MEMATTR_UNCACHEABLE; - } printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, p->md_pages); l3_attr = ATTR_DEFAULT | ATTR_IDX(mode) | ATTR_AP(ATTR_AP_RW) | L3_PAGE; - if (mode == VM_MEMATTR_DEVICE) + if (mode == VM_MEMATTR_DEVICE || p->md_attr & EFI_MD_ATTR_XP) l3_attr |= ATTR_UXN | ATTR_PXN; VM_OBJECT_WLOCK(obj_1t1_pt); Modified: stable/12/sys/dev/ahci/ahci_generic.c ============================================================================== --- stable/12/sys/dev/ahci/ahci_generic.c Tue Jun 16 20:35:00 2020 (r362239) +++ stable/12/sys/dev/ahci/ahci_generic.c Tue Jun 16 20:35:01 2020 (r362240) @@ -89,6 +89,7 @@ ahci_fdt_probe(device_t dev) static int ahci_acpi_probe(device_t dev) { + struct ahci_controller *ctlr = device_get_softc(dev); ACPI_HANDLE h; if ((h = acpi_get_handle(dev)) == NULL) @@ -98,6 +99,12 @@ ahci_acpi_probe(device_t dev) pci_get_subclass(dev) == PCIS_STORAGE_SATA && pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) { device_set_desc_copy(dev, "AHCI SATA controller"); + if (ACPI_FAILURE(acpi_GetInteger(h, "_CCA", + &ctlr->dma_coherent))) + ctlr->dma_coherent = 0; + if (bootverbose) + device_printf(dev, "Bus is%s cache-coherent\n", + ctlr->dma_coherent ? "" : " not"); return (BUS_PROBE_DEFAULT); } Modified: stable/12/sys/dev/pci/pci_host_generic.c ============================================================================== --- stable/12/sys/dev/pci/pci_host_generic.c Tue Jun 16 20:35:00 2020 (r362239) +++ stable/12/sys/dev/pci/pci_host_generic.c Tue Jun 16 20:35:01 2020 (r362240) @@ -359,29 +359,30 @@ generic_pcie_activate_resource(device_t dev, device_t switch (type) { case SYS_RES_IOPORT: + case SYS_RES_MEMORY: found = 0; for (i = 0; i < MAX_RANGES_TUPLES; i++) { pci_base = sc->ranges[i].pci_base; phys_base = sc->ranges[i].phys_base; size = sc->ranges[i].size; - if ((rid > pci_base) && (rid < (pci_base + size))) { + if ((rman_get_start(r) >= pci_base) && (rman_get_start(r) < (pci_base + size))) { found = 1; break; } } if (found) { - rman_set_start(r, rman_get_start(r) + phys_base); - rman_set_end(r, rman_get_end(r) + phys_base); + rman_set_start(r, rman_get_start(r) - pci_base + phys_base); + rman_set_end(r, rman_get_end(r) - pci_base + phys_base); res = BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); } else { device_printf(dev, - "Failed to activate IOPORT resource\n"); + "Failed to activate %s resource\n", + type == SYS_RES_IOPORT ? "IOPORT" : "MEMORY"); res = 0; } break; - case SYS_RES_MEMORY: case SYS_RES_IRQ: res = BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); Modified: stable/12/sys/dev/pci/pci_host_generic_acpi.c ============================================================================== --- stable/12/sys/dev/pci/pci_host_generic_acpi.c Tue Jun 16 20:35:00 2020 (r362239) +++ stable/12/sys/dev/pci/pci_host_generic_acpi.c Tue Jun 16 20:35:01 2020 (r362240) @@ -148,8 +148,6 @@ pci_host_generic_acpi_parse_resource(ACPI_RESOURCE *re off = res->Data.Address32.Address.TranslationOffset; break; case ACPI_RESOURCE_TYPE_ADDRESS64: - if (res->Data.Address.ResourceType != ACPI_MEMORY_RANGE) - break; min = res->Data.Address64.Address.Minimum; max = res->Data.Address64.Address.Maximum; off = res->Data.Address64.Address.TranslationOffset; @@ -207,11 +205,7 @@ pci_host_acpi_get_ecam_resource(device_t dev) mcfg_entry++; } if (found) { - if (mcfg_entry->EndBusNumber < sc->base.bus_end) { - device_printf(dev, "bus end mismatch! expected %d found %d.\n", - sc->base.bus_end, (int)mcfg_entry->EndBusNumber); - sc->base.bus_end = mcfg_entry->EndBusNumber; - } + sc->base.bus_end = mcfg_entry->EndBusNumber; base = mcfg_entry->Address; } else { device_printf(dev, "MCFG exists, but does not have bus %d-%d\n", @@ -220,9 +214,10 @@ pci_host_acpi_get_ecam_resource(device_t dev) } } else { status = acpi_GetInteger(handle, "_CBA", &val); - if (ACPI_SUCCESS(status)) + if (ACPI_SUCCESS(status)) { base = val; - else + sc->base.bus_end = 255; + } else return (ENXIO); } @@ -259,7 +254,6 @@ pci_host_generic_acpi_attach(device_t dev) device_printf(dev, "No _BBN, using start bus 0\n"); sc->base.bus_start = 0; } - sc->base.bus_end = 255; /* Get PCI Segment (domain) needed for MCFG lookup */ status = acpi_GetInteger(handle, "_SEG", &sc->base.ecam); @@ -297,7 +291,7 @@ pci_host_generic_acpi_attach(device_t dev) continue; /* empty range element */ if (sc->base.ranges[tuple].flags & FLAG_MEM) { error = rman_manage_region(&sc->base.mem_rman, - phys_base, phys_base + size - 1); + pci_base, pci_base + size - 1); } else if (sc->base.ranges[tuple].flags & FLAG_IO) { error = rman_manage_region(&sc->base.io_rman, pci_base + PCI_IO_WINDOW_OFFSET, From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:36:22 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED10A333345; Tue, 16 Jun 2020 20:36:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mg2t62DCz4fk9; Tue, 16 Jun 2020 20:36:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA37A152CB; Tue, 16 Jun 2020 20:36:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKaMr6057586; Tue, 16 Jun 2020 20:36:22 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKaMKp057584; Tue, 16 Jun 2020 20:36:22 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162036.05GKaMKp057584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362241 - in stable/12/sys: arm64/conf modules/dtb/mv X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf modules/dtb/mv X-SVN-Commit-Revision: 362241 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:36:23 -0000 Author: manu Date: Tue Jun 16 20:36:22 2020 New Revision: 362241 URL: https://svnweb.freebsd.org/changeset/base/362241 Log: MFC r351144: arm64: Add EspressoBin DTB to the build This will compile the espressobin dts to a dtb file and this will be install in /boot/dtb/marvell/ during installkernel. Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/modules/dtb/mv/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Tue Jun 16 20:35:01 2020 (r362240) +++ stable/12/sys/arm64/conf/GENERIC Tue Jun 16 20:36:22 2020 (r362241) @@ -308,4 +308,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner dtb/rockchip dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/mv dtb/rockchip dtb/rpi" Modified: stable/12/sys/modules/dtb/mv/Makefile ============================================================================== --- stable/12/sys/modules/dtb/mv/Makefile Tue Jun 16 20:35:01 2020 (r362240) +++ stable/12/sys/modules/dtb/mv/Makefile Tue Jun 16 20:36:22 2020 (r362241) @@ -1,7 +1,13 @@ # $FreeBSD$ # All the dts files for Marvell systems we support. + +.if ${MACHINE_ARCH} == "armv7" DTS= \ armada-388-clearfog.dts \ armada-388-gp.dts +.elif ${MACHINE_ARCH} == "aarch64" +DTS= \ + marvell/armada-3720-espressobin.dts +.endif .include From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:38:56 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E5303330E5; Tue, 16 Jun 2020 20:38:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mg5r2r3wz4fxt; Tue, 16 Jun 2020 20:38:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CA27152CC; Tue, 16 Jun 2020 20:38:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKcuMv057737; Tue, 16 Jun 2020 20:38:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKcuPM057736; Tue, 16 Jun 2020 20:38:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162038.05GKcuPM057736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362242 - stable/12/usr.sbin/efibootmgr X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/usr.sbin/efibootmgr X-SVN-Commit-Revision: 362242 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:38:56 -0000 Author: manu Date: Tue Jun 16 20:38:55 2020 New Revision: 362242 URL: https://svnweb.freebsd.org/changeset/base/362242 Log: MFC r347441: efibootmgr: Do not add the new boot entry in dry-run is specified While here fix a typo. Sponsored-by: Ampere Computing, LLC Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20212 Modified: stable/12/usr.sbin/efibootmgr/efibootmgr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- stable/12/usr.sbin/efibootmgr/efibootmgr.c Tue Jun 16 20:36:22 2020 (r362241) +++ stable/12/usr.sbin/efibootmgr/efibootmgr.c Tue Jun 16 20:38:55 2020 (r362242) @@ -673,7 +673,7 @@ make_boot_var(const char *label, const char *loader, c lopt_size = create_loadopt(load_opt_buf, MAX_LOADOPT_LEN, load_attrs, dp, llen + klen, label, env, env ? strlen(env) + 1 : 0); if (lopt_size == BAD_LENGTH) - errx(1, "Can't crate loadopt"); + errx(1, "Can't create loadopt"); ret = 0; if (!dry_run) { @@ -684,7 +684,8 @@ make_boot_var(const char *label, const char *loader, c if (ret) err(1, "efi_set_variable"); - add_to_boot_order(bootvar); /* first, still not active */ + if (!dry_run) + add_to_boot_order(bootvar); /* first, still not active */ new_ent = malloc(sizeof(struct entry)); if (new_ent == NULL) err(1, "malloc"); From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:42:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BFD03334CC; Tue, 16 Jun 2020 20:42:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mg9N1nyXz4g3K; Tue, 16 Jun 2020 20:42:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 390E4152DB; Tue, 16 Jun 2020 20:42:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKg0PU060393; Tue, 16 Jun 2020 20:42:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKg0lw060390; Tue, 16 Jun 2020 20:42:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162042.05GKg0lw060390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362243 - stable/12/sys/dev/extres/regulator X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/extres/regulator X-SVN-Commit-Revision: 362243 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:42:00 -0000 Author: manu Date: Tue Jun 16 20:41:59 2020 New Revision: 362243 URL: https://svnweb.freebsd.org/changeset/base/362243 Log: MFC r356487: regulator: fix regnode_method_get_voltage This method is supposed to write the voltage into uvolt and return an errno compatible value. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23006 Modified: stable/12/sys/dev/extres/regulator/regulator.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/extres/regulator/regulator.c ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator.c Tue Jun 16 20:38:55 2020 (r362242) +++ stable/12/sys/dev/extres/regulator/regulator.c Tue Jun 16 20:41:59 2020 (r362243) @@ -295,8 +295,9 @@ static int regnode_method_get_voltage(struct regnode *regnode, int *uvolt) { - return (regnode->std_param.min_uvolt + - (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2); + *uvolt = regnode->std_param.min_uvolt + + (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2; + return (0); } int From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:43:43 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E155333817; Tue, 16 Jun 2020 20:43:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mgCM1t7lz4gKc; Tue, 16 Jun 2020 20:43:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B8B514FF4; Tue, 16 Jun 2020 20:43:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKhhKk063706; Tue, 16 Jun 2020 20:43:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKhhP4063705; Tue, 16 Jun 2020 20:43:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162043.05GKhhP4063705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362244 - stable/12/sys/modules/dtb/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/modules/dtb/rockchip X-SVN-Commit-Revision: 362244 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:43:43 -0000 Author: manu Date: Tue Jun 16 20:43:42 2020 New Revision: 362244 URL: https://svnweb.freebsd.org/changeset/base/362244 Log: MFC r354117: arm64: rockchip: dts: Build the Khadas board DTS We boot on thoses boards so build them. Submitted by: s199p.wa1k9r@gmail.com Differential Revision: https://reviews.freebsd.org/D22158 Modified: stable/12/sys/modules/dtb/rockchip/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/dtb/rockchip/Makefile ============================================================================== --- stable/12/sys/modules/dtb/rockchip/Makefile Tue Jun 16 20:41:59 2020 (r362243) +++ stable/12/sys/modules/dtb/rockchip/Makefile Tue Jun 16 20:43:42 2020 (r362244) @@ -1,6 +1,9 @@ # $FreeBSD$ DTS= \ + rockchip/rk3399-khadas-edge-captain.dts \ + rockchip/rk3399-khadas-edge.dts \ + rockchip/rk3399-khadas-edge-v.dts \ rockchip/rk3328-rock64.dts \ rockchip/rk3399-rockpro64.dts From owner-svn-src-stable-12@freebsd.org Tue Jun 16 20:44:52 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57B3133382E; Tue, 16 Jun 2020 20:44:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mgDh1g3bz4gLY; Tue, 16 Jun 2020 20:44:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A6D7151CA; Tue, 16 Jun 2020 20:44:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GKiptO063841; Tue, 16 Jun 2020 20:44:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GKipqc063840; Tue, 16 Jun 2020 20:44:51 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006162044.05GKipqc063840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Jun 2020 20:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362245 - stable/12/sys/gnu/dts/riscv X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/gnu/dts/riscv X-SVN-Commit-Revision: 362245 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:44:52 -0000 Author: manu Date: Tue Jun 16 20:44:51 2020 New Revision: 362245 URL: https://svnweb.freebsd.org/changeset/base/362245 Log: MFC r355324: Import DTS files for riscv from Linux 5.4 Requested by: mhorne Added: stable/12/sys/gnu/dts/riscv/ - copied from r355324, head/sys/gnu/dts/riscv/ Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable-12@freebsd.org Wed Jun 17 10:50:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8144434ACA1; Wed, 17 Jun 2020 10:50:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49n20x2tPXz4cVN; Wed, 17 Jun 2020 10:50:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E2401F123; Wed, 17 Jun 2020 10:50:57 +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 05HAovL4086843; Wed, 17 Jun 2020 10:50:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HAoujn086836; Wed, 17 Jun 2020 10:50:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006171050.05HAoujn086836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 17 Jun 2020 10:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362264 - in stable/12: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Commit-Revision: 362264 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 10:50:57 -0000 Author: kib Date: Wed Jun 17 10:50:55 2020 New Revision: 362264 URL: https://svnweb.freebsd.org/changeset/base/362264 Log: MFC r361770, r361784, r362032: Add pthread_getname_np() and pthread_setname_np() aliases for pthread_get_name_np() and pthread_set_name_np(). Modified: stable/12/include/pthread.h stable/12/lib/libc/include/namespace.h stable/12/lib/libc/include/un-namespace.h stable/12/lib/libthr/pthread.map stable/12/lib/libthr/thread/thr_info.c stable/12/share/man/man3/Makefile stable/12/share/man/man3/pthread_set_name_np.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/include/pthread.h ============================================================================== --- stable/12/include/pthread.h Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/include/pthread.h Wed Jun 17 10:50:55 2020 (r362264) @@ -301,6 +301,9 @@ void pthread_testcancel(void); int pthread_getprio(pthread_t); int pthread_setprio(pthread_t, int); void pthread_yield(void); + +int pthread_getname_np(pthread_t, char *, size_t); +int pthread_setname_np(pthread_t, const char *); #endif int pthread_mutexattr_getprioceiling( Modified: stable/12/lib/libc/include/namespace.h ============================================================================== --- stable/12/lib/libc/include/namespace.h Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/lib/libc/include/namespace.h Wed Jun 17 10:50:55 2020 (r362264) @@ -138,6 +138,7 @@ #define pthread_getaffinity_np _pthread_getaffinity_np #define pthread_getconcurrency _pthread_getconcurrency #define pthread_getcpuclockid _pthread_getcpuclockid +#define pthread_getname_np _pthread_getname_np #define pthread_getprio _pthread_getprio #define pthread_getschedparam _pthread_getschedparam #define pthread_getspecific _pthread_getspecific @@ -191,6 +192,7 @@ #define pthread_setcancelstate _pthread_setcancelstate #define pthread_setcanceltype _pthread_setcanceltype #define pthread_setconcurrency _pthread_setconcurrency +#define pthread_setname_np _pthread_setname_np #define pthread_setprio _pthread_setprio #define pthread_setschedparam _pthread_setschedparam #define pthread_setspecific _pthread_setspecific Modified: stable/12/lib/libc/include/un-namespace.h ============================================================================== --- stable/12/lib/libc/include/un-namespace.h Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/lib/libc/include/un-namespace.h Wed Jun 17 10:50:55 2020 (r362264) @@ -119,6 +119,7 @@ #undef pthread_getaffinity_np #undef pthread_getconcurrency #undef pthread_getcpuclockid +#undef pthread_getname_np #undef pthread_getprio #undef pthread_getschedparam #undef pthread_getspecific @@ -172,6 +173,7 @@ #undef pthread_setcancelstate #undef pthread_setcanceltype #undef pthread_setconcurrency +#undef pthread_setname_np #undef pthread_setprio #undef pthread_setschedparam #undef pthread_setspecific Modified: stable/12/lib/libthr/pthread.map ============================================================================== --- stable/12/lib/libthr/pthread.map Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/lib/libthr/pthread.map Wed Jun 17 10:50:55 2020 (r362264) @@ -328,5 +328,7 @@ FBSD_1.5 { }; FBSD_1.6 { + pthread_getname_np; pthread_peekjoin_np; + pthread_setname_np; }; Modified: stable/12/lib/libthr/thread/thr_info.c ============================================================================== --- stable/12/lib/libthr/thread/thr_info.c Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/lib/libthr/thread/thr_info.c Wed Jun 17 10:50:55 2020 (r362264) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" +#include #include #include #include @@ -45,39 +46,66 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" -__weak_reference(_pthread_set_name_np, pthread_set_name_np); - static void -thr_set_name_np(struct pthread *thread, const char *name) +thr_set_name_np(struct pthread *thread, char **tmp_name) { free(thread->name); - thread->name = name != NULL ? strdup(name) : NULL; + thread->name = *tmp_name; + *tmp_name = NULL; } -/* Set the thread name for debug. */ -void -_pthread_set_name_np(pthread_t thread, const char *name) +/* Set the thread name. */ +__weak_reference(_pthread_setname_np, pthread_setname_np); +int +_pthread_setname_np(pthread_t thread, const char *name) { struct pthread *curthread; + char *tmp_name; + int res; + if (name != NULL) { + tmp_name = strdup(name); + if (tmp_name == NULL) + return (ENOMEM); + } else { + tmp_name = NULL; + } curthread = _get_curthread(); if (curthread == thread) { + res = 0; THR_THREAD_LOCK(curthread, thread); - thr_set_name(thread->tid, name); - thr_set_name_np(thread, name); + if (thr_set_name(thread->tid, name) == -1) + res = errno; + else + thr_set_name_np(thread, &tmp_name); THR_THREAD_UNLOCK(curthread, thread); } else { + res = ESRCH; if (_thr_find_thread(curthread, thread, 0) == 0) { if (thread->state != PS_DEAD) { - thr_set_name(thread->tid, name); - thr_set_name_np(thread, name); + if (thr_set_name(thread->tid, name) == -1) { + res = errno; + } else { + thr_set_name_np(thread, &tmp_name); + res = 0; + } } THR_THREAD_UNLOCK(curthread, thread); } } + free(tmp_name); + return (res); } +/* Set the thread name for debug. */ +__weak_reference(_pthread_set_name_np, pthread_set_name_np); +void +_pthread_set_name_np(pthread_t thread, const char *name) +{ + (void)_pthread_setname_np(thread, name); +} + static void thr_get_name_np(struct pthread *thread, char *buf, size_t len) { @@ -88,13 +116,14 @@ thr_get_name_np(struct pthread *thread, char *buf, siz buf[0] = '\0'; } -__weak_reference(_pthread_get_name_np, pthread_get_name_np); - -void -_pthread_get_name_np(pthread_t thread, char *buf, size_t len) +__weak_reference(_pthread_getname_np, pthread_getname_np); +int +_pthread_getname_np(pthread_t thread, char *buf, size_t len) { struct pthread *curthread; + int res; + res = 0; curthread = _get_curthread(); if (curthread == thread) { THR_THREAD_LOCK(curthread, thread); @@ -104,8 +133,21 @@ _pthread_get_name_np(pthread_t thread, char *buf, size if (_thr_find_thread(curthread, thread, 0) == 0) { if (thread->state != PS_DEAD) thr_get_name_np(thread, buf, len); + else + res = ESRCH; THR_THREAD_UNLOCK(curthread, thread); - } else if (len > 0) - buf[0] = '\0'; + } else { + res = ESRCH; + if (len > 0) + buf[0] = '\0'; + } } + return (res); +} + +__weak_reference(_pthread_get_name_np, pthread_get_name_np); +void +_pthread_get_name_np(pthread_t thread, char *buf, size_t len) +{ + (void)_pthread_getname_np(thread, buf, len); } Modified: stable/12/share/man/man3/Makefile ============================================================================== --- stable/12/share/man/man3/Makefile Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/share/man/man3/Makefile Wed Jun 17 10:50:55 2020 (r362264) @@ -361,7 +361,9 @@ PTHREAD_MLINKS+=pthread_rwlock_rdlock.3 pthread_rwlock PTHREAD_MLINKS+=pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3 PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \ pthread_schedparam.3 pthread_setschedparam.3 -PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 +PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 \ + pthread_set_name_np.3 pthread_getname_np.3 \ + pthread_set_name_np.3 pthread_setname_np.3 PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \ pthread_spin_lock.3 pthread_spin_trylock.3 \ pthread_spin_lock.3 pthread_spin_unlock.3 Modified: stable/12/share/man/man3/pthread_set_name_np.3 ============================================================================== --- stable/12/share/man/man3/pthread_set_name_np.3 Wed Jun 17 10:42:20 2020 (r362263) +++ stable/12/share/man/man3/pthread_set_name_np.3 Wed Jun 17 10:50:55 2020 (r362264) @@ -24,12 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2018 +.Dd June 3, 2020 .Dt PTHREAD_SET_NAME_NP 3 .Os .Sh NAME .Nm pthread_get_name_np , +.Nm pthread_getname_np , .Nm pthread_set_name_np +.Nm pthread_setname_np .Nd set and retrieve the thread name .Sh LIBRARY .Lb libpthread @@ -37,19 +39,27 @@ .In pthread_np.h .Ft void .Fn pthread_get_name_np "pthread_t thread" "char *name" "size_t len" +.Ft int +.Fn pthread_getname_np "pthread_t thread" "char *name" "size_t len" .Ft void .Fn pthread_set_name_np "pthread_t thread" "const char *name" +.Ft int +.Fn pthread_setname_np "pthread_t thread" "const char *name" .Sh DESCRIPTION The .Fn pthread_set_name_np -function applies a copy of the given +and +.Fn pthread_setname_np +functions apply a copy of the given .Fa name to the given .Fa thread . .Pp The .Fn pthread_get_name_np -function retrieves the +and +.Fn pthread_getname_np +functions retrieve the .Fa name associated with .Fa thread . @@ -61,7 +71,23 @@ the buffer pointed to by .Fa name will be empty. .Sh ERRORS -Because of the debugging nature of these functions, all errors that may +The +.Nm pthread_getname_np +and +.Nm pthread_setname_np +will fail if +.Bl -tag -width Er +.It Bq Er ESRCH +No thread could be found in the current process corresponding to that +specified by the given thread ID +.Fa thread . +.El +.Pp +Because of the debugging nature of +.Nm pthread_get_name_np +and +.Nm pthread_set_name_np +functions, all errors that may appear inside are silently ignored. .Sh SEE ALSO .Xr thr_set_name 2 @@ -70,6 +96,11 @@ appear inside are silently ignored. and .Fn pthread_get_name_np are non-standard extensions. +.Fn pthread_setname_np +and +.Fn pthread_getname_np +are also non-standard, but are implemented by larger number of operating +systems so they are in fact more portable. .Sh AUTHORS This manual page was written by .An Alexey Zelkin Aq Mt phantom@FreeBSD.org From owner-svn-src-stable-12@freebsd.org Wed Jun 17 13:46:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F185C34F918; Wed, 17 Jun 2020 13:46:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49n5v165Xvz3Yhk; Wed, 17 Jun 2020 13:46:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C829621408; Wed, 17 Jun 2020 13:46:05 +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 05HDk5Lw096921; Wed, 17 Jun 2020 13:46:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HDk5AF096920; Wed, 17 Jun 2020 13:46:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006171346.05HDk5AF096920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 17 Jun 2020 13:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362276 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 362276 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 13:46:06 -0000 Author: markj Date: Wed Jun 17 13:46:05 2020 New Revision: 362276 URL: https://svnweb.freebsd.org/changeset/base/362276 Log: MFC r362037: Fix a couple of nits in Linux sysinfo(2) emulation. Modified: stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Wed Jun 17 13:27:13 2020 (r362275) +++ stable/12/sys/compat/linux/linux_misc.c Wed Jun 17 13:46:05 2020 (r362276) @@ -131,8 +131,8 @@ struct l_sysinfo { l_ulong freeswap; /* swap space still available */ l_ushort procs; /* Number of current processes */ l_ushort pads; - l_ulong totalbig; - l_ulong freebig; + l_ulong totalhigh; + l_ulong freehigh; l_uint mem_unit; char _f[20-2*sizeof(l_long)-sizeof(l_int)]; /* padding */ }; @@ -164,7 +164,7 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale; sysinfo.totalram = physmem * PAGE_SIZE; - sysinfo.freeram = sysinfo.totalram - vm_wire_count() * PAGE_SIZE; + sysinfo.freeram = (u_long)vm_free_count() * PAGE_SIZE; /* * sharedram counts pages allocated to named, swap-backed objects such @@ -181,9 +181,13 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ sysinfo.procs = nprocs; - /* The following are only present in newer Linux kernels. */ - sysinfo.totalbig = 0; - sysinfo.freebig = 0; + /* + * Platforms supported by the emulation layer do not have a notion of + * high memory. + */ + sysinfo.totalhigh = 0; + sysinfo.freehigh = 0; + sysinfo.mem_unit = 1; return (copyout(&sysinfo, args->info, sizeof(sysinfo))); From owner-svn-src-stable-12@freebsd.org Wed Jun 17 16:22:10 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4252352A7E; Wed, 17 Jun 2020 16:22:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49n9M65l2zz41B2; Wed, 17 Jun 2020 16:22:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A763C2287C; Wed, 17 Jun 2020 16:22:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05HGMATG094889; Wed, 17 Jun 2020 16:22:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HGM9mY094884; Wed, 17 Jun 2020 16:22:09 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006171622.05HGM9mY094884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Jun 2020 16:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362281 - in stable: 11/lib/libc/gen 11/lib/libc/tests/gen 12/lib/libc/gen 12/lib/libc/tests/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libc/gen 11/lib/libc/tests/gen 12/lib/libc/gen 12/lib/libc/tests/gen X-SVN-Commit-Revision: 362281 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 16:22:11 -0000 Author: kevans Date: Wed Jun 17 16:22:08 2020 New Revision: 362281 URL: https://svnweb.freebsd.org/changeset/base/362281 Log: MFC r361995-r361996, r361999, r362111: posix_spawnp fixes r361995: execvp: fix up the ENOEXEC fallback If execve fails with ENOEXEC, execvp is expected to rebuild the command with /bin/sh instead and try again. The previous version did this, but overlooked two details: argv[0] can conceivably be NULL, in which case memp would never get terminated. We must allocate no less than three * sizeof(char *) so we can properly terminate at all times. For the non-NULL argv standard case, we count all the non-NULL elements and actually skip the first argument, so we end up capturing the NULL terminator in our bcopy(). The second detail is that the spec is actually worded such that we should have been preserving argv[0] as passed to execvp: "[...] executed command shall be as if the process invoked the sh utility using execl() as follows: execl(, arg0, file, arg1, ..., (char *)0); where is an unspecified pathname for the sh utility, file is the process image file, and for execvp(), where arg0, arg1, and so on correspond to the values passed to execvp() in argv[0], argv[1], and so on." So we make this change at this time as well, while we're already touching it. We decidedly can't preserve a NULL argv[0] as this would be incredibly, incredibly fragile, so we retain our legacy behavior of using "sh" for argv[] in this specific instance. Some light tests are added to try and detect some components of handling the ENOEXEC fallback; posix_spawnp_enoexec_fallback_null_argv0 is likely not 100% reliable, but it at least won't raise false-alarms and it did result in useful failures with pre-change libc on my machine. This is a secondary change in D25038. r361996: execvPe: obviate the need for potentially large stack allocations Some environments in which execvPe may be called have a limited amount of stack available. Currently, it avoidably allocates a segment on the stack large enough to hold PATH so that it may be mutated and use strsep() for easy parsing. This logic is now rewritten to just operate on the immutable string passed in and do the necessary math to extract individual paths, since it will be copying out those segments to another buffer anyways and piecing them together with the name for a full path. Additional size is also needed for the stack in posix_spawnp(), because it may need to push all of argv to the stack and rebuild the command with sh in front of it. We'll make sure it's properly aligned for the new thread, but future work should likely make rfork_thread a little easier to use by ensuring proper alignment. Some trivial cleanup has been done with a couple of error writes, moving strings into char arrays for use with the less fragile sizeof(). r361999: Add missing shell script from r361995 r362111: posix_spawn: fix for some custom allocator setups libc cannot assume that aligned_alloc and free come from jemalloc, or that any application providing its own malloc and free is actually providing aligned_alloc. Switch back to malloc and just make sure we're passing a properly aligned stack into rfork_thread, as an application perhaps can't reasonably replace just malloc or just free without headaches. This unbreaks ksh93 after r361996, which provides malloc/free but no aligned_alloc. Added: stable/12/lib/libc/tests/gen/spawnp_enoexec.sh - copied unchanged from r361999, head/lib/libc/tests/gen/spawnp_enoexec.sh Modified: stable/12/lib/libc/gen/exec.c stable/12/lib/libc/gen/posix_spawn.c stable/12/lib/libc/tests/gen/Makefile stable/12/lib/libc/tests/gen/posix_spawn_test.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/lib/libc/tests/gen/spawnp_enoexec.sh - copied unchanged from r361999, head/lib/libc/tests/gen/spawnp_enoexec.sh Modified: stable/11/lib/libc/gen/exec.c stable/11/lib/libc/gen/posix_spawn.c stable/11/lib/libc/tests/gen/Makefile stable/11/lib/libc/tests/gen/posix_spawn_test.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/gen/exec.c ============================================================================== --- stable/12/lib/libc/gen/exec.c Wed Jun 17 16:20:19 2020 (r362280) +++ stable/12/lib/libc/gen/exec.c Wed Jun 17 16:22:08 2020 (r362281) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); extern char **environ; +static const char execvPe_err_preamble[] = "execvP: "; +static const char execvPe_err_trailer[] = ": path too long\n"; + int execl(const char *name, const char *arg, ...) { @@ -149,8 +152,8 @@ execvPe(const char *name, const char *path, char * con const char **memp; size_t cnt, lp, ln; int eacces, save_errno; - char *cur, buf[MAXPATHLEN]; - const char *p, *bp; + char buf[MAXPATHLEN]; + const char *bp, *np, *op, *p; struct stat sb; eacces = 0; @@ -158,7 +161,7 @@ execvPe(const char *name, const char *path, char * con /* If it's an absolute or relative path name, it's easy. */ if (strchr(name, '/')) { bp = name; - cur = NULL; + op = NULL; goto retry; } bp = buf; @@ -169,34 +172,42 @@ execvPe(const char *name, const char *path, char * con return (-1); } - cur = alloca(strlen(path) + 1); - if (cur == NULL) { - errno = ENOMEM; - return (-1); - } - strcpy(cur, path); - while ((p = strsep(&cur, ":")) != NULL) { + op = path; + ln = strlen(name); + while (op != NULL) { + np = strchrnul(op, ':'); + /* * It's a SHELL path -- double, leading and trailing colons * mean the current directory. */ - if (*p == '\0') { + if (np == op) { + /* Empty component. */ p = "."; lp = 1; - } else - lp = strlen(p); - ln = strlen(name); + } else { + /* Non-empty component. */ + p = op; + lp = np - op; + } + /* Advance to the next component or terminate after this. */ + if (*np == '\0') + op = NULL; + else + op = np + 1; + /* * If the path is too long complain. This is a possible * security issue; given a way to make the path too long * the user may execute the wrong program. */ if (lp + ln + 2 > sizeof(buf)) { - (void)_write(STDERR_FILENO, "execvP: ", 8); + (void)_write(STDERR_FILENO, execvPe_err_preamble, + sizeof(execvPe_err_preamble) - 1); (void)_write(STDERR_FILENO, p, lp); - (void)_write(STDERR_FILENO, ": path too long\n", - 16); + (void)_write(STDERR_FILENO, execvPe_err_trailer, + sizeof(execvPe_err_trailer) - 1); continue; } bcopy(p, buf, lp); @@ -215,14 +226,28 @@ retry: (void)_execve(bp, argv, envp); case ENOEXEC: for (cnt = 0; argv[cnt]; ++cnt) ; - memp = alloca((cnt + 2) * sizeof(char *)); + + /* + * cnt may be 0 above; always allocate at least + * 3 entries so that we can at least fit "sh", bp, and + * the NULL terminator. We can rely on cnt to take into + * account the NULL terminator in all other scenarios, + * as we drop argv[0]. + */ + memp = alloca(MAX(3, cnt + 2) * sizeof(char *)); if (memp == NULL) { /* errno = ENOMEM; XXX override ENOEXEC? */ goto done; } - memp[0] = "sh"; - memp[1] = bp; - bcopy(argv + 1, memp + 2, cnt * sizeof(char *)); + if (cnt > 0) { + memp[0] = argv[0]; + memp[1] = bp; + bcopy(argv + 1, memp + 2, cnt * sizeof(char *)); + } else { + memp[0] = "sh"; + memp[1] = bp; + memp[2] = NULL; + } (void)_execve(_PATH_BSHELL, __DECONST(char **, memp), envp); goto done; Modified: stable/12/lib/libc/gen/posix_spawn.c ============================================================================== --- stable/12/lib/libc/gen/posix_spawn.c Wed Jun 17 16:20:19 2020 (r362280) +++ stable/12/lib/libc/gen/posix_spawn.c Wed Jun 17 16:22:08 2020 (r362281) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" +#include #include #include @@ -204,8 +205,20 @@ struct posix_spawn_args { volatile int error; }; +#define PSPAWN_STACK_ALIGNMENT 16 +#define PSPAWN_STACK_ALIGNBYTES (PSPAWN_STACK_ALIGNMENT - 1) +#define PSPAWN_STACK_ALIGN(sz) \ + (((sz) + PSPAWN_STACK_ALIGNBYTES) & ~PSPAWN_STACK_ALIGNBYTES) + #if defined(__i386__) || defined(__amd64__) +/* + * Below we'll assume that _RFORK_THREAD_STACK_SIZE is appropriately aligned for + * the posix_spawn() case where we do not end up calling _execvpe and won't ever + * try to allocate space on the stack for argv[]. + */ #define _RFORK_THREAD_STACK_SIZE 4096 +_Static_assert((_RFORK_THREAD_STACK_SIZE % PSPAWN_STACK_ALIGNMENT) == 0, + "Inappropriate stack size alignment"); #endif static int @@ -246,10 +259,36 @@ do_posix_spawn(pid_t *pid, const char *path, pid_t p; #ifdef _RFORK_THREAD_STACK_SIZE char *stack; + size_t cnt, stacksz; - stack = malloc(_RFORK_THREAD_STACK_SIZE); + stacksz = _RFORK_THREAD_STACK_SIZE; + if (use_env_path) { + /* + * We need to make sure we have enough room on the stack for the + * potential alloca() in execvPe if it gets kicked back an + * ENOEXEC from execve(2), plus the original buffer we gave + * ourselves; this protects us in the event that the caller + * intentionally or inadvertently supplies enough arguments to + * make us blow past the stack we've allocated from it. + */ + for (cnt = 0; argv[cnt] != NULL; ++cnt) + ; + stacksz += MAX(3, cnt + 2) * sizeof(char *); + stacksz = PSPAWN_STACK_ALIGN(stacksz); + } + + /* + * aligned_alloc is not safe to use here, because we can't guarantee + * that aligned_alloc and free will be provided by the same + * implementation. We've actively hit at least one application that + * will provide its own malloc/free but not aligned_alloc leading to + * a free by the wrong allocator. + */ + stack = malloc(stacksz); if (stack == NULL) return (ENOMEM); + stacksz = (((uintptr_t)stack + stacksz) & ~PSPAWN_STACK_ALIGNBYTES) - + (uintptr_t)stack; #endif psa.path = path; psa.fa = fa; @@ -273,8 +312,7 @@ do_posix_spawn(pid_t *pid, const char *path, * parent. Because of this, we must use rfork_thread instead while * almost every other arch stores the return address in a register. */ - p = rfork_thread(RFSPAWN, stack + _RFORK_THREAD_STACK_SIZE, - _posix_spawn_thr, &psa); + p = rfork_thread(RFSPAWN, stack + stacksz, _posix_spawn_thr, &psa); free(stack); #else p = rfork(RFSPAWN); Modified: stable/12/lib/libc/tests/gen/Makefile ============================================================================== --- stable/12/lib/libc/tests/gen/Makefile Wed Jun 17 16:20:19 2020 (r362280) +++ stable/12/lib/libc/tests/gen/Makefile Wed Jun 17 16:22:08 2020 (r362281) @@ -24,6 +24,15 @@ ATF_TESTS_C+= wordexp_test # TODO: t_siginfo (fixes require further inspection) # TODO: t_sethostname_test (consistently screws up the hostname) +FILESGROUPS+= posix_spawn_test_FILES + +posix_spawn_test_FILES= spawnp_enoexec.sh +posix_spawn_test_FILESDIR= ${TESTSDIR} +posix_spawn_test_FILESMODE= 0755 +posix_spawn_test_FILESOWN= root +posix_spawn_test_FILESGRP= wheel +posix_spawn_test_FILESPACKAGE= ${PACKAGE} + CFLAGS+= -DTEST_LONG_DOUBLE # Not sure why this isn't defined for all architectures, since most Modified: stable/12/lib/libc/tests/gen/posix_spawn_test.c ============================================================================== --- stable/12/lib/libc/tests/gen/posix_spawn_test.c Wed Jun 17 16:20:19 2020 (r362280) +++ stable/12/lib/libc/tests/gen/posix_spawn_test.c Wed Jun 17 16:22:08 2020 (r362281) @@ -93,11 +93,50 @@ ATF_TC_BODY(posix_spawn_no_such_command_negative_test, } } +ATF_TC_WITHOUT_HEAD(posix_spawnp_enoexec_fallback); +ATF_TC_BODY(posix_spawnp_enoexec_fallback, tc) +{ + char buf[FILENAME_MAX]; + char *myargs[2]; + int error, status; + pid_t pid, waitres; + + snprintf(buf, sizeof(buf), "%s/spawnp_enoexec.sh", + atf_tc_get_config_var(tc, "srcdir")); + myargs[0] = buf; + myargs[1] = NULL; + error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs, myenv); + ATF_REQUIRE(error == 0); + waitres = waitpid(pid, &status, 0); + ATF_REQUIRE(waitres == pid); + ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 42); +} + +ATF_TC_WITHOUT_HEAD(posix_spawnp_enoexec_fallback_null_argv0); +ATF_TC_BODY(posix_spawnp_enoexec_fallback_null_argv0, tc) +{ + char buf[FILENAME_MAX]; + char *myargs[1]; + int error, status; + pid_t pid, waitres; + + snprintf(buf, sizeof(buf), "%s/spawnp_enoexec.sh", + atf_tc_get_config_var(tc, "srcdir")); + myargs[0] = NULL; + error = posix_spawnp(&pid, buf, NULL, NULL, myargs, myenv); + ATF_REQUIRE(error == 0); + waitres = waitpid(pid, &status, 0); + ATF_REQUIRE(waitres == pid); + ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 42); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, posix_spawn_simple_test); ATF_TP_ADD_TC(tp, posix_spawn_no_such_command_negative_test); + ATF_TP_ADD_TC(tp, posix_spawnp_enoexec_fallback); + ATF_TP_ADD_TC(tp, posix_spawnp_enoexec_fallback_null_argv0); return (atf_no_error()); } Copied: stable/12/lib/libc/tests/gen/spawnp_enoexec.sh (from r361999, head/lib/libc/tests/gen/spawnp_enoexec.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/tests/gen/spawnp_enoexec.sh Wed Jun 17 16:22:08 2020 (r362281, copy of r361999, head/lib/libc/tests/gen/spawnp_enoexec.sh) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# Intentionally no interpreter + +exit 42 From owner-svn-src-stable-12@freebsd.org Wed Jun 17 18:47:59 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5845357BF6; Wed, 17 Jun 2020 18:47:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nDbM4RvXz4K4V; Wed, 17 Jun 2020 18:47:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93FA224B38; Wed, 17 Jun 2020 18:47:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05HIlxfM089664; Wed, 17 Jun 2020 18:47:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HIlxUs089663; Wed, 17 Jun 2020 18:47:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006171847.05HIlxUs089663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 17 Jun 2020 18:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362283 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 362283 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 18:47:59 -0000 Author: markj Date: Wed Jun 17 18:47:59 2020 New Revision: 362283 URL: https://svnweb.freebsd.org/changeset/base/362283 Log: MFC r362035: Remove the FIRMWARE_MAX limit. Modified: stable/12/sys/kern/subr_firmware.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_firmware.c ============================================================================== --- stable/12/sys/kern/subr_firmware.c Wed Jun 17 17:51:40 2020 (r362282) +++ stable/12/sys/kern/subr_firmware.c Wed Jun 17 18:47:59 2020 (r362283) @@ -53,12 +53,10 @@ __FBSDID("$FreeBSD$"); * form more details on the subsystem. * * 'struct firmware' is the user-visible part of the firmware table. - * Additional internal information is stored in a 'struct priv_fw' - * (currently a static array). A slot is in use if FW_INUSE is true: + * Additional internal information is stored in a 'struct priv_fw', + * which embeds the public firmware structure. */ -#define FW_INUSE(p) ((p)->file != NULL || (p)->fw.name != NULL) - /* * fw.name != NULL when an image is registered; file != NULL for * autoloaded images whose handling has not been completed. @@ -82,6 +80,7 @@ __FBSDID("$FreeBSD$"); struct priv_fw { int refcnt; /* reference count */ + LIST_ENTRY(priv_fw) link; /* table linkage */ /* * parent entry, see above. Set on firmware_register(), @@ -118,13 +117,9 @@ struct priv_fw { ((intptr_t)(x) - offsetof(struct priv_fw, fw)) ) /* - * At the moment we use a static array as backing store for the registry. - * Should we move to a dynamic structure, keep in mind that we cannot - * reallocate the array because pointers are held externally. - * A list may work, though. + * Global firmware image registry. */ -#define FIRMWARE_MAX 50 -static struct priv_fw firmware_table[FIRMWARE_MAX]; +static LIST_HEAD(, priv_fw) firmware_table; /* * Firmware module operations are handled in a separate task as they @@ -139,6 +134,8 @@ static struct task firmware_unload_task; static struct mtx firmware_mtx; MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", MTX_DEF); +static MALLOC_DEFINE(M_FIRMWARE, "firmware", "device firmware images"); + /* * Helper function to lookup a name. * As a side effect, it sets the pointer to a free slot, if any. @@ -147,23 +144,17 @@ MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", * with some other data structure. */ static struct priv_fw * -lookup(const char *name, struct priv_fw **empty_slot) +lookup(const char *name) { - struct priv_fw *fp = NULL; - struct priv_fw *dummy; - int i; + struct priv_fw *fp; - if (empty_slot == NULL) - empty_slot = &dummy; - *empty_slot = NULL; - for (i = 0; i < FIRMWARE_MAX; i++) { - fp = &firmware_table[i]; + mtx_assert(&firmware_mtx, MA_OWNED); + + LIST_FOREACH(fp, &firmware_table, link) { if (fp->fw.name != NULL && strcasecmp(name, fp->fw.name) == 0) break; - else if (!FW_INUSE(fp)) - *empty_slot = fp; } - return (i < FIRMWARE_MAX ) ? fp : NULL; + return (fp); } /* @@ -176,42 +167,42 @@ const struct firmware * firmware_register(const char *imagename, const void *data, size_t datasize, unsigned int version, const struct firmware *parent) { - struct priv_fw *match, *frp; - char *str; + struct priv_fw *frp; + char *name; - str = strdup(imagename, M_TEMP); - mtx_lock(&firmware_mtx); - /* - * Do a lookup to make sure the name is unique or find a free slot. - */ - match = lookup(imagename, &frp); - if (match != NULL) { + frp = lookup(imagename); + if (frp != NULL) { mtx_unlock(&firmware_mtx); printf("%s: image %s already registered!\n", - __func__, imagename); - free(str, M_TEMP); - return NULL; + __func__, imagename); + return (NULL); } - if (frp == NULL) { + mtx_unlock(&firmware_mtx); + + frp = malloc(sizeof(*frp), M_FIRMWARE, M_WAITOK | M_ZERO); + name = strdup(imagename, M_FIRMWARE); + + mtx_lock(&firmware_mtx); + if (lookup(imagename) != NULL) { + /* We lost a race. */ mtx_unlock(&firmware_mtx); - printf("%s: cannot register image %s, firmware table full!\n", - __func__, imagename); - free(str, M_TEMP); - return NULL; + free(name, M_FIRMWARE); + free(frp, M_FIRMWARE); + return (NULL); } - bzero(frp, sizeof(*frp)); /* start from a clean record */ - frp->fw.name = str; + frp->fw.name = name; frp->fw.data = data; frp->fw.datasize = datasize; frp->fw.version = version; if (parent != NULL) frp->parent = PRIV_FW(parent); + LIST_INSERT_HEAD(&firmware_table, frp, link); mtx_unlock(&firmware_mtx); if (bootverbose) printf("firmware: '%s' version %u: %zu bytes loaded at %p\n", imagename, version, datasize, data); - return &frp->fw; + return (&frp->fw); } /* @@ -226,7 +217,7 @@ firmware_unregister(const char *imagename) int err; mtx_lock(&firmware_mtx); - fp = lookup(imagename, NULL); + fp = lookup(imagename); if (fp == NULL) { /* * It is ok for the lookup to fail; this can happen @@ -238,20 +229,13 @@ firmware_unregister(const char *imagename) } else if (fp->refcnt != 0) { /* cannot unregister */ err = EBUSY; } else { - linker_file_t x = fp->file; /* save value */ - - /* - * Clear the whole entry with bzero to make sure we - * do not forget anything. Then restore 'file' which is - * non-null for autoloaded images. - */ - free((void *) (uintptr_t) fp->fw.name, M_TEMP); - bzero(fp, sizeof(struct priv_fw)); - fp->file = x; + LIST_REMOVE(fp, link); + free(__DECONST(char *, fp->fw.name), M_FIRMWARE); + free(fp, M_FIRMWARE); err = 0; } mtx_unlock(&firmware_mtx); - return err; + return (err); } static void @@ -262,31 +246,29 @@ loadimage(void *arg, int npending) linker_file_t result; int error; - /* synchronize with the thread that dispatched us */ - mtx_lock(&firmware_mtx); - mtx_unlock(&firmware_mtx); - error = linker_reference_module(imagename, NULL, &result); if (error != 0) { printf("%s: could not load firmware image, error %d\n", imagename, error); + mtx_lock(&firmware_mtx); goto done; } mtx_lock(&firmware_mtx); - fp = lookup(imagename, NULL); + fp = lookup(imagename); if (fp == NULL || fp->file != NULL) { mtx_unlock(&firmware_mtx); if (fp == NULL) printf("%s: firmware image loaded, " "but did not register\n", imagename); (void) linker_release_module(imagename, NULL, NULL); + mtx_lock(&firmware_mtx); goto done; } fp->file = result; /* record the module identity */ - mtx_unlock(&firmware_mtx); done: - wakeup_one(imagename); /* we're done */ + wakeup_one(imagename); + mtx_unlock(&firmware_mtx); } /* @@ -304,7 +286,7 @@ firmware_get(const char *imagename) struct priv_fw *fp; mtx_lock(&firmware_mtx); - fp = lookup(imagename, NULL); + fp = lookup(imagename); if (fp != NULL) goto found; /* @@ -318,7 +300,7 @@ firmware_get(const char *imagename) "load firmware image %s\n", __func__, imagename); return NULL; } - /* + /* * Defer load to a thread with known context. linker_reference_module * may do filesystem i/o which requires root & current dirs, etc. * Also we must not hold any mtx's over this call which is problematic. @@ -333,7 +315,7 @@ firmware_get(const char *imagename) /* * After attempting to load the module, see if the image is registered. */ - fp = lookup(imagename, NULL); + fp = lookup(imagename); if (fp == NULL) { mtx_unlock(&firmware_mtx); return NULL; @@ -381,7 +363,6 @@ set_rootvnode(void *arg, int npending) { pwd_ensure_dirs(); - free(arg, M_TEMP); } @@ -413,50 +394,39 @@ EVENTHANDLER_DEFINE(mountroot, firmware_mountroot, NUL static void unloadentry(void *unused1, int unused2) { - int limit = FIRMWARE_MAX; - int i; /* current cycle */ + struct priv_fw *fp, *tmp; + int err; + bool changed; mtx_lock(&firmware_mtx); - /* - * Scan the table. limit is set to make sure we make another - * full sweep after matching an entry that requires unloading. - */ - for (i = 0; i < limit; i++) { - struct priv_fw *fp; - int err; - - fp = &firmware_table[i % FIRMWARE_MAX]; - if (fp->fw.name == NULL || fp->file == NULL || - fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0) + changed = false; +restart: + LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) { + if (fp->file == NULL || fp->refcnt != 0 || + (fp->flags & FW_UNLOAD) == 0) continue; /* * Found an entry. Now: - * 1. bump up limit to make sure we make another full round; + * 1. make sure we scan the table again * 2. clear FW_UNLOAD so we don't try this entry again. * 3. release the lock while trying to unload the module. - * 'file' remains set so that the entry cannot be reused - * in the meantime (it also means that fp->file will - * not change while we release the lock). */ - limit = i + FIRMWARE_MAX; /* make another full round */ + changed = true; fp->flags &= ~FW_UNLOAD; /* do not try again */ - mtx_unlock(&firmware_mtx); - err = linker_release_module(NULL, NULL, fp->file); - mtx_lock(&firmware_mtx); - /* * We rely on the module to call firmware_unregister() - * on unload to actually release the entry. - * If err = 0 we can drop our reference as the system - * accepted it. Otherwise unloading failed (e.g. the - * module itself gave an error) so our reference is - * still valid. + * on unload to actually free the entry. */ - if (err == 0) - fp->file = NULL; + mtx_unlock(&firmware_mtx); + err = linker_release_module(NULL, NULL, fp->file); + mtx_lock(&firmware_mtx); } + if (changed) { + changed = false; + goto restart; + } mtx_unlock(&firmware_mtx); } @@ -467,8 +437,9 @@ static int firmware_modevent(module_t mod, int type, void *unused) { struct priv_fw *fp; - int i, err; + int err; + err = 0; switch (type) { case MOD_LOAD: TASK_INIT(&firmware_unload_task, 0, unloadentry, NULL); @@ -478,39 +449,39 @@ firmware_modevent(module_t mod, int type, void *unused (void) taskqueue_start_threads(&firmware_tq, 1, PWAIT, "firmware taskq"); if (rootvnode != NULL) { - /* + /* * Root is already mounted so we won't get an event; * simulate one here. */ firmware_mountroot(NULL); } - return 0; + break; case MOD_UNLOAD: /* request all autoloaded modules to be released */ mtx_lock(&firmware_mtx); - for (i = 0; i < FIRMWARE_MAX; i++) { - fp = &firmware_table[i]; + LIST_FOREACH(fp, &firmware_table, link) fp->flags |= FW_UNLOAD; - } mtx_unlock(&firmware_mtx); taskqueue_enqueue(firmware_tq, &firmware_unload_task); taskqueue_drain(firmware_tq, &firmware_unload_task); - err = 0; - for (i = 0; i < FIRMWARE_MAX; i++) { - fp = &firmware_table[i]; + + LIST_FOREACH(fp, &firmware_table, link) { if (fp->fw.name != NULL) { - printf("%s: image %p ref %d still active slot %d\n", - __func__, fp->fw.name, - fp->refcnt, i); + printf("%s: image %s still active, %d refs\n", + __func__, fp->fw.name, fp->refcnt); err = EINVAL; } } if (err == 0) taskqueue_free(firmware_tq); - return err; + break; + + default: + err = EOPNOTSUPP; + break; } - return EINVAL; + return (err); } static moduledata_t firmware_mod = { From owner-svn-src-stable-12@freebsd.org Wed Jun 17 21:51:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4C7033823B; Wed, 17 Jun 2020 21:51:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nJg85Nm3z4b8w; Wed, 17 Jun 2020 21:51:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B45A326AB9; Wed, 17 Jun 2020 21:51:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05HLpWTZ002722; Wed, 17 Jun 2020 21:51:32 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HLpWwq002721; Wed, 17 Jun 2020 21:51:32 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006172151.05HLpWwq002721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 17 Jun 2020 21:51:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362291 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 362291 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 21:51:32 -0000 Author: 0mp (doc,ports committer) Date: Wed Jun 17 21:51:32 2020 New Revision: 362291 URL: https://svnweb.freebsd.org/changeset/base/362291 Log: MFC 361920: Document that /lib is always in the list of shared library paths /lib was added to the list in r119011. Modified: stable/12/share/man/man5/rc.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/rc.conf.5 ============================================================================== --- stable/12/share/man/man5/rc.conf.5 Wed Jun 17 21:21:57 2020 (r362290) +++ stable/12/share/man/man5/rc.conf.5 Wed Jun 17 21:51:32 2020 (r362291) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2020 +.Dd June 8, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -3637,8 +3637,10 @@ related programs. Set to the list of shared library paths to use with .Xr ldconfig 8 . NOTE: +.Pa /lib +and .Pa /usr/lib -will always be added first, so it need not appear in this list. +will always be added first, so they need not appear in this list. .It Va ldconfig32_paths .Pq Vt str Set to the list of 32-bit compatibility shared library paths to From owner-svn-src-stable-12@freebsd.org Thu Jun 18 07:34:30 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC44C34769A; Thu, 18 Jun 2020 07:34:30 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nYbp44btz4FYZ; Thu, 18 Jun 2020 07:34:30 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 874542D72F; Thu, 18 Jun 2020 07:34:30 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05I7YU7N064881; Thu, 18 Jun 2020 07:34:30 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05I7YUPZ064880; Thu, 18 Jun 2020 07:34:30 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006180734.05I7YUPZ064880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 18 Jun 2020 07:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362296 - stable/12/usr.bin/mkimg X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.bin/mkimg X-SVN-Commit-Revision: 362296 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 07:34:30 -0000 Author: 0mp (doc,ports committer) Date: Thu Jun 18 07:34:30 2020 New Revision: 362296 URL: https://svnweb.freebsd.org/changeset/base/362296 Log: MFC 361940: Use Fl instead of Ar for long flags Also, bump date after r361935. Modified: stable/12/usr.bin/mkimg/mkimg.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/12/usr.bin/mkimg/mkimg.1 Thu Jun 18 06:21:00 2020 (r362295) +++ stable/12/usr.bin/mkimg/mkimg.1 Thu Jun 18 07:34:30 2020 (r362296) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd June 8, 2020 .Dt MKIMG 1 .Os .Sh NAME @@ -47,7 +47,7 @@ .Op Fl y .Op Fl s Ar scheme Op Fl p Ar partition ... .Nm -.Ar --formats | --schemes | --version +.Fl -formats | Fl -schemes | Fl -version .Sh DESCRIPTION The .Nm @@ -183,13 +183,13 @@ utility exits immediately after providing the requeste The version of the .Nm utility is printed when the -.Ar --version +.Fl -version option is given. The list of supported output formats is printed when the -.Ar --formats +.Fl -formats option is given and the list of supported partitioning schemes is printed when the -.Ar --schemes +.Fl -schemes option is given. Both the format and scheme lists a space-separated lists for easy handling in scripts. From owner-svn-src-stable-12@freebsd.org Thu Jun 18 08:33:37 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC9A6348F14; Thu, 18 Jun 2020 08:33:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nZw14XjJz4JpT; Thu, 18 Jun 2020 08:33:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9728D2E39D; Thu, 18 Jun 2020 08:33:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05I8XbsS001913; Thu, 18 Jun 2020 08:33:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05I8XbVb001911; Thu, 18 Jun 2020 08:33:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006180833.05I8XbVb001911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 18 Jun 2020 08:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362300 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 362300 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 08:33:37 -0000 Author: eugen Date: Thu Jun 18 08:33:36 2020 New Revision: 362300 URL: https://svnweb.freebsd.org/changeset/base/362300 Log: MFC r361790: ifconfig(8): make it possible to filter output by interface group. Modified: stable/12/sbin/ifconfig/ifconfig.8 stable/12/sbin/ifconfig/ifconfig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Thu Jun 18 08:31:04 2020 (r362299) +++ stable/12/sbin/ifconfig/ifconfig.8 Thu Jun 18 08:33:36 2020 (r362300) @@ -56,6 +56,7 @@ .Fl a .Op Fl L .Op Fl d +.Op Fl [gG] Ar groupname .Op Fl m .Op Fl u .Op Fl v @@ -2859,9 +2860,26 @@ This flag instructs to display information about all interfaces in the system. The .Fl d -flag limits this to interfaces that are down, and +flag limits this to interfaces that are down, .Fl u -limits this to interfaces that are up. +limits this to interfaces that are up, +limits this to interfaces that are up, +.Fl g +limits this to members of the specified group of interfaces, and +.Fl G +excludes members of the specified group from the list. +Both +.Fl g +and +.Fl G +flags may be specified to apply both conditions. +Only one option +.Fl g +should be specified as later override previous ones +(same for +.Fl G ) . +.Sy groupname +may contain shell patterns in which case it should be quoted. When no arguments are given, .Fl a is implied. @@ -2985,6 +3003,9 @@ Display available wireless networks using .Pp Display inet and inet6 address subnet masks in CIDR notation .Dl # ifconfig -f inet:cidr,inet6:cidr +.Pp +Display interfaces that are up with the exception of loopback +.Dl # ifconfig -a -u -G lo .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and Modified: stable/12/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.c Thu Jun 18 08:31:04 2020 (r362299) +++ stable/12/sbin/ifconfig/ifconfig.c Thu Jun 18 08:33:36 2020 (r362300) @@ -63,6 +63,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -105,6 +106,8 @@ int exit_code = 0; /* Formatter Strings */ char *f_inet, *f_inet6, *f_ether, *f_addr; +static bool group_member(const char *ifname, const char *match, + const char *nomatch); static int ifconfig(int argc, char *const *argv, int iscreate, const struct afswtch *afp); static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, @@ -402,13 +405,14 @@ main(int argc, char *argv[]) char options[1024], *cp, *envformat, *namecp = NULL; struct ifa_queue q = TAILQ_HEAD_INITIALIZER(q); struct ifa_order_elt *cur, *tmp; - const char *ifname; + const char *ifname, *matchgroup, *nogroup; struct option *p; size_t iflen; int flags; all = downonly = uponly = namesonly = noload = verbose = 0; f_inet = f_inet6 = f_ether = f_addr = NULL; + matchgroup = nogroup = NULL; envformat = getenv("IFCONFIG_FORMAT"); if (envformat != NULL) @@ -421,7 +425,7 @@ main(int argc, char *argv[]) atexit(printifnamemaybe); /* Parse leading line options */ - strlcpy(options, "f:adklmnuv", sizeof(options)); + strlcpy(options, "G:adf:klmnuv", sizeof(options)); for (p = opts; p != NULL; p = p->next) strlcat(options, p->opt, sizeof(options)); while ((c = getopt(argc, argv, options)) != -1) { @@ -437,6 +441,11 @@ main(int argc, char *argv[]) usage(); setformat(optarg); break; + case 'G': + if (optarg == NULL || all == 0) + usage(); + nogroup = optarg; + break; case 'k': printkeys++; break; @@ -455,6 +464,14 @@ main(int argc, char *argv[]) case 'v': verbose++; break; + case 'g': + if (all) { + if (optarg == NULL) + usage(); + matchgroup = optarg; + break; + } + /* FALLTHROUGH */ default: for (p = opts; p != NULL; p = p->next) if (p->opt[0] == c) { @@ -626,6 +643,8 @@ main(int argc, char *argv[]) continue; if (uponly && (ifa->ifa_flags & IFF_UP) == 0) continue; + if (!group_member(ifa->ifa_name, matchgroup, nogroup)) + continue; /* * Are we just listing the interfaces? */ @@ -668,6 +687,73 @@ main(int argc, char *argv[]) done: freeformat(); exit(exit_code); +} + +/* + * Returns true if an interface should be listed because any its groups + * matches shell pattern "match" and none of groups matches pattern "nomatch". + * If any pattern is NULL, corresponding condition is skipped. + */ +static bool +group_member(const char *ifname, const char *match, const char *nomatch) +{ + static int sock = -1; + + struct ifgroupreq ifgr; + struct ifg_req *ifg; + int len; + bool matched, nomatched; + + /* Sanity checks. */ + if (match == NULL && nomatch == NULL) + return (true); + if (ifname == NULL) + return (false); + + memset(&ifgr, 0, sizeof(ifgr)); + strlcpy(ifgr.ifgr_name, ifname, IFNAMSIZ); + + /* The socket is opened once. Let _exit() close it. */ + if (sock == -1) { + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (sock == -1) + errx(1, "%s: socket(AF_LOCAL,SOCK_DGRAM)", __func__); + } + + /* Determine amount of memory for the list of groups. */ + if (ioctl(sock, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) { + if (errno == EINVAL || errno == ENOTTY) + return (false); + else + errx(1, "%s: SIOCGIFGROUP", __func__); + } + + /* Obtain the list of groups. */ + len = ifgr.ifgr_len; + ifgr.ifgr_groups = + (struct ifg_req *)calloc(len / sizeof(*ifg), sizeof(*ifg)); + + if (ifgr.ifgr_groups == NULL) + errx(1, "%s: no memory", __func__); + if (ioctl(sock, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) + errx(1, "%s: SIOCGIFGROUP", __func__); + + /* Perform matching. */ + matched = false; + nomatched = true; + for (ifg = ifgr.ifgr_groups; ifg && len >= sizeof(*ifg); ifg++) { + len -= sizeof(struct ifg_req); + if (match) + matched |= !fnmatch(match, ifg->ifgrq_group, 0); + if (nomatch) + nomatched &= fnmatch(nomatch, ifg->ifgrq_group, 0); + } + + if (match && !nomatch) + return (matched); + if (!match && nomatch) + return (nomatched); + return (matched && nomatched); } static struct afswtch *afs = NULL; From owner-svn-src-stable-12@freebsd.org Thu Jun 18 08:37:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E781348CF2; Thu, 18 Jun 2020 08:37:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nb110SBZz4KFm; Thu, 18 Jun 2020 08:37:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AD392E040; Thu, 18 Jun 2020 08:37:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05I8buEM002213; Thu, 18 Jun 2020 08:37:56 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05I8buxA002212; Thu, 18 Jun 2020 08:37:56 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006180837.05I8buxA002212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 18 Jun 2020 08:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362302 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 362302 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 08:37:57 -0000 Author: eugen Date: Thu Jun 18 08:37:56 2020 New Revision: 362302 URL: https://svnweb.freebsd.org/changeset/base/362302 Log: MFC r361789: ipfw: unbreak matching with big table type flow. Modified: stable/12/sys/netpfil/ipfw/ip_fw_table_algo.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Jun 18 08:35:51 2020 (r362301) +++ stable/12/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Jun 18 08:37:56 2020 (r362302) @@ -3204,7 +3204,8 @@ ta_lookup_fhash(struct table_info *ti, void *key, uint struct fhashentry *ent; struct fhashentry4 *m4; struct ipfw_flow_id *id; - uint16_t hash, hsize; + uint32_t hsize; + uint16_t hash; id = (struct ipfw_flow_id *)key; head = (struct fhashbhead *)ti->state; From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:03:18 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBB3834AA69; Thu, 18 Jun 2020 10:03:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ncvV4Th3z4R6R; Thu, 18 Jun 2020 10:03:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94FAF2F5E2; Thu, 18 Jun 2020 10:03:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IA3IKY057015; Thu, 18 Jun 2020 10:03:18 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IA3I2n057013; Thu, 18 Jun 2020 10:03:18 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006181003.05IA3I2n057013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 18 Jun 2020 10:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362304 - in stable/12/sys/dev: netmap virtio/network X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys/dev: netmap virtio/network X-SVN-Commit-Revision: 362304 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:03:18 -0000 Author: vmaffione Date: Thu Jun 18 10:03:17 2020 New Revision: 362304 URL: https://svnweb.freebsd.org/changeset/base/362304 Log: MFC r362076 netmap: introduce netmap_kring_on() This function returns NULL if the ring identified by queue id and direction is in netmap mode. Otherwise return the corresponding kring. Use this function to replace vtnet_netmap_queue_on(). Modified: stable/12/sys/dev/netmap/if_vtnet_netmap.h stable/12/sys/dev/netmap/netmap_kern.h stable/12/sys/dev/virtio/network/if_vtnet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- stable/12/sys/dev/netmap/if_vtnet_netmap.h Thu Jun 18 08:38:54 2020 (r362303) +++ stable/12/sys/dev/netmap/if_vtnet_netmap.h Thu Jun 18 10:03:17 2020 (r362304) @@ -33,25 +33,6 @@ #include /* vtophys ? */ #include -/* - * Return 1 if the queue identified by 't' and 'idx' is in netmap mode. - */ -static int -vtnet_netmap_queue_on(struct vtnet_softc *sc, enum txrx t, int idx) -{ - struct netmap_adapter *na = NA(sc->vtnet_ifp); - - if (!nm_native_on(na)) - return 0; - - if (t == NR_RX) - return !!(idx < na->num_rx_rings && - na->rx_rings[idx]->nr_mode == NKR_NETMAP_ON); - - return !!(idx < na->num_tx_rings && - na->tx_rings[idx]->nr_mode == NKR_NETMAP_ON); -} - /* Register and unregister. */ static int vtnet_netmap_reg(struct netmap_adapter *na, int state) Modified: stable/12/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_kern.h Thu Jun 18 08:38:54 2020 (r362303) +++ stable/12/sys/dev/netmap/netmap_kern.h Thu Jun 18 10:03:17 2020 (r362304) @@ -1353,6 +1353,24 @@ nm_native_on(struct netmap_adapter *na) return nm_netmap_on(na) && (na->na_flags & NAF_NATIVE); } +static inline struct netmap_kring * +netmap_kring_on(struct netmap_adapter *na, u_int q, enum txrx t) +{ + struct netmap_kring *kring = NULL; + + if (!nm_native_on(na)) + return NULL; + + if (t == NR_RX && q < na->num_rx_rings) + kring = na->rx_rings[q]; + else if (t == NR_TX && q < na->num_tx_rings) + kring = na->tx_rings[q]; + else + return NULL; + + return (kring->nr_mode == NKR_NETMAP_ON) ? kring : NULL; +} + static inline int nm_iszombie(struct netmap_adapter *na) { Modified: stable/12/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/12/sys/dev/virtio/network/if_vtnet.c Thu Jun 18 08:38:54 2020 (r362303) +++ stable/12/sys/dev/virtio/network/if_vtnet.c Thu Jun 18 10:03:17 2020 (r362304) @@ -1227,17 +1227,17 @@ vtnet_rxq_free_mbufs(struct vtnet_rxq *rxq) struct mbuf *m; int last; #ifdef DEV_NETMAP - int netmap_bufs = vtnet_netmap_queue_on(rxq->vtnrx_sc, NR_RX, - rxq->vtnrx_id); + struct netmap_kring *kring = netmap_kring_on(NA(rxq->vtnrx_sc->vtnet_ifp), + rxq->vtnrx_id, NR_RX); #else /* !DEV_NETMAP */ - int netmap_bufs = 0; + void *kring = NULL; #endif /* !DEV_NETMAP */ vq = rxq->vtnrx_vq; last = 0; while ((m = virtqueue_drain(vq, &last)) != NULL) { - if (!netmap_bufs) + if (kring == NULL) m_freem(m); } @@ -2007,17 +2007,17 @@ vtnet_txq_free_mbufs(struct vtnet_txq *txq) struct vtnet_tx_header *txhdr; int last; #ifdef DEV_NETMAP - int netmap_bufs = vtnet_netmap_queue_on(txq->vtntx_sc, NR_TX, - txq->vtntx_id); + struct netmap_kring *kring = netmap_kring_on(NA(txq->vtntx_sc->vtnet_ifp), + txq->vtntx_id, NR_TX); #else /* !DEV_NETMAP */ - int netmap_bufs = 0; + void *kring = NULL; #endif /* !DEV_NETMAP */ vq = txq->vtntx_vq; last = 0; while ((txhdr = virtqueue_drain(vq, &last)) != NULL) { - if (!netmap_bufs) { + if (kring == NULL) { m_freem(txhdr->vth_mbuf); uma_zfree(vtnet_tx_header_zone, txhdr); } From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:08:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B83F34A9F6; Thu, 18 Jun 2020 10:08:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nd1k0Kppz4R9p; Thu, 18 Jun 2020 10:08:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E20F92F5EB; Thu, 18 Jun 2020 10:08:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IA8fhl057316; Thu, 18 Jun 2020 10:08:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IA8fac057315; Thu, 18 Jun 2020 10:08:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181008.05IA8fac057315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362305 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362305 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:08:42 -0000 Author: hselasky Date: Thu Jun 18 10:08:41 2020 New Revision: 362305 URL: https://svnweb.freebsd.org/changeset/base/362305 Log: MFC r362043: Use const keyword when parsing the TCP/IP header in the fast path in mlx5en(4). When parsing the TCP/IP header in the fast path, make it clear by using the const keyword, no fields are to be modified inside the transmitted packet. No functional change. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:03:17 2020 (r362304) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:08:41 2020 (r362305) @@ -214,18 +214,26 @@ max_inline: return (MIN(mb->m_pkthdr.len, sq->max_inline)); } +/* + * This function parse IPv4 and IPv6 packets looking for TCP and UDP + * headers. + * + * The return value indicates the number of bytes from the beginning + * of the packet until the first byte after the TCP or UDP header. If + * this function returns zero, the parsing failed. + */ static int -mlx5e_get_full_header_size(struct mbuf *mb) +mlx5e_get_full_header_size(const struct mbuf *mb) { - struct ether_vlan_header *eh; - struct tcphdr *th; - struct ip *ip; + const struct ether_vlan_header *eh; + const struct tcphdr *th; + const struct ip *ip; int ip_hlen, tcp_hlen; - struct ip6_hdr *ip6; + const struct ip6_hdr *ip6; uint16_t eth_type; int eth_hdr_len; - eh = mtod(mb, struct ether_vlan_header *); + eh = mtod(mb, const struct ether_vlan_header *); if (mb->m_len < ETHER_HDR_LEN) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { @@ -239,7 +247,7 @@ mlx5e_get_full_header_size(struct mbuf *mb) } switch (eth_type) { case ETHERTYPE_IP: - ip = (struct ip *)(mb->m_data + eth_hdr_len); + ip = (const struct ip *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip)) return (0); switch (ip->ip_p) { @@ -256,7 +264,7 @@ mlx5e_get_full_header_size(struct mbuf *mb) } break; case ETHERTYPE_IPV6: - ip6 = (struct ip6_hdr *)(mb->m_data + eth_hdr_len); + ip6 = (const struct ip6_hdr *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip6)) return (0); switch (ip6->ip6_nxt) { @@ -275,7 +283,7 @@ mlx5e_get_full_header_size(struct mbuf *mb) } if (mb->m_len < eth_hdr_len + sizeof(*th)) return (0); - th = (struct tcphdr *)(mb->m_data + eth_hdr_len); + th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; done: From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:19:37 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9987934B1ED; Thu, 18 Jun 2020 10:19:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndGK3Y4tz4S3c; Thu, 18 Jun 2020 10:19:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7509C2FF85; Thu, 18 Jun 2020 10:19:37 +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 05IAJb6Q063425; Thu, 18 Jun 2020 10:19:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAJbtv063424; Thu, 18 Jun 2020 10:19:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181019.05IAJbtv063424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362308 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362308 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:19:37 -0000 Author: hselasky Date: Thu Jun 18 10:19:37 2020 New Revision: 362308 URL: https://svnweb.freebsd.org/changeset/base/362308 Log: MFC r362044: Extend use of unlikely() in the fast path, in mlx5en(4). Typically the TCP/IP headers fit within the first mbuf and should not trigger any of the error cases. Use unlikely() for these cases. No functional change. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:17:36 2020 (r362307) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:19:37 2020 (r362308) @@ -234,10 +234,10 @@ mlx5e_get_full_header_size(const struct mbuf *mb) int eth_hdr_len; eh = mtod(mb, const struct ether_vlan_header *); - if (mb->m_len < ETHER_HDR_LEN) + if (unlikely(mb->m_len < ETHER_HDR_LEN)) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { - if (mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)) + if (unlikely(mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN))) return (0); eth_type = ntohs(eh->evl_proto); eth_hdr_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; @@ -248,7 +248,7 @@ mlx5e_get_full_header_size(const struct mbuf *mb) switch (eth_type) { case ETHERTYPE_IP: ip = (const struct ip *)(mb->m_data + eth_hdr_len); - if (mb->m_len < eth_hdr_len + sizeof(*ip)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip))) return (0); switch (ip->ip_p) { case IPPROTO_TCP: @@ -265,7 +265,7 @@ mlx5e_get_full_header_size(const struct mbuf *mb) break; case ETHERTYPE_IPV6: ip6 = (const struct ip6_hdr *)(mb->m_data + eth_hdr_len); - if (mb->m_len < eth_hdr_len + sizeof(*ip6)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip6))) return (0); switch (ip6->ip6_nxt) { case IPPROTO_TCP: @@ -281,7 +281,7 @@ mlx5e_get_full_header_size(const struct mbuf *mb) default: return (0); } - if (mb->m_len < eth_hdr_len + sizeof(*th)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) return (0); th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; @@ -292,7 +292,7 @@ done: * does not need to reside within the first m_len bytes of * data: */ - if (mb->m_pkthdr.len < eth_hdr_len) + if (unlikely(mb->m_pkthdr.len < eth_hdr_len)) return (0); return (eth_hdr_len); } From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:38:03 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3CCC34B844; Thu, 18 Jun 2020 10:38:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndgZ6CGFz4TJs; Thu, 18 Jun 2020 10:38:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D03378525; Thu, 18 Jun 2020 10:38:02 +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 05IAc2IE075665; Thu, 18 Jun 2020 10:38:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAc2Hm075664; Thu, 18 Jun 2020 10:38:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181038.05IAc2Hm075664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362311 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362311 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:38:03 -0000 Author: hselasky Date: Thu Jun 18 10:38:02 2020 New Revision: 362311 URL: https://svnweb.freebsd.org/changeset/base/362311 Log: MFC r362045: Make sure packets generated by raw IP code is let through by mlx5en(4). Allow the TCP header to reside in the mbuf following the IP header. Else such packets will get dropped. Backtrace: mlx5e_sq_xmit() mlx5e_xmit() ether_output_frame() ether_output() ip_output_send() ip_output() rip_output() sosend_generic() sosend() kern_sendit() sendit() sys_sendto() amd64_syscall() fast_syscall_common() Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:31:21 2020 (r362310) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:38:02 2020 (r362311) @@ -281,9 +281,15 @@ mlx5e_get_full_header_size(const struct mbuf *mb) default: return (0); } - if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) - return (0); - th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) { + const struct mbuf *m_th = mb->m_next; + if (unlikely(mb->m_len != eth_hdr_len || + m_th == NULL || m_th->m_len < sizeof(*th))) + return (0); + th = (const struct tcphdr *)(m_th->m_data); + } else { + th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); + } tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; done: From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:45:31 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F22A34C09A; Thu, 18 Jun 2020 10:45:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndrC2mmsz4Tyt; Thu, 18 Jun 2020 10:45:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59F7F2FF67; Thu, 18 Jun 2020 10:45:31 +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 05IAjVg0081896; Thu, 18 Jun 2020 10:45:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAjV5O081895; Thu, 18 Jun 2020 10:45:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181045.05IAjV5O081895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362314 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362314 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:45:31 -0000 Author: hselasky Date: Thu Jun 18 10:45:30 2020 New Revision: 362314 URL: https://svnweb.freebsd.org/changeset/base/362314 Log: MFC r361722: Implement BUILD_BUG_ON_ZERO() in the LinuxKPI. Tested using gcc and clang. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:41:51 2020 (r362313) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:45:30 2020 (r362314) @@ -94,6 +94,9 @@ #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) #define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); } +extern const volatile int lkpi_build_bug_on_zero; +#define BUILD_BUG_ON_ZERO(x) ((x) ? lkpi_build_bug_on_zero : 0) + #define BUG() panic("BUG at %s:%d", __FILE__, __LINE__) #define BUG_ON(cond) do { \ if (cond) { \ From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:46:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3C0834C120; Thu, 18 Jun 2020 10:46:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndst3xNvz4VDB; Thu, 18 Jun 2020 10:46:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 826C482B5; Thu, 18 Jun 2020 10:46:58 +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 05IAkwII082080; Thu, 18 Jun 2020 10:46:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAkwCo082079; Thu, 18 Jun 2020 10:46:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181046.05IAkwCo082079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362316 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362316 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:46:58 -0000 Author: hselasky Date: Thu Jun 18 10:46:58 2020 New Revision: 362316 URL: https://svnweb.freebsd.org/changeset/base/362316 Log: MFC r361723: Implement struct_size() function macro in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:46:05 2020 (r362315) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:46:58 2020 (r362316) @@ -534,4 +534,10 @@ linux_ratelimited(linux_ratelimit_t *rl) return (ppsratecheck(&rl->lasttime, &rl->counter, 1)); } +#define struct_size(ptr, field, num) ({ \ + const size_t __size = offsetof(__typeof(*(ptr)), field); \ + const size_t __max = (SIZE_MAX - __size) / sizeof((ptr)->field[0]); \ + ((num) > __max) ? SIZE_MAX : (__size + sizeof((ptr)->field[0]) * (num)); \ +}) + #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:49:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB6AA34C07F; Thu, 18 Jun 2020 10:49:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndx94bCNz4Vhc; Thu, 18 Jun 2020 10:49:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98C4686B6; Thu, 18 Jun 2020 10:49:49 +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 05IAnnIX082381; Thu, 18 Jun 2020 10:49:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAnnPq082380; Thu, 18 Jun 2020 10:49:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181049.05IAnnPq082380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362319 - in stable/12/sys: compat/linuxkpi/common/include/linux sys X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/include/linux sys X-SVN-Commit-Revision: 362319 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:49:49 -0000 Author: hselasky Date: Thu Jun 18 10:49:49 2020 New Revision: 362319 URL: https://svnweb.freebsd.org/changeset/base/362319 Log: MFC r361724: Implement __is_constexpr() function macro in the LinuxKPI. Bump the FreeBSD version. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:48:37 2020 (r362318) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Jun 18 10:49:49 2020 (r362319) @@ -540,4 +540,7 @@ linux_ratelimited(linux_ratelimit_t *rl) ((num) > __max) ? SIZE_MAX : (__size + sizeof((ptr)->field[0]) * (num)); \ }) +#define __is_constexpr(x) \ + __builtin_constant_p(x) + #endif /* _LINUX_KERNEL_H_ */ Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Thu Jun 18 10:48:37 2020 (r362318) +++ stable/12/sys/sys/param.h Thu Jun 18 10:49:49 2020 (r362319) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1201517 /* Master, propagated to newvers */ +#define __FreeBSD_version 1201518 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-12@freebsd.org Thu Jun 18 10:53:41 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7387234C373; Thu, 18 Jun 2020 10:53:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nf1d2XQcz4WD8; Thu, 18 Jun 2020 10:53:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5252F8746; Thu, 18 Jun 2020 10:53:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IArfjm088410; Thu, 18 Jun 2020 10:53:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IArf8X088409; Thu, 18 Jun 2020 10:53:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181053.05IArf8X088409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362322 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362322 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 10:53:41 -0000 Author: hselasky Date: Thu Jun 18 10:53:40 2020 New Revision: 362322 URL: https://svnweb.freebsd.org/changeset/base/362322 Log: MFC r361828: Ensure pci_channel_offline() actually queries the PCI register space, and not only the software cache of that register. Else pci_channel_offline() won't detect that the PCI device is gone when using the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:52:51 2020 (r362321) +++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:53:40 2020 (r362322) @@ -648,7 +648,7 @@ static inline int pci_channel_offline(struct pci_dev *pdev) { - return (pci_get_vendor(pdev->dev.bsddev) == PCIV_INVALID); + return (pci_read_config(pdev->dev.bsddev, PCIR_VENDOR, 2) == PCIV_INVALID); } static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) From owner-svn-src-stable-12@freebsd.org Thu Jun 18 15:15:08 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECB41353213; Thu, 18 Jun 2020 15:15:06 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nlqF443lz4qcl; Thu, 18 Jun 2020 15:15:05 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DDF4B7F9; Thu, 18 Jun 2020 15:15:05 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IFF5iV048731; Thu, 18 Jun 2020 15:15:05 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IFF4m1048727; Thu, 18 Jun 2020 15:15:04 GMT (envelope-from royger@FreeBSD.org) Message-Id: <202006181515.05IFF4m1048727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 18 Jun 2020 15:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362329 - in stable/12/sys: dev/xen/console dev/xen/control dev/xen/evtchn x86/xen X-SVN-Group: stable-12 X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in stable/12/sys: dev/xen/console dev/xen/control dev/xen/evtchn x86/xen X-SVN-Commit-Revision: 362329 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 15:15:09 -0000 Author: royger Date: Thu Jun 18 15:15:04 2020 New Revision: 362329 URL: https://svnweb.freebsd.org/changeset/base/362329 Log: MFC r352925: xen/ctrl: acknowledge all control requests MFC r357616: xen/console: fix priority of Xen console MFC r361274: dev/xenstore: fix return with locks held Note this should be dev/evtchn not dev/xenstore. MFC r361578: xenpv: do not use low 1MB for Xen mappings on i386 MFC r361580: xen/control: short circuit xctrl_on_watch_event on spurious event Those are all Xen related fixes or minor improvements that have been sitting on current for a reasonable time without complaints. Sponsored by: Citrix Systems R&D Modified: stable/12/sys/dev/xen/console/xen_console.c stable/12/sys/dev/xen/control/control.c stable/12/sys/dev/xen/evtchn/evtchn_dev.c stable/12/sys/x86/xen/xenpv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/xen/console/xen_console.c ============================================================================== --- stable/12/sys/dev/xen/console/xen_console.c Thu Jun 18 15:14:10 2020 (r362328) +++ stable/12/sys/dev/xen/console/xen_console.c Thu Jun 18 15:15:04 2020 (r362329) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -589,7 +590,7 @@ xencons_cnprobe(struct consdev *cp) if (!xen_domain()) return; - cp->cn_pri = CN_REMOTE; + cp->cn_pri = (boothowto & RB_SERIAL) ? CN_REMOTE : CN_NORMAL; sprintf(cp->cn_name, "%s0", driver_name); } Modified: stable/12/sys/dev/xen/control/control.c ============================================================================== --- stable/12/sys/dev/xen/control/control.c Thu Jun 18 15:14:10 2020 (r362328) +++ stable/12/sys/dev/xen/control/control.c Thu Jun 18 15:15:04 2020 (r362329) @@ -221,12 +221,6 @@ xctrl_suspend() KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); /* - * Clear our XenStore node so the toolstack knows we are - * responding to the suspend request. - */ - xs_write(XST_NIL, "control", "shutdown", ""); - - /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE * drivers need this. */ @@ -366,8 +360,13 @@ xctrl_on_watch_event(struct xs_watch *watch, const cha error = xs_read(XST_NIL, "control", "shutdown", &result_len, (void **)&result); - if (error != 0) + if (error != 0 || result_len == 0) return; + + /* Acknowledge the request by writing back an empty string. */ + error = xs_write(XST_NIL, "control", "shutdown", ""); + if (error != 0) + printf("unable to ack shutdown request, proceeding anyway\n"); reason = xctrl_shutdown_reasons; last_reason = reason + nitems(xctrl_shutdown_reasons); Modified: stable/12/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- stable/12/sys/dev/xen/evtchn/evtchn_dev.c Thu Jun 18 15:14:10 2020 (r362328) +++ stable/12/sys/dev/xen/evtchn/evtchn_dev.c Thu Jun 18 15:15:04 2020 (r362329) @@ -261,9 +261,10 @@ evtchn_read(struct cdev *dev, struct uio *uio, int iof sx_xlock(&u->ring_cons_mutex); for (;;) { - error = EFBIG; - if (u->ring_overflow) + if (u->ring_overflow) { + error = EFBIG; goto unlock_out; + } c = u->ring_cons; p = u->ring_prod; @@ -271,13 +272,13 @@ evtchn_read(struct cdev *dev, struct uio *uio, int iof break; if (ioflag & IO_NDELAY) { - sx_xunlock(&u->ring_cons_mutex); - return (EWOULDBLOCK); + error = EWOULDBLOCK; + goto unlock_out; } error = sx_sleep(u, &u->ring_cons_mutex, PCATCH, "evtchw", 0); if ((error != 0) && (error != EWOULDBLOCK)) - return (error); + goto unlock_out; } /* Byte lengths of two chunks. Chunk split (if any) is at ring wrap. */ Modified: stable/12/sys/x86/xen/xenpv.c ============================================================================== --- stable/12/sys/x86/xen/xenpv.c Thu Jun 18 15:14:10 2020 (r362328) +++ stable/12/sys/x86/xen/xenpv.c Thu Jun 18 15:15:04 2020 (r362329) @@ -54,12 +54,14 @@ __FBSDID("$FreeBSD$"); * prevent clashes with MMIO/ACPI regions. * * Since this is not possible on i386 just use any available memory - * chunk and hope we don't clash with anything else. + * chunk above 1MB and hope we don't clash with anything else. */ #ifdef __amd64__ #define LOW_MEM_LIMIT 0x100000000ul +#elif defined(__i386__) +#define LOW_MEM_LIMIT 0x100000ul #else -#define LOW_MEM_LIMIT 0 +#error "Unsupported architecture" #endif static devclass_t xenpv_devclass; From owner-svn-src-stable-12@freebsd.org Thu Jun 18 20:23:47 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38DD23328F8; Thu, 18 Jun 2020 20:23:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ntgR0p7Nz41dk; Thu, 18 Jun 2020 20:23:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16A36F993; Thu, 18 Jun 2020 20:23:47 +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 05IKNkug041821; Thu, 18 Jun 2020 20:23:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IKNk6A041820; Thu, 18 Jun 2020 20:23:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006182023.05IKNk6A041820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 18 Jun 2020 20:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362339 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362339 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 20:23:47 -0000 Author: mav Date: Thu Jun 18 20:23:46 2020 New Revision: 362339 URL: https://svnweb.freebsd.org/changeset/base/362339 Log: MFC r360503 (by imp): Move / reword a comment. Explain what we're doing with mapping CAM's notion of a LUN to NVMe's notion of a namespace. Modified: stable/12/sys/dev/nvme/nvme_sim.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_sim.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_sim.c Thu Jun 18 19:32:34 2020 (r362338) +++ stable/12/sys/dev/nvme/nvme_sim.c Thu Jun 18 20:23:46 2020 (r362339) @@ -172,12 +172,6 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) struct ccb_pathinq *cpi = &ccb->cpi; device_t dev = ctrlr->dev; - /* - * NVMe may have multiple LUNs on the same path. Current generation - * of NVMe devives support only a single name space. Multiple name - * space drives are coming, but it's unclear how we should report - * them up the stack. - */ cpi->version_num = 1; cpi->hba_inquiry = 0; cpi->target_sprt = 0; @@ -330,13 +324,17 @@ nvme_sim_new_ns(struct nvme_namespace *ns, void *sc_ar return (NULL); } + /* + * We map the NVMe namespace idea onto the CAM unit LUN. For + * each new namespace, we create a new CAM path for it. We then + * rescan the path to get it to enumerate. + */ if (xpt_create_path(&ccb->ccb_h.path, /*periph*/NULL, cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { printf("unable to create path for rescan\n"); xpt_free_ccb(ccb); return (NULL); } - xpt_rescan(ccb); return (ns); From owner-svn-src-stable-12@freebsd.org Thu Jun 18 20:25:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFABB332837; Thu, 18 Jun 2020 20:25:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ntjf5g6Bz41dJ; Thu, 18 Jun 2020 20:25:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD48EF8AF; Thu, 18 Jun 2020 20:25:42 +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 05IKPgYY042037; Thu, 18 Jun 2020 20:25:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IKPgFT042036; Thu, 18 Jun 2020 20:25:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006182025.05IKPgFT042036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 18 Jun 2020 20:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362340 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362340 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 20:25:42 -0000 Author: mav Date: Thu Jun 18 20:25:42 2020 New Revision: 362340 URL: https://svnweb.freebsd.org/changeset/base/362340 Log: MFC r360504 (by imp): Style(9) nit: put function name at start of line. Modified: stable/12/sys/dev/nvme/nvme_ns.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ns.c Thu Jun 18 20:23:46 2020 (r362339) +++ stable/12/sys/dev/nvme/nvme_ns.c Thu Jun 18 20:25:42 2020 (r362340) @@ -618,7 +618,8 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t return (0); } -void nvme_ns_destruct(struct nvme_namespace *ns) +void +nvme_ns_destruct(struct nvme_namespace *ns) { if (ns->cdev != NULL) From owner-svn-src-stable-12@freebsd.org Thu Jun 18 21:44:51 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDF08334ED9; Thu, 18 Jun 2020 21:44:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nwSz4sVTz474D; Thu, 18 Jun 2020 21:44:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1B111090E; Thu, 18 Jun 2020 21:44:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ILipeG091989; Thu, 18 Jun 2020 21:44:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ILinnB091978; Thu, 18 Jun 2020 21:44:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006182144.05ILinnB091978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 Jun 2020 21:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362344 - in stable/12/sys: arm/amlogic/aml8726 arm64/conf conf dev/mmc/host mips/ingenic X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/amlogic/aml8726 arm64/conf conf dev/mmc/host mips/ingenic X-SVN-Commit-Revision: 362344 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 21:44:51 -0000 Author: manu Date: Thu Jun 18 21:44:49 2020 New Revision: 362344 URL: https://svnweb.freebsd.org/changeset/base/362344 Log: MFC r349584, r349728, r349731, r350440, r350443, r351185, r353493, r353575, r355625, r355627, r355629, r356813 r349584: Since r349571 we need all the accessor to be present for set or get otherwise we panic. dwmmc don't handle VCCQ (voltage for the IO line of the SD/eMMC) or TIMING. Add the needed accessor in the {read,write}_ivar functions. Reviewed by: imp (previous version) r349728 by imp: Implement missing MMCBR ivars All MMCBR bridges have to implement all the MMCBR variables. This implements them for everybody that currently doesn't. A common routine for this should be written. r349731 by imp: Fix cut-and-pasto that slipped through my testing. r350440 by br: Add support for the SD/MMC controller found in Terasic DE10-Pro (an Intel Stratix 10 GX/SX FPGA Development Kit). Set the bus speed manually due to lack of clock management support. Sponsored by: DARPA, AFRL r350443 by br: Fix MMCCAM kernel build. Sponsored by: DARPA, AFRL r351185 by mmel: Enhance support of extres in dwmmc driver. Handle all clocks, regulators and resets defined by dwmmc bindings. r353493 by br: Fix the driver attachment in cases when the external resource devices (resets, regulators, clocks) are not available. Rely on a system initialization done by a bootloader in that cases. This fixes operation on Terasic DE10-Pro (an Intel Stratix 10 development kit). Sponsored by: DARPA, AFRL r353575 by br: Fix dwmmc(4) driver attachment when ext_resources are not present. Ignore only ENOENT (no DTS properties found) and ENODEV (driver not present) non-zero return values from ext_resources. Reviewed by: manu Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22043 r355625: dwmmc: Add a detach method This method will disable the regulators, clocks and assert the reset of the module. It will also detach it's children (the mmc device) and release it's resources. While here enable the regulators on attach as we need them to power up the sdcard or emmc. r355627: dwmmc: Handle the card detect interrupt The driver used to always add the mmc device as it's child even it no card was detected. Add a function that will detect if the card is present or not and that will attach/detach the mmc device. The function is either call on attach (as we won't have the interrupt fired) or from two taskqueues. The first taskqueue will directly call the function when the sdcard was present and is now removed and the other one will delay a bit the attach when we didn't had a card and now have one. This is mostly based on comments from the sdhci driver where it describe a situation when the CD pin is detected before the others pins are connected. r355629: dwmmc: Use device_delete_children Instead of first detaching the children(s) and then delete them, use the device_delete_children function that does all of that. Suggested by: ian r356813: dwmmc: Remove max_hz from the softc We never use it so directly set the value to the mmc host structure. Modified: stable/12/sys/arm/amlogic/aml8726/aml8726_mmc.c stable/12/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c stable/12/sys/arm64/conf/GENERIC stable/12/sys/conf/files.arm64 stable/12/sys/dev/mmc/host/dwmmc.c stable/12/sys/dev/mmc/host/dwmmc_altera.c stable/12/sys/dev/mmc/host/dwmmc_hisi.c stable/12/sys/dev/mmc/host/dwmmc_rockchip.c stable/12/sys/dev/mmc/host/dwmmc_samsung.c stable/12/sys/dev/mmc/host/dwmmc_var.h stable/12/sys/mips/ingenic/jz4780_mmc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- stable/12/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu Jun 18 21:44:49 2020 (r362344) @@ -965,15 +965,26 @@ aml8726_mmc_read_ivar(device_t bus, device_t child, case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->sc_host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->sc_host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = AML_MMC_MAX_DMA / MMC_SECTOR_SIZE; break; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ + break; default: return (EINVAL); } @@ -1011,6 +1022,12 @@ aml8726_mmc_write_ivar(device_t bus, device_t child, break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->sc_host.ios.vccq = value; + break; + case MMCBR_IVAR_TIMING: + sc->sc_host.ios.timing = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: stable/12/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c ============================================================================== --- stable/12/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu Jun 18 21:44:49 2020 (r362344) @@ -1245,15 +1245,27 @@ aml8726_sdxc_read_ivar(device_t bus, device_t child, case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; + break; case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = AML_SDXC_MAX_DMA / MMC_SECTOR_SIZE; break; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ + break; default: return (EINVAL); } @@ -1291,6 +1303,12 @@ aml8726_sdxc_write_ivar(device_t bus, device_t child, break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->host.ios.vccq = value; + break; + case MMCBR_IVAR_TIMING: + sc->host.ios.timing = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/arm64/conf/GENERIC Thu Jun 18 21:44:49 2020 (r362344) @@ -166,6 +166,7 @@ device aw_mmc # Allwinner SD/MMC controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc +device dwmmc_altera device rk_emmcphy # Serial (COM) ports Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/conf/files.arm64 Thu Jun 18 21:44:49 2020 (r362344) @@ -223,6 +223,7 @@ dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc dev/mbox/mbox_if.m optional soc_brcm_bcm2837 dev/mmc/host/dwmmc.c optional dwmmc fdt +dev/mmc/host/dwmmc_altera.c optional dwmmc fdt dwmmc_altera dev/mmc/host/dwmmc_hisi.c optional dwmmc fdt soc_hisi_hi6220 dev/mmc/host/dwmmc_rockchip.c optional dwmmc fdt soc_rockchip_rk3328 dev/neta/if_mvneta_fdt.c optional neta fdt Modified: stable/12/sys/dev/mmc/host/dwmmc.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc.c Thu Jun 18 21:44:49 2020 (r362344) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Ruslan Bukin + * Copyright (c) 2014-2019 Ruslan Bukin * All rights reserved. * * This software was developed by SRI International and the University of @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -125,6 +127,7 @@ static int dma_done(struct dwmmc_softc *, struct mmc_c static int dma_stop(struct dwmmc_softc *); static void pio_read(struct dwmmc_softc *, struct mmc_command *); static void pio_write(struct dwmmc_softc *, struct mmc_command *); +static void dwmmc_handle_card_present(struct dwmmc_softc *sc, bool is_present); static struct resource_spec dwmmc_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -372,7 +375,8 @@ dwmmc_intr(void *arg) sc->dto_rcvd = 1; if (reg & SDMMC_INTMASK_CD) { - /* XXX: Handle card detect */ + dwmmc_handle_card_present(sc, + READ4(sc, SDMMC_CDETECT) == 0 ? true : false); } } @@ -405,6 +409,56 @@ dwmmc_intr(void *arg) DWMMC_UNLOCK(sc); } +static void +dwmmc_handle_card_present(struct dwmmc_softc *sc, bool is_present) +{ + bool was_present; + + was_present = sc->child != NULL; + + if (!was_present && is_present) { + taskqueue_enqueue_timeout(taskqueue_swi_giant, + &sc->card_delayed_task, -(hz / 2)); + } else if (was_present && !is_present) { + taskqueue_enqueue(taskqueue_swi_giant, &sc->card_task); + } +} + +static void +dwmmc_card_task(void *arg, int pending __unused) +{ + struct dwmmc_softc *sc = arg; + + DWMMC_LOCK(sc); + + if (READ4(sc, SDMMC_CDETECT) == 0) { + if (sc->child == NULL) { + if (bootverbose) + device_printf(sc->dev, "Card inserted\n"); + + sc->child = device_add_child(sc->dev, "mmc", -1); + DWMMC_UNLOCK(sc); + if (sc->child) { + device_set_ivars(sc->child, sc); + (void)device_probe_and_attach(sc->child); + } + } else + DWMMC_UNLOCK(sc); + + } else { + /* Card isn't present, detach if necessary */ + if (sc->child != NULL) { + if (bootverbose) + device_printf(sc->dev, "Card removed\n"); + + DWMMC_UNLOCK(sc); + device_delete_child(sc->dev, sc->child); + sc->child = NULL; + } else + DWMMC_UNLOCK(sc); + } +} + static int parse_fdt(struct dwmmc_softc *sc) { @@ -428,8 +482,8 @@ parse_fdt(struct dwmmc_softc *sc) sc->host.caps |= MMC_CAP_8_BIT_DATA; /* max-frequency */ - if (OF_getencprop(node, "max-frequency", &sc->max_hz, sizeof(uint32_t)) <= 0) - sc->max_hz = 200000000; + if (OF_getencprop(node, "max-frequency", &sc->host.f_max, sizeof(uint32_t)) <= 0) + sc->host.f_max = 200000000; /* fifo-depth */ if ((len = OF_getproplen(node, "fifo-depth")) > 0) { @@ -452,8 +506,54 @@ parse_fdt(struct dwmmc_softc *sc) } #ifdef EXT_RESOURCES + + /* IP block reset is optional */ + error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", &sc->hwreset); + if (error != 0 && + error != ENOENT && + error != ENODEV) { + device_printf(sc->dev, "Cannot get reset\n"); + goto fail; + } + + /* vmmc regulator is optional */ + error = regulator_get_by_ofw_property(sc->dev, 0, "vmmc-supply", + &sc->vmmc); + if (error != 0 && + error != ENOENT && + error != ENODEV) { + device_printf(sc->dev, "Cannot get regulator 'vmmc-supply'\n"); + goto fail; + } + + /* vqmmc regulator is optional */ + error = regulator_get_by_ofw_property(sc->dev, 0, "vqmmc-supply", + &sc->vqmmc); + if (error != 0 && + error != ENOENT && + error != ENODEV) { + device_printf(sc->dev, "Cannot get regulator 'vqmmc-supply'\n"); + goto fail; + } + + /* Assert reset first */ + if (sc->hwreset != NULL) { + error = hwreset_assert(sc->hwreset); + if (error != 0) { + device_printf(sc->dev, "Cannot assert reset\n"); + goto fail; + } + } + /* BIU (Bus Interface Unit clock) is optional */ error = clk_get_by_ofw_name(sc->dev, 0, "biu", &sc->biu); + if (error != 0 && + error != ENOENT && + error != ENODEV) { + device_printf(sc->dev, "Cannot get 'biu' clock\n"); + goto fail; + } + if (sc->biu) { error = clk_enable(sc->biu); if (error != 0) { @@ -467,20 +567,52 @@ parse_fdt(struct dwmmc_softc *sc) * if no clock-frequency property is given */ error = clk_get_by_ofw_name(sc->dev, 0, "ciu", &sc->ciu); + if (error != 0 && + error != ENOENT && + error != ENODEV) { + device_printf(sc->dev, "Cannot get 'ciu' clock\n"); + goto fail; + } + if (sc->ciu) { - error = clk_enable(sc->ciu); - if (error != 0) { - device_printf(sc->dev, "cannot enable ciu clock\n"); - goto fail; - } if (bus_hz != 0) { error = clk_set_freq(sc->ciu, bus_hz, 0); if (error != 0) device_printf(sc->dev, "cannot set ciu clock to %u\n", bus_hz); } + error = clk_enable(sc->ciu); + if (error != 0) { + device_printf(sc->dev, "cannot enable ciu clock\n"); + goto fail; + } clk_get_freq(sc->ciu, &sc->bus_hz); } + + /* Enable regulators */ + if (sc->vmmc != NULL) { + error = regulator_enable(sc->vmmc); + if (error != 0) { + device_printf(sc->dev, "Cannot enable vmmc regulator\n"); + goto fail; + } + } + if (sc->vqmmc != NULL) { + error = regulator_enable(sc->vqmmc); + if (error != 0) { + device_printf(sc->dev, "Cannot enable vqmmc regulator\n"); + goto fail; + } + } + + /* Take dwmmc out of reset */ + if (sc->hwreset != NULL) { + error = hwreset_deassert(sc->hwreset); + if (error != 0) { + device_printf(sc->dev, "Cannot deassert reset\n"); + goto fail; + } + } #endif /* EXT_RESOURCES */ if (sc->bus_hz == 0) { @@ -592,15 +724,64 @@ dwmmc_attach(device_t dev) WRITE4(sc, SDMMC_CTRL, SDMMC_CTRL_INT_ENABLE); sc->host.f_min = 400000; - sc->host.f_max = sc->max_hz; sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.caps |= MMC_CAP_HSPEED; sc->host.caps |= MMC_CAP_SIGNALING_330; - device_add_child(dev, "mmc", -1); - return (bus_generic_attach(dev)); + TASK_INIT(&sc->card_task, 0, dwmmc_card_task, sc); + TIMEOUT_TASK_INIT(taskqueue_swi_giant, &sc->card_delayed_task, 0, + dwmmc_card_task, sc); + + /* + * Schedule a card detection as we won't get an interrupt + * if the card is inserted when we attach + */ + dwmmc_card_task(sc, 0); + + return (0); } +int +dwmmc_detach(device_t dev) +{ + struct dwmmc_softc *sc; + int ret; + + sc = device_get_softc(dev); + + ret = device_delete_children(dev); + if (ret != 0) + return (ret); + + taskqueue_drain(taskqueue_swi_giant, &sc->card_task); + taskqueue_drain_timeout(taskqueue_swi_giant, &sc->card_delayed_task); + + if (sc->intr_cookie != NULL) { + ret = bus_teardown_intr(dev, sc->res[1], sc->intr_cookie); + if (ret != 0) + return (ret); + } + bus_release_resources(dev, dwmmc_spec, sc->res); + + DWMMC_LOCK_DESTROY(sc); + +#ifdef EXT_RESOURCES + if (sc->hwreset != NULL && hwreset_deassert(sc->hwreset) != 0) + device_printf(sc->dev, "cannot deassert reset\n"); + if (sc->biu != NULL && clk_disable(sc->biu) != 0) + device_printf(sc->dev, "cannot disable biu clock\n"); + if (sc->ciu != NULL && clk_disable(sc->ciu) != 0) + device_printf(sc->dev, "cannot disable ciu clock\n"); + + if (sc->vmmc && regulator_disable(sc->vmmc) != 0) + device_printf(sc->dev, "Cannot disable vmmc regulator\n"); + if (sc->vqmmc && regulator_disable(sc->vqmmc) != 0) + device_printf(sc->dev, "Cannot disable vqmmc regulator\n"); +#endif + + return (0); +} + static int dwmmc_setup_bus(struct dwmmc_softc *sc, int freq) { @@ -1090,11 +1271,18 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *(int *)result = sc->host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: *(int *)result = sc->desc_count; + break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->host.ios.timing; + break; } return (0); } @@ -1132,6 +1320,12 @@ dwmmc_write_ivar(device_t bus, device_t child, int whi break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_TIMING: + sc->host.ios.timing = value; + break; + case MMCBR_IVAR_VCCQ: + sc->host.ios.vccq = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: stable/12/sys/dev/mmc/host/dwmmc_altera.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_altera.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc_altera.c Thu Jun 18 21:44:49 2020 (r362344) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -41,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include +#include "opt_mmccam.h" + static struct ofw_compat_data compat_data[] = { {"altr,socfpga-dw-mshc", 1}, {NULL, 0}, @@ -66,9 +70,17 @@ static int altera_dwmmc_attach(device_t dev) { struct dwmmc_softc *sc; + phandle_t root; sc = device_get_softc(dev); sc->hwtype = HWTYPE_ALTERA; + + root = OF_finddevice("/"); + + if (ofw_bus_node_is_compatible(root, "altr,socfpga-stratix10")) { + sc->bus_hz = 24000000; + sc->use_pio = 1; + } return (dwmmc_attach(dev)); } Modified: stable/12/sys/dev/mmc/host/dwmmc_hisi.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_hisi.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc_hisi.c Thu Jun 18 21:44:49 2020 (r362344) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_rockchip.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_rockchip.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc_rockchip.c Thu Jun 18 21:44:49 2020 (r362344) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -134,6 +136,7 @@ static device_method_t rockchip_dwmmc_methods[] = { /* bus interface */ DEVMETHOD(device_probe, rockchip_dwmmc_probe), DEVMETHOD(device_attach, rockchip_dwmmc_attach), + DEVMETHOD(device_detach, dwmmc_detach), DEVMETHOD_END }; Modified: stable/12/sys/dev/mmc/host/dwmmc_samsung.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_samsung.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc_samsung.c Thu Jun 18 21:44:49 2020 (r362344) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_var.h ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_var.h Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/dev/mmc/host/dwmmc_var.h Thu Jun 18 21:44:49 2020 (r362344) @@ -35,6 +35,8 @@ #ifdef EXT_RESOURCES #include +#include +#include #endif enum { @@ -59,6 +61,9 @@ struct dwmmc_softc { uint32_t use_pio; uint32_t pwren_inverted; u_int desc_count; + device_t child; + struct task card_task; /* Card presence check task */ + struct timeout_task card_delayed_task;/* Card insert delayed task */ int (*update_ios)(struct dwmmc_softc *sc, struct mmc_ios *ios); @@ -74,7 +79,6 @@ struct dwmmc_softc { uint32_t acd_rcvd; uint32_t cmd_done; uint64_t bus_hz; - uint32_t max_hz; uint32_t fifo_depth; uint32_t num_slots; uint32_t sdr_timing; @@ -83,11 +87,15 @@ struct dwmmc_softc { #ifdef EXT_RESOURCES clk_t biu; clk_t ciu; + hwreset_t hwreset; + regulator_t vmmc; + regulator_t vqmmc; #endif }; DECLARE_CLASS(dwmmc_driver); int dwmmc_attach(device_t); +int dwmmc_detach(device_t); #endif Modified: stable/12/sys/mips/ingenic/jz4780_mmc.c ============================================================================== --- stable/12/sys/mips/ingenic/jz4780_mmc.c Thu Jun 18 21:42:54 2020 (r362343) +++ stable/12/sys/mips/ingenic/jz4780_mmc.c Thu Jun 18 21:44:49 2020 (r362344) @@ -774,17 +774,26 @@ jz4780_mmc_read_ivar(device_t bus, device_t child, int case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->sc_host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; + break; case MMCBR_IVAR_VDD: *(int *)result = sc->sc_host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->sc_host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->sc_host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->sc_host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = 65535; break; - case MMCBR_IVAR_TIMING: - *(int *)result = sc->sc_host.ios.timing; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ break; } @@ -824,6 +833,9 @@ jz4780_mmc_write_ivar(device_t bus, device_t child, in break; case MMCBR_IVAR_VDD: sc->sc_host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->sc_host.ios.vccq = value; break; case MMCBR_IVAR_TIMING: sc->sc_host.ios.timing = value; From owner-svn-src-stable-12@freebsd.org Thu Jun 18 22:10:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB57833598B; Thu, 18 Jun 2020 22:10:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nx2652dBz488c; Thu, 18 Jun 2020 22:10:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A838210E8C; Thu, 18 Jun 2020 22:10:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IMA6CU004661; Thu, 18 Jun 2020 22:10:06 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IMA6o5004660; Thu, 18 Jun 2020 22:10:06 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202006182210.05IMA6o5004660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 18 Jun 2020 22:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362345 - stable/12/usr.sbin/services_mkdb X-SVN-Group: stable-12 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/12/usr.sbin/services_mkdb X-SVN-Commit-Revision: 362345 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 22:10:06 -0000 Author: pfg Date: Thu Jun 18 22:10:06 2020 New Revision: 362345 URL: https://svnweb.freebsd.org/changeset/base/362345 Log: services: Add SSDP to service database This is used for UPnP and is registered in the IANA database. PR: 241573 Modified: stable/12/usr.sbin/services_mkdb/services Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/services_mkdb/services ============================================================================== --- stable/12/usr.sbin/services_mkdb/services Thu Jun 18 21:44:49 2020 (r362344) +++ stable/12/usr.sbin/services_mkdb/services Thu Jun 18 22:10:06 2020 (r362345) @@ -1602,6 +1602,8 @@ pptp 1723/tcp #Point-to-point tunnelling protocol # IMPORTANT NOTE: See comments for ports 1645/1646 when using older equipment radius 1812/udp #RADIUS authentication protocol (IANA sanctioned) radacct 1813/udp #RADIUS accounting protocol (IANA sanctioned) +ssdp 1900/tcp #Selective Service Discovery Protocol (UPnP) +ssdp 1900/udp #Selective Service Discovery Protocol (UPnP) licensedaemon 1986/tcp #cisco license management licensedaemon 1986/udp #cisco license management tr-rsrb-p1 1987/tcp #cisco RSRB Priority 1 port From owner-svn-src-stable-12@freebsd.org Thu Jun 18 23:18:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26A3D337A40; Thu, 18 Jun 2020 23:18:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nyYP0Rw2z4DSJ; Thu, 18 Jun 2020 23:18:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05F0C11A43; Thu, 18 Jun 2020 23:18:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05INImBt047015; Thu, 18 Jun 2020 23:18:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05INIlvN047009; Thu, 18 Jun 2020 23:18:47 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006182318.05INIlvN047009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 Jun 2020 23:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362349 - in stable/12/sys: arm/allwinner arm/allwinner/clkng arm/allwinner/h6 arm64/conf conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner arm/allwinner/clkng arm/allwinner/h6 arm64/conf conf X-SVN-Commit-Revision: 362349 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 23:18:49 -0000 Author: manu Date: Thu Jun 18 23:18:47 2020 New Revision: 362349 URL: https://svnweb.freebsd.org/changeset/base/362349 Log: MFC r353528-r353529 r353528: arm64: allwinner: Add Allwinner H6 Support This adds support for H6 SoC. Add a CCU driver for H6 that support all PLLs and most of the clocks that we are intersted in for now (i2c, mmc, usb, etc ...) r353529: arm64: allwinner: Add H6 GPIO/Pinctrl driver This adds support for Allwinner H6 GPIO and pinctrl driver for both the main pinctrl unit and the 'r_' one. Added: stable/12/sys/arm/allwinner/clkng/ccu_h6.c - copied unchanged from r353529, head/sys/arm/allwinner/clkng/ccu_h6.c stable/12/sys/arm/allwinner/clkng/ccu_h6_r.c - copied unchanged from r353529, head/sys/arm/allwinner/clkng/ccu_h6_r.c stable/12/sys/arm/allwinner/h6/ - copied from r353529, head/sys/arm/allwinner/h6/ Modified: stable/12/sys/arm/allwinner/aw_gpio.c stable/12/sys/arm64/conf/GENERIC stable/12/sys/conf/files.arm64 stable/12/sys/conf/options.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_gpio.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:12:55 2020 (r362348) +++ stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:18:47 2020 (r362349) @@ -130,6 +130,12 @@ extern const struct allwinner_padconf a64_padconf; extern const struct allwinner_padconf a64_r_padconf; #endif +/* Defined in h6_padconf.c */ +#ifdef SOC_ALLWINNER_H6 +extern const struct allwinner_padconf h6_padconf; +extern const struct allwinner_padconf h6_r_padconf; +#endif + static struct ofw_compat_data compat_data[] = { #ifdef SOC_ALLWINNER_A10 {"allwinner,sun4i-a10-pinctrl", (uintptr_t)&a10_padconf}, @@ -164,6 +170,10 @@ static struct ofw_compat_data compat_data[] = { #ifdef SOC_ALLWINNER_A64 {"allwinner,sun50i-a64-pinctrl", (uintptr_t)&a64_padconf}, {"allwinner,sun50i-a64-r-pinctrl", (uintptr_t)&a64_r_padconf}, +#endif +#ifdef SOC_ALLWINNER_H6 + {"allwinner,sun50i-h6-pinctrl", (uintptr_t)&h6_padconf}, + {"allwinner,sun50i-h6-r-pinctrl", (uintptr_t)&h6_r_padconf}, #endif {NULL, 0} }; Copied: stable/12/sys/arm/allwinner/clkng/ccu_h6.c (from r353529, head/sys/arm/allwinner/clkng/ccu_h6.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/ccu_h6.c Thu Jun 18 23:18:47 2020 (r362349, copy of r353529, head/sys/arm/allwinner/clkng/ccu_h6.c) @@ -0,0 +1,501 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +/* Non-exported clocks */ +#define CLK_OSC_12M 0 +#define CLK_PLL_CPUX 1 +#define CLK_PLL_DDR0 2 +#define CLK_PLL_PERIPH0_2X 4 +#define CLK_PLL_PERIPH0_4X 5 +#define CLK_PLL_PERIPH1 6 +#define CLK_PLL_PERIPH1_2X 7 +#define CLK_PLL_PERIPH1_4X 8 +#define CLK_PLL_GPU 9 +#define CLK_PLL_VIDEO0 10 +#define CLK_PLL_VIDEO0_4X 11 +#define CLK_PLL_VIDEO1 12 +#define CLK_PLL_VIDEO1_4X 13 +#define CLK_PLL_VE 14 +#define CLK_PLL_DE 14 +#define CLK_PLL_HSIC 16 + +#define CLK_PSI_AHB1_AHB2 24 +#define CLK_AHB3 25 +#define CLK_APB2 27 + +static struct aw_ccung_reset h6_ccu_resets[] = { + /* PSI_BGR_REG */ + CCU_RESET(RST_BUS_PSI, 0x79c, 16) + + /* SMHC_BGR_REG */ + CCU_RESET(RST_BUS_MMC0, 0x84c, 16) + CCU_RESET(RST_BUS_MMC1, 0x84c, 17) + CCU_RESET(RST_BUS_MMC2, 0x84c, 18) + + /* UART_BGR_REG */ + CCU_RESET(RST_BUS_UART0, 0x90c, 16) + CCU_RESET(RST_BUS_UART1, 0x90c, 17) + CCU_RESET(RST_BUS_UART2, 0x90c, 18) + CCU_RESET(RST_BUS_UART3, 0x90c, 19) + + /* TWI_BGR_REG */ + CCU_RESET(RST_BUS_I2C0, 0x91c, 16) + CCU_RESET(RST_BUS_I2C1, 0x91c, 17) + CCU_RESET(RST_BUS_I2C2, 0x91c, 18) + CCU_RESET(RST_BUS_I2C3, 0x91c, 19) + + /* EMAC_BGR_REG */ + CCU_RESET(RST_BUS_EMAC, 0x97c, 16) + + /* USB0_CLK_REG */ + CCU_RESET(RST_USB_PHY0, 0xa70, 30) + + /* USB1_CLK_REG */ + CCU_RESET(RST_USB_PHY1, 0xa74, 30) + + /* USB3_CLK_REG */ + CCU_RESET(RST_USB_HSIC, 0xa7c, 28) + CCU_RESET(RST_USB_PHY3, 0xa7c, 30) + + /* USB_BGR_REG */ + CCU_RESET(RST_BUS_OHCI0, 0xa8c, 16) + CCU_RESET(RST_BUS_OHCI3, 0xa8c, 19) + CCU_RESET(RST_BUS_EHCI0, 0xa8c, 20) + CCU_RESET(RST_BUS_XHCI, 0xa8c, 21) + CCU_RESET(RST_BUS_EHCI3, 0xa8c, 23) + CCU_RESET(RST_BUS_OTG, 0xa8c, 24) +}; + +static struct aw_ccung_gate h6_ccu_gates[] = { + /* PSI_BGR_REG */ + CCU_GATE(CLK_BUS_PSI, "bus-psi", "psi_ahb1_ahb2", 0x79c, 0) + + /* SMHC_BGR_REG */ + CCU_GATE(CLK_BUS_MMC0, "bus-mmc0", "ahb3", 0x84c, 0) + CCU_GATE(CLK_BUS_MMC1, "bus-mmc1", "ahb3", 0x84c, 1) + CCU_GATE(CLK_BUS_MMC2, "bus-mmc2", "ahb3", 0x84c, 2) + + /* UART_BGR_REG Enabling the gate enable weir behavior ... */ + /* CCU_GATE(CLK_BUS_UART0, "bus-uart0", "apb2", 0x90c, 0) */ + /* CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb2", 0x90c, 1) */ + /* CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb2", 0x90c, 2) */ + /* CCU_GATE(CLK_BUS_UART3, "bus-uart3", "apb2", 0x90c, 3) */ + + /* TWI_BGR_REG */ + CCU_GATE(CLK_BUS_I2C0, "bus-i2c0", "apb2", 0x91c, 0) + CCU_GATE(CLK_BUS_I2C1, "bus-i2c1", "apb2", 0x91c, 1) + CCU_GATE(CLK_BUS_I2C2, "bus-i2c2", "apb2", 0x91c, 2) + CCU_GATE(CLK_BUS_I2C3, "bus-i2c3", "apb2", 0x91c, 3) + + /* EMAC_BGR_REG */ + CCU_GATE(CLK_BUS_EMAC, "bus-emac", "ahb3", 0x97c, 0) + + /* USB0_CLK_REG */ + CCU_GATE(CLK_USB_PHY0, "usb-phy0", "ahb3", 0xa70, 29) + CCU_GATE(CLK_USB_OHCI0, "usb-ohci0", "ahb3", 0xa70, 31) + + /* USB1_CLK_REG */ + CCU_GATE(CLK_USB_PHY1, "usb-phy1", "ahb3", 0xa74, 29) + + /* USB3_CLK_REG */ + CCU_GATE(CLK_USB_HSIC, "usb-hsic", "ahb3", 0xa7c, 26) + CCU_GATE(CLK_USB_HSIC_12M, "usb-hsic-12M", "ahb3", 0xa7c, 27) + CCU_GATE(CLK_USB_PHY3, "usb-phy3", "ahb3", 0xa7c, 29) + CCU_GATE(CLK_USB_OHCI3, "usb-ohci3", "ahb3", 0xa7c, 31) + + /* USB_BGR_REG */ + CCU_GATE(CLK_BUS_OHCI0, "bus-ohci0", "ahb3", 0xa8c, 0) + CCU_GATE(CLK_BUS_OHCI3, "bus-ohci3", "ahb3", 0xa8c, 3) + CCU_GATE(CLK_BUS_EHCI0, "bus-ehci0", "ahb3", 0xa8c, 4) + CCU_GATE(CLK_BUS_XHCI, "bus-xhci", "ahb3", 0xa8c, 5) + CCU_GATE(CLK_BUS_EHCI3, "bus-ehci3", "ahb3", 0xa8c, 7) + CCU_GATE(CLK_BUS_OTG, "bus-otg", "ahb3", 0xa8c, 8) +}; + +static const char *osc12m_parents[] = {"osc24M"}; +FIXED_CLK(osc12m_clk, + CLK_OSC_12M, /* id */ + "osc12M", /* name */ + osc12m_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +static const char *pll_cpux_parents[] = {"osc24M"}; +NP_CLK(pll_cpux_clk, + CLK_PLL_CPUX, /* id */ + "pll_cpux", pll_cpux_parents, /* name, parents */ + 0x00, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 2, 0, 0, /* p factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_ddr0_parents[] = {"osc24M"}; +NMM_CLK(pll_ddr0_clk, + CLK_PLL_DDR0, /* id */ + "pll_ddr0", pll_ddr0_parents, /* name, parents */ + 0x10, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_peri0_parents[] = {"osc24M"}; +NMM_CLK(pll_peri0_clk, + CLK_PLL_PERIPH0, /* id */ + "pll_periph0", pll_peri0_parents, /* name, parents */ + 0x20, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +static const char *pll_peri0_2x_parents[] = {"pll_periph0"}; +FIXED_CLK(pll_peri0_2x_clk, + CLK_PLL_PERIPH0_2X, /* id */ + "pll_periph0_2x", /* name */ + pll_peri0_2x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ +static const char *pll_peri0_4x_parents[] = {"pll_periph0"}; +FIXED_CLK(pll_peri0_4x_clk, + CLK_PLL_PERIPH0_4X, /* id */ + "pll_periph0_4x", /* name */ + pll_peri0_4x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 4, /* div */ + 0); /* flags */ + +static const char *pll_peri1_parents[] = {"osc24M"}; +NMM_CLK(pll_peri1_clk, + CLK_PLL_PERIPH1, /* id */ + "pll_periph1", pll_peri1_parents, /* name, parents */ + 0x28, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +static const char *pll_peri1_2x_parents[] = {"pll_periph1"}; +FIXED_CLK(pll_peri1_2x_clk, + CLK_PLL_PERIPH1_2X, /* id */ + "pll_periph1_2x", /* name */ + pll_peri1_2x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ +static const char *pll_peri1_4x_parents[] = {"pll_periph1"}; +FIXED_CLK(pll_peri1_4x_clk, + CLK_PLL_PERIPH1_4X, /* id */ + "pll_periph1_4x", /* name */ + pll_peri1_4x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 4, /* div */ + 0); /* flags */ + +static const char *pll_gpu_parents[] = {"osc24M"}; +NMM_CLK(pll_gpu_clk, + CLK_PLL_GPU, /* id */ + "pll_gpu", pll_gpu_parents, /* name, parents */ + 0x30, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_video0_parents[] = {"osc24M"}; +NMM_CLK(pll_video0_clk, + CLK_PLL_VIDEO0, /* id */ + "pll_video0", pll_video0_parents, /* name, parents */ + 0x40, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +static const char *pll_video0_4x_parents[] = {"pll_video0"}; +FIXED_CLK(pll_video0_4x_clk, + CLK_PLL_VIDEO0_4X, /* id */ + "pll_video0_4x", /* name */ + pll_video0_4x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 4, /* div */ + 0); /* flags */ + +static const char *pll_video1_parents[] = {"osc24M"}; +NMM_CLK(pll_video1_clk, + CLK_PLL_VIDEO1, /* id */ + "pll_video1", pll_video1_parents, /* name, parents */ + 0x48, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +static const char *pll_video1_4x_parents[] = {"pll_video1"}; +FIXED_CLK(pll_video1_4x_clk, + CLK_PLL_VIDEO1_4X, /* id */ + "pll_video1_4x", /* name */ + pll_video1_4x_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 4, /* div */ + 0); /* flags */ + +static const char *pll_ve_parents[] = {"osc24M"}; +NMM_CLK(pll_ve_clk, + CLK_PLL_VE, /* id */ + "pll_ve", pll_ve_parents, /* name, parents */ + 0x58, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_de_parents[] = {"osc24M"}; +NMM_CLK(pll_de_clk, + CLK_PLL_DE, /* id */ + "pll_de", pll_de_parents, /* name, parents */ + 0x60, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_hsic_parents[] = {"osc24M"}; +NMM_CLK(pll_hsic_clk, + CLK_PLL_HSIC, /* id */ + "pll_hsic", pll_hsic_parents, /* name, parents */ + 0x70, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_AUDIO missing */ + +/* CPUX_AXI missing */ + +static const char *psi_ahb1_ahb2_parents[] = {"osc24M", "osc32k", "iosc", "pll_periph0"}; +NM_CLK(psi_ahb1_ahb2_clk, + CLK_PSI_AHB1_AHB2, "psi_ahb1_ahb2", psi_ahb1_ahb2_parents, /* id, name, parents */ + 0x510, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *ahb3_parents[] = {"osc24M", "osc32k", "psi_ahb1_ahb2", "pll_periph0"}; +NM_CLK(ahb3_clk, + CLK_AHB3, "ahb3", ahb3_parents, /* id, name, parents */ + 0x51C, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *apb1_parents[] = {"osc24M", "osc32k", "psi_ahb1_ahb2", "pll_periph0"}; +NM_CLK(apb1_clk, + CLK_APB1, "apb1", apb1_parents, /* id, name, parents */ + 0x520, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *apb2_parents[] = {"osc24M", "osc32k", "psi_ahb1_ahb2", "pll_periph0"}; +NM_CLK(apb2_clk, + CLK_APB2, "apb2", apb2_parents, /* id, name, parents */ + 0x524, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +/* Missing MBUS clock */ + +static const char *mod_parents[] = {"osc24M", "pll_periph0_2x", "pll_periph1_2x"}; +NM_CLK(mmc0_clk, + CLK_MMC0, "mmc0", mod_parents, /* id, name, parents */ + 0x830, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +NM_CLK(mmc1_clk, + CLK_MMC1, "mmc1", mod_parents, /* id, name, parents */ + 0x834, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +NM_CLK(mmc2_clk, + CLK_MMC2, "mmc2", mod_parents, /* id, name, parents */ + 0x838, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static struct aw_ccung_clk h6_ccu_clks[] = { + { .type = AW_CLK_NP, .clk.np = &pll_cpux_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_ddr0_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_peri0_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_peri1_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_gpu_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_video0_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_video1_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_ve_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_de_clk}, + { .type = AW_CLK_NMM, .clk.nmm = &pll_hsic_clk}, + + { .type = AW_CLK_NM, .clk.nm = &psi_ahb1_ahb2_clk}, + { .type = AW_CLK_NM, .clk.nm = &ahb3_clk}, + { .type = AW_CLK_NM, .clk.nm = &apb1_clk}, + { .type = AW_CLK_NM, .clk.nm = &apb2_clk}, + + { .type = AW_CLK_NM, .clk.nm = &mmc0_clk}, + { .type = AW_CLK_NM, .clk.nm = &mmc1_clk}, + { .type = AW_CLK_NM, .clk.nm = &mmc2_clk}, + + { .type = AW_CLK_FIXED, .clk.fixed = &osc12m_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_peri0_2x_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_peri0_4x_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_peri1_2x_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_peri1_4x_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_video0_4x_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pll_video1_4x_clk}, +}; + +static int +ccu_h6_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "allwinner,sun50i-h6-ccu")) + return (ENXIO); + + device_set_desc(dev, "Allwinner H6 Clock Control Unit NG"); + return (BUS_PROBE_DEFAULT); +} + +static int +ccu_h6_attach(device_t dev) +{ + struct aw_ccung_softc *sc; + + sc = device_get_softc(dev); + + sc->resets = h6_ccu_resets; + sc->nresets = nitems(h6_ccu_resets); + sc->gates = h6_ccu_gates; + sc->ngates = nitems(h6_ccu_gates); + sc->clks = h6_ccu_clks; + sc->nclks = nitems(h6_ccu_clks); + + return (aw_ccung_attach(dev)); +} + +static device_method_t ccu_h6ng_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ccu_h6_probe), + DEVMETHOD(device_attach, ccu_h6_attach), + + DEVMETHOD_END +}; + +static devclass_t ccu_h6ng_devclass; + +DEFINE_CLASS_1(ccu_h6ng, ccu_h6ng_driver, ccu_h6ng_methods, + sizeof(struct aw_ccung_softc), aw_ccung_driver); + +EARLY_DRIVER_MODULE(ccu_h6ng, simplebus, ccu_h6ng_driver, + ccu_h6ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); Copied: stable/12/sys/arm/allwinner/clkng/ccu_h6_r.c (from r353529, head/sys/arm/allwinner/clkng/ccu_h6_r.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/ccu_h6_r.c Thu Jun 18 23:18:47 2020 (r362349, copy of r353529, head/sys/arm/allwinner/clkng/ccu_h6_r.c) @@ -0,0 +1,172 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +/* Non-exported clocks */ +#define CLK_R_AHB 1 +#define CLK_R_APB2 3 + +static struct aw_ccung_reset ccu_sun50i_h6_r_resets[] = { + CCU_RESET(RST_R_APB1_TIMER, 0x11c, 16) + CCU_RESET(RST_R_APB1_TWD, 0x12c, 16) + CCU_RESET(RST_R_APB1_PWM, 0x13c, 16) + CCU_RESET(RST_R_APB2_UART, 0x18c, 16) + CCU_RESET(RST_R_APB2_I2C, 0x19c, 16) + CCU_RESET(RST_R_APB1_IR, 0x1cc, 16) + CCU_RESET(RST_R_APB1_W1, 0x1ec, 16) +}; + +static struct aw_ccung_gate ccu_sun50i_h6_r_gates[] = { + CCU_GATE(CLK_R_APB1_TIMER, "r_apb1-timer", "r_apb1", 0x11c, 0) + CCU_GATE(CLK_R_APB1_TWD, "r_apb1-twd", "r_apb1", 0x12c, 0) + CCU_GATE(CLK_R_APB1_PWM, "r_apb1-pwm", "r_apb1", 0x13c, 0) + CCU_GATE(CLK_R_APB2_UART, "r_apb1-uart", "r_apb2", 0x18c, 0) + CCU_GATE(CLK_R_APB2_I2C, "r_apb1-i2c", "r_apb2", 0x19c, 0) + CCU_GATE(CLK_R_APB1_IR, "r_apb1-ir", "r_apb1", 0x1cc, 0) + CCU_GATE(CLK_R_APB1_W1, "r_apb1-w1", "r_apb1", 0x1ec, 0) +}; + +static const char *ar100_parents[] = {"osc24M", "osc32k", "pll_periph0", "iosc"}; +PREDIV_CLK(ar100_clk, CLK_AR100, /* id */ + "ar100", ar100_parents, /* name, parents */ + 0x00, /* offset */ + 16, 2, /* mux */ + 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */ + 8, 5, 0, AW_CLK_FACTOR_HAS_COND, /* prediv */ + 16, 2, 2); /* prediv condition */ + +static const char *r_ahb_parents[] = {"ar100"}; +FIXED_CLK(r_ahb_clk, + CLK_R_AHB, /* id */ + "r_ahb", /* name */ + r_ahb_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 1, /* div */ + 0); /* flags */ + +static const char *r_apb1_parents[] = {"r_ahb"}; +DIV_CLK(r_apb1_clk, + CLK_R_APB1, /* id */ + "r_apb1", r_apb1_parents, /* name, parents */ + 0x0c, /* offset */ + 0, 2, /* shift, width */ + 0, NULL); /* flags, div table */ + +static const char *r_apb2_parents[] = {"osc24M", "osc32k", "pll_periph0", "iosc"}; +PREDIV_CLK(r_apb2_clk, CLK_R_APB2, /* id */ + "r_apb2", r_apb2_parents, /* name, parents */ + 0x10, /* offset */ + 16, 2, /* mux */ + 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */ + 8, 5, 0, AW_CLK_FACTOR_HAS_COND, /* prediv */ + 16, 2, 2); /* prediv condition */ + +static struct aw_ccung_clk clks[] = { + { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &ar100_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &r_ahb_clk}, + { .type = AW_CLK_DIV, .clk.div = &r_apb1_clk}, + { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &r_apb2_clk}, +}; + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun50i-h6-r-ccu", 1 }, + { NULL, 0}, +}; + +static int +ccu_sun50i_h6_r_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Allwinner SUN50I_H6_R Clock Control Unit NG"); + return (BUS_PROBE_DEFAULT); +} + +static int +ccu_sun50i_h6_r_attach(device_t dev) +{ + struct aw_ccung_softc *sc; + + sc = device_get_softc(dev); + + sc->resets = ccu_sun50i_h6_r_resets; + sc->nresets = nitems(ccu_sun50i_h6_r_resets); + sc->gates = ccu_sun50i_h6_r_gates; + sc->ngates = nitems(ccu_sun50i_h6_r_gates); + sc->clks = clks; + sc->nclks = nitems(clks); + + return (aw_ccung_attach(dev)); +} + +static device_method_t ccu_sun50i_h6_r_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ccu_sun50i_h6_r_probe), + DEVMETHOD(device_attach, ccu_sun50i_h6_r_attach), + + DEVMETHOD_END +}; + +static devclass_t ccu_sun50i_h6_r_devclass; + +DEFINE_CLASS_1(ccu_sun50i_h6_r, ccu_sun50i_h6_r_driver, ccu_sun50i_h6_r_methods, + sizeof(struct aw_ccung_softc), aw_ccung_driver); + +EARLY_DRIVER_MODULE(ccu_sun50i_h6_r, simplebus, ccu_sun50i_h6_r_driver, + ccu_sun50i_h6_r_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Thu Jun 18 23:12:55 2020 (r362348) +++ stable/12/sys/arm64/conf/GENERIC Thu Jun 18 23:18:47 2020 (r362349) @@ -90,6 +90,7 @@ options NETDUMP # netdump(4) client support # SoC support options SOC_ALLWINNER_A64 options SOC_ALLWINNER_H5 +options SOC_ALLWINNER_H6 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 options SOC_BRCM_BCM2837 Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Thu Jun 18 23:12:55 2020 (r362348) +++ stable/12/sys/conf/files.arm64 Thu Jun 18 23:18:47 2020 (r362349) @@ -58,6 +58,8 @@ arm/allwinner/clkng/aw_clk_np.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt +arm/allwinner/clkng/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt +arm/allwinner/clkng/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt arm/allwinner/clkng/ccu_de2.c optional aw_ccu fdt @@ -66,6 +68,8 @@ arm/allwinner/a64/a64_padconf.c optional soc_allwinner arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h6/h6_padconf.c optional soc_allwinner_h6 fdt +arm/allwinner/h6/h6_r_padconf.c optional soc_allwinner_h6 fdt arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt Modified: stable/12/sys/conf/options.arm64 ============================================================================== --- stable/12/sys/conf/options.arm64 Thu Jun 18 23:12:55 2020 (r362348) +++ stable/12/sys/conf/options.arm64 Thu Jun 18 23:18:47 2020 (r362349) @@ -16,6 +16,7 @@ EFIRT opt_efirt.h # SoC Support SOC_ALLWINNER_A64 opt_soc.h SOC_ALLWINNER_H5 opt_soc.h +SOC_ALLWINNER_H6 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_BRCM_BCM2838 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h From owner-svn-src-stable-12@freebsd.org Thu Jun 18 23:21:14 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 205323378BB; Thu, 18 Jun 2020 23:21:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nycB0NHTz4DvQ; Thu, 18 Jun 2020 23:21:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07EE9119C3; Thu, 18 Jun 2020 23:21:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05INLEdw047225; Thu, 18 Jun 2020 23:21:14 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05INLCCw047219; Thu, 18 Jun 2020 23:21:12 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006182321.05INLCCw047219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 Jun 2020 23:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362350 - in stable/12/sys: arm/allwinner dev/iicbus/twsi dts/arm64/overlays modules/dtb/allwinner X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner dev/iicbus/twsi dts/arm64/overlays modules/dtb/allwinner X-SVN-Commit-Revision: 362350 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 23:21:14 -0000 Author: manu Date: Thu Jun 18 23:21:12 2020 New Revision: 362350 URL: https://svnweb.freebsd.org/changeset/base/362350 Log: MFC r356276, r356609-r356610, r356637, r356798-r356800, r356802 r356276: arm: allwinner: aw_spi: Call bus_generic_attach This is needed when the driver is compiled into the kernel. When compiled as a module this will be called from another code path as we also depend on ofw_spibus. r356609: twsi: Rework how we handle the i2c messages We use to handle each message separately in i2c_transfer but that cannot work with message with NOSTOP as it confuses the controller that we disable the interrupts and start a new message. Handle every message in the interrupt handler and fire a new start condition if the previous message have NOSTOP, the controller understand this as a repeated start. This fixes booting on Allwinner A10/A20 platform where before the i2c controller used to write 0 to the PMIC register that control the regulators as it though that this was the continuation of the write message. Tested on: A20 BananaPi, Cubieboard 1 (kevans) Reported by: kevans r356610: arm: allwinner: axp209: Add regnode_status method This allow consumers to check if the regulator is enable or not. r356637: arm64: allwinner: dtso: Add spi0 spigen DTSO This overlays can be used on A64 board to use spigen and spi(8) on the spi0 pins. Tested On: Pine64-LTS, A64-Olinuxino Submitted by: Gary Otten r356798: axp8xx: Add missing voltage regulators offset This lead to writing the desired voltage value to the wrong register. r356799: axp8xx: Add a regnode_init method This method will set the desired voltaged based on values in the DTS. It will not enable the regulator, this is the job of either a consumer or regnode_set_constraint SYSINIT if the regulator is boot_on or always_on. r356800: arm: allwinner: Add support for bank supply Each GPIO bank is powered by a different pin and so can be powered at different voltage from different regulators. Add a new config that now hold the pinmux data and the banks available on each SoCs. Since the aw_gpio driver being also the pinmux one it's attached before the PMIC so add a config_intrhook_oneshot function that will enable the needed regulators when the system is fully functional. r356802: arm: allwinner: ahci: target-supply is optional The target-supply regulator is optional so don't fail if it's not present. While here disable the clock on detach. X-MFC-With: 356600 Added: stable/12/sys/dts/arm64/overlays/sun50i-a64-spi0-spigen.dtso - copied unchanged from r356637, head/sys/dts/arm64/overlays/sun50i-a64-spi0-spigen.dtso Modified: stable/12/sys/arm/allwinner/a10_ahci.c stable/12/sys/arm/allwinner/aw_gpio.c stable/12/sys/arm/allwinner/aw_spi.c stable/12/sys/arm/allwinner/axp209.c stable/12/sys/arm/allwinner/axp81x.c stable/12/sys/dev/iicbus/twsi/twsi.c stable/12/sys/dev/iicbus/twsi/twsi.h stable/12/sys/modules/dtb/allwinner/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/a10_ahci.c ============================================================================== --- stable/12/sys/arm/allwinner/a10_ahci.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/arm/allwinner/a10_ahci.c Thu Jun 18 23:21:12 2020 (r362350) @@ -123,6 +123,8 @@ __FBSDID("$FreeBSD$"); struct ahci_a10_softc { struct ahci_controller ahci_ctlr; regulator_t ahci_reg; + clk_t clk_pll; + clk_t clk_gate; }; static void inline @@ -304,11 +306,9 @@ ahci_a10_attach(device_t dev) int error; struct ahci_a10_softc *sc; struct ahci_controller *ctlr; - clk_t clk_pll, clk_gate; sc = device_get_softc(dev); ctlr = &sc->ahci_ctlr; - clk_pll = clk_gate = NULL; ctlr->quirks = AHCI_Q_NOPMP; ctlr->vendorid = 0; @@ -320,41 +320,38 @@ ahci_a10_attach(device_t dev) &ctlr->r_rid, RF_ACTIVE))) return (ENXIO); - /* Enable the regulator */ - error = regulator_get_by_ofw_property(dev, 0, "target-supply", - &sc->ahci_reg); - if (error != 0) { - device_printf(dev, "Cannot get regulator\n"); - goto fail; + /* Enable the (optional) regulator */ + if (regulator_get_by_ofw_property(dev, 0, "target-supply", + &sc->ahci_reg) == 0) { + error = regulator_enable(sc->ahci_reg); + if (error != 0) { + device_printf(dev, "Could not enable regulator\n"); + goto fail; + } } - error = regulator_enable(sc->ahci_reg); - if (error != 0) { - device_printf(dev, "Could not enable regulator\n"); - goto fail; - } /* Enable clocks */ - error = clk_get_by_ofw_index(dev, 0, 0, &clk_gate); + error = clk_get_by_ofw_index(dev, 0, 0, &sc->clk_gate); if (error != 0) { device_printf(dev, "Cannot get gate clock\n"); goto fail; } - error = clk_get_by_ofw_index(dev, 0, 1, &clk_pll); + error = clk_get_by_ofw_index(dev, 0, 1, &sc->clk_pll); if (error != 0) { device_printf(dev, "Cannot get PLL clock\n"); goto fail; } - error = clk_set_freq(clk_pll, PLL_FREQ, CLK_SET_ROUND_DOWN); + error = clk_set_freq(sc->clk_pll, PLL_FREQ, CLK_SET_ROUND_DOWN); if (error != 0) { device_printf(dev, "Cannot set PLL frequency\n"); goto fail; } - error = clk_enable(clk_pll); + error = clk_enable(sc->clk_pll); if (error != 0) { device_printf(dev, "Cannot enable PLL\n"); goto fail; } - error = clk_enable(clk_gate); + error = clk_enable(sc->clk_gate); if (error != 0) { device_printf(dev, "Cannot enable clk gate\n"); goto fail; @@ -379,12 +376,12 @@ ahci_a10_attach(device_t dev) return (ahci_attach(dev)); fail: - if (sc->ahci_reg != 0) + if (sc->ahci_reg != NULL) regulator_disable(sc->ahci_reg); - if (clk_gate != NULL) - clk_release(clk_gate); - if (clk_pll != NULL) - clk_release(clk_pll); + if (sc->clk_gate != NULL) + clk_release(sc->clk_gate); + if (sc->clk_pll != NULL) + clk_release(sc->clk_pll); bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); return (error); } @@ -392,7 +389,19 @@ fail: static int ahci_a10_detach(device_t dev) { + struct ahci_a10_softc *sc; + struct ahci_controller *ctlr; + sc = device_get_softc(dev); + ctlr = &sc->ahci_ctlr; + + if (sc->ahci_reg != NULL) + regulator_disable(sc->ahci_reg); + if (sc->clk_gate != NULL) + clk_release(sc->clk_gate); + if (sc->clk_pll != NULL) + clk_release(sc->clk_pll); + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); return (ahci_detach(dev)); } Modified: stable/12/sys/arm/allwinner/aw_gpio.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:21:12 2020 (r362350) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(__aarch64__) #include "opt_soc.h" @@ -78,102 +79,167 @@ __FBSDID("$FreeBSD$"); #define AW_PINCTRL 1 #define AW_R_PINCTRL 2 +struct aw_gpio_conf { + struct allwinner_padconf *padconf; + const char *banks; +}; + /* Defined in aw_padconf.c */ #ifdef SOC_ALLWINNER_A10 -extern const struct allwinner_padconf a10_padconf; +extern struct allwinner_padconf a10_padconf; +struct aw_gpio_conf a10_gpio_conf = { + .padconf = &a10_padconf, + .banks = "abcdefghi", +}; #endif /* Defined in a13_padconf.c */ #ifdef SOC_ALLWINNER_A13 -extern const struct allwinner_padconf a13_padconf; +extern struct allwinner_padconf a13_padconf; +struct aw_gpio_conf a13_gpio_conf = { + .padconf = &a13_padconf, + .banks = "bcdefg", +}; #endif /* Defined in a20_padconf.c */ #ifdef SOC_ALLWINNER_A20 -extern const struct allwinner_padconf a20_padconf; +extern struct allwinner_padconf a20_padconf; +struct aw_gpio_conf a20_gpio_conf = { + .padconf = &a20_padconf, + .banks = "abcdefghi", +}; #endif /* Defined in a31_padconf.c */ #ifdef SOC_ALLWINNER_A31 -extern const struct allwinner_padconf a31_padconf; +extern struct allwinner_padconf a31_padconf; +struct aw_gpio_conf a31_gpio_conf = { + .padconf = &a31_padconf, + .banks = "abcdefgh", +}; #endif /* Defined in a31s_padconf.c */ #ifdef SOC_ALLWINNER_A31S -extern const struct allwinner_padconf a31s_padconf; +extern struct allwinner_padconf a31s_padconf; +struct aw_gpio_conf a31s_gpio_conf = { + .padconf = &a31s_padconf, + .banks = "abcdefgh", +}; #endif #if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) -extern const struct allwinner_padconf a31_r_padconf; +extern struct allwinner_padconf a31_r_padconf; +struct aw_gpio_conf a31_r_gpio_conf = { + .padconf = &a31_r_padconf, + .banks = "lm", +}; #endif /* Defined in a33_padconf.c */ #ifdef SOC_ALLWINNER_A33 -extern const struct allwinner_padconf a33_padconf; +extern struct allwinner_padconf a33_padconf; +struct aw_gpio_conf a33_gpio_conf = { + .padconf = &a33_padconf, + .banks = "bcdefgh", +}; #endif /* Defined in h3_padconf.c */ #if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) -extern const struct allwinner_padconf h3_padconf; -extern const struct allwinner_padconf h3_r_padconf; +extern struct allwinner_padconf h3_padconf; +extern struct allwinner_padconf h3_r_padconf; +struct aw_gpio_conf h3_gpio_conf = { + .padconf = &h3_padconf, + .banks = "acdefg", +}; +struct aw_gpio_conf h3_r_gpio_conf = { + .padconf = &h3_r_padconf, + .banks = "l", +}; #endif /* Defined in a83t_padconf.c */ #ifdef SOC_ALLWINNER_A83T -extern const struct allwinner_padconf a83t_padconf; -extern const struct allwinner_padconf a83t_r_padconf; +extern struct allwinner_padconf a83t_padconf; +extern struct allwinner_padconf a83t_r_padconf; +struct aw_gpio_conf a83t_gpio_conf = { + .padconf = &a83t_padconf, + .banks = "bcdefgh" +}; +struct aw_gpio_conf a83t_r_gpio_conf = { + .padconf = &a83t_r_padconf, + .banks = "l", +}; #endif /* Defined in a64_padconf.c */ #ifdef SOC_ALLWINNER_A64 -extern const struct allwinner_padconf a64_padconf; -extern const struct allwinner_padconf a64_r_padconf; +extern struct allwinner_padconf a64_padconf; +extern struct allwinner_padconf a64_r_padconf; +struct aw_gpio_conf a64_gpio_conf = { + .padconf = &a64_padconf, + .banks = "bcdefgh", +}; +struct aw_gpio_conf a64_r_gpio_conf = { + .padconf = &a64_r_padconf, + .banks = "l", +}; #endif /* Defined in h6_padconf.c */ #ifdef SOC_ALLWINNER_H6 -extern const struct allwinner_padconf h6_padconf; -extern const struct allwinner_padconf h6_r_padconf; +extern struct allwinner_padconf h6_padconf; +extern struct allwinner_padconf h6_r_padconf; +struct aw_gpio_conf h6_gpio_conf = { + .padconf = &h6_padconf, + .banks = "cdfgh", +}; +struct aw_gpio_conf h6_r_gpio_conf = { + .padconf = &h6_r_padconf, + .banks = "lm", +}; #endif static struct ofw_compat_data compat_data[] = { #ifdef SOC_ALLWINNER_A10 - {"allwinner,sun4i-a10-pinctrl", (uintptr_t)&a10_padconf}, + {"allwinner,sun4i-a10-pinctrl", (uintptr_t)&a10_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A13 - {"allwinner,sun5i-a13-pinctrl", (uintptr_t)&a13_padconf}, + {"allwinner,sun5i-a13-pinctrl", (uintptr_t)&a13_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A20 - {"allwinner,sun7i-a20-pinctrl", (uintptr_t)&a20_padconf}, + {"allwinner,sun7i-a20-pinctrl", (uintptr_t)&a20_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A31 - {"allwinner,sun6i-a31-pinctrl", (uintptr_t)&a31_padconf}, + {"allwinner,sun6i-a31-pinctrl", (uintptr_t)&a31_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A31S - {"allwinner,sun6i-a31s-pinctrl", (uintptr_t)&a31s_padconf}, + {"allwinner,sun6i-a31s-pinctrl", (uintptr_t)&a31s_gpio_conf}, #endif #if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) - {"allwinner,sun6i-a31-r-pinctrl", (uintptr_t)&a31_r_padconf}, + {"allwinner,sun6i-a31-r-pinctrl", (uintptr_t)&a31_r_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A33 - {"allwinner,sun6i-a33-pinctrl", (uintptr_t)&a33_padconf}, + {"allwinner,sun6i-a33-pinctrl", (uintptr_t)&a33_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A83T - {"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_padconf}, - {"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_padconf}, + {"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_gpio_conf}, + {"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_gpio_conf}, #endif #if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) - {"allwinner,sun8i-h3-pinctrl", (uintptr_t)&h3_padconf}, - {"allwinner,sun50i-h5-pinctrl", (uintptr_t)&h3_padconf}, - {"allwinner,sun8i-h3-r-pinctrl", (uintptr_t)&h3_r_padconf}, + {"allwinner,sun8i-h3-pinctrl", (uintptr_t)&h3_gpio_conf}, + {"allwinner,sun50i-h5-pinctrl", (uintptr_t)&h3_gpio_conf}, + {"allwinner,sun8i-h3-r-pinctrl", (uintptr_t)&h3_r_gpio_conf}, #endif #ifdef SOC_ALLWINNER_A64 - {"allwinner,sun50i-a64-pinctrl", (uintptr_t)&a64_padconf}, - {"allwinner,sun50i-a64-r-pinctrl", (uintptr_t)&a64_r_padconf}, + {"allwinner,sun50i-a64-pinctrl", (uintptr_t)&a64_gpio_conf}, + {"allwinner,sun50i-a64-r-pinctrl", (uintptr_t)&a64_r_gpio_conf}, #endif #ifdef SOC_ALLWINNER_H6 - {"allwinner,sun50i-h6-pinctrl", (uintptr_t)&h6_padconf}, - {"allwinner,sun50i-h6-r-pinctrl", (uintptr_t)&h6_r_padconf}, + {"allwinner,sun50i-h6-pinctrl", (uintptr_t)&h6_gpio_conf}, + {"allwinner,sun50i-h6-r-pinctrl", (uintptr_t)&h6_r_gpio_conf}, #endif {NULL, 0} }; @@ -192,7 +258,7 @@ struct aw_gpio_softc { bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; void * sc_intrhand; - const struct allwinner_padconf * padconf; + struct aw_gpio_conf *conf; TAILQ_HEAD(, clk_list) clk_list; }; @@ -237,10 +303,10 @@ aw_gpio_get_function(struct aw_gpio_softc *sc, uint32_ /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (0); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x07) << 2); func = AW_GPIO_READ(sc, AW_GPIO_GP_CFG(bank, pin >> 3)); @@ -254,14 +320,14 @@ aw_gpio_set_function(struct aw_gpio_softc *sc, uint32_ uint32_t bank, data, offset; /* Check if the function exists in the padconf data */ - if (sc->padconf->pins[pin].functions[f] == NULL) + if (sc->conf->padconf->pins[pin].functions[f] == NULL) return (EINVAL); /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x07) << 2); data = AW_GPIO_READ(sc, AW_GPIO_GP_CFG(bank, pin >> 3)); @@ -280,8 +346,8 @@ aw_gpio_get_pud(struct aw_gpio_softc *sc, uint32_t pin /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x0f) << 1); val = AW_GPIO_READ(sc, AW_GPIO_GP_PUL(bank, pin >> 4)); @@ -300,8 +366,8 @@ aw_gpio_set_pud(struct aw_gpio_softc *sc, uint32_t pin /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x0f) << 1); val = AW_GPIO_READ(sc, AW_GPIO_GP_PUL(bank, pin >> 4)); @@ -318,8 +384,8 @@ aw_gpio_get_drv(struct aw_gpio_softc *sc, uint32_t pin /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x0f) << 1); val = AW_GPIO_READ(sc, AW_GPIO_GP_DRV(bank, pin >> 4)); @@ -338,8 +404,8 @@ aw_gpio_set_drv(struct aw_gpio_softc *sc, uint32_t pin /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; offset = ((pin & 0x0f) << 1); val = AW_GPIO_READ(sc, AW_GPIO_GP_DRV(bank, pin >> 4)); @@ -357,7 +423,7 @@ aw_gpio_pin_configure(struct aw_gpio_softc *sc, uint32 /* Must be called with lock held. */ AW_GPIO_LOCK_ASSERT(sc); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (EINVAL); /* Manage input/output. */ @@ -412,7 +478,7 @@ aw_gpio_pin_max(device_t dev, int *maxpin) sc = device_get_softc(dev); - *maxpin = sc->padconf->npins - 1; + *maxpin = sc->conf->padconf->npins - 1; return (0); } @@ -422,7 +488,7 @@ aw_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32 struct aw_gpio_softc *sc; sc = device_get_softc(dev); - if (pin >= sc->padconf->npins) + if (pin >= sc->conf->padconf->npins) return (EINVAL); *caps = AW_GPIO_DEFAULT_CAPS; @@ -438,7 +504,7 @@ aw_gpio_pin_getflags(device_t dev, uint32_t pin, uint3 uint32_t pud; sc = device_get_softc(dev); - if (pin >= sc->padconf->npins) + if (pin >= sc->conf->padconf->npins) return (EINVAL); AW_GPIO_LOCK(sc); @@ -478,11 +544,11 @@ aw_gpio_pin_getname(device_t dev, uint32_t pin, char * struct aw_gpio_softc *sc; sc = device_get_softc(dev); - if (pin >= sc->padconf->npins) + if (pin >= sc->conf->padconf->npins) return (EINVAL); snprintf(name, GPIOMAXNAME - 1, "%s", - sc->padconf->pins[pin].name); + sc->conf->padconf->pins[pin].name); name[GPIOMAXNAME - 1] = '\0'; return (0); @@ -495,7 +561,7 @@ aw_gpio_pin_setflags(device_t dev, uint32_t pin, uint3 int err; sc = device_get_softc(dev); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (EINVAL); AW_GPIO_LOCK(sc); @@ -513,11 +579,11 @@ aw_gpio_pin_set_locked(struct aw_gpio_softc *sc, uint3 AW_GPIO_LOCK_ASSERT(sc); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (EINVAL); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; data = AW_GPIO_READ(sc, AW_GPIO_GP_DAT(bank)); if (value) @@ -552,11 +618,11 @@ aw_gpio_pin_get_locked(struct aw_gpio_softc *sc,uint32 AW_GPIO_LOCK_ASSERT(sc); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (EINVAL); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; reg_data = AW_GPIO_READ(sc, AW_GPIO_GP_DAT(bank)); *val = (reg_data & (1 << pin)) ? 1 : 0; @@ -655,11 +721,11 @@ aw_gpio_pin_toggle(device_t dev, uint32_t pin) uint32_t bank, data; sc = device_get_softc(dev); - if (pin > sc->padconf->npins) + if (pin > sc->conf->padconf->npins) return (EINVAL); - bank = sc->padconf->pins[pin].port; - pin = sc->padconf->pins[pin].pin; + bank = sc->conf->padconf->pins[pin].port; + pin = sc->conf->padconf->pins[pin].pin; AW_GPIO_LOCK(sc); data = AW_GPIO_READ(sc, AW_GPIO_GP_DAT(bank)); @@ -681,7 +747,7 @@ aw_gpio_pin_access_32(device_t dev, uint32_t first_pin uint32_t bank, data, pin; sc = device_get_softc(dev); - if (first_pin > sc->padconf->npins) + if (first_pin > sc->conf->padconf->npins) return (EINVAL); /* @@ -690,8 +756,8 @@ aw_gpio_pin_access_32(device_t dev, uint32_t first_pin * change simultaneously (required) with reasonably high performance * (desired); we need to do a read-modify-write on a single register. */ - bank = sc->padconf->pins[first_pin].port; - pin = sc->padconf->pins[first_pin].pin; + bank = sc->conf->padconf->pins[first_pin].port; + pin = sc->conf->padconf->pins[first_pin].pin; if (pin != 0) return (EINVAL); @@ -717,11 +783,11 @@ aw_gpio_pin_config_32(device_t dev, uint32_t first_pin int err; sc = device_get_softc(dev); - if (first_pin > sc->padconf->npins) + if (first_pin > sc->conf->padconf->npins) return (EINVAL); - bank = sc->padconf->pins[first_pin].port; - if (sc->padconf->pins[first_pin].pin != 0) + bank = sc->conf->padconf->pins[first_pin].port; + if (sc->conf->padconf->pins[first_pin].pin != 0) return (EINVAL); /* @@ -745,8 +811,8 @@ aw_find_pinnum_by_name(struct aw_gpio_softc *sc, const { int i; - for (i = 0; i < sc->padconf->npins; i++) - if (!strcmp(pinname, sc->padconf->pins[i].name)) + for (i = 0; i < sc->conf->padconf->npins; i++) + if (!strcmp(pinname, sc->conf->padconf->pins[i].name)) return i; return (-1); @@ -758,8 +824,8 @@ aw_find_pin_func(struct aw_gpio_softc *sc, int pin, co int i; for (i = 0; i < AW_MAX_FUNC_BY_PIN; i++) - if (sc->padconf->pins[pin].functions[i] && - !strcmp(func, sc->padconf->pins[pin].functions[i])) + if (sc->conf->padconf->pins[pin].functions[i] && + !strcmp(func, sc->conf->padconf->pins[pin].functions[i])) return (i); return (-1); @@ -828,6 +894,33 @@ aw_fdt_configure_pins(device_t dev, phandle_t cfgxref) return (ret); } +static void +aw_gpio_enable_bank_supply(void *arg) +{ + struct aw_gpio_softc *sc = arg; + regulator_t vcc_supply; + char bank_reg_name[16]; + int i, nbanks; + + nbanks = strlen(sc->conf->banks); + for (i = 0; i < nbanks; i++) { + snprintf(bank_reg_name, sizeof(bank_reg_name), "vcc-p%c-supply", + sc->conf->banks[i]); + + if (regulator_get_by_ofw_property(sc->sc_dev, 0, bank_reg_name, &vcc_supply) == 0) { + if (bootverbose) + device_printf(sc->sc_dev, + "Enabling regulator for gpio bank %c\n", + sc->conf->banks[i]); + if (regulator_enable(vcc_supply) != 0) { + device_printf(sc->sc_dev, + "Cannot enable regulator for bank %c\n", + sc->conf->banks[i]); + } + } + } +} + static int aw_gpio_probe(device_t dev) { @@ -884,7 +977,7 @@ aw_gpio_attach(device_t dev) goto fail; /* Use the right pin data for the current SoC */ - sc->padconf = (struct allwinner_padconf *)ofw_bus_search_compatible(dev, + sc->conf = (struct aw_gpio_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; if (hwreset_get_by_ofw_idx(dev, 0, 0, &rst) == 0) { @@ -928,6 +1021,8 @@ aw_gpio_attach(device_t dev) fdt_pinctrl_register(dev, "allwinner,pins"); fdt_pinctrl_configure_tree(dev); + config_intrhook_oneshot(aw_gpio_enable_bank_supply, sc); + return (0); fail: @@ -985,9 +1080,9 @@ aw_gpio_map_gpios(device_t bus, phandle_t dev, phandle sc = device_get_softc(bus); /* The GPIO pins are mapped as: . */ - for (i = 0; i < sc->padconf->npins; i++) - if (sc->padconf->pins[i].port == gpios[0] && - sc->padconf->pins[i].pin == gpios[1]) { + for (i = 0; i < sc->conf->padconf->npins; i++) + if (sc->conf->padconf->pins[i].port == gpios[0] && + sc->conf->padconf->pins[i].pin == gpios[1]) { *pin = i; break; } Modified: stable/12/sys/arm/allwinner/aw_spi.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_spi.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/arm/allwinner/aw_spi.c Thu Jun 18 23:21:12 2020 (r362350) @@ -240,7 +240,7 @@ aw_spi_attach(device_t dev) sc->spibus = device_add_child(dev, "spibus", -1); - return (0); + return (bus_generic_attach(dev)); fail: aw_spi_detach(dev); Modified: stable/12/sys/arm/allwinner/axp209.c ============================================================================== --- stable/12/sys/arm/allwinner/axp209.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/arm/allwinner/axp209.c Thu Jun 18 23:21:12 2020 (r362350) @@ -709,6 +709,22 @@ axp2xx_regnode_voltage_to_reg(struct axp2xx_reg_sc *sc } static int +axp2xx_regnode_status(struct regnode *regnode, int *status) +{ + struct axp2xx_reg_sc *sc; + uint8_t val; + + sc = regnode_get_softc(regnode); + + *status = 0; + axp2xx_read(sc->base_dev, sc->def->enable_reg, &val, 1); + if (val & sc->def->enable_mask) + *status = REGULATOR_STATUS_ENABLED; + + return (0); +} + +static int axp2xx_regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay) { @@ -751,6 +767,7 @@ static regnode_method_t axp2xx_regnode_methods[] = { /* Regulator interface */ REGNODEMETHOD(regnode_init, axp2xx_regnode_init), REGNODEMETHOD(regnode_enable, axp2xx_regnode_enable), + REGNODEMETHOD(regnode_status, axp2xx_regnode_status), REGNODEMETHOD(regnode_set_voltage, axp2xx_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, axp2xx_regnode_get_voltage), REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), Modified: stable/12/sys/arm/allwinner/axp81x.c ============================================================================== --- stable/12/sys/arm/allwinner/axp81x.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/arm/allwinner/axp81x.c Thu Jun 18 23:21:12 2020 (r362350) @@ -438,6 +438,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL3, .enable_mask = (uint8_t) AXP_POWERCTL3_ALDO1, .enable_value = AXP_POWERCTL3_ALDO1, + .voltage_reg = AXP_VOLTCTL_ALDO1, .voltage_min = 700, .voltage_max = 3300, .voltage_step1 = 100, @@ -449,6 +450,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL3, .enable_mask = (uint8_t) AXP_POWERCTL3_ALDO2, .enable_value = AXP_POWERCTL3_ALDO2, + .voltage_reg = AXP_VOLTCTL_ALDO2, .voltage_min = 700, .voltage_max = 3300, .voltage_step1 = 100, @@ -460,6 +462,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL3, .enable_mask = (uint8_t) AXP_POWERCTL3_ALDO3, .enable_value = AXP_POWERCTL3_ALDO3, + .voltage_reg = AXP_VOLTCTL_ALDO3, .voltage_min = 700, .voltage_max = 3300, .voltage_step1 = 100, @@ -471,6 +474,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL2, .enable_mask = (uint8_t) AXP_POWERCTL2_ELDO1, .enable_value = AXP_POWERCTL2_ELDO1, + .voltage_reg = AXP_VOLTCTL_ELDO1, .voltage_min = 700, .voltage_max = 1900, .voltage_step1 = 50, @@ -482,6 +486,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL2, .enable_mask = (uint8_t) AXP_POWERCTL2_ELDO2, .enable_value = AXP_POWERCTL2_ELDO2, + .voltage_reg = AXP_VOLTCTL_ELDO2, .voltage_min = 700, .voltage_max = 1900, .voltage_step1 = 50, @@ -493,6 +498,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL2, .enable_mask = (uint8_t) AXP_POWERCTL2_ELDO3, .enable_value = AXP_POWERCTL2_ELDO3, + .voltage_reg = AXP_VOLTCTL_ELDO3, .voltage_min = 700, .voltage_max = 1900, .voltage_step1 = 50, @@ -504,6 +510,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL3, .enable_mask = (uint8_t) AXP_POWERCTL3_FLDO1, .enable_value = AXP_POWERCTL3_FLDO1, + .voltage_reg = AXP_VOLTCTL_FLDO1, .voltage_min = 700, .voltage_max = 1450, .voltage_step1 = 50, @@ -515,6 +522,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .enable_reg = AXP_POWERCTL3, .enable_mask = (uint8_t) AXP_POWERCTL3_FLDO2, .enable_value = AXP_POWERCTL3_FLDO2, + .voltage_reg = AXP_VOLTCTL_FLDO2, .voltage_min = 700, .voltage_max = 1450, .voltage_step1 = 50, @@ -703,6 +711,8 @@ struct axp8xx_softc { #define AXP_LOCK(sc) mtx_lock(&(sc)->mtx) #define AXP_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +static int axp8xx_regnode_set_voltage(struct regnode *regnode, int min_uvolt, + int max_uvolt, int *udelay); static int axp8xx_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) @@ -747,6 +757,31 @@ axp8xx_write(device_t dev, uint8_t reg, uint8_t val) } static int +axp8xx_regnode_init(struct regnode *regnode) +{ + struct axp8xx_reg_sc *sc; + struct regnode_std_param *param; + int rv, udelay; + + sc = regnode_get_softc(regnode); + param = regnode_get_stdparam(regnode); + if (param->min_uvolt == 0) + return (0); + + /* + * Set the regulator at the correct voltage + * Do not enable it, this is will be done either by a + * consumer or by regnode_set_constraint if boot_on is true + */ + rv = axp8xx_regnode_set_voltage(regnode, param->min_uvolt, + param->max_uvolt, &udelay); + if (rv != 0) + DELAY(udelay); + + return (rv); +} + +static int axp8xx_regnode_enable(struct regnode *regnode, bool enable, int *udelay) { struct axp8xx_reg_sc *sc; @@ -863,6 +898,7 @@ axp8xx_regnode_get_voltage(struct regnode *regnode, in static regnode_method_t axp8xx_regnode_methods[] = { /* Regulator interface */ + REGNODEMETHOD(regnode_init, axp8xx_regnode_init), REGNODEMETHOD(regnode_enable, axp8xx_regnode_enable), REGNODEMETHOD(regnode_set_voltage, axp8xx_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, axp8xx_regnode_get_voltage), Modified: stable/12/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- stable/12/sys/dev/iicbus/twsi/twsi.c Thu Jun 18 23:18:47 2020 (r362349) +++ stable/12/sys/dev/iicbus/twsi/twsi.c Thu Jun 18 23:21:12 2020 (r362350) @@ -481,7 +481,6 @@ static int twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct twsi_softc *sc; - int i; sc = device_get_softc(dev); @@ -495,28 +494,25 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint TWSI_WRITE(sc, sc->reg_control, sc->control_val); debugf(dev, "transmitting %d messages\n", nmsgs); debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); - for (i = 0; i < nmsgs && sc->error == 0; i++) { - sc->transfer = 1; - sc->msg = &msgs[i]; - debugf(dev, "msg[%d] flags: %x\n", i, msgs[i].flags); - debugf(dev, "msg[%d] len: %d\n", i, msgs[i].len); + sc->nmsgs = nmsgs; + sc->msgs = msgs; + sc->msg_idx = 0; + sc->transfer = 1; - /* Send start and re-enable interrupts */ - sc->control_val = TWSI_CONTROL_TWSIEN | - TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; - if (sc->msg->len == 1) - sc->control_val &= ~TWSI_CONTROL_ACK; - TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); - while (sc->error == 0 && sc->transfer != 0) { - pause_sbt("twsi", SBT_1MS * 30, SBT_1MS, 0); - } + /* Send start and re-enable interrupts */ + sc->control_val = TWSI_CONTROL_TWSIEN | + TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; + if (sc->msgs[0].len == 1) + sc->control_val &= ~TWSI_CONTROL_ACK; + TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); + while (sc->error == 0 && sc->transfer != 0) { + pause_sbt("twsi", SBT_1MS * 30, SBT_1MS, 0); + } + debugf(sc->dev, "pause finish\n"); - debugf(dev, "Done with msg[%d]\n", i); - if (sc->error) { - debugf(sc->dev, "Error, aborting (%d)\n", sc->error); - TWSI_WRITE(sc, sc->reg_control, 0); - goto out; - } + if (sc->error) { + debugf(sc->dev, "Error, aborting (%d)\n", sc->error); + TWSI_WRITE(sc, sc->reg_control, 0); } /* Disable module and interrupts */ @@ -524,7 +520,6 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint TWSI_WRITE(sc, sc->reg_control, 0); debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); -out: return (sc->error); } @@ -537,122 +532,123 @@ twsi_intr(void *arg) sc = arg; - debugf(sc->dev, "Got interrupt\n"); + debugf(sc->dev, "Got interrupt Current msg=%x\n", sc->msg_idx); - while (TWSI_READ(sc, sc->reg_control) & TWSI_CONTROL_IFLG) { - status = TWSI_READ(sc, sc->reg_status); - debugf(sc->dev, "status=%x\n", status); + status = TWSI_READ(sc, sc->reg_status); + debugf(sc->dev, "initial status=%x\n", status); - switch (status) { - case TWSI_STATUS_START: - case TWSI_STATUS_RPTD_START: - /* Transmit the address */ - debugf(sc->dev, "Send the address\n"); + switch (status) { + case TWSI_STATUS_START: + case TWSI_STATUS_RPTD_START: + /* Transmit the address */ + debugf(sc->dev, "Send the address\n"); - if (sc->msg->flags & IIC_M_RD) - TWSI_WRITE(sc, sc->reg_data, - sc->msg->slave | LSB); - else - TWSI_WRITE(sc, sc->reg_data, - sc->msg->slave & ~LSB); + if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) + TWSI_WRITE(sc, sc->reg_data, + sc->msgs[sc->msg_idx].slave | LSB); + else + TWSI_WRITE(sc, sc->reg_data, + sc->msgs[sc->msg_idx].slave & ~LSB); + TWSI_WRITE(sc, sc->reg_control, sc->control_val); + break; - TWSI_WRITE(sc, sc->reg_control, sc->control_val); - break; + case TWSI_STATUS_ADDR_W_ACK: + debugf(sc->dev, "Ack received after transmitting the address (write)\n"); + /* Directly send the first byte */ + sc->sent_bytes = 0; + debugf(sc->dev, "Sending byte 0 = %x\n", sc->msgs[sc->msg_idx].buf[0]); + TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[0]); - case TWSI_STATUS_ADDR_W_ACK: - debugf(sc->dev, "Ack received after transmitting the address\n"); - /* Directly send the first byte */ - sc->sent_bytes = 0; - debugf(sc->dev, "Sending byte 0 = %x\n", sc->msg->buf[0]); - TWSI_WRITE(sc, sc->reg_data, sc->msg->buf[0]); + TWSI_WRITE(sc, sc->reg_control, sc->control_val); + break; - TWSI_WRITE(sc, sc->reg_control, sc->control_val); - break; + case TWSI_STATUS_ADDR_R_ACK: + debugf(sc->dev, "Ack received after transmitting the address (read)\n"); + sc->recv_bytes = 0; - case TWSI_STATUS_ADDR_R_ACK: - debugf(sc->dev, "Ack received after transmitting the address\n"); - sc->recv_bytes = 0; + TWSI_WRITE(sc, sc->reg_control, sc->control_val); + break; - TWSI_WRITE(sc, sc->reg_control, sc->control_val); - break; + case TWSI_STATUS_ADDR_W_NACK: + case TWSI_STATUS_ADDR_R_NACK: + debugf(sc->dev, "No ack received after transmitting the address\n"); + sc->transfer = 0; + sc->error = ETIMEDOUT; + sc->control_val = 0; + wakeup(sc); + break; - case TWSI_STATUS_ADDR_W_NACK: - case TWSI_STATUS_ADDR_R_NACK: - debugf(sc->dev, "No ack received after transmitting the address\n"); - sc->transfer = 0; - sc->error = ETIMEDOUT; - sc->control_val = 0; - wakeup(sc); - break; - - case TWSI_STATUS_DATA_WR_ACK: - debugf(sc->dev, "Ack received after transmitting data\n"); - if (sc->sent_bytes++ == (sc->msg->len - 1)) { - debugf(sc->dev, "Done sending all the bytes\n"); - /* Send stop, no interrupts on stop */ - if (!(sc->msg->flags & IIC_M_NOSTOP)) { - debugf(sc->dev, "Done TX data, send stop\n"); - TWSI_WRITE(sc, sc->reg_control, - sc->control_val | TWSI_CONTROL_STOP); - } else { - sc->control_val &= ~TWSI_CONTROL_INTEN; - TWSI_WRITE(sc, sc->reg_control, - sc->control_val); - } - transfer_done = 1; - } else { - debugf(sc->dev, "Sending byte %d = %x\n", - sc->sent_bytes, - sc->msg->buf[sc->sent_bytes]); - TWSI_WRITE(sc, sc->reg_data, - sc->msg->buf[sc->sent_bytes]); + case TWSI_STATUS_DATA_WR_ACK: + debugf(sc->dev, "Ack received after transmitting data\n"); + if (sc->sent_bytes++ == (sc->msgs[sc->msg_idx].len - 1)) { + debugf(sc->dev, "Done sending all the bytes for msg %d\n", sc->msg_idx); + /* Send stop, no interrupts on stop */ + if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { + debugf(sc->dev, "Done TX data, send stop\n"); TWSI_WRITE(sc, sc->reg_control, - sc->control_val); + sc->control_val | TWSI_CONTROL_STOP); + } else { + debugf(sc->dev, "Done TX data with NO_STOP\n"); + TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } + sc->msg_idx++; + if (sc->msg_idx == sc->nmsgs) { + debugf(sc->dev, "transfer_done=1\n"); + transfer_done = 1; + } + } else { + debugf(sc->dev, "Sending byte %d = %x\n", + sc->sent_bytes, + sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); + TWSI_WRITE(sc, sc->reg_data, + sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); + TWSI_WRITE(sc, sc->reg_control, + sc->control_val); + } + break; - break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Thu Jun 18 23:23:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3ED97337AF2; Thu, 18 Jun 2020 23:23:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nyfg6JXwz4Dyr; Thu, 18 Jun 2020 23:23:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D290D11AC0; Thu, 18 Jun 2020 23:23:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05INNNdi053278; Thu, 18 Jun 2020 23:23:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05INNLOp053264; Thu, 18 Jun 2020 23:23:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006182323.05INNLOp053264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 Jun 2020 23:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362351 - in stable/12/sys/arm/allwinner: . a10 a13 a20 a31 a33 a64 a83t h3 h6 X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/arm/allwinner: . a10 a13 a20 a31 a33 a64 a83t h3 h6 X-SVN-Commit-Revision: 362351 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 23:23:24 -0000 Author: manu Date: Thu Jun 18 23:23:21 2020 New Revision: 362351 URL: https://svnweb.freebsd.org/changeset/base/362351 Log: MFC r356888, r356891 r356888: arm: allwinner: Fix padconf for interrupts information Add a eint_bank member to the allwinner_pins structure. On Allwinner SoCs not all pins can do interrupt. Older SoC (A10/A13 and A20) there is a maximum number of interrupts set to 32 and all the configuration is done in the same registers. While on "newer" SoCs (>=A31) interrupts registers are splitted per pin bank (i.e. all interrupts available in bank B will be configured with a sets of registers and the one in bank G in another set). While here set the names to all interrupts function to pX_eintY where X is the bank name and Y the interrupt number. To whom ever in the future look at the H5 manual and notice that the bank F have interrupts support : This isn't true, trust me. r356891: arm: allwinner: Add GPIO Interrupt support Not all pins in Allwinner have interrupts support so we rely on the padconf data to add the proper caps when pin_getcaps is called. The pin is switch to the specific "eint" function during setup_intr and switched back to its old function in teardown_intr. Only INTR_MAP_DATA_GPIO is supported for now. Modified: stable/12/sys/arm/allwinner/a10/a10_padconf.c stable/12/sys/arm/allwinner/a13/a13_padconf.c stable/12/sys/arm/allwinner/a20/a20_padconf.c stable/12/sys/arm/allwinner/a31/a31_padconf.c stable/12/sys/arm/allwinner/a31/a31s_padconf.c stable/12/sys/arm/allwinner/a33/a33_padconf.c stable/12/sys/arm/allwinner/a64/a64_padconf.c stable/12/sys/arm/allwinner/a64/a64_r_padconf.c stable/12/sys/arm/allwinner/a83t/a83t_padconf.c stable/12/sys/arm/allwinner/allwinner_pinctrl.h stable/12/sys/arm/allwinner/aw_gpio.c stable/12/sys/arm/allwinner/h3/h3_padconf.c stable/12/sys/arm/allwinner/h3/h3_r_padconf.c stable/12/sys/arm/allwinner/h6/h6_padconf.c stable/12/sys/arm/allwinner/h6/h6_r_padconf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/a10/a10_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a10/a10_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a10/a10_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -170,28 +170,28 @@ const static struct allwinner_pins a10_pins[] = { {"PG10", 6, 10, {"gpio_in", "gpio_out", "ts1", "csi1", "uart4", "csi0", NULL, NULL}}, {"PG11", 6, 11, {"gpio_in", "gpio_out", "ts1", "csi1", "uart4", "csi0", NULL, NULL}}, - {"PH0", 7, 0, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "eint0", "csi1"}, 6, 0}, - {"PH1", 7, 1, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "eint1", "csi1"}, 6, 1}, - {"PH2", 7, 2, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "eint2", "csi1"}, 6, 2}, - {"PH3", 7, 3, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "eint3", "csi1"}, 6, 3}, - {"PH4", 7, 4, {"gpio_in", "gpio_out", "lcd1", "pata", "uart4", NULL, "eint4", "csi1"}, 6, 4}, - {"PH5", 7, 5, {"gpio_in", "gpio_out", "lcd1", "pata", "uart4", NULL, "eint5", "csi1"}, 6, 5}, - {"PH6", 7, 6, {"gpio_in", "gpio_out", "lcd1", "pata", "uart5", "ms", "eint6", "csi1"}, 6, 6}, - {"PH7", 7, 7, {"gpio_in", "gpio_out", "lcd1", "pata", "uart5", "ms", "eint7", "csi1"}, 6, 7}, - {"PH8", 7, 8, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "eint8", "csi1"}, 6, 8}, - {"PH9", 7, 9, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "eint9", "csi1"}, 6, 9}, - {"PH10", 7, 10, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "eint10", "csi1"}, 6, 10}, - {"PH11", 7, 11, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "eint11", "csi1"}, 6, 11}, - {"PH12", 7, 12, {"gpio_in", "gpio_out", "lcd1", "pata", "ps2", NULL, "eint12", "csi1"}, 6, 12}, - {"PH13", 7, 13, {"gpio_in", "gpio_out", "lcd1", "pata", "ps2", "sim", "eint13", "csi1"}, 6, 13}, - {"PH14", 7, 14, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "eint14", "csi1"}, 6, 14}, - {"PH15", 7, 15, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "eint15", "csi1"}, 6, 15}, - {"PH16", 7, 16, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", NULL, "eint16", "csi1"}, 6, 16}, - {"PH17", 7, 17, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "eint17", "csi1"}, 6, 17}, - {"PH18", 7, 18, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "eint18", "csi1"}, 6, 18}, - {"PH19", 7, 19, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "eint19", "csi1"}, 6, 19}, - {"PH20", 7, 20, {"gpio_in", "gpio_out", "lcd1", "pata", "can", NULL, "eint20", "csi1"}, 6, 20}, - {"PH21", 7, 21, {"gpio_in", "gpio_out", "lcd1", "pata", "can", NULL, "eint21", "csi1"}, 6, 21}, + {"PH0", 7, 0, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "ph_eint0", "csi1"}, 6, 0, 0}, + {"PH1", 7, 1, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "ph_eint1", "csi1"}, 6, 1, 0}, + {"PH2", 7, 2, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "ph_eint2", "csi1"}, 6, 2, 0}, + {"PH3", 7, 3, {"gpio_in", "gpio_out", "lcd1", "pata", "uart3", NULL, "ph_eint3", "csi1"}, 6, 3, 0}, + {"PH4", 7, 4, {"gpio_in", "gpio_out", "lcd1", "pata", "uart4", NULL, "ph_eint4", "csi1"}, 6, 4, 0}, + {"PH5", 7, 5, {"gpio_in", "gpio_out", "lcd1", "pata", "uart4", NULL, "ph_eint5", "csi1"}, 6, 5, 0}, + {"PH6", 7, 6, {"gpio_in", "gpio_out", "lcd1", "pata", "uart5", "ms", "ph_eint6", "csi1"}, 6, 6, 0}, + {"PH7", 7, 7, {"gpio_in", "gpio_out", "lcd1", "pata", "uart5", "ms", "ph_eint7", "csi1"}, 6, 7, 0}, + {"PH8", 7, 8, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "ph_eint8", "csi1"}, 6, 8, 0}, + {"PH9", 7, 9, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "ph_eint9", "csi1"}, 6, 9, 0}, + {"PH10", 7, 10, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "ph_eint10", "csi1"}, 6, 10, 0}, + {"PH11", 7, 11, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "ms", "ph_eint11", "csi1"}, 6, 11, 0}, + {"PH12", 7, 12, {"gpio_in", "gpio_out", "lcd1", "pata", "ps2", NULL, "ph_eint12", "csi1"}, 6, 12, 0}, + {"PH13", 7, 13, {"gpio_in", "gpio_out", "lcd1", "pata", "ps2", "sim", "ph_eint13", "csi1"}, 6, 13, 0}, + {"PH14", 7, 14, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "ph_eint14", "csi1"}, 6, 14, 0}, + {"PH15", 7, 15, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "ph_eint15", "csi1"}, 6, 15, 0}, + {"PH16", 7, 16, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", NULL, "ph_eint16", "csi1"}, 6, 16, 0}, + {"PH17", 7, 17, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "ph_eint17", "csi1"}, 6, 17, 0}, + {"PH18", 7, 18, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "ph_eint18", "csi1"}, 6, 18, 0}, + {"PH19", 7, 19, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "sim", "ph_eint19", "csi1"}, 6, 19, 0}, + {"PH20", 7, 20, {"gpio_in", "gpio_out", "lcd1", "pata", "can", NULL, "ph_eint20", "csi1"}, 6, 20, 0}, + {"PH21", 7, 21, {"gpio_in", "gpio_out", "lcd1", "pata", "can", NULL, "ph_eint21", "csi1"}, 6, 21, 0}, {"PH22", 7, 22, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "mmc1", NULL, "csi1"}}, {"PH23", 7, 23, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "mmc1", NULL, "csi1"}}, {"PH24", 7, 24, {"gpio_in", "gpio_out", "lcd1", "pata", "keypad", "mmc1", NULL, "csi1"}}, @@ -209,16 +209,16 @@ const static struct allwinner_pins a10_pins[] = { {"PI7", 8, 7, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, {"PI8", 8, 8, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, {"PI9", 8, 9, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, - {"PI10", 8, 10, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "eint22", NULL}, 6, 22}, - {"PI11", 8, 11, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "eint23", NULL}, 6, 23}, - {"PI12", 8, 12, {"gpio_in", "gpio_out", "spi0", "uart6", NULL, NULL, "eint24", NULL}, 6, 24}, - {"PI13", 8, 13, {"gpio_in", "gpio_out", "spi0", "uart6", NULL, NULL, "eint25", NULL}, 6, 25}, - {"PI14", 8, 14, {"gpio_in", "gpio_out", "spi0", "ps2", "timer4", NULL, "eint26", NULL}, 6, 26}, - {"PI15", 8, 15, {"gpio_in", "gpio_out", "spi1", "ps2", "timer5", NULL, "eint27", NULL}, 6, 27}, - {"PI16", 8, 16, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint28", NULL}, 6, 28}, - {"PI17", 8, 17, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint29", NULL}, 6, 29}, - {"PI18", 8, 18, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint30", NULL}, 6, 30}, - {"PI19", 8, 19, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint31", NULL}, 6, 31}, + {"PI10", 8, 10, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "pi_eint22", NULL}, 6, 22, 0}, + {"PI11", 8, 11, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "pi_eint23", NULL}, 6, 23, 0}, + {"PI12", 8, 12, {"gpio_in", "gpio_out", "spi0", "uart6", NULL, NULL, "pi_eint24", NULL}, 6, 24, 0}, + {"PI13", 8, 13, {"gpio_in", "gpio_out", "spi0", "uart6", NULL, NULL, "pi_eint25", NULL}, 6, 25, 0}, + {"PI14", 8, 14, {"gpio_in", "gpio_out", "spi0", "ps2", "timer4", NULL, "pi_eint26", NULL}, 6, 26, 0}, + {"PI15", 8, 15, {"gpio_in", "gpio_out", "spi1", "ps2", "timer5", NULL, "pi_eint27", NULL}, 6, 27, 0}, + {"PI16", 8, 16, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint28", NULL}, 6, 28, 0}, + {"PI17", 8, 17, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint29", NULL}, 6, 29, 0}, + {"PI18", 8, 18, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint30", NULL}, 6, 30, 0}, + {"PI19", 8, 19, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint31", NULL}, 6, 31, 0}, {"PI20", 8, 20, {"gpio_in", "gpio_out", "ps2", "uart7", "hdmi", NULL, NULL, NULL}}, {"PI21", 8, 21, {"gpio_in", "gpio_out", "ps2", "uart7", "hdmi", NULL, NULL, NULL}}, }; Modified: stable/12/sys/arm/allwinner/a13/a13_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a13/a13_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a13/a13_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -40,10 +40,10 @@ __FBSDID("$FreeBSD$"); const static struct allwinner_pins a13_pins[] = { {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, - {"PB2", 1, 2, {"gpio_in", "gpio_out", "pwm", NULL, NULL, NULL, "eint16", NULL}, 6, 16}, - {"PB3", 1, 3, {"gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint17", NULL}, 6, 17}, - {"PB4", 1, 4, {"gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint18", NULL}, 6, 18}, - {"PB10", 1, 10, {"gpio_in", "gpio_out", "spi2", NULL, NULL, NULL, "eint24", NULL}, 6, 24}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "pwm", NULL, NULL, NULL, "pb_eint16", NULL}, 6, 16, 0}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "pb_eint17", NULL}, 6, 17, 0}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "pb_eint18", NULL}, 6, 18, 0}, + {"PB10", 1, 10, {"gpio_in", "gpio_out", "spi2", NULL, NULL, NULL, "pb_eint24", NULL}, 6, 24, 0}, {"PB15", 1, 15, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, {"PB16", 1, 16, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, {"PB17", 1, 17, {"gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, NULL, NULL}}, @@ -90,8 +90,8 @@ const static struct allwinner_pins a13_pins[] = { {"PD26", 3, 26, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, {"PD27", 3, 27, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, - {"PE0", 4, 0, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, "eint14", NULL}, 6, 14}, - {"PE1", 4, 1, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, "eint15", NULL}, 6, 15}, + {"PE0", 4, 0, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, "pe_eint14", NULL}, 6, 14, 0}, + {"PE1", 4, 1, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, "pe_eint15", NULL}, 6, 15, 0}, {"PE2", 4, 2, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, NULL, NULL}}, {"PE3", 4, 3, {"gpio_in", "gpio_out", NULL, "csi0", "spi2", NULL, NULL, NULL}}, {"PE4", 4, 4, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, @@ -110,15 +110,15 @@ const static struct allwinner_pins a13_pins[] = { {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, - {"PG0", 6, 0, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint0", NULL}, 6, 0}, - {"PG1", 6, 1, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint1", NULL}, 6, 1}, - {"PG2", 6, 2, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint2", NULL}, 6, 2}, - {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "eint3", NULL}, 6, 3}, - {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "eint4", NULL}, 6, 4}, - {"PG9", 6, 9, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint9", NULL}, 6, 9}, - {"PG10", 6, 10, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint10", NULL}, 6, 10}, - {"PG11", 6, 11, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint11", NULL}, 6, 11}, - {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint12", NULL}, 6, 12}, + {"PG0", 6, 0, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "pg_eint0", NULL}, 6, 0, 6}, + {"PG1", 6, 1, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "pg_eint1", NULL}, 6, 1, 6}, + {"PG2", 6, 2, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "pg_eint2", NULL}, 6, 2, 6}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "pg_eint3", NULL}, 6, 3, 0}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "pg_eint4", NULL}, 6, 4, 0}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "pg_eint9", NULL}, 6, 9, 0}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "pg_eint10", NULL}, 6, 10, 0}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "pg_eint11", NULL}, 6, 11, 0}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "pg_eint12", NULL}, 6, 12, 0}, }; const struct allwinner_padconf a13_padconf = { Modified: stable/12/sys/arm/allwinner/a20/a20_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a20/a20_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a20/a20_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -101,10 +101,10 @@ const static struct allwinner_pins a20_pins[] = { {"PC16", 2, 16, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, {"PC17", 2, 17, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, {"PC18", 2, 18, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, - {"PC19", 2, 19, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, "eint12", NULL}, 6, 12}, - {"PC20", 2, 20, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, "eint13", NULL}, 6, 13}, - {"PC21", 2, 21, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, "eint14", NULL}, 6, 14}, - {"PC22", 2, 22, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, "eint15", NULL}, 6, 15}, + {"PC19", 2, 19, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, NULL, NULL}}, + {"PC20", 2, 20, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, NULL, NULL}}, + {"PC21", 2, 21, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, NULL, NULL}}, + {"PC22", 2, 22, {"gpio_in", "gpio_out", "nand0", "spi2", NULL, NULL, NULL, NULL}}, {"PC23", 2, 23, {"gpio_in", "gpio_out", NULL, "spi0", NULL, NULL, NULL, NULL}}, {"PC24", 2, 24, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, @@ -170,28 +170,28 @@ const static struct allwinner_pins a20_pins[] = { {"PG10", 6, 10, {"gpio_in", "gpio_out", "ts1", "csi1", "uart4", "csi0", NULL, NULL}}, {"PG11", 6, 11, {"gpio_in", "gpio_out", "ts1", "csi1", "uart4", "csi0", NULL, NULL}}, - {"PH0", 7, 0, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "eint0", "csi1"}, 6, 0}, - {"PH1", 7, 1, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "eint1", "csi1"}, 6, 1}, - {"PH2", 7, 2, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "eint2", "csi1"}, 6, 2}, - {"PH3", 7, 3, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "eint3", "csi1"}, 6, 3}, - {"PH4", 7, 4, {"gpio_in", "gpio_out", "lcd1", NULL, "uart4", NULL, "eint4", "csi1"}, 6, 4}, - {"PH5", 7, 5, {"gpio_in", "gpio_out", "lcd1", NULL, "uart4", NULL, "eint5", "csi1"}, 6, 5}, - {"PH6", 7, 6, {"gpio_in", "gpio_out", "lcd1", NULL, "uart5", "ms", "eint6", "csi1"}, 6, 6}, - {"PH7", 7, 7, {"gpio_in", "gpio_out", "lcd1", NULL, "uart5", "ms", "eint7", "csi1"}, 6, 7}, - {"PH8", 7, 8, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "eint8", "csi1"}, 6, 8}, - {"PH9", 7, 9, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "eint9", "csi1"}, 6, 9}, - {"PH10", 7, 10, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "eint10", "csi1"}, 6, 10}, - {"PH11", 7, 11, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "eint11", "csi1"}, 6, 11}, - {"PH12", 7, 12, {"gpio_in", "gpio_out", "lcd1", NULL, "ps2", NULL, "eint12", "csi1"}, 6, 12}, - {"PH13", 7, 13, {"gpio_in", "gpio_out", "lcd1", NULL, "ps2", "sim", "eint13", "csi1"}, 6, 13}, - {"PH14", 7, 14, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint14", "csi1"}, 6, 14}, - {"PH15", 7, 15, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint15", "csi1"}, 6, 15}, - {"PH16", 7, 16, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint16", "csi1"}, 6, 16}, - {"PH17", 7, 17, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint17", "csi1"}, 6, 17}, - {"PH18", 7, 18, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint18", "csi1"}, 6, 18}, - {"PH19", 7, 19, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "eint19", "csi1"}, 6, 19}, - {"PH20", 7, 20, {"gpio_in", "gpio_out", "lcd1", NULL, "can", NULL, "eint20", "csi1"}, 6, 20}, - {"PH21", 7, 21, {"gpio_in", "gpio_out", "lcd1", NULL, "can", NULL, "eint21", "csi1"}, 6, 21}, + {"PH0", 7, 0, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "ph_eint0", "csi1"}, 6, 0, 0}, + {"PH1", 7, 1, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "ph_eint1", "csi1"}, 6, 1, 0}, + {"PH2", 7, 2, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "ph_eint2", "csi1"}, 6, 2, 0}, + {"PH3", 7, 3, {"gpio_in", "gpio_out", "lcd1", NULL, "uart3", NULL, "ph_eint3", "csi1"}, 6, 3, 0}, + {"PH4", 7, 4, {"gpio_in", "gpio_out", "lcd1", NULL, "uart4", NULL, "ph_eint4", "csi1"}, 6, 4, 0}, + {"PH5", 7, 5, {"gpio_in", "gpio_out", "lcd1", NULL, "uart4", NULL, "ph_eint5", "csi1"}, 6, 5, 0}, + {"PH6", 7, 6, {"gpio_in", "gpio_out", "lcd1", NULL, "uart5", "ms", "ph_eint6", "csi1"}, 6, 6, 0}, + {"PH7", 7, 7, {"gpio_in", "gpio_out", "lcd1", NULL, "uart5", "ms", "ph_eint7", "csi1"}, 6, 7, 0}, + {"PH8", 7, 8, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "ph_eint8", "csi1"}, 6, 8, 0}, + {"PH9", 7, 9, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "ph_eint9", "csi1"}, 6, 9, 0}, + {"PH10", 7, 10, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "ph_eint10", "csi1"}, 6, 10, 0}, + {"PH11", 7, 11, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "ms", "ph_eint11", "csi1"}, 6, 11, 0}, + {"PH12", 7, 12, {"gpio_in", "gpio_out", "lcd1", NULL, "ps2", NULL, "ph_eint12", "csi1"}, 6, 12, 0}, + {"PH13", 7, 13, {"gpio_in", "gpio_out", "lcd1", NULL, "ps2", "sim", "ph_eint13", "csi1"}, 6, 13, 0}, + {"PH14", 7, 14, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint14", "csi1"}, 6, 14, 0}, + {"PH15", 7, 15, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint15", "csi1"}, 6, 15, 0}, + {"PH16", 7, 16, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint16", "csi1"}, 6, 16, 0}, + {"PH17", 7, 17, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint17", "csi1"}, 6, 17, 0}, + {"PH18", 7, 18, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint18", "csi1"}, 6, 18, 0}, + {"PH19", 7, 19, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "sim", "ph_eint19", "csi1"}, 6, 19, 0}, + {"PH20", 7, 20, {"gpio_in", "gpio_out", "lcd1", NULL, "can", NULL, "ph_eint20", "csi1"}, 6, 20, 0}, + {"PH21", 7, 21, {"gpio_in", "gpio_out", "lcd1", NULL, "can", NULL, "ph_eint21", "csi1"}, 6, 21, 0}, {"PH22", 7, 22, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "mmc1", NULL, "csi1"}}, {"PH23", 7, 23, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "mmc1", NULL, "csi1"}}, {"PH24", 7, 24, {"gpio_in", "gpio_out", "lcd1", NULL, "keypad", "mmc1", NULL, "csi1"}}, @@ -209,16 +209,16 @@ const static struct allwinner_pins a20_pins[] = { {"PI7", 8, 7, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, {"PI8", 8, 8, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, {"PI9", 8, 9, {"gpio_in", "gpio_out", "mmc3", NULL, NULL, NULL, NULL, NULL}}, - {"PI10", 8, 10, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "eint", NULL}}, - {"PI11", 8, 11, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "eint", NULL}}, - {"PI12", 8, 12, {"gpio_in", "gpio_out", "spi0", "uart6", "clk_out_a", NULL, "eint", NULL}}, - {"PI13", 8, 13, {"gpio_in", "gpio_out", "spi0", "uart6", "clk_out_b", NULL, "eint", NULL}}, - {"PI14", 8, 14, {"gpio_in", "gpio_out", "spi0", "ps2", "timer4", NULL, "eint", NULL}}, - {"PI15", 8, 15, {"gpio_in", "gpio_out", "spi1", "ps2", "timer5", NULL, "eint", NULL}}, - {"PI16", 8, 16, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint", NULL}}, - {"PI17", 8, 17, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint", NULL}}, - {"PI18", 8, 18, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint", NULL}}, - {"PI19", 8, 19, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "eint", NULL}}, + {"PI10", 8, 10, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "pi_eint22", NULL}, 6, 22, 0}, + {"PI11", 8, 11, {"gpio_in", "gpio_out", "spi0", "uart5", NULL, NULL, "pi_eint23", NULL}, 6, 23, 0}, + {"PI12", 8, 12, {"gpio_in", "gpio_out", "spi0", "uart6", "clk_out_a", NULL, "pi_eint24", NULL}, 6, 24, 0}, + {"PI13", 8, 13, {"gpio_in", "gpio_out", "spi0", "uart6", "clk_out_b", NULL, "pi_eint25", NULL}, 6, 25, 0}, + {"PI14", 8, 14, {"gpio_in", "gpio_out", "spi0", "ps2", "timer4", NULL, "pi_eint26", NULL}, 6, 26, 0}, + {"PI15", 8, 15, {"gpio_in", "gpio_out", "spi1", "ps2", "timer5", NULL, "pi_eint27", NULL}, 6, 27, 0}, + {"PI16", 8, 16, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint28", NULL}, 6, 28, 0}, + {"PI17", 8, 17, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint29", NULL}, 6, 29, 0}, + {"PI18", 8, 18, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint30", NULL}, 6, 30, 0}, + {"PI19", 8, 19, {"gpio_in", "gpio_out", "spi1", "uart2", NULL, NULL, "pi_eint31", NULL}, 6, 31, 0}, {"PI20", 8, 20, {"gpio_in", "gpio_out", "ps2", "uart7", "hdmi", NULL, NULL, NULL}}, {"PI21", 8, 21, {"gpio_in", "gpio_out", "ps2", "uart7", "hdmi", NULL, NULL, NULL}}, }; Modified: stable/12/sys/arm/allwinner/a31/a31_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a31/a31_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a31/a31_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -38,43 +38,43 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A31 const static struct allwinner_pins a31_pins[] = { - {"PA0", 0, 0, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint0", NULL}, 6, 0}, - {"PA1", 0, 1, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint1", NULL}, 6, 1}, - {"PA2", 0, 2, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint2", NULL}, 6, 2}, - {"PA3", 0, 3, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint3", NULL}, 6, 3}, - {"PA4", 0, 4, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint4", NULL}, 6, 4}, - {"PA5", 0, 5, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint5", NULL}, 6, 5}, - {"PA6", 0, 6, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint6", NULL}, 6, 6}, - {"PA7", 0, 7, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint7", NULL}, 6, 7}, - {"PA8", 0, 8, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, NULL, "pa_eint8", NULL}, 6, 8}, - {"PA9", 0, 9, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, "mmc2", "pa_eint9", NULL}, 6, 9}, - {"PA10", 0, 10, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint10", NULL}, 6, 10}, - {"PA11", 0, 11, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint11", NULL}, 6, 11}, - {"PA12", 0, 12, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint12", NULL}, 6, 12}, - {"PA13", 0, 13, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint13", NULL}, 6, 13}, - {"PA14", 0, 14, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint14", NULL}, 6, 14}, - {"PA15", 0, 15, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_a", NULL, "pa_eint15", NULL}, 6, 15}, - {"PA16", 0, 16, {"gpio_in", "gpio_out", "gmac", "lcd1", "dmic", NULL, "pa_eint16", NULL}, 6, 16}, - {"PA17", 0, 17, {"gpio_in", "gpio_out", "gmac", "lcd1", "dmic", NULL, "pa_eint17", NULL}, 6, 17}, - {"PA18", 0, 18, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_b", NULL, "pa_eint18", NULL}, 6, 18}, - {"PA19", 0, 19, {"gpio_in", "gpio_out", "gmac", "lcd1", "pwm3", NULL, "pa_eint19", NULL}, 6, 19}, - {"PA20", 0, 20, {"gpio_in", "gpio_out", "gmac", "lcd1", "pwm3", NULL, "pa_eint20", NULL}, 6, 20}, - {"PA21", 0, 21, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint21", NULL}, 6, 21}, - {"PA22", 0, 22, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint22", NULL}, 6, 22}, - {"PA23", 0, 23, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint23", NULL}, 6, 23}, - {"PA24", 0, 24, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint24", NULL}, 6, 24}, - {"PA25", 0, 25, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint25", NULL}, 6, 25}, - {"PA26", 0, 26, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_c", NULL, "pa_eint26", NULL}, 6, 26}, - {"PA27", 0, 27, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, NULL, "pa_eint27", NULL}, 6, 27}, + {"PA0", 0, 0, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint0", NULL}, 6, 0, 0}, + {"PA1", 0, 1, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint1", NULL}, 6, 1, 0}, + {"PA2", 0, 2, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint2", NULL}, 6, 2, 0}, + {"PA3", 0, 3, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint3", NULL}, 6, 3, 0}, + {"PA4", 0, 4, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint4", NULL}, 6, 4, 0}, + {"PA5", 0, 5, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint5", NULL}, 6, 5, 0}, + {"PA6", 0, 6, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint6", NULL}, 6, 6, 0}, + {"PA7", 0, 7, {"gpio_in", "gpio_out", "gmac", "lcd1", "uart1", NULL, "pa_eint7", NULL}, 6, 7, 0}, + {"PA8", 0, 8, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, NULL, "pa_eint8", NULL}, 6, 8, 0}, + {"PA9", 0, 9, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, "mmc2", "pa_eint9", NULL}, 6, 9, 0}, + {"PA10", 0, 10, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint10", NULL}, 6, 10, 0}, + {"PA11", 0, 11, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint11", NULL}, 6, 11, 0}, + {"PA12", 0, 12, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint12", NULL}, 6, 12, 0}, + {"PA13", 0, 13, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint13", NULL}, 6, 13, 0}, + {"PA14", 0, 14, {"gpio_in", "gpio_out", "gmac", "lcd1", "mmc3", "mmc2", "pa_eint14", NULL}, 6, 14, 0}, + {"PA15", 0, 15, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_a", NULL, "pa_eint15", NULL}, 6, 15, 0}, + {"PA16", 0, 16, {"gpio_in", "gpio_out", "gmac", "lcd1", "dmic", NULL, "pa_eint16", NULL}, 6, 16, 0}, + {"PA17", 0, 17, {"gpio_in", "gpio_out", "gmac", "lcd1", "dmic", NULL, "pa_eint17", NULL}, 6, 17, 0}, + {"PA18", 0, 18, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_b", NULL, "pa_eint18", NULL}, 6, 18, 0}, + {"PA19", 0, 19, {"gpio_in", "gpio_out", "gmac", "lcd1", "pwm3", NULL, "pa_eint19", NULL}, 6, 19, 0}, + {"PA20", 0, 20, {"gpio_in", "gpio_out", "gmac", "lcd1", "pwm3", NULL, "pa_eint20", NULL}, 6, 20, 0}, + {"PA21", 0, 21, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint21", NULL}, 6, 21, 0}, + {"PA22", 0, 22, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint22", NULL}, 6, 22, 0}, + {"PA23", 0, 23, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint23", NULL}, 6, 23, 0}, + {"PA24", 0, 24, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint24", NULL}, 6, 24, 0}, + {"PA25", 0, 25, {"gpio_in", "gpio_out", "gmac", "lcd1", "spi3", NULL, "pa_eint25", NULL}, 6, 25, 0}, + {"PA26", 0, 26, {"gpio_in", "gpio_out", "gmac", "lcd1", "clk_out_c", NULL, "pa_eint26", NULL}, 6, 26, 0}, + {"PA27", 0, 27, {"gpio_in", "gpio_out", "gmac", "lcd1", NULL, NULL, "pa_eint27", NULL}, 6, 27, 0}, - {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2s0", "uart3", "csi", NULL, "pb_eint0", NULL}, 6, 0}, - {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint1", NULL}, 6, 1}, - {"PB2", 1, 2, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint2", NULL}, 6, 2}, - {"PB3", 1, 3, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint3", NULL}, 6, 3}, - {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL, NULL, "pb_eint4", NULL}, 6, 4}, - {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint5", NULL}, 6, 5}, - {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint6", NULL}, 6, 6}, - {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint7", NULL}, 6, 7}, + {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2s0", "uart3", "csi", NULL, "pb_eint0", NULL}, 6, 0, 1}, + {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint1", NULL}, 6, 1, 1}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint2", NULL}, 6, 2, 1}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint3", NULL}, 6, 3, 1}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL, NULL, "pb_eint4", NULL}, 6, 4, 1}, + {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint5", NULL}, 6, 5, 1}, + {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint6", NULL}, 6, 6, 1}, + {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint7", NULL}, 6, 7, 1}, {"PC0", 2, 0, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, {"PC1", 2, 1, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, @@ -134,23 +134,23 @@ const static struct allwinner_pins a31_pins[] = { {"PD26", 3, 26, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, {"PD27", 3, 27, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, - {"PE0", 4, 0, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint0", NULL}, 6, 0}, - {"PE1", 4, 1, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint1", NULL}, 6, 1}, - {"PE2", 4, 2, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint2", NULL}, 6, 2}, - {"PE3", 4, 3, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint3", NULL}, 6, 3}, - {"PE4", 4, 4, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint4", NULL}, 6, 4}, - {"PE5", 4, 5, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint5", NULL}, 6, 5}, - {"PE6", 4, 6, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint6", NULL}, 6, 6}, - {"PE7", 4, 7, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint7", NULL}, 6, 7}, - {"PE8", 4, 8, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint8", NULL}, 6, 8}, - {"PE9", 4, 9, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint9", NULL}, 6, 9}, - {"PE10", 4, 10, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint10", NULL}, 6, 10}, - {"PE11", 4, 11, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint11", NULL}, 6, 11}, - {"PE12", 4, 12, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint12", NULL}, 6, 12}, - {"PE13", 4, 13, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint13", NULL}, 6, 13}, - {"PE14", 4, 14, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint14", NULL}, 6, 14}, - {"PE15", 4, 15, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint15", NULL}, 6, 15}, - {"PE16", 4, 16, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, "pe_eint16", NULL}, 6, 16}, + {"PE0", 4, 0, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint0", NULL}, 6, 0, 4}, + {"PE1", 4, 1, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint1", NULL}, 6, 1, 4}, + {"PE2", 4, 2, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint2", NULL}, 6, 2, 4}, + {"PE3", 4, 3, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint3", NULL}, 6, 3, 4}, + {"PE4", 4, 4, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint4", NULL}, 6, 4, 4}, + {"PE5", 4, 5, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint5", NULL}, 6, 5, 4}, + {"PE6", 4, 6, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint6", NULL}, 6, 6, 4}, + {"PE7", 4, 7, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint7", NULL}, 6, 7, 4}, + {"PE8", 4, 8, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint8", NULL}, 6, 8, 4}, + {"PE9", 4, 9, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint9", NULL}, 6, 9, 4}, + {"PE10", 4, 10, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint10", NULL}, 6, 10, 4}, + {"PE11", 4, 11, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint11", NULL}, 6, 11, 4}, + {"PE12", 4, 12, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint12", NULL}, 6, 12, 4}, + {"PE13", 4, 13, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint13", NULL}, 6, 13, 4}, + {"PE14", 4, 14, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint14", NULL}, 6, 14, 4}, + {"PE15", 4, 15, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint15", NULL}, 6, 15, 4}, + {"PE16", 4, 16, {"gpio_in", "gpio_out", "csi", NULL, NULL, NULL, "pe_eint16", NULL}, 6, 16, 4}, {"PF0", 5, 0, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, {"PF1", 5, 1, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, @@ -159,25 +159,25 @@ const static struct allwinner_pins a31_pins[] = { {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", NULL, "uart0", NULL, NULL, NULL}}, {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, - {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0", NULL}, 6, 0}, - {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1", NULL}, 6, 1}, - {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2", NULL}, 6, 2}, - {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3", NULL}, 6, 3}, - {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4", NULL}, 6, 4}, - {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5", NULL}, 6, 5}, - {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint6", NULL}, 6, 6}, - {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint7", NULL}, 6, 7}, - {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint8", NULL}, 6, 8}, - {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint9", NULL}, 6, 9}, - {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2c3", "usb", NULL, NULL, "pg_eint10", NULL}, 6, 10}, - {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2c3", "usb", NULL, NULL, "pg_eint11", NULL}, 6, 11}, - {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint12", NULL}, 6, 12}, - {"PG13", 6, 13, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint13", NULL}, 6, 13}, - {"PG14", 6, 14, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint14", NULL}, 6, 14}, - {"PG15", 6, 15, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint15", NULL}, 6, 15}, - {"PG16", 6, 16, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint16", NULL}, 6, 16}, - {"PG17", 6, 17, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint17", NULL}, 6, 17}, - {"PG18", 6, 18, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint18", NULL}, 6, 18}, + {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0", NULL}, 6, 0, 6}, + {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1", NULL}, 6, 1, 6}, + {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2", NULL}, 6, 2, 6}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3", NULL}, 6, 3, 6}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4", NULL}, 6, 4, 6}, + {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5", NULL}, 6, 5, 6}, + {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint6", NULL}, 6, 6, 6}, + {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint7", NULL}, 6, 7, 6}, + {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint8", NULL}, 6, 8, 6}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint9", NULL}, 6, 9, 6}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2c3", "usb", NULL, NULL, "pg_eint10", NULL}, 6, 10, 6}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2c3", "usb", NULL, NULL, "pg_eint11", NULL}, 6, 11, 6}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint12", NULL}, 6, 12, 6}, + {"PG13", 6, 13, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint13", NULL}, 6, 13, 6}, + {"PG14", 6, 14, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint14", NULL}, 6, 14, 6}, + {"PG15", 6, 15, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint15", NULL}, 6, 15, 6}, + {"PG16", 6, 16, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint16", NULL}, 6, 16, 6}, + {"PG17", 6, 17, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint17", NULL}, 6, 17, 6}, + {"PG18", 6, 18, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint18", NULL}, 6, 18, 6}, {"PH0", 7, 0, {"gpio_in", "gpio_out", "nand1", NULL, NULL, NULL, NULL, NULL}}, {"PH1", 7, 1, {"gpio_in", "gpio_out", "nand1", NULL, NULL, NULL, NULL, NULL}}, Modified: stable/12/sys/arm/allwinner/a31/a31s_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a31/a31s_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a31/a31s_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -38,43 +38,43 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A31S const static struct allwinner_pins a31s_pins[] = { - {"PA0", 0, 0, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint0", NULL}, 6, 0}, - {"PA1", 0, 1, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint1", NULL}, 6, 1}, - {"PA2", 0, 2, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint2", NULL}, 6, 2}, - {"PA3", 0, 3, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint3", NULL}, 6, 3}, - {"PA4", 0, 4, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint4", NULL}, 6, 4}, - {"PA5", 0, 5, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint5", NULL}, 6, 5}, - {"PA6", 0, 6, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint6", NULL}, 6, 6}, - {"PA7", 0, 7, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint7", NULL}, 6, 7}, - {"PA8", 0, 8, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint8", NULL}, 6, 8}, - {"PA9", 0, 9, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint9", NULL}, 6, 9}, - {"PA10", 0, 10, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint10", NULL}, 6, 10}, - {"PA11", 0, 11, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint11", NULL}, 6, 11}, - {"PA12", 0, 12, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint12", NULL}, 6, 12}, - {"PA13", 0, 13, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint13", NULL}, 6, 13}, - {"PA14", 0, 14, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint14", NULL}, 6, 14}, - {"PA15", 0, 15, {"gpio_in", "gpio_out", "gmac", NULL, "dmic", NULL, "pa_eint15", NULL}, 6, 15}, - {"PA16", 0, 16, {"gpio_in", "gpio_out", "gmac", NULL, "dmic", NULL, "pa_eint16", NULL}, 6, 16}, - {"PA17", 0, 17, {"gpio_in", "gpio_out", "gmac", NULL, "clk_out_b", NULL, "pa_eint17", NULL}, 6, 17}, - {"PA18", 0, 18, {"gpio_in", "gpio_out", "gmac", NULL, "pwm3", NULL, "pa_eint18", NULL}, 6, 18}, - {"PA19", 0, 19, {"gpio_in", "gpio_out", "gmac", NULL, "pwm3", NULL, "pa_eint19", NULL}, 6, 19}, - {"PA20", 0, 20, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint20", NULL}, 6, 20}, - {"PA21", 0, 21, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint21", NULL}, 6, 21}, - {"PA22", 0, 22, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint22", NULL}, 6, 22}, - {"PA23", 0, 23, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint23", NULL}, 6, 23}, - {"PA24", 0, 24, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint24", NULL}, 6, 24}, - {"PA25", 0, 25, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint25", NULL}, 6, 25}, - {"PA26", 0, 26, {"gpio_in", "gpio_out", "gmac", NULL, "clk_out_c", NULL, "pa_eint26", NULL}, 6, 26}, - {"PA27", 0, 27, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint27", NULL}, 6, 27}, + {"PA0", 0, 0, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint0", NULL}, 6, 0, 0}, + {"PA1", 0, 1, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint1", NULL}, 6, 1, 0}, + {"PA2", 0, 2, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint2", NULL}, 6, 2, 0}, + {"PA3", 0, 3, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint3", NULL}, 6, 3, 0}, + {"PA4", 0, 4, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint4", NULL}, 6, 4, 0}, + {"PA5", 0, 5, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint5", NULL}, 6, 5, 0}, + {"PA6", 0, 6, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint6", NULL}, 6, 6, 0}, + {"PA7", 0, 7, {"gpio_in", "gpio_out", "gmac", NULL, "uart1", NULL, "pa_eint7", NULL}, 6, 7, 0}, + {"PA8", 0, 8, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint8", NULL}, 6, 8, 0}, + {"PA9", 0, 9, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint9", NULL}, 6, 9, 0}, + {"PA10", 0, 10, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint10", NULL}, 6, 10, 0}, + {"PA11", 0, 11, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint11", NULL}, 6, 11, 0}, + {"PA12", 0, 12, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint12", NULL}, 6, 12, 0}, + {"PA13", 0, 13, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint13", NULL}, 6, 13, 0}, + {"PA14", 0, 14, {"gpio_in", "gpio_out", "gmac", NULL, "mmc3", "mmc2", "pa_eint14", NULL}, 6, 14, 0}, + {"PA15", 0, 15, {"gpio_in", "gpio_out", "gmac", NULL, "dmic", NULL, "pa_eint15", NULL}, 6, 15, 0}, + {"PA16", 0, 16, {"gpio_in", "gpio_out", "gmac", NULL, "dmic", NULL, "pa_eint16", NULL}, 6, 16, 0}, + {"PA17", 0, 17, {"gpio_in", "gpio_out", "gmac", NULL, "clk_out_b", NULL, "pa_eint17", NULL}, 6, 17, 0}, + {"PA18", 0, 18, {"gpio_in", "gpio_out", "gmac", NULL, "pwm3", NULL, "pa_eint18", NULL}, 6, 18, 0}, + {"PA19", 0, 19, {"gpio_in", "gpio_out", "gmac", NULL, "pwm3", NULL, "pa_eint19", NULL}, 6, 19, 0}, + {"PA20", 0, 20, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint20", NULL}, 6, 20, 0}, + {"PA21", 0, 21, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint21", NULL}, 6, 21, 0}, + {"PA22", 0, 22, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint22", NULL}, 6, 22, 0}, + {"PA23", 0, 23, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint23", NULL}, 6, 23, 0}, + {"PA24", 0, 24, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint24", NULL}, 6, 24, 0}, + {"PA25", 0, 25, {"gpio_in", "gpio_out", "gmac", NULL, "spi3", NULL, "pa_eint25", NULL}, 6, 25, 0}, + {"PA26", 0, 26, {"gpio_in", "gpio_out", "gmac", NULL, "clk_out_c", NULL, "pa_eint26", NULL}, 6, 26, 0}, + {"PA27", 0, 27, {"gpio_in", "gpio_out", "gmac", NULL, NULL, NULL, "pa_eint27", NULL}, 6, 27, 0}, - {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL , NULL, "pb_eint0", NULL}, 6, 0}, - {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint1", NULL}, 6, 1}, - {"PB2", 1, 2, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint2", NULL}, 6, 2}, - {"PB3", 1, 3, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint3", NULL}, 6, 3}, - {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL, NULL, "pb_eint4", NULL}, 6, 4}, - {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint5", NULL}, 6, 5}, - {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint6", NULL}, 6, 6}, - {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint7", NULL}, 6, 7}, + {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL , NULL, "pb_eint0", NULL}, 6, 0, 1}, + {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint1", NULL}, 6, 1, 1}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint2", NULL}, 6, 2, 1}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint3", NULL}, 6, 3, 1}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "uart3", NULL, NULL, "pb_eint4", NULL}, 6, 4, 1}, + {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint5", NULL}, 6, 5, 1}, + {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "uart3", "i2c3", NULL, "pb_eint6", NULL}, 6, 6, 1}, + {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", NULL, NULL, NULL, "pb_eint7", NULL}, 6, 7, 1}, {"PC0", 2, 0, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, {"PC1", 2, 1, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, @@ -126,22 +126,22 @@ const static struct allwinner_pins a31s_pins[] = { {"PD26", 3, 26, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, {"PD27", 3, 27, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, - {"PE0", 4, 0, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint0", NULL}, 6, 0}, - {"PE1", 4, 1, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint1", NULL}, 6, 1}, - {"PE2", 4, 2, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint2", NULL}, 6, 2}, - {"PE3", 4, 3, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint3", NULL}, 6, 3}, - {"PE4", 4, 4, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint4", NULL}, 6, 4}, - {"PE5", 4, 5, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint5", NULL}, 6, 5}, - {"PE6", 4, 6, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint6", NULL}, 6, 6}, - {"PE7", 4, 7, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint7", NULL}, 6, 7}, - {"PE8", 4, 8, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint8", NULL}, 6, 8}, - {"PE9", 4, 9, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint9", NULL}, 6, 9}, - {"PE10", 4, 10, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint10", NULL}, 6, 10}, - {"PE11", 4, 11, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint11", NULL}, 6, 11}, - {"PE12", 4, 12, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint12", NULL}, 6, 12}, - {"PE13", 4, 13, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint13", NULL}, 6, 13}, - {"PE14", 4, 14, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint14", NULL}, 6, 14}, - {"PE15", 4, 15, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint15", NULL}, 6, 15}, + {"PE0", 4, 0, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint0", NULL}, 6, 0, 4}, + {"PE1", 4, 1, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint1", NULL}, 6, 1, 4}, + {"PE2", 4, 2, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint2", NULL}, 6, 2, 4}, + {"PE3", 4, 3, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint3", NULL}, 6, 3, 4}, + {"PE4", 4, 4, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint4", NULL}, 6, 4, 4}, + {"PE5", 4, 5, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint5", NULL}, 6, 5, 4}, + {"PE6", 4, 6, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint6", NULL}, 6, 6, 4}, + {"PE7", 4, 7, {"gpio_in", "gpio_out", "csi", "uart5", NULL, NULL, "pe_eint7", NULL}, 6, 7, 4}, + {"PE8", 4, 8, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint8", NULL}, 6, 8, 4}, + {"PE9", 4, 9, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint9", NULL}, 6, 9, 4}, + {"PE10", 4, 10, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint10", NULL}, 6, 10, 4}, + {"PE11", 4, 11, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint11", NULL}, 6, 11, 4}, + {"PE12", 4, 12, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint12", NULL}, 6, 12, 4}, + {"PE13", 4, 13, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint13", NULL}, 6, 13, 4}, + {"PE14", 4, 14, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint14", NULL}, 6, 14, 4}, + {"PE15", 4, 15, {"gpio_in", "gpio_out", "csi", "ts", NULL, NULL, "pe_eint15", NULL}, 6, 15, 4}, {"PF0", 5, 0, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, {"PF1", 5, 1, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, @@ -150,25 +150,25 @@ const static struct allwinner_pins a31s_pins[] = { {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", NULL, "uart0", NULL, NULL, NULL}}, {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", NULL, "jtag", NULL, NULL, NULL}}, - {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0", NULL}, 6, 0}, - {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1", NULL}, 6, 1}, - {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2", NULL}, 6, 2}, - {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3", NULL}, 6, 3}, - {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4", NULL}, 6, 4}, - {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5", NULL}, 6, 5}, - {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint6", NULL}, 6, 6}, - {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint7", NULL}, 6, 7}, - {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint8", NULL}, 6, 8}, - {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint9", NULL}, 6, 9}, - {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2c3", NULL, NULL, NULL, "pg_eint10", NULL}, 6, 10}, - {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2c3", NULL, NULL, NULL, "pg_eint11", NULL}, 6, 11}, - {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint12", NULL}, 6, 12}, - {"PG13", 6, 13, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint13", NULL}, 6, 13}, - {"PG14", 6, 14, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint14", NULL}, 6, 14}, - {"PG15", 6, 15, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint15", NULL}, 6, 15}, - {"PG16", 6, 16, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint16", NULL}, 6, 16}, - {"PG17", 6, 17, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint17", NULL}, 6, 17}, - {"PG18", 6, 18, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint18", NULL}, 6, 18}, + {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0", NULL}, 6, 0, 6}, + {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1", NULL}, 6, 1, 6}, + {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2", NULL}, 6, 2, 6}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3", NULL}, 6, 3, 6}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4", NULL}, 6, 4, 6}, + {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5", NULL}, 6, 5, 6}, + {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint6", NULL}, 6, 6, 6}, + {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint7", NULL}, 6, 7, 6}, + {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint8", NULL}, 6, 8, 6}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart2", NULL, NULL, NULL, "pg_eint9", NULL}, 6, 9, 6}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2c3", NULL, NULL, NULL, "pg_eint10", NULL}, 6, 10, 6}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2c3", NULL, NULL, NULL, "pg_eint11", NULL}, 6, 11, 6}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint12", NULL}, 6, 12, 6}, + {"PG13", 6, 13, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint13", NULL}, 6, 13, 6}, + {"PG14", 6, 14, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint14", NULL}, 6, 14, 6}, + {"PG15", 6, 15, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint15", NULL}, 6, 15, 6}, + {"PG16", 6, 16, {"gpio_in", "gpio_out", "spi1", "i2s1", NULL, NULL, "pg_eint16", NULL}, 6, 16, 6}, + {"PG17", 6, 17, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint17", NULL}, 6, 17, 6}, + {"PG18", 6, 18, {"gpio_in", "gpio_out", "uart4", NULL, NULL, NULL, "pg_eint18", NULL}, 6, 18, 6}, {"PH9", 7, 9, {"gpio_in", "gpio_out", "spi2", "jtag", "pwm1", NULL, NULL, NULL}}, {"PH10", 7, 10, {"gpio_in", "gpio_out", "spi2", "jtag", "pwm1", NULL, NULL, NULL}}, Modified: stable/12/sys/arm/allwinner/a33/a33_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a33/a33_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a33/a33_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -38,14 +38,14 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A33 const static struct allwinner_pins a33_pins[] = { - {"PB0", 1, 0, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint0", NULL}, 4, 0}, - {"PB1", 1, 1, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint1", NULL}, 4, 1}, - {"PB2", 1, 2, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint2", NULL}, 4, 2}, - {"PB3", 1, 3, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint3", NULL}, 4, 3}, - {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint4", NULL}, 4, 4}, - {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint5", NULL}, 4, 5}, - {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint6", NULL}, 4, 6}, - {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint7", NULL}, 4, 7}, + {"PB0", 1, 0, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint0", NULL}, 4, 0, 1}, + {"PB1", 1, 1, {"gpio_in", "gpio_out", "uart2", "uart0", "pb_eint1", NULL}, 4, 1, 1}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint2", NULL}, 4, 2, 1}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "uart2", NULL, "pb_eint3", NULL}, 4, 3, 1}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint4", NULL}, 4, 4, 1}, + {"PB5", 1, 5, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint5", NULL}, 4, 5, 1}, + {"PB6", 1, 6, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint6", NULL}, 4, 6, 1}, + {"PB7", 1, 7, {"gpio_in", "gpio_out", "i2s0", "aif2", "pb_eint7", NULL}, 4, 7, 1}, {"PC0", 2, 0, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, {"PC1", 2, 1, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, @@ -114,20 +114,20 @@ const static struct allwinner_pins a33_pins[] = { {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", "uart0", NULL, NULL, NULL}}, {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", "jtag", NULL, NULL, NULL}}, - {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint0", NULL}, 4, 0}, - {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint1", NULL}, 4, 1}, - {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint2", NULL}, 4, 2}, - {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint3", NULL}, 4, 3}, - {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint4", NULL}, 4, 4}, - {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint5", NULL}, 4, 5}, - {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint6", NULL}, 4, 6}, - {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint7", NULL}, 4, 7}, - {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint8", NULL}, 4, 8}, - {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint9", NULL}, 4, 9}, - {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint10", NULL}, 4, 10}, - {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint11", NULL}, 4, 11}, - {"PG12", 6, 12, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint12", NULL}, 4, 12}, - {"PG13", 6, 13, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint13", NULL}, 4, 13}, + {"PG0", 6, 0, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint0", NULL}, 4, 0, 6}, + {"PG1", 6, 1, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint1", NULL}, 4, 1, 6}, + {"PG2", 6, 2, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint2", NULL}, 4, 2, 6}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint3", NULL}, 4, 3, 6}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint4", NULL}, 4, 4, 6}, + {"PG5", 6, 5, {"gpio_in", "gpio_out", "mmc1", NULL, "pg_eint5", NULL}, 4, 5, 6}, + {"PG6", 6, 6, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint6", NULL}, 4, 6, 6}, + {"PG7", 6, 7, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint7", NULL}, 4, 7, 6}, + {"PG8", 6, 8, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint8", NULL}, 4, 8, 6}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "uart1", NULL, "pg_eint9", NULL}, 4, 9, 6}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint10", NULL}, 4, 10, 6}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint11", NULL}, 4, 11, 6}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint12", NULL}, 4, 12, 6}, + {"PG13", 6, 13, {"gpio_in", "gpio_out", "i2s1", "aif3", "pg_eint13", NULL}, 4, 13, 6}, {"PH0", 7, 0, {"gpio_in", "gpio_out", "pwm0", NULL, NULL, NULL, NULL, NULL}}, {"PH1", 7, 1, {"gpio_in", "gpio_out", "pwm1", NULL, NULL, NULL, NULL, NULL}}, Modified: stable/12/sys/arm/allwinner/a64/a64_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a64/a64_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a64/a64_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -41,16 +41,16 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A64 static const struct allwinner_pins a64_pins[] = { - { "PB0", 1, 0, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", NULL, "pb_eint0" }, 6, 0}, - { "PB1", 1, 1, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", "sim", "pb_eint1" }, 6, 1}, - { "PB2", 1, 2, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", "sim", "pb_eint2" }, 6, 2}, - { "PB3", 1, 3, { "gpio_in", "gpio_out", "uart2", "i2s0", "jtag", "sim", "pb_eint3" }, 6, 3}, - { "PB4", 1, 4, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint4" }, 6, 4}, - { "PB5", 1, 5, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint5" }, 6, 5}, - { "PB6", 1, 6, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint6" }, 6, 6}, - { "PB7", 1, 7, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint7" }, 6, 7}, - { "PB8", 1, 8, { "gpio_in", "gpio_out", NULL, NULL, "uart0", NULL, "pb_eint8" }, 6, 8}, - { "PB9", 1, 9, { "gpio_in", "gpio_out", NULL, NULL, "uart0", NULL, "pb_eint9" }, 6, 9}, + { "PB0", 1, 0, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", NULL, "pb_eint0" }, 6, 0, 0}, + { "PB1", 1, 1, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", "sim", "pb_eint1" }, 6, 1, 0}, + { "PB2", 1, 2, { "gpio_in", "gpio_out", "uart2", NULL, "jtag", "sim", "pb_eint2" }, 6, 2, 0}, + { "PB3", 1, 3, { "gpio_in", "gpio_out", "uart2", "i2s0", "jtag", "sim", "pb_eint3" }, 6, 3, 0}, + { "PB4", 1, 4, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint4" }, 6, 4, 0}, + { "PB5", 1, 5, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint5" }, 6, 5, 0}, + { "PB6", 1, 6, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint6" }, 6, 6, 0}, + { "PB7", 1, 7, { "gpio_in", "gpio_out", "aif2", "pcm0", NULL, "sim", "pb_eint7" }, 6, 7, 0}, + { "PB8", 1, 8, { "gpio_in", "gpio_out", NULL, NULL, "uart0", NULL, "pb_eint8" }, 6, 8, 0}, + { "PB9", 1, 9, { "gpio_in", "gpio_out", NULL, NULL, "uart0", NULL, "pb_eint9" }, 6, 9, 0}, { "PC0", 2, 0, { "gpio_in", "gpio_out", "nand", NULL, "spi0" } }, { "PC1", 2, 1, { "gpio_in", "gpio_out", "nand", "mmc2", "spi0" } }, @@ -123,33 +123,33 @@ static const struct allwinner_pins a64_pins[] = { { "PF5", 5, 5, { "gpio_in", "gpio_out", "mmc0", "jtag" } }, { "PF6", 5, 6, { "gpio_in", "gpio_out" } }, - { "PG0", 6, 0, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0" }, 6, 0}, - { "PG1", 6, 1, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1" }, 6, 1}, - { "PG2", 6, 2, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2" }, 6, 2}, - { "PG3", 6, 3, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3" }, 6, 3}, - { "PG4", 6, 4, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4" }, 6, 4}, - { "PG5", 6, 5, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5" }, 6, 5}, - { "PG6", 6, 6, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint6" }, 6, 6}, - { "PG7", 6, 7, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint7" }, 6, 7}, - { "PG8", 6, 8, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint8" }, 6, 8}, - { "PG9", 6, 9, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint9" }, 6, 9}, - { "PG10", 6, 10, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint10" }, 6, 10}, - { "PG11", 6, 11, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint11" }, 6, 11}, - { "PG12", 6, 12, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint12" }, 6, 12}, - { "PG13", 6, 13, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint13" }, 6, 13}, + { "PG0", 6, 0, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0" }, 6, 0, 1}, + { "PG1", 6, 1, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1" }, 6, 1, 1}, + { "PG2", 6, 2, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2" }, 6, 2, 1}, + { "PG3", 6, 3, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3" }, 6, 3, 1}, + { "PG4", 6, 4, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4" }, 6, 4, 1}, + { "PG5", 6, 5, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5" }, 6, 5, 1}, + { "PG6", 6, 6, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint6" }, 6, 6, 1}, + { "PG7", 6, 7, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint7" }, 6, 7, 1}, + { "PG8", 6, 8, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint8" }, 6, 8, 1}, + { "PG9", 6, 9, { "gpio_in", "gpio_out", "uart1", NULL, NULL, NULL, "pg_eint9" }, 6, 9, 1}, + { "PG10", 6, 10, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint10" }, 6, 10, 1}, + { "PG11", 6, 11, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint11" }, 6, 11, 1}, + { "PG12", 6, 12, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint12" }, 6, 12, 1}, + { "PG13", 6, 13, { "gpio_in", "gpio_out", "aif3", "pcm1", NULL, NULL, "pg_eint13" }, 6, 13, 1}, - { "PH0", 7, 0, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint0" }, 6, 0}, - { "PH1", 7, 1, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint1" }, 6, 1}, - { "PH2", 7, 2, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint2" }, 6, 2}, - { "PH3", 7, 3, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint3" }, 6, 3}, - { "PH4", 7, 4, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint4" }, 6, 4}, - { "PH5", 7, 5, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint5" }, 6, 5}, - { "PH6", 7, 6, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint6" }, 6, 6}, - { "PH7", 7, 7, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint7" }, 6, 7}, - { "PH8", 7, 8, { "gpio_in", "gpio_out", "owa", NULL, NULL, NULL, "ph_eint8" }, 6, 8}, - { "PH9", 7, 9, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "ph_eint9" }, 6, 9}, - { "PH10", 7, 10, { "gpio_in", "gpio_out", "mic", NULL, NULL, NULL, "ph_eint10" }, 6, 10}, - { "PH11", 7, 11, { "gpio_in", "gpio_out", "mic", NULL, NULL, NULL, "ph_eint11" }, 6, 11}, + { "PH0", 7, 0, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint0" }, 6, 0, 2}, + { "PH1", 7, 1, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint1" }, 6, 1, 2}, + { "PH2", 7, 2, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint2" }, 6, 2, 2}, + { "PH3", 7, 3, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint3" }, 6, 3, 2}, + { "PH4", 7, 4, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint4" }, 6, 4, 2}, + { "PH5", 7, 5, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint5" }, 6, 5, 2}, + { "PH6", 7, 6, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint6" }, 6, 6, 2}, + { "PH7", 7, 7, { "gpio_in", "gpio_out", "uart3", NULL, NULL, NULL, "ph_eint7" }, 6, 7, 2}, + { "PH8", 7, 8, { "gpio_in", "gpio_out", "owa", NULL, NULL, NULL, "ph_eint8" }, 6, 8, 2}, + { "PH9", 7, 9, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "ph_eint9" }, 6, 9, 2}, + { "PH10", 7, 10, { "gpio_in", "gpio_out", "mic", NULL, NULL, NULL, "ph_eint10" }, 6, 10, 2}, + { "PH11", 7, 11, { "gpio_in", "gpio_out", "mic", NULL, NULL, NULL, "ph_eint11" }, 6, 11, 2}, }; const struct allwinner_padconf a64_padconf = { Modified: stable/12/sys/arm/allwinner/a64/a64_r_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a64/a64_r_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a64/a64_r_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -41,19 +41,19 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A64 static const struct allwinner_pins a64_r_pins[] = { - { "PL0", 0, 0, { "gpio_in", "gpio_out", "s_rsb", "s_i2c", NULL, NULL, "pl_eint0" }, 6, 0}, - { "PL1", 0, 1, { "gpio_in", "gpio_out", "s_rsb", "s_i2c", NULL, NULL, "pl_eint1" }, 6, 1}, - { "PL2", 0, 2, { "gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "pl_eint2" }, 6, 2}, - { "PL3", 0, 3, { "gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "pl_eint3" }, 6, 3}, - { "PL4", 0, 4, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint4" }, 6, 4}, - { "PL5", 0, 5, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint5" }, 6, 5}, - { "PL6", 0, 6, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint6" }, 6, 6}, - { "PL7", 0, 7, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint7" }, 6, 7}, - { "PL8", 0, 8, { "gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "pl_eint8" }, 6, 8}, - { "PL9", 0, 9, { "gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "pl_eint9" }, 6, 9}, - { "PL10", 0, 10, { "gpio_in", "gpio_out", "s_pwm", NULL, NULL, NULL, "pl_eint10" }, 6, 10}, - { "PL11", 0, 11, { "gpio_in", "gpio_out", "s_cir", NULL, NULL, NULL, "pl_eint11" }, 6, 11}, - { "PL12", 0, 12, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "pl_eint12" }, 6, 12}, + { "PL0", 0, 0, { "gpio_in", "gpio_out", "s_rsb", "s_i2c", NULL, NULL, "pl_eint0" }, 6, 0, 0}, + { "PL1", 0, 1, { "gpio_in", "gpio_out", "s_rsb", "s_i2c", NULL, NULL, "pl_eint1" }, 6, 1, 0}, + { "PL2", 0, 2, { "gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "pl_eint2" }, 6, 2, 0}, + { "PL3", 0, 3, { "gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "pl_eint3" }, 6, 3, 0}, + { "PL4", 0, 4, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint4" }, 6, 4, 0}, + { "PL5", 0, 5, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint5" }, 6, 5, 0}, + { "PL6", 0, 6, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint6" }, 6, 6, 0}, + { "PL7", 0, 7, { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "pl_eint7" }, 6, 7, 0}, + { "PL8", 0, 8, { "gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "pl_eint8" }, 6, 8, 0}, + { "PL9", 0, 9, { "gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "pl_eint9" }, 6, 9, 0}, + { "PL10", 0, 10, { "gpio_in", "gpio_out", "s_pwm", NULL, NULL, NULL, "pl_eint10" }, 6, 10, 0}, + { "PL11", 0, 11, { "gpio_in", "gpio_out", "s_cir", NULL, NULL, NULL, "pl_eint11" }, 6, 11, 0}, + { "PL12", 0, 12, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "pl_eint12" }, 6, 12, 0}, }; const struct allwinner_padconf a64_r_padconf = { Modified: stable/12/sys/arm/allwinner/a83t/a83t_padconf.c ============================================================================== --- stable/12/sys/arm/allwinner/a83t/a83t_padconf.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/a83t/a83t_padconf.c Thu Jun 18 23:23:21 2020 (r362351) @@ -39,17 +39,17 @@ __FBSDID("$FreeBSD$"); #ifdef SOC_ALLWINNER_A83T static const struct allwinner_pins a83t_pins[] = { - { "PB0", 1, 0, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "eint" } }, - { "PB1", 1, 1, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "eint" } }, - { "PB2", 1, 2, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "eint" } }, - { "PB3", 1, 3, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "eint" } }, - { "PB4", 1, 4, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "eint" } }, - { "PB5", 1, 5, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "eint" } }, - { "PB6", 1, 6, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "eint" } }, - { "PB7", 1, 7, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "eint" } }, - { "PB8", 1, 8, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "eint" } }, - { "PB9", 1, 9, { "gpio_in", "gpio_out", "uart0", NULL, NULL, NULL, "eint" } }, - { "PB10", 1, 10, { "gpio_in", "gpio_out", "uart0", NULL, NULL, NULL, "eint" } }, + { "PB0", 1, 0, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pb_eint0" }, 6, 0, 0}, + { "PB1", 1, 1, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pb_eint1" }, 6, 1, 0}, + { "PB2", 1, 2, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pb_eint2" }, 6, 2, 0}, + { "PB3", 1, 3, { "gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pb_eint3" }, 6, 3, 0}, + { "PB4", 1, 4, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "pb_eint4" }, 6, 4, 0}, + { "PB5", 1, 5, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "pb_eint5" }, 6, 5, 0}, + { "PB6", 1, 6, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "pb_eint6" }, 6, 6, 0}, + { "PB7", 1, 7, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "pb_eint7" }, 6, 7, 0}, + { "PB8", 1, 8, { "gpio_in", "gpio_out", "i2s0", "tdm", NULL, NULL, "pb_eint8" }, 6, 8, 0}, + { "PB9", 1, 9, { "gpio_in", "gpio_out", "uart0", NULL, NULL, NULL, "pb_eint9" }, 6, 9, 0}, + { "PB10", 1, 10, { "gpio_in", "gpio_out", "uart0", NULL, NULL, NULL, "pb_eint10" }, 6, 10, 0}, { "PC0", 2, 0, { "gpio_in", "gpio_out", "nand", "spi0" } }, { "PC1", 2, 1, { "gpio_in", "gpio_out", "nand", "spi0" } }, @@ -125,33 +125,33 @@ static const struct allwinner_pins a83t_pins[] = { { "PF5", 5, 5, { "gpio_in", "gpio_out", "mmc0", "jtag" } }, { "PF6", 5, 6, { "gpio_in", "gpio_out" } }, - { "PG0", 6, 0, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG1", 6, 1, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG2", 6, 2, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG3", 6, 3, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG4", 6, 4, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG5", 6, 5, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "eint" } }, - { "PG6", 6, 6, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "eint" } }, - { "PG7", 6, 7, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "eint" } }, - { "PG8", 6, 8, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "eint" } }, - { "PG9", 6, 9, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "eint" } }, - { "PG10", 6, 10, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "eint" } }, - { "PG11", 6, 11, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "eint" } }, - { "PG12", 6, 12, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "eint" } }, - { "PG13", 6, 13, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "eint" } }, + { "PG0", 6, 0, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint0" }, 6, 0, 1}, + { "PG1", 6, 1, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint1" }, 6, 1, 1}, + { "PG2", 6, 2, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint2" }, 6, 2, 1}, + { "PG3", 6, 3, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint3" }, 6, 3, 1}, + { "PG4", 6, 4, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint4" }, 6, 4, 1}, + { "PG5", 6, 5, { "gpio_in", "gpio_out", "mmc1", NULL, NULL, NULL, "pg_eint5" }, 6, 5, 1}, + { "PG6", 6, 6, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "pg_eint6" }, 6, 6, 1}, + { "PG7", 6, 7, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "pg_eint7" }, 6, 7, 1}, + { "PG8", 6, 8, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "pg_eint8" }, 6, 8, 1}, + { "PG9", 6, 9, { "gpio_in", "gpio_out", "uart1", "spi1", NULL, NULL, "pg_eint9" }, 6, 9, 1}, + { "PG10", 6, 10, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "pg_eint10" }, 6, 10, 1}, + { "PG11", 6, 11, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "pg_eint11" }, 6, 11, 1}, + { "PG12", 6, 12, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "pg_eint12" }, 6, 12, 1}, + { "PG13", 6, 13, { "gpio_in", "gpio_out", "i2s1", "uart3", NULL, NULL, "pg_eint13" }, 6, 13, 1}, - { "PH0", 7, 0, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "eint" } }, - { "PH1", 7, 1, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "eint" } }, - { "PH2", 7, 2, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "eint" } }, - { "PH3", 7, 3, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "eint" } }, - { "PH4", 7, 4, { "gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, "eint" } }, - { "PH5", 7, 5, { "gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, "eint" } }, - { "PH6", 7, 6, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "eint" } }, - { "PH7", 7, 7, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "eint" } }, - { "PH8", 7, 8, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "eint" } }, - { "PH9", 7, 9, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "eint" } }, - { "PH10", 7, 10, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "eint" } }, - { "PH11", 7, 11, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "eint" } }, + { "PH0", 7, 0, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint0" }, 6, 0, 2}, + { "PH1", 7, 1, { "gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, "ph_eint1" }, 6, 1, 2}, + { "PH2", 7, 2, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint2" }, 6, 2, 2}, + { "PH3", 7, 3, { "gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, "ph_eint3" }, 6, 3, 2}, + { "PH4", 7, 4, { "gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, "ph_eint4" }, 6, 4, 2}, + { "PH5", 7, 5, { "gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, "ph_eint5" }, 6, 5, 2}, + { "PH6", 7, 6, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "ph_eint6" }, 6, 6, 2}, + { "PH7", 7, 7, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "ph_eint7" }, 6, 7, 2}, + { "PH8", 7, 8, { "gpio_in", "gpio_out", "hdmiddc", NULL, NULL, NULL, "ph_eint8" }, 6, 8, 2}, + { "PH9", 7, 9, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "ph_eint9" }, 6, 9, 2}, + { "PH10", 7, 10, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "ph_eint10" }, 6, 10, 2}, + { "PH11", 7, 11, { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "ph_eint11" }, 6, 11, 2}, }; const struct allwinner_padconf a83t_padconf = { Modified: stable/12/sys/arm/allwinner/allwinner_pinctrl.h ============================================================================== --- stable/12/sys/arm/allwinner/allwinner_pinctrl.h Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/allwinner_pinctrl.h Thu Jun 18 23:23:21 2020 (r362351) @@ -38,6 +38,7 @@ struct allwinner_pins { const char *functions[8]; uint8_t eint_func; uint8_t eint_num; + uint8_t eint_bank; }; struct allwinner_padconf { Modified: stable/12/sys/arm/allwinner/aw_gpio.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:21:12 2020 (r362350) +++ stable/12/sys/arm/allwinner/aw_gpio.c Thu Jun 18 23:23:21 2020 (r362351) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -61,11 +62,18 @@ __FBSDID("$FreeBSD$"); #include "opt_soc.h" #endif +#ifdef INTRNG +#include "pic_if.h" +#endif + #include "gpio_if.h" #define AW_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ - GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) + GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN); +#define AW_GPIO_INTR_CAPS (GPIO_INTR_LEVEL_LOW | GPIO_INTR_LEVEL_HIGH | \ + GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING | GPIO_INTR_EDGE_BOTH) + #define AW_GPIO_NONE 0 #define AW_GPIO_PULLUP 1 #define AW_GPIO_PULLDOWN 2 @@ -249,19 +257,47 @@ struct clk_list { clk_t clk; }; +#ifdef INTRNG +struct gpio_irqsrc { + struct intr_irqsrc isrc; + u_int irq; + uint32_t mode; + uint32_t pin; + uint32_t bank; + uint32_t intnum; + uint32_t intfunc; + uint32_t oldfunc; + bool enabled; +}; +#endif + +#define AW_GPIO_MEMRES 0 +#define AW_GPIO_IRQRES 1 +#define AW_GPIO_RESSZ 2 + struct aw_gpio_softc { device_t sc_dev; device_t sc_busdev; + struct resource * sc_res[AW_GPIO_RESSZ]; struct mtx sc_mtx; struct resource * sc_mem_res; struct resource * sc_irq_res; - bus_space_tag_t sc_bst; - bus_space_handle_t sc_bsh; void * sc_intrhand; struct aw_gpio_conf *conf; TAILQ_HEAD(, clk_list) clk_list; + +#ifdef INTRNG + struct gpio_irqsrc *gpio_pic_irqsrc; + int nirqs; +#endif }; +static struct resource_spec aw_gpio_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0, 0 } +}; + #define AW_GPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) #define AW_GPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) #define AW_GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) @@ -271,15 +307,19 @@ struct aw_gpio_softc { #define AW_GPIO_GP_DRV(_bank, _idx) 0x14 + ((_bank) * 0x24) + ((_idx) << 2) #define AW_GPIO_GP_PUL(_bank, _idx) 0x1c + ((_bank) * 0x24) + ((_idx) << 2) -#define AW_GPIO_GP_INT_CFG0 0x200 -#define AW_GPIO_GP_INT_CFG1 0x204 -#define AW_GPIO_GP_INT_CFG2 0x208 -#define AW_GPIO_GP_INT_CFG3 0x20c +#define AW_GPIO_GP_INT_BASE(_bank) (0x200 + 0x20 * _bank) -#define AW_GPIO_GP_INT_CTL 0x210 -#define AW_GPIO_GP_INT_STA 0x214 -#define AW_GPIO_GP_INT_DEB 0x218 +#define AW_GPIO_GP_INT_CFG(_bank, _pin) (AW_GPIO_GP_INT_BASE(_bank) + (0x4 * ((_pin) / 8))) +#define AW_GPIO_GP_INT_CTL(_bank) (AW_GPIO_GP_INT_BASE(_bank) + 0x10) +#define AW_GPIO_GP_INT_STA(_bank) (AW_GPIO_GP_INT_BASE(_bank) + 0x14) +#define AW_GPIO_GP_INT_DEB(_bank) (AW_GPIO_GP_INT_BASE(_bank) + 0x18) +#define AW_GPIO_INT_EDGE_POSITIVE 0x0 +#define AW_GPIO_INT_EDGE_NEGATIVE 0x1 +#define AW_GPIO_INT_LEVEL_HIGH 0x2 +#define AW_GPIO_INT_LEVEL_LOW 0x3 +#define AW_GPIO_INT_EDGE_BOTH 0x4 + static char *aw_gpio_parse_function(phandle_t node); static const char **aw_gpio_parse_pins(phandle_t node, int *pins_nb); static uint32_t aw_gpio_parse_bias(phandle_t node); @@ -290,10 +330,16 @@ static int aw_gpio_pin_set(device_t dev, uint32_t pin, static int aw_gpio_pin_get_locked(struct aw_gpio_softc *sc, uint32_t pin, unsigned int *value); static int aw_gpio_pin_set_locked(struct aw_gpio_softc *sc, uint32_t pin, unsigned int value); +static void aw_gpio_intr(void *arg); +static void aw_gpio_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc); +static void aw_gpio_pic_disable_intr_locked(struct aw_gpio_softc *sc, struct intr_irqsrc *isrc); +static void aw_gpio_pic_post_filter(device_t dev, struct intr_irqsrc *isrc); +static int aw_gpio_register_isrcs(struct aw_gpio_softc *sc); + #define AW_GPIO_WRITE(_sc, _off, _val) \ - bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) + bus_write_4((_sc)->sc_res[AW_GPIO_MEMRES], _off, _val) #define AW_GPIO_READ(_sc, _off) \ - bus_space_read_4(_sc->sc_bst, _sc->sc_bsh, _off) + bus_read_4((_sc)->sc_res[AW_GPIO_MEMRES], _off) static uint32_t aw_gpio_get_function(struct aw_gpio_softc *sc, uint32_t pin) @@ -492,6 +538,8 @@ aw_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32 return (EINVAL); *caps = AW_GPIO_DEFAULT_CAPS; + if (sc->conf->padconf->pins[pin].eint_func != 0) + *caps |= AW_GPIO_INTR_CAPS; return (0); } @@ -807,6 +855,27 @@ aw_gpio_pin_config_32(device_t dev, uint32_t first_pin } static int +aw_gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, + pcell_t *gpios, uint32_t *pin, uint32_t *flags) +{ + struct aw_gpio_softc *sc; + int i; + + sc = device_get_softc(bus); + + /* The GPIO pins are mapped as: . */ + for (i = 0; i < sc->conf->padconf->npins; i++) + if (sc->conf->padconf->pins[i].port == gpios[0] && + sc->conf->padconf->pins[i].pin == gpios[1]) { + *pin = i; + break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Thu Jun 18 23:31:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 378E4337DE8; Thu, 18 Jun 2020 23:31:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nyrY0mwSz4FHn; Thu, 18 Jun 2020 23:31:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15D7411EBB; Thu, 18 Jun 2020 23:31:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05INVuJt057569; Thu, 18 Jun 2020 23:31:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05INVuhN057568; Thu, 18 Jun 2020 23:31:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006182331.05INVuhN057568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 Jun 2020 23:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362352 - stable/12/sys/dev/cpufreq X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/cpufreq X-SVN-Commit-Revision: 362352 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 23:31:57 -0000 Author: manu Date: Thu Jun 18 23:31:56 2020 New Revision: 362352 URL: https://svnweb.freebsd.org/changeset/base/362352 Log: MFC r358555, r358799-r358800 r358555: cpufreq_dt: Improve multiple opp support When looking for cpu with the same OPP starts from the root /cpus node so each instance of cpufreq_dt will now each cpu with the same operating point. Also test that the node we are testing have the property "device_type" set to be equal to "cpu". While here add more debug printfs (off by defaults). r358799: cpufreq_dt: Fix r358555 Before skipping the current cpu when trying to find the ones that have the same opp, record that this one have this opp. Reported by: mmel X-MFC-With: r358555 r358800: cpufreq: Unbreak build. Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- stable/12/sys/dev/cpufreq/cpufreq_dt.c Thu Jun 18 23:23:21 2020 (r362351) +++ stable/12/sys/dev/cpufreq/cpufreq_dt.c Thu Jun 18 23:31:56 2020 (r362352) @@ -82,6 +82,7 @@ struct cpufreq_dt_softc { struct cpufreq_dt_opp *opp; ssize_t nopp; + int cpu; cpuset_t cpus; }; @@ -170,6 +171,13 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * sc = device_get_softc(dev); + DEBUG(dev, "Working on cpu %d\n", sc->cpu); + DEBUG(dev, "We have %d cpu on this dev\n", CPU_COUNT(&sc->cpus)); + if (!CPU_ISSET(sc->cpu, &sc->cpus)) { + DEBUG(dev, "Not for this CPU\n"); + return (0); + } + if (clk_get_freq(sc->clk, &freq) != 0) { device_printf(dev, "Can't get current clk freq\n"); return (ENXIO); @@ -191,7 +199,6 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * return (ENOENT); } uvolt = copp->uvolt_target; - } opp = cpufreq_dt_find_opp(sc->dev, set->freq * 1000000); @@ -450,14 +457,16 @@ cpufreq_dt_attach(device_t dev) int cpu; uint64_t freq; int rv = 0; + char device_type[16]; enum opp_version version; sc = device_get_softc(dev); sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); - cpu = device_get_unit(device_get_parent(dev)); + sc->cpu = device_get_unit(device_get_parent(dev)); - if (cpu >= mp_ncpus) { + DEBUG(dev, "cpu=%d\n", sc->cpu); + if (sc->cpu >= mp_ncpus) { device_printf(dev, "Not attaching as cpu is not present\n"); return (ENXIO); } @@ -503,7 +512,19 @@ cpufreq_dt_attach(device_t dev) * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); - for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { + cnode = OF_parent(node); + for (cpu = 0, cnode = OF_child(cnode); cnode > 0; cnode = OF_peer(cnode)) { + if (OF_getprop(cnode, "device_type", device_type, sizeof(device_type)) <= 0) + continue; + if (strcmp(device_type, "cpu") != 0) + continue; + if (cpu == sc->cpu) { + DEBUG(dev, "Skipping our cpu\n"); + CPU_SET(cpu, &sc->cpus); + cpu++; + continue; + } + DEBUG(dev, "Testing CPU %d\n", cpu); copp = -1; if (version == OPP_V1) OF_getencprop(cnode, "operating-points", &copp, @@ -511,8 +532,11 @@ cpufreq_dt_attach(device_t dev) else if (version == OPP_V2) OF_getencprop(cnode, "operating-points-v2", &copp, sizeof(copp)); - if (opp == copp) + if (opp == copp) { + DEBUG(dev, "CPU %d is using the same opp as this one (%d)\n", cpu, sc->cpu); CPU_SET(cpu, &sc->cpus); + } + cpu++; } if (clk_get_freq(sc->clk, &freq) == 0) From owner-svn-src-stable-12@freebsd.org Fri Jun 19 00:43:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D655433A000; Fri, 19 Jun 2020 00:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p0RN5JlWz4K8H; Fri, 19 Jun 2020 00:43:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B171312D03; Fri, 19 Jun 2020 00:43:44 +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 05J0hifl002657; Fri, 19 Jun 2020 00:43:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05J0hiIh002656; Fri, 19 Jun 2020 00:43:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006190043.05J0hiIh002656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 Jun 2020 00:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362355 - stable/12/sys/dev/ahci X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ahci X-SVN-Commit-Revision: 362355 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 00:43:44 -0000 Author: mav Date: Fri Jun 19 00:43:44 2020 New Revision: 362355 URL: https://svnweb.freebsd.org/changeset/base/362355 Log: MFC r361816: Limit AHCI to only one MSI if more is not needed. My AMD Ryzen system has 4 AHCI controllers, each supporting 16 MSI vectors. Since two of the controllers have only one SATA port, limit to single MSI saves system 30 interrupt vectors for free. It may be possible to also limit number of MSI vectors to 4 and 8 for the other two controllers, but according to the AHCI specification after that controllers may revert to only one vector, that would be a bigger loss to risk. Modified: stable/12/sys/dev/ahci/ahci_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/12/sys/dev/ahci/ahci_pci.c Fri Jun 19 00:26:30 2020 (r362354) +++ stable/12/sys/dev/ahci/ahci_pci.c Fri Jun 19 00:43:44 2020 (r362355) @@ -470,6 +470,7 @@ ahci_pci_attach(device_t dev) uint8_t revid = pci_get_revid(dev); int msi_count, msix_count; uint8_t table_bar = 0, pba_bar = 0; + uint32_t caps, pi; msi_count = pci_msi_count(dev); msix_count = pci_msix_count(dev); @@ -604,9 +605,12 @@ ahci_pci_attach(device_t dev) /* Setup MSI register parameters */ /* Process hints. */ + caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + pi = ATA_INL(ctlr->r_mem, AHCI_PI); if (ctlr->quirks & AHCI_Q_NOMSI) ctlr->msi = 0; - else if (ctlr->quirks & AHCI_Q_1MSI) + else if ((ctlr->quirks & AHCI_Q_1MSI) || + ((caps & (AHCI_CAP_NPMASK | AHCI_CAP_CCCS)) == 0 && pi == 1)) ctlr->msi = 1; else ctlr->msi = 2; From owner-svn-src-stable-12@freebsd.org Fri Jun 19 00:44:36 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 769E4339E36; Fri, 19 Jun 2020 00:44:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p0SN2WYyz4K6l; Fri, 19 Jun 2020 00:44:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51C25128C0; Fri, 19 Jun 2020 00:44:36 +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 05J0ianV002779; Fri, 19 Jun 2020 00:44:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05J0iZir002777; Fri, 19 Jun 2020 00:44:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006190044.05J0iZir002777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 Jun 2020 00:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362356 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 362356 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 00:44:36 -0000 Author: mav Date: Fri Jun 19 00:44:35 2020 New Revision: 362356 URL: https://svnweb.freebsd.org/changeset/base/362356 Log: MFC r361835: Add bunch of HDA controller and codec IDs. Modified: stable/12/sys/dev/sound/pci/hda/hdac.c stable/12/sys/dev/sound/pci/hda/hdac.h stable/12/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.c Fri Jun 19 00:43:44 2020 (r362355) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Fri Jun 19 00:44:35 2020 (r362356) @@ -80,15 +80,19 @@ static const struct { char quirks_off; } hdac_devices[] = { { HDA_INTEL_OAK, "Intel Oaktrail", 0, 0 }, + { HDA_INTEL_CMLKLP, "Intel Comet Lake-LP", 0, 0 }, + { HDA_INTEL_CMLKH, "Intel Comet Lake-H", 0, 0 }, { HDA_INTEL_BAY, "Intel BayTrail", 0, 0 }, { HDA_INTEL_HSW1, "Intel Haswell", 0, 0 }, { HDA_INTEL_HSW2, "Intel Haswell", 0, 0 }, { HDA_INTEL_HSW3, "Intel Haswell", 0, 0 }, { HDA_INTEL_BDW1, "Intel Broadwell", 0, 0 }, { HDA_INTEL_BDW2, "Intel Broadwell", 0, 0 }, + { HDA_INTEL_BXTNT, "Intel Broxton-T", 0, 0 }, { HDA_INTEL_CPT, "Intel Cougar Point", 0, 0 }, { HDA_INTEL_PATSBURG,"Intel Patsburg", 0, 0 }, { HDA_INTEL_PPT1, "Intel Panther Point", 0, 0 }, + { HDA_INTEL_BR, "Intel Braswell", 0, 0 }, { HDA_INTEL_LPT1, "Intel Lynx Point", 0, 0 }, { HDA_INTEL_LPT2, "Intel Lynx Point", 0, 0 }, { HDA_INTEL_WCPT, "Intel Wildcat Point", 0, 0 }, @@ -102,16 +106,21 @@ static const struct { { HDA_INTEL_KBLK, "Intel Kaby Lake", 0, 0 }, { HDA_INTEL_KBLKH, "Intel Kaby Lake-H", 0, 0 }, { HDA_INTEL_CFLK, "Intel Coffee Lake", 0, 0 }, + { HDA_INTEL_CMLKS, "Intel Comet Lake-S", 0, 0 }, { HDA_INTEL_CNLK, "Intel Cannon Lake", 0, 0 }, { HDA_INTEL_82801F, "Intel 82801F", 0, 0 }, { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0, 0 }, { HDA_INTEL_82801G, "Intel 82801G", 0, 0 }, { HDA_INTEL_82801H, "Intel 82801H", 0, 0 }, { HDA_INTEL_82801I, "Intel 82801I", 0, 0 }, + { HDA_INTEL_JLK, "Intel Jasper Lake", 0, 0 }, { HDA_INTEL_82801JI, "Intel 82801JI", 0, 0 }, { HDA_INTEL_82801JD, "Intel 82801JD", 0, 0 }, { HDA_INTEL_PCH, "Intel Ibex Peak", 0, 0 }, { HDA_INTEL_PCH2, "Intel Ibex Peak", 0, 0 }, + { HDA_INTEL_ELLK, "Intel Elkhart Lake", 0, 0 }, + { HDA_INTEL_JLK2, "Intel Jasper Lake", 0, 0 }, + { HDA_INTEL_BXTNP, "Intel Broxton-P", 0, 0 }, { HDA_INTEL_SCH, "Intel SCH", 0, 0 }, { HDA_NVIDIA_MCP51, "NVIDIA MCP51", 0, HDAC_QUIRK_MSI }, { HDA_NVIDIA_MCP55, "NVIDIA MCP55", 0, HDAC_QUIRK_MSI }, @@ -169,6 +178,10 @@ static const struct { { HDA_ATI_RV940, "ATI RV940", 0, 0 }, { HDA_ATI_RV970, "ATI RV970", 0, 0 }, { HDA_ATI_R1000, "ATI R1000", 0, 0 }, + { HDA_AMD_X370, "AMD X370", 0, 0 }, + { HDA_AMD_X570, "AMD X570", 0, 0 }, + { HDA_AMD_STONEY, "AMD Stoney", 0, 0 }, + { HDA_AMD_RAVEN, "AMD Raven", 0, 0 }, { HDA_AMD_HUDSON2, "AMD Hudson-2", 0, 0 }, { HDA_RDC_M3010, "RDC M3010", 0, 0 }, { HDA_VIA_VT82XX, "VIA VT8251/8237A",0, 0 }, Modified: stable/12/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.h Fri Jun 19 00:43:44 2020 (r362355) +++ stable/12/sys/dev/sound/pci/hda/hdac.h Fri Jun 19 00:44:35 2020 (r362356) @@ -43,24 +43,32 @@ /* Intel */ #define INTEL_VENDORID 0x8086 +#define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) +#define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_OAK HDA_MODEL_CONSTRUCT(INTEL, 0x080a) #define HDA_INTEL_BAY HDA_MODEL_CONSTRUCT(INTEL, 0x0f04) #define HDA_INTEL_HSW1 HDA_MODEL_CONSTRUCT(INTEL, 0x0a0c) #define HDA_INTEL_HSW2 HDA_MODEL_CONSTRUCT(INTEL, 0x0c0c) #define HDA_INTEL_HSW3 HDA_MODEL_CONSTRUCT(INTEL, 0x0d0c) #define HDA_INTEL_BDW1 HDA_MODEL_CONSTRUCT(INTEL, 0x160c) +#define HDA_INTEL_BXTNT HDA_MODEL_CONSTRUCT(INTEL, 0x1a98) #define HDA_INTEL_CPT HDA_MODEL_CONSTRUCT(INTEL, 0x1c20) #define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20) #define HDA_INTEL_PPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x1e20) +#define HDA_INTEL_BR HDA_MODEL_CONSTRUCT(INTEL, 0x2284) #define HDA_INTEL_82801F HDA_MODEL_CONSTRUCT(INTEL, 0x2668) #define HDA_INTEL_63XXESB HDA_MODEL_CONSTRUCT(INTEL, 0x269a) #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) +#define HDA_INTEL_ELLK HDA_MODEL_CONSTRUCT(INTEL, 0x4b55) +#define HDA_INTEL_JLK2 HDA_MODEL_CONSTRUCT(INTEL, 0x4dc8) +#define HDA_INTEL_BXTNP HDA_MODEL_CONSTRUCT(INTEL, 0x5a98) #define HDA_INTEL_MACBOOKPRO92 HDA_MODEL_CONSTRUCT(INTEL, 0x7270) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) @@ -77,6 +85,7 @@ #define HDA_INTEL_KBLK HDA_MODEL_CONSTRUCT(INTEL, 0xa171) #define HDA_INTEL_KBLKH HDA_MODEL_CONSTRUCT(INTEL, 0xa2f0) #define HDA_INTEL_CFLK HDA_MODEL_CONSTRUCT(INTEL, 0xa348) +#define HDA_INTEL_CMLKS HDA_MODEL_CONSTRUCT(INTEL, 0xa3f0) #define HDA_INTEL_CNLK HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -146,6 +155,10 @@ #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) #define AMD_VENDORID 0x1022 +#define HDA_AMD_X370 HDA_MODEL_CONSTRUCT(AMD, 0x1457) +#define HDA_AMD_X570 HDA_MODEL_CONSTRUCT(AMD, 0x1487) +#define HDA_AMD_STONEY HDA_MODEL_CONSTRUCT(AMD, 0x157a) +#define HDA_AMD_RAVEN HDA_MODEL_CONSTRUCT(AMD, 0x15e3) #define HDA_AMD_HUDSON2 HDA_MODEL_CONSTRUCT(AMD, 0x780d) #define HDA_AMD_ALL HDA_MODEL_CONSTRUCT(AMD, 0xffff) @@ -353,12 +366,16 @@ /* Realtek */ #define REALTEK_VENDORID 0x10ec +#define HDA_CODEC_ALC215 HDA_CODEC_CONSTRUCT(REALTEK, 0x0215) #define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221) +#define HDA_CODEC_ALC222 HDA_CODEC_CONSTRUCT(REALTEK, 0x0222) #define HDA_CODEC_ALC225 HDA_CODEC_CONSTRUCT(REALTEK, 0x0225) #define HDA_CODEC_ALC231 HDA_CODEC_CONSTRUCT(REALTEK, 0x0231) #define HDA_CODEC_ALC233 HDA_CODEC_CONSTRUCT(REALTEK, 0x0233) #define HDA_CODEC_ALC234 HDA_CODEC_CONSTRUCT(REALTEK, 0x0234) #define HDA_CODEC_ALC235 HDA_CODEC_CONSTRUCT(REALTEK, 0x0235) +#define HDA_CODEC_ALC236 HDA_CODEC_CONSTRUCT(REALTEK, 0x0236) +#define HDA_CODEC_ALC245 HDA_CODEC_CONSTRUCT(REALTEK, 0x0245) #define HDA_CODEC_ALC255 HDA_CODEC_CONSTRUCT(REALTEK, 0x0255) #define HDA_CODEC_ALC256 HDA_CODEC_CONSTRUCT(REALTEK, 0x0256) #define HDA_CODEC_ALC257 HDA_CODEC_CONSTRUCT(REALTEK, 0x0257) @@ -380,6 +397,7 @@ #define HDA_CODEC_ALC285 HDA_CODEC_CONSTRUCT(REALTEK, 0x0285) #define HDA_CODEC_ALC286 HDA_CODEC_CONSTRUCT(REALTEK, 0x0286) #define HDA_CODEC_ALC288 HDA_CODEC_CONSTRUCT(REALTEK, 0x0288) +#define HDA_CODEC_ALC289 HDA_CODEC_CONSTRUCT(REALTEK, 0x0289) #define HDA_CODEC_ALC290 HDA_CODEC_CONSTRUCT(REALTEK, 0x0290) #define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) #define HDA_CODEC_ALC293 HDA_CODEC_CONSTRUCT(REALTEK, 0x0293) @@ -389,6 +407,8 @@ #define HDA_CODEC_ALC299 HDA_CODEC_CONSTRUCT(REALTEK, 0x0299) #define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) #define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) +#define HDA_CODEC_ALC300 HDA_CODEC_CONSTRUCT(REALTEK, 0x0300) +#define HDA_CODEC_ALC623 HDA_CODEC_CONSTRUCT(REALTEK, 0x0623) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) #define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662) #define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) @@ -411,6 +431,8 @@ #define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892) #define HDA_CODEC_ALC899 HDA_CODEC_CONSTRUCT(REALTEK, 0x0899) #define HDA_CODEC_ALC1150 HDA_CODEC_CONSTRUCT(REALTEK, 0x0900) +#define HDA_CODEC_ALCS1200A HDA_CODEC_CONSTRUCT(REALTEK, 0x0b00) +#define HDA_CODEC_ALC1220_1 HDA_CODEC_CONSTRUCT(REALTEK, 0x1168) #define HDA_CODEC_ALC1220 HDA_CODEC_CONSTRUCT(REALTEK, 0x1220) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) @@ -697,6 +719,11 @@ #define HDA_CODEC_INTELBDW HDA_CODEC_CONSTRUCT(INTEL, 0x2808) #define HDA_CODEC_INTELSKLK HDA_CODEC_CONSTRUCT(INTEL, 0x2809) #define HDA_CODEC_INTELKBLK HDA_CODEC_CONSTRUCT(INTEL, 0x280b) +#define HDA_CODEC_INTELJLK HDA_CODEC_CONSTRUCT(INTEL, 0x281a) +#define HDA_CODEC_INTELELLK HDA_CODEC_CONSTRUCT(INTEL, 0x281b) +#define HDA_CODEC_INTELCT HDA_CODEC_CONSTRUCT(INTEL, 0x2880) +#define HDA_CODEC_INTELVV2 HDA_CODEC_CONSTRUCT(INTEL, 0x2882) +#define HDA_CODEC_INTELBR HDA_CODEC_CONSTRUCT(INTEL, 0x2883) #define HDA_CODEC_INTELCL HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) Modified: stable/12/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdacc.c Fri Jun 19 00:43:44 2020 (r362355) +++ stable/12/sys/dev/sound/pci/hda/hdacc.c Fri Jun 19 00:44:35 2020 (r362356) @@ -78,12 +78,16 @@ static const struct { { HDA_CODEC_CS4206, 0, "Cirrus Logic CS4206" }, { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, { HDA_CODEC_CS4210, 0, "Cirrus Logic CS4210" }, + { HDA_CODEC_ALC215, 0, "Realtek ALC215" }, { HDA_CODEC_ALC221, 0, "Realtek ALC221" }, + { HDA_CODEC_ALC222, 0, "Realtek ALC222" }, { HDA_CODEC_ALC225, 0, "Realtek ALC225" }, { HDA_CODEC_ALC231, 0, "Realtek ALC231" }, { HDA_CODEC_ALC233, 0, "Realtek ALC233" }, { HDA_CODEC_ALC234, 0, "Realtek ALC234" }, { HDA_CODEC_ALC235, 0, "Realtek ALC235" }, + { HDA_CODEC_ALC236, 0, "Realtek ALC236" }, + { HDA_CODEC_ALC245, 0, "Realtek ALC245" }, { HDA_CODEC_ALC255, 0, "Realtek ALC255" }, { HDA_CODEC_ALC256, 0, "Realtek ALC256" }, { HDA_CODEC_ALC257, 0, "Realtek ALC257" }, @@ -107,6 +111,7 @@ static const struct { { HDA_CODEC_ALC285, 0, "Realtek ALC285" }, { HDA_CODEC_ALC286, 0, "Realtek ALC286" }, { HDA_CODEC_ALC288, 0, "Realtek ALC288" }, + { HDA_CODEC_ALC289, 0, "Realtek ALC289" }, { HDA_CODEC_ALC290, 0, "Realtek ALC290" }, { HDA_CODEC_ALC292, 0, "Realtek ALC292" }, { HDA_CODEC_ALC293, 0, "Realtek ALC293" }, @@ -114,8 +119,12 @@ static const struct { { HDA_CODEC_ALC295, 0, "Realtek ALC295" }, { HDA_CODEC_ALC298, 0, "Realtek ALC298" }, { HDA_CODEC_ALC299, 0, "Realtek ALC299" }, + { HDA_CODEC_ALC300, 0, "Realtek ALC300" }, + { HDA_CODEC_ALC623, 0, "Realtek ALC623" }, { HDA_CODEC_ALC660, 0, "Realtek ALC660-VD" }, { HDA_CODEC_ALC662, 0x0002, "Realtek ALC662 rev2" }, + { HDA_CODEC_ALC662, 0x0101, "Realtek ALC662 rev1" }, + { HDA_CODEC_ALC662, 0x0300, "Realtek ALC662 rev3" }, { HDA_CODEC_ALC662, 0, "Realtek ALC662" }, { HDA_CODEC_ALC663, 0, "Realtek ALC663" }, { HDA_CODEC_ALC665, 0, "Realtek ALC665" }, @@ -141,6 +150,8 @@ static const struct { { HDA_CODEC_ALC892, 0, "Realtek ALC892" }, { HDA_CODEC_ALC899, 0, "Realtek ALC899" }, { HDA_CODEC_ALC1150, 0, "Realtek ALC1150" }, + { HDA_CODEC_ALCS1200A, 0, "Realtek ALCS1200A" }, + { HDA_CODEC_ALC1220_1, 0, "Realtek ALC1220" }, { HDA_CODEC_ALC1220, 0, "Realtek ALC1220" }, { HDA_CODEC_AD1882, 0, "Analog Devices AD1882" }, { HDA_CODEC_AD1882A, 0, "Analog Devices AD1882A" }, @@ -370,6 +381,11 @@ static const struct { { HDA_CODEC_INTELBDW, 0, "Intel Broadwell" }, { HDA_CODEC_INTELSKLK, 0, "Intel Skylake" }, { HDA_CODEC_INTELKBLK, 0, "Intel Kaby Lake" }, + { HDA_CODEC_INTELJLK, 0, "Intel Jasper Lake" }, + { HDA_CODEC_INTELELLK, 0, "Intel Elkhart Lake" }, + { HDA_CODEC_INTELCT, 0, "Intel CedarTrail" }, + { HDA_CODEC_INTELVV2, 0, "Intel Valleyview2" }, + { HDA_CODEC_INTELBR, 0, "Intel Braswell" }, { HDA_CODEC_INTELCL, 0, "Intel Crestline" }, { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" }, { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" }, From owner-svn-src-stable-12@freebsd.org Fri Jun 19 00:45:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA246339E50; Fri, 19 Jun 2020 00:45:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p0TP4VTFz4KG9; Fri, 19 Jun 2020 00:45:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95885128C1; Fri, 19 Jun 2020 00:45:29 +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 05J0jTUR002894; Fri, 19 Jun 2020 00:45:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05J0jT38002893; Fri, 19 Jun 2020 00:45:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006190045.05J0jT38002893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 Jun 2020 00:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362357 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362357 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 00:45:29 -0000 Author: mav Date: Fri Jun 19 00:45:29 2020 New Revision: 362357 URL: https://svnweb.freebsd.org/changeset/base/362357 Log: MFC r362100: Fix config_intrhook leak on initial reset failure. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Fri Jun 19 00:44:35 2020 (r362356) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Fri Jun 19 00:45:29 2020 (r362357) @@ -1090,12 +1090,14 @@ nvme_ctrlr_start_config_hook(void *arg) status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { nvme_ctrlr_fail(ctrlr); + config_intrhook_disestablish(&ctrlr->config_hook); return; } status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { nvme_ctrlr_fail(ctrlr); + config_intrhook_disestablish(&ctrlr->config_hook); return; } From owner-svn-src-stable-12@freebsd.org Fri Jun 19 05:54:17 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 013533401BC; Fri, 19 Jun 2020 05:54:16 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p7Kh5x40z4ZPj; Fri, 19 Jun 2020 05:54:16 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6DA616278; Fri, 19 Jun 2020 05:54:16 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05J5sGFE094468; Fri, 19 Jun 2020 05:54:16 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05J5sGxQ094465; Fri, 19 Jun 2020 05:54:16 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <202006190554.05J5sGxQ094465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 19 Jun 2020 05:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362364 - in stable/12: sbin/ifconfig sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: in stable/12: sbin/ifconfig sys/net X-SVN-Commit-Revision: 362364 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 05:54:17 -0000 Author: rpokala Date: Fri Jun 19 05:54:15 2020 New Revision: 362364 URL: https://svnweb.freebsd.org/changeset/base/362364 Log: MFC r362078: Decode the "LACP Fast Timeout" LAGG option flag r286700 added the "lacp_fast_timeout" option to `ifconfig', but we forgot to include the new option in the string used to decode the option bits. Add "LACP_FAST_TIMO" to LAGG_OPT_BITS. Also, s/LAGG_OPT_LACP_TIMEOUT/LAGG_OPT_LACP_FAST_TIMO/g , to be clearer that the flag indicates "Fast Timeout" mode. Modified: stable/12/sbin/ifconfig/iflagg.c stable/12/sys/net/if_lagg.c stable/12/sys/net/if_lagg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/iflagg.c ============================================================================== --- stable/12/sbin/ifconfig/iflagg.c Fri Jun 19 04:18:20 2020 (r362363) +++ stable/12/sbin/ifconfig/iflagg.c Fri Jun 19 05:54:15 2020 (r362364) @@ -139,8 +139,8 @@ setlaggsetopt(const char *val, int d, int s, const str case -LAGG_OPT_LACP_TXTEST: case LAGG_OPT_LACP_RXTEST: case -LAGG_OPT_LACP_RXTEST: - case LAGG_OPT_LACP_TIMEOUT: - case -LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: + case -LAGG_OPT_LACP_FAST_TIMO: break; default: err(1, "Invalid lagg option"); @@ -312,8 +312,8 @@ static struct cmd lagg_cmds[] = { DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), - DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), - DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), + DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt), + DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt), DEF_CMD_ARG("flowid_shift", setlaggflowidshift), DEF_CMD_ARG("rr_limit", setlaggrr_limit), }; Modified: stable/12/sys/net/if_lagg.c ============================================================================== --- stable/12/sys/net/if_lagg.c Fri Jun 19 04:18:20 2020 (r362363) +++ stable/12/sys/net/if_lagg.c Fri Jun 19 05:54:15 2020 (r362364) @@ -1220,7 +1220,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data if (lsc->lsc_strict_mode != 0) ro->ro_opts |= LAGG_OPT_LACP_STRICT; if (lsc->lsc_fast_timeout != 0) - ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT; + ro->ro_opts |= LAGG_OPT_LACP_FAST_TIMO; ro->ro_active = sc->sc_active; } else { @@ -1277,8 +1277,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data case -LAGG_OPT_LACP_RXTEST: case LAGG_OPT_LACP_STRICT: case -LAGG_OPT_LACP_STRICT: - case LAGG_OPT_LACP_TIMEOUT: - case -LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: + case -LAGG_OPT_LACP_FAST_TIMO: valid = lacp = 1; break; default: @@ -1338,14 +1338,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data case -LAGG_OPT_LACP_STRICT: lsc->lsc_strict_mode = 0; break; - case LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: LACP_LOCK(lsc); LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) lp->lp_state |= LACP_STATE_TIMEOUT; LACP_UNLOCK(lsc); lsc->lsc_fast_timeout = 1; break; - case -LAGG_OPT_LACP_TIMEOUT: + case -LAGG_OPT_LACP_FAST_TIMO: LACP_LOCK(lsc); LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) lp->lp_state &= ~LACP_STATE_TIMEOUT; Modified: stable/12/sys/net/if_lagg.h ============================================================================== --- stable/12/sys/net/if_lagg.h Fri Jun 19 04:18:20 2020 (r362363) +++ stable/12/sys/net/if_lagg.h Fri Jun 19 05:54:15 2020 (r362364) @@ -147,7 +147,7 @@ struct lagg_reqopts { #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ -#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ +#define LAGG_OPT_LACP_FAST_TIMO 0x80 /* LACP fast timeout */ #define LAGG_OPT_RR_LIMIT 0x100 /* RR stride */ u_int ro_count; /* number of ports */ u_int ro_active; /* active port count */ @@ -160,7 +160,8 @@ struct lagg_reqopts { #define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) #define LAGG_OPT_BITS "\020\001USE_FLOWID\005LACP_STRICT" \ - "\006LACP_TXTEST\007LACP_RXTEST" + "\006LACP_TXTEST\007LACP_RXTEST" \ + "\010LACP_FAST_TIMO" #ifdef _KERNEL From owner-svn-src-stable-12@freebsd.org Fri Jun 19 10:33:46 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEA9D346F8A; Fri, 19 Jun 2020 10:33:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pFXB41Rrz3c1l; Fri, 19 Jun 2020 10:33:46 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C49119D1E; Fri, 19 Jun 2020 10:33:46 +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 05JAXk2f066652; Fri, 19 Jun 2020 10:33:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JAXkjo066651; Fri, 19 Jun 2020 10:33:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006191033.05JAXkjo066651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2020 10:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362370 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362370 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 10:33:46 -0000 Author: kib Date: Fri Jun 19 10:33:45 2020 New Revision: 362370 URL: https://svnweb.freebsd.org/changeset/base/362370 Log: MFC r362128: rtld: set osrel when in the direct exec mode. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Fri Jun 19 09:27:58 2020 (r362369) +++ stable/12/libexec/rtld-elf/rtld.c Fri Jun 19 10:33:45 2020 (r362370) @@ -384,8 +384,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr const char *argv0, *binpath; caddr_t imgentry; char buf[MAXPATHLEN]; - int argc, fd, i, phnum, rtld_argc; - bool dir_enable, explicit_fd, search_in_path; + int argc, fd, i, mib[4], old_osrel, osrel, phnum, rtld_argc; + size_t sz; + bool dir_enable, direct_exec, explicit_fd, search_in_path; /* * On entry, the dynamic linker itself has not been relocated yet. @@ -423,6 +424,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr main_argv = argv; trust = !issetugid(); + direct_exec = false; md_abi_variant_hook(aux_info); @@ -438,6 +440,21 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr argv0); rtld_die(); } + direct_exec = true; + + /* + * Set osrel for us, it is later reset to the binary' + * value before first instruction of code from the binary + * is executed. + */ + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_OSREL; + mib[3] = getpid(); + osrel = __FreeBSD_version; + sz = sizeof(old_osrel); + (void)sysctl(mib, 4, &old_osrel, &sz, &osrel, sizeof(osrel)); + dbg("opening main program in direct exec mode"); if (argc >= 2) { rtld_argc = parse_args(argv, argc, &search_in_path, &fd, &argv0); @@ -767,6 +784,18 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr * init functions. */ pre_init(); + + if (direct_exec) { + /* Set osrel for direct-execed binary */ + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_OSREL; + mib[3] = getpid(); + osrel = obj_main->osrel; + sz = sizeof(old_osrel); + dbg("setting osrel to %d", osrel); + (void)sysctl(mib, 4, &old_osrel, &sz, &osrel, sizeof(osrel)); + } wlock_acquire(rtld_bind_lock, &lockstate); From owner-svn-src-stable-12@freebsd.org Fri Jun 19 11:11:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06DBF347F31; Fri, 19 Jun 2020 11:11:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pGN85NgHz3fsX; Fri, 19 Jun 2020 11:11: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B42DF19E75; Fri, 19 Jun 2020 11:11: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 05JBBqLs088825; Fri, 19 Jun 2020 11:11:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JBBqNZ088822; Fri, 19 Jun 2020 11:11:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006191111.05JBBqNZ088822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2020 11:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362372 - in stable/12/sys/x86: include x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/x86: include x86 X-SVN-Commit-Revision: 362372 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 11:11:53 -0000 Author: kib Date: Fri Jun 19 11:11:52 2020 New Revision: 362372 URL: https://svnweb.freebsd.org/changeset/base/362372 Log: MFC r348130 (by cem): Decode and name additional x86 feature bits. Modified: stable/12/sys/x86/include/specialreg.h stable/12/sys/x86/x86/identcpu.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:04:49 2020 (r362371) +++ stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:11:52 2020 (r362372) @@ -416,29 +416,41 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 0 ecx info */ -#define CPUID_STDEXT2_PREFETCHWT1 0x00000001 -#define CPUID_STDEXT2_UMIP 0x00000004 -#define CPUID_STDEXT2_PKU 0x00000008 -#define CPUID_STDEXT2_OSPKE 0x00000010 -#define CPUID_STDEXT2_WAITPKG 0x00000020 -#define CPUID_STDEXT2_GFNI 0x00000100 -#define CPUID_STDEXT2_RDPID 0x00400000 -#define CPUID_STDEXT2_CLDEMOTE 0x02000000 -#define CPUID_STDEXT2_MOVDIRI 0x08000000 +#define CPUID_STDEXT2_PREFETCHWT1 0x00000001 +#define CPUID_STDEXT2_AVX512VBMI 0x00000002 +#define CPUID_STDEXT2_UMIP 0x00000004 +#define CPUID_STDEXT2_PKU 0x00000008 +#define CPUID_STDEXT2_OSPKE 0x00000010 +#define CPUID_STDEXT2_WAITPKG 0x00000020 +#define CPUID_STDEXT2_AVX512VBMI2 0x00000040 +#define CPUID_STDEXT2_GFNI 0x00000100 +#define CPUID_STDEXT2_VAES 0x00000200 +#define CPUID_STDEXT2_VPCLMULQDQ 0x00000400 +#define CPUID_STDEXT2_AVX512VNNI 0x00000800 +#define CPUID_STDEXT2_AVX512BITALG 0x00001000 +#define CPUID_STDEXT2_AVX512VPOPCNTDQ 0x00004000 +#define CPUID_STDEXT2_RDPID 0x00400000 +#define CPUID_STDEXT2_CLDEMOTE 0x02000000 +#define CPUID_STDEXT2_MOVDIRI 0x08000000 #define CPUID_STDEXT2_MOVDIRI64B 0x10000000 -#define CPUID_STDEXT2_SGXLC 0x40000000 +#define CPUID_STDEXT2_ENQCMD 0x20000000 +#define CPUID_STDEXT2_SGXLC 0x40000000 /* * CPUID instruction 7 Structured Extended Features, leaf 0 edx info */ -#define CPUID_STDEXT3_MD_CLEAR 0x00000400 -#define CPUID_STDEXT3_TSXFA 0x00002000 -#define CPUID_STDEXT3_IBPB 0x04000000 -#define CPUID_STDEXT3_STIBP 0x08000000 -#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 -#define CPUID_STDEXT3_ARCH_CAP 0x20000000 -#define CPUID_STDEXT3_CORE_CAP 0x40000000 -#define CPUID_STDEXT3_SSBD 0x80000000 +#define CPUID_STDEXT3_AVX5124VNNIW 0x00000004 +#define CPUID_STDEXT3_AVX5124FMAPS 0x00000008 +#define CPUID_STDEXT3_AVX512VP2INTERSECT 0x00000100 +#define CPUID_STDEXT3_MD_CLEAR 0x00000400 +#define CPUID_STDEXT3_TSXFA 0x00002000 +#define CPUID_STDEXT3_PCONFIG 0x00040000 +#define CPUID_STDEXT3_IBPB 0x04000000 +#define CPUID_STDEXT3_STIBP 0x08000000 +#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 +#define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_CORE_CAP 0x40000000 +#define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ #define IA32_ARCH_CAP_RDCL_NO 0x00000001 Modified: stable/12/sys/x86/x86/identcpu.c ============================================================================== --- stable/12/sys/x86/x86/identcpu.c Fri Jun 19 11:04:49 2020 (r362371) +++ stable/12/sys/x86/x86/identcpu.c Fri Jun 19 11:11:52 2020 (r362372) @@ -993,11 +993,18 @@ printcpuinfo(void) "\004PKU" "\005OSPKE" "\006WAITPKG" + "\007AVX512VBMI2" "\011GFNI" + "\012VAES" + "\013VPCLMULQDQ" + "\014AVX512VNNI" + "\015AVX512BITALG" + "\016AVX512VPOPCNTDQ" "\027RDPID" "\032CLDEMOTE" "\034MOVDIRI" "\035MOVDIRI64B" + "\036ENQCMD" "\037SGXLC" ); } @@ -1006,8 +1013,12 @@ printcpuinfo(void) printf("\n Structured Extended Features3=0x%b", cpu_stdext_feature3, "\020" + "\003AVX512_4VNNIW" + "\004AVX512_4FMAPS" + "\011AVX512VP2INTERSECT" "\013MD_CLEAR" "\016TSXFA" + "\023PCONFIG" "\033IBPB" "\034STIBP" "\035L1DFL" From owner-svn-src-stable-12@freebsd.org Fri Jun 19 11:24:31 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 058B0348394; Fri, 19 Jun 2020 11:24:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pGfk6M9dz3gWF; Fri, 19 Jun 2020 11:24:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D57601A258; Fri, 19 Jun 2020 11:24:30 +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 05JBOUGZ097666; Fri, 19 Jun 2020 11:24:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JBOUJ1097665; Fri, 19 Jun 2020 11:24:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006191124.05JBOUJ1097665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2020 11:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362373 - stable/12/sys/x86/include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/x86/include X-SVN-Commit-Revision: 362373 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 11:24:31 -0000 Author: kib Date: Fri Jun 19 11:24:30 2020 New Revision: 362373 URL: https://svnweb.freebsd.org/changeset/base/362373 Log: MFC r340716 (by bwidawsk): Add definitions for Intel Speed Shift. Modified: stable/12/sys/x86/include/specialreg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:11:52 2020 (r362372) +++ stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:24:30 2020 (r362373) @@ -190,6 +190,12 @@ #define CPUTPM1_SENSOR 0x00000001 #define CPUTPM1_TURBO 0x00000002 #define CPUTPM1_ARAT 0x00000004 +#define CPUTPM1_HWP 0x00000080 +#define CPUTPM1_HWP_NOTIFICATION 0x00000100 +#define CPUTPM1_HWP_ACTIVITY_WINDOW 0x00000200 +#define CPUTPM1_HWP_PERF_PREF 0x00000400 +#define CPUTPM1_HWP_PKG 0x00000800 +#define CPUTPM1_HWP_FLEXIBLE 0x00020000 #define CPUTPM2_EFFREQ 0x00000001 /* Intel Processor Trace CPUID. */ @@ -573,7 +579,14 @@ #define MSR_DRAM_ENERGY_STATUS 0x619 #define MSR_PP0_ENERGY_STATUS 0x639 #define MSR_PP1_ENERGY_STATUS 0x641 +#define MSR_PPERF 0x64e #define MSR_TSC_DEADLINE 0x6e0 /* Writes are not serializing */ +#define MSR_IA32_PM_ENABLE 0x770 +#define MSR_IA32_HWP_CAPABILITIES 0x771 +#define MSR_IA32_HWP_REQUEST_PKG 0x772 +#define MSR_IA32_HWP_INTERRUPT 0x773 +#define MSR_IA32_HWP_REQUEST 0x774 +#define MSR_IA32_HWP_STATUS 0x777 /* * VMX MSRs @@ -749,6 +762,25 @@ /* MSR IA32_FLUSH_CMD */ #define IA32_FLUSH_CMD_L1D 0x00000001 + +/* MSR IA32_HWP_CAPABILITIES */ +#define IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(x) (((x) >> 0) & 0xff) +#define IA32_HWP_CAPABILITIES_GUARANTEED_PERFORMANCE(x) (((x) >> 8) & 0xff) +#define IA32_HWP_CAPABILITIES_EFFICIENT_PERFORMANCE(x) (((x) >> 16) & 0xff) +#define IA32_HWP_CAPABILITIES_LOWEST_PERFORMANCE(x) (((x) >> 24) & 0xff) + +/* MSR IA32_HWP_REQUEST */ +#define IA32_HWP_REQUEST_MINIMUM_VALID (1ULL << 63) +#define IA32_HWP_REQUEST_MAXIMUM_VALID (1ULL << 62) +#define IA32_HWP_REQUEST_DESIRED_VALID (1ULL << 61) +#define IA32_HWP_REQUEST_EPP_VALID (1ULL << 60) +#define IA32_HWP_REQUEST_ACTIVITY_WINDOW_VALID (1ULL << 59) +#define IA32_HWP_REQUEST_PACKAGE_CONTROL (1ULL << 42) +#define IA32_HWP_ACTIVITY_WINDOW (0x3ffULL << 32) +#define IA32_HWP_REQUEST_ENERGY_PERFORMANCE_PREFERENCE (0xffULL << 24) +#define IA32_HWP_DESIRED_PERFORMANCE (0xffULL << 16) +#define IA32_HWP_REQUEST_MAXIMUM_PERFORMANCE (0xffULL << 8) +#define IA32_HWP_MINIMUM_PERFORMANCE (0xffULL << 0) /* * PAT modes. From owner-svn-src-stable-12@freebsd.org Fri Jun 19 11:32:43 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2CE53483DF; Fri, 19 Jun 2020 11:32:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pGrC3sCxz3gkT; Fri, 19 Jun 2020 11:32: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FA8C1A901; Fri, 19 Jun 2020 11:32: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 05JBWhv2003562; Fri, 19 Jun 2020 11:32:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JBWhvR003561; Fri, 19 Jun 2020 11:32:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006191132.05JBWhvR003561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2020 11:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362374 - in stable/12/sys/x86: include x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/x86: include x86 X-SVN-Commit-Revision: 362374 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 11:32:43 -0000 Author: kib Date: Fri Jun 19 11:32:42 2020 New Revision: 362374 URL: https://svnweb.freebsd.org/changeset/base/362374 Log: MFC r362129: x86: add bits definitions for SRBDS mitigation control. Modified: stable/12/sys/x86/include/specialreg.h stable/12/sys/x86/x86/identcpu.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:24:30 2020 (r362373) +++ stable/12/sys/x86/include/specialreg.h Fri Jun 19 11:32:42 2020 (r362374) @@ -448,6 +448,7 @@ #define CPUID_STDEXT3_AVX5124VNNIW 0x00000004 #define CPUID_STDEXT3_AVX5124FMAPS 0x00000008 #define CPUID_STDEXT3_AVX512VP2INTERSECT 0x00000100 +#define CPUID_STDEXT3_MCUOPT 0x00000200 #define CPUID_STDEXT3_MD_CLEAR 0x00000400 #define CPUID_STDEXT3_TSXFA 0x00002000 #define CPUID_STDEXT3_PCONFIG 0x00040000 @@ -526,6 +527,7 @@ #define MSR_BBL_CR_BUSY 0x11b #define MSR_BBL_CR_CTL3 0x11e #define MSR_IA32_TSX_CTRL 0x122 +#define MSR_IA32_MCU_OPT_CTRL 0x123 #define MSR_SYSENTER_CS_MSR 0x174 #define MSR_SYSENTER_ESP_MSR 0x175 #define MSR_SYSENTER_EIP_MSR 0x176 @@ -762,6 +764,9 @@ /* MSR IA32_FLUSH_CMD */ #define IA32_FLUSH_CMD_L1D 0x00000001 + +/* MSR IA32_MCU_OPT_CTRL */ +#define IA32_RNGDS_MITG_DIS 0x00000001 /* MSR IA32_HWP_CAPABILITIES */ #define IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(x) (((x) >> 0) & 0xff) Modified: stable/12/sys/x86/x86/identcpu.c ============================================================================== --- stable/12/sys/x86/x86/identcpu.c Fri Jun 19 11:24:30 2020 (r362373) +++ stable/12/sys/x86/x86/identcpu.c Fri Jun 19 11:32:42 2020 (r362374) @@ -1016,6 +1016,7 @@ printcpuinfo(void) "\003AVX512_4VNNIW" "\004AVX512_4FMAPS" "\011AVX512VP2INTERSECT" + "\012MCUOPT" "\013MD_CLEAR" "\016TSXFA" "\023PCONFIG" From owner-svn-src-stable-12@freebsd.org Fri Jun 19 11:45:13 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 712FE3485E4; Fri, 19 Jun 2020 11:45:13 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pH6d2QnSz3yCk; Fri, 19 Jun 2020 11:45:13 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E82A1A8AD; Fri, 19 Jun 2020 11:45:13 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JBjDQ9009925; Fri, 19 Jun 2020 11:45:13 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JBjCjs009921; Fri, 19 Jun 2020 11:45:12 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006191145.05JBjCjs009921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Fri, 19 Jun 2020 11:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362375 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 362375 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 11:45:13 -0000 Author: freqlabs Date: Fri Jun 19 11:45:12 2020 New Revision: 362375 URL: https://svnweb.freebsd.org/changeset/base/362375 Log: MFC r362252: Apply default security flavor in vfs_export Reported by: npn Reviewed by: rmacklem Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25300 Modified: stable/12/sys/kern/vfs_export.c stable/12/sys/kern/vfs_mount.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/vfs_export.c stable/11/sys/kern/vfs_mount.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/kern/vfs_export.c ============================================================================== --- stable/12/sys/kern/vfs_export.c Fri Jun 19 11:32:42 2020 (r362374) +++ stable/12/sys/kern/vfs_export.c Fri Jun 19 11:45:12 2020 (r362375) @@ -61,6 +61,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); #if defined(INET) || defined(INET6) @@ -309,7 +312,7 @@ vfs_export(struct mount *mp, struct export_args *argp) return (EINVAL); if ((argp->ex_flags & MNT_EXPORTED) != 0 && - (argp->ex_numsecflavors <= 0 + (argp->ex_numsecflavors < 0 || argp->ex_numsecflavors >= MAXSECFLAVORS)) return (EINVAL); @@ -346,6 +349,10 @@ vfs_export(struct mount *mp, struct export_args *argp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_EXPUBLIC; MNT_IUNLOCK(mp); + } + if (argp->ex_numsecflavors == 0) { + argp->ex_numsecflavors = 1; + argp->ex_secflavors[0] = AUTH_SYS; } if ((error = vfs_hang_addrlist(mp, nep, argp))) goto out; Modified: stable/12/sys/kern/vfs_mount.c ============================================================================== --- stable/12/sys/kern/vfs_mount.c Fri Jun 19 11:32:42 2020 (r362374) +++ stable/12/sys/kern/vfs_mount.c Fri Jun 19 11:45:12 2020 (r362375) @@ -68,9 +68,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include - #include #include @@ -2050,18 +2047,13 @@ kernel_vmount(int flags, ...) * Convert the old export args format into new export args. * * The old export args struct does not have security flavors. Otherwise, the - * structs are identical. The default security flavor 'sys' is applied when - * the given args export the filesystem. + * structs are identical. The default security flavor 'sys' is applied by + * vfs_export when .ex_numsecflavors is 0. */ void vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp) { bcopy(oexp, exp, sizeof(*oexp)); - if (exp->ex_flags & MNT_EXPORTED) { - exp->ex_numsecflavors = 1; - exp->ex_secflavors[0] = AUTH_SYS; - } else { - exp->ex_numsecflavors = 0; - } + exp->ex_numsecflavors = 0; } From owner-svn-src-stable-12@freebsd.org Fri Jun 19 11:47:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E7EC3489E2; Fri, 19 Jun 2020 11:47:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pH9T6hhYz3ySg; Fri, 19 Jun 2020 11:47:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E076D1A7C3; Fri, 19 Jun 2020 11:47:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JBlfj7010120; Fri, 19 Jun 2020 11:47:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JBlere010115; Fri, 19 Jun 2020 11:47:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006191147.05JBlere010115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2020 11:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362376 - in stable/12/sys: amd64/amd64 dev/cpuctl x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 dev/cpuctl x86/include x86/x86 X-SVN-Commit-Revision: 362376 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 11:47:42 -0000 Author: kib Date: Fri Jun 19 11:47:40 2020 New Revision: 362376 URL: https://svnweb.freebsd.org/changeset/base/362376 Log: MFC r362130: Control for Special Register Buffer Data Sampling mitigation. Modified: stable/12/sys/amd64/amd64/initcpu.c stable/12/sys/amd64/amd64/machdep.c stable/12/sys/dev/cpuctl/cpuctl.c stable/12/sys/x86/include/x86_var.h stable/12/sys/x86/x86/cpu_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/12/sys/amd64/amd64/initcpu.c Fri Jun 19 11:45:12 2020 (r362375) +++ stable/12/sys/amd64/amd64/initcpu.c Fri Jun 19 11:47:40 2020 (r362376) @@ -270,6 +270,7 @@ initializecpu(void) hw_ibrs_recalculate(false); hw_ssb_recalculate(false); amd64_syscall_ret_flush_l1d_recalc(); + x86_rngds_mitg_recalculate(false); switch (cpu_vendor_id) { case CPU_VENDOR_AMD: case CPU_VENDOR_HYGON: Modified: stable/12/sys/amd64/amd64/machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/machdep.c Fri Jun 19 11:45:12 2020 (r362375) +++ stable/12/sys/amd64/amd64/machdep.c Fri Jun 19 11:47:40 2020 (r362376) @@ -1794,6 +1794,9 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); + TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", + &x86_rngds_mitg_enable); + finishidentcpu(); /* Final stage of CPU initialization */ initializecpu(); /* Initialize CPU registers */ Modified: stable/12/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/12/sys/dev/cpuctl/cpuctl.c Fri Jun 19 11:45:12 2020 (r362375) +++ stable/12/sys/dev/cpuctl/cpuctl.c Fri Jun 19 11:47:40 2020 (r362376) @@ -547,6 +547,7 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td #endif hw_mds_recalculate(); x86_taa_recalculate(); + x86_rngds_mitg_recalculate(true); printcpuinfo(); return (0); } Modified: stable/12/sys/x86/include/x86_var.h ============================================================================== --- stable/12/sys/x86/include/x86_var.h Fri Jun 19 11:45:12 2020 (r362375) +++ stable/12/sys/x86/include/x86_var.h Fri Jun 19 11:47:40 2020 (r362376) @@ -89,6 +89,7 @@ extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; extern int cpu_flush_rsb_ctxsw; +extern int x86_rngds_mitg_enable; struct pcb; struct thread; @@ -146,6 +147,7 @@ void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); +void x86_rngds_mitg_recalculate(bool all_cpus); void nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame); void nmi_call_kdb_smp(u_int type, struct trapframe *frame); void nmi_handle_intr(u_int type, struct trapframe *frame); Modified: stable/12/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/12/sys/x86/x86/cpu_machdep.c Fri Jun 19 11:45:12 2020 (r362375) +++ stable/12/sys/x86/x86/cpu_machdep.c Fri Jun 19 11:47:40 2020 (r362376) @@ -1337,6 +1337,60 @@ SYSCTL_INT(_machdep_mitigations, OID_AUTO, flush_rsb_c CTLFLAG_RW | CTLFLAG_NOFETCH, &cpu_flush_rsb_ctxsw, 0, "Flush Return Stack Buffer on context switch"); +SYSCTL_NODE(_machdep_mitigations, OID_AUTO, rngds, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "MCU Optimization, disable RDSEED mitigation"); + +int x86_rngds_mitg_enable = 1; +void +x86_rngds_mitg_recalculate(bool all_cpus) +{ + if ((cpu_stdext_feature3 & CPUID_STDEXT3_MCUOPT) == 0) + return; + x86_msr_op(MSR_IA32_MCU_OPT_CTRL, + (x86_rngds_mitg_enable ? MSR_OP_OR : MSR_OP_ANDNOT) | + (all_cpus ? MSR_OP_RENDEZVOUS : MSR_OP_LOCAL), + IA32_RNGDS_MITG_DIS); +} + +static int +sysctl_rngds_mitg_enable_handler(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = x86_rngds_mitg_enable; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + x86_rngds_mitg_enable = val; + x86_rngds_mitg_recalculate(true); + return (0); +} +SYSCTL_PROC(_machdep_mitigations_rngds, OID_AUTO, enable, CTLTYPE_INT | + CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, NULL, 0, + sysctl_rngds_mitg_enable_handler, "I", + "MCU Optimization, disabling RDSEED mitigation control " + "(0 - mitigation disabled (RDSEED optimized), 1 - mitigation enabled"); + +static int +sysctl_rngds_state_handler(SYSCTL_HANDLER_ARGS) +{ + const char *state; + + if ((cpu_stdext_feature3 & CPUID_STDEXT3_MCUOPT) == 0) { + state = "Not applicable"; + } else if (x86_rngds_mitg_enable == 0) { + state = "RDSEED not serialized"; + } else { + state = "Mitigated"; + } + return (SYSCTL_OUT(req, state, strlen(state))); +} +SYSCTL_PROC(_machdep_mitigations_rngds, OID_AUTO, state, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + sysctl_rngds_state_handler, "A", + "MCU Optimization state"); + /* * Enable and restore kernel text write permissions. * Callers must ensure that disable_wp()/restore_wp() are executed From owner-svn-src-stable-12@freebsd.org Fri Jun 19 17:49:50 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 108F93344A8; Fri, 19 Jun 2020 17:49:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRCK6llWz4YcQ; Fri, 19 Jun 2020 17:49:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E28E71EB79; Fri, 19 Jun 2020 17:49:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JHnn7x037863; Fri, 19 Jun 2020 17:49:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JHnnof037862; Fri, 19 Jun 2020 17:49:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191749.05JHnnof037862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 17:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362393 - stable/12/sys/dev/extres/regulator X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/extres/regulator X-SVN-Commit-Revision: 362393 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 17:49:50 -0000 Author: manu Date: Fri Jun 19 17:49:49 2020 New Revision: 362393 URL: https://svnweb.freebsd.org/changeset/base/362393 Log: MFC r356803: regulator_fixed: Add a get_voltage method Some consumer cannot know the voltage of the regulator without it. While here, refuse to attach is min_voltage != max_voltage, it shouldn't happens anyway. Modified: stable/12/sys/dev/extres/regulator/regulator_fixed.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/extres/regulator/regulator_fixed.c ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator_fixed.c Fri Jun 19 17:33:54 2020 (r362392) +++ stable/12/sys/dev/extres/regulator/regulator_fixed.c Fri Jun 19 17:49:49 2020 (r362393) @@ -73,6 +73,7 @@ static int regnode_fixed_enable(struct regnode *regnod int *udelay); static int regnode_fixed_status(struct regnode *regnode, int *status); static int regnode_fixed_stop(struct regnode *regnode, int *udelay); +static int regnode_fixed_get_voltage(struct regnode *regnode, int *uvolt); static regnode_method_t regnode_fixed_methods[] = { /* Regulator interface */ @@ -80,6 +81,7 @@ static regnode_method_t regnode_fixed_methods[] = { REGNODEMETHOD(regnode_enable, regnode_fixed_enable), REGNODEMETHOD(regnode_status, regnode_fixed_status), REGNODEMETHOD(regnode_stop, regnode_fixed_stop), + REGNODEMETHOD(regnode_get_voltage, regnode_fixed_get_voltage), REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; @@ -280,6 +282,16 @@ regnode_fixed_status(struct regnode *regnode, int *sta return (rv); } +static int +regnode_fixed_get_voltage(struct regnode *regnode, int *uvolt) +{ + struct regnode_fixed_sc *sc; + + sc = regnode_get_softc(regnode); + *uvolt = sc->param->min_uvolt; + return (0); +} + int regnode_fixed_register(device_t dev, struct regnode_fixed_init_def *init_def) { @@ -382,6 +394,10 @@ regfix_parse_fdt(struct regfix_softc * sc) return(rv); } + if (init_def->std_param.min_uvolt != init_def->std_param.max_uvolt) { + device_printf(sc->dev, "min_uvolt != max_uvolt\n"); + return (ENXIO); + } /* Fixed regulator uses 'startup-delay-us' property for enable_delay */ rv = OF_getencprop(node, "startup-delay-us", &init_def->std_param.enable_delay, From owner-svn-src-stable-12@freebsd.org Fri Jun 19 17:52:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69E8D334572; Fri, 19 Jun 2020 17:52:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRGn2Bfrz4YsQ; Fri, 19 Jun 2020 17:52:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 467121EF3B; Fri, 19 Jun 2020 17:52:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JHqnBp043443; Fri, 19 Jun 2020 17:52:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JHqmiD043440; Fri, 19 Jun 2020 17:52:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191752.05JHqmiD043440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 17:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362394 - stable/12/sys/dev/mmc/host X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/mmc/host X-SVN-Commit-Revision: 362394 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 17:52:49 -0000 Author: manu Date: Fri Jun 19 17:52:48 2020 New Revision: 362394 URL: https://svnweb.freebsd.org/changeset/base/362394 Log: MFC r358450, r358635 r358450: mmc: dwmmc: Fix off by one error The IVAR_MAX_DATA is supposed to have the number of descriptor X the mmc block size and desc_count contain all this information + 1. Reported by: phk r358635: dwmmc: Rework the DMA engine Each segment can be up to 4096 bytes in chain structure according to the RK3399 TRM Part 2. Set the buffers in full ring where the last one point to the first one. Correctly reports the MMC_IVAR_MAX_DATA. Use CACHE_LINE_SIZE for bus_dma alignment. Modified: stable/12/sys/dev/mmc/host/dwmmc.c stable/12/sys/dev/mmc/host/dwmmc_hisi.c stable/12/sys/dev/mmc/host/dwmmc_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mmc/host/dwmmc.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc.c Fri Jun 19 17:49:49 2020 (r362393) +++ stable/12/sys/dev/mmc/host/dwmmc.c Fri Jun 19 17:52:48 2020 (r362394) @@ -99,16 +99,15 @@ __FBSDID("$FreeBSD$"); #define DWMMC_ERR_FLAGS (DWMMC_DATA_ERR_FLAGS | DWMMC_CMD_ERR_FLAGS \ |SDMMC_INTMASK_HLE) -#define DES0_DIC (1 << 1) -#define DES0_LD (1 << 2) -#define DES0_FS (1 << 3) -#define DES0_CH (1 << 4) -#define DES0_ER (1 << 5) -#define DES0_CES (1 << 30) -#define DES0_OWN (1 << 31) +#define DES0_DIC (1 << 1) /* Disable Interrupt on Completion */ +#define DES0_LD (1 << 2) /* Last Descriptor */ +#define DES0_FS (1 << 3) /* First Descriptor */ +#define DES0_CH (1 << 4) /* second address CHained */ +#define DES0_ER (1 << 5) /* End of Ring */ +#define DES0_CES (1 << 30) /* Card Error Summary */ +#define DES0_OWN (1 << 31) /* OWN */ -#define DES1_BS1_MASK 0xfff -#define DES1_BS1_SHIFT 0 +#define DES1_BS1_MASK 0x1fff struct idmac_desc { uint32_t des0; /* control */ @@ -117,9 +116,10 @@ struct idmac_desc { uint32_t des3; /* buf2 phys addr or next descr */ }; -#define DESC_MAX 256 -#define DESC_SIZE (sizeof(struct idmac_desc) * DESC_MAX) +#define IDMAC_DESC_SEGS (PAGE_SIZE / (sizeof(struct idmac_desc))) +#define IDMAC_DESC_SIZE (sizeof(struct idmac_desc) * IDMAC_DESC_SEGS) #define DEF_MSIZE 0x2 /* Burst size of multiple transaction */ +#define IDMAC_MAX_SIZE 4096 static void dwmmc_next_operation(struct dwmmc_softc *); static int dwmmc_setup_bus(struct dwmmc_softc *, int); @@ -162,7 +162,7 @@ dwmmc_ring_setup(void *arg, bus_dma_segment_t *segs, i for (idx = 0; idx < nsegs; idx++) { sc->desc_ring[idx].des0 = (DES0_OWN | DES0_DIC | DES0_CH); - sc->desc_ring[idx].des1 = segs[idx].ds_len; + sc->desc_ring[idx].des1 = segs[idx].ds_len & DES1_BS1_MASK; sc->desc_ring[idx].des2 = segs[idx].ds_addr; if (idx == 0) @@ -213,8 +213,8 @@ dma_setup(struct dwmmc_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - DESC_SIZE, 1, /* maxsize, nsegments */ - DESC_SIZE, /* maxsegsize */ + IDMAC_DESC_SIZE, 1, /* maxsize, nsegments */ + IDMAC_DESC_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->desc_tag); @@ -234,7 +234,7 @@ dma_setup(struct dwmmc_softc *sc) } error = bus_dmamap_load(sc->desc_tag, sc->desc_map, - sc->desc_ring, DESC_SIZE, dwmmc_get1paddr, + sc->desc_ring, IDMAC_DESC_SIZE, dwmmc_get1paddr, &sc->desc_ring_paddr, 0); if (error != 0) { device_printf(sc->dev, @@ -242,23 +242,25 @@ dma_setup(struct dwmmc_softc *sc) return (1); } - for (idx = 0; idx < sc->desc_count; idx++) { + for (idx = 0; idx < IDMAC_DESC_SEGS; idx++) { sc->desc_ring[idx].des0 = DES0_CH; sc->desc_ring[idx].des1 = 0; - nidx = (idx + 1) % sc->desc_count; + nidx = (idx + 1) % IDMAC_DESC_SEGS; sc->desc_ring[idx].des3 = sc->desc_ring_paddr + \ (nidx * sizeof(struct idmac_desc)); } + sc->desc_ring[idx - 1].des3 = sc->desc_ring_paddr; + sc->desc_ring[idx - 1].des0 |= DES0_ER; error = bus_dma_tag_create( bus_get_dma_tag(sc->dev), /* Parent tag. */ - 4096, 0, /* alignment, boundary */ + CACHE_LINE_SIZE, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - sc->desc_count * MMC_SECTOR_SIZE, /* maxsize */ - sc->desc_count, /* nsegments */ - MMC_SECTOR_SIZE, /* maxsegsize */ + IDMAC_MAX_SIZE * IDMAC_DESC_SEGS, /* maxsize */ + IDMAC_DESC_SEGS, /* nsegments */ + IDMAC_MAX_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->buf_tag); @@ -664,9 +666,6 @@ dwmmc_attach(device_t dev) device_printf(dev, "Hardware version ID is %04x\n", READ4(sc, SDMMC_VERID) & 0xffff); - if (sc->desc_count == 0) - sc->desc_count = DESC_MAX; - /* XXX: we support operation for slot index 0 only */ slot = 0; if (sc->pwren_inverted) { @@ -1278,7 +1277,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = sc->desc_count; + *(int *)result = (IDMAC_MAX_SIZE * IDMAC_DESC_SEGS) / MMC_SECTOR_SIZE; break; case MMCBR_IVAR_TIMING: *(int *)result = sc->host.ios.timing; Modified: stable/12/sys/dev/mmc/host/dwmmc_hisi.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_hisi.c Fri Jun 19 17:49:49 2020 (r362393) +++ stable/12/sys/dev/mmc/host/dwmmc_hisi.c Fri Jun 19 17:52:48 2020 (r362394) @@ -79,7 +79,6 @@ hisi_dwmmc_attach(device_t dev) * DMA when the controller is not cache-coherent on arm64. */ sc->use_pio = 1; - sc->desc_count = 1; return (dwmmc_attach(dev)); } Modified: stable/12/sys/dev/mmc/host/dwmmc_var.h ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_var.h Fri Jun 19 17:49:49 2020 (r362393) +++ stable/12/sys/dev/mmc/host/dwmmc_var.h Fri Jun 19 17:52:48 2020 (r362394) @@ -60,7 +60,6 @@ struct dwmmc_softc { uint32_t use_auto_stop; uint32_t use_pio; uint32_t pwren_inverted; - u_int desc_count; device_t child; struct task card_task; /* Card presence check task */ struct timeout_task card_delayed_task;/* Card insert delayed task */ From owner-svn-src-stable-12@freebsd.org Fri Jun 19 17:56:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F99233496A; Fri, 19 Jun 2020 17:56:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRLZ0crkz4ZJB; Fri, 19 Jun 2020 17:56:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DF351EFCD; Fri, 19 Jun 2020 17:56:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JHu5mj043769; Fri, 19 Jun 2020 17:56:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JHu5gK043768; Fri, 19 Jun 2020 17:56:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191756.05JHu5gK043768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 17:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362395 - stable/12/usr.sbin/gpioctl X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/usr.sbin/gpioctl X-SVN-Commit-Revision: 362395 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 17:56:06 -0000 Author: manu Date: Fri Jun 19 17:56:05 2020 New Revision: 362395 URL: https://svnweb.freebsd.org/changeset/base/362395 Log: MFC r359805: gpioctl: Print interrupts capabilities GPIO drivers who supports interrupts report them in the caps (obtain via the getcaps method) but gpioctl doesn't know how to interpret this and print "UNKNOWN" for each one of them. Even if we don't have userland gpio interrupts support for now let gpioctl print the supported caps. Modified: stable/12/usr.sbin/gpioctl/gpioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/gpioctl/gpioctl.c ============================================================================== --- stable/12/usr.sbin/gpioctl/gpioctl.c Fri Jun 19 17:52:48 2020 (r362394) +++ stable/12/usr.sbin/gpioctl/gpioctl.c Fri Jun 19 17:56:05 2020 (r362395) @@ -62,6 +62,11 @@ static struct flag_desc gpio_flags[] = { { "II", GPIO_PIN_INVIN }, { "IO", GPIO_PIN_INVOUT }, { "PULSE", GPIO_PIN_PULSATE }, + { "INTRLL", GPIO_INTR_LEVEL_LOW}, + { "INTRLH", GPIO_INTR_LEVEL_HIGH}, + { "INTRER", GPIO_INTR_EDGE_RISING}, + { "INTREF", GPIO_INTR_EDGE_FALLING}, + { "INTREB", GPIO_INTR_EDGE_BOTH}, { NULL, 0 }, }; From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:02:30 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B73C334D73; Fri, 19 Jun 2020 18:02:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRTy2dw8z4bJy; Fri, 19 Jun 2020 18:02:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BE301F1F8; Fri, 19 Jun 2020 18:02:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JI2UYY050115; Fri, 19 Jun 2020 18:02:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JI2Ug6050114; Fri, 19 Jun 2020 18:02:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191802.05JI2Ug6050114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362398 - stable/12/sys/arm/ti/am335x X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm/ti/am335x X-SVN-Commit-Revision: 362398 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:02:30 -0000 Author: manu Date: Fri Jun 19 18:02:29 2020 New Revision: 362398 URL: https://svnweb.freebsd.org/changeset/base/362398 Log: MFC r359806: arm: am335x: Honor pmic option ti,pmic-shutdown-controller Honor ti,pmic-shutdown-controller option in DTS Tested on stable r359316 @ Sleep mode on custom hw, Power off on BBB and PB OFF bit [1] in status register control the pmic behaviour when PWR_EN pin is pulled low. On most AM335x hardware [beaglebone *] the desired behaviour are in fact power off due to some hardware designs - read more in the comments around pmic in sys/gnu/dts/arm/am335x-bone-common.dtsi This patch let the device-tree decide with ti,pmic-shutdown-controller[2] the state of off bit in status register. [1] 8.6.12 table 12 http://www.ti.com/lit/ds/symlink/tps65217.pdf [2] Documentation/devicetree/bindings/regulator/tps65217.txt PR: 245159 Submitted by: Oskar Holmlund Modified: stable/12/sys/arm/ti/am335x/am335x_pmic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- stable/12/sys/arm/ti/am335x/am335x_pmic.c Fri Jun 19 18:00:20 2020 (r362397) +++ stable/12/sys/arm/ti/am335x/am335x_pmic.c Fri Jun 19 18:02:29 2020 (r362398) @@ -208,6 +208,7 @@ am335x_pmic_start(struct am335x_pmic_softc *sc) char name[20]; char pwr[4][11] = {"Battery", "USB", "AC", "USB and AC"}; int rv; + phandle_t node; dev = sc->sc_dev; am335x_pmic_read(dev, TPS65217_CHIPID_REG, (uint8_t *)&chipid_reg, 1); @@ -232,6 +233,16 @@ am335x_pmic_start(struct am335x_pmic_softc *sc) device_printf(dev, "%s powered by %s\n", name, pwr[status_reg.usbpwr | (status_reg.acpwr << 1)]); + /* Check devicetree for ti,pmic-shutdown-controller + * if present; PMIC will go to shutdown state on PWR_EN toggle + * if not present; PMIC will enter sleep state on PWR_EN toggle (default on reset) + */ + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "ti,pmic-shutdown-controller")) { + status_reg.off = 1; + am335x_pmic_write(dev, TPS65217_STATUS_REG, (uint8_t *)&status_reg, 1); + } + if (am335x_pmic_vo[0] != '\0') { for (vo = 0; vo < 4; vo++) { if (strcmp(tps65217_voreg_c[vo], am335x_pmic_vo) == 0) @@ -291,16 +302,9 @@ am335x_pmic_attach(device_t dev) static void am335x_pmic_shutdown(void *xdev, int howto) { - device_t dev; - struct tps65217_status_reg reg; - if (!(howto & RB_POWEROFF)) return; - dev = (device_t)xdev; - am335x_pmic_read(dev, TPS65217_STATUS_REG, (uint8_t *)®, 1); - /* Set the OFF bit on status register to start the shutdown sequence. */ - reg.off = 1; - am335x_pmic_write(dev, TPS65217_STATUS_REG, (uint8_t *)®, 1); + /* Toggle pmic_pwr_enable to shutdown the PMIC. */ am335x_rtc_pmic_pwr_toggle(); } From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:05:16 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F0F4334DB9; Fri, 19 Jun 2020 18:05:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRY81Kqbz4bWZ; Fri, 19 Jun 2020 18:05:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28CE21F05E; Fri, 19 Jun 2020 18:05:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JI5GPI050384; Fri, 19 Jun 2020 18:05:16 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JI5EdM050373; Fri, 19 Jun 2020 18:05:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191805.05JI5EdM050373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362400 - in stable/12/sys: arm/allwinner conf dev/mmc dev/mmc/host X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner conf dev/mmc dev/mmc/host X-SVN-Commit-Revision: 362400 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:05:16 -0000 Author: manu Date: Fri Jun 19 18:05:14 2020 New Revision: 362400 URL: https://svnweb.freebsd.org/changeset/base/362400 Log: MFC r359924-r359925, r359927, r359932, r359965 r359924: Those functions are here to help fdt mmc controller drivers to parse the dts to find the supported speeds and the regulators. Not all DTS have every settings properly defined so host controller will still have to add some caps themselves. It also add a mmc_fdt_gpio_setup function which will read the cd-gpios property and register it as the CD pin. If the pin support interrupts one will be registered and the cd_helper function will be called. If the pin doesn't support interrupts the internal taskqueue will poll for change and call the same cd_helper function. mmc_fdt_gpio_setup will also parse the wp-gpio property and MMC drivers can know the write-protect pin value by calling the mmc_fdt_gpio_get_readonly function. Differential Revision: https://reviews.freebsd.org/D23267 r359925: arm: allwinner: aw_mmc: Use the mmc_fdt_helper The fdt properties are now parsed via the help of mmc_fdt_helper functions. This also adds card detection. Note that on some boards (like the Pine64) card detection is broken due to a missing resistor on the cd pin. Differential Revision: https://reviews.freebsd.org/D23268 r359927: arm: dwmmc: Use mmc_fdt_helpers Use the mmc_fdt_parse function instead of parsing everything in the driver. r359932: files: Add mmc_fdt_helpers for mmccam enabled config X-MFC-With: r359924 r359965: mmc_fdt_helpers: Do not schedule a card detection is there is no cd gpio If the fdt node doesn't have a cd-gpios properties or if the node is set as non-removable we do not init the card detection timeout task as it is useless so don't schedule it too. X-MFC-With: r359924 Added: stable/12/sys/dev/mmc/mmc_fdt_helpers.c - copied, changed from r359925, head/sys/dev/mmc/mmc_fdt_helpers.c stable/12/sys/dev/mmc/mmc_fdt_helpers.h - copied unchanged from r359925, head/sys/dev/mmc/mmc_fdt_helpers.h Modified: stable/12/sys/arm/allwinner/aw_mmc.c stable/12/sys/conf/files stable/12/sys/dev/mmc/host/dwmmc.c stable/12/sys/dev/mmc/host/dwmmc_altera.c stable/12/sys/dev/mmc/host/dwmmc_hisi.c stable/12/sys/dev/mmc/host/dwmmc_rockchip.c stable/12/sys/dev/mmc/host/dwmmc_samsung.c stable/12/sys/dev/mmc/host/dwmmc_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_mmc.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_mmc.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/arm/allwinner/aw_mmc.c Fri Jun 19 18:05:14 2020 (r362400) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -122,6 +125,7 @@ struct aw_mmc_softc { int aw_timeout; struct callout aw_timeoutc; struct mmc_host aw_host; + struct mmc_fdt_helper mmc_helper; #ifdef MMCCAM union ccb * ccb; struct cam_devq * devq; @@ -136,9 +140,8 @@ struct aw_mmc_softc { uint32_t aw_intr; uint32_t aw_intr_wait; void * aw_intrhand; - regulator_t aw_reg_vmmc; - regulator_t aw_reg_vqmmc; unsigned int aw_clock; + device_t child; /* Fields required for DMA access. */ bus_addr_t aw_dma_desc_phys; @@ -164,6 +167,7 @@ static int aw_mmc_reset(struct aw_mmc_softc *); static int aw_mmc_init(struct aw_mmc_softc *); static void aw_mmc_intr(void *); static int aw_mmc_update_clock(struct aw_mmc_softc *, uint32_t); +static void aw_mmc_helper_cd_handler(device_t, bool); static void aw_mmc_print_error(uint32_t); static int aw_mmc_update_ios(device_t, device_t); @@ -380,6 +384,40 @@ aw_mmc_cam_request(struct aw_mmc_softc *sc, union ccb } #endif /* MMCCAM */ +static void +aw_mmc_helper_cd_handler(device_t dev, bool present) +{ + struct aw_mmc_softc *sc; + + sc = device_get_softc(dev); + AW_MMC_LOCK(sc); + if (present) { + if (sc->child == NULL) { + if (bootverbose) + device_printf(sc->aw_dev, "Card inserted\n"); + + sc->child = device_add_child(sc->aw_dev, "mmc", -1); + AW_MMC_UNLOCK(sc); + if (sc->child) { + device_set_ivars(sc->child, sc); + (void)device_probe_and_attach(sc->child); + } + } else + AW_MMC_UNLOCK(sc); + } else { + /* Card isn't present, detach if necessary */ + if (sc->child != NULL) { + if (bootverbose) + device_printf(sc->aw_dev, "Card removed\n"); + + AW_MMC_UNLOCK(sc); + device_delete_child(sc->aw_dev, sc->child); + sc->child = NULL; + } else + AW_MMC_UNLOCK(sc); + } +} + static int aw_mmc_probe(device_t dev) { @@ -397,15 +435,11 @@ aw_mmc_probe(device_t dev) static int aw_mmc_attach(device_t dev) { - device_t child; struct aw_mmc_softc *sc; struct sysctl_ctx_list *ctx; struct sysctl_oid_list *tree; - uint32_t bus_width, max_freq; - phandle_t node; int error; - node = ofw_bus_get_node(dev); sc = device_get_softc(dev); sc->aw_dev = dev; @@ -419,7 +453,7 @@ aw_mmc_attach(device_t dev) return (ENXIO); } if (bus_setup_intr(dev, sc->aw_res[AW_MMC_IRQRES], - INTR_TYPE_MISC | INTR_MPSAFE, NULL, aw_mmc_intr, sc, + INTR_TYPE_NET | INTR_MPSAFE, NULL, aw_mmc_intr, sc, &sc->aw_intrhand)) { bus_release_resources(dev, aw_mmc_res_spec, sc->aw_res); device_printf(dev, "cannot setup interrupt handler\n"); @@ -483,47 +517,15 @@ aw_mmc_attach(device_t dev) goto fail; } - if (OF_getencprop(node, "bus-width", &bus_width, sizeof(uint32_t)) <= 0) - bus_width = 4; - - if (regulator_get_by_ofw_property(dev, 0, "vmmc-supply", - &sc->aw_reg_vmmc) == 0) { - if (bootverbose) - device_printf(dev, "vmmc-supply regulator found\n"); - } - if (regulator_get_by_ofw_property(dev, 0, "vqmmc-supply", - &sc->aw_reg_vqmmc) == 0 && bootverbose) { - if (bootverbose) - device_printf(dev, "vqmmc-supply regulator found\n"); - } - + /* Set some defaults for freq and supported mode */ sc->aw_host.f_min = 400000; - - if (OF_getencprop(node, "max-frequency", &max_freq, - sizeof(uint32_t)) <= 0) - max_freq = 52000000; - sc->aw_host.f_max = max_freq; - + sc->aw_host.f_max = 52000000; sc->aw_host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; - sc->aw_host.caps = MMC_CAP_HSPEED | MMC_CAP_UHS_SDR12 | - MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | - MMC_CAP_UHS_DDR50 | MMC_CAP_MMC_DDR52; + sc->aw_host.caps |= MMC_CAP_HSPEED | MMC_CAP_SIGNALING_330; + mmc_fdt_parse(dev, 0, &sc->mmc_helper, &sc->aw_host); + mmc_fdt_gpio_setup(dev, 0, &sc->mmc_helper, aw_mmc_helper_cd_handler); - if (sc->aw_reg_vqmmc != NULL) { - if (regulator_check_voltage(sc->aw_reg_vqmmc, 1800000) == 0) - sc->aw_host.caps |= MMC_CAP_SIGNALING_180; - if (regulator_check_voltage(sc->aw_reg_vqmmc, 3300000) == 0) - sc->aw_host.caps |= MMC_CAP_SIGNALING_330; - } else - sc->aw_host.caps |= MMC_CAP_SIGNALING_330; - - if (bus_width >= 4) - sc->aw_host.caps |= MMC_CAP_4_BIT_DATA; - if (bus_width >= 8) - sc->aw_host.caps |= MMC_CAP_8_BIT_DATA; - #ifdef MMCCAM - child = NULL; /* Not used by MMCCAM, need to silence compiler warnings */ sc->ccb = NULL; if ((sc->devq = cam_simq_alloc(1)) == NULL) { goto fail; @@ -550,18 +552,8 @@ aw_mmc_attach(device_t dev) } mtx_unlock(&sc->sim_mtx); -#else /* !MMCCAM */ - child = device_add_child(dev, "mmc", -1); - if (child == NULL) { - device_printf(dev, "attaching MMC bus failed!\n"); - goto fail; - } - if (device_probe_and_attach(child) != 0) { - device_printf(dev, "attaching MMC child failed!\n"); - device_delete_child(dev, child); - goto fail; - } #endif /* MMCCAM */ + return (0); fail: @@ -1314,7 +1306,7 @@ aw_mmc_switch_vccq(device_t bus, device_t child) sc = device_get_softc(bus); - if (sc->aw_reg_vqmmc == NULL) + if (sc->mmc_helper.vqmmc_supply == NULL) return EOPNOTSUPP; switch (sc->aw_host.ios.vccq) { @@ -1328,7 +1320,7 @@ aw_mmc_switch_vccq(device_t bus, device_t child) return EINVAL; } - err = regulator_set_voltage(sc->aw_reg_vqmmc, uvolt, uvolt); + err = regulator_set_voltage(sc->mmc_helper.vqmmc_supply, uvolt, uvolt); if (err != 0) { device_printf(sc->aw_dev, "Cannot set vqmmc to %d<->%d\n", @@ -1373,10 +1365,10 @@ aw_mmc_update_ios(device_t bus, device_t child) if (bootverbose) device_printf(sc->aw_dev, "Powering down sd/mmc\n"); - if (sc->aw_reg_vmmc) - regulator_disable(sc->aw_reg_vmmc); - if (sc->aw_reg_vqmmc) - regulator_disable(sc->aw_reg_vqmmc); + if (sc->mmc_helper.vmmc_supply) + regulator_disable(sc->mmc_helper.vmmc_supply); + if (sc->mmc_helper.vqmmc_supply) + regulator_disable(sc->mmc_helper.vqmmc_supply); aw_mmc_reset(sc); break; @@ -1384,10 +1376,10 @@ aw_mmc_update_ios(device_t bus, device_t child) if (bootverbose) device_printf(sc->aw_dev, "Powering up sd/mmc\n"); - if (sc->aw_reg_vmmc) - regulator_enable(sc->aw_reg_vmmc); - if (sc->aw_reg_vqmmc) - regulator_enable(sc->aw_reg_vqmmc); + if (sc->mmc_helper.vmmc_supply) + regulator_enable(sc->mmc_helper.vmmc_supply); + if (sc->mmc_helper.vqmmc_supply) + regulator_enable(sc->mmc_helper.vqmmc_supply); aw_mmc_init(sc); break; }; @@ -1463,8 +1455,11 @@ aw_mmc_update_ios(device_t bus, device_t child) static int aw_mmc_get_ro(device_t bus, device_t child) { + struct aw_mmc_softc *sc; - return (0); + sc = device_get_softc(bus); + + return (mmc_fdt_gpio_get_readonly(&sc->mmc_helper)); } static int Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/conf/files Fri Jun 19 18:05:14 2020 (r362400) @@ -2473,6 +2473,7 @@ dev/mmc/mmc.c optional mmc !mmccam dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd !mmccam +dev/mmc/mmc_fdt_helpers.c optional mmc fdt | mmccam fdt dev/mmcnull/mmcnull.c optional mmcnull dev/mn/if_mn.c optional mn pci dev/mpr/mpr.c optional mpr Modified: stable/12/sys/dev/mmc/host/dwmmc.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc.c Fri Jun 19 18:05:14 2020 (r362400) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -446,7 +447,6 @@ dwmmc_card_task(void *arg, int pending __unused) } } else DWMMC_UNLOCK(sc); - } else { /* Card isn't present, detach if necessary */ if (sc->child != NULL) { @@ -466,7 +466,7 @@ parse_fdt(struct dwmmc_softc *sc) { pcell_t dts_value[3]; phandle_t node; - uint32_t bus_hz = 0, bus_width; + uint32_t bus_hz = 0; int len; #ifdef EXT_RESOURCES int error; @@ -475,18 +475,13 @@ parse_fdt(struct dwmmc_softc *sc) if ((node = ofw_bus_get_node(sc->dev)) == -1) return (ENXIO); - /* bus-width */ - if (OF_getencprop(node, "bus-width", &bus_width, sizeof(uint32_t)) <= 0) - bus_width = 4; - if (bus_width >= 4) - sc->host.caps |= MMC_CAP_4_BIT_DATA; - if (bus_width >= 8) - sc->host.caps |= MMC_CAP_8_BIT_DATA; + /* Set some defaults for freq and supported mode */ + sc->host.f_min = 400000; + sc->host.f_max = 200000000; + sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; + sc->host.caps = MMC_CAP_HSPEED | MMC_CAP_SIGNALING_330; + mmc_fdt_parse(sc->dev, node, &sc->mmc_helper, &sc->host); - /* max-frequency */ - if (OF_getencprop(node, "max-frequency", &sc->host.f_max, sizeof(uint32_t)) <= 0) - sc->host.f_max = 200000000; - /* fifo-depth */ if ((len = OF_getproplen(node, "fifo-depth")) > 0) { OF_getencprop(node, "fifo-depth", dts_value, len); @@ -721,11 +716,6 @@ dwmmc_attach(device_t dev) DWMMC_ERR_FLAGS | SDMMC_INTMASK_CD)); WRITE4(sc, SDMMC_CTRL, SDMMC_CTRL_INT_ENABLE); - - sc->host.f_min = 400000; - sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; - sc->host.caps |= MMC_CAP_HSPEED; - sc->host.caps |= MMC_CAP_SIGNALING_330; TASK_INIT(&sc->card_task, 0, dwmmc_card_task, sc); TIMEOUT_TASK_INIT(taskqueue_swi_giant, &sc->card_delayed_task, 0, Modified: stable/12/sys/dev/mmc/host/dwmmc_altera.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_altera.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc_altera.c Fri Jun 19 18:05:14 2020 (r362400) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_hisi.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_hisi.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc_hisi.c Fri Jun 19 18:05:14 2020 (r362400) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_rockchip.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_rockchip.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc_rockchip.c Fri Jun 19 18:05:14 2020 (r362400) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_samsung.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_samsung.c Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc_samsung.c Fri Jun 19 18:05:14 2020 (r362400) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: stable/12/sys/dev/mmc/host/dwmmc_var.h ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc_var.h Fri Jun 19 18:04:41 2020 (r362399) +++ stable/12/sys/dev/mmc/host/dwmmc_var.h Fri Jun 19 18:05:14 2020 (r362400) @@ -52,6 +52,7 @@ struct dwmmc_softc { device_t dev; void *intr_cookie; struct mmc_host host; + struct mmc_fdt_helper mmc_helper; struct mtx sc_mtx; struct mmc_request *req; struct mmc_command *curcmd; Copied and modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c (from r359925, head/sys/dev/mmc/mmc_fdt_helpers.c) ============================================================================== --- head/sys/dev/mmc/mmc_fdt_helpers.c Tue Apr 14 16:34:13 2020 (r359925, copy source) +++ stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:05:14 2020 (r362400) @@ -217,7 +217,7 @@ cd_card_task(void *arg, int pending __unused) /* * Card detect setup. */ -static void +static bool cd_setup(struct mmc_fdt_helper *helper, phandle_t node) { int pincaps; @@ -233,7 +233,7 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node helper->cd_disabled = true; if (bootverbose) device_printf(dev, "Non-removable media\n"); - return; + return (false); } /* @@ -246,14 +246,14 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node */ if (gpio_pin_get_by_ofw_property(dev, node, "cd-gpios", &helper->cd_pin)) - return; + return (false); if (gpio_pin_getcaps(helper->cd_pin, &pincaps) != 0 || !(pincaps & GPIO_PIN_INPUT)) { device_printf(dev, "Cannot read card-detect gpio pin; " "setting card-always-present flag.\n"); helper->cd_disabled = true; - return; + return (false); } /* @@ -313,6 +313,8 @@ without_interrupts: device_get_nameunit(helper->cd_pin->dev), helper->cd_pin->pin, cd_mode_str); } + + return (true); } /* @@ -354,14 +356,16 @@ mmc_fdt_gpio_setup(device_t dev, phandle_t node, struc helper->dev = dev; helper->cd_handler = handler; - cd_setup(helper, node); wp_setup(helper, node); - /* - * Schedule a card detection - */ - taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, - &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); + if (cd_setup(helper, node)) { + /* + * Schedule a card detection + */ + taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, + &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); + } + return (0); } Copied: stable/12/sys/dev/mmc/mmc_fdt_helpers.h (from r359925, head/sys/dev/mmc/mmc_fdt_helpers.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/mmc/mmc_fdt_helpers.h Fri Jun 19 18:05:14 2020 (r362400, copy of r359925, head/sys/dev/mmc/mmc_fdt_helpers.h) @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Emmanuel Vadot + * Copyright (c) 2017 Ian Lepore All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MMC_FDT_HELPERS_H_ +#define _MMC_FDT_HELPERS_H_ + +#include +#include + +#ifdef EXT_RESOURCES +#include +#endif + +struct mmc_fdt_helper { + device_t dev; + gpio_pin_t wp_pin; + gpio_pin_t cd_pin; + void * cd_ihandler; + struct resource * cd_ires; + int cd_irid; + void (*cd_handler)(device_t, bool); + struct timeout_task cd_delayed_task; + bool cd_disabled; + bool wp_disabled; + bool cd_present; + uint32_t props; +#define MMC_PROP_BROKEN_CD (1 << 0) +#define MMC_PROP_NON_REMOVABLE (1 << 1) +#define MMC_PROP_WP_INVERTED (1 << 2) +#define MMC_PROP_CD_INVERTED (1 << 3) +#define MMC_PROP_DISABLE_WP (1 << 4) +#define MMC_PROP_NO_SDIO (1 << 5) +#define MMC_PROP_NO_SD (1 << 6) +#define MMC_PROP_NO_MMC (1 << 7) + +#ifdef EXT_RESOURCES + regulator_t vmmc_supply; + regulator_t vqmmc_supply; +#endif +}; + +typedef void (*mmc_fdt_cd_handler)(device_t dev, bool present); + +int mmc_fdt_parse(device_t dev, phandle_t node, struct mmc_fdt_helper *helper, struct mmc_host *host); +int mmc_fdt_gpio_setup(device_t dev, phandle_t node, struct mmc_fdt_helper *helper, mmc_fdt_cd_handler handler); +void mmc_fdt_gpio_teardown(struct mmc_fdt_helper *helper); +bool mmc_fdt_gpio_get_present(struct mmc_fdt_helper *helper); +bool mmc_fdt_gpio_get_readonly(struct mmc_fdt_helper *helper); + +#endif From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:10:40 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 261DA33539C; Fri, 19 Jun 2020 18:10:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRgN0F83z4bVd; Fri, 19 Jun 2020 18:10:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 034A01F1FF; Fri, 19 Jun 2020 18:10:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIAdWD051669; Fri, 19 Jun 2020 18:10:39 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIAdrL051665; Fri, 19 Jun 2020 18:10:39 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191810.05JIAdrL051665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362401 - in stable/12/sys: arm/allwinner dev/mmc modules/allwinner modules/allwinner/aw_mmc X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner dev/mmc modules/allwinner modules/allwinner/aw_mmc X-SVN-Commit-Revision: 362401 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:10:40 -0000 Author: manu Date: Fri Jun 19 18:10:39 2020 New Revision: 362401 URL: https://svnweb.freebsd.org/changeset/base/362401 Log: MFC r360008-r360009, r360011 r360008: mmc_fdt_helpers: Always init the timout We use the taskqueue to schedule card detection so always init it. This is a proper solution instead of r359965. MFH: r359924 r360009: mmc_fdt_helpers: Drain the cd pin taskqueue in mmc_fdt_gpio_teardown We have no use for it now. r360011: arm: allwinner: aw_mmc: Make it possible to unload the module While here, add a makefile in sys/modules/allwinner so it is built. Also add the PNP info so devmatch will load this module automatically. Added: stable/12/sys/modules/allwinner/aw_mmc/ - copied from r360011, head/sys/modules/allwinner/aw_mmc/ Modified: stable/12/sys/arm/allwinner/aw_mmc.c stable/12/sys/dev/mmc/mmc_fdt_helpers.c stable/12/sys/modules/allwinner/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_mmc.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_mmc.c Fri Jun 19 18:05:14 2020 (r362400) +++ stable/12/sys/arm/allwinner/aw_mmc.c Fri Jun 19 18:10:39 2020 (r362401) @@ -163,6 +163,7 @@ static int aw_mmc_probe(device_t); static int aw_mmc_attach(device_t); static int aw_mmc_detach(device_t); static int aw_mmc_setup_dma(struct aw_mmc_softc *); +static void aw_mmc_teardown_dma(struct aw_mmc_softc *sc); static int aw_mmc_reset(struct aw_mmc_softc *); static int aw_mmc_init(struct aw_mmc_softc *); static void aw_mmc_intr(void *); @@ -579,8 +580,46 @@ fail: static int aw_mmc_detach(device_t dev) { + struct aw_mmc_softc *sc; + device_t d; - return (EBUSY); + sc = device_get_softc(dev); + + clk_disable(sc->aw_clk_mmc); + clk_disable(sc->aw_clk_ahb); + hwreset_assert(sc->aw_rst_ahb); + + mmc_fdt_gpio_teardown(&sc->mmc_helper); + + callout_drain(&sc->aw_timeoutc); + + AW_MMC_LOCK(sc); + d = sc->child; + sc->child = NULL; + AW_MMC_UNLOCK(sc); + if (d != NULL) + device_delete_child(sc->aw_dev, d); + + aw_mmc_teardown_dma(sc); + + mtx_destroy(&sc->aw_mtx); + + bus_teardown_intr(dev, sc->aw_res[AW_MMC_IRQRES], sc->aw_intrhand); + bus_release_resources(dev, aw_mmc_res_spec, sc->aw_res); + +#ifdef MMCCAM + if (sc->sim != NULL) { + mtx_lock(&sc->sim_mtx); + xpt_bus_deregister(cam_sim_path(sc->sim)); + cam_sim_free(sc->sim, FALSE); + mtx_unlock(&sc->sim_mtx); + } + + if (sc->devq != NULL) + cam_simq_free(sc->devq); +#endif + + return (0); } static void @@ -655,6 +694,21 @@ aw_mmc_setup_dma(struct aw_mmc_softc *sc) } static void +aw_mmc_teardown_dma(struct aw_mmc_softc *sc) +{ + + bus_dmamap_unload(sc->aw_dma_tag, sc->aw_dma_map); + bus_dmamem_free(sc->aw_dma_tag, sc->aw_dma_desc, sc->aw_dma_map); + if (bus_dma_tag_destroy(sc->aw_dma_tag) != 0) + device_printf(sc->aw_dev, "Cannot destroy the dma tag\n"); + + bus_dmamap_unload(sc->aw_dma_buf_tag, sc->aw_dma_buf_map); + bus_dmamap_destroy(sc->aw_dma_buf_tag, sc->aw_dma_buf_map); + if (bus_dma_tag_destroy(sc->aw_dma_buf_tag) != 0) + device_printf(sc->aw_dev, "Cannot destroy the dma buf tag\n"); +} + +static void aw_dma_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int err) { int i; @@ -1531,3 +1585,4 @@ DRIVER_MODULE(aw_mmc, simplebus, aw_mmc_driver, aw_mmc #ifndef MMCCAM MMC_DECLARE_BRIDGE(aw_mmc); #endif +SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c ============================================================================== --- stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:05:14 2020 (r362400) +++ stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:10:39 2020 (r362401) @@ -225,6 +225,10 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node const char *cd_mode_str; dev = helper->dev; + + TIMEOUT_TASK_INIT(taskqueue_swi_giant, &helper->cd_delayed_task, 0, + cd_card_task, helper); + /* * If the device is flagged as non-removable, set that slot option, and * set a flag to make sdhci_fdt_gpio_get_present() always return true. @@ -294,9 +298,6 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node } without_interrupts: - TIMEOUT_TASK_INIT(taskqueue_swi_giant, &helper->cd_delayed_task, 0, - cd_card_task, helper); - /* * If we have a readable gpio pin, but didn't successfully configure * gpio interrupts, setup a timeout task to poll the pin @@ -384,6 +385,8 @@ mmc_fdt_gpio_teardown(struct mmc_fdt_helper *helper) gpio_pin_release(helper->cd_pin); if (helper->cd_ires != NULL) bus_release_resource(helper->dev, SYS_RES_IRQ, 0, helper->cd_ires); + + taskqueue_drain_timeout(taskqueue_swi_giant, &helper->cd_delayed_task); } bool Modified: stable/12/sys/modules/allwinner/Makefile ============================================================================== --- stable/12/sys/modules/allwinner/Makefile Fri Jun 19 18:05:14 2020 (r362400) +++ stable/12/sys/modules/allwinner/Makefile Fri Jun 19 18:10:39 2020 (r362401) @@ -2,6 +2,7 @@ # Build modules specific to Allwinner. SUBDIR = \ + aw_mmc \ aw_pwm \ aw_rtc \ aw_rsb \ From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:14:45 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2432335716; Fri, 19 Jun 2020 18:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pRm53f0nz4bqf; Fri, 19 Jun 2020 18:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7828B1F589; Fri, 19 Jun 2020 18:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIEjZt056626; Fri, 19 Jun 2020 18:14:45 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIEj5q056625; Fri, 19 Jun 2020 18:14:45 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191814.05JIEj5q056625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362402 - stable/12/sys/dev/mmc X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/mmc X-SVN-Commit-Revision: 362402 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:14:45 -0000 Author: manu Date: Fri Jun 19 18:14:45 2020 New Revision: 362402 URL: https://svnweb.freebsd.org/changeset/base/362402 Log: MFC r360007: Revert r359965 This cause board without a cd-gpio to not schedule a card detection. Modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c ============================================================================== --- stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:10:39 2020 (r362401) +++ stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:14:45 2020 (r362402) @@ -217,7 +217,7 @@ cd_card_task(void *arg, int pending __unused) /* * Card detect setup. */ -static bool +static void cd_setup(struct mmc_fdt_helper *helper, phandle_t node) { int pincaps; @@ -237,7 +237,7 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node helper->cd_disabled = true; if (bootverbose) device_printf(dev, "Non-removable media\n"); - return (false); + return; } /* @@ -250,14 +250,14 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node */ if (gpio_pin_get_by_ofw_property(dev, node, "cd-gpios", &helper->cd_pin)) - return (false); + return; if (gpio_pin_getcaps(helper->cd_pin, &pincaps) != 0 || !(pincaps & GPIO_PIN_INPUT)) { device_printf(dev, "Cannot read card-detect gpio pin; " "setting card-always-present flag.\n"); helper->cd_disabled = true; - return (false); + return; } /* @@ -314,8 +314,6 @@ without_interrupts: device_get_nameunit(helper->cd_pin->dev), helper->cd_pin->pin, cd_mode_str); } - - return (true); } /* @@ -357,16 +355,14 @@ mmc_fdt_gpio_setup(device_t dev, phandle_t node, struc helper->dev = dev; helper->cd_handler = handler; + cd_setup(helper, node); wp_setup(helper, node); - if (cd_setup(helper, node)) { - /* - * Schedule a card detection - */ - taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, - &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); - } - + /* + * Schedule a card detection + */ + taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, + &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); return (0); } From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:25:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28B483355BD; Fri, 19 Jun 2020 18:25:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pS0T07qdz4cQQ; Fri, 19 Jun 2020 18:25:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFC511F562; Fri, 19 Jun 2020 18:25:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIPSk9062552; Fri, 19 Jun 2020 18:25:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIPSvh062548; Fri, 19 Jun 2020 18:25:28 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191825.05JIPSvh062548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362403 - in stable/12/sys/arm64: arm64 include X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/arm64: arm64 include X-SVN-Commit-Revision: 362403 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:25:29 -0000 Author: manu Date: Fri Jun 19 18:25:27 2020 New Revision: 362403 URL: https://svnweb.freebsd.org/changeset/base/362403 Log: MFC r350166: arm64: Implement HWCAP Add HWCAP support for arm64. defines are the same as in Linux and a userland program can use elf_aux_info to get the data. We only save the common denominator for all cores in case the big and little cluster have different support (this is known to exists even if we don't support those SoCs in FreeBSD) Modified: stable/12/sys/arm64/arm64/elf_machdep.c stable/12/sys/arm64/arm64/identcpu.c stable/12/sys/arm64/include/cpu.h stable/12/sys/arm64/include/elf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/elf_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/elf_machdep.c Fri Jun 19 18:14:45 2020 (r362402) +++ stable/12/sys/arm64/arm64/elf_machdep.c Fri Jun 19 18:25:27 2020 (r362403) @@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$"); #include "linker_if.h" +u_long elf_hwcap; + static struct sysentvec elf64_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -89,6 +91,7 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &elf_hwcap, }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); Modified: stable/12/sys/arm64/arm64/identcpu.c ============================================================================== --- stable/12/sys/arm64/arm64/identcpu.c Fri Jun 19 18:14:45 2020 (r362402) +++ stable/12/sys/arm64/arm64/identcpu.c Fri Jun 19 18:25:27 2020 (r362403) @@ -44,8 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static int ident_lock; +static void print_cpu_features(u_int cpu); +static u_long parse_cpu_features_hwcap(u_int cpu); char machine[] = "arm64"; @@ -398,10 +401,14 @@ update_user_regs(u_int cpu) } } +/* HWCAP */ +extern u_long elf_hwcap; + static void identify_cpu_sysinit(void *dummy __unused) { int cpu; + u_long hwcap; /* Create a user visible cpu description with safe values */ memset(&user_cpu_desc, 0, sizeof(user_cpu_desc)); @@ -413,6 +420,11 @@ identify_cpu_sysinit(void *dummy __unused) CPU_FOREACH(cpu) { print_cpu_features(cpu); + hwcap = parse_cpu_features_hwcap(cpu); + if (elf_hwcap == 0) + elf_hwcap = hwcap; + else + elf_hwcap &= hwcap; update_user_regs(cpu); } @@ -420,7 +432,95 @@ identify_cpu_sysinit(void *dummy __unused) } SYSINIT(idenrity_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL); -void +static u_long +parse_cpu_features_hwcap(u_int cpu) +{ + u_long hwcap = 0; + + if (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_DP_IMPL) + hwcap |= HWCAP_ASIMDDP; + + if (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_SM4_IMPL) + hwcap |= HWCAP_SM4; + + if (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_SM3_IMPL) + hwcap |= HWCAP_SM3; + + if (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_RDM_IMPL) + hwcap |= HWCAP_ASIMDRDM; + + if (ID_AA64ISAR0_Atomic(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_Atomic_IMPL) + hwcap |= HWCAP_ATOMICS; + + if (ID_AA64ISAR0_CRC32(cpu_desc[cpu].id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) + hwcap |= HWCAP_CRC32; + + switch (ID_AA64ISAR0_SHA2(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA2_BASE: + hwcap |= HWCAP_SHA2; + break; + case ID_AA64ISAR0_SHA2_512: + hwcap |= HWCAP_SHA2 | HWCAP_SHA512; + break; + default: + break; + } + + if (ID_AA64ISAR0_SHA1(cpu_desc[cpu].id_aa64isar0)) + hwcap |= HWCAP_SHA1; + + switch (ID_AA64ISAR0_AES(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_AES_BASE: + hwcap |= HWCAP_AES; + break; + case ID_AA64ISAR0_AES_PMULL: + hwcap |= HWCAP_PMULL | HWCAP_AES; + break; + default: + break; + } + + if (ID_AA64ISAR1_LRCPC(cpu_desc[cpu].id_aa64isar1) == ID_AA64ISAR1_LRCPC_IMPL) + hwcap |= HWCAP_LRCPC; + + if (ID_AA64ISAR1_FCMA(cpu_desc[cpu].id_aa64isar1) == ID_AA64ISAR1_FCMA_IMPL) + hwcap |= HWCAP_FCMA; + + if (ID_AA64ISAR1_JSCVT(cpu_desc[cpu].id_aa64isar1) == ID_AA64ISAR1_JSCVT_IMPL) + hwcap |= HWCAP_JSCVT; + + if (ID_AA64ISAR1_DPB(cpu_desc[cpu].id_aa64isar1) == ID_AA64ISAR1_DPB_IMPL) + hwcap |= HWCAP_DCPOP; + + if (ID_AA64PFR0_SVE(cpu_desc[cpu].id_aa64pfr0) == ID_AA64PFR0_SVE_IMPL) + hwcap |= HWCAP_SVE; + + switch (ID_AA64PFR0_AdvSIMD(cpu_desc[cpu].id_aa64pfr0)) { + case ID_AA64PFR0_AdvSIMD_IMPL: + hwcap |= HWCAP_ASIMD; + break; + case ID_AA64PFR0_AdvSIMD_HP: + hwcap |= HWCAP_ASIMD | HWCAP_ASIMDDP; + break; + default: + break; + } + + switch (ID_AA64PFR0_FP(cpu_desc[cpu].id_aa64pfr0)) { + case ID_AA64PFR0_FP_IMPL: + hwcap |= HWCAP_FP; + break; + case ID_AA64PFR0_FP_HP: + hwcap |= HWCAP_FP | HWCAP_FPHP; + break; + default: + break; + } + + return (hwcap); +} + +static void print_cpu_features(u_int cpu) { struct sbuf *sb; @@ -473,9 +573,6 @@ print_cpu_features(u_int cpu) printf("WARNING: ThunderX Pass 1.1 detected.\nThis has known " "hardware bugs that may cause the incorrect operation of " "atomic operations.\n"); - - if (cpu != 0 && cpu_print_regs == 0) - return; #define SEP_STR ((printed++) == 0) ? "" : "," Modified: stable/12/sys/arm64/include/cpu.h ============================================================================== --- stable/12/sys/arm64/include/cpu.h Fri Jun 19 18:14:45 2020 (r362402) +++ stable/12/sys/arm64/include/cpu.h Fri Jun 19 18:25:27 2020 (r362403) @@ -163,7 +163,6 @@ void cpu_reset(void) __dead2; void fork_trampoline(void); void identify_cpu(void); void install_cpu_errata(void); -void print_cpu_features(u_int); void swi_vm(void *v); #define CPU_AFFINITY(cpu) __cpu_affinity[(cpu)] Modified: stable/12/sys/arm64/include/elf.h ============================================================================== --- stable/12/sys/arm64/include/elf.h Fri Jun 19 18:14:45 2020 (r362402) +++ stable/12/sys/arm64/include/elf.h Fri Jun 19 18:25:27 2020 (r362403) @@ -114,4 +114,34 @@ __ElfType(Auxinfo); #define ET_DYN_LOAD_ADDR 0x100000 +/* HWCAP */ + +#define HWCAP_FP 0x00000001 +#define HWCAP_ASIMD 0x00000002 +#define HWCAP_EVTSTRM 0x00000004 +#define HWCAP_AES 0x00000008 +#define HWCAP_PMULL 0x00000010 +#define HWCAP_SHA1 0x00000020 +#define HWCAP_SHA2 0x00000040 +#define HWCAP_CRC32 0x00000080 +#define HWCAP_ATOMICS 0x00000100 +#define HWCAP_FPHP 0x00000200 +#define HWCAP_CPUID 0x00000400 +#define HWCAP_ASIMDRDM 0x00000800 +#define HWCAP_JSCVT 0x00001000 +#define HWCAP_FCMA 0x00002000 +#define HWCAP_LRCPC 0x00004000 +#define HWCAP_DCPOP 0x00008000 +#define HWCAP_SHA3 0x00010000 +#define HWCAP_SM3 0x00020000 +#define HWCAP_SM4 0x00040000 +#define HWCAP_ASIMDDP 0x00080000 +#define HWCAP_SHA512 0x00100000 +#define HWCAP_SVE 0x00200000 +#define HWCAP_ASIMDFHM 0x00400000 +#define HWCAP_DIT 0x00800000 +#define HWCAP_USCAT 0x01000000 +#define HWCAP_ILRCPC 0x02000000 +#define HWCAP_FLAGM 0x04000000 + #endif /* !_MACHINE_ELF_H_ */ From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:27:23 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43CB23356FF; Fri, 19 Jun 2020 18:27:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pS2g19LTz4cth; Fri, 19 Jun 2020 18:27:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 237561F795; Fri, 19 Jun 2020 18:27:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIRNe1062688; Fri, 19 Jun 2020 18:27:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIRM8c062685; Fri, 19 Jun 2020 18:27:22 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191827.05JIRM8c062685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362404 - in stable/12/sys: arm/mv arm/nvidia dev/usb/controller X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/mv arm/nvidia dev/usb/controller X-SVN-Commit-Revision: 362404 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:27:23 -0000 Author: manu Date: Fri Jun 19 18:27:22 2020 New Revision: 362404 URL: https://svnweb.freebsd.org/changeset/base/362404 Log: MFC r360013, r360018, r360021 r360013: arm: Fix duplicate ehci DRIVER_MODULE Name each ehci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ehci from kernel; already loaded from kernel A similar fix was done in r333074 but imx_ehci wasn't renamed and generic_ehci wasn't present at that time. r360018: arm: Fix duplicate pcib DRIVER_MODULE Name each pcib driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/pcib from kernel; already loaded from kernel r360021: arm: nvidia: pcie: Rename class name to pcib Reported by: jhb Modified: stable/12/sys/arm/mv/mv_pci.c stable/12/sys/arm/nvidia/tegra_pcie.c stable/12/sys/dev/usb/controller/ehci_imx.c stable/12/sys/dev/usb/controller/generic_ehci_fdt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/mv/mv_pci.c ============================================================================== --- stable/12/sys/arm/mv/mv_pci.c Fri Jun 19 18:25:27 2020 (r362403) +++ stable/12/sys/arm/mv/mv_pci.c Fri Jun 19 18:27:22 2020 (r362404) @@ -409,8 +409,8 @@ static driver_t mv_pcib_driver = { devclass_t pcib_devclass; -DRIVER_MODULE(pcib, ofwbus, mv_pcib_driver, pcib_devclass, 0, 0); -DRIVER_MODULE(pcib, pcib_ctrl, mv_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(mv_pcib, ofwbus, mv_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(mv_pcib, pcib_ctrl, mv_pcib_driver, pcib_devclass, 0, 0); static struct mtx pcicfg_mtx; Modified: stable/12/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- stable/12/sys/arm/nvidia/tegra_pcie.c Fri Jun 19 18:25:27 2020 (r362403) +++ stable/12/sys/arm/nvidia/tegra_pcie.c Fri Jun 19 18:27:22 2020 (r362404) @@ -1632,5 +1632,5 @@ static device_method_t tegra_pcib_methods[] = { static devclass_t pcib_devclass; DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, sizeof(struct tegra_pcib_softc), ofw_pci_driver); -DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, +DRIVER_MODULE(tegra_pcib, simplebus, tegra_pcib_driver, pcib_devclass, NULL, NULL); Modified: stable/12/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- stable/12/sys/dev/usb/controller/ehci_imx.c Fri Jun 19 18:25:27 2020 (r362403) +++ stable/12/sys/dev/usb/controller/ehci_imx.c Fri Jun 19 18:27:22 2020 (r362404) @@ -510,5 +510,5 @@ static driver_t ehci_driver = { static devclass_t ehci_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); +DRIVER_MODULE(imx_ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); +MODULE_DEPEND(imx_ehci, usb, 1, 1, 1); Modified: stable/12/sys/dev/usb/controller/generic_ehci_fdt.c ============================================================================== --- stable/12/sys/dev/usb/controller/generic_ehci_fdt.c Fri Jun 19 18:25:27 2020 (r362403) +++ stable/12/sys/dev/usb/controller/generic_ehci_fdt.c Fri Jun 19 18:27:22 2020 (r362404) @@ -251,5 +251,5 @@ DEFINE_CLASS_1(ehci, ehci_fdt_driver, ehci_fdt_methods static devclass_t ehci_fdt_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_fdt_driver, ehci_fdt_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); +DRIVER_MODULE(generic_ehci, simplebus, ehci_fdt_driver, ehci_fdt_devclass, 0, 0); +MODULE_DEPEND(generic_ehci, usb, 1, 1, 1); From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:43:08 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67FCE335F62; Fri, 19 Jun 2020 18:43:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pSNr0d6pz4f9k; Fri, 19 Jun 2020 18:43:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FCA51FB91; Fri, 19 Jun 2020 18:43:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIh782075244; Fri, 19 Jun 2020 18:43:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIh3GA075218; Fri, 19 Jun 2020 18:43:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191843.05JIh3GA075218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362408 - in stable/12: . release/arm64 sys/arm/allwinner sys/dts/arm/overlays sys/dts/arm64/overlays sys/gnu/dts/arm sys/gnu/dts/arm64/actions sys/gnu/dts/arm64/allwinner sys/gnu/dts/a... X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12: . release/arm64 sys/arm/allwinner sys/dts/arm/overlays sys/dts/arm64/overlays sys/gnu/dts/arm sys/gnu/dts/arm64/actions sys/gnu/dts/arm64/allwinner sys/gnu/dts/arm64/altera sys/gnu/dts/a... X-SVN-Commit-Revision: 362408 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:43:08 -0000 Author: manu Date: Fri Jun 19 18:43:02 2020 New Revision: 362408 URL: https://svnweb.freebsd.org/changeset/base/362408 Log: MFC r358430, r359934-r359936, r359939, r359969, r360093 r358430: dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5 r359934: dts: Import DTS from Linux 5.6 r359935: allwinner: aw_thermal: Cope with DTS changes The upstream DTS now include the thermal device node and the SID calibration entry. Update our driver to cope with this change and remove the DTB overlays that aren't needed anymore. X-MFC-With: r359934 r359936: modules: dtb: allwinner: Remove non existant files Those files have been removed in r359935. X-MFC-With: r359935 r359939: modules: dtb: allwinner: Remove sun50i-a64-sid.dtso File was removed in r359935 X-MFC-With: r359935 r359969: arm: allwinner: aw_sid: Fix thermal calibration size for A64 This fixes the aw_thermal driver on A64 SoC. X-MFC-With: r359935 r360093: release: arm64: Remove DTSO for Allwinner boards Both SID and THS dts node are now in the main dts and the DTSO have been removed in r359935 X-MFC-With: r359935 Added: stable/12/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts stable/12/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts stable/12/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts stable/12/sys/gnu/dts/arm/am3703.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/am3703.dtsi stable/12/sys/gnu/dts/arm/am3715.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/am3715.dtsi stable/12/sys/gnu/dts/arm/armada-385-clearfog-gtr-l8.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/armada-385-clearfog-gtr-l8.dts stable/12/sys/gnu/dts/arm/armada-385-clearfog-gtr-s4.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/armada-385-clearfog-gtr-s4.dts stable/12/sys/gnu/dts/arm/armada-385-clearfog-gtr.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/armada-385-clearfog-gtr.dtsi stable/12/sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts - copied, changed from r358430, head/sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts stable/12/sys/gnu/dts/arm/ast2500-facebook-netbmc-common.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/ast2500-facebook-netbmc-common.dtsi stable/12/sys/gnu/dts/arm/at91-kizbox2-2.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/at91-kizbox2-2.dts stable/12/sys/gnu/dts/arm/at91-kizbox2-common.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/at91-kizbox2-common.dtsi stable/12/sys/gnu/dts/arm/at91-kizbox3-hs.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/at91-kizbox3-hs.dts stable/12/sys/gnu/dts/arm/at91-kizbox3_common.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/at91-kizbox3_common.dtsi stable/12/sys/gnu/dts/arm/at91-kizboxmini-base.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-kizboxmini-base.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini-common.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-kizboxmini-common.dtsi stable/12/sys/gnu/dts/arm/at91-kizboxmini-mb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-kizboxmini-mb.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini-rd.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-kizboxmini-rd.dts stable/12/sys/gnu/dts/arm/at91-sam9x60ek.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-sam9x60ek.dts stable/12/sys/gnu/dts/arm/at91-sama5d27_wlsom1.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-sama5d27_wlsom1.dtsi stable/12/sys/gnu/dts/arm/at91-sama5d27_wlsom1_ek.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-sama5d27_wlsom1_ek.dts stable/12/sys/gnu/dts/arm/at91-smartkiz.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/at91-smartkiz.dts stable/12/sys/gnu/dts/arm/bcm2711-rpi-4-b.dts - copied, changed from r358430, head/sys/gnu/dts/arm/bcm2711-rpi-4-b.dts stable/12/sys/gnu/dts/arm/bcm2711.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/bcm2711.dtsi stable/12/sys/gnu/dts/arm/bcm2835-common.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/bcm2835-common.dtsi stable/12/sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi stable/12/sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts stable/12/sys/gnu/dts/arm/dm3725.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/dm3725.dtsi stable/12/sys/gnu/dts/arm/e60k02.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/e60k02.dtsi stable/12/sys/gnu/dts/arm/imx6dl-gw5907.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6dl-gw5907.dts stable/12/sys/gnu/dts/arm/imx6dl-gw5910.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6dl-gw5910.dts stable/12/sys/gnu/dts/arm/imx6dl-gw5912.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6dl-gw5912.dts stable/12/sys/gnu/dts/arm/imx6dl-gw5913.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6dl-gw5913.dts stable/12/sys/gnu/dts/arm/imx6q-gw5907.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6q-gw5907.dts stable/12/sys/gnu/dts/arm/imx6q-gw5910.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6q-gw5910.dts stable/12/sys/gnu/dts/arm/imx6q-gw5912.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6q-gw5912.dts stable/12/sys/gnu/dts/arm/imx6q-gw5913.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6q-gw5913.dts stable/12/sys/gnu/dts/arm/imx6qdl-gw5907.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6qdl-gw5907.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw5910.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6qdl-gw5910.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw5912.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6qdl-gw5912.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw5913.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6qdl-gw5913.dtsi stable/12/sys/gnu/dts/arm/imx6sl-tolino-shine3.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx6sl-tolino-shine3.dts stable/12/sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts stable/12/sys/gnu/dts/arm/imx6ul-imx6ull-opos6ul.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-imx6ull-opos6ul.dtsi stable/12/sys/gnu/dts/arm/imx6ul-imx6ull-opos6uldev.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-imx6ull-opos6uldev.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6311-s.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-kontron-n6311-s.dts stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6311-som.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-kontron-n6311-som.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-s.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-s.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-som-common.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-som-common.dtsi stable/12/sys/gnu/dts/arm/imx6ull-kontron-n6411-s.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ull-kontron-n6411-s.dts stable/12/sys/gnu/dts/arm/imx6ull-kontron-n6411-som.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ull-kontron-n6411-som.dtsi stable/12/sys/gnu/dts/arm/imx6ull-opos6ul.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ull-opos6ul.dtsi stable/12/sys/gnu/dts/arm/imx6ull-opos6uldev.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/imx6ull-opos6uldev.dts stable/12/sys/gnu/dts/arm/imx7ulp-com.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/imx7ulp-com.dts stable/12/sys/gnu/dts/arm/mmp3-dell-ariel.dts - copied, changed from r358430, head/sys/gnu/dts/arm/mmp3-dell-ariel.dts stable/12/sys/gnu/dts/arm/mmp3.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/mmp3.dtsi stable/12/sys/gnu/dts/arm/motorola-mapphone-common.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm/motorola-mapphone-common.dtsi stable/12/sys/gnu/dts/arm/omap3-echo.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/omap3-echo.dts stable/12/sys/gnu/dts/arm/omap4-droid-bionic-xt875.dts - copied unchanged from r358430, head/sys/gnu/dts/arm/omap4-droid-bionic-xt875.dts stable/12/sys/gnu/dts/arm/openbmc-flash-layout-128.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/openbmc-flash-layout-128.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-broadcom-bluetooth.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/rk3288-veyron-broadcom-bluetooth.dtsi stable/12/sys/gnu/dts/arm/rockchip-radxa-dalang-carrier.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/rockchip-radxa-dalang-carrier.dtsi stable/12/sys/gnu/dts/arm/sam9x60.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/sam9x60.dtsi stable/12/sys/gnu/dts/arm/ste-ab8505.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-ab8505.dtsi stable/12/sys/gnu/dts/arm/ste-db8500.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-db8500.dtsi stable/12/sys/gnu/dts/arm/ste-db8520.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-db8520.dtsi stable/12/sys/gnu/dts/arm/ste-dbx5x0-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-dbx5x0-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-href-tvk1281618-r2.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-href-tvk1281618-r2.dtsi stable/12/sys/gnu/dts/arm/ste-href-tvk1281618-r3.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-href-tvk1281618-r3.dtsi stable/12/sys/gnu/dts/arm/ste-href520-tvk.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-href520-tvk.dts stable/12/sys/gnu/dts/arm/ste-ux500-samsung-golden.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/ste-ux500-samsung-golden.dts stable/12/sys/gnu/dts/arm/stm32mp15-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp151.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp151.dtsi stable/12/sys/gnu/dts/arm/stm32mp153.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp153.dtsi stable/12/sys/gnu/dts/arm/stm32mp157.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp157.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xc.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xc.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xx-dkx.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xx-dkx.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xxaa-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xxaa-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xxab-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xxab-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xxac-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xxac-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp15xxad-pinctrl.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/stm32mp15xxad-pinctrl.dtsi stable/12/sys/gnu/dts/arm/sun8i-h3-emlid-neutis-n5h3-devboard.dts - copied unchanged from r359936, head/sys/gnu/dts/arm/sun8i-h3-emlid-neutis-n5h3-devboard.dts stable/12/sys/gnu/dts/arm/sun8i-h3-emlid-neutis-n5h3.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/sun8i-h3-emlid-neutis-n5h3.dtsi stable/12/sys/gnu/dts/arm/sun8i-h3-nanopi-duo2.dts - copied, changed from r358430, head/sys/gnu/dts/arm/sun8i-h3-nanopi-duo2.dts stable/12/sys/gnu/dts/arm/sunxi-h3-h5-emlid-neutis.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/sunxi-h3-h5-emlid-neutis.dtsi stable/12/sys/gnu/dts/arm/sunxi-libretech-all-h3-it.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm/sunxi-libretech-all-h3-it.dtsi stable/12/sys/gnu/dts/arm/tegra20-cpu-opp-microvolt.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/tegra20-cpu-opp-microvolt.dtsi stable/12/sys/gnu/dts/arm/tegra20-cpu-opp.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/tegra20-cpu-opp.dtsi stable/12/sys/gnu/dts/arm/tegra30-cpu-opp-microvolt.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/tegra30-cpu-opp-microvolt.dtsi stable/12/sys/gnu/dts/arm/tegra30-cpu-opp.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm/tegra30-cpu-opp.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-cpu-opp.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/allwinner/sun50i-a64-cpu-opp.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-libretech-all-h3-it.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/allwinner/sun50i-h5-libretech-all-h3-it.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-libretech-all-h5-cc.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/allwinner/sun50i-h5-libretech-all-h5-cc.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts stable/12/sys/gnu/dts/arm64/altera/socfpga_stratix10_socdk_nand.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/altera/socfpga_stratix10_socdk_nand.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-a1-ad401.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/amlogic/meson-a1-ad401.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-a1.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/amlogic/meson-a1.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/amlogic/meson-g12.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-ugoos-am6.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/amlogic/meson-g12b-ugoos-am6.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gx-libretech-pc.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/amlogic/meson-gx-libretech-pc.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-kii-pro.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/amlogic/meson-gxbb-kii-pro.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905d-libretech-pc.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905d-libretech-pc.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-s912-libretech-pc.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/amlogic/meson-gxm-s912-libretech-pc.dts stable/12/sys/gnu/dts/arm64/broadcom/bcm2711-rpi-4-b.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/broadcom/bcm2711-rpi-4-b.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-cex7.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/fsl-lx2160a-cex7.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-clearfog-cx.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/fsl-lx2160a-clearfog-cx.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-clearfog-itx.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/fsl-lx2160a-clearfog-itx.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-honeycomb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/fsl-lx2160a-honeycomb.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn-evk.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/imx8mn-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn-evk.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/freescale/imx8mn-evk.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq-phanbell.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/imx8mq-phanbell.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-thor96.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/freescale/imx8mq-thor96.dts stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dts stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-colibri.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri.dtsi stable/12/sys/gnu/dts/arm64/freescale/s32v234-evb.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/s32v234-evb.dts stable/12/sys/gnu/dts/arm64/freescale/s32v234.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/freescale/s32v234.dtsi stable/12/sys/gnu/dts/arm64/intel/socfpga_agilex_socdk_nand.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/intel/socfpga_agilex_socdk_nand.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-emmc.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-emmc.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7-emmc.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7-emmc.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap807-quad.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-ap807-quad.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap807.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-ap807.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap80x.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-ap80x.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-cp115.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-cp115.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-cp11x.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/armada-cp11x.dtsi stable/12/sys/gnu/dts/arm64/marvell/cn9130-db.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/cn9130-db.dts stable/12/sys/gnu/dts/arm64/marvell/cn9130.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/cn9130.dtsi stable/12/sys/gnu/dts/arm64/marvell/cn9131-db.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/cn9131-db.dts stable/12/sys/gnu/dts/arm64/marvell/cn9132-db.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/marvell/cn9132-db.dts stable/12/sys/gnu/dts/arm64/qcom/apq8096-ifc6640.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/qcom/apq8096-ifc6640.dts stable/12/sys/gnu/dts/arm64/qcom/pm6150.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/qcom/pm6150.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm6150l.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/qcom/pm6150l.dtsi stable/12/sys/gnu/dts/arm64/qcom/sc7180-idp.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/qcom/sc7180-idp.dts stable/12/sys/gnu/dts/arm64/qcom/sc7180.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/qcom/sc7180.dtsi stable/12/sys/gnu/dts/arm64/realtek/rtd1293-ds418j.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/realtek/rtd1293-ds418j.dts stable/12/sys/gnu/dts/arm64/realtek/rtd1293.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/realtek/rtd1293.dtsi stable/12/sys/gnu/dts/arm64/realtek/rtd1296-ds418.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/realtek/rtd1296-ds418.dts stable/12/sys/gnu/dts/arm64/realtek/rtd1296.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/realtek/rtd1296.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n-ex.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n-ex.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774b1.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/renesas/r8a774b1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-ek874-idk-2121wr.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a774c0-ek874-idk-2121wr.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77950-salvator-x.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77950-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77950-ulcb-kf.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77950-ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77950-ulcb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77950-ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77950.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77950.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77951-salvator-x.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77951-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77951-salvator-xs.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77951-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77951-ulcb-kf.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77951-ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77951-ulcb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77951-ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77951.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77951.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77960-salvator-x.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77960-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77960-salvator-xs.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77960-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77960-ulcb-kf.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77960-ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77960-ulcb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77960-ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77960.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77960.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77961-salvator-xs.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/renesas/r8a77961-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77961.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/renesas/r8a77961.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77965-ulcb-kf.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77965-ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965-ulcb.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/renesas/r8a77965-ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/rzg2-advantech-idk-1110wr-panel.dtsi - copied unchanged from r358430, head/sys/gnu/dts/arm64/renesas/rzg2-advantech-idk-1110wr-panel.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3308-evb.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/rockchip/rk3308-evb.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3308-roc-cc.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/rockchip/rk3308-roc-cc.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3308.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/rockchip/rk3308.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3328-a1.dts - copied unchanged from r358430, head/sys/gnu/dts/arm64/rockchip/rk3328-a1.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc-mezzanine.dts - copied, changed from r358430, head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc-mezzanine.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dtsi - copied, changed from r358430, head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64-v2.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64-v2.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399pro-rock-pi-n10.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/rockchip/rk3399pro-rock-pi-n10.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399pro-vmarc-som.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/rockchip/rk3399pro-vmarc-som.dtsi stable/12/sys/gnu/dts/arm64/sprd/sc9863a.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/sprd/sc9863a.dtsi stable/12/sys/gnu/dts/arm64/sprd/sharkl3.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/sprd/sharkl3.dtsi stable/12/sys/gnu/dts/arm64/sprd/sp9863a-1h10.dts - copied unchanged from r359936, head/sys/gnu/dts/arm64/sprd/sp9863a-1h10.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-clk-ccf.dtsi - copied unchanged from r359936, head/sys/gnu/dts/arm64/xilinx/zynqmp-clk-ccf.dtsi stable/12/sys/gnu/dts/include/dt-bindings/clock/bm1880-clock.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/bm1880-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mp-clock.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/imx8mp-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/meson8-ddr-clkc.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/meson8-ddr-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sc7180.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sc7180.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq6018.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq6018.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sc7180.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sc7180.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gpucc-sc7180.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gpucc-sc7180.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8998.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8998.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,videocc-sc7180.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/qcom,videocc-sc7180.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a774b1-cpg-mssr.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/r8a774b1-cpg-mssr.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a77961-cpg-mssr.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/r8a77961-cpg-mssr.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ti-dra7-atl.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/ti-dra7-atl.h stable/12/sys/gnu/dts/include/dt-bindings/clock/x1000-cgu.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/clock/x1000-cgu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/xlnx-versal-clk.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/clock/xlnx-versal-clk.h stable/12/sys/gnu/dts/include/dt-bindings/dma/x1000-dma.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/dma/x1000-dma.h stable/12/sys/gnu/dts/include/dt-bindings/dma/x1830-dma.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/dma/x1830-dma.h stable/12/sys/gnu/dts/include/dt-bindings/gpio/meson-a1-gpio.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/gpio/meson-a1-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,msm8916.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,msm8916.h stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,msm8974.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,msm8974.h stable/12/sys/gnu/dts/include/dt-bindings/interrupt-controller/aspeed-scu-ic.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/interrupt-controller/aspeed-scu-ic.h stable/12/sys/gnu/dts/include/dt-bindings/memory/tegra194-mc.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/memory/tegra194-mc.h stable/12/sys/gnu/dts/include/dt-bindings/net/qca-ar803x.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/net/qca-ar803x.h stable/12/sys/gnu/dts/include/dt-bindings/net/ti-dp83869.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/net/ti-dp83869.h stable/12/sys/gnu/dts/include/dt-bindings/pmu/ - copied from r358430, head/sys/gnu/dts/include/dt-bindings/pmu/ stable/12/sys/gnu/dts/include/dt-bindings/power/mt6765-power.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/power/mt6765-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a774b1-sysc.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/power/r8a774b1-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a77961-sysc.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/power/r8a77961-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/regulator/dlg,da9063-regulator.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/regulator/dlg,da9063-regulator.h stable/12/sys/gnu/dts/include/dt-bindings/reset-controller/mt2712-resets.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/reset-controller/mt2712-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-a1-reset.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-a1-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/nuvoton,npcm7xx-reset.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/reset/nuvoton,npcm7xx-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-ipq6018.h - copied unchanged from r359936, head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-ipq6018.h stable/12/sys/gnu/dts/include/dt-bindings/reset/realtek,rtd1295.h - copied unchanged from r358430, head/sys/gnu/dts/include/dt-bindings/reset/realtek,rtd1295.h Deleted: stable/12/sys/dts/arm/overlays/sun8i-h3-sid.dtso stable/12/sys/dts/arm/overlays/sun8i-h3-ths.dtso stable/12/sys/dts/arm64/overlays/sun50i-a64-sid.dtso stable/12/sys/dts/arm64/overlays/sun50i-a64-ths.dtso stable/12/sys/dts/arm64/overlays/sun50i-h5-sid.dtso stable/12/sys/dts/arm64/overlays/sun50i-h5-ths.dtso stable/12/sys/gnu/dts/arm/at91-kizbox2.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini.dts stable/12/sys/gnu/dts/arm/ste-href-ab8505.dtsi stable/12/sys/gnu/dts/arm/stm32mp157-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157c.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xaa-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xab-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xac-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xad-pinctrl.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8096-db820c-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8096-db820c-pmic-pins.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1-h3ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1-h3ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-h3ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-h3ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7796-m3ulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796-m3ulcb.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77965-m3nulcb-kf.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965-m3nulcb.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-clk.dtsi stable/12/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h Modified: stable/12/UPDATING stable/12/release/arm64/PINE64-LTS.conf stable/12/release/arm64/PINE64.conf stable/12/release/arm64/PINEBOOK.conf stable/12/sys/arm/allwinner/aw_sid.c stable/12/sys/arm/allwinner/aw_thermal.c stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi stable/12/sys/gnu/dts/arm/am335x-boneblue.dts stable/12/sys/gnu/dts/arm/am335x-chiliboard.dts stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts stable/12/sys/gnu/dts/arm/am335x-evm.dts stable/12/sys/gnu/dts/arm/am335x-evmsk.dts stable/12/sys/gnu/dts/arm/am335x-guardian.dts stable/12/sys/gnu/dts/arm/am335x-icev2.dts stable/12/sys/gnu/dts/arm/am335x-igep0033.dtsi stable/12/sys/gnu/dts/arm/am335x-lxm.dts stable/12/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi stable/12/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts stable/12/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts stable/12/sys/gnu/dts/arm/am335x-pcm-953.dtsi stable/12/sys/gnu/dts/arm/am335x-pdu001.dts stable/12/sys/gnu/dts/arm/am335x-pepper.dts stable/12/sys/gnu/dts/arm/am335x-pocketbeagle.dts stable/12/sys/gnu/dts/arm/am335x-regor.dtsi stable/12/sys/gnu/dts/arm/am335x-sancloud-bbe.dts stable/12/sys/gnu/dts/arm/am335x-shc.dts stable/12/sys/gnu/dts/arm/am335x-sl50.dts stable/12/sys/gnu/dts/arm/am335x-wega.dtsi stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi stable/12/sys/gnu/dts/arm/am33xx.dtsi stable/12/sys/gnu/dts/arm/am3517.dtsi stable/12/sys/gnu/dts/arm/am3517_mt_ventoux.dts stable/12/sys/gnu/dts/arm/am4372.dtsi stable/12/sys/gnu/dts/arm/am437x-gp-evm.dts stable/12/sys/gnu/dts/arm/am437x-idk-evm.dts stable/12/sys/gnu/dts/arm/am437x-l4.dtsi stable/12/sys/gnu/dts/arm/am437x-sk-evm.dts stable/12/sys/gnu/dts/arm/am43x-epos-evm.dts stable/12/sys/gnu/dts/arm/am43xx-clocks.dtsi stable/12/sys/gnu/dts/arm/am571x-idk.dts stable/12/sys/gnu/dts/arm/am572x-idk-common.dtsi stable/12/sys/gnu/dts/arm/am572x-idk.dts stable/12/sys/gnu/dts/arm/am574x-idk.dts stable/12/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi stable/12/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts stable/12/sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts stable/12/sys/gnu/dts/arm/am57xx-idk-common.dtsi stable/12/sys/gnu/dts/arm/armada-388-clearfog.dtsi stable/12/sys/gnu/dts/arm/armada-388-helios4.dts stable/12/sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi stable/12/sys/gnu/dts/arm/armada-38x.dtsi stable/12/sys/gnu/dts/arm/armada-xp-98dx3236.dtsi stable/12/sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts stable/12/sys/gnu/dts/arm/armada-xp.dtsi stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-intel-s2600wf.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-portwell-neptune.dts stable/12/sys/gnu/dts/arm/aspeed-g4.dtsi stable/12/sys/gnu/dts/arm/aspeed-g5.dtsi stable/12/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/aspeed-g6.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/at91-kizbox.dts stable/12/sys/gnu/dts/arm/at91-nattis-2-natte-2.dts stable/12/sys/gnu/dts/arm/at91-sama5d27_som1.dtsi stable/12/sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts stable/12/sys/gnu/dts/arm/at91-sama5d2_xplained.dts stable/12/sys/gnu/dts/arm/at91-sama5d4_xplained.dts stable/12/sys/gnu/dts/arm/at91sam9260.dtsi stable/12/sys/gnu/dts/arm/at91sam9261.dtsi stable/12/sys/gnu/dts/arm/at91sam9263.dtsi stable/12/sys/gnu/dts/arm/at91sam9g45.dtsi stable/12/sys/gnu/dts/arm/at91sam9rl.dtsi stable/12/sys/gnu/dts/arm/atlas7-evb.dts stable/12/sys/gnu/dts/arm/bcm-cygnus.dtsi stable/12/sys/gnu/dts/arm/bcm-hr2.dtsi stable/12/sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi.dtsi stable/12/sys/gnu/dts/arm/bcm2835.dtsi stable/12/sys/gnu/dts/arm/bcm2836.dtsi stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts stable/12/sys/gnu/dts/arm/bcm2837.dtsi stable/12/sys/gnu/dts/arm/bcm283x.dtsi stable/12/sys/gnu/dts/arm/bcm5301x.dtsi stable/12/sys/gnu/dts/arm/bcm958625hr.dts stable/12/sys/gnu/dts/arm/dm8148-evm.dts stable/12/sys/gnu/dts/arm/dm8148-t410.dts stable/12/sys/gnu/dts/arm/dove.dtsi stable/12/sys/gnu/dts/arm/dra62x-j5eco-evm.dts stable/12/sys/gnu/dts/arm/dra7-evm-common.dtsi stable/12/sys/gnu/dts/arm/dra7-evm.dts stable/12/sys/gnu/dts/arm/dra7-l4.dtsi stable/12/sys/gnu/dts/arm/dra7.dtsi stable/12/sys/gnu/dts/arm/dra72-evm-common.dtsi stable/12/sys/gnu/dts/arm/dra72x.dtsi stable/12/sys/gnu/dts/arm/dra74x.dtsi stable/12/sys/gnu/dts/arm/dra76-evm.dts stable/12/sys/gnu/dts/arm/dra76x.dtsi stable/12/sys/gnu/dts/arm/dra7xx-clocks.dtsi stable/12/sys/gnu/dts/arm/emev2.dtsi stable/12/sys/gnu/dts/arm/exynos3250.dtsi stable/12/sys/gnu/dts/arm/exynos4.dtsi stable/12/sys/gnu/dts/arm/exynos4210-universal_c210.dts stable/12/sys/gnu/dts/arm/exynos4210.dtsi stable/12/sys/gnu/dts/arm/exynos4412-galaxy-s3.dtsi stable/12/sys/gnu/dts/arm/exynos4412-midas.dtsi stable/12/sys/gnu/dts/arm/exynos4412-n710x.dts stable/12/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi stable/12/sys/gnu/dts/arm/exynos4412-tiny4412.dts stable/12/sys/gnu/dts/arm/exynos4412.dtsi stable/12/sys/gnu/dts/arm/exynos5.dtsi stable/12/sys/gnu/dts/arm/exynos5250-arndale.dts stable/12/sys/gnu/dts/arm/exynos5250-smdk5250.dts stable/12/sys/gnu/dts/arm/exynos5250.dtsi stable/12/sys/gnu/dts/arm/exynos5260-xyref5260.dts stable/12/sys/gnu/dts/arm/exynos5260.dtsi stable/12/sys/gnu/dts/arm/exynos5410-odroidxu.dts stable/12/sys/gnu/dts/arm/exynos5410-smdk5410.dts stable/12/sys/gnu/dts/arm/exynos5410.dtsi stable/12/sys/gnu/dts/arm/exynos5420-arndale-octa.dts stable/12/sys/gnu/dts/arm/exynos5420-cpus.dtsi stable/12/sys/gnu/dts/arm/exynos5420-peach-pit.dts stable/12/sys/gnu/dts/arm/exynos5420-smdk5420.dts stable/12/sys/gnu/dts/arm/exynos5420.dtsi stable/12/sys/gnu/dts/arm/exynos5422-cpus.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroid-core.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroidhc1.dts stable/12/sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts stable/12/sys/gnu/dts/arm/exynos54xx.dtsi stable/12/sys/gnu/dts/arm/exynos5800-peach-pi.dts stable/12/sys/gnu/dts/arm/exynos5800.dtsi stable/12/sys/gnu/dts/arm/ibm-power9-dual.dtsi stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts stable/12/sys/gnu/dts/arm/imx25-pdk.dts stable/12/sys/gnu/dts/arm/imx25.dtsi stable/12/sys/gnu/dts/arm/imx27.dtsi stable/12/sys/gnu/dts/arm/imx31.dtsi stable/12/sys/gnu/dts/arm/imx51-babbage.dts stable/12/sys/gnu/dts/arm/imx51.dtsi stable/12/sys/gnu/dts/arm/imx53-qsb-common.dtsi stable/12/sys/gnu/dts/arm/imx53-usbarmory.dts stable/12/sys/gnu/dts/arm/imx6dl-apf6dev.dts stable/12/sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts stable/12/sys/gnu/dts/arm/imx6dl-icore-mipi.dts stable/12/sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi stable/12/sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts stable/12/sys/gnu/dts/arm/imx6dl.dtsi stable/12/sys/gnu/dts/arm/imx6q-apalis-eval.dts stable/12/sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts stable/12/sys/gnu/dts/arm/imx6q-apalis-ixora.dts stable/12/sys/gnu/dts/arm/imx6q-apf6dev.dts stable/12/sys/gnu/dts/arm/imx6q-dhcom-pdk2.dts stable/12/sys/gnu/dts/arm/imx6q-dhcom-som.dtsi stable/12/sys/gnu/dts/arm/imx6q-gw54xx.dts stable/12/sys/gnu/dts/arm/imx6q-logicpd.dts stable/12/sys/gnu/dts/arm/imx6q.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-apalis.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-apf6.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-colibri.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw551x.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-icore-1.5.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-icore.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-rex.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-udoo.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi stable/12/sys/gnu/dts/arm/imx6sl-evk.dts stable/12/sys/gnu/dts/arm/imx6sl.dtsi stable/12/sys/gnu/dts/arm/imx6sll-evk.dts stable/12/sys/gnu/dts/arm/imx6sll.dtsi stable/12/sys/gnu/dts/arm/imx6sx-sdb-reva.dts stable/12/sys/gnu/dts/arm/imx6sx-sdb.dts stable/12/sys/gnu/dts/arm/imx6sx.dtsi stable/12/sys/gnu/dts/arm/imx6ul-14x14-evk.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts (contents, props changed) stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/imx6ul-opos6ul.dtsi stable/12/sys/gnu/dts/arm/imx6ul-opos6uldev.dts stable/12/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/imx6ul.dtsi stable/12/sys/gnu/dts/arm/imx6ull-colibri-eval-v3.dtsi stable/12/sys/gnu/dts/arm/imx6ull-colibri-nonwifi.dtsi stable/12/sys/gnu/dts/arm/imx6ull-colibri-wifi.dtsi stable/12/sys/gnu/dts/arm/imx6ull-colibri.dtsi stable/12/sys/gnu/dts/arm/imx7-colibri-eval-v3.dtsi stable/12/sys/gnu/dts/arm/imx7-colibri.dtsi stable/12/sys/gnu/dts/arm/imx7d-pico.dtsi stable/12/sys/gnu/dts/arm/imx7d-sdb-reva.dts stable/12/sys/gnu/dts/arm/imx7d.dtsi stable/12/sys/gnu/dts/arm/imx7s-colibri.dtsi stable/12/sys/gnu/dts/arm/imx7s.dtsi stable/12/sys/gnu/dts/arm/imx7ulp-evk.dts stable/12/sys/gnu/dts/arm/imx7ulp.dtsi stable/12/sys/gnu/dts/arm/iwg20d-q7-common.dtsi stable/12/sys/gnu/dts/arm/iwg20d-q7-dbcm-ca.dtsi stable/12/sys/gnu/dts/arm/keystone-clocks.dtsi stable/12/sys/gnu/dts/arm/keystone-k2e-clocks.dtsi stable/12/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi stable/12/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi stable/12/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi stable/12/sys/gnu/dts/arm/kirkwood-synology.dtsi stable/12/sys/gnu/dts/arm/logicpd-som-lv-35xx-devkit.dts stable/12/sys/gnu/dts/arm/logicpd-torpedo-35xx-devkit.dts stable/12/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit-28.dts stable/12/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts stable/12/sys/gnu/dts/arm/logicpd-torpedo-baseboard.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi stable/12/sys/gnu/dts/arm/ls1021a-tsn.dts stable/12/sys/gnu/dts/arm/ls1021a.dtsi stable/12/sys/gnu/dts/arm/meson.dtsi stable/12/sys/gnu/dts/arm/meson6.dtsi stable/12/sys/gnu/dts/arm/meson8.dtsi stable/12/sys/gnu/dts/arm/meson8b-ec100.dts stable/12/sys/gnu/dts/arm/meson8b-mxq.dts stable/12/sys/gnu/dts/arm/meson8b-odroidc1.dts stable/12/sys/gnu/dts/arm/meson8b.dtsi stable/12/sys/gnu/dts/arm/motorola-cpcap-mapphone.dtsi stable/12/sys/gnu/dts/arm/mt6323.dtsi stable/12/sys/gnu/dts/arm/omap2.dtsi stable/12/sys/gnu/dts/arm/omap2430.dtsi stable/12/sys/gnu/dts/arm/omap3-beagle-xm.dts stable/12/sys/gnu/dts/arm/omap3-beagle.dts stable/12/sys/gnu/dts/arm/omap3-cm-t3530.dts stable/12/sys/gnu/dts/arm/omap3-cm-t3730.dts stable/12/sys/gnu/dts/arm/omap3-devkit8000-lcd43.dts stable/12/sys/gnu/dts/arm/omap3-devkit8000-lcd70.dts stable/12/sys/gnu/dts/arm/omap3-devkit8000.dts stable/12/sys/gnu/dts/arm/omap3-gta04.dtsi stable/12/sys/gnu/dts/arm/omap3-ha-lcd.dts stable/12/sys/gnu/dts/arm/omap3-ha.dts stable/12/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts stable/12/sys/gnu/dts/arm/omap3-igep0020.dts stable/12/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts stable/12/sys/gnu/dts/arm/omap3-igep0030.dts stable/12/sys/gnu/dts/arm/omap3-ldp.dts stable/12/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi stable/12/sys/gnu/dts/arm/omap3-lilly-dbb056.dts stable/12/sys/gnu/dts/arm/omap3-n9.dts stable/12/sys/gnu/dts/arm/omap3-n900.dts stable/12/sys/gnu/dts/arm/omap3-n950-n9.dtsi stable/12/sys/gnu/dts/arm/omap3-n950.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-palo35.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-summit.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts stable/12/sys/gnu/dts/arm/omap3-overo-storm-tobiduo.dts stable/12/sys/gnu/dts/arm/omap3-pandora-1ghz.dts stable/12/sys/gnu/dts/arm/omap3-pandora-common.dtsi stable/12/sys/gnu/dts/arm/omap3-sbc-t3530.dts stable/12/sys/gnu/dts/arm/omap3-sbc-t3730.dts stable/12/sys/gnu/dts/arm/omap3-sniper.dts stable/12/sys/gnu/dts/arm/omap3-tao3530.dtsi stable/12/sys/gnu/dts/arm/omap3-thunder.dts stable/12/sys/gnu/dts/arm/omap3-zoom3.dts stable/12/sys/gnu/dts/arm/omap3.dtsi stable/12/sys/gnu/dts/arm/omap3430-sdp.dts stable/12/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap34xx.dtsi stable/12/sys/gnu/dts/arm/omap36xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap36xx.dtsi stable/12/sys/gnu/dts/arm/omap3xxx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap4-droid4-xt894.dts stable/12/sys/gnu/dts/arm/omap4-l4-abe.dtsi stable/12/sys/gnu/dts/arm/omap4-l4.dtsi stable/12/sys/gnu/dts/arm/omap4.dtsi stable/12/sys/gnu/dts/arm/omap44xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap5-l4-abe.dtsi stable/12/sys/gnu/dts/arm/omap5-l4.dtsi stable/12/sys/gnu/dts/arm/omap5.dtsi stable/12/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/12/sys/gnu/dts/arm/ox810se.dtsi stable/12/sys/gnu/dts/arm/ox820.dtsi stable/12/sys/gnu/dts/arm/qcom-apq8084.dtsi stable/12/sys/gnu/dts/arm/qcom-ipq4019.dtsi stable/12/sys/gnu/dts/arm/qcom-mdm9615-wp8548-mangoh-green.dts stable/12/sys/gnu/dts/arm/qcom-msm8974-fairphone-fp2.dts stable/12/sys/gnu/dts/arm/qcom-msm8974.dtsi stable/12/sys/gnu/dts/arm/qcom-pm8941.dtsi stable/12/sys/gnu/dts/arm/r7s72100.dtsi stable/12/sys/gnu/dts/arm/r8a73a4.dtsi stable/12/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts stable/12/sys/gnu/dts/arm/r8a7740.dtsi stable/12/sys/gnu/dts/arm/r8a7743.dtsi stable/12/sys/gnu/dts/arm/r8a7744.dtsi stable/12/sys/gnu/dts/arm/r8a7745-iwg22d-sodimm.dts stable/12/sys/gnu/dts/arm/r8a7745.dtsi stable/12/sys/gnu/dts/arm/r8a77470-iwg23s-sbc.dts stable/12/sys/gnu/dts/arm/r8a77470.dtsi stable/12/sys/gnu/dts/arm/r8a7778.dtsi stable/12/sys/gnu/dts/arm/r8a7779-marzen.dts stable/12/sys/gnu/dts/arm/r8a7779.dtsi stable/12/sys/gnu/dts/arm/r8a7790-lager.dts stable/12/sys/gnu/dts/arm/r8a7790.dtsi stable/12/sys/gnu/dts/arm/r8a7791-koelsch.dts stable/12/sys/gnu/dts/arm/r8a7791-porter.dts stable/12/sys/gnu/dts/arm/r8a7791.dtsi stable/12/sys/gnu/dts/arm/r8a7792.dtsi stable/12/sys/gnu/dts/arm/r8a7793-gose.dts stable/12/sys/gnu/dts/arm/r8a7793.dtsi stable/12/sys/gnu/dts/arm/r8a7794-alt.dts stable/12/sys/gnu/dts/arm/r8a7794-silk.dts stable/12/sys/gnu/dts/arm/r8a7794.dtsi stable/12/sys/gnu/dts/arm/rda8810pl.dtsi stable/12/sys/gnu/dts/arm/rk3036.dtsi stable/12/sys/gnu/dts/arm/rk3188-bqedison2qc.dts stable/12/sys/gnu/dts/arm/rk322x.dtsi stable/12/sys/gnu/dts/arm/rk3288-evb.dtsi stable/12/sys/gnu/dts/arm/rk3288-rock2-som.dtsi stable/12/sys/gnu/dts/arm/rk3288-tinker.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-analog-audio.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-brain.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-chromebook.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/rk3288-veyron-fievel.dts (contents, props changed) stable/12/sys/gnu/dts/arm/rk3288-veyron-jaq.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-jerry.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-mickey.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-minnie.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-pinky.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-speedy.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-tiger.dts (contents, props changed) stable/12/sys/gnu/dts/arm/rk3288-veyron.dtsi stable/12/sys/gnu/dts/arm/rk3288.dtsi stable/12/sys/gnu/dts/arm/rk3xxx.dtsi stable/12/sys/gnu/dts/arm/rv1108.dtsi stable/12/sys/gnu/dts/arm/s3c2416-smdk2416.dts stable/12/sys/gnu/dts/arm/s3c6410-mini6410.dts stable/12/sys/gnu/dts/arm/s3c6410-smdk6410.dts stable/12/sys/gnu/dts/arm/sama5d2.dtsi stable/12/sys/gnu/dts/arm/sama5d3.dtsi stable/12/sys/gnu/dts/arm/sama5d3_can.dtsi stable/12/sys/gnu/dts/arm/sama5d3_tcb1.dtsi stable/12/sys/gnu/dts/arm/sama5d3_uart.dtsi stable/12/sys/gnu/dts/arm/sh73a0.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10_socdk_qspi.dts stable/12/sys/gnu/dts/arm/ste-ab8500.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/12/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi stable/12/sys/gnu/dts/arm/ste-href.dtsi stable/12/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts stable/12/sys/gnu/dts/arm/ste-hrefprev60-tvk.dts stable/12/sys/gnu/dts/arm/ste-hrefprev60.dtsi stable/12/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts stable/12/sys/gnu/dts/arm/ste-hrefv60plus-tvk.dts stable/12/sys/gnu/dts/arm/ste-hrefv60plus.dtsi stable/12/sys/gnu/dts/arm/ste-nomadik-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-snowball.dts stable/12/sys/gnu/dts/arm/stih410-b2260.dts stable/12/sys/gnu/dts/arm/stihxxx-b2120.dtsi stable/12/sys/gnu/dts/arm/stm32429i-eval.dts stable/12/sys/gnu/dts/arm/stm32746g-eval.dts stable/12/sys/gnu/dts/arm/stm32f4-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32f429-disco.dts stable/12/sys/gnu/dts/arm/stm32f429.dtsi stable/12/sys/gnu/dts/arm/stm32f469-disco.dts stable/12/sys/gnu/dts/arm/stm32f469.dtsi stable/12/sys/gnu/dts/arm/stm32f7-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32f746-disco.dts stable/12/sys/gnu/dts/arm/stm32f746.dtsi stable/12/sys/gnu/dts/arm/stm32f769-disco.dts stable/12/sys/gnu/dts/arm/stm32h743.dtsi stable/12/sys/gnu/dts/arm/stm32h743i-disco.dts stable/12/sys/gnu/dts/arm/stm32h743i-eval.dts stable/12/sys/gnu/dts/arm/stm32mp157a-avenger96.dts stable/12/sys/gnu/dts/arm/stm32mp157a-dk1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-dk2.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ed1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ev1.dts stable/12/sys/gnu/dts/arm/sun4i-a10.dtsi stable/12/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun5i.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31.dtsi stable/12/sys/gnu/dts/arm/sun7i-a20.dtsi stable/12/sys/gnu/dts/arm/sun8i-a23-a33.dtsi stable/12/sys/gnu/dts/arm/sun8i-a33.dtsi stable/12/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts stable/12/sys/gnu/dts/arm/sun8i-a83t-tbs-a711.dts stable/12/sys/gnu/dts/arm/sun8i-a83t.dtsi stable/12/sys/gnu/dts/arm/sun8i-h3-beelink-x2.dts stable/12/sys/gnu/dts/arm/sun8i-h3.dtsi stable/12/sys/gnu/dts/arm/sun8i-r40.dtsi stable/12/sys/gnu/dts/arm/sun8i-v3s.dtsi stable/12/sys/gnu/dts/arm/sun9i-a80.dtsi stable/12/sys/gnu/dts/arm/sunxi-h3-h5.dtsi stable/12/sys/gnu/dts/arm/tegra124-apalis-emc.dtsi stable/12/sys/gnu/dts/arm/tegra124-jetson-tk1-emc.dtsi stable/12/sys/gnu/dts/arm/tegra124-nyan-big-emc.dtsi stable/12/sys/gnu/dts/arm/tegra124-nyan-blaze-emc.dtsi stable/12/sys/gnu/dts/arm/tegra124-venice2.dts stable/12/sys/gnu/dts/arm/tegra124.dtsi stable/12/sys/gnu/dts/arm/tegra20-paz00.dts stable/12/sys/gnu/dts/arm/tegra20-trimslice.dts stable/12/sys/gnu/dts/arm/tegra20.dtsi stable/12/sys/gnu/dts/arm/tegra30-apalis-v1.1.dtsi stable/12/sys/gnu/dts/arm/tegra30-apalis.dtsi stable/12/sys/gnu/dts/arm/tegra30-cardhu-a04.dts stable/12/sys/gnu/dts/arm/tegra30-colibri.dtsi stable/12/sys/gnu/dts/arm/tegra30.dtsi stable/12/sys/gnu/dts/arm/uniphier-ld4.dtsi stable/12/sys/gnu/dts/arm/uniphier-pinctrl.dtsi stable/12/sys/gnu/dts/arm/uniphier-pro4.dtsi stable/12/sys/gnu/dts/arm/uniphier-pro5.dtsi stable/12/sys/gnu/dts/arm/uniphier-pxs2.dtsi stable/12/sys/gnu/dts/arm/uniphier-sld8.dtsi stable/12/sys/gnu/dts/arm/vf-colibri.dtsi stable/12/sys/gnu/dts/arm/vf500-colibri.dtsi stable/12/sys/gnu/dts/arm/vf610-bk4.dts stable/12/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts stable/12/sys/gnu/dts/arm/vf610-zii-scu4-aib.dts stable/12/sys/gnu/dts/arm/zynq-7000.dtsi stable/12/sys/gnu/dts/arm64/actions/s900-bubblegum-96.dts stable/12/sys/gnu/dts/arm64/actions/s900.dtsi stable/12/sys/gnu/dts/arm64/allwinner/axp803.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-amarula-relic.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-bananapi-m64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-nanopi-a64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-orangepi-win.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64-lts.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64-plus.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pinebook.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine-baseboard.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-teres-i.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-emlid-neutis-n5.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-libretech-all-h3-cc.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-nanopi-neo-plus2.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-nanopi-neo2.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-orangepi-pc2.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-orangepi-prime.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-orangepi-zero-plus.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5-orangepi-zero-plus2.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h5.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-lite2.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-one-plus.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6.dtsi stable/12/sys/gnu/dts/arm64/altera/socfpga_stratix10.dtsi stable/12/sys/gnu/dts/arm64/altera/socfpga_stratix10_socdk.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-x96-max.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gx-p23x-q20x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gx.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nanopi-k2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-odroidc2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-p20x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-vega-s95.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-p241.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-p212.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-khadas-vim2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-rbox-pro.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-vega-s96.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/arm/fvp-base-revc.dts stable/12/sys/gnu/dts/arm64/arm/juno-base.dtsi stable/12/sys/gnu/dts/arm64/arm/juno-clocks.dtsi stable/12/sys/gnu/dts/arm64/bitmain/bm1880-sophon-edge.dts stable/12/sys/gnu/dts/arm64/bitmain/bm1880.dtsi stable/12/sys/gnu/dts/arm64/exynos/exynos5433-tm2-common.dtsi stable/12/sys/gnu/dts/arm64/exynos/exynos5433-tm2.dts stable/12/sys/gnu/dts/arm64/exynos/exynos5433-tm2e.dts stable/12/sys/gnu/dts/arm64/exynos/exynos5433.dtsi stable/12/sys/gnu/dts/arm64/exynos/exynos7-espresso.dts stable/12/sys/gnu/dts/arm64/exynos/exynos7.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1043-post.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1043a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls208xa-rdb.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls208xa.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mm-pinfunc.h stable/12/sys/gnu/dts/arm64/freescale/imx8mm.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mn.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-rmb3.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-zest.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-mek.dts stable/12/sys/gnu/dts/arm64/freescale/imx8qxp.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hi3798cv200-poplar.dts stable/12/sys/gnu/dts/arm64/hisilicon/hi3798cv200.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hi6220.dtsi stable/12/sys/gnu/dts/arm64/intel/socfpga_agilex.dtsi stable/12/sys/gnu/dts/arm64/intel/socfpga_agilex_socdk.dts stable/12/sys/gnu/dts/arm64/lg/lg1312.dtsi stable/12/sys/gnu/dts/arm64/lg/lg1313.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/marvell/armada-3720-uDPU.dts stable/12/sys/gnu/dts/arm64/marvell/armada-70x0.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-8040-clearfog-gt-8k.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-mcbin.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-80x0.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806-dual.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806-quad.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-common.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-cp110.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt8173.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt8183.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra132.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra186-p2771-0000.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra186-p3310.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra186.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2888.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2972-0000.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra194.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p2180.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p2597.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p3450-0000.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra210.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8016-sbc-pmic-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8016-sbc.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8096-db820c.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8916.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8998-mtp.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8004.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8916.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8994.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404-evb.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/qcom/sm8150.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/realtek/rtd1295-zidoo-x9s.dts stable/12/sys/gnu/dts/arm64/realtek/rtd1295.dtsi stable/12/sys/gnu/dts/arm64/realtek/rtd129x.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m-ex.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-cat874.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774c0.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77965.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77970.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77980.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77990-ebisu.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77990.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77995.dtsi stable/12/sys/gnu/dts/arm64/renesas/salvator-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/ulcb.dtsi stable/12/sys/gnu/dts/arm64/rockchip/px30-evb.dts stable/12/sys/gnu/dts/arm64/rockchip/px30.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3328-roc-cc.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3368-lion-haikou.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-firefly.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-bob.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-kevin.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-scarlet.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-hugsun-x99.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopc-t4.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopi4.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-orangepi.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-puma.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rock-pi-4.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rock960.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-sapphire-excavator.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399.dtsi stable/12/sys/gnu/dts/arm64/socionext/uniphier-ld11.dtsi stable/12/sys/gnu/dts/arm64/socionext/uniphier-ld20.dtsi stable/12/sys/gnu/dts/arm64/socionext/uniphier-pxs3.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-mcu.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am654-base-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-mcu-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-som-p0.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e.dtsi stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1232-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1254-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1275-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu100-revC.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu102-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu102-revB.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu104-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu106-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp-zcu111-revA.dts stable/12/sys/gnu/dts/arm64/xilinx/zynqmp.dtsi stable/12/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx7ulp-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mm-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mq-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/marvell,mmp2.h stable/12/sys/gnu/dts/include/dt-bindings/clock/omap4.h stable/12/sys/gnu/dts/include/dt-bindings/clock/omap5.h stable/12/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8998.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun50i-a64-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun6i-a31-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-a23-a33-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-h3-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h stable/12/sys/gnu/dts/include/dt-bindings/clock/tegra210-car.h stable/12/sys/gnu/dts/include/dt-bindings/iio/adc/ingenic,adc.h stable/12/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h stable/12/sys/gnu/dts/include/dt-bindings/memory/tegra186-mc.h stable/12/sys/gnu/dts/include/dt-bindings/phy/phy.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h stable/12/sys/gnu/dts/include/dt-bindings/power/qcom-rpmpd.h stable/12/sys/gnu/dts/include/dt-bindings/reset-controller/mt8183-resets.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-reset.h stable/12/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h stable/12/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h stable/12/sys/gnu/dts/riscv/sifive/fu540-c000.dtsi (contents, props changed) stable/12/sys/gnu/dts/riscv/sifive/hifive-unleashed-a00.dts (contents, props changed) stable/12/sys/modules/dtb/allwinner/Makefile Directory Properties: stable/12/ (props changed) stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx7d-zii-rmu2.dts (props changed) stable/12/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts (props changed) stable/12/sys/gnu/dts/arm/mt7629-rfb.dts (props changed) stable/12/sys/gnu/dts/arm/mt7629.dtsi (props changed) stable/12/sys/gnu/dts/arm/rk3229-xms6.dts (props changed) stable/12/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts (props changed) stable/12/sys/gnu/dts/arm/sun8i-v3.dtsi (props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi (props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi (props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi (props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts (props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts (props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts (props changed) stable/12/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts (props changed) stable/12/sys/gnu/dts/arm64/qcom/pm8150.dtsi (props changed) stable/12/sys/gnu/dts/arm64/qcom/pm8150b.dtsi (props changed) stable/12/sys/gnu/dts/arm64/qcom/pm8150l.dtsi (props changed) stable/12/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts (props changed) stable/12/sys/gnu/dts/include/dt-bindings/bus/moxtet.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h (props changed) Modified: stable/12/UPDATING ============================================================================== --- stable/12/UPDATING Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/UPDATING Fri Jun 19 18:43:02 2020 (r362408) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20200414: + Upstream DTS from Linux 5.6 was merged and they now have the SID + and THS (Secure ID controller and THermal Sensor) node present. + The DTB overlays have now been removed from the tree for the H3/H5 and + A64 SoCs and the aw_sid and aw_thermal driver have been updated to + deal with upstream DTS. If you are using those overlays you need to + remove them from loader.conf and update the DTBs on the FAT partition. + 20200501: Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have been upgraded to 10.0.0. Please see the 20141231 entry below for Modified: stable/12/release/arm64/PINE64-LTS.conf ============================================================================== --- stable/12/release/arm64/PINE64-LTS.conf Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/release/arm64/PINE64-LTS.conf Fri Jun 19 18:43:02 2020 (r362408) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64-LTS" arm_install_uboot() { Modified: stable/12/release/arm64/PINE64.conf ============================================================================== --- stable/12/release/arm64/PINE64.conf Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/release/arm64/PINE64.conf Fri Jun 19 18:43:02 2020 (r362408) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64" arm_install_uboot() { Modified: stable/12/release/arm64/PINEBOOK.conf ============================================================================== --- stable/12/release/arm64/PINEBOOK.conf Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/release/arm64/PINEBOOK.conf Fri Jun 19 18:43:02 2020 (r362408) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINEBOOK" arm_install_uboot() { Modified: stable/12/sys/arm/allwinner/aw_sid.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_sid.c Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/arm/allwinner/aw_sid.c Fri Jun 19 18:43:02 2020 (r362408) @@ -101,11 +101,11 @@ static struct aw_sid_efuse a64_efuses[] = { .public = true, }, { - .name = "ths-calib", + .name = "calibration", .desc = "Thermal Sensor Calibration Data", .base = EFUSE_OFFSET, .offset = 0x34, - .size = 6, + .size = 8, .id = AW_SID_FUSE_THSSENSOR, .public = true, }, @@ -122,7 +122,7 @@ static struct aw_sid_efuse a83t_efuses[] = { .public = true, }, { - .name = "ths-calib", + .name = "calibration", .desc = "Thermal Sensor Calibration Data", .base = EFUSE_OFFSET, .offset = 0x34, @@ -143,11 +143,11 @@ static struct aw_sid_efuse h3_efuses[] = { .public = true, }, { - .name = "ths-calib", + .name = "calibration", .desc = "Thermal Sensor Calibration Data", .base = EFUSE_OFFSET, .offset = 0x34, - .size = 2, + .size = 4, .id = AW_SID_FUSE_THSSENSOR, .public = false, }, @@ -164,7 +164,7 @@ static struct aw_sid_efuse h5_efuses[] = { .public = true, }, { - .name = "ths-calib", + .name = "calibration", .desc = "Thermal Sensor Calibration Data", .base = EFUSE_OFFSET, .offset = 0x34, @@ -351,8 +351,7 @@ aw_sid_read(device_t dev, uint32_t offset, uint32_t si sc = device_get_softc(dev); for (i = 0; i < sc->sid_conf->nfuses; i++) - if (offset == (sc->sid_conf->efuses[i].base + - sc->sid_conf->efuses[i].offset)) { + if (offset == sc->sid_conf->efuses[i].offset) { fuse_id = sc->sid_conf->efuses[i].id; break; } Modified: stable/12/sys/arm/allwinner/aw_thermal.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_thermal.c Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/arm/allwinner/aw_thermal.c Fri Jun 19 18:43:02 2020 (r362408) @@ -267,7 +267,7 @@ static const struct aw_thermal_config h3_config = { .thermal_per = H3_THERMAL_PER, .to_temp = h3_to_temp, .to_reg = h3_to_reg, - .calib0_mask = 0xffff, + .calib0_mask = 0xffffffff, }; static int @@ -387,12 +387,12 @@ aw_thermal_init(struct aw_thermal_softc *sc) int error; node = ofw_bus_get_node(sc->dev); - if (nvmem_get_cell_len(node, "ths-calib") > sizeof(calib)) { - device_printf(sc->dev, "ths-calib nvmem cell is too large\n"); + if (nvmem_get_cell_len(node, "calibration") > sizeof(calib)) { + device_printf(sc->dev, "calibration nvmem cell is too large\n"); return (ENXIO); } - error = nvmem_read_cell_by_name(node, "ths-calib", - (void *)&calib, nvmem_get_cell_len(node, "ths-calib")); + error = nvmem_read_cell_by_name(node, "calibration", + (void *)&calib, nvmem_get_cell_len(node, "calibration")); /* Read calibration settings from EFUSE */ if (error != 0) { device_printf(sc->dev, "Cannot read THS efuse\n"); @@ -624,7 +624,7 @@ aw_thermal_attach(device_t dev) return (ENXIO); } - if (clk_get_by_ofw_name(dev, 0, "apb", &sc->clk_apb) == 0) { + if (clk_get_by_ofw_name(dev, 0, "bus", &sc->clk_apb) == 0) { error = clk_enable(sc->clk_apb); if (error != 0) { device_printf(dev, "cannot enable apb clock\n"); @@ -632,7 +632,7 @@ aw_thermal_attach(device_t dev) } } - if (clk_get_by_ofw_name(dev, 0, "ths", &sc->clk_ths) == 0) { + if (clk_get_by_ofw_name(dev, 0, "mod", &sc->clk_ths) == 0) { error = clk_set_freq(sc->clk_ths, sc->conf->clk_rate, 0); if (error != 0) { device_printf(dev, "cannot set ths clock rate\n"); Modified: stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi Fri Jun 19 18:43:02 2020 (r362408) @@ -258,18 +258,6 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&cppi41dma { - status = "okay"; -}; - #include "tps65910.dtsi" &tps { Modified: stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Jun 19 18:43:02 2020 (r362408) @@ -191,36 +191,14 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "peripheral"; interrupts-extended = <&intc 18 &tps 0>; interrupt-names = "mc", "vbus"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c0 { Modified: stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Jun 19 18:43:02 2020 (r362408) @@ -131,6 +131,11 @@ }; / { + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; /* 512 MB */ + }; + clk_mcasp0_fixed: clk_mcasp0_fixed { #clock-cells = <0>; compatible = "fixed-clock"; Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -278,36 +278,14 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "peripheral"; interrupts-extended = <&intc 18 &tps 0>; interrupt-names = "mc", "vbus"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c0 { Modified: stable/12/sys/gnu/dts/arm/am335x-chiliboard.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -153,28 +153,10 @@ }; /* USB */ -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb1 { pinctrl-names = "default"; pinctrl-0 = <&usb1_drvvbus>; - - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; /* microSD */ Modified: stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -330,26 +330,6 @@ status = "okay"; }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&cppi41dma { - status = "okay"; -}; - &epwmss0 { status = "okay"; Modified: stable/12/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-evm.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-evm.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -113,7 +113,7 @@ }; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; pwms = <&ecap0 0 50000 0>; brightness-levels = <0 51 53 56 62 75 101 152 255>; @@ -121,35 +121,15 @@ }; panel { - compatible = "ti,tilcdc,panel"; - status = "okay"; + compatible = "tfc,s9700rtwv43tr-01b"; + pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; - panel-info { - ac-bias = <255>; - ac-bias-intrpt = <0>; - dma-burst-sz = <16>; - bpp = <32>; - fdd = <0x80>; - sync-edge = <0>; - sync-ctrl = <1>; - raster-order = <0>; - fifo-th = <0>; - }; + backlight = <&backlight>; - display-timings { - 800x480p62 { - clock-frequency = <30000000>; - hactive = <800>; - vactive = <480>; - hfront-porch = <39>; - hback-porch = <39>; - hsync-len = <47>; - vback-porch = <29>; - vfront-porch = <13>; - vsync-len = <2>; - hsync-active = <1>; - vsync-active = <1>; + port { + panel_0: endpoint@0 { + remote-endpoint = <&lcdc_0>; }; }; }; @@ -433,35 +413,10 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; }; -&cppi41dma { - status = "okay"; -}; - &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; @@ -525,6 +480,12 @@ status = "okay"; blue-and-red-wiring = "crossed"; + + port { + lcdc_0: endpoint@0 { + remote-endpoint = <&panel_0>; + }; + }; }; &elm { Modified: stable/12/sys/gnu/dts/arm/am335x-evmsk.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-evmsk.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-evmsk.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -183,36 +183,16 @@ }; panel { - compatible = "ti,tilcdc,panel"; + compatible = "newhaven,nhd-4.3-480272ef-atxl"; + pinctrl-names = "default", "sleep"; pinctrl-0 = <&lcd_pins_default>; pinctrl-1 = <&lcd_pins_sleep>; backlight = <&lcd_bl>; - status = "okay"; - panel-info { - ac-bias = <255>; - ac-bias-intrpt = <0>; - dma-burst-sz = <16>; - bpp = <32>; - fdd = <0x80>; - sync-edge = <0>; - sync-ctrl = <1>; - raster-order = <0>; - fifo-th = <0>; - }; - display-timings { - 480x272 { - hactive = <480>; - vactive = <272>; - hback-porch = <43>; - hfront-porch = <8>; - hsync-len = <4>; - vback-porch = <12>; - vfront-porch = <4>; - vsync-len = <10>; - clock-frequency = <9000000>; - hsync-active = <0>; - vsync-active = <0>; + + port { + panel_0: endpoint@0 { + remote-endpoint = <&lcdc_0>; }; }; }; @@ -523,35 +503,10 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; }; -&cppi41dma { - status = "okay"; -}; - &epwmss2 { status = "okay"; @@ -750,6 +705,12 @@ status = "okay"; blue-and-red-wiring = "crossed"; + + port { + lcdc_0: endpoint@0 { + remote-endpoint = <&panel_0>; + }; + }; }; &rtc { Modified: stable/12/sys/gnu/dts/arm/am335x-guardian.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-guardian.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-guardian.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -115,10 +115,6 @@ }; }; -&cppi41dma { - status = "okay"; -}; - &elm { status = "okay"; }; @@ -328,30 +324,12 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - &usb0 { dr_mode = "peripheral"; - status = "okay"; }; -&usb0_phy { - status = "okay"; -}; - &usb1 { dr_mode = "host"; - status = "okay"; -}; - -&usb1_phy { - status = "okay"; }; &am33xx_pinmux { Modified: stable/12/sys/gnu/dts/arm/am335x-icev2.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-icev2.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-icev2.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -287,6 +287,19 @@ gpio-controller; #gpio-cells = <2>; }; + + /* osd9616p0899-10 */ + display@3c { + compatible = "solomon,ssd1306fb-i2c"; + reg = <0x3c>; + solomon,height = <16>; + solomon,width = <96>; + solomon,com-seq; + solomon,com-invdir; + solomon,page-offset = <0>; + solomon,prechargep1 = <2>; + solomon,prechargep2 = <13>; + }; }; &spi0 { Modified: stable/12/sys/gnu/dts/arm/am335x-igep0033.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Jun 19 18:43:02 2020 (r362408) @@ -217,33 +217,8 @@ pinctrl-0 = <&uart0_pins>; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; #include "tps65910.dtsi" Modified: stable/12/sys/gnu/dts/arm/am335x-lxm.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-lxm.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-lxm.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -283,34 +283,12 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &cpsw_emac0 { Modified: stable/12/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi Fri Jun 19 18:43:02 2020 (r362408) @@ -111,25 +111,8 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; /* Power */ Modified: stable/12/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Jun 19 18:40:39 2020 (r362407) +++ stable/12/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Jun 19 18:43:02 2020 (r362408) @@ -290,34 +290,12 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; #include "tps65910.dtsi" Copied: stable/12/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts (from r358430, head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts Fri Jun 19 18:43:02 2020 (r362408, copy of r358430, head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts) @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" + +/ { + model = "NetCAN"; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + compatible = "gpio-leds"; + + led@1 { + label = "can_data"; + linux,default-trigger = "netdev"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + led@2 { + label = "can_error"; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* CAN Data LED */ + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* CAN Error LED */ + >; + }; + + dcan1_pins: pinmux_dcan1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* CAN TX */ + AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT, MUX_MODE2) /* CAN RX */ + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&davinci_mdio { + phy0: ethernet-phy@0 { + reg = <1>; + }; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + phy-handle = <&phy0>; +}; + +&cpsw_emac1 { + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + phy-handle = <&phy1>; +}; + +&dcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&dcan1_pins>; + + status = "okay"; +}; Copied: stable/12/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts (from r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts Fri Jun 19 18:43:02 2020 (r362408, copy of r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts) @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" + +/ { + model = "NetCom Plus"; +}; + +&am33xx_pinmux { + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) /* RX */ + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) /* TX */ + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) /* CTS */ + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* RTS */ + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* DTR */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DSR */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DCD */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* RI */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT, MUX_MODE1) /* RX */ + AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT, MUX_MODE1) /* TX */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLDOWN, MUX_MODE2) /* CTS */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* RTS */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* DTR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DSR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DCD */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* RI */ + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&davinci_mdio { + phy0: ethernet-phy@0 { + reg = <1>; + }; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + phy-handle = <&phy0>; +}; + +&cpsw_emac1 { + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + phy-handle = <&phy1>; +}; Copied: stable/12/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts (from r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts Fri Jun 19 18:43:02 2020 (r362408, copy of r358430, head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts) @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "NetCom Plus"; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&dip_switches>; + + dip_switches: pinmux_dip_switches { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) + >; + }; + + tca6416_pins: pinmux_tca6416_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE7) + >; + }; + + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE3) + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLDOWN, MUX_MODE3) + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&i2c1 { + tca6416a: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <20 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&tca6416_pins>; + }; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + status = "okay"; + clock-frequency = <400000>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:53:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 152433367B4; Fri, 19 Jun 2020 18:53:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pScr6tchz4fVb; Fri, 19 Jun 2020 18:53:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC5BC1F770; Fri, 19 Jun 2020 18:53:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIrWK2081200; Fri, 19 Jun 2020 18:53:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIrWxe081199; Fri, 19 Jun 2020 18:53:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191853.05JIrWxe081199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362410 - stable/12/sys/arm64/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip X-SVN-Commit-Revision: 362410 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:53:33 -0000 Author: manu Date: Fri Jun 19 18:53:32 2020 New Revision: 362410 URL: https://svnweb.freebsd.org/changeset/base/362410 Log: MFC r360228: arm64: rockchip: Fix TSADC on RK3328 The TSADC familiy is a little bit more complex than V2 and V3. Early revision do not use syscon and do not use qsel (RK3288). Next revision still do not use syscon but uses qsel (RK3328). Final revision use both. Submitted by: peterj Modified: stable/12/sys/arm64/rockchip/rk_tsadc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/rk_tsadc.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_tsadc.c Fri Jun 19 18:43:13 2020 (r362409) +++ stable/12/sys/arm64/rockchip/rk_tsadc.c Fri Jun 19 18:53:32 2020 (r362410) @@ -98,24 +98,19 @@ struct tsensor { int channel; }; -enum tsadc_type { - RK_TSADC_V2, - RK_TSADC_V3 -}; - struct rk_calib_entry { uint32_t raw; int temp; }; struct tsadc_calib_info { - bool decrement_mode; struct rk_calib_entry *table; int nentries; }; struct tsadc_conf { - enum tsadc_type type; + int use_syscon; + int q_sel_ntc; int shutdown_temp; int shutdown_mode; int shutdown_pol; @@ -188,7 +183,8 @@ struct tsensor rk3288_tsensors[] = { }; struct tsadc_conf rk3288_tsadc_conf = { - .type = RK_TSADC_V2, + .use_syscon = 0, + .q_sel_ntc = 0, .shutdown_temp = 95000, .shutdown_mode = 1, /* GPIO */ .shutdown_pol = 0, /* Low */ @@ -241,7 +237,8 @@ static struct tsensor rk3328_tsensors[] = { }; static struct tsadc_conf rk3328_tsadc_conf = { - .type = RK_TSADC_V3, + .use_syscon = 0, + .q_sel_ntc = 1, .shutdown_temp = 95000, .shutdown_mode = 0, /* CRU */ .shutdown_pol = 0, /* Low */ @@ -296,7 +293,8 @@ static struct tsensor rk3399_tsensors[] = { }; static struct tsadc_conf rk3399_tsadc_conf = { - .type = RK_TSADC_V3, + .use_syscon = 1, + .q_sel_ntc = 1, .shutdown_temp = 95000, .shutdown_mode = 1, /* GPIO */ .shutdown_pol = 0, /* Low */ @@ -444,11 +442,11 @@ tsadc_init(struct tsadc_softc *sc) val |= TSADC_AUTO_CON_POL_HI; else val &= ~TSADC_AUTO_CON_POL_HI; - if (sc->conf->type == RK_TSADC_V3) + if (sc->conf->q_sel_ntc) val |= TSADC_AUTO_Q_SEL; WR4(sc, TSADC_AUTO_CON, val); - if (sc->conf->type == RK_TSADC_V2) { + if (!sc->conf->use_syscon) { /* V2 init */ WR4(sc, TSADC_AUTO_PERIOD, 250); /* 250 ms */ WR4(sc, TSADC_AUTO_PERIOD_HT, 50); /* 50 ms */ From owner-svn-src-stable-12@freebsd.org Fri Jun 19 18:54:56 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D23C3367C0; Fri, 19 Jun 2020 18:54:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pSfS0qjgz4ftX; Fri, 19 Jun 2020 18:54:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 179A01FB3D; Fri, 19 Jun 2020 18:54:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JIstMK081435; Fri, 19 Jun 2020 18:54:55 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JIstQ0081434; Fri, 19 Jun 2020 18:54:55 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191854.05JIstQ0081434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 18:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362411 - stable/12/sys/arm64/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip X-SVN-Commit-Revision: 362411 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 18:54:56 -0000 Author: manu Date: Fri Jun 19 18:54:55 2020 New Revision: 362411 URL: https://svnweb.freebsd.org/changeset/base/362411 Log: MFC r360311: arm64: rockchip: rk805: Use a tailq for the attached regulator Store the attached regulator in a tailq to later find them in ofw_map. While here, do not attempt to attach a regulator without a name, a node might exists but if it doesn't have a name the regulator is unused. Modified: stable/12/sys/arm64/rockchip/rk805.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Fri Jun 19 18:53:32 2020 (r362410) +++ stable/12/sys/arm64/rockchip/rk805.c Fri Jun 19 18:54:55 2020 (r362411) @@ -86,6 +86,11 @@ struct rk805_reg_sc { struct regnode_std_param *param; }; +struct reg_list { + TAILQ_ENTRY(reg_list) next; + struct rk805_reg_sc *reg; +}; + struct rk805_softc { device_t dev; struct mtx mtx; @@ -94,7 +99,7 @@ struct rk805_softc { struct intr_config_hook intr_hook; enum rk_pmic_type type; - struct rk805_reg_sc **regs; + TAILQ_HEAD(, reg_list) regs; int nregs; }; @@ -620,6 +625,7 @@ rk805_attach(device_t dev) struct rk805_softc *sc; struct rk805_reg_sc *reg; struct rk805_regdef *regdefs; + struct reg_list *regp; phandle_t rnode, child; int i; @@ -646,8 +652,7 @@ rk805_attach(device_t dev) return (ENXIO); } - sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, - M_RK805_REG, M_WAITOK | M_ZERO); + TAILQ_INIT(&sc->regs); rnode = ofw_bus_find_child(ofw_bus_get_node(dev), "regulators"); if (rnode > 0) { @@ -656,6 +661,8 @@ rk805_attach(device_t dev) regdefs[i].name); if (child == 0) continue; + if (OF_hasprop(child, "regulator-name") != 1) + continue; reg = rk805_reg_attach(dev, child, ®defs[i]); if (reg == NULL) { device_printf(dev, @@ -663,7 +670,9 @@ rk805_attach(device_t dev) regdefs[i].name); continue; } - sc->regs[i] = reg; + regp = malloc(sizeof(*regp), M_DEVBUF, M_WAITOK | M_ZERO); + regp->reg = reg; + TAILQ_INSERT_TAIL(&sc->regs, regp, next); if (bootverbose) device_printf(dev, "Regulator %s attached\n", regdefs[i].name); @@ -686,13 +695,13 @@ rk805_map(device_t dev, phandle_t xref, int ncells, pcell_t *cells, intptr_t *id) { struct rk805_softc *sc; - int i; + struct reg_list *regp; sc = device_get_softc(dev); - for (i = 0; i < sc->nregs; i++) { - if (sc->regs[i]->xref == xref) { - *id = sc->regs[i]->def->id; + TAILQ_FOREACH(regp, &sc->regs, next) { + if (regp->reg->xref == xref) { + *id = regp->reg->def->id; return (0); } } From owner-svn-src-stable-12@freebsd.org Fri Jun 19 19:24:37 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C49B63371B4; Fri, 19 Jun 2020 19:24:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pTJj4rlYz3SfK; Fri, 19 Jun 2020 19:24:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D90D20384; Fri, 19 Jun 2020 19:24:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JJOb4u000279; Fri, 19 Jun 2020 19:24:37 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JJObYU000277; Fri, 19 Jun 2020 19:24:37 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191924.05JJObYU000277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 19:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362413 - in stable/12/release: arm64 tools X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/release: arm64 tools X-SVN-Commit-Revision: 362413 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 19:24:37 -0000 Author: manu Date: Fri Jun 19 19:24:36 2020 New Revision: 362413 URL: https://svnweb.freebsd.org/changeset/base/362413 Log: MFC r360271-r360272, r360321 r360271: Add support for generating release images using GPT for ARM Submitted by: Daniel Engberg (Original version) Differential Revision: https://reviews.freebsd.org/D22537 r360272: Add PINE64 ROCKPro64 config for generation of release images Submitted by: Daniel Engberg Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D22538 r360321: release: arm64: rockpro64: Set hw.ncpu to 4 Since there is known issue with big.LITTLE set the number of CPU to 4 which is the number present in the LITTLE cluster. Added: stable/12/release/arm64/ROCKPRO64.conf - copied, changed from r360272, head/release/arm64/ROCKPRO64.conf Modified: stable/12/release/tools/arm.subr Directory Properties: stable/12/ (props changed) Copied and modified: stable/12/release/arm64/ROCKPRO64.conf (from r360272, head/release/arm64/ROCKPRO64.conf) ============================================================================== --- head/release/arm64/ROCKPRO64.conf Fri Apr 24 16:32:25 2020 (r360272, copy source) +++ stable/12/release/arm64/ROCKPRO64.conf Fri Jun 19 19:24:36 2020 (r362413) @@ -26,3 +26,10 @@ arm_install_uboot() { of=/dev/${mddev} bs=512 seek=16384 conv=sync return 0 } + +arm_do_quirk() { + echo '# Known issue with big.LITTLE' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf + echo 'hw.ncpu=4' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf +} Modified: stable/12/release/tools/arm.subr ============================================================================== --- stable/12/release/tools/arm.subr Fri Jun 19 19:16:25 2020 (r362412) +++ stable/12/release/tools/arm.subr Fri Jun 19 19:24:36 2020 (r362413) @@ -65,13 +65,21 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} - chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} - chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 - chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} - chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 - chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 - chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 + chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} + chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + fi return 0 } @@ -161,7 +169,12 @@ arm_setup_minimal_loader() { } arm_install_base() { - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + fi eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ TARGET=${EMBEDDED_TARGET} \ TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ @@ -178,10 +191,18 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/ufs/rootfs / ufs rw 1 1" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + if [ "${PART_SCHEME}" == "GPT" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/efi /boot/efi msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi echo "tmpfs /tmp tmpfs rw,mode=1777,size=50m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab @@ -206,8 +227,17 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + if [ "${PART_SCHEME}" == "GPT" ]; then + dospart="/dev/${mddev}p1" + ufspart="/dev/${mddev}p2" + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + dospart="/dev/${mddev}s1" + ufspart="/dev/${mddev}s2a" + fi + + chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} + chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} if [ "${EMBEDDED_TARGET}" == "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ From owner-svn-src-stable-12@freebsd.org Fri Jun 19 19:25:48 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 140D4337336; Fri, 19 Jun 2020 19:25:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pTL36lzkz3SZd; Fri, 19 Jun 2020 19:25:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E34C320026; Fri, 19 Jun 2020 19:25:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JJPl0A000404; Fri, 19 Jun 2020 19:25:47 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JJPlP6000402; Fri, 19 Jun 2020 19:25:47 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191925.05JJPlP6000402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 19:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362414 - in stable/12/release: . tools X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/release: . tools X-SVN-Commit-Revision: 362414 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 19:25:48 -0000 Author: manu Date: Fri Jun 19 19:25:47 2020 New Revision: 362414 URL: https://svnweb.freebsd.org/changeset/base/362414 Log: MFC r361980, r362010 r361980: release: amd64 efi boot name is bootx64 efi_boot_name is just used for arm image so no harm done. Reported by: gonzo r362010: release: Fix arm GPT image msdosfs labels are capitalized, use EFI instead of efi. Modified: stable/12/release/release.sh stable/12/release/tools/arm.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/release/release.sh ============================================================================== --- stable/12/release/release.sh Fri Jun 19 19:24:36 2020 (r362413) +++ stable/12/release/release.sh Fri Jun 19 19:25:47 2020 (r362414) @@ -368,7 +368,7 @@ efi_boot_name() echo "bootaa64.efi" ;; amd64) - echo "bootx86.efi" + echo "bootx64.efi" ;; esac } Modified: stable/12/release/tools/arm.subr ============================================================================== --- stable/12/release/tools/arm.subr Fri Jun 19 19:24:36 2020 (r362413) +++ stable/12/release/tools/arm.subr Fri Jun 19 19:25:47 2020 (r362414) @@ -194,7 +194,7 @@ arm_install_base() { if [ "${PART_SCHEME}" == "GPT" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/msdosfs/efi /boot/efi msdosfs rw,noatime 0 0" \ + echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab fi if [ "${PART_SCHEME}" == "MBR" ]; then From owner-svn-src-stable-12@freebsd.org Fri Jun 19 19:33:19 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C68753376AD; Fri, 19 Jun 2020 19:33:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pTVl4dxqz3TkR; Fri, 19 Jun 2020 19:33:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A7882050B; Fri, 19 Jun 2020 19:33:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05JJXJiw006797; Fri, 19 Jun 2020 19:33:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05JJXJkj006796; Fri, 19 Jun 2020 19:33:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202006191933.05JJXJkj006796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 19 Jun 2020 19:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362417 - stable/12/sys/dev/cpufreq X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/cpufreq X-SVN-Commit-Revision: 362417 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 19:33:19 -0000 Author: manu Date: Fri Jun 19 19:33:19 2020 New Revision: 362417 URL: https://svnweb.freebsd.org/changeset/base/362417 Log: MFC r361964: coufreq_dt: Rename DEBUG to DPRINTF DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the build of kernel. PR: 246867 Submitted by: Oskar Holmund (oskar.holmlund@ohdata.se) Differential Revision: https://reviews.freebsd.org/D25080 Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- stable/12/sys/dev/cpufreq/cpufreq_dt.c Fri Jun 19 19:33:06 2020 (r362416) +++ stable/12/sys/dev/cpufreq/cpufreq_dt.c Fri Jun 19 19:33:19 2020 (r362417) @@ -53,9 +53,9 @@ __FBSDID("$FreeBSD$"); #include "cpufreq_if.h" #if 0 -#define DEBUG(dev, msg...) device_printf(dev, "cpufreq_dt: " msg); +#define DPRINTF(dev, msg...) device_printf(dev, "cpufreq_dt: " msg); #else -#define DEBUG(dev, msg...) +#define DPRINTF(dev, msg...) #endif enum opp_version { @@ -111,12 +111,12 @@ cpufreq_dt_find_opp(device_t dev, uint64_t freq) sc = device_get_softc(dev); - DEBUG(dev, "Looking for freq %ju\n", freq); + DPRINTF(dev, "Looking for freq %ju\n", freq); for (n = 0; n < sc->nopp; n++) if (CPUFREQ_CMP(sc->opp[n].freq, freq)) return (&sc->opp[n]); - DEBUG(dev, "Couldn't find one\n"); + DPRINTF(dev, "Couldn't find one\n"); return (NULL); } @@ -145,7 +145,7 @@ cpufreq_dt_get(device_t dev, struct cf_setting *set) sc = device_get_softc(dev); - DEBUG(dev, "cpufreq_dt_get\n"); + DPRINTF(dev, "cpufreq_dt_get\n"); if (clk_get_freq(sc->clk, &freq) != 0) return (ENXIO); @@ -157,7 +157,7 @@ cpufreq_dt_get(device_t dev, struct cf_setting *set) cpufreq_dt_opp_to_setting(dev, opp, set); - DEBUG(dev, "Current freq %dMhz\n", set->freq); + DPRINTF(dev, "Current freq %dMhz\n", set->freq); return (0); } @@ -171,10 +171,10 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * sc = device_get_softc(dev); - DEBUG(dev, "Working on cpu %d\n", sc->cpu); - DEBUG(dev, "We have %d cpu on this dev\n", CPU_COUNT(&sc->cpus)); + DPRINTF(dev, "Working on cpu %d\n", sc->cpu); + DPRINTF(dev, "We have %d cpu on this dev\n", CPU_COUNT(&sc->cpus)); if (!CPU_ISSET(sc->cpu, &sc->cpus)) { - DEBUG(dev, "Not for this CPU\n"); + DPRINTF(dev, "Not for this CPU\n"); return (0); } @@ -206,26 +206,26 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * device_printf(dev, "Couldn't find an opp for this freq\n"); return (EINVAL); } - DEBUG(sc->dev, "Current freq %ju, uvolt: %d\n", freq, uvolt); - DEBUG(sc->dev, "Target freq %ju, , uvolt: %d\n", + DPRINTF(sc->dev, "Current freq %ju, uvolt: %d\n", freq, uvolt); + DPRINTF(sc->dev, "Target freq %ju, , uvolt: %d\n", opp->freq, opp->uvolt_target); if (uvolt < opp->uvolt_target) { - DEBUG(dev, "Changing regulator from %u to %u\n", + DPRINTF(dev, "Changing regulator from %u to %u\n", uvolt, opp->uvolt_target); error = regulator_set_voltage(sc->reg, opp->uvolt_min, opp->uvolt_max); if (error != 0) { - DEBUG(dev, "Failed, backout\n"); + DPRINTF(dev, "Failed, backout\n"); return (ENXIO); } } - DEBUG(dev, "Setting clk to %ju\n", opp->freq); + DPRINTF(dev, "Setting clk to %ju\n", opp->freq); error = clk_set_freq(sc->clk, opp->freq, CLK_SET_ROUND_DOWN); if (error != 0) { - DEBUG(dev, "Failed, backout\n"); + DPRINTF(dev, "Failed, backout\n"); /* Restore previous voltage (best effort) */ error = regulator_set_voltage(sc->reg, copp->uvolt_min, @@ -234,13 +234,13 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * } if (uvolt > opp->uvolt_target) { - DEBUG(dev, "Changing regulator from %u to %u\n", + DPRINTF(dev, "Changing regulator from %u to %u\n", uvolt, opp->uvolt_target); error = regulator_set_voltage(sc->reg, opp->uvolt_min, opp->uvolt_max); if (error != 0) { - DEBUG(dev, "Failed to switch regulator to %d\n", + DPRINTF(dev, "Failed to switch regulator to %d\n", opp->uvolt_target); /* Restore previous CPU frequency (best effort) */ (void)clk_set_freq(sc->clk, copp->freq, 0); @@ -271,7 +271,7 @@ cpufreq_dt_settings(device_t dev, struct cf_setting *s struct cpufreq_dt_softc *sc; ssize_t n; - DEBUG(dev, "cpufreq_dt_settings\n"); + DPRINTF(dev, "cpufreq_dt_settings\n"); if (sets == NULL || count == NULL) return (EINVAL); @@ -465,7 +465,7 @@ cpufreq_dt_attach(device_t dev) node = ofw_bus_get_node(device_get_parent(dev)); sc->cpu = device_get_unit(device_get_parent(dev)); - DEBUG(dev, "cpu=%d\n", sc->cpu); + DPRINTF(dev, "cpu=%d\n", sc->cpu); if (sc->cpu >= mp_ncpus) { device_printf(dev, "Not attaching as cpu is not present\n"); return (ENXIO); @@ -519,12 +519,12 @@ cpufreq_dt_attach(device_t dev) if (strcmp(device_type, "cpu") != 0) continue; if (cpu == sc->cpu) { - DEBUG(dev, "Skipping our cpu\n"); + DPRINTF(dev, "Skipping our cpu\n"); CPU_SET(cpu, &sc->cpus); cpu++; continue; } - DEBUG(dev, "Testing CPU %d\n", cpu); + DPRINTF(dev, "Testing CPU %d\n", cpu); copp = -1; if (version == OPP_V1) OF_getencprop(cnode, "operating-points", &copp, @@ -533,7 +533,8 @@ cpufreq_dt_attach(device_t dev) OF_getencprop(cnode, "operating-points-v2", &copp, sizeof(copp)); if (opp == copp) { - DEBUG(dev, "CPU %d is using the same opp as this one (%d)\n", cpu, sc->cpu); + DPRINTF(dev, "CPU %d is using the same opp as this one (%d)\n", + cpu, sc->cpu); CPU_SET(cpu, &sc->cpus); } cpu++; From owner-svn-src-stable-12@freebsd.org Sat Jun 20 04:24:01 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C15C8346570; Sat, 20 Jun 2020 04:24:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pjH4058Mz4LWL; Sat, 20 Jun 2020 04:23:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13EE226A76; Sat, 20 Jun 2020 04:23:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05K4NvV9035027; Sat, 20 Jun 2020 04:23:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05K4Nv29035026; Sat, 20 Jun 2020 04:23:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006200423.05K4Nv29035026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 Jun 2020 04:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362423 - stable/12/usr.bin/ldd X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.bin/ldd X-SVN-Commit-Revision: 362423 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 04:24:05 -0000 Author: kib Date: Sat Jun 20 04:23:57 2020 New Revision: 362423 URL: https://svnweb.freebsd.org/changeset/base/362423 Log: MFC r362152: Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen. Modified: stable/12/usr.bin/ldd/ldd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/ldd/ldd.c ============================================================================== --- stable/12/usr.bin/ldd/ldd.c Sat Jun 20 04:19:17 2020 (r362422) +++ stable/12/usr.bin/ldd/ldd.c Sat Jun 20 04:23:57 2020 (r362423) @@ -289,10 +289,18 @@ is_executable(const char *fname, int fd, int *is_shlib #endif Elf_Ehdr elf; } hdr; - int n; + Elf_Phdr phdr, dynphdr; + Elf_Dyn *dynp; + void *dyndata; +#if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) + Elf32_Phdr phdr32, dynphdr32; + Elf32_Dyn *dynp32; +#endif + int df1pie, dynamic, i, n; *is_shlib = 0; *type = TYPE_UNKNOWN; + df1pie = 0; if ((n = read(fd, &hdr, sizeof(hdr))) == -1) { warn("%s: can't read program header", fname); @@ -319,8 +327,6 @@ is_executable(const char *fname, int fd, int *is_shlib if ((size_t)n >= sizeof(hdr.elf32) && IS_ELF(hdr.elf32) && hdr.elf32.e_ident[EI_CLASS] == ELFCLASS32) { /* Handle 32 bit ELF objects */ - Elf32_Phdr phdr; - int dynamic, i; dynamic = 0; *type = TYPE_ELF32; @@ -330,13 +336,14 @@ is_executable(const char *fname, int fd, int *is_shlib return (0); } for (i = 0; i < hdr.elf32.e_phnum; i++) { - if (read(fd, &phdr, hdr.elf32.e_phentsize) != - sizeof(phdr)) { + if (read(fd, &phdr32, hdr.elf32.e_phentsize) != + sizeof(phdr32)) { warnx("%s: can't read program header", fname); return (0); } - if (phdr.p_type == PT_DYNAMIC) { + if (phdr32.p_type == PT_DYNAMIC) { dynamic = 1; + dynphdr32 = phdr32; break; } } @@ -345,9 +352,36 @@ is_executable(const char *fname, int fd, int *is_shlib warnx("%s: not a dynamic ELF executable", fname); return (0); } + if (hdr.elf32.e_type == ET_DYN) { + if (lseek(fd, dynphdr32.p_offset, SEEK_SET) == -1) { + warnx("%s: dynamic segment out of range", + fname); + return (0); + } + dyndata = malloc(dynphdr32.p_filesz); + if (dyndata == NULL) { + warn("malloc"); + return (0); + } + if (read(fd, dyndata, dynphdr32.p_filesz) != + (ssize_t)dynphdr32.p_filesz) { + free(dyndata); + warnx("%s: can't read dynamic segment", fname); + return (0); + } + for (dynp32 = dyndata; dynp32->d_tag != DT_NULL; + dynp32++) { + if (dynp32->d_tag != DT_FLAGS_1) + continue; + df1pie = (dynp32->d_un.d_val & DF_1_PIE) != 0; + break; + } + free(dyndata); + if (hdr.elf32.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { - *is_shlib = 1; + if (!df1pie) + *is_shlib = 1; return (1); } warnx("%s: not a FreeBSD ELF shared object", fname); @@ -361,8 +395,6 @@ is_executable(const char *fname, int fd, int *is_shlib if ((size_t)n >= sizeof(hdr.elf) && IS_ELF(hdr.elf) && hdr.elf.e_ident[EI_CLASS] == ELF_TARG_CLASS) { /* Handle default ELF objects on this architecture */ - Elf_Phdr phdr; - int dynamic, i; dynamic = 0; *type = TYPE_ELF; @@ -379,6 +411,7 @@ is_executable(const char *fname, int fd, int *is_shlib } if (phdr.p_type == PT_DYNAMIC) { dynamic = 1; + dynphdr = phdr; break; } } @@ -387,10 +420,36 @@ is_executable(const char *fname, int fd, int *is_shlib warnx("%s: not a dynamic ELF executable", fname); return (0); } + if (hdr.elf.e_type == ET_DYN) { + if (lseek(fd, dynphdr.p_offset, SEEK_SET) == -1) { + warnx("%s: dynamic segment out of range", + fname); + return (0); + } + dyndata = malloc(dynphdr.p_filesz); + if (dyndata == NULL) { + warn("malloc"); + return (0); + } + if (read(fd, dyndata, dynphdr.p_filesz) != + (ssize_t)dynphdr.p_filesz) { + free(dyndata); + warnx("%s: can't read dynamic segment", fname); + return (0); + } + for (dynp = dyndata; dynp->d_tag != DT_NULL; dynp++) { + if (dynp->d_tag != DT_FLAGS_1) + continue; + df1pie = (dynp->d_un.d_val & DF_1_PIE) != 0; + break; + } + free(dyndata); + switch (hdr.elf.e_ident[EI_OSABI]) { case ELFOSABI_FREEBSD: - *is_shlib = 1; + if (!df1pie) + *is_shlib = 1; return (1); #ifdef __ARM_EABI__ case ELFOSABI_NONE: From owner-svn-src-stable-12@freebsd.org Sat Jun 20 04:26:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5B2A34679A; Sat, 20 Jun 2020 04:26:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pjKV3v5Qz4LlK; Sat, 20 Jun 2020 04:26: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80F8326824; Sat, 20 Jun 2020 04:26:06 +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 05K4Q61t035194; Sat, 20 Jun 2020 04:26:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05K4Q6Ju035193; Sat, 20 Jun 2020 04:26:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006200426.05K4Q6Ju035193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 Jun 2020 04:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362424 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 362424 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 04:26:06 -0000 Author: kib Date: Sat Jun 20 04:26:05 2020 New Revision: 362424 URL: https://svnweb.freebsd.org/changeset/base/362424 Log: MFC r362150: procctl(2): consistently refer to the data pointer as 'data'. Modified: stable/12/lib/libc/sys/procctl.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/procctl.2 ============================================================================== --- stable/12/lib/libc/sys/procctl.2 Sat Jun 20 04:23:57 2020 (r362423) +++ stable/12/lib/libc/sys/procctl.2 Sat Jun 20 04:26:05 2020 (r362424) @@ -40,7 +40,7 @@ .Sh SYNOPSIS .In sys/procctl.h .Ft int -.Fn procctl "idtype_t idtype" "id_t id" "int cmd" "void *arg" +.Fn procctl "idtype_t idtype" "id_t id" "int cmd" "void *data" .Sh DESCRIPTION The .Fn procctl @@ -80,7 +80,7 @@ by in the specified process or its descendants that did not changed the control nor modified it by other means. The -.Va arg +.Fa data parameter must point to the integer variable holding one of the following values: .Bl -tag -width PROC_ASLR_FORCE_DISABLE @@ -99,7 +99,7 @@ Use system-wide configured policy for ASLR. .It Dv PROC_ASLR_STATUS Returns the current status of ASLR enablement for the target process. The -.Va arg +.Fa data parameter must point to the integer variable, where one of the following values is written: .Bl -tag -width PROC_ASLR_FORCE_DISABLE @@ -117,7 +117,7 @@ Set process protection state. This is used to mark a process as protected from being killed if the system exhausts the available memory and swap. The -.Fa arg +.Fa data parameter must point to an integer containing an operation and zero or more optional flags. The following operations are supported: From owner-svn-src-stable-12@freebsd.org Sat Jun 20 04:27:39 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78CBD3463EF; Sat, 20 Jun 2020 04:27:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pjMH28DQz4LvJ; Sat, 20 Jun 2020 04:27:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43C4F268B4; Sat, 20 Jun 2020 04:27:39 +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 05K4Rdx2035320; Sat, 20 Jun 2020 04:27:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05K4RdGU035319; Sat, 20 Jun 2020 04:27:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006200427.05K4RdGU035319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 Jun 2020 04:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362425 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 362425 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 04:27:39 -0000 Author: kib Date: Sat Jun 20 04:27:38 2020 New Revision: 362425 URL: https://svnweb.freebsd.org/changeset/base/362425 Log: MFC r362151: procctl(2): document PROC_KPTI Modified: stable/12/lib/libc/sys/procctl.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/procctl.2 ============================================================================== --- stable/12/lib/libc/sys/procctl.2 Sat Jun 20 04:26:05 2020 (r362424) +++ stable/12/lib/libc/sys/procctl.2 Sat Jun 20 04:27:38 2020 (r362425) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2020 +.Dd June 13, 2020 .Dt PROCCTL 2 .Os .Sh NAME @@ -524,6 +524,47 @@ Stack gaps are disabled in the process after .Xr execve 2 . .El .El +.Sh x86 MACHINE-SPECIFIC REQUESTS +.Bl -tag -width PROC_KPTI_STATUS +.It Dv PROC_KPTI_CTL +AMD64 only. +Controls the Kernel Page Table Isolation (KPTI) option for the children +of the specified process. +For the command to work, the +.Va vm.pmap.kpti +tunable must be enabled on boot. +It is not possible to change the KPTI setting for a running process, +except at the +.Xr execve 2 , +where the address space is reinitialized. +.Pp +The +.Fa data +parameter must point to an integer variable containing one of the +following commands: +.Bl -tag -width PROC_KPTI_CTL_DISABLE_ON_EXEC +.It Dv PROC_KPTI_CTL_ENABLE_ON_EXEC +Enable KPTI after +.Xr execve 2 . +.It Dv PROC_KPTI_CTL_DISABLE_ON_EXEC +Disable KPTI after +.Xr execve 2 . +Only root or a process having the +.Va PRIV_IO +privilege might use this option. +.El +.It Dv PROC_KPTI_STATUS +Returns the current KPTI status for the specified process. +.Fa data must point to the integer variable, which returns the +following statuses: +.Bl -tag -width PROC_KPTI_CTL_DISABLE_ON_EXEC +.It Dv PROC_KPTI_CTL_ENABLE_ON_EXEC +.It Dv PROC_KPTI_CTL_DISABLE_ON_EXEC +.El +.Pp +The status is or-ed with the +.Va PROC_KPTI_STATUS_ACTIVE +in case KPTI is active for the current address space of the process. .Sh NOTES Disabling tracing on a process should not be considered a security feature, as it is bypassable both by the kernel and privileged processes, From owner-svn-src-stable-12@freebsd.org Sat Jun 20 20:10:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F63533358F; Sat, 20 Jun 2020 20:10:44 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49q6HS0YDZz3VYl; Sat, 20 Jun 2020 20:10:44 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C21B117F8; Sat, 20 Jun 2020 20:10:44 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05KKAhTZ018350; Sat, 20 Jun 2020 20:10:43 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05KKAhmJ017599; Sat, 20 Jun 2020 20:10:43 GMT (envelope-from karels@FreeBSD.org) Message-Id: <202006202010.05KKAhmJ017599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Sat, 20 Jun 2020 20:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362446 - in stable/12/sys: netinet netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: karels X-SVN-Commit-Paths: in stable/12/sys: netinet netinet6 X-SVN-Commit-Revision: 362446 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 20:10:44 -0000 Author: karels Date: Sat Jun 20 20:10:42 2020 New Revision: 362446 URL: https://svnweb.freebsd.org/changeset/base/362446 Log: Allow TCP to reuse local port with different destinations MFC r361228, r361231: Previously, tcp_connect() would bind a local port before connecting, forcing the local port to be unique across all outgoing TCP connections for the address family. Instead, choose a local port after selecting the destination and the local address, requiring only that the tuple is unique and does not match a wildcard binding. Note that in_pcb_lport and in_pcb_lport_dest can be called with a NULL local address for IPv6 sockets; handle it. Sponsored by: Forcepoint LLC Modified: stable/12/sys/netinet/in_pcb.c stable/12/sys/netinet/in_pcb.h stable/12/sys/netinet/tcp_usrreq.c stable/12/sys/netinet6/in6_pcb.c stable/12/sys/netinet6/in6_pcb.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/in_pcb.c ============================================================================== --- stable/12/sys/netinet/in_pcb.c Sat Jun 20 20:06:52 2020 (r362445) +++ stable/12/sys/netinet/in_pcb.c Sat Jun 20 20:10:42 2020 (r362446) @@ -591,13 +591,16 @@ in_pcbbind(struct inpcb *inp, struct sockaddr *nam, st } #endif +#if defined(INET) || defined(INET6) /* - * Select a local port (number) to use. + * Assign a local port like in_pcb_lport(), but also used with connect() + * and a foreign address and port. If fsa is non-NULL, choose a local port + * that is unused with those, otherwise one that is completely unused. + * lsa can be NULL for IPv6. */ -#if defined(INET) || defined(INET6) int -in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, - struct ucred *cred, int lookupflags) +in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp, + struct sockaddr *fsa, u_short fport, struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -605,8 +608,11 @@ in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp int count, dorandom, error; u_short aux, first, last, lport; #ifdef INET - struct in_addr laddr; + struct in_addr laddr, faddr; #endif +#ifdef INET6 + struct in6_addr *laddr6, *faddr6; +#endif pcbinfo = inp->inp_pcbinfo; @@ -666,15 +672,25 @@ in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp } #ifdef INET - /* Make the compiler happy. */ - laddr.s_addr = 0; + laddr.s_addr = INADDR_ANY; if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { - KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", - __func__, inp)); - laddr = *laddrp; + if (lsa != NULL) + laddr = ((struct sockaddr_in *)lsa)->sin_addr; + if (fsa != NULL) + faddr = ((struct sockaddr_in *)fsa)->sin_addr; } #endif - tmpinp = NULL; /* Make compiler happy. */ +#ifdef INET6 + laddr6 = NULL; + if ((inp->inp_vflag & INP_IPV6) != 0) { + if (lsa != NULL) + laddr6 = &((struct sockaddr_in6 *)lsa)->sin6_addr; + if (fsa != NULL) + faddr6 = &((struct sockaddr_in6 *)fsa)->sin6_addr; + } +#endif + + tmpinp = NULL; lport = *lportp; if (dorandom) @@ -690,30 +706,62 @@ in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp *lastport = first; lport = htons(*lastport); + if (fsa != NULL) { + +#ifdef INET + if (lsa->sa_family == AF_INET) { + tmpinp = in_pcblookup_hash_locked(pcbinfo, + faddr, fport, laddr, lport, lookupflags, + NULL); + } +#endif #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) - tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, lookupflags, cred); + if (lsa->sa_family == AF_INET6) { + tmpinp = in6_pcblookup_hash_locked(pcbinfo, + faddr6, fport, laddr6, lport, lookupflags, + NULL); + } #endif + } else { +#ifdef INET6 + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, lookupflags, cred); +#endif #if defined(INET) && defined(INET6) - else + else #endif #ifdef INET - tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, lookupflags, cred); + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, lookupflags, cred); #endif + } } while (tmpinp != NULL); -#ifdef INET - if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) - laddrp->s_addr = laddr.s_addr; -#endif *lportp = lport; return (0); } /* + * Select a local port (number) to use. + */ +int +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int lookupflags) +{ + struct sockaddr_in laddr; + + if (laddrp) { + bzero(&laddr, sizeof(laddr)); + laddr.sin_family = AF_INET; + laddr.sin_addr = *laddrp; + } + return (in_pcb_lport_dest(inp, laddrp ? (struct sockaddr *) &laddr : + NULL, lportp, NULL, 0, cred, lookupflags)); +} + +/* * Return cached socket options. */ int @@ -1327,16 +1375,26 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr if (error) return (error); } - oinp = in_pcblookup_hash_locked(inp->inp_pcbinfo, faddr, fport, - laddr, lport, 0, NULL); - if (oinp != NULL) { - if (oinpp != NULL) - *oinpp = oinp; - return (EADDRINUSE); - } - if (lport == 0) { - error = in_pcbbind_setup(inp, NULL, &laddr.s_addr, &lport, - cred); + if (lport != 0) { + oinp = in_pcblookup_hash_locked(inp->inp_pcbinfo, faddr, + fport, laddr, lport, 0, NULL); + if (oinp != NULL) { + if (oinpp != NULL) + *oinpp = oinp; + return (EADDRINUSE); + } + } else { + struct sockaddr_in lsin, fsin; + + bzero(&lsin, sizeof(lsin)); + bzero(&fsin, sizeof(fsin)); + lsin.sin_family = AF_INET; + lsin.sin_addr = laddr; + fsin.sin_family = AF_INET; + fsin.sin_addr = faddr; + error = in_pcb_lport_dest(inp, (struct sockaddr *) &lsin, + &lport, (struct sockaddr *)& fsin, fport, cred, + INPLOOKUP_WILDCARD); if (error) return (error); } Modified: stable/12/sys/netinet/in_pcb.h ============================================================================== --- stable/12/sys/netinet/in_pcb.h Sat Jun 20 20:06:52 2020 (r362445) +++ stable/12/sys/netinet/in_pcb.h Sat Jun 20 20:10:42 2020 (r362446) @@ -837,6 +837,9 @@ void in_pcbgroup_update_mbuf(struct inpcb *, struct mb void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, + u_short *lportp, struct sockaddr *fsa, u_short fport, + struct ucred *cred, int lookupflags); int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, Modified: stable/12/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/12/sys/netinet/tcp_usrreq.c Sat Jun 20 20:06:52 2020 (r362445) +++ stable/12/sys/netinet/tcp_usrreq.c Sat Jun 20 20:10:42 2020 (r362446) @@ -134,6 +134,16 @@ static void tcp_fill_info(struct tcpcb *, struct tcp_i #endif /* + * tcp_require_unique port requires a globally-unique source port for each + * outgoing connection. The default is to require the 4-tuple to be unique. + */ +VNET_DEFINE(int, tcp_require_unique_port) = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, require_unique_port, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_require_unique_port), 0, + "Require globally-unique ephemeral port for outgoing connections"); +#define V_tcp_require_unique_port VNET(tcp_require_unique_port) + +/* * TCP attaches to socket via pru_attach(), reserving space, * and an internet control block. */ @@ -1456,7 +1466,7 @@ tcp_connect(struct tcpcb *tp, struct sockaddr *nam, st INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK(&V_tcbinfo); - if (inp->inp_lport == 0) { + if (V_tcp_require_unique_port && inp->inp_lport == 0) { error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); if (error) goto out; @@ -1477,6 +1487,15 @@ tcp_connect(struct tcpcb *tp, struct sockaddr *nam, st error = EADDRINUSE; goto out; } + /* Handle initial bind if it hadn't been done in advance. */ + if (inp->inp_lport == 0) { + inp->inp_lport = lport; + if (in_pcbinshash(inp) != 0) { + inp->inp_lport = 0; + error = EAGAIN; + goto out; + } + } inp->inp_laddr = laddr; in_pcbrehash(inp); INP_HASH_WUNLOCK(&V_tcbinfo); @@ -1516,7 +1535,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, s INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK(&V_tcbinfo); - if (inp->inp_lport == 0) { + if (V_tcp_require_unique_port && inp->inp_lport == 0) { error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); if (error) goto out; Modified: stable/12/sys/netinet6/in6_pcb.c ============================================================================== --- stable/12/sys/netinet6/in6_pcb.c Sat Jun 20 20:06:52 2020 (r362445) +++ stable/12/sys/netinet6/in6_pcb.c Sat Jun 20 20:10:42 2020 (r362446) @@ -111,9 +111,6 @@ __FBSDID("$FreeBSD$"); #include #include -static struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *, - struct in6_addr *, u_int, struct in6_addr *, u_int, int, struct ifnet *); - int in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) @@ -416,9 +413,13 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; - struct in6_addr addr6; + struct sockaddr_in6 laddr6; int error; + bool rehash = true; + bzero(&laddr6, sizeof(laddr6)); + laddr6.sin6_family = AF_INET6; + INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -426,23 +427,26 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr * Call inner routine, to assign local interface address. * in6_pcbladdr() may automatically fill in sin6_scope_id. */ - if ((error = in6_pcbladdr(inp, nam, &addr6)) != 0) + if ((error = in6_pcbladdr(inp, nam, &laddr6.sin6_addr)) != 0) return (error); if (in6_pcblookup_hash_locked(pcbinfo, &sin6->sin6_addr, sin6->sin6_port, IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) - ? &addr6 : &inp->in6p_laddr, + ? &laddr6.sin6_addr : &inp->in6p_laddr, inp->inp_lport, 0, NULL) != NULL) { return (EADDRINUSE); } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - error = in6_pcbbind(inp, (struct sockaddr *)0, cred); + rehash = false; + error = in_pcb_lport_dest(inp, + (struct sockaddr *) &laddr6, &inp->inp_lport, + (struct sockaddr *) sin6, sin6->sin6_port, cred, 0); if (error) return (error); } - inp->in6p_laddr = addr6; + inp->in6p_laddr = laddr6.sin6_addr; } inp->in6p_faddr = sin6->sin6_addr; inp->inp_fport = sin6->sin6_port; @@ -452,7 +456,11 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr inp->inp_flow |= (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); - in_pcbrehash_mbuf(inp, m); + if (rehash) { + in_pcbrehash_mbuf(inp, m); + } else { + in_pcbinshash(inp); + } return (0); } @@ -1115,9 +1123,9 @@ found: #endif /* PCBGROUP */ /* - * Lookup PCB in hash list. + * Lookup PCB in hash list. Used in in_pcb.c as well as here. */ -static struct inpcb * +struct inpcb * in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, struct ifnet *ifp) Modified: stable/12/sys/netinet6/in6_pcb.h ============================================================================== --- stable/12/sys/netinet6/in6_pcb.h Sat Jun 20 20:06:52 2020 (r362445) +++ stable/12/sys/netinet6/in6_pcb.h Sat Jun 20 20:10:42 2020 (r362446) @@ -92,6 +92,10 @@ struct inpcb * in6_pcblookup_local(struct inpcbinfo *, struct in6_addr *, u_short, int, struct ucred *); +struct inpcb * + in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, + struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, + u_int lport_arg, int lookupflags, struct ifnet *ifp); struct inpcb * in6_pcblookup(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int,