From owner-svn-src-stable@freebsd.org Sun Nov 24 00:53:23 2019 Return-Path: Delivered-To: svn-src-stable@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 203EE1C4225; Sun, 24 Nov 2019 00:53:23 +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) server-signature RSA-PSS (4096 bits) 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 47LBVW0jgPz4dMS; Sun, 24 Nov 2019 00:53:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFCF41C54C; Sun, 24 Nov 2019 00:53:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO0rMxR039614; Sun, 24 Nov 2019 00:53:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO0rMNt039612; Sun, 24 Nov 2019 00:53:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911240053.xAO0rMNt039612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Nov 2019 00:53: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: r355040 - in stable/12: share/man/man4 sys/dev/ntb/ntb_hw X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 355040 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 00:53:23 -0000 Author: mav Date: Sun Nov 24 00:53:22 2019 New Revision: 355040 URL: https://svnweb.freebsd.org/changeset/base/355040 Log: MFC r354580: Allow splitting PLX NTB BAR2 into several memory windows. Address Lookup Table (A-LUT) being enabled allows to specify separate translation for each 1/128th or 1/256th of the BAR2. Previously it was used only to limit effective window size by blocking access through some of A-LUT elements. This change allows A-LUT elements to also point different memory locations, providing to upper layers several (up to 128) independent memory windows. A-LUT hardware allows even more flexible configurations than this, but NTB KPI have no way to manage that now. Modified: stable/12/share/man/man4/ntb_hw_plx.4 stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ntb_hw_plx.4 ============================================================================== --- stable/12/share/man/man4/ntb_hw_plx.4 Sat Nov 23 23:57:26 2019 (r355039) +++ stable/12/share/man/man4/ntb_hw_plx.4 Sun Nov 24 00:53:22 2019 (r355040) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2017 Alexander Motin +.\" Copyright (c) 2017-2019 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2017 +.Dd November 9, 2019 .Dt NTB_HW_PLX 4 .Os .Sh NAME @@ -54,6 +54,9 @@ NTB that it works in NTB-to-NTB (back-to-back) mode, 0 Driver attached to Link Interface (visible from Root Port side) switches to NTB-to-Root Port mode automatically, but one attached to Virtual Interface can't detect what is on the other side and require external knowledge. +.It Va hint.ntb_hw. Ns Ar X Ns Va .split +Being set above zero splits BAR2 into 2^x memory windows using Address +Lookup Table (A-LUT). .El .Sh DESCRIPTION The @@ -70,6 +73,8 @@ subsystem. Each PLX NTB provides up to 2 64-bit or 4 32-bit memory windows to the other system's memory, 6 or 12 scratchpad registers and 16 doorbells to interrupt the other system. +If Address Lookup Table (A-LUT) is enabled, BAR2 can be split into several +(up to 128) memory windows. In NTB-to-NTB mode one of memory windows (or half of it, if bigger then 1MB) is consumed by the driver itself to access scratchpad and doorbell registers of the other side. Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Sat Nov 23 23:57:26 2019 (r355039) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Sun Nov 24 00:53:22 2019 (r355040) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Alexander Motin + * Copyright (c) 2017-2019 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #define PLX_NUM_SPAD 8 /* There are 8 scratchpads. */ #define PLX_NUM_SPAD_PATT 4 /* Use test pattern as 4 more. */ #define PLX_NUM_DB 16 /* There are 16 doorbells. */ +#define PLX_MAX_SPLIT 128 /* Allow are at most 128 splits. */ struct ntb_plx_mw_info { int mw_bar; @@ -65,9 +66,11 @@ struct ntb_plx_mw_info { vm_paddr_t mw_pbase; caddr_t mw_vbase; vm_size_t mw_size; - vm_memattr_t mw_map_mode; - bus_addr_t mw_xlat_addr; - size_t mw_xlat_size; + struct { + vm_memattr_t mw_map_mode; + bus_addr_t mw_xlat_addr; + bus_size_t mw_xlat_size; + } splits[PLX_MAX_SPLIT]; }; struct ntb_plx_softc { @@ -81,6 +84,7 @@ struct ntb_plx_softc { u_int link; /* Link v/s Virtual side. */ u_int port; /* Port number within chip. */ u_int alut; /* A-LUT is enabled for NTx */ + u_int split; /* split BAR2 into 2^x parts */ int int_rid; struct resource *int_res; @@ -222,11 +226,8 @@ ntb_plx_init(device_t dev) NTX_WRITE(sc, sc->link ? 0xdbc : 0xd9c, 0xc0218021); /* Set Link to Virtual address translation. */ - for (i = 0; i < sc->mw_count; i++) { - mw = &sc->mw_info[i]; - if (mw->mw_xlat_size != 0) - ntb_plx_mw_set_trans_internal(dev, i); - } + for (i = 0; i < sc->mw_count; i++) + ntb_plx_mw_set_trans_internal(dev, i); pci_enable_busmaster(dev); if (sc->b2b_mw >= 0) @@ -319,7 +320,7 @@ ntb_plx_attach(device_t dev) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - int error = 0, i; + int error = 0, i, j; uint32_t val; char buf[32]; @@ -361,7 +362,8 @@ ntb_plx_attach(device_t dev) mw->mw_pbase = rman_get_start(mw->mw_res); mw->mw_size = rman_get_size(mw->mw_res); mw->mw_vbase = rman_get_virtual(mw->mw_res); - mw->mw_map_mode = VM_MEMATTR_UNCACHEABLE; + for (j = 0; j < PLX_MAX_SPLIT; j++) + mw->splits[j].mw_map_mode = VM_MEMATTR_UNCACHEABLE; sc->mw_count++; /* Skip over adjacent BAR for 64-bit BARs. */ @@ -402,6 +404,26 @@ ntb_plx_attach(device_t dev) sc->b2b_off = 0; } + snprintf(buf, sizeof(buf), "hint.%s.%d.split", device_get_name(dev), + device_get_unit(dev)); + TUNABLE_INT_FETCH(buf, &sc->split); + if (sc->split > 7) { + device_printf(dev, "Split value is too high (%u)\n", sc->split); + sc->split = 0; + } else if (sc->split > 0 && sc->alut == 0) { + device_printf(dev, "Can't split with disabled A-LUT\n"); + sc->split = 0; + } else if (sc->split > 0 && (sc->mw_count == 0 || sc->mw_info[0].mw_bar != 2)) { + device_printf(dev, "Can't split disabled BAR2\n"); + sc->split = 0; + } else if (sc->split > 0 && (sc->b2b_mw == 0 && sc->b2b_off == 0)) { + device_printf(dev, "Can't split BAR2 consumed by B2B\n"); + sc->split = 0; + } else if (sc->split > 0) { + device_printf(dev, "Splitting BAR2 into %d memory windows\n", + 1 << sc->split); + } + /* * Use Physical Layer User Test Pattern as additional scratchpad. * Make sure they are present and enabled by writing to them. @@ -582,12 +604,29 @@ static uint8_t ntb_plx_mw_count(device_t dev) { struct ntb_plx_softc *sc = device_get_softc(dev); + uint8_t res; + res = sc->mw_count; + res += (1 << sc->split) - 1; if (sc->b2b_mw >= 0 && sc->b2b_off == 0) - return (sc->mw_count - 1); /* B2B consumed whole window. */ - return (sc->mw_count); + res--; /* B2B consumed whole window. */ + return (res); } +static unsigned +ntb_plx_user_mw_to_idx(struct ntb_plx_softc *sc, unsigned uidx, unsigned *sp) +{ + unsigned t; + + t = 1 << sc->split; + if (uidx < t) { + *sp = uidx; + return (0); + } + *sp = 0; + return (uidx - (t - 1)); +} + static int ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm_paddr_t *base, caddr_t *vbase, size_t *size, size_t *align, size_t *align_size, @@ -595,8 +634,10 @@ ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - size_t off; + size_t off, ss; + unsigned sp, split; + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); if (mw_idx >= sc->mw_count) return (EINVAL); off = 0; @@ -606,14 +647,16 @@ ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm off = sc->b2b_off; } mw = &sc->mw_info[mw_idx]; + split = (mw->mw_bar == 2) ? sc->split : 0; + ss = (mw->mw_size - off) >> split; /* Local to remote memory window parameters. */ if (base != NULL) - *base = mw->mw_pbase + off; + *base = mw->mw_pbase + off + ss * sp; if (vbase != NULL) - *vbase = mw->mw_vbase + off; + *vbase = mw->mw_vbase + off + ss * sp; if (size != NULL) - *size = mw->mw_size - off; + *size = ss; /* * Remote to local memory window translation address alignment. @@ -660,91 +703,72 @@ ntb_plx_mw_set_trans_internal(device_t dev, unsigned m struct ntb_plx_mw_info *mw; uint64_t addr, eaddr, off, size, bsize, esize, val64; uint32_t val; - int i; + unsigned i, sp, split; mw = &sc->mw_info[mw_idx]; - addr = mw->mw_xlat_addr; - size = mw->mw_xlat_size; - off = 0; - if (mw_idx == sc->b2b_mw) { - off = sc->b2b_off; - KASSERT(off != 0, ("user shouldn't get non-shared b2b mw")); + off = (mw_idx == sc->b2b_mw) ? sc->b2b_off : 0; + split = (mw->mw_bar == 2) ? sc->split : 0; - /* - * While generally we can set any BAR size on link side, - * for B2B shared window we can't go above preconfigured - * size due to BAR address alignment requirements. - */ - if (size > mw->mw_size - off) - return (EINVAL); - } - - if (size > 0) { - /* Round BAR size to next power of 2 or at least 1MB. */ - bsize = size; + /* Get BAR size. In case of split or B2RP we can't change it. */ + if (split || sc->b2b_mw < 0) { + bsize = mw->mw_size - off; + } else { + bsize = mw->splits[0].mw_xlat_size; if (!powerof2(bsize)) bsize = 1LL << flsll(bsize); - if (bsize < 1024 * 1024) + if (bsize > 0 && bsize < 1024 * 1024) bsize = 1024 * 1024; + } - /* A-LUT has 128 or 256 times better granularity. */ - esize = bsize; - if (sc->alut && mw->mw_bar == 2) - esize /= 128 * sc->alut; + /* + * While for B2B we can set any BAR size on a link side, for shared + * window we can't go above preconfigured size due to BAR address + * alignment requirements. + */ + if ((off & (bsize - 1)) != 0) + return (EINVAL); - /* addr should be aligned to BAR or A-LUT element size. */ - if ((addr & (esize - 1)) != 0) - return (EINVAL); - } else - esize = bsize = 0; + /* In B2B mode set Link Interface BAR size/address. */ + if (sc->b2b_mw >= 0 && mw->mw_64bit) { + val64 = 0; + if (bsize > 0) + val64 = (~(bsize - 1) & ~0xfffff); + val64 |= 0xc; + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); - if (mw->mw_64bit) { - if (sc->b2b_mw >= 0) { - /* Set Link Interface BAR size and enable/disable it. */ - val64 = 0; - if (bsize > 0) - val64 = (~(bsize - 1) & ~0xfffff); - val64 |= 0xc; - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); + val64 = 0x2000000000000000 * mw->mw_bar + off; + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); + } else if (sc->b2b_mw >= 0) { + val = 0; + if (bsize > 0) + val = (~(bsize - 1) & ~0xfffff); + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val); - /* Set Link Interface BAR address. */ - val64 = 0x2000000000000000 * mw->mw_bar + off; - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); - } + val64 = 0x20000000 * mw->mw_bar + off; + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); + } - /* Set Virtual Interface BARs address translation */ + /* Set BARs address translation */ + addr = split ? UINT64_MAX : mw->splits[0].mw_xlat_addr; + if (mw->mw_64bit) { PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4, addr); PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4 + 4, addr >> 32); } else { - /* Make sure we fit into 32-bit address space. */ - if ((addr & UINT32_MAX) != addr) - return (ERANGE); - if (((addr + bsize) & UINT32_MAX) != (addr + bsize)) - return (ERANGE); - - if (sc->b2b_mw >= 0) { - /* Set Link Interface BAR size and enable/disable it. */ - val = 0; - if (bsize > 0) - val = (~(bsize - 1) & ~0xfffff); - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val); - - /* Set Link Interface BAR address. */ - val64 = 0x20000000 * mw->mw_bar + off; - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); - } - - /* Set Virtual Interface BARs address translation */ PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4, addr); } - /* Configure and enable Link to Virtual A-LUT if we need it. */ - if (sc->alut && mw->mw_bar == 2 && - ((addr & (bsize - 1)) != 0 || size != bsize)) { - eaddr = addr; - for (i = 0; i < 128 * sc->alut; i++) { + /* Configure and enable A-LUT if we need it. */ + size = split ? 0 : mw->splits[0].mw_xlat_size; + if (sc->alut && mw->mw_bar == 2 && (sc->split > 0 || + ((addr & (bsize - 1)) != 0 || size != bsize))) { + esize = bsize / (128 * sc->alut); + for (i = sp = 0; i < 128 * sc->alut; i++) { + if (i % (128 * sc->alut >> sc->split) == 0) { + eaddr = addr = mw->splits[sp].mw_xlat_addr; + size = mw->splits[sp++].mw_xlat_size; + } val = sc->link ? 0 : 1; if (sc->alut == 1) val += 2 * sc->ntx; @@ -768,12 +792,18 @@ ntb_plx_mw_set_trans(device_t dev, unsigned mw_idx, bu { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; + unsigned sp; + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); if (mw_idx >= sc->mw_count) return (EINVAL); mw = &sc->mw_info[mw_idx]; - mw->mw_xlat_addr = addr; - mw->mw_xlat_size = size; + if (!mw->mw_64bit && + ((addr & UINT32_MAX) != addr || + ((addr + size) & UINT32_MAX) != (addr + size))) + return (ERANGE); + mw->splits[sp].mw_xlat_addr = addr; + mw->splits[sp].mw_xlat_size = size; return (ntb_plx_mw_set_trans_internal(dev, mw_idx)); } @@ -785,43 +815,49 @@ ntb_plx_mw_clear_trans(device_t dev, unsigned mw_idx) } static int -ntb_plx_mw_get_wc(device_t dev, unsigned idx, vm_memattr_t *mode) +ntb_plx_mw_get_wc(device_t dev, unsigned mw_idx, vm_memattr_t *mode) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; + unsigned sp; - if (idx >= sc->mw_count) + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); + if (mw_idx >= sc->mw_count) return (EINVAL); - mw = &sc->mw_info[idx]; - *mode = mw->mw_map_mode; + mw = &sc->mw_info[mw_idx]; + *mode = mw->splits[sp].mw_map_mode; return (0); } static int -ntb_plx_mw_set_wc(device_t dev, unsigned idx, vm_memattr_t mode) +ntb_plx_mw_set_wc(device_t dev, unsigned mw_idx, vm_memattr_t mode) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - uint64_t off; + uint64_t off, ss; int rc; + unsigned sp, split; - if (idx >= sc->mw_count) + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); + if (mw_idx >= sc->mw_count) return (EINVAL); - mw = &sc->mw_info[idx]; - if (mw->mw_map_mode == mode) + mw = &sc->mw_info[mw_idx]; + if (mw->splits[sp].mw_map_mode == mode) return (0); off = 0; - if (idx == sc->b2b_mw) { + if (mw_idx == sc->b2b_mw) { KASSERT(sc->b2b_off != 0, ("user shouldn't get non-shared b2b mw")); off = sc->b2b_off; } - rc = pmap_change_attr((vm_offset_t)mw->mw_vbase + off, - mw->mw_size - off, mode); + split = (mw->mw_bar == 2) ? sc->split : 0; + ss = (mw->mw_size - off) >> split; + rc = pmap_change_attr((vm_offset_t)mw->mw_vbase + off + ss * sp, + ss, mode); if (rc == 0) - mw->mw_map_mode = mode; + mw->splits[sp].mw_map_mode = mode; return (rc); } From owner-svn-src-stable@freebsd.org Sun Nov 24 00:53:48 2019 Return-Path: Delivered-To: svn-src-stable@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 33EE71C42D1; Sun, 24 Nov 2019 00:53:48 +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) server-signature RSA-PSS (4096 bits) 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 47LBW0053yz4dTV; Sun, 24 Nov 2019 00:53:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA9E71C54D; Sun, 24 Nov 2019 00:53: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 xAO0rllw039686; Sun, 24 Nov 2019 00:53:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO0rlpX039685; Sun, 24 Nov 2019 00:53:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911240053.xAO0rlpX039685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Nov 2019 00:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355041 - in stable/11: share/man/man4 sys/dev/ntb/ntb_hw X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 355041 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 00:53:48 -0000 Author: mav Date: Sun Nov 24 00:53:47 2019 New Revision: 355041 URL: https://svnweb.freebsd.org/changeset/base/355041 Log: MFC r354580: Allow splitting PLX NTB BAR2 into several memory windows. Address Lookup Table (A-LUT) being enabled allows to specify separate translation for each 1/128th or 1/256th of the BAR2. Previously it was used only to limit effective window size by blocking access through some of A-LUT elements. This change allows A-LUT elements to also point different memory locations, providing to upper layers several (up to 128) independent memory windows. A-LUT hardware allows even more flexible configurations than this, but NTB KPI have no way to manage that now. Modified: stable/11/share/man/man4/ntb_hw_plx.4 stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/ntb_hw_plx.4 ============================================================================== --- stable/11/share/man/man4/ntb_hw_plx.4 Sun Nov 24 00:53:22 2019 (r355040) +++ stable/11/share/man/man4/ntb_hw_plx.4 Sun Nov 24 00:53:47 2019 (r355041) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2017 Alexander Motin +.\" Copyright (c) 2017-2019 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2017 +.Dd November 9, 2019 .Dt NTB_HW_PLX 4 .Os .Sh NAME @@ -54,6 +54,9 @@ NTB that it works in NTB-to-NTB (back-to-back) mode, 0 Driver attached to Link Interface (visible from Root Port side) switches to NTB-to-Root Port mode automatically, but one attached to Virtual Interface can't detect what is on the other side and require external knowledge. +.It Va hint.ntb_hw. Ns Ar X Ns Va .split +Being set above zero splits BAR2 into 2^x memory windows using Address +Lookup Table (A-LUT). .El .Sh DESCRIPTION The @@ -70,6 +73,8 @@ subsystem. Each PLX NTB provides up to 2 64-bit or 4 32-bit memory windows to the other system's memory, 6 or 12 scratchpad registers and 16 doorbells to interrupt the other system. +If Address Lookup Table (A-LUT) is enabled, BAR2 can be split into several +(up to 128) memory windows. In NTB-to-NTB mode one of memory windows (or half of it, if bigger then 1MB) is consumed by the driver itself to access scratchpad and doorbell registers of the other side. Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Sun Nov 24 00:53:22 2019 (r355040) +++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Sun Nov 24 00:53:47 2019 (r355041) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Alexander Motin + * Copyright (c) 2017-2019 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #define PLX_NUM_SPAD 8 /* There are 8 scratchpads. */ #define PLX_NUM_SPAD_PATT 4 /* Use test pattern as 4 more. */ #define PLX_NUM_DB 16 /* There are 16 doorbells. */ +#define PLX_MAX_SPLIT 128 /* Allow are at most 128 splits. */ struct ntb_plx_mw_info { int mw_bar; @@ -65,9 +66,11 @@ struct ntb_plx_mw_info { vm_paddr_t mw_pbase; caddr_t mw_vbase; vm_size_t mw_size; - vm_memattr_t mw_map_mode; - bus_addr_t mw_xlat_addr; - size_t mw_xlat_size; + struct { + vm_memattr_t mw_map_mode; + bus_addr_t mw_xlat_addr; + bus_size_t mw_xlat_size; + } splits[PLX_MAX_SPLIT]; }; struct ntb_plx_softc { @@ -81,6 +84,7 @@ struct ntb_plx_softc { u_int link; /* Link v/s Virtual side. */ u_int port; /* Port number within chip. */ u_int alut; /* A-LUT is enabled for NTx */ + u_int split; /* split BAR2 into 2^x parts */ int int_rid; struct resource *int_res; @@ -222,11 +226,8 @@ ntb_plx_init(device_t dev) NTX_WRITE(sc, sc->link ? 0xdbc : 0xd9c, 0xc0218021); /* Set Link to Virtual address translation. */ - for (i = 0; i < sc->mw_count; i++) { - mw = &sc->mw_info[i]; - if (mw->mw_xlat_size != 0) - ntb_plx_mw_set_trans_internal(dev, i); - } + for (i = 0; i < sc->mw_count; i++) + ntb_plx_mw_set_trans_internal(dev, i); pci_enable_busmaster(dev); if (sc->b2b_mw >= 0) @@ -319,7 +320,7 @@ ntb_plx_attach(device_t dev) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - int error = 0, i; + int error = 0, i, j; uint32_t val; char buf[32]; @@ -361,7 +362,8 @@ ntb_plx_attach(device_t dev) mw->mw_pbase = rman_get_start(mw->mw_res); mw->mw_size = rman_get_size(mw->mw_res); mw->mw_vbase = rman_get_virtual(mw->mw_res); - mw->mw_map_mode = VM_MEMATTR_UNCACHEABLE; + for (j = 0; j < PLX_MAX_SPLIT; j++) + mw->splits[j].mw_map_mode = VM_MEMATTR_UNCACHEABLE; sc->mw_count++; /* Skip over adjacent BAR for 64-bit BARs. */ @@ -402,6 +404,26 @@ ntb_plx_attach(device_t dev) sc->b2b_off = 0; } + snprintf(buf, sizeof(buf), "hint.%s.%d.split", device_get_name(dev), + device_get_unit(dev)); + TUNABLE_INT_FETCH(buf, &sc->split); + if (sc->split > 7) { + device_printf(dev, "Split value is too high (%u)\n", sc->split); + sc->split = 0; + } else if (sc->split > 0 && sc->alut == 0) { + device_printf(dev, "Can't split with disabled A-LUT\n"); + sc->split = 0; + } else if (sc->split > 0 && (sc->mw_count == 0 || sc->mw_info[0].mw_bar != 2)) { + device_printf(dev, "Can't split disabled BAR2\n"); + sc->split = 0; + } else if (sc->split > 0 && (sc->b2b_mw == 0 && sc->b2b_off == 0)) { + device_printf(dev, "Can't split BAR2 consumed by B2B\n"); + sc->split = 0; + } else if (sc->split > 0) { + device_printf(dev, "Splitting BAR2 into %d memory windows\n", + 1 << sc->split); + } + /* * Use Physical Layer User Test Pattern as additional scratchpad. * Make sure they are present and enabled by writing to them. @@ -545,12 +567,29 @@ static uint8_t ntb_plx_mw_count(device_t dev) { struct ntb_plx_softc *sc = device_get_softc(dev); + uint8_t res; + res = sc->mw_count; + res += (1 << sc->split) - 1; if (sc->b2b_mw >= 0 && sc->b2b_off == 0) - return (sc->mw_count - 1); /* B2B consumed whole window. */ - return (sc->mw_count); + res--; /* B2B consumed whole window. */ + return (res); } +static unsigned +ntb_plx_user_mw_to_idx(struct ntb_plx_softc *sc, unsigned uidx, unsigned *sp) +{ + unsigned t; + + t = 1 << sc->split; + if (uidx < t) { + *sp = uidx; + return (0); + } + *sp = 0; + return (uidx - (t - 1)); +} + static int ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm_paddr_t *base, caddr_t *vbase, size_t *size, size_t *align, size_t *align_size, @@ -558,8 +597,10 @@ ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - size_t off; + size_t off, ss; + unsigned sp, split; + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); if (mw_idx >= sc->mw_count) return (EINVAL); off = 0; @@ -569,14 +610,16 @@ ntb_plx_mw_get_range(device_t dev, unsigned mw_idx, vm off = sc->b2b_off; } mw = &sc->mw_info[mw_idx]; + split = (mw->mw_bar == 2) ? sc->split : 0; + ss = (mw->mw_size - off) >> split; /* Local to remote memory window parameters. */ if (base != NULL) - *base = mw->mw_pbase + off; + *base = mw->mw_pbase + off + ss * sp; if (vbase != NULL) - *vbase = mw->mw_vbase + off; + *vbase = mw->mw_vbase + off + ss * sp; if (size != NULL) - *size = mw->mw_size - off; + *size = ss; /* * Remote to local memory window translation address alignment. @@ -623,91 +666,72 @@ ntb_plx_mw_set_trans_internal(device_t dev, unsigned m struct ntb_plx_mw_info *mw; uint64_t addr, eaddr, off, size, bsize, esize, val64; uint32_t val; - int i; + unsigned i, sp, split; mw = &sc->mw_info[mw_idx]; - addr = mw->mw_xlat_addr; - size = mw->mw_xlat_size; - off = 0; - if (mw_idx == sc->b2b_mw) { - off = sc->b2b_off; - KASSERT(off != 0, ("user shouldn't get non-shared b2b mw")); + off = (mw_idx == sc->b2b_mw) ? sc->b2b_off : 0; + split = (mw->mw_bar == 2) ? sc->split : 0; - /* - * While generally we can set any BAR size on link side, - * for B2B shared window we can't go above preconfigured - * size due to BAR address alignment requirements. - */ - if (size > mw->mw_size - off) - return (EINVAL); - } - - if (size > 0) { - /* Round BAR size to next power of 2 or at least 1MB. */ - bsize = size; + /* Get BAR size. In case of split or B2RP we can't change it. */ + if (split || sc->b2b_mw < 0) { + bsize = mw->mw_size - off; + } else { + bsize = mw->splits[0].mw_xlat_size; if (!powerof2(bsize)) bsize = 1LL << flsll(bsize); - if (bsize < 1024 * 1024) + if (bsize > 0 && bsize < 1024 * 1024) bsize = 1024 * 1024; + } - /* A-LUT has 128 or 256 times better granularity. */ - esize = bsize; - if (sc->alut && mw->mw_bar == 2) - esize /= 128 * sc->alut; + /* + * While for B2B we can set any BAR size on a link side, for shared + * window we can't go above preconfigured size due to BAR address + * alignment requirements. + */ + if ((off & (bsize - 1)) != 0) + return (EINVAL); - /* addr should be aligned to BAR or A-LUT element size. */ - if ((addr & (esize - 1)) != 0) - return (EINVAL); - } else - esize = bsize = 0; + /* In B2B mode set Link Interface BAR size/address. */ + if (sc->b2b_mw >= 0 && mw->mw_64bit) { + val64 = 0; + if (bsize > 0) + val64 = (~(bsize - 1) & ~0xfffff); + val64 |= 0xc; + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); - if (mw->mw_64bit) { - if (sc->b2b_mw >= 0) { - /* Set Link Interface BAR size and enable/disable it. */ - val64 = 0; - if (bsize > 0) - val64 = (~(bsize - 1) & ~0xfffff); - val64 |= 0xc; - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); + val64 = 0x2000000000000000 * mw->mw_bar + off; + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); + } else if (sc->b2b_mw >= 0) { + val = 0; + if (bsize > 0) + val = (~(bsize - 1) & ~0xfffff); + PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val); - /* Set Link Interface BAR address. */ - val64 = 0x2000000000000000 * mw->mw_bar + off; - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); - } + val64 = 0x20000000 * mw->mw_bar + off; + PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); + } - /* Set Virtual Interface BARs address translation */ + /* Set BARs address translation */ + addr = split ? UINT64_MAX : mw->splits[0].mw_xlat_addr; + if (mw->mw_64bit) { PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4, addr); PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4 + 4, addr >> 32); } else { - /* Make sure we fit into 32-bit address space. */ - if ((addr & UINT32_MAX) != addr) - return (ERANGE); - if (((addr + bsize) & UINT32_MAX) != (addr + bsize)) - return (ERANGE); - - if (sc->b2b_mw >= 0) { - /* Set Link Interface BAR size and enable/disable it. */ - val = 0; - if (bsize > 0) - val = (~(bsize - 1) & ~0xfffff); - PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val); - - /* Set Link Interface BAR address. */ - val64 = 0x20000000 * mw->mw_bar + off; - PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); - } - - /* Set Virtual Interface BARs address translation */ PNTX_WRITE(sc, 0xc3c + (mw->mw_bar - 2) * 4, addr); } - /* Configure and enable Link to Virtual A-LUT if we need it. */ - if (sc->alut && mw->mw_bar == 2 && - ((addr & (bsize - 1)) != 0 || size != bsize)) { - eaddr = addr; - for (i = 0; i < 128 * sc->alut; i++) { + /* Configure and enable A-LUT if we need it. */ + size = split ? 0 : mw->splits[0].mw_xlat_size; + if (sc->alut && mw->mw_bar == 2 && (sc->split > 0 || + ((addr & (bsize - 1)) != 0 || size != bsize))) { + esize = bsize / (128 * sc->alut); + for (i = sp = 0; i < 128 * sc->alut; i++) { + if (i % (128 * sc->alut >> sc->split) == 0) { + eaddr = addr = mw->splits[sp].mw_xlat_addr; + size = mw->splits[sp++].mw_xlat_size; + } val = sc->link ? 0 : 1; if (sc->alut == 1) val += 2 * sc->ntx; @@ -731,12 +755,18 @@ ntb_plx_mw_set_trans(device_t dev, unsigned mw_idx, bu { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; + unsigned sp; + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); if (mw_idx >= sc->mw_count) return (EINVAL); mw = &sc->mw_info[mw_idx]; - mw->mw_xlat_addr = addr; - mw->mw_xlat_size = size; + if (!mw->mw_64bit && + ((addr & UINT32_MAX) != addr || + ((addr + size) & UINT32_MAX) != (addr + size))) + return (ERANGE); + mw->splits[sp].mw_xlat_addr = addr; + mw->splits[sp].mw_xlat_size = size; return (ntb_plx_mw_set_trans_internal(dev, mw_idx)); } @@ -748,43 +778,49 @@ ntb_plx_mw_clear_trans(device_t dev, unsigned mw_idx) } static int -ntb_plx_mw_get_wc(device_t dev, unsigned idx, vm_memattr_t *mode) +ntb_plx_mw_get_wc(device_t dev, unsigned mw_idx, vm_memattr_t *mode) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; + unsigned sp; - if (idx >= sc->mw_count) + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); + if (mw_idx >= sc->mw_count) return (EINVAL); - mw = &sc->mw_info[idx]; - *mode = mw->mw_map_mode; + mw = &sc->mw_info[mw_idx]; + *mode = mw->splits[sp].mw_map_mode; return (0); } static int -ntb_plx_mw_set_wc(device_t dev, unsigned idx, vm_memattr_t mode) +ntb_plx_mw_set_wc(device_t dev, unsigned mw_idx, vm_memattr_t mode) { struct ntb_plx_softc *sc = device_get_softc(dev); struct ntb_plx_mw_info *mw; - uint64_t off; + uint64_t off, ss; int rc; + unsigned sp, split; - if (idx >= sc->mw_count) + mw_idx = ntb_plx_user_mw_to_idx(sc, mw_idx, &sp); + if (mw_idx >= sc->mw_count) return (EINVAL); - mw = &sc->mw_info[idx]; - if (mw->mw_map_mode == mode) + mw = &sc->mw_info[mw_idx]; + if (mw->splits[sp].mw_map_mode == mode) return (0); off = 0; - if (idx == sc->b2b_mw) { + if (mw_idx == sc->b2b_mw) { KASSERT(sc->b2b_off != 0, ("user shouldn't get non-shared b2b mw")); off = sc->b2b_off; } - rc = pmap_change_attr((vm_offset_t)mw->mw_vbase + off, - mw->mw_size - off, mode); + split = (mw->mw_bar == 2) ? sc->split : 0; + ss = (mw->mw_size - off) >> split; + rc = pmap_change_attr((vm_offset_t)mw->mw_vbase + off + ss * sp, + ss, mode); if (rc == 0) - mw->mw_map_mode = mode; + mw->splits[sp].mw_map_mode = mode; return (rc); } From owner-svn-src-stable@freebsd.org Sun Nov 24 00:55:43 2019 Return-Path: Delivered-To: svn-src-stable@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 89F351C43D9; Sun, 24 Nov 2019 00:55:43 +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) server-signature RSA-PSS (4096 bits) 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 47LBYC36jcz4dcD; Sun, 24 Nov 2019 00:55:43 +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 4A41B1C550; Sun, 24 Nov 2019 00:55:43 +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 xAO0thub039861; Sun, 24 Nov 2019 00:55:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO0tgT7039859; Sun, 24 Nov 2019 00:55:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911240055.xAO0tgT7039859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Nov 2019 00:55: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: r355042 - in stable/12: share/man/man4 sys/dev/ntb X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/ntb X-SVN-Commit-Revision: 355042 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 00:55:43 -0000 Author: mav Date: Sun Nov 24 00:55:42 2019 New Revision: 355042 URL: https://svnweb.freebsd.org/changeset/base/355042 Log: MFC r354581,r354597: Add compact scraptchpad protocol for ntb_transport(4). Previously ntb_transport(4) required at least 6 scratchpad registers, plus 2 more for each additional memory window. That is too much for some configurations, where several drivers have to share resources of the same NTB hardware. This patch introduces new compact version of the protocol, requiring only 3 scratchpad registers, plus one more for each additional memory window. The optimization is based on fact that neither of version, number of windows or number of queue pairs really need more then one byte each, and window sizes of 4GB are not very useful now. The new protocol is activated automatically when the configuration is low on scratchpad registers, or it can be activated explicitly with loader tunable. Modified: stable/12/share/man/man4/ntb_transport.4 stable/12/sys/dev/ntb/ntb_transport.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ntb_transport.4 ============================================================================== --- stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 00:53:47 2019 (r355041) +++ stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 00:55:42 2019 (r355042) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2019 +.Dd November 9, 2019 .Dt NTB_TRANSPORT 4 .Os .Sh NAME @@ -64,6 +64,12 @@ is a name of the driver to attach (empty means any), is a number of queues to allocate (empty means automatic). The default configuration is empty string, which means single consumer with one queue per memory window, allowing any driver to attach. +.It Va hint.ntb_transport. Ns Ar X Ns Va .compact +Non-zero value enables compact version of scratchpad protocol, using half +as many registers. +Enabled automatically if there is not enough registers to negotiate all +available memory windows. +The compact version does not support memory windows of 4GB and above. .El .Sh DESCRIPTION The @@ -85,7 +91,8 @@ instance: .It 1 or more memory windows; .It -6 scratchpads, plus 2 more for each additional memory window; +6 scratchpads, plus 2 more for each additional memory window, +or 3 plus 1 in case of compact protocol; .It 1 doorbell for each memory window or configured queue. .El Modified: stable/12/sys/dev/ntb/ntb_transport.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_transport.c Sun Nov 24 00:53:47 2019 (r355041) +++ stable/12/sys/dev/ntb/ntb_transport.c Sun Nov 24 00:55:42 2019 (r355042) @@ -203,6 +203,7 @@ struct ntb_transport_ctx { struct ntb_transport_child *child; struct ntb_transport_mw *mw_vec; struct ntb_transport_qp *qp_vec; + int compact; unsigned mw_count; unsigned qp_count; uint64_t qp_bitmap; @@ -252,6 +253,15 @@ enum { NTBT_WATCHDOG_SPAD = 15 }; +/* + * Compart version of sratchpad protocol, using twice less registers. + */ +enum { + NTBTC_PARAMS = 0, /* NUM_QPS << 24 + NUM_MWS << 16 + VERSION */ + NTBTC_QP_LINKS, /* QP links status */ + NTBTC_MW0_SZ, /* MW size limited to 32 bits. */ +}; + #define QP_TO_MW(nt, qp) ((qp) % nt->mw_count) #define NTB_QP_DEF_NUM_ENTRIES 100 #define NTB_LINK_DOWN_TIMEOUT 100 @@ -352,15 +362,31 @@ ntb_transport_attach(device_t dev) device_printf(dev, "At least 1 memory window required.\n"); return (ENXIO); } - if (spad_count < 6) { - device_printf(dev, "At least 6 scratchpads required.\n"); - return (ENXIO); + nt->compact = (spad_count < 4 + 2 * nt->mw_count); + snprintf(buf, sizeof(buf), "hint.%s.%d.compact", device_get_name(dev), + device_get_unit(dev)); + TUNABLE_INT_FETCH(buf, &nt->compact); + if (nt->compact) { + if (spad_count < 3) { + device_printf(dev, "At least 3 scratchpads required.\n"); + return (ENXIO); + } + if (spad_count < 2 + nt->mw_count) { + nt->mw_count = spad_count - 2; + device_printf(dev, "Scratchpads enough only for %d " + "memory windows.\n", nt->mw_count); + } + } else { + if (spad_count < 6) { + device_printf(dev, "At least 6 scratchpads required.\n"); + return (ENXIO); + } + if (spad_count < 4 + 2 * nt->mw_count) { + nt->mw_count = (spad_count - 4) / 2; + device_printf(dev, "Scratchpads enough only for %d " + "memory windows.\n", nt->mw_count); + } } - if (spad_count < 4 + 2 * nt->mw_count) { - nt->mw_count = (spad_count - 4) / 2; - device_printf(dev, "Scratchpads enough only for %d " - "memory windows.\n", nt->mw_count); - } if (db_bitmap == 0) { device_printf(dev, "At least one doorbell required.\n"); return (ENXIO); @@ -380,10 +406,16 @@ ntb_transport_attach(device_t dev) mw->tx_size = mw->phys_size; if (max_mw_size != 0 && mw->tx_size > max_mw_size) { device_printf(dev, "Memory window %d limited from " - "%ju to %ju\n", i, (uintmax_t)mw->phys_size, + "%ju to %ju\n", i, (uintmax_t)mw->tx_size, max_mw_size); mw->tx_size = max_mw_size; } + if (nt->compact && mw->tx_size > UINT32_MAX) { + device_printf(dev, "Memory window %d is too big " + "(%ju)\n", i, (uintmax_t)mw->tx_size); + rc = ENXIO; + goto err; + } mw->rx_size = 0; mw->buff_size = 0; @@ -1110,37 +1142,61 @@ ntb_transport_link_work(void *arg) int rc; /* send the local info, in the opposite order of the way we read it */ - for (i = 0; i < nt->mw_count; i++) { - size = nt->mw_vec[i].tx_size; - ntb_peer_spad_write(dev, NTBT_MW0_SZ_HIGH + (i * 2), - size >> 32); - ntb_peer_spad_write(dev, NTBT_MW0_SZ_LOW + (i * 2), size); + if (nt->compact) { + for (i = 0; i < nt->mw_count; i++) { + size = nt->mw_vec[i].tx_size; + KASSERT(size <= UINT32_MAX, ("size too big (%jx)", size)); + ntb_peer_spad_write(dev, NTBTC_MW0_SZ + i, size); + } + ntb_peer_spad_write(dev, NTBTC_QP_LINKS, 0); + ntb_peer_spad_write(dev, NTBTC_PARAMS, + (nt->qp_count << 24) | (nt->mw_count << 16) | + NTB_TRANSPORT_VERSION); + } else { + for (i = 0; i < nt->mw_count; i++) { + size = nt->mw_vec[i].tx_size; + ntb_peer_spad_write(dev, NTBT_MW0_SZ_HIGH + (i * 2), + size >> 32); + ntb_peer_spad_write(dev, NTBT_MW0_SZ_LOW + (i * 2), size); + } + ntb_peer_spad_write(dev, NTBT_NUM_MWS, nt->mw_count); + ntb_peer_spad_write(dev, NTBT_NUM_QPS, nt->qp_count); + ntb_peer_spad_write(dev, NTBT_QP_LINKS, 0); + ntb_peer_spad_write(dev, NTBT_VERSION, NTB_TRANSPORT_VERSION); } - ntb_peer_spad_write(dev, NTBT_NUM_MWS, nt->mw_count); - ntb_peer_spad_write(dev, NTBT_NUM_QPS, nt->qp_count); - ntb_peer_spad_write(dev, NTBT_QP_LINKS, 0); - ntb_peer_spad_write(dev, NTBT_VERSION, NTB_TRANSPORT_VERSION); /* Query the remote side for its info */ val = 0; - ntb_spad_read(dev, NTBT_VERSION, &val); - if (val != NTB_TRANSPORT_VERSION) - goto out; + if (nt->compact) { + ntb_spad_read(dev, NTBTC_PARAMS, &val); + if (val != ((nt->qp_count << 24) | (nt->mw_count << 16) | + NTB_TRANSPORT_VERSION)) + goto out; + } else { + ntb_spad_read(dev, NTBT_VERSION, &val); + if (val != NTB_TRANSPORT_VERSION) + goto out; - ntb_spad_read(dev, NTBT_NUM_QPS, &val); - if (val != nt->qp_count) - goto out; + ntb_spad_read(dev, NTBT_NUM_QPS, &val); + if (val != nt->qp_count) + goto out; - ntb_spad_read(dev, NTBT_NUM_MWS, &val); - if (val != nt->mw_count) - goto out; + ntb_spad_read(dev, NTBT_NUM_MWS, &val); + if (val != nt->mw_count) + goto out; + } for (i = 0; i < nt->mw_count; i++) { - ntb_spad_read(dev, NTBT_MW0_SZ_HIGH + (i * 2), &val); - val64 = (uint64_t)val << 32; + if (nt->compact) { + ntb_spad_read(dev, NTBTC_MW0_SZ + i, &val); + val64 = val; + } else { + ntb_spad_read(dev, NTBT_MW0_SZ_HIGH + (i * 2), &val); + val64 = (uint64_t)val << 32; - ntb_spad_read(dev, NTBT_MW0_SZ_LOW + (i * 2), &val); - val64 |= val; + ntb_spad_read(dev, NTBT_MW0_SZ_LOW + (i * 2), &val); + val64 |= val; + } mw = &nt->mw_vec[i]; mw->rx_size = val64; From owner-svn-src-stable@freebsd.org Sun Nov 24 01:27:06 2019 Return-Path: Delivered-To: svn-src-stable@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 53FB41C5BD4; Sun, 24 Nov 2019 01:27:06 +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) server-signature RSA-PSS (4096 bits) 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 47LCFQ1YbBz4gFN; Sun, 24 Nov 2019 01:27:06 +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 18C4F1CB16; Sun, 24 Nov 2019 01:27:06 +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 xAO1R5dj057596; Sun, 24 Nov 2019 01:27:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO1R5ND057593; Sun, 24 Nov 2019 01:27:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911240127.xAO1R5ND057593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Nov 2019 01:27: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: r355043 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 355043 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 01:27:06 -0000 Author: mav Date: Sun Nov 24 01:27:04 2019 New Revision: 355043 URL: https://svnweb.freebsd.org/changeset/base/355043 Log: MFC r351605: Man page for AMD Non-Transparent Bridge (ntb_hw_amd) driver. Added: stable/12/share/man/man4/ntb_hw_amd.4 - copied unchanged from r351605, head/share/man/man4/ntb_hw_amd.4 Modified: stable/12/share/man/man4/Makefile stable/12/share/man/man4/ntb.4 stable/12/share/man/man4/ntb_transport.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/Makefile Sun Nov 24 01:27:04 2019 (r355043) @@ -386,6 +386,7 @@ MAN= aac.4 \ nmdm.4 \ nsp.4 \ ${_ntb.4} \ + ${_ntb_hw_amd.4} \ ${_ntb_hw_intel.4} \ ${_ntb_hw_plx.4} \ ${_ntb_transport.4} \ @@ -856,6 +857,7 @@ _xnb.4= xnb.4 _if_ntb.4= if_ntb.4 _ioat.4= ioat.4 _ntb.4= ntb.4 +_ntb_hw_amd.4= ntb_hw_amd.4 _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 Modified: stable/12/share/man/man4/ntb.4 ============================================================================== --- stable/12/share/man/man4/ntb.4 Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/ntb.4 Sun Nov 24 01:27:04 2019 (r355043) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2017 +.Dd August 29, 2019 .Dt NTB 4 .Os .Sh NAME @@ -66,7 +66,7 @@ The default configuration is empty string, which means with all available resources, allowing any driver to attach. .El .Sh DESCRIPTION -Non-Transparent Bridges allow to connect two computer systems with PCIe +Non-Transparent Bridges connect two computer systems with PCIe link(s), providing each of them limited access to others memory space, scratchpad registers and interrupts. The @@ -76,9 +76,10 @@ and splits them between several functions, according t configuration. .Sh SEE ALSO .Xr if_ntb 4 , -.Xr ntb_transport 4 , +.Xr ntb_hw_amd 4 , .Xr ntb_hw_intel 4 , -.Xr ntb_hw_plx 4 +.Xr ntb_hw_plx 4 , +.Xr ntb_transport 4 .Sh AUTHORS .An -nosplit The Copied: stable/12/share/man/man4/ntb_hw_amd.4 (from r351605, head/share/man/man4/ntb_hw_amd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man4/ntb_hw_amd.4 Sun Nov 24 01:27:04 2019 (r355043, copy of r351605, head/share/man/man4/ntb_hw_amd.4) @@ -0,0 +1,94 @@ +.\" +.\" Copyright (c) 2019 Rajesh Kumar +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 29, 2019 +.Dt NTB_HW_AMD 4 +.Os +.Sh NAME +.Nm ntb_hw_amd +.Nd AMD Non-Transparent Bridge driver +.Sh SYNOPSIS +To compile this driver into your kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ntb" +.Cd "device ntb_hw_amd" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ntb_hw_amd_load="YES" +.Ed +.Pp +The following sysctls are supported in this driver +.Bl -ohang +.It Va dev.ntb_hw.X.info +Reading this sysctl will give the basic details like the number of memory +windows, scratchpads and doorbells exposed by the NTB on the local host to +access the devices beyond the bridge. +It also provides details about the masked doorbells, translation address and +size limit of each exposed memory window and link status information. +.El +.Sh DESCRIPTION +The +.Nm ntb_hw_amd +driver provides support for the Non-Transparent Bridge (NTB) hardware in +AMD EPYC processor family. +The Non-Transparent Bridge does not look as a regular PCI bridge, but as PCI +endpoint device, hiding the devices behind it. +The driver hides details of hardware on the other side, but exposes memory windows, +scratchpads and doorbells to access the other side via hardware independent +KPI to +.Xr ntb 4 +subsystem. +.Pp +The hardware provides 2 (both 64-bit) or 3 (one 32-bit and two 64-bit) memory +windows to the other system's memory, up to 16 scratchpad registers and 16 +doorbells to communicate with and interrupt the other system respectively. +.Sh CONFIGURATION +The NTB configuration should be set by BIOS. +This includes enabling NTB, choosing topology (only NTB-to-Root Port +mode is supported now), role of the host in the topology. +This needs to be done on both systems. +.Pp +The BAR size for memory windows is configured to 1 MiB by default. +.Sh SEE ALSO +.Xr if_ntb 4 , +.Xr ntb 4 , +.Xr ntb_transport 4 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was developed by AMD and originally written by +.An Rajesh Kumar Aq Mt rajesh1.kumar@amd.com . +Reviewed by +.An Alexander Motin Aq Mt mav@FreeBSD.org , +.An Conrad E. Meyer Aq Mt cem@FreeBSD.org +and +.An Warner Losh Aq Mt imp@FreeBSD.org . Modified: stable/12/share/man/man4/ntb_transport.4 ============================================================================== --- stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 01:27:04 2019 (r355043) @@ -99,6 +99,7 @@ or 3 plus 1 in case of compact protocol; .Sh SEE ALSO .Xr if_ntb 4 , .Xr ntb 4 , +.Xr ntb_hw_amd 4 , .Xr ntb_hw_intel 4 , .Xr ntb_hw_plx 4 .Sh AUTHORS From owner-svn-src-stable@freebsd.org Sun Nov 24 02:27:51 2019 Return-Path: Delivered-To: svn-src-stable@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 3109D1C7F65; Sun, 24 Nov 2019 02:27:51 +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) server-signature RSA-PSS (4096 bits) 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 47LDbW0RN1z4jsb; Sun, 24 Nov 2019 02:27:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1E451D641; Sun, 24 Nov 2019 02:27:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO2RolI093282; Sun, 24 Nov 2019 02:27:50 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO2RopB093281; Sun, 24 Nov 2019 02:27:50 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201911240227.xAO2RopB093281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 24 Nov 2019 02:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355044 - in stable: 11/usr.sbin/ntp 12/usr.sbin/ntp X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/usr.sbin/ntp 12/usr.sbin/ntp X-SVN-Commit-Revision: 355044 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 02:27:51 -0000 Author: cy Date: Sun Nov 24 02:27:50 2019 New Revision: 355044 URL: https://svnweb.freebsd.org/changeset/base/355044 Log: MFC r354978: Chase r344883. ntp is 4.2.8p13. Modified: stable/11/usr.sbin/ntp/config.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/ntp/config.h Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/ntp/config.h ============================================================================== --- stable/11/usr.sbin/ntp/config.h Sun Nov 24 01:27:04 2019 (r355043) +++ stable/11/usr.sbin/ntp/config.h Sun Nov 24 02:27:50 2019 (r355044) @@ -1474,7 +1474,7 @@ #define PACKAGE_URL "http://www.ntp.org./" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.8p12" +#define PACKAGE_VERSION "4.2.8p13" /* data dir */ #define PERLLIBDIR "/usr/share/ntp/lib" From owner-svn-src-stable@freebsd.org Sun Nov 24 02:27:51 2019 Return-Path: Delivered-To: svn-src-stable@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 7227B1C7F6B; Sun, 24 Nov 2019 02:27:51 +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) server-signature RSA-PSS (4096 bits) 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 47LDbW2S5Vz4jsc; Sun, 24 Nov 2019 02:27:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 378301D642; Sun, 24 Nov 2019 02:27:51 +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 xAO2Rpd7093289; Sun, 24 Nov 2019 02:27:51 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO2RpMt093288; Sun, 24 Nov 2019 02:27:51 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201911240227.xAO2RpMt093288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 24 Nov 2019 02:27: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: r355044 - in stable: 11/usr.sbin/ntp 12/usr.sbin/ntp X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/usr.sbin/ntp 12/usr.sbin/ntp X-SVN-Commit-Revision: 355044 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 02:27:51 -0000 Author: cy Date: Sun Nov 24 02:27:50 2019 New Revision: 355044 URL: https://svnweb.freebsd.org/changeset/base/355044 Log: MFC r354978: Chase r344883. ntp is 4.2.8p13. Modified: stable/12/usr.sbin/ntp/config.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/ntp/config.h Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/ntp/config.h ============================================================================== --- stable/12/usr.sbin/ntp/config.h Sun Nov 24 01:27:04 2019 (r355043) +++ stable/12/usr.sbin/ntp/config.h Sun Nov 24 02:27:50 2019 (r355044) @@ -1477,7 +1477,7 @@ #define PACKAGE_URL "http://www.ntp.org./" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.8p12" +#define PACKAGE_VERSION "4.2.8p13" /* data dir */ #define PERLLIBDIR "/usr/share/ntp/lib" From owner-svn-src-stable@freebsd.org Sun Nov 24 06:46:49 2019 Return-Path: Delivered-To: svn-src-stable@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 D124C1CE132; Sun, 24 Nov 2019 06:46:49 +0000 (UTC) (envelope-from dougm@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) server-signature RSA-PSS (4096 bits) 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 47LLLK54Z1z3CCJ; Sun, 24 Nov 2019 06:46:49 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 9192F20516; Sun, 24 Nov 2019 06:46:49 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO6kn3v046490; Sun, 24 Nov 2019 06:46:49 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO6kn33046488; Sun, 24 Nov 2019 06:46:49 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201911240646.xAO6kn33046488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sun, 24 Nov 2019 06:46: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: r355048 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 355048 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 06:46:49 -0000 Author: dougm Date: Sun Nov 24 06:46:49 2019 New Revision: 355048 URL: https://svnweb.freebsd.org/changeset/base/355048 Log: MFC r354785 The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in turn. Modified: stable/12/sys/vm/vm_map.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Sun Nov 24 06:43:03 2019 (r355047) +++ stable/12/sys/vm/vm_map.c Sun Nov 24 06:46:49 2019 (r355048) @@ -2496,17 +2496,16 @@ again: vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } - if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0) - in_tran = entry; + if ((current->eflags & MAP_ENTRY_IN_TRANSITION) != 0) + in_tran = current; } /* - * Postpone the operation until all in transition map entries - * are stabilized. In-transition entry might already have its - * pages wired and wired_count incremented, but - * MAP_ENTRY_USER_WIRED flag not yet set, and visible to other - * threads because the map lock is dropped. In this case we - * would miss our call to vm_fault_copy_entry(). + * Postpone the operation until all in-transition map entries have + * stabilized. An in-transition entry might already have its pages + * wired and wired_count incremented, but not yet have its + * MAP_ENTRY_USER_WIRED flag set. In which case, we would fail to call + * vm_fault_copy_entry() in the final loop below. */ if (in_tran != NULL) { in_tran->eflags |= MAP_ENTRY_NEEDS_WAKEUP; From owner-svn-src-stable@freebsd.org Sun Nov 24 06:54:17 2019 Return-Path: Delivered-To: svn-src-stable@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 E24861CE3C1; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@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) server-signature RSA-PSS (4096 bits) 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 47LLVx5gktz3Cbn; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A6105206D9; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO6sHu1052220; Sun, 24 Nov 2019 06:54:17 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO6sHVq052219; Sun, 24 Nov 2019 06:54:17 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201911240654.xAO6sHVq052219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sun, 24 Nov 2019 06:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355049 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 355049 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 06:54:18 -0000 Author: dougm Date: Sun Nov 24 06:54:17 2019 New Revision: 355049 URL: https://svnweb.freebsd.org/changeset/base/355049 Log: MFC r354785 The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in turn. Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Sun Nov 24 06:46:49 2019 (r355048) +++ stable/11/sys/vm/vm_map.c Sun Nov 24 06:54:17 2019 (r355049) @@ -2041,17 +2041,16 @@ again: vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } - if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0) - in_tran = entry; + if ((current->eflags & MAP_ENTRY_IN_TRANSITION) != 0) + in_tran = current; } /* - * Postpone the operation until all in transition map entries - * are stabilized. In-transition entry might already have its - * pages wired and wired_count incremented, but - * MAP_ENTRY_USER_WIRED flag not yet set, and visible to other - * threads because the map lock is dropped. In this case we - * would miss our call to vm_fault_copy_entry(). + * Postpone the operation until all in-transition map entries have + * stabilized. An in-transition entry might already have its pages + * wired and wired_count incremented, but not yet have its + * MAP_ENTRY_USER_WIRED flag set. In which case, we would fail to call + * vm_fault_copy_entry() in the final loop below. */ if (in_tran != NULL) { in_tran->eflags |= MAP_ENTRY_NEEDS_WAKEUP; From owner-svn-src-stable@freebsd.org Sun Nov 24 12:27:14 2019 Return-Path: Delivered-To: svn-src-stable@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 3E0721AE0FA; Sun, 24 Nov 2019 12:27:14 +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) server-signature RSA-PSS (4096 bits) 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 47LTv60wSvz3yl9; Sun, 24 Nov 2019 12:27:14 +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 F2A302429B; Sun, 24 Nov 2019 12:27:13 +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 xAOCRDtv047927; Sun, 24 Nov 2019 12:27:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAOCRDg9047926; Sun, 24 Nov 2019 12:27:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911241227.xAOCRDg9047926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Nov 2019 12:27:13 +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: r355051 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 355051 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 12:27:14 -0000 Author: kib Date: Sun Nov 24 12:27:13 2019 New Revision: 355051 URL: https://svnweb.freebsd.org/changeset/base/355051 Log: MFC r354789: kern_exec: p_osrel and p_fctl0 were obliterated by failed execve(2) attempt. Modified: stable/12/sys/kern/kern_exec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_exec.c ============================================================================== --- stable/12/sys/kern/kern_exec.c Sun Nov 24 07:52:35 2019 (r355050) +++ stable/12/sys/kern/kern_exec.c Sun Nov 24 12:27:13 2019 (r355051) @@ -363,7 +363,6 @@ do_execve(struct thread *td, struct image_args *args, struct ucred *oldcred; struct uidinfo *euip = NULL; register_t *stack_base; - int error, i; struct image_params image_params, *imgp; struct vattr attr; int (*img_first)(struct image_params *); @@ -382,6 +381,8 @@ do_execve(struct thread *td, struct image_args *args, #ifdef HWPMC_HOOKS struct pmckern_procexec pe; #endif + int error, i, orig_osrel; + uint32_t orig_fctl0; static const char fexecv_proc_title[] = "(fexecv)"; imgp = &image_params; @@ -407,6 +408,8 @@ do_execve(struct thread *td, struct image_args *args, imgp->attr = &attr; imgp->args = args; oldcred = p->p_ucred; + orig_osrel = p->p_osrel; + orig_fctl0 = p->p_fctl0; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -883,6 +886,11 @@ interpret: SDT_PROBE1(proc, , , exec__success, args->fname); exec_fail_dealloc: + if (error != 0) { + p->p_osrel = orig_osrel; + p->p_fctl0 = orig_fctl0; + } + if (imgp->firstpage != NULL) exec_unmap_first_page(imgp); From owner-svn-src-stable@freebsd.org Sun Nov 24 12:30:42 2019 Return-Path: Delivered-To: svn-src-stable@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 712D91AE384; Sun, 24 Nov 2019 12:30: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) server-signature RSA-PSS (4096 bits) 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 47LTz62MT9z3ywT; Sun, 24 Nov 2019 12:30:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 346A3242B5; Sun, 24 Nov 2019 12:30:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAOCUgOP048155; Sun, 24 Nov 2019 12:30:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAOCUfNb048154; Sun, 24 Nov 2019 12:30:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911241230.xAOCUfNb048154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Nov 2019 12:30: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: r355052 - in stable/12/sys: sys vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: sys vm X-SVN-Commit-Revision: 355052 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 12:30:42 -0000 Author: kib Date: Sun Nov 24 12:30:41 2019 New Revision: 355052 URL: https://svnweb.freebsd.org/changeset/base/355052 Log: MFC r354790: Add elf image flag to disable stack gap. Modified: stable/12/sys/sys/elf_common.h stable/12/sys/vm/vm_map.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Sun Nov 24 12:27:13 2019 (r355051) +++ stable/12/sys/sys/elf_common.h Sun Nov 24 12:30:41 2019 (r355052) @@ -778,6 +778,7 @@ typedef struct { /* NT_FREEBSD_FEATURE_CTL desc[0] bits */ #define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 +#define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Sun Nov 24 12:27:13 2019 (r355051) +++ stable/12/sys/vm/vm_map.c Sun Nov 24 12:30:41 2019 (r355052) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -4114,7 +4115,8 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, addrbos + max_ssize > vm_map_max(map) || addrbos + max_ssize <= addrbos) return (KERN_INVALID_ADDRESS); - sgp = (curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 ? 0 : + sgp = ((curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 || + (curproc->p_fctl0 & NT_FREEBSD_FCTL_STKGAP_DISABLE) != 0) ? 0 : (vm_size_t)stack_guard_page * PAGE_SIZE; if (sgp >= max_ssize) return (KERN_INVALID_ARGUMENT); @@ -4251,7 +4253,8 @@ retry: } else { return (KERN_FAILURE); } - guard = (curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 ? 0 : + guard = ((curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 || + (curproc->p_fctl0 & NT_FREEBSD_FCTL_STKGAP_DISABLE) != 0) ? 0 : gap_entry->next_read; max_grow = gap_entry->end - gap_entry->start; if (guard > max_grow) From owner-svn-src-stable@freebsd.org Sun Nov 24 12:35:17 2019 Return-Path: Delivered-To: svn-src-stable@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 9201C1AE659; Sun, 24 Nov 2019 12:35:17 +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) server-signature RSA-PSS (4096 bits) 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 47LV4P3Nv9z40PX; Sun, 24 Nov 2019 12:35:17 +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 5201624470; Sun, 24 Nov 2019 12:35:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAOCZHGw053768; Sun, 24 Nov 2019 12:35:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAOCZHL7053767; Sun, 24 Nov 2019 12:35:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911241235.xAOCZHL7053767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Nov 2019 12:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355053 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 355053 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 12:35:17 -0000 Author: kib Date: Sun Nov 24 12:35:16 2019 New Revision: 355053 URL: https://svnweb.freebsd.org/changeset/base/355053 Log: MFC r354789: kern_exec: p_osrel and p_fctl0 were obliterated by failed execve(2) attempt. Modified: stable/11/sys/kern/kern_exec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_exec.c ============================================================================== --- stable/11/sys/kern/kern_exec.c Sun Nov 24 12:30:41 2019 (r355052) +++ stable/11/sys/kern/kern_exec.c Sun Nov 24 12:35:16 2019 (r355053) @@ -361,7 +361,6 @@ do_execve(struct thread *td, struct image_args *args, struct ucred *oldcred; struct uidinfo *euip = NULL; register_t *stack_base; - int error, i; struct image_params image_params, *imgp; struct vattr attr; int (*img_first)(struct image_params *); @@ -382,6 +381,7 @@ do_execve(struct thread *td, struct image_args *args, #ifdef HWPMC_HOOKS struct pmckern_procexec pe; #endif + int error, i, orig_osrel; static const char fexecv_proc_title[] = "(fexecv)"; imgp = &image_params; @@ -407,6 +407,7 @@ do_execve(struct thread *td, struct image_args *args, imgp->attr = &attr; imgp->args = args; oldcred = p->p_ucred; + orig_osrel = p->p_osrel; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -892,6 +893,10 @@ interpret: SDT_PROBE1(proc, , , exec__success, args->fname); exec_fail_dealloc: + if (error != 0) { + p->p_osrel = orig_osrel; + } + if (imgp->firstpage != NULL) exec_unmap_first_page(imgp); From owner-svn-src-stable@freebsd.org Mon Nov 25 00:33:57 2019 Return-Path: Delivered-To: svn-src-stable@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 165DB1C1C56; Mon, 25 Nov 2019 00:33:57 +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) server-signature RSA-PSS (4096 bits) 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 47Lp1c6bqcz3D0h; Mon, 25 Nov 2019 00:33:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C60E349DD; Mon, 25 Nov 2019 00:33:56 +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 xAP0Xu0d080868; Mon, 25 Nov 2019 00:33:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP0XuZi080867; Mon, 25 Nov 2019 00:33:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201911250033.xAP0XuZi080867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Nov 2019 00:33: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: r355072 - stable/12/usr.bin/top X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.bin/top X-SVN-Commit-Revision: 355072 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 00:33:57 -0000 Author: markj Date: Mon Nov 25 00:33:56 2019 New Revision: 355072 URL: https://svnweb.freebsd.org/changeset/base/355072 Log: MFC r354829: Add a "B" suffix to memory quantities in top(1) output. Modified: stable/12/usr.bin/top/utils.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/top/utils.c ============================================================================== --- stable/12/usr.bin/top/utils.c Sun Nov 24 23:46:29 2019 (r355071) +++ stable/12/usr.bin/top/utils.c Mon Nov 25 00:33:56 2019 (r355072) @@ -291,13 +291,14 @@ format_time(long seconds) char * format_k(int64_t amt) { - static char retarray[NUM_STRINGS][16]; - static int index_ = 0; - char *ret; + static char retarray[NUM_STRINGS][16]; + static int index_ = 0; + char *ret; - ret = retarray[index_]; + ret = retarray[index_]; index_ = (index_ + 1) % NUM_STRINGS; - humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE); + humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE | + HN_B); return (ret); } From owner-svn-src-stable@freebsd.org Mon Nov 25 00:35:00 2019 Return-Path: Delivered-To: svn-src-stable@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 4F5F61C1D0A; Mon, 25 Nov 2019 00:35: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) server-signature RSA-PSS (4096 bits) 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 47Lp2r1R7bz3D70; Mon, 25 Nov 2019 00:35: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 1483C49DF; Mon, 25 Nov 2019 00:35: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 xAP0Yxsi080957; Mon, 25 Nov 2019 00:34:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP0YxDV080956; Mon, 25 Nov 2019 00:34:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201911250034.xAP0YxDV080956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Nov 2019 00:34: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: r355073 - stable/12/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Commit-Revision: 355073 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 00:35:00 -0000 Author: markj Date: Mon Nov 25 00:34:59 2019 New Revision: 355073 URL: https://svnweb.freebsd.org/changeset/base/355073 Log: MFC r354822: Fix inconsistencies in anonymous DOF files. Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Mon Nov 25 00:33:56 2019 (r355072) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Mon Nov 25 00:34:59 2019 (r355073) @@ -681,7 +681,7 @@ anon_prog(const dtrace_cmd_t *dcp, dof_hdr_t *dof, int dfatal("failed to create DOF image for '%s'", dcp->dc_name); p = (uchar_t *)dof; - q = p + dof->dofh_loadsz; + q = p + dof->dofh_filesz; #ifdef __FreeBSD__ /* From owner-svn-src-stable@freebsd.org Mon Nov 25 01:32:50 2019 Return-Path: Delivered-To: svn-src-stable@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 C00CB1C388F; Mon, 25 Nov 2019 01:32:50 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 47LqKZ4g8sz3HKD; Mon, 25 Nov 2019 01:32:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 830A054F9; Mon, 25 Nov 2019 01:32:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAP1Wo7Q016876; Mon, 25 Nov 2019 01:32:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP1Wo8Y016875; Mon, 25 Nov 2019 01:32:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911250132.xAP1Wo8Y016875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Nov 2019 01:32:50 +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: r355075 - stable/12/contrib/amd/amd X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/contrib/amd/amd X-SVN-Commit-Revision: 355075 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 01:32:50 -0000 Author: emaste Date: Mon Nov 25 01:32:50 2019 New Revision: 355075 URL: https://svnweb.freebsd.org/changeset/base/355075 Log: MFC r354997: add deprecation notice to amd man page Clarify the deprecation notice in amd.8. amd will be removed from the FreeBSD base system before FreeBSD 13.0. Discussed with: cy Modified: stable/12/contrib/amd/amd/amd.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/amd/amd/amd.8 ============================================================================== --- stable/12/contrib/amd/amd/amd.8 Mon Nov 25 01:00:51 2019 (r355074) +++ stable/12/contrib/amd/amd/amd.8 Mon Nov 25 01:32:50 2019 (r355075) @@ -36,7 +36,7 @@ .\" File: am-utils/amd/amd.8 .\" $FreeBSD$ .\" -.Dd February 26, 2016 +.Dd November 22, 2019 .Dt AMD 8 .Os .Sh NAME @@ -72,10 +72,17 @@ .Ar ... .Sh DESCRIPTION .Bf -symbolic -This daemon is obsolete. +The +.Nm +daemon in the +.Fx +base system is deprecated and will be removed before +.Fx 13.0 . Users are advised to use .Xr autofs 5 -instead. +or the +.Pa sysutils/am-utils +port or package instead. .Ef .Pp The From owner-svn-src-stable@freebsd.org Mon Nov 25 03:38:50 2019 Return-Path: Delivered-To: svn-src-stable@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 0A5A21C69CE; Mon, 25 Nov 2019 03:38:50 +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) server-signature RSA-PSS (4096 bits) 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 47Lt6x6XvGz3NWJ; Mon, 25 Nov 2019 03:38:49 +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 C42336AD9; Mon, 25 Nov 2019 03:38:49 +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 xAP3cna2088851; Mon, 25 Nov 2019 03:38:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP3cnni088850; Mon, 25 Nov 2019 03:38:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911250338.xAP3cnni088850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 25 Nov 2019 03:38: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: r355078 - stable/12/sbin/camcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sbin/camcontrol X-SVN-Commit-Revision: 355078 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 03:38:50 -0000 Author: mav Date: Mon Nov 25 03:38:49 2019 New Revision: 355078 URL: https://svnweb.freebsd.org/changeset/base/355078 Log: MFC r354999: Fix off-by-one error in HPA/AMA maximum reporting. Before my refactoring the code reported value as maximum number of sectors, adding one to the maximum sector number returned by respective command. While this difference is somewhat confusing, restore previous behavior. Modified: stable/12/sbin/camcontrol/camcontrol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/12/sbin/camcontrol/camcontrol.c Mon Nov 25 03:09:06 2019 (r355077) +++ stable/12/sbin/camcontrol/camcontrol.c Mon Nov 25 03:38:49 2019 (r355078) @@ -1980,7 +1980,7 @@ atahpa_proc_resp(struct cam_device *device, union ccb if (hpasize != NULL) { if (retval == 2 || retval == 6) return (1); - *hpasize = lba; + *hpasize = lba + 1; } return (0); From owner-svn-src-stable@freebsd.org Mon Nov 25 03:39:14 2019 Return-Path: Delivered-To: svn-src-stable@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 943F51C6A4C; Mon, 25 Nov 2019 03:39:14 +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) server-signature RSA-PSS (4096 bits) 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 47Lt7Q3WT9z3NdC; Mon, 25 Nov 2019 03:39:14 +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 5C0386ADB; Mon, 25 Nov 2019 03:39:14 +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 xAP3dERq088926; Mon, 25 Nov 2019 03:39:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP3dEgt088925; Mon, 25 Nov 2019 03:39:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911250339.xAP3dEgt088925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 25 Nov 2019 03:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355079 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sbin/camcontrol X-SVN-Commit-Revision: 355079 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 03:39:14 -0000 Author: mav Date: Mon Nov 25 03:39:13 2019 New Revision: 355079 URL: https://svnweb.freebsd.org/changeset/base/355079 Log: MFC r354999: Fix off-by-one error in HPA/AMA maximum reporting. Before my refactoring the code reported value as maximum number of sectors, adding one to the maximum sector number returned by respective command. While this difference is somewhat confusing, restore previous behavior. Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Mon Nov 25 03:38:49 2019 (r355078) +++ stable/11/sbin/camcontrol/camcontrol.c Mon Nov 25 03:39:13 2019 (r355079) @@ -1813,7 +1813,7 @@ atahpa_proc_resp(struct cam_device *device, union ccb if (hpasize != NULL) { if (retval == 2 || retval == 6) return (1); - *hpasize = lba; + *hpasize = lba + 1; } return (0); From owner-svn-src-stable@freebsd.org Mon Nov 25 03:49:39 2019 Return-Path: Delivered-To: svn-src-stable@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 59AD71C6E81; Mon, 25 Nov 2019 03:49:39 +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) server-signature RSA-PSS (4096 bits) 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 47LtMR1cjsz3P8l; Mon, 25 Nov 2019 03:49:39 +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 1AABD6CA2; Mon, 25 Nov 2019 03:49:39 +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 xAP3nciG094842; Mon, 25 Nov 2019 03:49:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP3nc2q094841; Mon, 25 Nov 2019 03:49:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201911250349.xAP3nc2q094841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 25 Nov 2019 03:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355080 - in stable: 11/lib/libc/secure 12/lib/libc/secure X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libc/secure 12/lib/libc/secure X-SVN-Commit-Revision: 355080 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 03:49:39 -0000 Author: kevans Date: Mon Nov 25 03:49:38 2019 New Revision: 355080 URL: https://svnweb.freebsd.org/changeset/base/355080 Log: MFC r354669, r354672, r354689: move __stack_chk_guard constructor r354669: ssp: add a priority to the __stack_chk_guard constructor First, this commit is a NOP on GCC <= 4.x; this decidedly doesn't work cleanly on GCC 4.2, and it will be gone soon anyways so I chose not to dump time into figuring out if there's a way to make it work. xtoolchain-gcc, clocking in as GCC6, can cope with it just fine and later versions are also generally ok with the syntax. I suspect very few users are running GCC4.2 built worlds and also experiencing potential fallout from the status quo. For dynamically linked applications, this change also means very little. rtld will run libc ctors before most others, so the situation is approximately a NOP for these as well. The real cause for this change is statically linked applications doing almost questionable things in their constructors. qemu-user-static, for instance, creates a thread in a global constructor for their async rcu callbacks. In general, this works in other places- - On OpenBSD, __stack_chk_guard is stored in an .openbsd.randomdata section that's initialized by the kernel in the static case, or ld.so in the dynamic case - On Linux, __stack_chk_guard is apparently stored in TLS and such a problem is circumvented there because the value is presumed stable in the new thread. On FreeBSD, the rcu thread creation ctor and __guard_setup are both unmarked priority. qemu-user-static spins up the rcu thread prior to __guard_setup which starts making function calls- some of these are sprinkled with the canary. In the middle of one of these functions, __guard_setup is invoked in the main thread and __stack_chk_guard changes- qemu-user-static is promptly terminated for an SSP violation that didn't actually happen. This is not an all-too-common problem. We circumvent it here by giving the __stack_chk_guard constructor a solid priority. 200 was chosen because that gives static applications ample range (down to 101) for working around it if they really need to. I suspect most applications will "just work" as expected- the default/non-prioritized flavor of __constructor__ functions run last, and the canary is generally not expected to change as of this point at the very least. This took approximately three weeks of spare time debugging to pin down. r354672: ssp: rework the logic to use priority=200 on clang builds The preproc logic was added at the last minute to appease GCC 4.2, and kevans@ did clearly not go back and double-check that the logic worked out for clang builds to use the new variant. It turns out that clang defines __GNUC__ == 4. Flip it around and check __clang__ as well, leaving a note to remove it later. r354689: ssp: further refine the conditional used for constructor priority __has_attribute(__constructor__) is a better test for clang than defined(__clang__). Switch to it instead. While we're already here and touching it, pfg@ nailed down when GCC actually introduced the priority argument -- 4.3. Use that instead of our hammer-guess of GCC >= 5 for the sake of correctness. PR: 241905 Modified: stable/11/lib/libc/secure/stack_protector.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libc/secure/stack_protector.c Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libc/secure/stack_protector.c ============================================================================== --- stable/11/lib/libc/secure/stack_protector.c Mon Nov 25 03:39:13 2019 (r355079) +++ stable/11/lib/libc/secure/stack_protector.c Mon Nov 25 03:49:38 2019 (r355080) @@ -40,11 +40,29 @@ __FBSDID("$FreeBSD$"); #include #include "libc_private.h" +/* + * We give __guard_setup a defined priority early on so that statically linked + * applications have a defined priority at which __stack_chk_guard will be + * getting initialized. This will not matter to most applications, because + * they're either not usually statically linked or they simply don't do things + * in constructors that would be adversely affected by their positioning with + * respect to this initialization. + * + * This conditional should be removed when GCC 4.2 is removed. + */ +#if __has_attribute(__constructor__) || __GNUC_PREREQ__(4, 3) +#define _GUARD_SETUP_CTOR_ATTR \ + __attribute__((__constructor__ (200), __used__)); +#else +#define _GUARD_SETUP_CTOR_ATTR \ + __attribute__((__constructor__, __used__)); +#endif + extern int __sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen); long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0}; -static void __guard_setup(void) __attribute__((__constructor__, __used__)); +static void __guard_setup(void) _GUARD_SETUP_CTOR_ATTR; static void __fail(const char *); void __stack_chk_fail(void); void __chk_fail(void); From owner-svn-src-stable@freebsd.org Mon Nov 25 03:49:39 2019 Return-Path: Delivered-To: svn-src-stable@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 8E5D21C6E85; Mon, 25 Nov 2019 03:49:39 +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) server-signature RSA-PSS (4096 bits) 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 47LtMR3Hbxz3P8m; Mon, 25 Nov 2019 03:49:39 +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 527446CA3; Mon, 25 Nov 2019 03:49:39 +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 xAP3ndUV094848; Mon, 25 Nov 2019 03:49:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP3nddG094847; Mon, 25 Nov 2019 03:49:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201911250349.xAP3nddG094847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 25 Nov 2019 03:49: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: r355080 - in stable: 11/lib/libc/secure 12/lib/libc/secure X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libc/secure 12/lib/libc/secure X-SVN-Commit-Revision: 355080 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 03:49:39 -0000 Author: kevans Date: Mon Nov 25 03:49:38 2019 New Revision: 355080 URL: https://svnweb.freebsd.org/changeset/base/355080 Log: MFC r354669, r354672, r354689: move __stack_chk_guard constructor r354669: ssp: add a priority to the __stack_chk_guard constructor First, this commit is a NOP on GCC <= 4.x; this decidedly doesn't work cleanly on GCC 4.2, and it will be gone soon anyways so I chose not to dump time into figuring out if there's a way to make it work. xtoolchain-gcc, clocking in as GCC6, can cope with it just fine and later versions are also generally ok with the syntax. I suspect very few users are running GCC4.2 built worlds and also experiencing potential fallout from the status quo. For dynamically linked applications, this change also means very little. rtld will run libc ctors before most others, so the situation is approximately a NOP for these as well. The real cause for this change is statically linked applications doing almost questionable things in their constructors. qemu-user-static, for instance, creates a thread in a global constructor for their async rcu callbacks. In general, this works in other places- - On OpenBSD, __stack_chk_guard is stored in an .openbsd.randomdata section that's initialized by the kernel in the static case, or ld.so in the dynamic case - On Linux, __stack_chk_guard is apparently stored in TLS and such a problem is circumvented there because the value is presumed stable in the new thread. On FreeBSD, the rcu thread creation ctor and __guard_setup are both unmarked priority. qemu-user-static spins up the rcu thread prior to __guard_setup which starts making function calls- some of these are sprinkled with the canary. In the middle of one of these functions, __guard_setup is invoked in the main thread and __stack_chk_guard changes- qemu-user-static is promptly terminated for an SSP violation that didn't actually happen. This is not an all-too-common problem. We circumvent it here by giving the __stack_chk_guard constructor a solid priority. 200 was chosen because that gives static applications ample range (down to 101) for working around it if they really need to. I suspect most applications will "just work" as expected- the default/non-prioritized flavor of __constructor__ functions run last, and the canary is generally not expected to change as of this point at the very least. This took approximately three weeks of spare time debugging to pin down. r354672: ssp: rework the logic to use priority=200 on clang builds The preproc logic was added at the last minute to appease GCC 4.2, and kevans@ did clearly not go back and double-check that the logic worked out for clang builds to use the new variant. It turns out that clang defines __GNUC__ == 4. Flip it around and check __clang__ as well, leaving a note to remove it later. r354689: ssp: further refine the conditional used for constructor priority __has_attribute(__constructor__) is a better test for clang than defined(__clang__). Switch to it instead. While we're already here and touching it, pfg@ nailed down when GCC actually introduced the priority argument -- 4.3. Use that instead of our hammer-guess of GCC >= 5 for the sake of correctness. PR: 241905 Modified: stable/12/lib/libc/secure/stack_protector.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libc/secure/stack_protector.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/secure/stack_protector.c ============================================================================== --- stable/12/lib/libc/secure/stack_protector.c Mon Nov 25 03:39:13 2019 (r355079) +++ stable/12/lib/libc/secure/stack_protector.c Mon Nov 25 03:49:38 2019 (r355080) @@ -40,11 +40,29 @@ __FBSDID("$FreeBSD$"); #include #include "libc_private.h" +/* + * We give __guard_setup a defined priority early on so that statically linked + * applications have a defined priority at which __stack_chk_guard will be + * getting initialized. This will not matter to most applications, because + * they're either not usually statically linked or they simply don't do things + * in constructors that would be adversely affected by their positioning with + * respect to this initialization. + * + * This conditional should be removed when GCC 4.2 is removed. + */ +#if __has_attribute(__constructor__) || __GNUC_PREREQ__(4, 3) +#define _GUARD_SETUP_CTOR_ATTR \ + __attribute__((__constructor__ (200), __used__)); +#else +#define _GUARD_SETUP_CTOR_ATTR \ + __attribute__((__constructor__, __used__)); +#endif + extern int __sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen); long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0}; -static void __guard_setup(void) __attribute__((__constructor__, __used__)); +static void __guard_setup(void) _GUARD_SETUP_CTOR_ATTR; static void __fail(const char *); void __stack_chk_fail(void); void __chk_fail(void); From owner-svn-src-stable@freebsd.org Mon Nov 25 06:16:54 2019 Return-Path: Delivered-To: svn-src-stable@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 8331D1C9DFE; Mon, 25 Nov 2019 06:16:54 +0000 (UTC) (envelope-from avg@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) server-signature RSA-PSS (4096 bits) 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 47LxdL2NvXz41DL; Mon, 25 Nov 2019 06:16:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3124C86FE; Mon, 25 Nov 2019 06:16:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAP6Gs4A082035; Mon, 25 Nov 2019 06:16:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP6GsqO082034; Mon, 25 Nov 2019 06:16:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201911250616.xAP6GsqO082034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Nov 2019 06:16:54 +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: r355081 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 355081 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 06:16:54 -0000 Author: avg Date: Mon Nov 25 06:16:53 2019 New Revision: 355081 URL: https://svnweb.freebsd.org/changeset/base/355081 Log: MFC r354619: db_nextframe/amd64: remove TRAP_INTERRUPT frame type Modified: stable/12/sys/amd64/amd64/db_trace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/12/sys/amd64/amd64/db_trace.c Mon Nov 25 03:49:38 2019 (r355080) +++ stable/12/sys/amd64/amd64/db_trace.c Mon Nov 25 06:16:53 2019 (r355081) @@ -123,7 +123,6 @@ db_frame(struct db_variable *vp, db_expr_t *valuep, in #define TRAP 1 #define INTERRUPT 2 #define SYSCALL 3 -#define TRAP_INTERRUPT 5 static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *); static void db_print_stack_entry(const char *, db_addr_t, void *); @@ -218,13 +217,6 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s else if (strcmp(name, "Xint0x80_syscall") == 0) frame_type = SYSCALL; #endif - /* XXX: These are interrupts with trap frames. */ - else if (strcmp(name, "Xtimerint") == 0 || - strcmp(name, "Xcpustop") == 0 || - strcmp(name, "Xcpususpend") == 0 || - strcmp(name, "Xrendezvous") == 0 || - strcmp(name, "Xipi_intr_bitmap_handler") == 0) - frame_type = TRAP_INTERRUPT; } /* @@ -256,7 +248,6 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s db_printf("--- syscall"); decode_syscall(tf->tf_rax, td); break; - case TRAP_INTERRUPT: case INTERRUPT: db_printf("--- interrupt"); break; From owner-svn-src-stable@freebsd.org Mon Nov 25 09:43:39 2019 Return-Path: Delivered-To: svn-src-stable@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 D5DFE1CE9B8; Mon, 25 Nov 2019 09:43: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) server-signature RSA-PSS (4096 bits) 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 47M2Cv5Hf2z4DSH; Mon, 25 Nov 2019 09:43: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 9A116ACB0; Mon, 25 Nov 2019 09:43: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 xAP9hdNS008476; Mon, 25 Nov 2019 09:43:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP9haTI008463; Mon, 25 Nov 2019 09:43:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911250943.xAP9haTI008463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Nov 2019 09:43:36 +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: r355086 - in stable/12/sys/x86: include iommu x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/x86: include iommu x86 X-SVN-Commit-Revision: 355086 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 09:43:39 -0000 Author: kib Date: Mon Nov 25 09:43:36 2019 New Revision: 355086 URL: https://svnweb.freebsd.org/changeset/base/355086 Log: MFC r354830: bus_dma_dmar_set_buswide(9): KPI to indicate that the whole dmar context should share page tables. Modified: stable/12/sys/x86/include/bus_dma.h stable/12/sys/x86/iommu/busdma_dmar.c stable/12/sys/x86/iommu/intel_ctx.c stable/12/sys/x86/iommu/intel_dmar.h stable/12/sys/x86/iommu/intel_drv.c stable/12/sys/x86/iommu/intel_gas.c stable/12/sys/x86/iommu/intel_idpgtbl.c stable/12/sys/x86/iommu/intel_intrmap.c stable/12/sys/x86/iommu/intel_qi.c stable/12/sys/x86/iommu/intel_quirks.c stable/12/sys/x86/iommu/intel_utils.c stable/12/sys/x86/x86/busdma_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/bus_dma.h ============================================================================== --- stable/12/sys/x86/include/bus_dma.h Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/include/bus_dma.h Mon Nov 25 09:43:36 2019 (r355086) @@ -179,5 +179,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); } +bool bus_dma_dmar_set_buswide(device_t dev); + #endif /* !_X86_BUS_DMA_H_ */ Modified: stable/12/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/12/sys/x86/iommu/busdma_dmar.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/busdma_dmar.c Mon Nov 25 09:43:36 2019 (r355086) @@ -289,6 +289,34 @@ dmar_get_dma_tag(device_t dev, device_t child) return (res); } +bool +bus_dma_dmar_set_buswide(device_t dev) +{ + struct dmar_unit *dmar; + device_t parent; + u_int busno, slot, func; + + parent = device_get_parent(dev); + if (device_get_devclass(parent) != devclass_find("pci")) + return (false); + dmar = dmar_find(dev, bootverbose); + if (dmar == NULL) + return (false); + busno = pci_get_bus(dev); + slot = pci_get_slot(dev); + func = pci_get_function(dev); + if (slot != 0 || func != 0) { + if (bootverbose) { + device_printf(dev, + "dmar%d pci%d:%d:%d requested buswide busdma\n", + dmar->unit, busno, slot, func); + } + return (false); + } + dmar_set_buswide_ctx(dmar, busno); + return (true); +} + static MALLOC_DEFINE(M_DMAR_DMAMAP, "dmar_dmamap", "Intel DMAR DMA Map"); static void dmar_bus_schedule_dmamap(struct dmar_unit *unit, Modified: stable/12/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/12/sys/x86/iommu/intel_ctx.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_ctx.c Mon Nov 25 09:43:36 2019 (r355086) @@ -67,8 +67,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context"); @@ -141,20 +141,9 @@ ctx_tag_init(struct dmar_ctx *ctx, device_t dev) } static void -ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move) +ctx_id_entry_init_one(dmar_ctx_entry_t *ctxp, struct dmar_domain *domain, + vm_page_t ctx_root) { - struct dmar_unit *unit; - struct dmar_domain *domain; - vm_page_t ctx_root; - - domain = ctx->domain; - unit = domain->dmar; - KASSERT(move || (ctxp->ctx1 == 0 && ctxp->ctx2 == 0), - ("dmar%d: initialized ctx entry %d:%d:%d 0x%jx 0x%jx", - unit->unit, pci_get_bus(ctx->ctx_tag.owner), - pci_get_slot(ctx->ctx_tag.owner), - pci_get_function(ctx->ctx_tag.owner), - ctxp->ctx1, ctxp->ctx2)); /* * For update due to move, the store is not atomic. It is * possible that DMAR read upper doubleword, while low @@ -166,17 +155,49 @@ ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry */ dmar_pte_store1(&ctxp->ctx2, DMAR_CTX2_DID(domain->domain) | domain->awlvl); + if (ctx_root == NULL) { + dmar_pte_store1(&ctxp->ctx1, DMAR_CTX1_T_PASS | DMAR_CTX1_P); + } else { + dmar_pte_store1(&ctxp->ctx1, DMAR_CTX1_T_UNTR | + (DMAR_CTX1_ASR_MASK & VM_PAGE_TO_PHYS(ctx_root)) | + DMAR_CTX1_P); + } +} + +static void +ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move, + int busno) +{ + struct dmar_unit *unit; + struct dmar_domain *domain; + vm_page_t ctx_root; + int i; + + domain = ctx->domain; + unit = domain->dmar; + KASSERT(move || (ctxp->ctx1 == 0 && ctxp->ctx2 == 0), + ("dmar%d: initialized ctx entry %d:%d:%d 0x%jx 0x%jx", + unit->unit, busno, pci_get_slot(ctx->ctx_tag.owner), + pci_get_function(ctx->ctx_tag.owner), + ctxp->ctx1, ctxp->ctx2)); + if ((domain->flags & DMAR_DOMAIN_IDMAP) != 0 && (unit->hw_ecap & DMAR_ECAP_PT) != 0) { KASSERT(domain->pgtbl_obj == NULL, ("ctx %p non-null pgtbl_obj", ctx)); - dmar_pte_store1(&ctxp->ctx1, DMAR_CTX1_T_PASS | DMAR_CTX1_P); + ctx_root = NULL; } else { ctx_root = dmar_pgalloc(domain->pgtbl_obj, 0, DMAR_PGF_NOALLOC); - dmar_pte_store1(&ctxp->ctx1, DMAR_CTX1_T_UNTR | - (DMAR_CTX1_ASR_MASK & VM_PAGE_TO_PHYS(ctx_root)) | - DMAR_CTX1_P); } + + if (dmar_is_buswide_ctx(unit, busno)) { + MPASS(!move); + for (i = 0; i <= PCI_BUSMAX; i++) { + ctx_id_entry_init_one(&ctxp[i], domain, ctx_root); + } + } else { + ctx_id_entry_init_one(ctxp, domain, ctx_root); + } dmar_flush_ctx_to_ram(unit, ctxp); } @@ -444,6 +465,9 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t enable = false; TD_PREP_PINNED_ASSERT; DMAR_LOCK(dmar); + KASSERT(!dmar_is_buswide_ctx(dmar, bus) || (slot == 0 && func == 0), + ("dmar%d pci%d:%d:%d get_ctx for buswide", dmar->unit, bus, + slot, func)); ctx = dmar_find_ctx_locked(dmar, rid); error = 0; if (ctx == NULL) { @@ -492,7 +516,7 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t if (LIST_EMPTY(&dmar->domains)) enable = true; LIST_INSERT_HEAD(&dmar->domains, domain, link); - ctx_id_entry_init(ctx, ctxp, false); + ctx_id_entry_init(ctx, ctxp, false, bus); if (dev != NULL) { device_printf(dev, "dmar%d pci%d:%d:%d:%d rid %x domain %d mgaw %d " @@ -597,7 +621,7 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, st dmar_ctx_unlink(ctx); ctx->domain = domain; dmar_ctx_link(ctx); - ctx_id_entry_init(ctx, ctxp, true); + ctx_id_entry_init(ctx, ctxp, true, PCI_BUSMAX + 100); dmar_unmap_pgtbl(sf); error = dmar_flush_for_ctx_entry(dmar, true); /* If flush failed, rolling back would not work as well. */ Modified: stable/12/sys/x86/iommu/intel_dmar.h ============================================================================== --- stable/12/sys/x86/iommu/intel_dmar.h Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_dmar.h Mon Nov 25 09:43:36 2019 (r355086) @@ -239,6 +239,15 @@ struct dmar_unit { struct taskqueue *delayed_taskqueue; int dma_enabled; + + /* + * Bitmap of buses for which context must ignore slot:func, + * duplicating the page table pointer into all context table + * entries. This is a client-controlled quirk to support some + * NTBs. + */ + uint32_t buswide_ctxs[(PCI_BUSMAX + 1) / NBBY / sizeof(uint32_t)]; + }; #define DMAR_LOCK(dmar) mtx_lock(&(dmar)->lock) @@ -376,6 +385,9 @@ void dmar_quirks_pre_use(struct dmar_unit *dmar); int dmar_init_irt(struct dmar_unit *unit); void dmar_fini_irt(struct dmar_unit *unit); + +void dmar_set_buswide_ctx(struct dmar_unit *unit, u_int busno); +bool dmar_is_buswide_ctx(struct dmar_unit *unit, u_int busno); #define DMAR_GM_CANWAIT 0x0001 #define DMAR_GM_CANSPLIT 0x0002 Modified: stable/12/sys/x86/iommu/intel_drv.c ============================================================================== --- stable/12/sys/x86/iommu/intel_drv.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_drv.c Mon Nov 25 09:43:36 2019 (r355086) @@ -68,9 +68,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include +#include #ifdef DEV_APIC #include "pcib_if.h" @@ -593,6 +593,26 @@ static driver_t dmar_driver = { DRIVER_MODULE(dmar, acpi, dmar_driver, dmar_devclass, 0, 0); MODULE_DEPEND(dmar, acpi, 1, 1, 1); + +void +dmar_set_buswide_ctx(struct dmar_unit *unit, u_int busno) +{ + + MPASS(busno <= PCI_BUSMAX); + DMAR_LOCK(unit); + unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] |= + 1 << (busno % (NBBY * sizeof(uint32_t))); + DMAR_UNLOCK(unit); +} + +bool +dmar_is_buswide_ctx(struct dmar_unit *unit, u_int busno) +{ + + MPASS(busno <= PCI_BUSMAX); + return ((unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] & + (1U << (busno % (NBBY * sizeof(uint32_t))))) != 0); +} static void dmar_print_path(int busno, int depth, const ACPI_DMAR_PCI_PATH *path) Modified: stable/12/sys/x86/iommu/intel_gas.c ============================================================================== --- stable/12/sys/x86/iommu/intel_gas.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_gas.c Mon Nov 25 09:43:36 2019 (r355086) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* Modified: stable/12/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/12/sys/x86/iommu/intel_idpgtbl.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_idpgtbl.c Mon Nov 25 09:43:36 2019 (r355086) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static int domain_unmap_buf_locked(struct dmar_domain *domain, Modified: stable/12/sys/x86/iommu/intel_intrmap.c ============================================================================== --- stable/12/sys/x86/iommu/intel_intrmap.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_intrmap.c Mon Nov 25 09:43:36 2019 (r355086) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/12/sys/x86/iommu/intel_qi.c ============================================================================== --- stable/12/sys/x86/iommu/intel_qi.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_qi.c Mon Nov 25 09:43:36 2019 (r355086) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static bool Modified: stable/12/sys/x86/iommu/intel_quirks.c ============================================================================== --- stable/12/sys/x86/iommu/intel_quirks.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_quirks.c Mon Nov 25 09:43:36 2019 (r355086) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/12/sys/x86/iommu/intel_utils.c ============================================================================== --- stable/12/sys/x86/iommu/intel_utils.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/iommu/intel_utils.c Mon Nov 25 09:43:36 2019 (r355086) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include u_int Modified: stable/12/sys/x86/x86/busdma_machdep.c ============================================================================== --- stable/12/sys/x86/x86/busdma_machdep.c Mon Nov 25 07:48:16 2019 (r355085) +++ stable/12/sys/x86/x86/busdma_machdep.c Mon Nov 25 09:43:36 2019 (r355086) @@ -33,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" + #include #include #include @@ -245,3 +247,10 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (tc->impl->tag_destroy(dmat)); } +#ifndef ACPI_DMAR +bool +bus_dma_dmar_set_buswide(device_t dev) +{ + return (false); +} +#endif From owner-svn-src-stable@freebsd.org Mon Nov 25 09:53:51 2019 Return-Path: Delivered-To: svn-src-stable@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 04B4A1CF0C1; Mon, 25 Nov 2019 09:53:51 +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) server-signature RSA-PSS (4096 bits) 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 47M2Rf6C3vz4FBd; Mon, 25 Nov 2019 09:53:50 +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 B8FAAAE79; Mon, 25 Nov 2019 09:53:50 +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 xAP9ro2u014732; Mon, 25 Nov 2019 09:53:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAP9ron1014729; Mon, 25 Nov 2019 09:53:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911250953.xAP9ron1014729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Nov 2019 09:53:50 +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: r355087 - in stable/12/sys: dev/hwpmc x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: dev/hwpmc x86/include x86/x86 X-SVN-Commit-Revision: 355087 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 09:53:51 -0000 Author: kib Date: Mon Nov 25 09:53:49 2019 New Revision: 355087 URL: https://svnweb.freebsd.org/changeset/base/355087 Log: MFC r354828: Add x86 msr tweak KPI. Modified: stable/12/sys/dev/hwpmc/hwpmc_core.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/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_core.c Mon Nov 25 09:43:36 2019 (r355086) +++ stable/12/sys/dev/hwpmc/hwpmc_core.c Mon Nov 25 09:53:49 2019 (r355087) @@ -220,15 +220,6 @@ iaf_reload_count_to_perfctr_value(pmc_value_t rlc) return (1ULL << core_iaf_width) - rlc; } -static void -tweak_tsx_force_abort(void *arg) -{ - u_int val; - - val = (uintptr_t)arg; - wrmsr(MSR_TSX_FORCE_ABORT, val); -} - static int iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) @@ -270,7 +261,8 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if ((cpu_stdext_feature3 & CPUID_STDEXT3_TSXFA) != 0 && !pmc_tsx_force_abort_set) { pmc_tsx_force_abort_set = true; - smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)1); + x86_msr_op(MSR_TSX_FORCE_ABORT, MSR_OP_RENDEZVOUS | + MSR_OP_WRITE, 1); } flags = 0; @@ -411,7 +403,8 @@ iaf_release_pmc(int cpu, int ri, struct pmc *pmc) MPASS(pmc_alloc_refs > 0); if (pmc_alloc_refs-- == 1 && pmc_tsx_force_abort_set) { pmc_tsx_force_abort_set = false; - smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)0); + x86_msr_op(MSR_TSX_FORCE_ABORT, MSR_OP_RENDEZVOUS | + MSR_OP_WRITE, 0); } return (0); Modified: stable/12/sys/x86/include/x86_var.h ============================================================================== --- stable/12/sys/x86/include/x86_var.h Mon Nov 25 09:43:36 2019 (r355086) +++ stable/12/sys/x86/include/x86_var.h Mon Nov 25 09:53:49 2019 (r355087) @@ -155,4 +155,12 @@ int user_dbreg_trap(register_t dr6); int minidumpsys(struct dumperinfo *); struct pcb *get_pcb_td(struct thread *td); +#define MSR_OP_ANDNOT 0x00000001 +#define MSR_OP_OR 0x00000002 +#define MSR_OP_WRITE 0x00000003 +#define MSR_OP_LOCAL 0x10000000 +#define MSR_OP_SCHED 0x20000000 +#define MSR_OP_RENDEZVOUS 0x30000000 +void x86_msr_op(u_int msr, u_int op, uint64_t arg1); + #endif Modified: stable/12/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/12/sys/x86/x86/cpu_machdep.c Mon Nov 25 09:43:36 2019 (r355086) +++ stable/12/sys/x86/x86/cpu_machdep.c Mon Nov 25 09:53:49 2019 (r355087) @@ -111,7 +111,80 @@ static u_int cpu_reset_proxyid; static volatile u_int cpu_reset_proxy_active; #endif +struct msr_op_arg { + u_int msr; + int op; + uint64_t arg1; +}; +static void +x86_msr_op_one(void *argp) +{ + struct msr_op_arg *a; + uint64_t v; + + a = argp; + switch (a->op) { + case MSR_OP_ANDNOT: + v = rdmsr(a->msr); + v &= ~a->arg1; + wrmsr(a->msr, v); + break; + case MSR_OP_OR: + v = rdmsr(a->msr); + v |= a->arg1; + wrmsr(a->msr, v); + break; + case MSR_OP_WRITE: + wrmsr(a->msr, a->arg1); + break; + } +} + +#define MSR_OP_EXMODE_MASK 0xf0000000 +#define MSR_OP_OP_MASK 0x000000ff + +void +x86_msr_op(u_int msr, u_int op, uint64_t arg1) +{ + struct thread *td; + struct msr_op_arg a; + u_int exmode; + int bound_cpu, i, is_bound; + + a.op = op & MSR_OP_OP_MASK; + MPASS(a.op == MSR_OP_ANDNOT || a.op == MSR_OP_OR || + a.op == MSR_OP_WRITE); + exmode = op & MSR_OP_EXMODE_MASK; + MPASS(exmode == MSR_OP_LOCAL || exmode == MSR_OP_SCHED || + exmode == MSR_OP_RENDEZVOUS); + a.msr = msr; + a.arg1 = arg1; + switch (exmode) { + case MSR_OP_LOCAL: + x86_msr_op_one(&a); + break; + case MSR_OP_SCHED: + td = curthread; + thread_lock(td); + is_bound = sched_is_bound(td); + bound_cpu = td->td_oncpu; + CPU_FOREACH(i) { + sched_bind(td, i); + x86_msr_op_one(&a); + } + if (is_bound) + sched_bind(td, bound_cpu); + else + sched_unbind(td); + thread_unlock(td); + break; + case MSR_OP_RENDEZVOUS: + smp_rendezvous(NULL, x86_msr_op_one, NULL, &a); + break; + } +} + /* * Machine dependent boot() routine * @@ -791,18 +864,10 @@ SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw void hw_ibrs_recalculate(void) { - uint64_t v; - if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - if (hw_ibrs_disable) { - v = rdmsr(MSR_IA32_SPEC_CTRL); - v &= ~(uint64_t)IA32_SPEC_CTRL_IBRS; - wrmsr(MSR_IA32_SPEC_CTRL, v); - } else { - v = rdmsr(MSR_IA32_SPEC_CTRL); - v |= IA32_SPEC_CTRL_IBRS; - wrmsr(MSR_IA32_SPEC_CTRL, v); - } + x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | + (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + IA32_SPEC_CTRL_IBRS); return; } hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && @@ -834,46 +899,17 @@ SYSCTL_INT(_hw, OID_AUTO, spec_store_bypass_disable_ac "Speculative Store Bypass Disable active"); static void -hw_ssb_set_one(bool enable) -{ - uint64_t v; - - v = rdmsr(MSR_IA32_SPEC_CTRL); - if (enable) - v |= (uint64_t)IA32_SPEC_CTRL_SSBD; - else - v &= ~(uint64_t)IA32_SPEC_CTRL_SSBD; - wrmsr(MSR_IA32_SPEC_CTRL, v); -} - -static void hw_ssb_set(bool enable, bool for_all_cpus) { - struct thread *td; - int bound_cpu, i, is_bound; if ((cpu_stdext_feature3 & CPUID_STDEXT3_SSBD) == 0) { hw_ssb_active = 0; return; } hw_ssb_active = enable; - if (for_all_cpus) { - td = curthread; - thread_lock(td); - is_bound = sched_is_bound(td); - bound_cpu = td->td_oncpu; - CPU_FOREACH(i) { - sched_bind(td, i); - hw_ssb_set_one(enable); - } - if (is_bound) - sched_bind(td, bound_cpu); - else - sched_unbind(td); - thread_unlock(td); - } else { - hw_ssb_set_one(enable); - } + x86_msr_op(MSR_IA32_SPEC_CTRL, + (enable ? MSR_OP_OR : MSR_OP_ANDNOT) | + (for_all_cpus ? MSR_OP_SCHED : MSR_OP_LOCAL), IA32_SPEC_CTRL_SSBD); } void @@ -1136,43 +1172,13 @@ enum { }; static void -taa_set_one(bool enable) -{ - uint64_t v; - - v = rdmsr(MSR_IA32_TSX_CTRL); - if (enable) - v |= (uint64_t)(IA32_TSX_CTRL_RTM_DISABLE | - IA32_TSX_CTRL_TSX_CPUID_CLEAR); - else - v &= ~(uint64_t)(IA32_TSX_CTRL_RTM_DISABLE | - IA32_TSX_CTRL_TSX_CPUID_CLEAR); - - wrmsr(MSR_IA32_TSX_CTRL, v); -} - -static void taa_set(bool enable, bool all) { - struct thread *td; - int bound_cpu, i, is_bound; - if (all) { - td = curthread; - thread_lock(td); - is_bound = sched_is_bound(td); - bound_cpu = td->td_oncpu; - CPU_FOREACH(i) { - sched_bind(td, i); - taa_set_one(enable); - } - if (is_bound) - sched_bind(td, bound_cpu); - else - sched_unbind(td); - thread_unlock(td); - } else - taa_set_one(enable); + x86_msr_op(MSR_IA32_TSX_CTRL, + (enable ? MSR_OP_OR : MSR_OP_ANDNOT) | + (all ? MSR_OP_RENDEZVOUS : MSR_OP_LOCAL), + IA32_TSX_CTRL_RTM_DISABLE | IA32_TSX_CTRL_TSX_CPUID_CLEAR); } void From owner-svn-src-stable@freebsd.org Mon Nov 25 14:18:55 2019 Return-Path: Delivered-To: svn-src-stable@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 B114C1ADDFA; Mon, 25 Nov 2019 14:18:55 +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) server-signature RSA-PSS (4096 bits) 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 47M8KW4CT9z4T1P; Mon, 25 Nov 2019 14:18:55 +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 73FD9DE83; Mon, 25 Nov 2019 14:18:55 +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 xAPEItwN087105; Mon, 25 Nov 2019 14:18:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAPEItMH087104; Mon, 25 Nov 2019 14:18:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911251418.xAPEItMH087104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Nov 2019 14:18: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: r355089 - 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: 355089 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 14:18:55 -0000 Author: kib Date: Mon Nov 25 14:18:55 2019 New Revision: 355089 URL: https://svnweb.freebsd.org/changeset/base/355089 Log: MFC r355088: Limit bus_dma_dmar_set_buswide() definition to kernel only. Modified: stable/12/sys/x86/include/bus_dma.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/bus_dma.h ============================================================================== --- stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:16:41 2019 (r355088) +++ stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:18:55 2019 (r355089) @@ -179,7 +179,9 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); } +#ifdef _KERNEL bool bus_dma_dmar_set_buswide(device_t dev); +#endif #endif /* !_X86_BUS_DMA_H_ */ From owner-svn-src-stable@freebsd.org Mon Nov 25 14:58:40 2019 Return-Path: Delivered-To: svn-src-stable@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 B9EC21AF5E5; Mon, 25 Nov 2019 14:58:40 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47M9CN3lZMz4WQP; Mon, 25 Nov 2019 14:58:40 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f170.google.com with SMTP id n4so17498801qte.2; Mon, 25 Nov 2019 06:58:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W0MN4ljexF69KwQQLnLncIt6XtRwq16B8VImlCqsKjA=; b=LeUdttzVcWfG9cmOalsGDYCIbV2X4+0FxyMB7Qgf9bQj7b066PzBH/yWW9KP5t5kmf glKN560g1D02IP8VRgHijp/jBgk+If7Lbn4oNnjutzccwG132RGa/NQaAdoFYTB9lNIC EZNBEDzT+SfufsBRb5y4H1lh8fufbRh1aJWj45e0cypJU1uGKlxaegaRTAR8e7T0KKmd UibK35YBrGwMka5K1oljnkkAVLZyFgn+c+wCQWhv1/E0omadiIVKOSHA0SfXt0hsRqX6 PUQ3bf+gkF0V5hVP+guhiC4eSSXV6b6RUM5+wM3wdWcyooj9KKnDEQt5e4JUf2tBW4v5 JBRQ== X-Gm-Message-State: APjAAAUZka077QXXI0D7X2yx62Yo9Ce7lRZK06rfOHkMtpbp3XOh7nOj BdSs/z5ICY1Y45u2Zu/trOtE5eIuriA= X-Google-Smtp-Source: APXvYqxWPGfgY0d8CcW4SbwkXffjsLuS2fGo+hz587n/urX4U5OhiQ1eIEfqxxXyjBuCsK3KHhHziQ== X-Received: by 2002:ac8:4813:: with SMTP id g19mr15390474qtq.165.1574693919033; Mon, 25 Nov 2019 06:58:39 -0800 (PST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com. [209.85.160.180]) by smtp.gmail.com with ESMTPSA id q17sm4134145qtq.58.2019.11.25.06.58.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Nov 2019 06:58:38 -0800 (PST) Received: by mail-qt1-f180.google.com with SMTP id 30so17447272qtz.12; Mon, 25 Nov 2019 06:58:38 -0800 (PST) X-Received: by 2002:ac8:7a92:: with SMTP id x18mr16563129qtr.123.1574693918519; Mon, 25 Nov 2019 06:58:38 -0800 (PST) MIME-Version: 1.0 References: <201911251418.xAPEItMH087104@repo.freebsd.org> In-Reply-To: <201911251418.xAPEItMH087104@repo.freebsd.org> From: Ryan Libby Date: Mon, 25 Nov 2019 06:58:27 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r355089 - stable/12/sys/x86/include To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47M9CN3lZMz4WQP X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 14:58:40 -0000 On Mon, Nov 25, 2019 at 6:19 AM Konstantin Belousov wrote: > > Author: kib > Date: Mon Nov 25 14:18:55 2019 > New Revision: 355089 > URL: https://svnweb.freebsd.org/changeset/base/355089 > > Log: > MFC r355088: > Limit bus_dma_dmar_set_buswide() definition to kernel only. > > Modified: > stable/12/sys/x86/include/bus_dma.h > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/sys/x86/include/bus_dma.h > ============================================================================== > --- stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:16:41 2019 (r355088) > +++ stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:18:55 2019 (r355089) > @@ -179,7 +179,9 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t > return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); > } > > +#ifdef _KERNEL > bool bus_dma_dmar_set_buswide(device_t dev); > +#endif > > #endif /* !_X86_BUS_DMA_H_ */ > > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" No complaint, but incidentally I think this didn't trip in current because r347836 deleted #include from camdd.c. From owner-svn-src-stable@freebsd.org Mon Nov 25 15:23:33 2019 Return-Path: Delivered-To: svn-src-stable@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 D9DA71B02FD; Mon, 25 Nov 2019 15:23:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47M9m53t5Yz4Y0R; Mon, 25 Nov 2019 15:23:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id xAPFNPDM011044 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 25 Nov 2019 17:23:28 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua xAPFNPDM011044 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id xAPFNPLt011043; Mon, 25 Nov 2019 17:23:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 25 Nov 2019 17:23:25 +0200 From: Konstantin Belousov To: Ryan Libby Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r355089 - stable/12/sys/x86/include Message-ID: <20191125152325.GE10580@kib.kiev.ua> References: <201911251418.xAPEItMH087104@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 47M9m53t5Yz4Y0R X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.98 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; REPLY(-4.00)[] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 15:23:34 -0000 On Mon, Nov 25, 2019 at 06:58:27AM -0800, Ryan Libby wrote: > On Mon, Nov 25, 2019 at 6:19 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Mon Nov 25 14:18:55 2019 > > New Revision: 355089 > > URL: https://svnweb.freebsd.org/changeset/base/355089 > > > > Log: > > MFC r355088: > > Limit bus_dma_dmar_set_buswide() definition to kernel only. > > > > Modified: > > stable/12/sys/x86/include/bus_dma.h > > Directory Properties: > > stable/12/ (props changed) > > > > Modified: stable/12/sys/x86/include/bus_dma.h > > ============================================================================== > > --- stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:16:41 2019 (r355088) > > +++ stable/12/sys/x86/include/bus_dma.h Mon Nov 25 14:18:55 2019 (r355089) > > @@ -179,7 +179,9 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t > > return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); > > } > > > > +#ifdef _KERNEL > > bool bus_dma_dmar_set_buswide(device_t dev); > > +#endif > > > > #endif /* !_X86_BUS_DMA_H_ */ > > > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > No complaint, but incidentally I think this didn't trip in current > because r347836 deleted #include from camdd.c. I see, thank you. I will keep this #ifdef around for some time in HEAD as well. If the revision ever get merged into 12, I remove the braces from both branches. From owner-svn-src-stable@freebsd.org Mon Nov 25 15:45:20 2019 Return-Path: Delivered-To: svn-src-stable@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 6FBA21B0AA2; Mon, 25 Nov 2019 15:45:20 +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) server-signature RSA-PSS (4096 bits) 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 47MBFD2DLLz4Yy6; Mon, 25 Nov 2019 15:45:20 +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 311F4EEF6; Mon, 25 Nov 2019 15:45:20 +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 xAPFjKge039512; Mon, 25 Nov 2019 15:45:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAPFjKZI039511; Mon, 25 Nov 2019 15:45:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911251545.xAPFjKZI039511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 25 Nov 2019 15:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355091 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 355091 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 15:45:20 -0000 Author: mav Date: Mon Nov 25 15:45:19 2019 New Revision: 355091 URL: https://svnweb.freebsd.org/changeset/base/355091 Log: MFC r341710 (by imp): Even though they are reserved, cdw2 and cdw3 can be set via nvme-cli (and soon nvmecontrol). Go ahead and copy them into rsvd2 and rsvd3. Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Nov 25 15:23:35 2019 (r355090) +++ stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Nov 25 15:45:19 2019 (r355091) @@ -1004,6 +1004,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr req = nvme_allocate_request_null(nvme_pt_done, pt); req->cmd.opc = pt->cmd.opc; + req->cmd.rsvd2 = pt->cmd.rsvd2; + req->cmd.rsvd3 = pt->cmd.rsvd3; req->cmd.cdw10 = pt->cmd.cdw10; req->cmd.cdw11 = pt->cmd.cdw11; req->cmd.cdw12 = pt->cmd.cdw12; From owner-svn-src-stable@freebsd.org Mon Nov 25 15:51:07 2019 Return-Path: Delivered-To: svn-src-stable@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 2E0BB1B0BF5; Mon, 25 Nov 2019 15:51:07 +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) server-signature RSA-PSS (4096 bits) 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 47MBMt6XKBz4ZGr; Mon, 25 Nov 2019 15:51:06 +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 C3838EF3B; Mon, 25 Nov 2019 15:51:06 +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 xAPFp6sR040781; Mon, 25 Nov 2019 15:51:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAPFp6jV040778; Mon, 25 Nov 2019 15:51:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911251551.xAPFp6jV040778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 25 Nov 2019 15:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355092 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 355092 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 15:51:07 -0000 Author: mav Date: Mon Nov 25 15:51:05 2019 New Revision: 355092 URL: https://svnweb.freebsd.org/changeset/base/355092 Log: MFC r344955 (by imp): Don't print all the I/O we abort on a reset, unless we're out of retries. When resetting the controller, we abort I/O. Prior to this fix, we printed a ton of abort messages for I/O that we're going to retry. This imparts no useful information. Stop printing them unless our retry count is exhausted. Clarify code for when we don't retry, and remove useless arg to a routine that's always called with it as 'true'. All the other debug is still printed (including multiple reset messages if we have multiple timeouts before the taskqueue runs the actual reset) so that we know when we reset. Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c stable/11/sys/dev/nvme/nvme_private.h stable/11/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Nov 25 15:45:19 2019 (r355091) +++ stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Nov 25 15:51:05 2019 (r355092) @@ -235,7 +235,7 @@ nvme_ctrlr_fail_req_task(void *arg, int pending) STAILQ_REMOVE_HEAD(&ctrlr->fail_req, stailq); mtx_unlock(&ctrlr->lock); nvme_qpair_manual_complete_request(req->qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, TRUE); + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&ctrlr->lock); } mtx_unlock(&ctrlr->lock); Modified: stable/11/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/11/sys/dev/nvme/nvme_private.h Mon Nov 25 15:45:19 2019 (r355091) +++ stable/11/sys/dev/nvme/nvme_private.h Mon Nov 25 15:51:05 2019 (r355092) @@ -415,8 +415,7 @@ void nvme_qpair_reset(struct nvme_qpair *qpair); void nvme_qpair_fail(struct nvme_qpair *qpair); void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, struct nvme_request *req, - uint32_t sct, uint32_t sc, - boolean_t print_on_error); + uint32_t sct, uint32_t sc); void nvme_admin_qpair_enable(struct nvme_qpair *qpair); void nvme_admin_qpair_disable(struct nvme_qpair *qpair); Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Nov 25 15:45:19 2019 (r355091) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Nov 25 15:51:05 2019 (r355092) @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" +typedef enum error_print { ERROR_PRINT_NONE, ERROR_PRINT_NO_RETRY, ERROR_PRINT_ALL } error_print_t; +#define DO_NOT_RETRY 1 + static void _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); static void nvme_qpair_destroy(struct nvme_qpair *qpair); @@ -358,7 +361,7 @@ nvme_completion_is_retry(const struct nvme_completion static void nvme_qpair_complete_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr, - struct nvme_completion *cpl, boolean_t print_on_error) + struct nvme_completion *cpl, error_print_t print_on_error) { struct nvme_request *req; boolean_t retry, error; @@ -368,7 +371,8 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, retry = error && nvme_completion_is_retry(cpl) && req->retries < nvme_retry_count; - if (error && print_on_error) { + if (error && (print_on_error == ERROR_PRINT_ALL || + (!retry && print_on_error == ERROR_PRINT_NO_RETRY))) { nvme_qpair_print_command(qpair, &req->cmd); nvme_qpair_print_completion(qpair, cpl); } @@ -420,7 +424,7 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, static void nvme_qpair_manual_complete_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr, uint32_t sct, uint32_t sc, uint32_t dnr, - boolean_t print_on_error) + error_print_t print_on_error) { struct nvme_completion cpl; @@ -435,8 +439,7 @@ nvme_qpair_manual_complete_tracker(struct nvme_qpair * void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, - struct nvme_request *req, uint32_t sct, uint32_t sc, - boolean_t print_on_error) + struct nvme_request *req, uint32_t sct, uint32_t sc) { struct nvme_completion cpl; boolean_t error; @@ -448,7 +451,7 @@ nvme_qpair_manual_complete_request(struct nvme_qpair * error = nvme_completion_is_error(&cpl); - if (error && print_on_error) { + if (error) { nvme_qpair_print_command(qpair, &req->cmd); nvme_qpair_print_completion(qpair, &cpl); } @@ -488,7 +491,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai tr = qpair->act_tr[cpl->cid]; if (tr != NULL) { - nvme_qpair_complete_tracker(qpair, tr, cpl, TRUE); + nvme_qpair_complete_tracker(qpair, tr, cpl, ERROR_PRINT_ALL); qpair->sq_head = cpl->sqhd; done++; } else { @@ -713,7 +716,7 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, - FALSE); + ERROR_PRINT_NONE); tr = TAILQ_FIRST(&qpair->outstanding_tr); } else { tr = TAILQ_NEXT(tr, tailq); @@ -756,7 +759,7 @@ nvme_abort_complete(void *arg, const struct nvme_compl nvme_printf(tr->qpair->ctrlr, "abort command failed, aborting command manually\n"); nvme_qpair_manual_complete_tracker(tr->qpair, tr, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, TRUE); + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_ALL); } } @@ -973,7 +976,7 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s */ mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, - NVME_SC_DATA_TRANSFER_ERROR, 1 /* do not retry */, TRUE); + NVME_SC_DATA_TRANSFER_ERROR, DO_NOT_RETRY, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } } @@ -1031,7 +1034,7 @@ nvme_admin_qpair_enable(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "aborting outstanding admin command\n"); nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST, 1 /* do not retry */, TRUE); + NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); } nvme_qpair_enable(qpair); @@ -1053,7 +1056,7 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) { nvme_printf(qpair->ctrlr, "aborting outstanding i/o\n"); nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST, 0, TRUE); + NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_NO_RETRY); } mtx_lock(&qpair->lock); @@ -1118,7 +1121,7 @@ nvme_qpair_fail(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "failing queued i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST, TRUE); + NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&qpair->lock); } @@ -1132,7 +1135,7 @@ nvme_qpair_fail(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST, 1 /* do not retry */, TRUE); + NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } From owner-svn-src-stable@freebsd.org Mon Nov 25 16:46:43 2019 Return-Path: Delivered-To: svn-src-stable@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 F29411B1F20; Mon, 25 Nov 2019 16:46: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) server-signature RSA-PSS (4096 bits) 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 47MCc25vfNz4cfk; Mon, 25 Nov 2019 16:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADD9FF9E5; Mon, 25 Nov 2019 16:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAPGkgW4075631; Mon, 25 Nov 2019 16:46:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAPGkgRZ075628; Mon, 25 Nov 2019 16:46:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201911251646.xAPGkgRZ075628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Nov 2019 16:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355094 - in stable/11/sys: dev/hwpmc x86/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: dev/hwpmc x86/include x86/x86 X-SVN-Commit-Revision: 355094 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 16:46:43 -0000 Author: kib Date: Mon Nov 25 16:46:41 2019 New Revision: 355094 URL: https://svnweb.freebsd.org/changeset/base/355094 Log: MFC r354828: Add x86 msr tweak KPI. Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c stable/11/sys/x86/include/x86_var.h stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_core.c Mon Nov 25 16:30:38 2019 (r355093) +++ stable/11/sys/dev/hwpmc/hwpmc_core.c Mon Nov 25 16:46:41 2019 (r355094) @@ -218,15 +218,6 @@ iaf_reload_count_to_perfctr_value(pmc_value_t rlc) return (1ULL << core_iaf_width) - rlc; } -static void -tweak_tsx_force_abort(void *arg) -{ - u_int val; - - val = (uintptr_t)arg; - wrmsr(MSR_TSX_FORCE_ABORT, val); -} - static int iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) @@ -263,7 +254,8 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if ((cpu_stdext_feature3 & CPUID_STDEXT3_TSXFA) != 0 && !pmc_tsx_force_abort_set) { pmc_tsx_force_abort_set = true; - smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)1); + x86_msr_op(MSR_TSX_FORCE_ABORT, MSR_OP_RENDEZVOUS | + MSR_OP_WRITE, 1); } flags = a->pm_md.pm_iaf.pm_iaf_flags; @@ -405,7 +397,8 @@ iaf_release_pmc(int cpu, int ri, struct pmc *pmc) MPASS(pmc_alloc_refs > 0); if (pmc_alloc_refs-- == 1 && pmc_tsx_force_abort_set) { pmc_tsx_force_abort_set = false; - smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)0); + x86_msr_op(MSR_TSX_FORCE_ABORT, MSR_OP_RENDEZVOUS | + MSR_OP_WRITE, 0); } return (0); Modified: stable/11/sys/x86/include/x86_var.h ============================================================================== --- stable/11/sys/x86/include/x86_var.h Mon Nov 25 16:30:38 2019 (r355093) +++ stable/11/sys/x86/include/x86_var.h Mon Nov 25 16:46:41 2019 (r355094) @@ -149,4 +149,12 @@ int user_dbreg_trap(register_t dr6); int minidumpsys(struct dumperinfo *); struct pcb *get_pcb_td(struct thread *td); +#define MSR_OP_ANDNOT 0x00000001 +#define MSR_OP_OR 0x00000002 +#define MSR_OP_WRITE 0x00000003 +#define MSR_OP_LOCAL 0x10000000 +#define MSR_OP_SCHED 0x20000000 +#define MSR_OP_RENDEZVOUS 0x30000000 +void x86_msr_op(u_int msr, u_int op, uint64_t arg1); + #endif Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Mon Nov 25 16:30:38 2019 (r355093) +++ stable/11/sys/x86/x86/cpu_machdep.c Mon Nov 25 16:46:41 2019 (r355094) @@ -115,7 +115,80 @@ static u_int cpu_reset_proxyid; static volatile u_int cpu_reset_proxy_active; #endif +struct msr_op_arg { + u_int msr; + int op; + uint64_t arg1; +}; +static void +x86_msr_op_one(void *argp) +{ + struct msr_op_arg *a; + uint64_t v; + + a = argp; + switch (a->op) { + case MSR_OP_ANDNOT: + v = rdmsr(a->msr); + v &= ~a->arg1; + wrmsr(a->msr, v); + break; + case MSR_OP_OR: + v = rdmsr(a->msr); + v |= a->arg1; + wrmsr(a->msr, v); + break; + case MSR_OP_WRITE: + wrmsr(a->msr, a->arg1); + break; + } +} + +#define MSR_OP_EXMODE_MASK 0xf0000000 +#define MSR_OP_OP_MASK 0x000000ff + +void +x86_msr_op(u_int msr, u_int op, uint64_t arg1) +{ + struct thread *td; + struct msr_op_arg a; + u_int exmode; + int bound_cpu, i, is_bound; + + a.op = op & MSR_OP_OP_MASK; + MPASS(a.op == MSR_OP_ANDNOT || a.op == MSR_OP_OR || + a.op == MSR_OP_WRITE); + exmode = op & MSR_OP_EXMODE_MASK; + MPASS(exmode == MSR_OP_LOCAL || exmode == MSR_OP_SCHED || + exmode == MSR_OP_RENDEZVOUS); + a.msr = msr; + a.arg1 = arg1; + switch (exmode) { + case MSR_OP_LOCAL: + x86_msr_op_one(&a); + break; + case MSR_OP_SCHED: + td = curthread; + thread_lock(td); + is_bound = sched_is_bound(td); + bound_cpu = td->td_oncpu; + CPU_FOREACH(i) { + sched_bind(td, i); + x86_msr_op_one(&a); + } + if (is_bound) + sched_bind(td, bound_cpu); + else + sched_unbind(td); + thread_unlock(td); + break; + case MSR_OP_RENDEZVOUS: + smp_rendezvous(NULL, x86_msr_op_one, NULL, &a); + break; + } +} + /* * Machine dependent boot() routine * @@ -821,18 +894,10 @@ SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw void hw_ibrs_recalculate(void) { - uint64_t v; - if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - if (hw_ibrs_disable) { - v = rdmsr(MSR_IA32_SPEC_CTRL); - v &= ~(uint64_t)IA32_SPEC_CTRL_IBRS; - wrmsr(MSR_IA32_SPEC_CTRL, v); - } else { - v = rdmsr(MSR_IA32_SPEC_CTRL); - v |= IA32_SPEC_CTRL_IBRS; - wrmsr(MSR_IA32_SPEC_CTRL, v); - } + x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | + (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + IA32_SPEC_CTRL_IBRS); return; } hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && @@ -864,46 +929,17 @@ SYSCTL_INT(_hw, OID_AUTO, spec_store_bypass_disable_ac "Speculative Store Bypass Disable active"); static void -hw_ssb_set_one(bool enable) -{ - uint64_t v; - - v = rdmsr(MSR_IA32_SPEC_CTRL); - if (enable) - v |= (uint64_t)IA32_SPEC_CTRL_SSBD; - else - v &= ~(uint64_t)IA32_SPEC_CTRL_SSBD; - wrmsr(MSR_IA32_SPEC_CTRL, v); -} - -static void hw_ssb_set(bool enable, bool for_all_cpus) { - struct thread *td; - int bound_cpu, i, is_bound; if ((cpu_stdext_feature3 & CPUID_STDEXT3_SSBD) == 0) { hw_ssb_active = 0; return; } hw_ssb_active = enable; - if (for_all_cpus) { - td = curthread; - thread_lock(td); - is_bound = sched_is_bound(td); - bound_cpu = td->td_oncpu; - CPU_FOREACH(i) { - sched_bind(td, i); - hw_ssb_set_one(enable); - } - if (is_bound) - sched_bind(td, bound_cpu); - else - sched_unbind(td); - thread_unlock(td); - } else { - hw_ssb_set_one(enable); - } + x86_msr_op(MSR_IA32_SPEC_CTRL, + (enable ? MSR_OP_OR : MSR_OP_ANDNOT) | + (for_all_cpus ? MSR_OP_SCHED : MSR_OP_LOCAL), IA32_SPEC_CTRL_SSBD); } void @@ -1164,43 +1200,13 @@ enum { }; static void -taa_set_one(bool enable) -{ - uint64_t v; - - v = rdmsr(MSR_IA32_TSX_CTRL); - if (enable) - v |= (uint64_t)(IA32_TSX_CTRL_RTM_DISABLE | - IA32_TSX_CTRL_TSX_CPUID_CLEAR); - else - v &= ~(uint64_t)(IA32_TSX_CTRL_RTM_DISABLE | - IA32_TSX_CTRL_TSX_CPUID_CLEAR); - - wrmsr(MSR_IA32_TSX_CTRL, v); -} - -static void taa_set(bool enable, bool all) { - struct thread *td; - int bound_cpu, i, is_bound; - if (all) { - td = curthread; - thread_lock(td); - is_bound = sched_is_bound(td); - bound_cpu = td->td_oncpu; - CPU_FOREACH(i) { - sched_bind(td, i); - taa_set_one(enable); - } - if (is_bound) - sched_bind(td, bound_cpu); - else - sched_unbind(td); - thread_unlock(td); - } else - taa_set_one(enable); + x86_msr_op(MSR_IA32_TSX_CTRL, + (enable ? MSR_OP_OR : MSR_OP_ANDNOT) | + (all ? MSR_OP_RENDEZVOUS : MSR_OP_LOCAL), + IA32_TSX_CTRL_RTM_DISABLE | IA32_TSX_CTRL_TSX_CPUID_CLEAR); } void From owner-svn-src-stable@freebsd.org Mon Nov 25 19:38:06 2019 Return-Path: Delivered-To: svn-src-stable@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 88C071B7B6B; Mon, 25 Nov 2019 19:38:06 +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) server-signature RSA-PSS (4096 bits) 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 47MHPp30j9z3MHc; Mon, 25 Nov 2019 19:38:06 +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 4A79A198C6; Mon, 25 Nov 2019 19:38:06 +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 xAPJc6J8076483; Mon, 25 Nov 2019 19:38:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAPJc6nw076482; Mon, 25 Nov 2019 19:38:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201911251938.xAPJc6nw076482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 25 Nov 2019 19:38: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: r355099 - stable/12/sys/cam/mmc X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/sys/cam/mmc X-SVN-Commit-Revision: 355099 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 19:38:06 -0000 Author: kevans Date: Mon Nov 25 19:38:05 2019 New Revision: 355099 URL: https://svnweb.freebsd.org/changeset/base/355099 Log: MFC r355015: MMCCAM: defer release of ccb until we're done with it If we've found a device, we attempt to call xpt_action() on a ccb that's already been released. Simply defer release until after we're done with it. Modified: stable/12/sys/cam/mmc/mmc_xpt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/mmc/mmc_xpt.c ============================================================================== --- stable/12/sys/cam/mmc/mmc_xpt.c Mon Nov 25 19:31:38 2019 (r355098) +++ stable/12/sys/cam/mmc/mmc_xpt.c Mon Nov 25 19:38:05 2019 (r355099) @@ -1082,7 +1082,6 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do //xpt_async(AC_LOST_DEVICE, path, NULL); } - xpt_release_ccb(done_ccb); if (softc->action != PROBE_INVALID) xpt_schedule(periph, priority); /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ @@ -1099,6 +1098,7 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do xpt_async(AC_FOUND_DEVICE, path, done_ccb); } } + xpt_release_ccb(done_ccb); if (softc->action == PROBE_DONE || softc->action == PROBE_INVALID) { cam_periph_invalidate(periph); cam_periph_release_locked(periph); From owner-svn-src-stable@freebsd.org Tue Nov 26 02:50:26 2019 Return-Path: Delivered-To: svn-src-stable@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 7CC7B1C4744; Tue, 26 Nov 2019 02:50:26 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 47MT0f2hk3z4GJt; Tue, 26 Nov 2019 02:50:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FCD21E75D; Tue, 26 Nov 2019 02:50:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAQ2oQb3031717; Tue, 26 Nov 2019 02:50:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQ2oQuo031716; Tue, 26 Nov 2019 02:50:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201911260250.xAQ2oQuo031716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 26 Nov 2019 02:50:26 +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: r355105 - stable/12/contrib/bsnmp/snmpd X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/contrib/bsnmp/snmpd X-SVN-Commit-Revision: 355105 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 02:50:26 -0000 Author: ae Date: Tue Nov 26 02:50:25 2019 New Revision: 355105 URL: https://svnweb.freebsd.org/changeset/base/355105 Log: MFC r354858: Fix the byte order of IPv4 address parsed from begemotSnmpdTransInetStatus config option. An address is already in network byte order, there is no need to do htonl(). PR: 242056 Modified: stable/12/contrib/bsnmp/snmpd/trans_inet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/bsnmp/snmpd/trans_inet.c ============================================================================== --- stable/12/contrib/bsnmp/snmpd/trans_inet.c Tue Nov 26 02:26:34 2019 (r355104) +++ stable/12/contrib/bsnmp/snmpd/trans_inet.c Tue Nov 26 02:50:25 2019 (r355105) @@ -458,12 +458,10 @@ struct inet_port_params { static int ipv4_create(struct inet_port *port, struct inet_port_params *params) { - uint32_t ip; if (params->addr_len != 4) return (SNMP_ERR_INCONS_VALUE); - memcpy(&ip, params->addr, 4); struct port_sock *sock = calloc(1, sizeof(struct port_sock)); if (sock == NULL) return (SNMP_ERR_GENERR); @@ -477,8 +475,8 @@ ipv4_create(struct inet_port *port, struct inet_port_p sin->sin_len = sizeof(struct sockaddr_in); sin->sin_family = AF_INET; - sin->sin_addr.s_addr = htonl(ip); sin->sin_port = htons(params->port); + memcpy(&sin->sin_addr, params->addr, 4); /* network byte order */ sock->port = port; From owner-svn-src-stable@freebsd.org Tue Nov 26 15:21:02 2019 Return-Path: Delivered-To: svn-src-stable@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 56C2D1B9B4F; Tue, 26 Nov 2019 15:21:02 +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) server-signature RSA-PSS (4096 bits) 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 47Mnfk1hpGz3wxM; Tue, 26 Nov 2019 15:21:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E76926EAB; Tue, 26 Nov 2019 15:21:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAQFL26F074933; Tue, 26 Nov 2019 15:21:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQFL1QV074932; Tue, 26 Nov 2019 15:21:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911261521.xAQFL1QV074932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 26 Nov 2019 15:21:01 +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: r355110 - stable/12/sys/dev/ntb/ntb_hw X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 355110 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 15:21:02 -0000 Author: mav Date: Tue Nov 26 15:21:01 2019 New Revision: 355110 URL: https://svnweb.freebsd.org/changeset/base/355110 Log: MFC r354840: Call bus_dma_dmar_set_buswide(9) added in r354830. PLX NTB sends translated DMA requests not only from itsels, but from all slots and functions of its bus. By default DMAR blocks those additional. Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Tue Nov 26 14:25:50 2019 (r355109) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Tue Nov 26 15:21:01 2019 (r355110) @@ -339,6 +339,12 @@ ntb_plx_attach(device_t dev) return (ENXIO); } + /* + * The device occupies whole bus. In translated TLP slot field + * keeps LUT index (original bus/slot), function is passed through. + */ + bus_dma_dmar_set_buswide(dev); + /* Identify chip port we are connected to. */ val = bus_read_4(sc->conf_res, 0x360); sc->port = (val >> ((sc->ntx == 0) ? 8 : 16)) & 0x1f; From owner-svn-src-stable@freebsd.org Tue Nov 26 15:23:25 2019 Return-Path: Delivered-To: svn-src-stable@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 1BD0B1B9BF9; Tue, 26 Nov 2019 15:23:25 +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) server-signature RSA-PSS (4096 bits) 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 47MnjS70RBz3xCZ; Tue, 26 Nov 2019 15:23:24 +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 D3E8227029; Tue, 26 Nov 2019 15:23:24 +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 xAQFNOqN078275; Tue, 26 Nov 2019 15:23:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQFNOWq078273; Tue, 26 Nov 2019 15:23:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911261523.xAQFNOWq078273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 26 Nov 2019 15:23:24 +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: r355111 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 355111 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 15:23:25 -0000 Author: mav Date: Tue Nov 26 15:23:24 2019 New Revision: 355111 URL: https://svnweb.freebsd.org/changeset/base/355111 Log: MFC r354841: Add ioat_get_domain() to ioat(4) KPI. This allows NUMA-aware consumers to reduce inter-domain traffic. Modified: stable/12/sys/dev/ioat/ioat.c stable/12/sys/dev/ioat/ioat.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Tue Nov 26 15:21:01 2019 (r355110) +++ stable/12/sys/dev/ioat/ioat.c Tue Nov 26 15:23:24 2019 (r355111) @@ -923,6 +923,15 @@ ioat_get_capabilities(bus_dmaengine_t dmaengine) } int +ioat_get_domain(bus_dmaengine_t dmaengine, int *domain) +{ + struct ioat_softc *ioat; + + ioat = to_ioat_softc(dmaengine); + return (bus_get_domain(ioat->device, domain)); +} + +int ioat_set_interrupt_coalesce(bus_dmaengine_t dmaengine, uint16_t delay) { struct ioat_softc *ioat; Modified: stable/12/sys/dev/ioat/ioat.h ============================================================================== --- stable/12/sys/dev/ioat/ioat.h Tue Nov 26 15:21:01 2019 (r355110) +++ stable/12/sys/dev/ioat/ioat.h Tue Nov 26 15:23:24 2019 (r355111) @@ -131,6 +131,7 @@ void ioat_put_dmaengine(bus_dmaengine_t dmaengine); int ioat_get_hwversion(bus_dmaengine_t dmaengine); size_t ioat_get_max_io_size(bus_dmaengine_t dmaengine); uint32_t ioat_get_capabilities(bus_dmaengine_t dmaengine); +int ioat_get_domain(bus_dmaengine_t dmaengine, int *domain); /* * Set interrupt coalescing on a DMA channel. From owner-svn-src-stable@freebsd.org Tue Nov 26 15:24:07 2019 Return-Path: Delivered-To: svn-src-stable@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 633AC1B9C6F; Tue, 26 Nov 2019 15:24:07 +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) server-signature RSA-PSS (4096 bits) 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 47MnkH1ylVz3xL0; Tue, 26 Nov 2019 15:24:07 +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 27BFD2702A; Tue, 26 Nov 2019 15:24:07 +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 xAQFO7aK078363; Tue, 26 Nov 2019 15:24:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQFO6Pd078361; Tue, 26 Nov 2019 15:24:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911261524.xAQFO6Pd078361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 26 Nov 2019 15:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355112 - stable/11/sys/dev/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ioat X-SVN-Commit-Revision: 355112 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 15:24:07 -0000 Author: mav Date: Tue Nov 26 15:24:06 2019 New Revision: 355112 URL: https://svnweb.freebsd.org/changeset/base/355112 Log: MFC r354841: Add ioat_get_domain() to ioat(4) KPI. This allows NUMA-aware consumers to reduce inter-domain traffic. Modified: stable/11/sys/dev/ioat/ioat.c stable/11/sys/dev/ioat/ioat.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat.c ============================================================================== --- stable/11/sys/dev/ioat/ioat.c Tue Nov 26 15:23:24 2019 (r355111) +++ stable/11/sys/dev/ioat/ioat.c Tue Nov 26 15:24:06 2019 (r355112) @@ -913,6 +913,15 @@ ioat_get_capabilities(bus_dmaengine_t dmaengine) } int +ioat_get_domain(bus_dmaengine_t dmaengine, int *domain) +{ + struct ioat_softc *ioat; + + ioat = to_ioat_softc(dmaengine); + return (bus_get_domain(ioat->device, domain)); +} + +int ioat_set_interrupt_coalesce(bus_dmaengine_t dmaengine, uint16_t delay) { struct ioat_softc *ioat; Modified: stable/11/sys/dev/ioat/ioat.h ============================================================================== --- stable/11/sys/dev/ioat/ioat.h Tue Nov 26 15:23:24 2019 (r355111) +++ stable/11/sys/dev/ioat/ioat.h Tue Nov 26 15:24:06 2019 (r355112) @@ -131,6 +131,7 @@ void ioat_put_dmaengine(bus_dmaengine_t dmaengine); int ioat_get_hwversion(bus_dmaengine_t dmaengine); size_t ioat_get_max_io_size(bus_dmaengine_t dmaengine); uint32_t ioat_get_capabilities(bus_dmaengine_t dmaengine); +int ioat_get_domain(bus_dmaengine_t dmaengine, int *domain); /* * Set interrupt coalescing on a DMA channel. From owner-svn-src-stable@freebsd.org Tue Nov 26 18:10:46 2019 Return-Path: Delivered-To: svn-src-stable@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 BF2C41BDAA2; Tue, 26 Nov 2019 18:10:46 +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) server-signature RSA-PSS (4096 bits) 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 47MsQZ5Rv9z46JF; Tue, 26 Nov 2019 18:10:46 +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 97972D5D; Tue, 26 Nov 2019 18:10:46 +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 xAQIAkMv073699; Tue, 26 Nov 2019 18:10:46 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQIAjRd073694; Tue, 26 Nov 2019 18:10:45 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201911261810.xAQIAjRd073694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 26 Nov 2019 18:10: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: r355116 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 355116 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 18:10:46 -0000 Author: vmaffione Date: Tue Nov 26 18:10:45 2019 New Revision: 355116 URL: https://svnweb.freebsd.org/changeset/base/355116 Log: MFC r354552, r354864 bhyve: add support for virtio-net mergeable rx buffers Mergeable rx buffers is a virtio-net feature that allows the hypervisor to use multiple RX descriptor chains to receive a single receive packet. Without this feature, a TSO-enabled guest is compelled to publish only 64K (or 32K) long chains, and each of these large buffers is consumed to receive a single packet, even a very short one. This is a waste of memory, as a RX queue has room for 256 chains, which means up to 16MB of buffer memory for each (single-queue) vtnet device. With the feature on, the guest can publish 2K long chains, and the hypervisor will merge them as needed. This change also enables the feature in the netmap backend, which supports virtio-net offloads. We plan to add support for the tap backend too. Note that differently from QEMU/KVM, here we implement one-copy receive, while QEMU uses two copies. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D21007 Modified: stable/12/usr.sbin/bhyve/net_backends.c stable/12/usr.sbin/bhyve/pci_virtio_console.c stable/12/usr.sbin/bhyve/pci_virtio_net.c stable/12/usr.sbin/bhyve/virtio.c stable/12/usr.sbin/bhyve/virtio.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/net_backends.c ============================================================================== --- stable/12/usr.sbin/bhyve/net_backends.c Tue Nov 26 17:56:39 2019 (r355115) +++ stable/12/usr.sbin/bhyve/net_backends.c Tue Nov 26 18:10:45 2019 (r355116) @@ -328,7 +328,8 @@ DATA_SET(net_backend_set, vmnet_backend); #define NETMAP_FEATURES (VIRTIO_NET_F_CSUM | VIRTIO_NET_F_HOST_TSO4 | \ VIRTIO_NET_F_HOST_TSO6 | VIRTIO_NET_F_HOST_UFO | \ VIRTIO_NET_F_GUEST_CSUM | VIRTIO_NET_F_GUEST_TSO4 | \ - VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_UFO) + VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_UFO | \ + VIRTIO_NET_F_MRG_RXBUF) struct netmap_priv { char ifname[IFNAMSIZ]; Modified: stable/12/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_console.c Tue Nov 26 17:56:39 2019 (r355115) +++ stable/12/usr.sbin/bhyve/pci_virtio_console.c Tue Nov 26 18:10:45 2019 (r355116) @@ -420,7 +420,7 @@ pci_vtcon_sock_rx(int fd __unused, enum ev_type t __un len = readv(sock->vss_conn_fd, &iov, n); if (len == 0 || (len < 0 && errno == EWOULDBLOCK)) { - vq_retchain(vq); + vq_retchains(vq, 1); vq_endchains(vq, 0); if (len == 0) goto close; Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_net.c Tue Nov 26 17:56:39 2019 (r355115) +++ stable/12/usr.sbin/bhyve/pci_virtio_net.c Tue Nov 26 18:10:45 2019 (r355116) @@ -58,11 +58,14 @@ __FBSDID("$FreeBSD$"); #include "virtio.h" #include "net_utils.h" #include "net_backends.h" +#include "iov.h" #define VTNET_RINGSZ 1024 #define VTNET_MAXSEGS 256 +#define VTNET_MAX_PKT_LEN (65536 + 64) + #define VTNET_S_HOSTCAPS \ ( VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | \ VIRTIO_F_NOTIFY_ON_EMPTY | VIRTIO_RING_F_INDIRECT_DESC) @@ -106,7 +109,6 @@ struct pci_vtnet_softc { uint64_t vsc_features; /* negotiated features */ pthread_mutex_t rx_mtx; - unsigned int rx_vhdrlen; int rx_merge; /* merged rx bufs in use */ pthread_t tx_tid; @@ -146,6 +148,16 @@ pci_vtnet_reset(void *vsc) /* Acquire the RX lock to block RX processing. */ pthread_mutex_lock(&sc->rx_mtx); + /* + * Make sure receive operation is disabled at least until we + * re-negotiate the features, since receive operation depends + * on the value of sc->rx_merge and the header length, which + * are both set in pci_vtnet_neg_features(). + * Receive operation will be enabled again once the guest adds + * the first receive buffers and kicks us. + */ + netbe_rx_disable(sc->vsc_be); + /* Set sc->resetting and give a chance to the TX thread to stop. */ pthread_mutex_lock(&sc->tx_mtx); sc->resetting = 1; @@ -155,9 +167,6 @@ pci_vtnet_reset(void *vsc) pthread_mutex_lock(&sc->tx_mtx); } - sc->rx_merge = 1; - sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - /* * Now reset rings, MSI-X vectors, and negotiated capabilities. * Do that with the TX lock held, since we need to reset @@ -170,59 +179,119 @@ pci_vtnet_reset(void *vsc) pthread_mutex_unlock(&sc->rx_mtx); } +struct virtio_mrg_rxbuf_info { + uint16_t idx; + uint16_t pad; + uint32_t len; +}; + static void pci_vtnet_rx(struct pci_vtnet_softc *sc) { + struct virtio_mrg_rxbuf_info info[VTNET_MAXSEGS]; struct iovec iov[VTNET_MAXSEGS + 1]; struct vqueue_info *vq; - int len, n; - uint16_t idx; + uint32_t cur_iov_bytes; + struct iovec *cur_iov; + uint16_t cur_iov_len; + uint32_t ulen; + int n_chains; + int len; vq = &sc->vsc_queues[VTNET_RXQ]; for (;;) { /* - * Check for available rx buffers. + * Get a descriptor chain to store the next ingress + * packet. In case of mergeable rx buffers, get as + * many chains as necessary in order to make room + * for a maximum sized LRO packet. */ - if (!vq_has_descs(vq)) { - /* No rx buffers. Enable RX kicks and double check. */ - vq_kick_enable(vq); - if (!vq_has_descs(vq)) { + cur_iov_bytes = 0; + cur_iov_len = 0; + cur_iov = iov; + n_chains = 0; + do { + int n = vq_getchain(vq, &info[n_chains].idx, cur_iov, + VTNET_MAXSEGS - cur_iov_len, NULL); + + if (n == 0) { /* - * Still no buffers. Interrupt if needed - * (including for NOTIFY_ON_EMPTY), and - * disable the backend until the next kick. + * No rx buffers. Enable RX kicks and double + * check. */ - vq_endchains(vq, /*used_all_avail=*/1); - netbe_rx_disable(sc->vsc_be); - return; + vq_kick_enable(vq); + if (!vq_has_descs(vq)) { + /* + * Still no buffers. Return the unused + * chains (if any), interrupt if needed + * (including for NOTIFY_ON_EMPTY), and + * disable the backend until the next + * kick. + */ + vq_retchains(vq, n_chains); + vq_endchains(vq, /*used_all_avail=*/1); + netbe_rx_disable(sc->vsc_be); + return; + } + + /* More rx buffers found, so keep going. */ + vq_kick_disable(vq); + continue; } + assert(n >= 1 && cur_iov_len + n <= VTNET_MAXSEGS); + cur_iov_len += n; + if (!sc->rx_merge) { + n_chains = 1; + break; + } + info[n_chains].len = (uint32_t)count_iov(cur_iov, n); + cur_iov_bytes += info[n_chains].len; + cur_iov += n; + n_chains++; + } while (cur_iov_bytes < VTNET_MAX_PKT_LEN && + cur_iov_len < VTNET_MAXSEGS); - /* More rx buffers found, so keep going. */ - vq_kick_disable(vq); - } + len = netbe_recv(sc->vsc_be, iov, cur_iov_len); - /* - * Get descriptor chain. - */ - n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); - assert(n >= 1 && n <= VTNET_MAXSEGS); - - len = netbe_recv(sc->vsc_be, iov, n); - if (len <= 0) { /* * No more packets (len == 0), or backend errored * (err < 0). Return unused available buffers * and stop. */ - vq_retchain(vq); + vq_retchains(vq, n_chains); /* Interrupt if needed/appropriate and stop. */ vq_endchains(vq, /*used_all_avail=*/0); return; } - /* Publish the info to the guest */ - vq_relchain(vq, idx, (uint32_t)len); + ulen = (uint32_t)len; /* avoid too many casts below */ + + /* Publish the used buffers to the guest. */ + if (!sc->rx_merge) { + vq_relchain(vq, info[0].idx, ulen); + } else { + struct virtio_net_rxhdr *hdr = iov[0].iov_base; + uint32_t iolen; + int i = 0; + + assert(iov[0].iov_len >= sizeof(*hdr)); + + do { + iolen = info[i].len; + if (iolen > ulen) { + iolen = ulen; + } + vq_relchain_prepare(vq, info[i].idx, iolen); + ulen -= iolen; + i++; + assert(i <= n_chains); + } while (ulen > 0); + + hdr->vrh_bufs = i; + vq_relchain_publish(vq); + vq_retchains(vq, n_chains - i); + } } } @@ -449,8 +518,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * sc->resetting = 0; - sc->rx_merge = 1; - sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); + sc->rx_merge = 0; pthread_mutex_init(&sc->rx_mtx, NULL); /* @@ -505,18 +573,24 @@ static void pci_vtnet_neg_features(void *vsc, uint64_t negotiated_features) { struct pci_vtnet_softc *sc = vsc; + unsigned int rx_vhdrlen; sc->vsc_features = negotiated_features; - if (!(negotiated_features & VIRTIO_NET_F_MRG_RXBUF)) { + if (negotiated_features & VIRTIO_NET_F_MRG_RXBUF) { + rx_vhdrlen = sizeof(struct virtio_net_rxhdr); + sc->rx_merge = 1; + } else { + /* + * Without mergeable rx buffers, virtio-net header is 2 + * bytes shorter than sizeof(struct virtio_net_rxhdr). + */ + rx_vhdrlen = sizeof(struct virtio_net_rxhdr) - 2; sc->rx_merge = 0; - /* Without mergeable rx buffers, virtio-net header is 2 - * bytes shorter than sizeof(struct virtio_net_rxhdr). */ - sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr) - 2; } /* Tell the backend to enable some capabilities it has advertised. */ - netbe_set_cap(sc->vsc_be, negotiated_features, sc->rx_vhdrlen); + netbe_set_cap(sc->vsc_be, negotiated_features, rx_vhdrlen); } static struct pci_devemu pci_de_vnet = { Modified: stable/12/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/12/usr.sbin/bhyve/virtio.c Tue Nov 26 17:56:39 2019 (r355115) +++ stable/12/usr.sbin/bhyve/virtio.c Tue Nov 26 18:10:45 2019 (r355116) @@ -102,6 +102,7 @@ vi_reset_dev(struct virtio_softc *vs) for (vq = vs->vs_queues, i = 0; i < nvq; vq++, i++) { vq->vq_flags = 0; vq->vq_last_avail = 0; + vq->vq_next_used = 0; vq->vq_save_used = 0; vq->vq_pfn = 0; vq->vq_msix_idx = VIRTIO_MSI_NO_VECTOR; @@ -199,6 +200,7 @@ vi_vq_init(struct virtio_softc *vs, uint32_t pfn) /* Mark queue as allocated, and start at 0 when we use it. */ vq->vq_flags = VQ_ALLOC; vq->vq_last_avail = 0; + vq->vq_next_used = 0; vq->vq_save_used = 0; } @@ -279,7 +281,7 @@ vq_getchain(struct vqueue_info *vq, uint16_t *pidx, * the guest has written are valid (including all their * vd_next fields and vd_flags). * - * Compute (last_avail - va_idx) in integers mod 2**16. This is + * Compute (va_idx - last_avail) in integers mod 2**16. This is * the number of descriptors the device has made available * since the last time we updated vq->vq_last_avail. * @@ -382,38 +384,30 @@ loopy: } /* - * Return the currently-first request chain back to the available queue. + * Return the first n_chain request chains back to the available queue. * - * (This chain is the one you handled when you called vq_getchain() + * (These chains are the ones you handled when you called vq_getchain() * and used its positive return value.) */ void -vq_retchain(struct vqueue_info *vq) +vq_retchains(struct vqueue_info *vq, uint16_t n_chains) { - vq->vq_last_avail--; + vq->vq_last_avail -= n_chains; } -/* - * Return specified request chain to the guest, setting its I/O length - * to the provided value. - * - * (This chain is the one you handled when you called vq_getchain() - * and used its positive return value.) - */ void -vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen) +vq_relchain_prepare(struct vqueue_info *vq, uint16_t idx, uint32_t iolen) { - uint16_t uidx, mask; volatile struct vring_used *vuh; volatile struct virtio_used *vue; + uint16_t mask; /* * Notes: * - mask is N-1 where N is a power of 2 so computes x % N * - vuh points to the "used" data shared with guest * - vue points to the "used" ring entry we want to update - * - head is the same value we compute in vq_iovecs(). * * (I apologize for the two fields named vu_idx; the * virtio spec calls the one that vue points to, "id"...) @@ -421,18 +415,35 @@ vq_relchain(struct vqueue_info *vq, uint16_t idx, uint mask = vq->vq_qsize - 1; vuh = vq->vq_used; - uidx = vuh->vu_idx; - vue = &vuh->vu_ring[uidx++ & mask]; + vue = &vuh->vu_ring[vq->vq_next_used++ & mask]; vue->vu_idx = idx; vue->vu_tlen = iolen; +} +void +vq_relchain_publish(struct vqueue_info *vq) +{ /* * Ensure the used descriptor is visible before updating the index. * This is necessary on ISAs with memory ordering less strict than x86 * (and even on x86 to act as a compiler barrier). */ atomic_thread_fence_rel(); - vuh->vu_idx = uidx; + vq->vq_used->vu_idx = vq->vq_next_used; +} + +/* + * Return specified request chain to the guest, setting its I/O length + * to the provided value. + * + * (This chain is the one you handled when you called vq_getchain() + * and used its positive return value.) + */ +void +vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen) +{ + vq_relchain_prepare(vq, idx, iolen); + vq_relchain_publish(vq); } /* Modified: stable/12/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/12/usr.sbin/bhyve/virtio.h Tue Nov 26 17:56:39 2019 (r355115) +++ stable/12/usr.sbin/bhyve/virtio.h Tue Nov 26 18:10:45 2019 (r355116) @@ -392,6 +392,7 @@ struct vqueue_info { uint16_t vq_flags; /* flags (see above) */ uint16_t vq_last_avail; /* a recent value of vq_avail->va_idx */ + uint16_t vq_next_used; /* index of the next used slot to be filled */ uint16_t vq_save_used; /* saved vq_used->vu_idx; see vq_endchains */ uint16_t vq_msix_idx; /* MSI-X index, or VIRTIO_MSI_NO_VECTOR */ @@ -479,7 +480,10 @@ void vi_set_io_bar(struct virtio_softc *, int); int vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags); -void vq_retchain(struct vqueue_info *vq); +void vq_retchains(struct vqueue_info *vq, uint16_t n_chains); +void vq_relchain_prepare(struct vqueue_info *vq, uint16_t idx, + uint32_t iolen); +void vq_relchain_publish(struct vqueue_info *vq); void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen); void vq_endchains(struct vqueue_info *vq, int used_all_avail); From owner-svn-src-stable@freebsd.org Tue Nov 26 18:12:13 2019 Return-Path: Delivered-To: svn-src-stable@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 CBF611BDC39; Tue, 26 Nov 2019 18:12:13 +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) server-signature RSA-PSS (4096 bits) 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 47MsSF54x8z46fn; Tue, 26 Nov 2019 18:12:13 +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 93227EE0; Tue, 26 Nov 2019 18:12:13 +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 xAQICDNs077944; Tue, 26 Nov 2019 18:12:13 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQICD3l077943; Tue, 26 Nov 2019 18:12:13 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201911261812.xAQICD3l077943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 26 Nov 2019 18:12:13 +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: r355117 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 355117 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 18:12:13 -0000 Author: vmaffione Date: Tue Nov 26 18:12:13 2019 New Revision: 355117 URL: https://svnweb.freebsd.org/changeset/base/355117 Log: MFC r354659 bhyve: rework mevent processing to fix a race condition At the end of both mevent_add() and mevent_update(), mevent_notify() is called to wakeup the I/O thread, that will call kevent(changelist) to update the kernel. A race condition is possible where the client calls mevent_add() and mevent_update(EV_ENABLE) before the I/O thread has the chance to wake up and call mevent_build()+kevent(changelist) in response to mevent_add(). The mevent_add() is therefore ignored by the I/O thread, and kevent(fd, EV_ENABLE) is called before kevent(fd, EV_ADD), resuliting in a failure of the kevent(fd, EV_ENABLE) call. PR: 241808 Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D22286 Modified: stable/12/usr.sbin/bhyve/mevent.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/mevent.c ============================================================================== --- stable/12/usr.sbin/bhyve/mevent.c Tue Nov 26 18:10:45 2019 (r355116) +++ stable/12/usr.sbin/bhyve/mevent.c Tue Nov 26 18:12:13 2019 (r355117) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #include #include #include @@ -62,12 +63,6 @@ __FBSDID("$FreeBSD$"); #define MEVENT_MAX 64 -#define MEV_ADD 1 -#define MEV_ENABLE 2 -#define MEV_DISABLE 3 -#define MEV_DEL_PENDING 4 -#define MEV_ADD_DISABLED 5 - extern char *vmname; static pthread_t mevent_tid; @@ -83,7 +78,7 @@ struct mevent { enum ev_type me_type; void *me_param; int me_cq; - int me_state; + int me_state; /* Desired kevent flags. */ int me_closefd; LIST_ENTRY(mevent) me_list; }; @@ -156,30 +151,7 @@ mevent_kq_filter(struct mevent *mevp) static int mevent_kq_flags(struct mevent *mevp) { - int ret; - - switch (mevp->me_state) { - case MEV_ADD: - ret = EV_ADD; /* implicitly enabled */ - break; - case MEV_ADD_DISABLED: - ret = EV_ADD | EV_DISABLE; - break; - case MEV_ENABLE: - ret = EV_ENABLE; - break; - case MEV_DISABLE: - ret = EV_DISABLE; - break; - case MEV_DEL_PENDING: - ret = EV_DELETE; - break; - default: - assert(0); - break; - } - - return (ret); + return (mevp->me_state); } static int @@ -224,9 +196,15 @@ mevent_build(int mfd, struct kevent *kev) mevp->me_cq = 0; LIST_REMOVE(mevp, me_list); - if (mevp->me_state == MEV_DEL_PENDING) { + if (mevp->me_state & EV_DELETE) { free(mevp); } else { + /* + * We need to add the event only once, so we can + * reset the EV_ADD bit after it has been propagated + * to the kevent() arguments the first time. + */ + mevp->me_state &= ~EV_ADD; LIST_INSERT_HEAD(&global_head, mevp, me_list); } @@ -318,7 +296,7 @@ mevent_add(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param) { - return mevent_add_state(tfd, type, func, param, MEV_ADD); + return (mevent_add_state(tfd, type, func, param, EV_ADD)); } struct mevent * @@ -326,36 +304,46 @@ mevent_add_disabled(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param) { - return mevent_add_state(tfd, type, func, param, MEV_ADD_DISABLED); + return (mevent_add_state(tfd, type, func, param, EV_ADD | EV_DISABLE)); } static int -mevent_update(struct mevent *evp, int newstate) +mevent_update(struct mevent *evp, bool enable) { + int newstate; + + mevent_qlock(); + /* * It's not possible to enable/disable a deleted event */ - if (evp->me_state == MEV_DEL_PENDING) - return (EINVAL); + assert((evp->me_state & EV_DELETE) == 0); + newstate = evp->me_state; + if (enable) { + newstate |= EV_ENABLE; + newstate &= ~EV_DISABLE; + } else { + newstate |= EV_DISABLE; + newstate &= ~EV_ENABLE; + } + /* * No update needed if state isn't changing */ - if (evp->me_state == newstate) - return (0); - - mevent_qlock(); + if (evp->me_state != newstate) { + evp->me_state = newstate; - evp->me_state = newstate; - - /* - * Place the entry onto the changed list if not already there. - */ - if (evp->me_cq == 0) { - evp->me_cq = 1; - LIST_REMOVE(evp, me_list); - LIST_INSERT_HEAD(&change_head, evp, me_list); - mevent_notify(); + /* + * Place the entry onto the changed list if not + * already there. + */ + if (evp->me_cq == 0) { + evp->me_cq = 1; + LIST_REMOVE(evp, me_list); + LIST_INSERT_HEAD(&change_head, evp, me_list); + mevent_notify(); + } } mevent_qunlock(); @@ -367,14 +355,14 @@ int mevent_enable(struct mevent *evp) { - return (mevent_update(evp, MEV_ENABLE)); + return (mevent_update(evp, true)); } int mevent_disable(struct mevent *evp) { - return (mevent_update(evp, MEV_DISABLE)); + return (mevent_update(evp, false)); } static int @@ -392,7 +380,7 @@ mevent_delete_event(struct mevent *evp, int closefd) LIST_INSERT_HEAD(&change_head, evp, me_list); mevent_notify(); } - evp->me_state = MEV_DEL_PENDING; + evp->me_state = EV_DELETE; if (closefd) evp->me_closefd = 1; From owner-svn-src-stable@freebsd.org Tue Nov 26 19:04:20 2019 Return-Path: Delivered-To: svn-src-stable@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 5DED41BED98; Tue, 26 Nov 2019 19:04:20 +0000 (UTC) (envelope-from scottl@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) server-signature RSA-PSS (4096 bits) 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 47MtcN1wdHz495f; Tue, 26 Nov 2019 19:04:20 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25FD4181A; Tue, 26 Nov 2019 19:04:20 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAQJ4JKc008400; Tue, 26 Nov 2019 19:04:19 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAQJ4JFr008399; Tue, 26 Nov 2019 19:04:19 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201911261904.xAQJ4JFr008399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Tue, 26 Nov 2019 19:04: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: r355118 - in stable/12: share/man/man4 sys/dev/hpt27xx X-SVN-Group: stable-12 X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/hpt27xx X-SVN-Commit-Revision: 355118 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 19:04:20 -0000 Author: scottl Date: Tue Nov 26 19:04:19 2019 New Revision: 355118 URL: https://svnweb.freebsd.org/changeset/base/355118 Log: Partially revert r355028. hpt27xx is not Giant-locked in FreeBSD 12.x, so is it not going to be deprecated. Reported by: imp Modified: stable/12/share/man/man4/hpt27xx.4 stable/12/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Modified: stable/12/share/man/man4/hpt27xx.4 ============================================================================== --- stable/12/share/man/man4/hpt27xx.4 Tue Nov 26 18:12:13 2019 (r355117) +++ stable/12/share/man/man4/hpt27xx.4 Tue Nov 26 19:04:19 2019 (r355118) @@ -44,9 +44,6 @@ module at boot time, place the following line in .Bd -literal -offset indent hpt27xx_load="YES" .Ed -.Sh DEPRECATION NOTICE -This driver is scheduled for removal prior to the release of -.Fx 13.0 . .Sh DESCRIPTION The .Nm Modified: stable/12/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/12/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Nov 26 18:12:13 2019 (r355117) +++ stable/12/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Nov 26 19:04:19 2019 (r355118) @@ -76,9 +76,7 @@ static int hpt_attach(device_t dev) HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; - - gone_in(13, "Giant locked CAM drivers"); - + KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); him = hpt_match(dev, 1); From owner-svn-src-stable@freebsd.org Wed Nov 27 03:18:36 2019 Return-Path: Delivered-To: svn-src-stable@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 1A97B1C8921; Wed, 27 Nov 2019 03:18:36 +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) server-signature RSA-PSS (4096 bits) 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 47N5Zg6gpDz4ZnW; Wed, 27 Nov 2019 03:18:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C859D7273; Wed, 27 Nov 2019 03:18:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAR3IZX1001546; Wed, 27 Nov 2019 03:18:35 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAR3IZgb001545; Wed, 27 Nov 2019 03:18:35 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201911270318.xAR3IZgb001545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Nov 2019 03:18: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: r355127 - stable/12/contrib/ntp/ntpd X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/contrib/ntp/ntpd X-SVN-Commit-Revision: 355127 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2019 03:18:36 -0000 Author: cy Date: Wed Nov 27 03:18:35 2019 New Revision: 355127 URL: https://svnweb.freebsd.org/changeset/base/355127 Log: MFC rr354733: Disable ntpd stack gap. When ASLR with STACK GAP != 0 ntpd suffers SIGSEGV. PR: 241421, 241960 Reported by: Vladimir Zakharov , dewayne@heuristicsystems.com.au Reviewed by: kib, imp (previous version), ian (suggestion) Differential Revision: https://reviews.freebsd.org/D22358 Modified: stable/12/contrib/ntp/ntpd/ntpd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/ntp/ntpd/ntpd.c ============================================================================== --- stable/12/contrib/ntp/ntpd/ntpd.c Wed Nov 27 01:54:39 2019 (r355126) +++ stable/12/contrib/ntp/ntpd/ntpd.c Wed Nov 27 03:18:35 2019 (r355127) @@ -138,6 +138,17 @@ # include #endif /* LIBSECCOMP and KERN_SECCOMP */ +#ifdef __FreeBSD__ +#include +#ifndef PROC_STACKGAP_CTL +/* + * Even if we compile on an older system we can still run on a newer one. + */ +#define PROC_STACKGAP_CTL 17 +#define PROC_STACKGAP_DISABLE 0x0002 +#endif +#endif + #ifdef HAVE_DNSREGISTRATION # include DNSServiceRef mdns; @@ -402,6 +413,18 @@ main( char *argv[] ) { +#ifdef __FreeBSD__ + { + /* + * We Must disable ASLR stack gap on FreeBSD to avoid a + * segfault. See PR/241421 and PR/241960. + */ + int aslr_var = PROC_STACKGAP_DISABLE; + + pid_t my_pid = getpid(); + procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var); + } +#endif return ntpdmain(argc, argv); } #endif /* !SYS_WINNT */ From owner-svn-src-stable@freebsd.org Wed Nov 27 13:46:29 2019 Return-Path: Delivered-To: svn-src-stable@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 E98581AC96C; Wed, 27 Nov 2019 13:46:29 +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) server-signature RSA-PSS (4096 bits) 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 47NMW94dltz45mh; Wed, 27 Nov 2019 13:46:29 +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 65565E476; Wed, 27 Nov 2019 13:46:29 +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 xARDkThh070484; Wed, 27 Nov 2019 13:46:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xARDkSqs070481; Wed, 27 Nov 2019 13:46:28 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201911271346.xARDkSqs070481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Nov 2019 13:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355131 - in stable/11: . sbin/ipf targets/pseudo/userland X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/11: . sbin/ipf targets/pseudo/userland X-SVN-Commit-Revision: 355131 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2019 13:46:30 -0000 Author: cy Date: Wed Nov 27 13:46:28 2019 New Revision: 355131 URL: https://svnweb.freebsd.org/changeset/base/355131 Log: MFC r315223, r325182: Disconnect ipftest and ipresend from the build until it can be verified that they still work. These utilities have become out of sync with the code in the kernel and need work to bring them back into shape. Most people test on real systems or VMs on real networks. Suggested by: glebius Modified: stable/11/ObsoleteFiles.inc stable/11/sbin/ipf/Makefile stable/11/targets/pseudo/userland/Makefile.depend Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Wed Nov 27 10:26:37 2019 (r355130) +++ stable/11/ObsoleteFiles.inc Wed Nov 27 13:46:28 2019 (r355131) @@ -1136,6 +1136,9 @@ OLD_FILES+=usr/tests/usr.sbin/pw/pw_useradd OLD_FILES+=usr/tests/usr.sbin/pw/pw_userdel OLD_FILES+=usr/tests/usr.sbin/pw/pw_usermod OLD_FILES+=usr/tests/usr.sbin/pw/pw_usernext +# 20170313: sbin/ipftest and ipresend temporarily disconnected. +OLD_FILES+=sbin/ipftest +OLD_FILES+=sbin/ipresend # 20170308: rename some tests OLD_FILES+=usr/tests/bin/pwait/pwait OLD_FILES+=usr/tests/usr.bin/timeout/timeout Modified: stable/11/sbin/ipf/Makefile ============================================================================== --- stable/11/sbin/ipf/Makefile Wed Nov 27 10:26:37 2019 (r355130) +++ stable/11/sbin/ipf/Makefile Wed Nov 27 13:46:28 2019 (r355131) @@ -1,7 +1,9 @@ # $FreeBSD$ SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend +SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +# XXX Temporarily disconnected. +# SUBDIR+= ipftest ipresend SUBDIR_PARALLEL= .include Modified: stable/11/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/Makefile.depend Wed Nov 27 10:26:37 2019 (r355130) +++ stable/11/targets/pseudo/userland/Makefile.depend Wed Nov 27 13:46:28 2019 (r355131) @@ -104,11 +104,9 @@ DIRDEPS+= \ sbin/ipf/ipf \ sbin/ipf/ipfs \ sbin/ipf/ipfstat \ - sbin/ipf/ipftest \ sbin/ipf/ipmon \ sbin/ipf/ipnat \ sbin/ipf/ippool \ - sbin/ipf/ipresend \ sbin/ipf/libipf \ sbin/ipfw \ sbin/iscontrol \ From owner-svn-src-stable@freebsd.org Wed Nov 27 18:52:02 2019 Return-Path: Delivered-To: svn-src-stable@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 B59AE1B4A1B; Wed, 27 Nov 2019 18:52:02 +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) server-signature RSA-PSS (4096 bits) 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 47NVHk4NzJz4PtT; Wed, 27 Nov 2019 18:52:02 +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 7A6A319CDF; Wed, 27 Nov 2019 18:52:02 +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 xARIq2eO053229; Wed, 27 Nov 2019 18:52:02 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xARIq2lD053228; Wed, 27 Nov 2019 18:52:02 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201911271852.xARIq2lD053228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 27 Nov 2019 18:52: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: r355133 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 355133 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2019 18:52:02 -0000 Author: vmaffione Date: Wed Nov 27 18:52:01 2019 New Revision: 355133 URL: https://svnweb.freebsd.org/changeset/base/355133 Log: MFC r354867: netmap: check if we already ran mmap before we attempt it Submitted by: neel@neelc.org Reviewed by: vmaffione Differential Revision: https://reviews.freebsd.org/D22390 Modified: stable/12/sys/net/netmap_user.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/netmap_user.h ============================================================================== --- stable/12/sys/net/netmap_user.h Wed Nov 27 16:52:46 2019 (r355132) +++ stable/12/sys/net/netmap_user.h Wed Nov 27 18:52:01 2019 (r355133) @@ -981,7 +981,8 @@ nm_close(struct nm_desc *d) static int nm_mmap(struct nm_desc *d, const struct nm_desc *parent) { - //XXX TODO: check if mmap is already done + if (d->done_mmap) + return 0; if (IS_NETMAP_DESC(parent) && parent->mem && parent->req.nr_arg2 == d->req.nr_arg2) { From owner-svn-src-stable@freebsd.org Wed Nov 27 19:34:34 2019 Return-Path: Delivered-To: svn-src-stable@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 334221B5E85; Wed, 27 Nov 2019 19:34:34 +0000 (UTC) (envelope-from alc@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) server-signature RSA-PSS (4096 bits) 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 47NWDp0c9kz4Sl4; Wed, 27 Nov 2019 19:34:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED64B1A4AE; Wed, 27 Nov 2019 19:34:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xARJYXRT077607; Wed, 27 Nov 2019 19:34:33 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xARJYXw3077603; Wed, 27 Nov 2019 19:34:33 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201911271934.xARJYXw3077603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 27 Nov 2019 19:34:33 +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: r355136 - in stable/12/sys/arm64: arm64 include X-SVN-Group: stable-12 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/12/sys/arm64: arm64 include X-SVN-Commit-Revision: 355136 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2019 19:34:34 -0000 Author: alc Date: Wed Nov 27 19:34:33 2019 New Revision: 355136 URL: https://svnweb.freebsd.org/changeset/base/355136 Log: MFC r350579,r350741,r352584 Enable superpage promotion within the kernel pmap. Ordinarily, during a superpage promotion or demotion within a pmap, the pmap's lock ensures that other operations on the pmap don't observe the old mapping being broken before the new mapping is established. However, pmap_kextract() doesn't acquire the kernel pmap's lock, so it may observe the broken mapping. And, if it does, it returns an incorrect result. This revision implements a lock-free solution to this problem in pmap_update_entry() and pmap_kextract() because pmap_kextract() can't acquire the kernel pmap's lock. In case a translation fault on the kernel address space occurs from within a critical section, we must perform a lock-free check on the faulting address. Modified: stable/12/sys/arm64/arm64/pmap.c stable/12/sys/arm64/include/pte.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/pmap.c ============================================================================== --- stable/12/sys/arm64/arm64/pmap.c Wed Nov 27 19:32:29 2019 (r355135) +++ stable/12/sys/arm64/arm64/pmap.c Wed Nov 27 19:34:33 2019 (r355136) @@ -1128,40 +1128,35 @@ vm_paddr_t pmap_kextract(vm_offset_t va) { pt_entry_t *pte, tpte; - vm_paddr_t pa; - int lvl; - if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) { - pa = DMAP_TO_PHYS(va); - } else { - pa = 0; - pte = pmap_pte(kernel_pmap, va, &lvl); - if (pte != NULL) { - tpte = pmap_load(pte); - pa = tpte & ~ATTR_MASK; - switch(lvl) { - case 1: - KASSERT((tpte & ATTR_DESCR_MASK) == L1_BLOCK, - ("pmap_kextract: Invalid L1 pte found: %lx", - tpte & ATTR_DESCR_MASK)); - pa |= (va & L1_OFFSET); - break; - case 2: - KASSERT((tpte & ATTR_DESCR_MASK) == L2_BLOCK, - ("pmap_kextract: Invalid L2 pte found: %lx", - tpte & ATTR_DESCR_MASK)); - pa |= (va & L2_OFFSET); - break; - case 3: - KASSERT((tpte & ATTR_DESCR_MASK) == L3_PAGE, - ("pmap_kextract: Invalid L3 pte found: %lx", - tpte & ATTR_DESCR_MASK)); - pa |= (va & L3_OFFSET); - break; - } - } - } - return (pa); + if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) + return (DMAP_TO_PHYS(va)); + pte = pmap_l1(kernel_pmap, va); + if (pte == NULL) + return (0); + + /* + * A concurrent pmap_update_entry() will clear the entry's valid bit + * but leave the rest of the entry unchanged. Therefore, we treat a + * non-zero entry as being valid, and we ignore the valid bit when + * determining whether the entry maps a block, page, or table. + */ + tpte = pmap_load(pte); + if (tpte == 0) + return (0); + if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) + return ((tpte & ~ATTR_MASK) | (va & L1_OFFSET)); + pte = pmap_l1_to_l2(&tpte, va); + tpte = pmap_load(pte); + if (tpte == 0) + return (0); + if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) + return ((tpte & ~ATTR_MASK) | (va & L2_OFFSET)); + pte = pmap_l2_to_l3(&tpte, va); + tpte = pmap_load(pte); + if (tpte == 0) + return (0); + return ((tpte & ~ATTR_MASK) | (va & L3_OFFSET)); } /*************************************************** @@ -3020,8 +3015,12 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_ent */ intr = intr_disable(); - /* Clear the old mapping */ - pmap_clear(pte); + /* + * Clear the old mapping's valid bit, but leave the rest of the entry + * unchanged, so that a lockless, concurrent pmap_kextract() can still + * lookup the physical address. + */ + pmap_clear_bits(pte, ATTR_DESCR_VALID); pmap_invalidate_range_nopin(pmap, va, va + size); /* Create the new mapping */ @@ -3423,8 +3422,7 @@ validate: } #if VM_NRESERVLEVEL > 0 - if (pmap != pmap_kernel() && - (mpte == NULL || mpte->wire_count == NL3PG) && + if ((mpte == NULL || mpte->wire_count == NL3PG) && pmap_ps_enabled(pmap) && (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) { @@ -5835,23 +5833,33 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far) case ISS_DATA_DFSC_TF_L1: case ISS_DATA_DFSC_TF_L2: case ISS_DATA_DFSC_TF_L3: - PMAP_LOCK(pmap); - /* Ask the MMU to check the address */ - intr = intr_disable(); - if (pmap == kernel_pmap) - par = arm64_address_translate_s1e1r(far); - else - par = arm64_address_translate_s1e0r(far); - intr_restore(intr); - PMAP_UNLOCK(pmap); - /* - * If the translation was successful the address was invalid - * due to a break-before-make sequence. We can unlock and - * return success to the trap handler. + * Retry the translation. A break-before-make sequence can + * produce a transient fault. */ - if (PAR_SUCCESS(par)) - rv = KERN_SUCCESS; + if (pmap == kernel_pmap) { + /* + * The translation fault may have occurred within a + * critical section. Therefore, we must check the + * address without acquiring the kernel pmap's lock. + */ + if (pmap_kextract(far) != 0) + rv = KERN_SUCCESS; + } else { + PMAP_LOCK(pmap); + /* Ask the MMU to check the address. */ + intr = intr_disable(); + par = arm64_address_translate_s1e0r(far); + intr_restore(intr); + PMAP_UNLOCK(pmap); + + /* + * If the translation was successful, then we can + * return success to the trap handler. + */ + if (PAR_SUCCESS(par)) + rv = KERN_SUCCESS; + } break; } Modified: stable/12/sys/arm64/include/pte.h ============================================================================== --- stable/12/sys/arm64/include/pte.h Wed Nov 27 19:32:29 2019 (r355135) +++ stable/12/sys/arm64/include/pte.h Wed Nov 27 19:34:33 2019 (r355136) @@ -71,7 +71,12 @@ typedef uint64_t pt_entry_t; /* page table entry */ #define ATTR_DEFAULT (ATTR_AF | ATTR_SH(ATTR_SH_IS)) -#define ATTR_DESCR_MASK 3 +#define ATTR_DESCR_MASK 3 +#define ATTR_DESCR_VALID 1 +#define ATTR_DESCR_TYPE_MASK 2 +#define ATTR_DESCR_TYPE_TABLE 2 +#define ATTR_DESCR_TYPE_PAGE 2 +#define ATTR_DESCR_TYPE_BLOCK 0 /* Level 0 table, 512GiB per entry */ #define L0_SHIFT 39 From owner-svn-src-stable@freebsd.org Thu Nov 28 00:40:43 2019 Return-Path: Delivered-To: svn-src-stable@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 A594B1BCF52; Thu, 28 Nov 2019 00:40:43 +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) server-signature RSA-PSS (4096 bits) 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 47Nf2340vLz3Jd4; Thu, 28 Nov 2019 00:40:43 +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 6CC4A1DB2F; Thu, 28 Nov 2019 00:40:43 +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 xAS0eh96057521; Thu, 28 Nov 2019 00:40:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS0egrk057516; Thu, 28 Nov 2019 00:40:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911280040.xAS0egrk057516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Nov 2019 00:40: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: r355151 - in stable/12/sys/dev/ntb: . ntb_hw X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys/dev/ntb: . ntb_hw X-SVN-Commit-Revision: 355151 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 00:40:43 -0000 Author: mav Date: Thu Nov 28 00:40:42 2019 New Revision: 355151 URL: https://svnweb.freebsd.org/changeset/base/355151 Log: MFC r354702: Make ntb(4) send bus_get_dma_tag() requests to parent buses passing real bus' child pointers instead of grandchilds. DMAR does not like requests from devices not parented directly by PCI. Modified: stable/12/sys/dev/ntb/ntb.c stable/12/sys/dev/ntb/ntb.h stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ntb/ntb.c ============================================================================== --- stable/12/sys/dev/ntb/ntb.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb.c Thu Nov 28 00:40:42 2019 (r355151) @@ -205,6 +205,13 @@ ntb_print_child(device_t dev, device_t child) return (retval); } +bus_dma_tag_t +ntb_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + void ntb_link_event(device_t dev) { Modified: stable/12/sys/dev/ntb/ntb.h ============================================================================== --- stable/12/sys/dev/ntb/ntb.h Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb.h Thu Nov 28 00:40:42 2019 (r355151) @@ -39,6 +39,7 @@ int ntb_unregister_device(device_t ntb); int ntb_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); int ntb_print_child(device_t dev, device_t child); +bus_dma_tag_t ntb_get_dma_tag(device_t bus, device_t child); /* * ntb_link_event() - notify driver context of a change in link status Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Nov 28 00:40:42 2019 (r355151) @@ -1266,6 +1266,7 @@ static device_method_t ntb_amd_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, amd_ntb_port_number), Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:40:42 2019 (r355151) @@ -3123,6 +3123,7 @@ static device_method_t ntb_intel_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, intel_ntb_port_number), DEVMETHOD(ntb_peer_port_count, intel_ntb_peer_port_count), Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:40:42 2019 (r355151) @@ -1052,6 +1052,7 @@ static device_method_t ntb_plx_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, ntb_plx_port_number), DEVMETHOD(ntb_peer_port_count, ntb_plx_peer_port_count), From owner-svn-src-stable@freebsd.org Thu Nov 28 00:41:43 2019 Return-Path: Delivered-To: svn-src-stable@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 8F24E1BCFDE; Thu, 28 Nov 2019 00:41:43 +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) server-signature RSA-PSS (4096 bits) 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 47Nf3C3L4Mz3Jny; Thu, 28 Nov 2019 00:41:43 +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 571831DB8E; Thu, 28 Nov 2019 00:41:43 +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 xAS0fhiS060730; Thu, 28 Nov 2019 00:41:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS0fgZk060603; Thu, 28 Nov 2019 00:41:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911280041.xAS0fgZk060603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Nov 2019 00:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355152 - in stable/11/sys/dev/ntb: . ntb_hw X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/dev/ntb: . ntb_hw X-SVN-Commit-Revision: 355152 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 00:41:43 -0000 Author: mav Date: Thu Nov 28 00:41:42 2019 New Revision: 355152 URL: https://svnweb.freebsd.org/changeset/base/355152 Log: MFC r354702: Make ntb(4) send bus_get_dma_tag() requests to parent buses passing real bus' child pointers instead of grandchilds. DMAR does not like requests from devices not parented directly by PCI. Modified: stable/11/sys/dev/ntb/ntb.c stable/11/sys/dev/ntb/ntb.h stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/ntb.c ============================================================================== --- stable/11/sys/dev/ntb/ntb.c Thu Nov 28 00:40:42 2019 (r355151) +++ stable/11/sys/dev/ntb/ntb.c Thu Nov 28 00:41:42 2019 (r355152) @@ -205,6 +205,13 @@ ntb_print_child(device_t dev, device_t child) return (retval); } +bus_dma_tag_t +ntb_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + void ntb_link_event(device_t dev) { Modified: stable/11/sys/dev/ntb/ntb.h ============================================================================== --- stable/11/sys/dev/ntb/ntb.h Thu Nov 28 00:40:42 2019 (r355151) +++ stable/11/sys/dev/ntb/ntb.h Thu Nov 28 00:41:42 2019 (r355152) @@ -39,6 +39,7 @@ int ntb_unregister_device(device_t ntb); int ntb_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); int ntb_print_child(device_t dev, device_t child); +bus_dma_tag_t ntb_get_dma_tag(device_t bus, device_t child); /* * ntb_link_event() - notify driver context of a change in link status Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:40:42 2019 (r355151) +++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:41:42 2019 (r355152) @@ -3088,6 +3088,7 @@ static device_method_t ntb_intel_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_link_is_up, intel_ntb_link_is_up), DEVMETHOD(ntb_link_enable, intel_ntb_link_enable), Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:40:42 2019 (r355151) +++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:41:42 2019 (r355152) @@ -1009,6 +1009,7 @@ static device_method_t ntb_plx_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_link_is_up, ntb_plx_link_is_up), DEVMETHOD(ntb_link_enable, ntb_plx_link_enable), From owner-svn-src-stable@freebsd.org Thu Nov 28 00:42:45 2019 Return-Path: Delivered-To: svn-src-stable@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 C5AD91BD1C3; Thu, 28 Nov 2019 00:42:45 +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) server-signature RSA-PSS (4096 bits) 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 47Nf4P4sgdz3K5R; Thu, 28 Nov 2019 00:42:45 +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 8A53F1DCD3; Thu, 28 Nov 2019 00:42:45 +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 xAS0gjFX063208; Thu, 28 Nov 2019 00:42:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS0gjkT063207; Thu, 28 Nov 2019 00:42:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911280042.xAS0gjkT063207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Nov 2019 00:42: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: r355153 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 355153 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 00:42:45 -0000 Author: mav Date: Thu Nov 28 00:42:45 2019 New Revision: 355153 URL: https://svnweb.freebsd.org/changeset/base/355153 Log: MFC r354703: Pass more reasonable WAIT flags to bus_dma(9) calls. Modified: stable/12/sys/dev/ioat/ioat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Thu Nov 28 00:41:42 2019 (r355152) +++ stable/12/sys/dev/ioat/ioat.c Thu Nov 28 00:42:45 2019 (r355153) @@ -497,13 +497,14 @@ ioat3_attach(device_t device) &ioat->comp_update_tag); error = bus_dmamem_alloc(ioat->comp_update_tag, - (void **)&ioat->comp_update, BUS_DMA_ZERO, &ioat->comp_update_map); + (void **)&ioat->comp_update, BUS_DMA_ZERO | BUS_DMA_WAITOK, + &ioat->comp_update_map); if (ioat->comp_update == NULL) return (ENOMEM); error = bus_dmamap_load(ioat->comp_update_tag, ioat->comp_update_map, ioat->comp_update, sizeof(uint64_t), ioat_comp_update_map, ioat, - 0); + BUS_DMA_NOWAIT); if (error != 0) return (error); @@ -524,7 +525,7 @@ ioat3_attach(device_t device) return (error); error = bus_dmamap_load(ioat->hw_desc_tag, ioat->hw_desc_map, hw_desc, - ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_WAITOK); + ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_NOWAIT); if (error) return (error); From owner-svn-src-stable@freebsd.org Thu Nov 28 00:42:55 2019 Return-Path: Delivered-To: svn-src-stable@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 F0E071BD233; Thu, 28 Nov 2019 00:42:55 +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) server-signature RSA-PSS (4096 bits) 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 47Nf4b69ZLz3KC8; Thu, 28 Nov 2019 00:42:55 +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 B888F1DCD4; Thu, 28 Nov 2019 00:42:55 +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 xAS0gthq063261; Thu, 28 Nov 2019 00:42:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS0gtLI063260; Thu, 28 Nov 2019 00:42:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911280042.xAS0gtLI063260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Nov 2019 00:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355154 - stable/11/sys/dev/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ioat X-SVN-Commit-Revision: 355154 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 00:42:56 -0000 Author: mav Date: Thu Nov 28 00:42:55 2019 New Revision: 355154 URL: https://svnweb.freebsd.org/changeset/base/355154 Log: MFC r354703: Pass more reasonable WAIT flags to bus_dma(9) calls. Modified: stable/11/sys/dev/ioat/ioat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat.c ============================================================================== --- stable/11/sys/dev/ioat/ioat.c Thu Nov 28 00:42:45 2019 (r355153) +++ stable/11/sys/dev/ioat/ioat.c Thu Nov 28 00:42:55 2019 (r355154) @@ -487,13 +487,14 @@ ioat3_attach(device_t device) &ioat->comp_update_tag); error = bus_dmamem_alloc(ioat->comp_update_tag, - (void **)&ioat->comp_update, BUS_DMA_ZERO, &ioat->comp_update_map); + (void **)&ioat->comp_update, BUS_DMA_ZERO | BUS_DMA_WAITOK, + &ioat->comp_update_map); if (ioat->comp_update == NULL) return (ENOMEM); error = bus_dmamap_load(ioat->comp_update_tag, ioat->comp_update_map, ioat->comp_update, sizeof(uint64_t), ioat_comp_update_map, ioat, - 0); + BUS_DMA_NOWAIT); if (error != 0) return (error); @@ -514,7 +515,7 @@ ioat3_attach(device_t device) return (error); error = bus_dmamap_load(ioat->hw_desc_tag, ioat->hw_desc_map, hw_desc, - ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_WAITOK); + ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_NOWAIT); if (error) return (error); From owner-svn-src-stable@freebsd.org Thu Nov 28 02:12:33 2019 Return-Path: Delivered-To: svn-src-stable@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 CB75C1C0452; Thu, 28 Nov 2019 02:12:33 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 47Nh4153Qjz3Pkd; Thu, 28 Nov 2019 02:12:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90D3C1EDA2; Thu, 28 Nov 2019 02:12:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS2CXah017442; Thu, 28 Nov 2019 02:12:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS2CXRJ017441; Thu, 28 Nov 2019 02:12:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911280212.xAS2CXRJ017441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Nov 2019 02:12:33 +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: r355158 - stable/12/sys/dev/cfi X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/cfi X-SVN-Commit-Revision: 355158 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 02:12:33 -0000 Author: emaste Date: Thu Nov 28 02:12:33 2019 New Revision: 355158 URL: https://svnweb.freebsd.org/changeset/base/355158 Log: MFC r355101, r355104: cfi: check for inter overflow in cfi_devioctl Reported by: Pietro Oliva Security: Possible OOB read in root-only ioctl Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/dev/cfi/cfi_dev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cfi/cfi_dev.c ============================================================================== --- stable/12/sys/dev/cfi/cfi_dev.c Thu Nov 28 02:05:31 2019 (r355157) +++ stable/12/sys/dev/cfi/cfi_dev.c Thu Nov 28 02:12:33 2019 (r355158) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -280,7 +281,8 @@ cfi_devioctl(struct cdev *dev, u_long cmd, caddr_t dat rq = (struct cfiocqry *)data; if (rq->offset >= sc->sc_size / sc->sc_width) return (ESPIPE); - if (rq->offset + rq->count > sc->sc_size / sc->sc_width) + if (rq->offset > ULONG_MAX - rq->count || + rq->offset + rq->count > sc->sc_size / sc->sc_width) return (ENOSPC); while (!error && rq->count--) { From owner-svn-src-stable@freebsd.org Thu Nov 28 02:15:46 2019 Return-Path: Delivered-To: svn-src-stable@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 427591C05D9; Thu, 28 Nov 2019 02:15:46 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 47Nh7k115Pz3PvP; Thu, 28 Nov 2019 02:15:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0606B1EDAC; Thu, 28 Nov 2019 02:15:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS2FjSQ017706; Thu, 28 Nov 2019 02:15:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS2FjQN017705; Thu, 28 Nov 2019 02:15:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911280215.xAS2FjQN017705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Nov 2019 02:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355159 - stable/11/sys/dev/cfi X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/cfi X-SVN-Commit-Revision: 355159 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 02:15:46 -0000 Author: emaste Date: Thu Nov 28 02:15:45 2019 New Revision: 355159 URL: https://svnweb.freebsd.org/changeset/base/355159 Log: MFC r355101, r355104: cfi: check for inter overflow in cfi_devioctl Reported by: Pietro Oliva Security: Possible OOB read in root-only ioctl Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/cfi/cfi_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cfi/cfi_dev.c ============================================================================== --- stable/11/sys/dev/cfi/cfi_dev.c Thu Nov 28 02:12:33 2019 (r355158) +++ stable/11/sys/dev/cfi/cfi_dev.c Thu Nov 28 02:15:45 2019 (r355159) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -278,7 +279,8 @@ cfi_devioctl(struct cdev *dev, u_long cmd, caddr_t dat rq = (struct cfiocqry *)data; if (rq->offset >= sc->sc_size / sc->sc_width) return (ESPIPE); - if (rq->offset + rq->count > sc->sc_size / sc->sc_width) + if (rq->offset > ULONG_MAX - rq->count || + rq->offset + rq->count > sc->sc_size / sc->sc_width) return (ENOSPC); while (!error && rq->count--) { From owner-svn-src-stable@freebsd.org Thu Nov 28 02:18:19 2019 Return-Path: Delivered-To: svn-src-stable@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 B7CC21C06C5; Thu, 28 Nov 2019 02:18:19 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 47NhBg4VZPz3Q5N; Thu, 28 Nov 2019 02:18:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 792CC1EDAD; Thu, 28 Nov 2019 02:18:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS2IJf6017908; Thu, 28 Nov 2019 02:18:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS2IJbP017907; Thu, 28 Nov 2019 02:18:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911280218.xAS2IJbP017907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Nov 2019 02:18: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: r355160 - stable/12/crypto/openssh X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/crypto/openssh X-SVN-Commit-Revision: 355160 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 02:18:19 -0000 Author: emaste Date: Thu Nov 28 02:18:19 2019 New Revision: 355160 URL: https://svnweb.freebsd.org/changeset/base/355160 Log: MFC r354897: sshd: make getpwclass wrapper MON_ISAUTH not MON_AUTH In r339216 a privsep wrapper was added for login_getpwclass to address PR 231172. Unfortunately the change used the MON_AUTH flag in the wrapper, and MON_AUTH includes MON_AUTHDECIDE which triggers an auth_log() on each invocation. getpwclass() does not participate in the authentication decision, so should be MON_ISAUTH instead. PR: 234793 Submitted by: Henry Hu Reviewed by: Yuichiro NAITO MFC after: 1 week Modified: stable/12/crypto/openssh/monitor.c Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssh/monitor.c ============================================================================== --- stable/12/crypto/openssh/monitor.c Thu Nov 28 02:15:45 2019 (r355159) +++ stable/12/crypto/openssh/monitor.c Thu Nov 28 02:18:19 2019 (r355160) @@ -193,7 +193,7 @@ struct mon_table mon_dispatch_proto20[] = { #endif {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign}, #ifdef HAVE_LOGIN_CAP - {MONITOR_REQ_GETPWCLASS, MON_AUTH, mm_answer_login_getpwclass}, + {MONITOR_REQ_GETPWCLASS, MON_ISAUTH, mm_answer_login_getpwclass}, #endif {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow}, {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv}, From owner-svn-src-stable@freebsd.org Thu Nov 28 02:19:42 2019 Return-Path: Delivered-To: svn-src-stable@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 0D2301C089C; Thu, 28 Nov 2019 02:19:42 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 47NhDF6cyfz3QN5; Thu, 28 Nov 2019 02:19:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67C11EDCF; Thu, 28 Nov 2019 02:19:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS2JfNT018102; Thu, 28 Nov 2019 02:19:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS2JfJ7018101; Thu, 28 Nov 2019 02:19:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911280219.xAS2JfJ7018101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Nov 2019 02:19: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: r355162 - stable/12/sys/arm64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/arm64/linux X-SVN-Commit-Revision: 355162 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 02:19:42 -0000 Author: emaste Date: Thu Nov 28 02:19:41 2019 New Revision: 355162 URL: https://svnweb.freebsd.org/changeset/base/355162 Log: MFC r354341: arm64 linuxulator: default to RW stack (no X) This matches Linux's default arm64 data / stack permissions. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/arm64/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysvec.c Thu Nov 28 02:18:51 2019 (r355161) +++ stable/12/sys/arm64/linux/linux_sysvec.c Thu Nov 28 02:19:41 2019 (r355162) @@ -380,7 +380,7 @@ struct sysentvec elf_linux_sysvec = { .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, .sv_psstrings = PS_STRINGS, /* XXX */ - .sv_stackprot = VM_PROT_ALL, /* XXX */ + .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, .sv_copyout_strings = linux_copyout_strings, .sv_setregs = linux_exec_setregs, .sv_fixlimit = NULL, From owner-svn-src-stable@freebsd.org Thu Nov 28 17:30:20 2019 Return-Path: Delivered-To: svn-src-stable@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 D6E721B03F6; Thu, 28 Nov 2019 17:30:20 +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) server-signature RSA-PSS (4096 bits) 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 47P4R0651jz3Kwp; Thu, 28 Nov 2019 17:30:20 +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 9AD2E11AA; Thu, 28 Nov 2019 17:30:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xASHUKpF056549; Thu, 28 Nov 2019 17:30:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASHUH1x056531; Thu, 28 Nov 2019 17:30:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281730.xASHUH1x056531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 17:30:17 +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: r355174 - in stable/12/sys: arm/allwinner arm/allwinner/a20 arm/allwinner/clkng conf dev/extres/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner arm/allwinner/a20 arm/allwinner/clkng conf dev/extres/clk X-SVN-Commit-Revision: 355174 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 17:30:20 -0000 Author: manu Date: Thu Nov 28 17:30:16 2019 New Revision: 355174 URL: https://svnweb.freebsd.org/changeset/base/355174 Log: MFC r350842, r350844-r350846, r351099, r352848, r352859 r350842: allwinner: Rework the BUS_PASS on drivers - Put all clock and control unit driver in BUS_PASS_RESOURCE except for the DE2 CCU as it needs the main CCU to be available. - Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense. - For aw_syscon use SCHEDULER pass as we need it early for drivers that attach in BUS_PASS_SUPPORTDEV - For the rest we can use BUS_PASS_SUPPORTDEV r350844: allwinner: Add a new clock aw_clk_m We used the aw_clk_nm clock for clock with only one divider factor and used a fake multiplier factor. This cannot work properly as we end up writing the "fake" factor to the register (and so always set the LSB to 1). Create a new clock for those. The reason for not using the clk_div clock is because those clocks are a bit special. Since they are (almost) all related to video we also need to set the parent clock (the main PLL) to a frequency that they can support. As the main PLL have some minimal frequency that they can support we need to be able to set the main PLL to a multiple of the desired frequency. Let say you want to have a 71Mhz pixel clock (typical for a 1280x800 display) and the main PLL cannot go under 192Mhz, you need to set it to 3 times the desired frequency and set the divider to 3 on the hdmi clock. So this also introduce the CLK_SET_ROUND_MULTIPLE flag that allow for this kind of scenario. r350845: Remove some duplicate code that end up in r350844 r350846: allwinner: Add support to min/max in aw_clk_frac The Fractionals clock in Allwinner device have some min/max frequencies that they can do. Add support for it. r351099: arm: allwinner: Set aw_ccu to BUS_PASS_BUS In r350842 I've switched the bus pass to resource so it matches the other clock drivers but this cannot work as this drivers is meant to match the dts node '/clocks' and if we don't do it at this pass simplebus is catching this node and we cannot attach. This solve booting on Allwinner boards that are still using /clocks (A20 SoC) r352848: arm64: allwinner: a64: Add PLL_MIPI PLL_MIPI is the last important PLL that we missed. Add support for it. Since it's one of the possible parent for TCON0 also add this clock now that we can. While here add some info about what video related clocks should be enabled at boot and with what frequency. r352859: arm: allwinner: Add pll_mipi to the files Added: stable/12/sys/arm/allwinner/clkng/aw_clk_m.c - copied unchanged from r350846, head/sys/arm/allwinner/clkng/aw_clk_m.c stable/12/sys/arm/allwinner/clkng/aw_clk_m.h - copied unchanged from r350846, head/sys/arm/allwinner/clkng/aw_clk_m.h stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c - copied unchanged from r352848, head/sys/arm/allwinner/clkng/aw_clk_mipi.c stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.h - copied unchanged from r352848, head/sys/arm/allwinner/clkng/aw_clk_mipi.h Modified: stable/12/sys/arm/allwinner/a10_sramc.c stable/12/sys/arm/allwinner/a20/a20_cpu_cfg.c stable/12/sys/arm/allwinner/aw_gmacclk.c stable/12/sys/arm/allwinner/aw_reset.c stable/12/sys/arm/allwinner/aw_rsb.c stable/12/sys/arm/allwinner/aw_rtc.c stable/12/sys/arm/allwinner/aw_sid.c stable/12/sys/arm/allwinner/aw_syscon.c stable/12/sys/arm/allwinner/clkng/aw_ccung.c stable/12/sys/arm/allwinner/clkng/aw_ccung.h stable/12/sys/arm/allwinner/clkng/aw_clk.h stable/12/sys/arm/allwinner/clkng/aw_clk_frac.c stable/12/sys/arm/allwinner/clkng/aw_clk_frac.h stable/12/sys/arm/allwinner/clkng/ccu_a10.c stable/12/sys/arm/allwinner/clkng/ccu_a13.c stable/12/sys/arm/allwinner/clkng/ccu_a31.c stable/12/sys/arm/allwinner/clkng/ccu_a64.c stable/12/sys/arm/allwinner/clkng/ccu_a83t.c stable/12/sys/arm/allwinner/clkng/ccu_de2.c stable/12/sys/arm/allwinner/clkng/ccu_h3.c stable/12/sys/arm/allwinner/clkng/ccu_sun8i_r.c stable/12/sys/arm/allwinner/files.allwinner stable/12/sys/conf/files.arm64 stable/12/sys/dev/extres/clk/clk.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/a10_sramc.c ============================================================================== --- stable/12/sys/arm/allwinner/a10_sramc.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/a10_sramc.c Thu Nov 28 17:30:16 2019 (r355174) @@ -116,7 +116,7 @@ static driver_t a10_sramc_driver = { static devclass_t a10_sramc_devclass; EARLY_DRIVER_MODULE(a10_sramc, simplebus, a10_sramc_driver, a10_sramc_devclass, - 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_EARLY); + 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_FIRST); int a10_map_to_emac(void) Modified: stable/12/sys/arm/allwinner/a20/a20_cpu_cfg.c ============================================================================== --- stable/12/sys/arm/allwinner/a20/a20_cpu_cfg.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/a20/a20_cpu_cfg.c Thu Nov 28 17:30:16 2019 (r355174) @@ -119,7 +119,7 @@ static driver_t a20_cpu_cfg_driver = { static devclass_t a20_cpu_cfg_devclass; EARLY_DRIVER_MODULE(a20_cpu_cfg, simplebus, a20_cpu_cfg_driver, a20_cpu_cfg_devclass, 0, 0, - BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); + BUS_PASS_CPU + BUS_PASS_ORDER_FIRST); uint64_t a20_read_counter64(void) Modified: stable/12/sys/arm/allwinner/aw_gmacclk.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_gmacclk.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_gmacclk.c Thu Nov 28 17:30:16 2019 (r355174) @@ -277,4 +277,4 @@ static driver_t aw_gmacclk_driver = { static devclass_t aw_gmacclk_devclass; EARLY_DRIVER_MODULE(aw_gmacclk, simplebus, aw_gmacclk_driver, - aw_gmacclk_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + aw_gmacclk_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm/allwinner/aw_reset.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_reset.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_reset.c Thu Nov 28 17:30:16 2019 (r355174) @@ -160,5 +160,5 @@ static driver_t aw_reset_driver = { static devclass_t aw_reset_devclass; EARLY_DRIVER_MODULE(aw_reset, simplebus, aw_reset_driver, aw_reset_devclass, - 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(aw_reset, 1); Modified: stable/12/sys/arm/allwinner/aw_rsb.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_rsb.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_rsb.c Thu Nov 28 17:30:16 2019 (r355174) @@ -492,9 +492,9 @@ static driver_t rsb_driver = { static devclass_t rsb_devclass; EARLY_DRIVER_MODULE(iicbus, rsb, iicbus_driver, iicbus_devclass, 0, 0, - BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); + BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); EARLY_DRIVER_MODULE(rsb, simplebus, rsb_driver, rsb_devclass, 0, 0, - BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); + BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(rsb, 1); MODULE_DEPEND(rsb, iicbus, 1, 1, 1); SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/arm/allwinner/aw_rtc.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_rtc.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_rtc.c Thu Nov 28 17:30:16 2019 (r355174) @@ -185,7 +185,7 @@ static driver_t aw_rtc_driver = { static devclass_t aw_rtc_devclass; EARLY_DRIVER_MODULE(aw_rtc, simplebus, aw_rtc_driver, aw_rtc_devclass, 0, 0, - BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + BUS_PASS_RESOURCE + BUS_PASS_ORDER_FIRST); MODULE_VERSION(aw_rtc, 1); SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/arm/allwinner/aw_sid.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_sid.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_sid.c Thu Nov 28 17:30:16 2019 (r355174) @@ -412,6 +412,6 @@ static driver_t aw_sid_driver = { static devclass_t aw_sid_devclass; EARLY_DRIVER_MODULE(aw_sid, simplebus, aw_sid_driver, aw_sid_devclass, 0, 0, - BUS_PASS_RESOURCE + BUS_PASS_ORDER_FIRST); + BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_FIRST); MODULE_VERSION(aw_sid, 1); SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/arm/allwinner/aw_syscon.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_syscon.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/aw_syscon.c Thu Nov 28 17:30:16 2019 (r355174) @@ -82,5 +82,5 @@ DEFINE_CLASS_1(aw_syscon, aw_syscon_driver, aw_syscon_ static devclass_t aw_syscon_devclass; /* aw_syscon needs to attach prior to if_awg */ EARLY_DRIVER_MODULE(aw_syscon, simplebus, aw_syscon_driver, aw_syscon_devclass, - 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); + 0, 0, BUS_PASS_SCHEDULER + BUS_PASS_ORDER_LAST); MODULE_VERSION(aw_syscon, 1); Modified: stable/12/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_ccung.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/clkng/aw_ccung.c Thu Nov 28 17:30:16 2019 (r355174) @@ -299,6 +299,9 @@ aw_ccung_attach(device_t dev) case AW_CLK_NM: aw_clk_nm_register(sc->clkdom, sc->clks[i].clk.nm); break; + case AW_CLK_M: + aw_clk_m_register(sc->clkdom, sc->clks[i].clk.m); + break; case AW_CLK_PREDIV_MUX: aw_clk_prediv_mux_register(sc->clkdom, sc->clks[i].clk.prediv_mux); @@ -306,6 +309,8 @@ aw_ccung_attach(device_t dev) case AW_CLK_FRAC: aw_clk_frac_register(sc->clkdom, sc->clks[i].clk.frac); break; + case AW_CLK_MIPI: + aw_clk_mipi_register(sc->clkdom, sc->clks[i].clk.mipi); } } Modified: stable/12/sys/arm/allwinner/clkng/aw_ccung.h ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_ccung.h Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/clkng/aw_ccung.h Thu Nov 28 17:30:16 2019 (r355174) @@ -31,6 +31,8 @@ #define __CCU_NG_H__ #include +#include +#include #include #include #include @@ -48,6 +50,8 @@ enum aw_ccung_clk_type { AW_CLK_NM, AW_CLK_PREDIV_MUX, AW_CLK_FRAC, + AW_CLK_M, + AW_CLK_MIPI, }; struct aw_ccung_clk { @@ -60,6 +64,8 @@ struct aw_ccung_clk { struct aw_clk_nm_def *nm; struct aw_clk_prediv_mux_def *prediv_mux; struct aw_clk_frac_def *frac; + struct aw_clk_m_def *m; + struct aw_clk_mipi_def *mipi; } clk; }; Modified: stable/12/sys/arm/allwinner/clkng/aw_clk.h ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_clk.h Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/clkng/aw_clk.h Thu Nov 28 17:30:16 2019 (r355174) @@ -66,12 +66,15 @@ struct aw_clk_init { #define AW_CLK_SCALE_CHANGE 0x0010 #define AW_CLK_HAS_UPDATE 0x0040 #define AW_CLK_HAS_PREDIV 0x0080 +#define AW_CLK_SET_PARENT 0x0100 #define AW_CLK_FACTOR_POWER_OF_TWO 0x0001 #define AW_CLK_FACTOR_ZERO_BASED 0x0002 #define AW_CLK_FACTOR_HAS_COND 0x0004 #define AW_CLK_FACTOR_FIXED 0x0008 #define AW_CLK_FACTOR_ZERO_IS_ONE 0x0010 +#define AW_CLK_FACTOR_MIN_VALUE 0x0020 +#define AW_CLK_FACTOR_MAX_VALUE 0x0040 struct aw_clk_factor { uint32_t shift; /* Shift bits for the factor */ @@ -84,6 +87,9 @@ struct aw_clk_factor { uint32_t cond_width; uint32_t cond_value; + uint32_t min_value; + uint32_t max_value; + uint32_t flags; /* Flags */ }; @@ -146,6 +152,8 @@ aw_clk_factor_get_min(struct aw_clk_factor *factor) min = factor->value; else if (factor->flags & AW_CLK_FACTOR_ZERO_BASED) min = 0; + else if (factor->flags & AW_CLK_FACTOR_MIN_VALUE) + min = factor->min_value; else min = 1; @@ -165,7 +173,9 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, else if (factor->flags & AW_CLK_FACTOR_POWER_OF_TWO) { for (val = 0; raw != 1; val++) raw >>= 1; - } else + } else if (factor->flags & AW_CLK_FACTOR_MAX_VALUE) + val = factor->max_value; + else val = raw - 1; return (val); @@ -313,13 +323,15 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, _nshift, _nwidth, _nvalue, _nflags, \ _mshift, _mwidth, _mvalue, _mflags, \ _gate_shift, _lock_shift,_lock_retries, \ - _flags, _freq0, _freq1, _mode_sel, _freq_sel) \ + _flags, _freq0, _freq1, _mode_sel, _freq_sel, \ + _min_freq, _max_freq) \ static struct aw_clk_frac_def _clkname = { \ .clkdef = { \ .id = _id, \ .name = _name, \ .parent_names = _pnames, \ .parent_cnt = nitems(_pnames), \ + .flags = CLK_NODE_GLITCH_FREE, \ }, \ .offset = _offset, \ .n.shift = _nshift, \ @@ -338,8 +350,34 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .frac.freq1 = _freq1, \ .frac.mode_sel = _mode_sel, \ .frac.freq_sel = _freq_sel, \ + .min_freq = _min_freq, \ + .max_freq = _max_freq, \ } +#define M_CLK(_clkname, _id, _name, _pnames, \ + _offset, \ + _mshift, _mwidth, _mvalue, _mflags, \ + _mux_shift, _mux_width, \ + _gate_shift, \ + _flags) \ + static struct aw_clk_m_def _clkname = { \ + .clkdef = { \ + .id = _id, \ + .name = _name, \ + .parent_names = _pnames, \ + .parent_cnt = nitems(_pnames), \ + }, \ + .offset = _offset, \ + .mux_shift = _mux_shift, \ + .m.shift = _mshift, \ + .m.width = _mwidth, \ + .m.value = _mvalue, \ + .m.flags = _mflags, \ + .mux_width = _mux_width, \ + .gate_shift = _gate_shift, \ + .flags = _flags, \ + } + #define NM_CLK(_clkname, _id, _name, _pnames, \ _offset, \ _nshift, _nwidth, _nvalue, _nflags, \ @@ -427,6 +465,32 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .prediv.cond_mask = _prediv_cond_mask, \ .prediv.cond_value = _prediv_cond_value, \ } + +#define MIPI_CLK(_clkname, _id, _name, _pnames, \ + _offset, \ + _kshift, _kwidth, _kflags, _kmin, \ + _mshift, _mwidth, \ + _nshift, _nwidth, \ + _gate_shift, _lock_shift) \ + static struct aw_clk_mipi_def _clkname = { \ + .clkdef = { \ + .id = _id, \ + .name = _name, \ + .parent_names = _pnames, \ + .parent_cnt = nitems(_pnames) \ + }, \ + .offset = _offset, \ + .k.shift = _kshift, \ + .k.width = _kwidth, \ + .k.flags = _kflags, \ + .k.min_value = _kmin, \ + .m.shift = _mshift, \ + .m.width = _mwidth, \ + .n.shift = _nshift, \ + .n.width = _nwidth, \ + .gate_shift = _gate_shift, \ + .lock_shift = _lock_shift, \ + } #define MUX_CLK(_clkname, _id, _name, _pnames, \ _offset, _shift, _width) \ Modified: stable/12/sys/arm/allwinner/clkng/aw_clk_frac.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_clk_frac.c Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_frac.c Thu Nov 28 17:30:16 2019 (r355174) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include "clkdev_if.h" +/* #define dprintf(format, arg...) printf("%s:(%s)" format, __func__, clknode_get_name(clk), arg) */ +#define dprintf(format, arg...) + /* * clknode for clocks matching the formula : * @@ -54,6 +57,9 @@ struct aw_clk_frac_sc { struct aw_clk_factor n; struct aw_clk_frac frac; + uint64_t min_freq; + uint64_t max_freq; + uint32_t mux_shift; uint32_t mux_mask; uint32_t gate_shift; @@ -89,6 +95,7 @@ aw_clk_frac_init(struct clknode *clk, device_t dev) idx = (val & sc->mux_mask) >> sc->mux_shift; } + dprintf("init parent idx %d\n", idx); clknode_init_parent_idx(clk, idx); return (0); } @@ -104,6 +111,7 @@ aw_clk_frac_set_gate(struct clknode *clk, bool enable) if ((sc->flags & AW_CLK_HAS_GATE) == 0) return (0); + dprintf("%sabling gate\n", enable ? "En" : "Dis"); DEVICE_LOCK(clk); READ4(clk, sc->offset, &val); if (enable) @@ -127,6 +135,7 @@ aw_clk_frac_set_mux(struct clknode *clk, int index) if ((sc->flags & AW_CLK_HAS_MUX) == 0) return (0); + dprintf("Set mux to %d\n", index); DEVICE_LOCK(clk); READ4(clk, sc->offset, &val); val &= ~sc->mux_mask; @@ -138,7 +147,7 @@ aw_clk_frac_set_mux(struct clknode *clk, int index) } static uint64_t -aw_clk_frac_find_best(struct aw_clk_frac_sc *sc, uint64_t fparent, uint64_t *fout, +aw_clk_frac_find_best(struct aw_clk_frac_sc *sc, uint64_t fparent, uint64_t fout, uint32_t *factor_n, uint32_t *factor_m) { uint64_t cur, best; @@ -150,18 +159,27 @@ aw_clk_frac_find_best(struct aw_clk_frac_sc *sc, uint6 max_m = aw_clk_factor_get_max(&sc->m); max_n = aw_clk_factor_get_max(&sc->n); min_m = aw_clk_factor_get_min(&sc->m); - min_n = aw_clk_factor_get_min(&sc->n); + min_n = sc->min_freq / fparent; for (n = min_n; n <= max_n; n++) { for (m = min_m; m <= max_m; m++) { cur = fparent * n / m; - if ((*fout - cur) < (*fout - best)) { + if (cur < sc->min_freq) { + continue; + } + if (cur > sc->max_freq) { + continue; + } + if (cur == fout) { + *factor_n = n; + *factor_m = m; + return (cur); + } + if (abs((fout - cur)) < abs((fout - best))) { best = cur; *factor_n = n; *factor_m = m; } - if (best == *fout) - return (best); } } @@ -175,32 +193,73 @@ aw_clk_frac_set_freq(struct clknode *clk, uint64_t fpa struct aw_clk_frac_sc *sc; uint64_t cur, best, best_frac; uint32_t val, m, n, best_m, best_n; - int retry; + int retry, multiple, max_mult, best_mult; sc = clknode_get_softc(clk); best = best_frac = cur = 0; + best_mult = 0; + max_mult = 1; - if (*fout == sc->frac.freq0) - best = best_frac = sc->frac.freq0; - else if (*fout == sc->frac.freq1) - best = best_frac = sc->frac.freq1; - else - best = aw_clk_frac_find_best(sc, fparent, fout, - &best_n, &best_m); + dprintf("Trying to find freq %ju with parent %ju\n", *fout, fparent); + if ((flags & CLK_SET_ROUND_MULTIPLE) != 0) + max_mult = 10; + for (multiple = 1; multiple <= max_mult; multiple++) { + /* First test the fractional frequencies */ + dprintf("Testing with multiple %d\n", multiple); + if (*fout * multiple == sc->frac.freq0) { + best = best_frac = sc->frac.freq0; + best_mult = multiple; + dprintf("Found with using frac.freq0 and multiple %d\n", multiple); + break; + } + else if (*fout * multiple == sc->frac.freq1) { + best = best_frac = sc->frac.freq1; + best_mult = multiple; + dprintf("Found with using frac.freq1 and multiple %d\n", multiple); + break; + } + else { + cur = aw_clk_frac_find_best(sc, fparent, *fout * multiple, + &n, &m); + dprintf("Got %ju with n=%d, m=%d\n", cur, n, m); + if (cur == (*fout * multiple)) { + best = cur; + best_mult = multiple; + best_n = n; + best_m = m; + dprintf("This is the one: n=%d m=%d mult=%d\n", best_n, best_m, best_mult); + break; + } + if (abs(((*fout * multiple) - cur)) < abs(((*fout * multiple) - best))) { + best = cur; + best_mult = multiple; + best_n = n; + best_m = m; + dprintf("This is the best for now: n=%d m=%d mult=%d\n", best_n, best_m, best_mult); + } + } + } + if (best < sc->min_freq || + best > sc->max_freq) { + printf("%s: Cannot set %ju for %s (min=%ju max=%ju)\n", + __func__, best, clknode_get_name(clk), + sc->min_freq, sc->max_freq); + return (ERANGE); + } if ((flags & CLK_SET_DRYRUN) != 0) { *fout = best; *stop = 1; return (0); } - if ((best < *fout) && + if ((best < (*fout * best_mult)) && ((flags & CLK_SET_ROUND_DOWN) == 0)) { *stop = 1; return (ERANGE); } - if ((best > *fout) && + if ((best > *fout * best_mult) && ((flags & CLK_SET_ROUND_UP) == 0)) { *stop = 1; return (ERANGE); @@ -271,7 +330,6 @@ aw_clk_frac_recalc(struct clknode *clk, uint64_t *freq } else { m = aw_clk_get_factor(val, &sc->m); n = aw_clk_get_factor(val, &sc->n); - *freq = *freq * n / m; } @@ -321,6 +379,9 @@ aw_clk_frac_register(struct clkdom *clkdom, struct aw_ sc->frac.freq1 = clkdef->frac.freq1; sc->frac.mode_sel = 1 << clkdef->frac.mode_sel; sc->frac.freq_sel = 1 << clkdef->frac.freq_sel; + + sc->min_freq = clkdef->min_freq; + sc->max_freq = clkdef->max_freq; sc->mux_shift = clkdef->mux_shift; sc->mux_mask = ((1 << clkdef->mux_width) - 1) << sc->mux_shift; Modified: stable/12/sys/arm/allwinner/clkng/aw_clk_frac.h ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_clk_frac.h Thu Nov 28 17:01:31 2019 (r355173) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_frac.h Thu Nov 28 17:30:16 2019 (r355174) @@ -38,6 +38,9 @@ struct aw_clk_frac_def { struct aw_clk_factor n; struct aw_clk_frac frac; + uint64_t min_freq; + uint64_t max_freq; + uint32_t mux_shift; uint32_t mux_width; uint32_t gate_shift; Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_m.c (from r350846, head/sys/arm/allwinner/clkng/aw_clk_m.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_m.c Thu Nov 28 17:30:16 2019 (r355174, copy of r350846, head/sys/arm/allwinner/clkng/aw_clk_m.c) @@ -0,0 +1,290 @@ +/*- + * 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 "clkdev_if.h" + +/* + * clknode for clocks matching the formula : + * + * clk = clkin / m + * And that needs to potentially : + * 1) Set the parent freq + * 2) Support Setting the parent to a multiple + * + */ + +struct aw_clk_m_sc { + uint32_t offset; + + struct aw_clk_factor m; + + uint32_t mux_shift; + uint32_t mux_mask; + uint32_t gate_shift; + + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +static int +aw_clk_m_init(struct clknode *clk, device_t dev) +{ + struct aw_clk_m_sc *sc; + uint32_t val, idx; + + sc = clknode_get_softc(clk); + + idx = 0; + if ((sc->flags & AW_CLK_HAS_MUX) != 0) { + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + idx = (val & sc->mux_mask) >> sc->mux_shift; + } + + clknode_init_parent_idx(clk, idx); + return (0); +} + +static int +aw_clk_m_set_gate(struct clknode *clk, bool enable) +{ + struct aw_clk_m_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_GATE) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) + val |= (1 << sc->gate_shift); + else + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +aw_clk_m_set_mux(struct clknode *clk, int index) +{ + struct aw_clk_m_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_MUX) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + val &= ~sc->mux_mask; + val |= index << sc->mux_shift; + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static uint64_t +aw_clk_m_find_best(struct aw_clk_m_sc *sc, uint64_t fparent, uint64_t *fout, + uint32_t *factor_m) +{ + uint64_t cur, best; + uint32_t m, max_m, min_m; + + *factor_m = 0; + + max_m = aw_clk_factor_get_max(&sc->m); + min_m = aw_clk_factor_get_min(&sc->m); + + for (m = min_m; m <= max_m; ) { + cur = fparent / m; + if (abs(*fout - cur) < abs(*fout - best)) { + best = cur; + *factor_m = m; + } + if ((sc->m.flags & AW_CLK_FACTOR_POWER_OF_TWO) != 0) + m <<= 1; + else + m++; + } + + return (best); +} + +static int +aw_clk_m_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct aw_clk_m_sc *sc; + struct clknode *p_clk; + uint64_t cur, best; + uint32_t val, m, best_m; + + sc = clknode_get_softc(clk); + + best = cur = 0; + + if ((sc->flags & AW_CLK_SET_PARENT) != 0) { + p_clk = clknode_get_parent(clk); + if (p_clk == NULL) { + printf("%s: Cannot get parent for clock %s\n", + __func__, + clknode_get_name(clk)); + return (ENXIO); + } + clknode_set_freq(p_clk, *fout, CLK_SET_ROUND_MULTIPLE, 0); + clknode_get_freq(p_clk, &fparent); + best = aw_clk_m_find_best(sc, fparent, fout, + &best_m); + } else { + best = aw_clk_m_find_best(sc, fparent, fout, + &best_m); + } + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + if ((best < *fout) && + ((flags & CLK_SET_ROUND_DOWN) == 0)) { + *stop = 1; + return (ERANGE); + } + if ((best > *fout) && + ((flags & CLK_SET_ROUND_UP) == 0)) { + *stop = 1; + return (ERANGE); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + + m = aw_clk_factor_get_value(&sc->m, best_m); + val &= ~sc->m.mask; + val |= m << sc->m.shift; + + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + *fout = best; + *stop = 1; + + return (0); +} + +static int +aw_clk_m_recalc(struct clknode *clk, uint64_t *freq) +{ + struct aw_clk_m_sc *sc; + uint32_t val, m; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + m = aw_clk_get_factor(val, &sc->m); + + *freq = *freq / m; + + return (0); +} + +static clknode_method_t aw_m_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, aw_clk_m_init), + CLKNODEMETHOD(clknode_set_gate, aw_clk_m_set_gate), + CLKNODEMETHOD(clknode_set_mux, aw_clk_m_set_mux), + CLKNODEMETHOD(clknode_recalc_freq, aw_clk_m_recalc), + CLKNODEMETHOD(clknode_set_freq, aw_clk_m_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(aw_m_clknode, aw_m_clknode_class, aw_m_clknode_methods, + sizeof(struct aw_clk_m_sc), clknode_class); + +int +aw_clk_m_register(struct clkdom *clkdom, struct aw_clk_m_def *clkdef) +{ + struct clknode *clk; + struct aw_clk_m_sc *sc; + + clk = clknode_create(clkdom, &aw_m_clknode_class, &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + + sc->m.shift = clkdef->m.shift; + sc->m.width = clkdef->m.width; + sc->m.mask = ((1 << sc->m.width) - 1) << sc->m.shift; + sc->m.value = clkdef->m.value; + sc->m.flags = clkdef->m.flags; + + sc->mux_shift = clkdef->mux_shift; + sc->mux_mask = ((1 << clkdef->mux_width) - 1) << sc->mux_shift; + + sc->gate_shift = clkdef->gate_shift; + + sc->flags = clkdef->flags; + + clknode_register(clkdom, clk); + + return (0); +} Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_m.h (from r350846, head/sys/arm/allwinner/clkng/aw_clk_m.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_m.h Thu Nov 28 17:30:16 2019 (r355174, copy of r350846, head/sys/arm/allwinner/clkng/aw_clk_m.h) @@ -0,0 +1,48 @@ +/*- + * 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$ + */ + +#ifndef __AW_CLK_M_H__ +#define __AW_CLK_M_H__ + +#include + +struct aw_clk_m_def { + struct clknode_init_def clkdef; + uint32_t offset; + + struct aw_clk_factor m; + + uint32_t mux_shift; + uint32_t mux_width; + uint32_t gate_shift; + + uint32_t flags; +}; + +int aw_clk_m_register(struct clkdom *clkdom, struct aw_clk_m_def *clkdef); + +#endif /* __AW_CLK_M_H__ */ Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c (from r352848, head/sys/arm/allwinner/clkng/aw_clk_mipi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c Thu Nov 28 17:30:16 2019 (r355174, copy of r352848, head/sys/arm/allwinner/clkng/aw_clk_mipi.c) @@ -0,0 +1,300 @@ +/*- + * 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 "clkdev_if.h" + +/* #define dprintf(format, arg...) printf("%s:(%s)" format, __func__, clknode_get_name(clk), arg) */ +#define dprintf(format, arg...) + +/* + * clknode for PLL_MIPI : + * + * clk = (pll_video0 * n * k) / m when vfb_sel=0 + * clk depend on sint_frac, sdiv2, s6p25_7p5, pll_feedback_div when vfb_sel=1 + * + */ + +struct aw_clk_mipi_sc { + uint32_t offset; + + struct aw_clk_factor k; + struct aw_clk_factor m; + struct aw_clk_factor n; + + uint64_t min_freq; + uint64_t max_freq; + + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +#define LDO1_EN_SHIFT 23 +#define LDO2_EN_SHIFT 22 +#define VFB_SEL_SHIFT 16 + +static int +aw_clk_mipi_init(struct clknode *clk, device_t dev) +{ + struct aw_clk_mipi_sc *sc; + + sc = clknode_get_softc(clk); + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +aw_clk_mipi_set_gate(struct clknode *clk, bool enable) +{ + struct aw_clk_mipi_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + dprintf("%sabling gate\n", enable ? "En" : "Dis"); + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) { + val |= (1 << sc->gate_shift); + val |= (1 << LDO1_EN_SHIFT); + val |= (1 << LDO2_EN_SHIFT); + } else { + val &= ~(1 << sc->gate_shift); + val &= ~(1 << LDO1_EN_SHIFT); + val &= ~(1 << LDO2_EN_SHIFT); + } + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static uint64_t +aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint64_t fparent, uint64_t *fout, + uint32_t *factor_k, uint32_t *factor_m, uint32_t *factor_n) +{ + uint64_t cur, best; + uint32_t n, k, m; + + best = 0; + *factor_n = 0; + *factor_k = 0; + *factor_m = 0; + + for (n = aw_clk_factor_get_min(&sc->n); n <= aw_clk_factor_get_max(&sc->n); ) { + for (k = aw_clk_factor_get_min(&sc->k); k <= aw_clk_factor_get_max(&sc->k); ) { + for (m = aw_clk_factor_get_min(&sc->m); m <= aw_clk_factor_get_max(&sc->m); ) { + cur = (fparent * n * k) / m; + if ((*fout - cur) < (*fout - best)) { + best = cur; + *factor_n = n; + *factor_k = k; + *factor_m = m; + } + if (best == *fout) + return (best); + m++; + } + k++; + } + n++; + } + + return best; +} + +static int +aw_clk_mipi_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct aw_clk_mipi_sc *sc; + uint64_t best = 0; + uint32_t best_k, best_m, best_n; + uint32_t k, m, n; + uint32_t val; + uint32_t retry; + + sc = clknode_get_softc(clk); + + best = aw_clk_mipi_find_best(sc, fparent, fout, &best_k, &best_m, &best_n); + + if (best < sc->min_freq || + best > sc->max_freq) { + printf("%s: Cannot set %ju for %s (min=%ju max=%ju)\n", + __func__, best, clknode_get_name(clk), + sc->min_freq, sc->max_freq); + return (ERANGE); + } + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + /* Disable clock during freq changes */ + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Nov 28 17:34:50 2019 Return-Path: Delivered-To: svn-src-stable@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 C4E831B067B; Thu, 28 Nov 2019 17:34: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) server-signature RSA-PSS (4096 bits) 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 47P4XB4p8bz3LK7; Thu, 28 Nov 2019 17:34:50 +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 850DB1378; Thu, 28 Nov 2019 17:34:50 +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 xASHYotB061904; Thu, 28 Nov 2019 17:34:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASHYnvZ061901; Thu, 28 Nov 2019 17:34:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281734.xASHYnvZ061901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 17:34: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: r355175 - in stable/12/sys: dev/iicbus/twsi dts/arm/overlays modules/dtb/allwinner X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: dev/iicbus/twsi dts/arm/overlays modules/dtb/allwinner X-SVN-Commit-Revision: 355175 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 17:34:50 -0000 Author: manu Date: Thu Nov 28 17:34:49 2019 New Revision: 355175 URL: https://svnweb.freebsd.org/changeset/base/355175 Log: MFC r350180, r351100 r350180: dtso: allwinner: Add an overlay for H3 i2c0 Most of the H3 boards don't enable i2c as it is unused. Add an overlay so it's easier for user to use i2c device. r351100: twsi: Fix build when DEBUG is used on 32bits arch. Added: stable/12/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso - copied unchanged from r350180, head/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso Modified: stable/12/sys/dev/iicbus/twsi/twsi.c stable/12/sys/modules/dtb/allwinner/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- stable/12/sys/dev/iicbus/twsi/twsi.c Thu Nov 28 17:30:16 2019 (r355174) +++ stable/12/sys/dev/iicbus/twsi/twsi.c Thu Nov 28 17:34:49 2019 (r355175) @@ -261,7 +261,7 @@ twsi_calc_baud_rate(struct twsi_softc *sc, const u_int if (clk_get_freq(sc->clk_core, &clk) < 0) return (-1); - debugf(sc->dev, "Bus clock is at %lu\n", clk); + debugf(sc->dev, "Bus clock is at %ju\n", clk); for (n = 0; n < 8; n++) { for (m = 0; m < 16; m++) { Copied: stable/12/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso (from r350180, head/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso Thu Nov 28 17:34:49 2019 (r355175, copy of r350180, head/sys/dts/arm/overlays/sun8i-h3-i2c0.dtso) @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-h3"; +}; + +&{/soc/i2c@1c2ac00} { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; +}; Modified: stable/12/sys/modules/dtb/allwinner/Makefile ============================================================================== --- stable/12/sys/modules/dtb/allwinner/Makefile Thu Nov 28 17:30:16 2019 (r355174) +++ stable/12/sys/modules/dtb/allwinner/Makefile Thu Nov 28 17:34:49 2019 (r355175) @@ -24,6 +24,7 @@ DTS= \ sun8i-h3-orangepi-plus2e.dts DTSO= sun8i-a83t-sid.dtso \ + sun8i-h3-i2c0.dtso \ sun8i-h3-sid.dtso \ sun8i-h3-ths.dtso From owner-svn-src-stable@freebsd.org Thu Nov 28 17:42:12 2019 Return-Path: Delivered-To: svn-src-stable@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 A712E1B0A0E; Thu, 28 Nov 2019 17:42:12 +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) server-signature RSA-PSS (4096 bits) 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 47P4hh4m1nz3Ln3; Thu, 28 Nov 2019 17:42:12 +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 874AE151E; Thu, 28 Nov 2019 17:42:12 +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 xASHgCEa067815; Thu, 28 Nov 2019 17:42:12 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASHgBhq067803; Thu, 28 Nov 2019 17:42:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281742.xASHgBhq067803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 17:42:11 +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: r355176 - in stable/12/sys: arm64/rockchip arm64/rockchip/clk dev/dwc X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/rockchip arm64/rockchip/clk dev/dwc X-SVN-Commit-Revision: 355176 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 17:42:12 -0000 Author: manu Date: Thu Nov 28 17:42:11 2019 New Revision: 355176 URL: https://svnweb.freebsd.org/changeset/base/355176 Log: MFC r347097, r351187, r351551-r351552, r352849-r352852 r347097 by ganbold: Add emmc clock definitions for Rockchip RK3399 SoC. r351187 by mmel: Improve rk_pinctrl driver: - add support for 'output-low', 'output-high', 'output-low' and 'output-enable' properties. These are use in RK3288 DT files - add support for RK3288 - to reduce overall file size, use local macros for initialization of pinctrl description structures. r351551: arm64: rk3328: pinctrl: Add gpio banks and fix iomux Since r351187 the pinctrl driver need to know the gpio bank as it directly attach the gpio driver to handle some setup that might be present in the dts, add the gpio banks table for rk3328. While here fix some IOMUX definition that prevented to boot on RK3328 as pinctrl wasn't configured correctly. Submitted by: mmel (original version) MFC With: r351187 r351552: arm64: rk3399: pinctrl: Add gpio banks and fix iomux Since r351187 the pinctrl driver need to know the gpio bank as it directly attach the gpio driver to handle some setup that might be present in the dts, add the gpio banks table for rk3399. While here fix some IOMUX definition that prevented to boot on RK3399 as pinctrl wasn't configured correctly. Submitted by: mmel (original version) MFC With: r351187 r352849: arm64: rockchip: rk3399: Add usb2 clocks r352850: arm64: rockchip: Implement resets Module resets where not implemented when rockchip clocks were commited. Implement them. Since all resets registers are contiguous a driver only need to give the start offset and the number of resets. This avoid to have to declare every resets. r352851: arm64: rockchip: Fix map_gpio The map_gpio function wasn't correct, the first element is the pin and not the phandle. r352852: dwc: Add more delay for chip reset On rockchip board it seems that the value in the DTS are not enough for reseting the chip, I don't know if the value are really incorrect or if DELAY is not precise enough or if the rockchip gpio driver have some "lag" of some kind or not. For now just add more delay. Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c stable/12/sys/arm64/rockchip/clk/rk_cru.c stable/12/sys/arm64/rockchip/clk/rk_cru.h stable/12/sys/arm64/rockchip/rk_gpio.c stable/12/sys/arm64/rockchip/rk_pinctrl.c stable/12/sys/dev/dwc/if_dwc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Thu Nov 28 17:42:11 2019 (r355176) @@ -1083,6 +1083,9 @@ rk3328_cru_attach(device_t dev) sc->clks = rk3328_clks; sc->nclks = nitems(rk3328_clks); + sc->reset_offset = 0x300; + sc->reset_num = 184; + return (rk_cru_attach(dev)); } Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Thu Nov 28 17:42:11 2019 (r355176) @@ -52,6 +52,11 @@ __FBSDID("$FreeBSD$"); /* GATES */ +#define SCLK_USB2PHY0_REF 123 +#define SCLK_USB2PHY1_REF 124 +#define ACLK_EMMC_CORE 241 +#define ACLK_EMMC_NOC 242 +#define ACLK_EMMC_GRF 243 #define PCLK_GPIO2 336 #define PCLK_GPIO3 337 #define PCLK_GPIO4 338 @@ -61,6 +66,10 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C5 344 #define PCLK_I2C6 345 #define PCLK_I2C7 346 +#define HCLK_HOST0 456 +#define HCLK_HOST0_ARB 457 +#define HCLK_HOST1 458 +#define HCLK_HOST1_ARB 459 #define HCLK_SDMMC 462 static struct rk_cru_gate rk3399_gates[] = { @@ -80,6 +89,12 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(0, "cpll_aclk_perihp_src", "cpll", 0x314, 0) CRU_GATE(0, "gpll_aclk_perihp_src", "gpll", 0x314, 1) + /* CRU_CLKGATE_CON6 */ + CRU_GATE(0, "gpll_aclk_emmc_src", "gpll", 0x318, 12) + CRU_GATE(0, "cpll_aclk_emmc_src", "cpll", 0x318, 13) + CRU_GATE(SCLK_USB2PHY0_REF, "clk_usb2phy0_ref", "xin24m", 0x318, 5) + CRU_GATE(SCLK_USB2PHY1_REF, "clk_usb2phy1_ref", "xin24m", 0x318, 6) + /* CRU_CLKGATE_CON7 */ CRU_GATE(0, "gpll_aclk_perilp0_src", "gpll", 0x31C, 0) CRU_GATE(0, "cpll_aclk_perilp0_src", "cpll", 0x31C, 1) @@ -88,6 +103,12 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1) CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0) + /* CRU_CLKGATE_CON20 */ + CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_perihp", 0x350, 5) + CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arb", "hclk_perihp", 0x350, 6) + CRU_GATE(HCLK_HOST1, "hclk_host1", "hclk_perihp", 0x350, 7) + CRU_GATE(HCLK_HOST1_ARB, "hclk_host1_arb", "hclk_perihp", 0x350, 8) + /* CRU_CLKGATE_CON22 */ CRU_GATE(PCLK_I2C7, "pclk_rki2c7", "pclk_perilp1", 0x358, 5) CRU_GATE(PCLK_I2C1, "pclk_rki2c1", "pclk_perilp1", 0x358, 6) @@ -101,6 +122,11 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_alive", 0x37c, 4) CRU_GATE(PCLK_GPIO4, "pclk_gpio4", "pclk_alive", 0x37c, 5) + /* CRU_CLKGATE_CON32 */ + CRU_GATE(ACLK_EMMC_CORE, "aclk_emmccore", "aclk_emmc", 0x380, 8) + CRU_GATE(ACLK_EMMC_NOC, "aclk_emmc_noc", "aclk_emmc", 0x380, 9) + CRU_GATE(ACLK_EMMC_GRF, "aclk_emmcgrf", "aclk_emmc", 0x380, 10) + /* CRU_CLKGATE_CON33 */ CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0x384, 8) }; @@ -1445,6 +1471,60 @@ static struct rk_clk_composite_def sclk_sdmmc = { .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, }; +/* + * emmc + */ + +#define SCLK_EMMC 78 + +static const char *sclk_emmc_parents[] = {"cpll", "gpll", "npll"}; + +static struct rk_clk_composite_def sclk_emmc = { + .clkdef = { + .id = SCLK_EMMC, + .name = "sclk_emmc", + .parent_names = sclk_emmc_parents, + .parent_cnt = nitems(sclk_emmc_parents), + }, + + .muxdiv_offset = 0x158, + .mux_shift = 8, + .mux_width = 3, + + .div_shift = 0, + .div_width = 7, + + .gate_offset = 0x318, + .gate_shift = 14, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +#define ACLK_EMMC 240 + +static const char *aclk_emmc_parents[] = { + "cpll_aclk_emmc_src", + "gpll_aclk_emmc_src" +}; + +static struct rk_clk_composite_def aclk_emmc = { + .clkdef = { + .id = ACLK_EMMC, + .name = "aclk_emmc", + .parent_names = aclk_emmc_parents, + .parent_cnt = nitems(aclk_emmc_parents), + }, + + .muxdiv_offset = 0x154, + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 5, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX, +}; + static struct rk_clk rk3399_clks[] = { { .type = RK3399_CLK_PLL, @@ -1553,6 +1633,15 @@ static struct rk_clk rk3399_clks[] = { .type = RK_CLK_COMPOSITE, .clk.composite = &sclk_sdmmc, }, + + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &sclk_emmc, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &aclk_emmc, + }, }; static int @@ -1583,6 +1672,9 @@ rk3399_cru_attach(device_t dev) sc->clks = rk3399_clks; sc->nclks = nitems(rk3399_clks); + + sc->reset_offset = 0x400; + sc->reset_num = 335; return (rk_cru_attach(dev)); } Modified: stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Thu Nov 28 17:42:11 2019 (r355176) @@ -846,6 +846,9 @@ rk3399_pmucru_attach(device_t dev) sc->clks = rk3399_pmu_clks; sc->nclks = nitems(rk3399_pmu_clks); + sc->reset_offset = 0x110; + sc->reset_num = 30; + return (rk_cru_attach(dev)); } Modified: stable/12/sys/arm64/rockchip/clk/rk_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_cru.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/clk/rk_cru.c Thu Nov 28 17:42:11 2019 (r355176) @@ -112,20 +112,23 @@ static int rk_cru_reset_assert(device_t dev, intptr_t id, bool reset) { struct rk_cru_softc *sc; + uint32_t reg; + int bit; uint32_t val; sc = device_get_softc(dev); - if (id >= sc->nresets || sc->resets[id].offset == 0) - return (0); + if (id > sc->reset_num) + return (ENXIO); + reg = sc->reset_offset + id / 16 * 4; + bit = id % 16; + mtx_lock(&sc->mtx); - val = CCU_READ4(sc, sc->resets[id].offset); + val = 0; if (reset) - val &= ~(1 << sc->resets[id].shift); - else - val |= 1 << sc->resets[id].shift; - CCU_WRITE4(sc, sc->resets[id].offset, val); + val = (1 << bit); + CCU_WRITE4(sc, reg, val | ((1 << bit) << 16)); mtx_unlock(&sc->mtx); return (0); @@ -135,18 +138,25 @@ static int rk_cru_reset_is_asserted(device_t dev, intptr_t id, bool *reset) { struct rk_cru_softc *sc; + uint32_t reg; + int bit; uint32_t val; sc = device_get_softc(dev); - if (id >= sc->nresets || sc->resets[id].offset == 0) - return (0); + if (id > sc->reset_num) + return (ENXIO); + reg = sc->reset_offset + id / 16 * 4; + bit = id % 16; mtx_lock(&sc->mtx); - val = CCU_READ4(sc, sc->resets[id].offset); - *reset = (val & (1 << sc->resets[id].shift)) != 0 ? false : true; + val = CCU_READ4(sc, reg); mtx_unlock(&sc->mtx); + *reset = true; + if (val & (1 << bit)) + *reset = true; + return (0); } @@ -254,8 +264,8 @@ rk_cru_attach(device_t dev) clk_set_assigned(dev, node); /* If we have resets, register our self as a reset provider */ - if (sc->resets) - hwreset_register_ofw_provider(dev); + /* if (sc->resets) */ + /* hwreset_register_ofw_provider(dev); */ return (0); } Modified: stable/12/sys/arm64/rockchip/clk/rk_cru.h ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_cru.h Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/clk/rk_cru.h Thu Nov 28 17:42:11 2019 (r355176) @@ -37,11 +37,6 @@ #include #include -struct rk_cru_reset { - uint32_t offset; - uint32_t shift; -}; - struct rk_cru_gate { const char *name; const char *parent_name; @@ -84,8 +79,8 @@ struct rk_cru_softc { struct clkdom *clkdom; struct mtx mtx; int type; - struct rk_cru_reset *resets; - int nresets; + uint32_t reset_offset; + uint32_t reset_num; struct rk_cru_gate *gates; int ngates; struct rk_clk *clks; Modified: stable/12/sys/arm64/rockchip/rk_gpio.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_gpio.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/rk_gpio.c Thu Nov 28 17:42:11 2019 (r355176) @@ -388,9 +388,9 @@ rk_gpio_map_gpios(device_t bus, phandle_t dev, phandle pcell_t *gpios, uint32_t *pin, uint32_t *flags) { - /* The gpios are mapped as */ - *pin = gpios[1]; - *flags = gpios[2]; + /* The gpios are mapped as */ + *pin = gpios[0]; + *flags = gpios[1]; return (0); } Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Thu Nov 28 17:34:49 2019 (r355175) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Thu Nov 28 17:42:11 2019 (r355176) @@ -34,11 +34,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -#include -#include #include +#include #include +#include #include #include @@ -53,10 +54,9 @@ __FBSDID("$FreeBSD$"); #include +#include "gpio_if.h" #include "syscon_if.h" -#include "opt_soc.h" - struct rk_pinctrl_pin_drive { uint32_t bank; uint32_t subbank; @@ -66,8 +66,8 @@ struct rk_pinctrl_pin_drive { }; struct rk_pinctrl_bank { - uint32_t bank_num; - uint32_t subbank_num; + uint32_t bank; + uint32_t subbank; uint32_t offset; uint32_t nbits; }; @@ -81,6 +81,13 @@ struct rk_pinctrl_pin_fixup { uint32_t mask; }; +struct rk_pinctrl_gpio { + uint32_t bank; + char *gpio_name; + device_t gpio_dev; +}; + + struct rk_pinctrl_softc; struct rk_pinctrl_conf { @@ -90,8 +97,10 @@ struct rk_pinctrl_conf { uint32_t npin_fixup; struct rk_pinctrl_pin_drive *pin_drive; uint32_t npin_drive; - uint32_t (*get_pd_offset)(struct rk_pinctrl_softc *, uint32_t); - struct syscon *(*get_syscon)(struct rk_pinctrl_softc *, uint32_t); + struct rk_pinctrl_gpio *gpio_bank; + uint32_t ngpio_bank; + uint32_t (*get_pd_offset)(struct rk_pinctrl_softc *, uint32_t); + struct syscon *(*get_syscon)(struct rk_pinctrl_softc *, uint32_t); }; struct rk_pinctrl_softc { @@ -102,218 +111,395 @@ struct rk_pinctrl_softc { struct rk_pinctrl_conf *conf; }; +#define RK_IOMUX(_bank, _subbank, _offset, _nbits) \ +{ \ + .bank = _bank, \ + .subbank = _subbank, \ + .offset = _offset, \ + .nbits = _nbits, \ +} + +#define RK_PINFIX(_bank, _pin, _reg, _bit, _mask) \ +{ \ + .bank = _bank, \ + .pin = _pin, \ + .reg = _reg, \ + .bit = _bit, \ + .mask = _mask, \ +} + +#define RK_PINDRIVE(_bank, _subbank, _offset, _value, _ma) \ +{ \ + .bank = _bank, \ + .subbank = _subbank, \ + .offset = _offset, \ + .value = _value, \ + .ma = _ma, \ +} +#define RK_GPIO(_bank, _name) \ +{ \ + .bank = _bank, \ + .gpio_name = _name, \ +} + +static struct rk_pinctrl_gpio rk3288_gpio_bank[] = { + RK_GPIO(0, "gpio0"), + RK_GPIO(1, "gpio1"), + RK_GPIO(2, "gpio2"), + RK_GPIO(3, "gpio3"), + RK_GPIO(4, "gpio4"), + RK_GPIO(5, "gpio5"), + RK_GPIO(6, "gpio6"), + RK_GPIO(7, "gpio7"), + RK_GPIO(8, "gpio8"), +}; + +static struct rk_pinctrl_bank rk3288_iomux_bank[] = { + /* bank sub offs nbits */ + /* PMU */ + RK_IOMUX(0, 0, 0x0084, 2), + RK_IOMUX(0, 1, 0x0088, 2), + RK_IOMUX(0, 2, 0x008C, 2), + /* GFR */ + RK_IOMUX(1, 3, 0x000C, 2), + RK_IOMUX(2, 0, 0x0010, 2), + RK_IOMUX(2, 1, 0x0014, 2), + RK_IOMUX(2, 2, 0x0018, 2), + RK_IOMUX(2, 3, 0x001C, 2), + RK_IOMUX(3, 0, 0x0020, 2), + RK_IOMUX(3, 1, 0x0024, 2), + RK_IOMUX(3, 2, 0x0028, 2), + RK_IOMUX(3, 3, 0x002C, 4), + RK_IOMUX(4, 0, 0x0034, 4), + RK_IOMUX(4, 1, 0x003C, 4), + RK_IOMUX(4, 2, 0x0044, 2), + RK_IOMUX(4, 3, 0x0048, 2), + /* 5,0 - Empty */ + RK_IOMUX(5, 1, 0x0050, 2), + RK_IOMUX(5, 2, 0x0054, 2), + /* 5,3 - Empty */ + RK_IOMUX(6, 0, 0x005C, 2), + RK_IOMUX(6, 1, 0x0060, 2), + RK_IOMUX(6, 2, 0x0064, 2), + /* 6,3 - Empty */ + RK_IOMUX(7, 0, 0x006C, 2), + RK_IOMUX(7, 1, 0x0070, 2), + RK_IOMUX(7, 2, 0x0074, 4), + /* 7,3 - Empty */ + RK_IOMUX(8, 0, 0x0080, 2), + RK_IOMUX(8, 1, 0x0084, 2), + /* 8,2 - Empty */ + /* 8,3 - Empty */ + +}; + +static struct rk_pinctrl_pin_fixup rk3288_pin_fixup[] = { +}; + +static struct rk_pinctrl_pin_drive rk3288_pin_drive[] = { + /* bank sub offs val ma */ + /* GPIO0A (PMU)*/ + RK_PINDRIVE(0, 0, 0x070, 0, 2), + RK_PINDRIVE(0, 0, 0x070, 1, 4), + RK_PINDRIVE(0, 0, 0x070, 2, 8), + RK_PINDRIVE(0, 0, 0x070, 3, 12), + + /* GPIO0B (PMU)*/ + RK_PINDRIVE(0, 1, 0x074, 0, 2), + RK_PINDRIVE(0, 1, 0x074, 1, 4), + RK_PINDRIVE(0, 1, 0x074, 2, 8), + RK_PINDRIVE(0, 1, 0x074, 3, 12), + + /* GPIO0C (PMU)*/ + RK_PINDRIVE(0, 2, 0x078, 0, 2), + RK_PINDRIVE(0, 2, 0x078, 1, 4), + RK_PINDRIVE(0, 2, 0x078, 2, 8), + RK_PINDRIVE(0, 2, 0x078, 3, 12), + + /* GPIO1D */ + RK_PINDRIVE(1, 3, 0x1CC, 0, 2), + RK_PINDRIVE(1, 3, 0x1CC, 1, 4), + RK_PINDRIVE(1, 3, 0x1CC, 2, 8), + RK_PINDRIVE(1, 3, 0x1CC, 3, 12), + + /* GPIO2A */ + RK_PINDRIVE(2, 0, 0x1D0, 0, 2), + RK_PINDRIVE(2, 0, 0x1D0, 1, 4), + RK_PINDRIVE(2, 0, 0x1D0, 2, 8), + RK_PINDRIVE(2, 0, 0x1D0, 3, 12), + + /* GPIO2B */ + RK_PINDRIVE(2, 1, 0x1D4, 0, 2), + RK_PINDRIVE(2, 1, 0x1D4, 1, 4), + RK_PINDRIVE(2, 1, 0x1D4, 2, 8), + RK_PINDRIVE(2, 1, 0x1D4, 3, 12), + + /* GPIO2C */ + RK_PINDRIVE(2, 2, 0x1D8, 0, 2), + RK_PINDRIVE(2, 2, 0x1D8, 1, 4), + RK_PINDRIVE(2, 2, 0x1D8, 2, 8), + RK_PINDRIVE(2, 2, 0x1D8, 3, 12), + + /* GPIO2D */ + RK_PINDRIVE(2, 3, 0x1DC, 0, 2), + RK_PINDRIVE(2, 3, 0x1DC, 1, 4), + RK_PINDRIVE(2, 3, 0x1DC, 2, 8), + RK_PINDRIVE(2, 3, 0x1DC, 3, 12), + + /* GPIO3A */ + RK_PINDRIVE(3, 0, 0x1E0, 0, 2), + RK_PINDRIVE(3, 0, 0x1E0, 1, 4), + RK_PINDRIVE(3, 0, 0x1E0, 2, 8), + RK_PINDRIVE(3, 0, 0x1E0, 3, 12), + + /* GPIO3B */ + RK_PINDRIVE(3, 1, 0x1E4, 0, 2), + RK_PINDRIVE(3, 1, 0x1E4, 1, 4), + RK_PINDRIVE(3, 1, 0x1E4, 2, 8), + RK_PINDRIVE(3, 1, 0x1E4, 3, 12), + + /* GPIO3C */ + RK_PINDRIVE(3, 2, 0x1E8, 0, 2), + RK_PINDRIVE(3, 2, 0x1E8, 1, 4), + RK_PINDRIVE(3, 2, 0x1E8, 2, 8), + RK_PINDRIVE(3, 2, 0x1E8, 3, 12), + + /* GPIO3D */ + RK_PINDRIVE(3, 3, 0x1EC, 0, 2), + RK_PINDRIVE(3, 3, 0x1EC, 1, 4), + RK_PINDRIVE(3, 3, 0x1EC, 2, 8), + RK_PINDRIVE(3, 3, 0x1EC, 3, 12), + + /* GPIO4A */ + RK_PINDRIVE(4, 0, 0x1F0, 0, 2), + RK_PINDRIVE(4, 0, 0x1F0, 1, 4), + RK_PINDRIVE(4, 0, 0x1F0, 2, 8), + RK_PINDRIVE(4, 0, 0x1F0, 3, 12), + + /* GPIO4B */ + RK_PINDRIVE(4, 1, 0x1F4, 0, 2), + RK_PINDRIVE(4, 1, 0x1F4, 1, 4), + RK_PINDRIVE(4, 1, 0x1F4, 2, 8), + RK_PINDRIVE(4, 1, 0x1F4, 3, 12), + + /* GPIO4C */ + RK_PINDRIVE(4, 2, 0x1F8, 0, 2), + RK_PINDRIVE(4, 2, 0x1F8, 1, 4), + RK_PINDRIVE(4, 2, 0x1F8, 2, 8), + RK_PINDRIVE(4, 2, 0x1F8, 3, 12), + + /* GPIO4D */ + RK_PINDRIVE(4, 3, 0x1FC, 0, 2), + RK_PINDRIVE(4, 3, 0x1FC, 1, 4), + RK_PINDRIVE(4, 3, 0x1FC, 2, 8), + RK_PINDRIVE(4, 3, 0x1FC, 3, 12), + + /* GPIO5B */ + RK_PINDRIVE(5, 1, 0x204, 0, 2), + RK_PINDRIVE(5, 1, 0x204, 1, 4), + RK_PINDRIVE(5, 1, 0x204, 2, 8), + RK_PINDRIVE(5, 1, 0x204, 3, 12), + + /* GPIO5C */ + RK_PINDRIVE(5, 2, 0x208, 0, 2), + RK_PINDRIVE(5, 2, 0x208, 1, 4), + RK_PINDRIVE(5, 2, 0x208, 2, 8), + RK_PINDRIVE(5, 2, 0x208, 3, 12), + + /* GPIO6A */ + RK_PINDRIVE(6, 0, 0x210, 0, 2), + RK_PINDRIVE(6, 0, 0x210, 1, 4), + RK_PINDRIVE(6, 0, 0x210, 2, 8), + RK_PINDRIVE(6, 0, 0x210, 3, 12), + + /* GPIO6B */ + RK_PINDRIVE(6, 1, 0x214, 0, 2), + RK_PINDRIVE(6, 1, 0x214, 1, 4), + RK_PINDRIVE(6, 1, 0x214, 2, 8), + RK_PINDRIVE(6, 1, 0x214, 3, 12), + + /* GPIO6C */ + RK_PINDRIVE(6, 2, 0x218, 0, 2), + RK_PINDRIVE(6, 2, 0x218, 1, 4), + RK_PINDRIVE(6, 2, 0x218, 2, 8), + RK_PINDRIVE(6, 2, 0x218, 3, 12), + + /* GPIO7A */ + RK_PINDRIVE(7, 0, 0x220, 0, 2), + RK_PINDRIVE(7, 0, 0x220, 1, 4), + RK_PINDRIVE(7, 0, 0x220, 2, 8), + RK_PINDRIVE(7, 0, 0x220, 3, 12), + + /* GPIO7B */ + RK_PINDRIVE(7, 1, 0x224, 0, 2), + RK_PINDRIVE(7, 1, 0x224, 1, 4), + RK_PINDRIVE(7, 1, 0x224, 2, 8), + RK_PINDRIVE(7, 1, 0x224, 3, 12), + + /* GPIO7C */ + RK_PINDRIVE(7, 2, 0x228, 0, 2), + RK_PINDRIVE(7, 2, 0x228, 1, 4), + RK_PINDRIVE(7, 2, 0x228, 2, 8), + RK_PINDRIVE(7, 2, 0x228, 3, 12), + + /* GPIO8A */ + RK_PINDRIVE(8, 0, 0x230, 0, 2), + RK_PINDRIVE(8, 0, 0x230, 1, 4), + RK_PINDRIVE(8, 0, 0x230, 2, 8), + RK_PINDRIVE(8, 0, 0x230, 3, 12), + + /* GPIO8B */ + RK_PINDRIVE(8, 1, 0x234, 0, 2), + RK_PINDRIVE(8, 1, 0x234, 1, 4), + RK_PINDRIVE(8, 1, 0x234, 2, 8), + RK_PINDRIVE(8, 1, 0x234, 3, 12), +}; + +static uint32_t +rk3288_get_pd_offset(struct rk_pinctrl_softc *sc, uint32_t bank) +{ + if (bank == 0) + return (0x064); /* PMU */ + return (0x130); +} + +static struct syscon * +rk3288_get_syscon(struct rk_pinctrl_softc *sc, uint32_t bank) +{ + if (bank == 0) + return (sc->pmu); + return (sc->grf); +} + +struct rk_pinctrl_conf rk3288_conf = { + .iomux_conf = rk3288_iomux_bank, + .iomux_nbanks = nitems(rk3288_iomux_bank), + .pin_fixup = rk3288_pin_fixup, + .npin_fixup = nitems(rk3288_pin_fixup), + .pin_drive = rk3288_pin_drive, + .npin_drive = nitems(rk3288_pin_drive), + .gpio_bank = rk3288_gpio_bank, + .ngpio_bank = nitems(rk3288_gpio_bank), + .get_pd_offset = rk3288_get_pd_offset, + .get_syscon = rk3288_get_syscon, +}; + +static struct rk_pinctrl_gpio rk3328_gpio_bank[] = { + RK_GPIO(0, "gpio0"), + RK_GPIO(1, "gpio1"), + RK_GPIO(2, "gpio2"), + RK_GPIO(3, "gpio3"), +}; + static struct rk_pinctrl_bank rk3328_iomux_bank[] = { - { - .bank_num = 0, - .subbank_num = 0, - .offset = 0x00, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 1, - .offset = 0x04, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 2, - .offset = 0x08, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 3, - .offset = 0xc, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 0, - .offset = 0x10, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 1, - .offset = 0x14, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 2, - .offset = 0x18, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 3, - .offset = 0x1C, - .nbits = 2, - }, - { - .bank_num = 2, - .subbank_num = 0, - .offset = 0x20, - .nbits = 2, - }, - { - .bank_num = 2, - .subbank_num = 1, - .offset = 0x24, - .nbits = 3, - }, - { - .bank_num = 2, - .subbank_num = 2, - .offset = 0x2c, - .nbits = 3, - }, - { - .bank_num = 2, - .subbank_num = 3, - .offset = 0x34, - .nbits = 2, - }, - { - .bank_num = 3, - .subbank_num = 0, - .offset = 0x38, - .nbits = 3, - }, - { - .bank_num = 3, - .subbank_num = 1, - .offset = 0x40, - .nbits = 3, - }, - { - .bank_num = 3, - .subbank_num = 2, - .offset = 0x48, - .nbits = 2, - }, - { - .bank_num = 3, - .subbank_num = 3, - .offset = 0x4c, - .nbits = 2, - }, + /* bank sub offs nbits */ + RK_IOMUX(0, 0, 0x0000, 2), + RK_IOMUX(0, 1, 0x0004, 2), + RK_IOMUX(0, 2, 0x0008, 2), + RK_IOMUX(0, 3, 0x000C, 2), + RK_IOMUX(1, 0, 0x0010, 2), + RK_IOMUX(1, 1, 0x0014, 2), + RK_IOMUX(1, 2, 0x0018, 2), + RK_IOMUX(1, 3, 0x001C, 2), + RK_IOMUX(2, 0, 0x0020, 2), + RK_IOMUX(2, 1, 0x0024, 3), + RK_IOMUX(2, 2, 0x002c, 3), + RK_IOMUX(2, 3, 0x0034, 2), + RK_IOMUX(3, 0, 0x0038, 3), + RK_IOMUX(3, 1, 0x0040, 3), + RK_IOMUX(3, 2, 0x0048, 2), + RK_IOMUX(3, 3, 0x004c, 2), }; static struct rk_pinctrl_pin_fixup rk3328_pin_fixup[] = { - { - .bank = 2, - .pin = 12, - .reg = 0x24, - .bit = 8, - .mask = 0x300, - }, - { - .bank = 2, - .pin = 15, - .reg = 0x28, - .bit = 0, - .mask = 0x7, - }, - { - .bank = 2, - .pin = 23, - .reg = 0x30, - .bit = 14, - .mask = 0x6000, - }, + /* bank pin reg bit mask */ + RK_PINFIX(2, 12, 0x24, 8, 0x300), + RK_PINFIX(2, 15, 0x28, 0, 0x7), + RK_PINFIX(2, 23, 0x30, 14, 0x6000), }; -#define RK_PINDRIVE(_bank, _subbank, _offset, _value, _ma) \ - { \ - .bank = _bank, \ - .subbank = _subbank, \ - .offset = _offset, \ - .value = _value, \ - .ma = _ma, \ - }, static struct rk_pinctrl_pin_drive rk3328_pin_drive[] = { - RK_PINDRIVE(0, 0, 0x200, 0, 2) - RK_PINDRIVE(0, 0, 0x200, 1, 4) - RK_PINDRIVE(0, 0, 0x200, 2, 8) - RK_PINDRIVE(0, 0, 0x200, 3, 12) + /* bank sub offs val ma */ + RK_PINDRIVE(0, 0, 0x200, 0, 2), + RK_PINDRIVE(0, 0, 0x200, 1, 4), + RK_PINDRIVE(0, 0, 0x200, 2, 8), + RK_PINDRIVE(0, 0, 0x200, 3, 12), - RK_PINDRIVE(0, 1, 0x204, 0, 2) - RK_PINDRIVE(0, 1, 0x204, 1, 4) - RK_PINDRIVE(0, 1, 0x204, 2, 8) - RK_PINDRIVE(0, 1, 0x204, 3, 12) + RK_PINDRIVE(0, 1, 0x204, 0, 2), + RK_PINDRIVE(0, 1, 0x204, 1, 4), + RK_PINDRIVE(0, 1, 0x204, 2, 8), + RK_PINDRIVE(0, 1, 0x204, 3, 12), - RK_PINDRIVE(0, 2, 0x208, 0, 2) - RK_PINDRIVE(0, 2, 0x208, 1, 4) - RK_PINDRIVE(0, 2, 0x208, 2, 8) - RK_PINDRIVE(0, 2, 0x208, 3, 12) + RK_PINDRIVE(0, 2, 0x208, 0, 2), + RK_PINDRIVE(0, 2, 0x208, 1, 4), + RK_PINDRIVE(0, 2, 0x208, 2, 8), + RK_PINDRIVE(0, 2, 0x208, 3, 12), - RK_PINDRIVE(0, 3, 0x20C, 0, 2) - RK_PINDRIVE(0, 3, 0x20C, 1, 4) - RK_PINDRIVE(0, 3, 0x20C, 2, 8) - RK_PINDRIVE(0, 3, 0x20C, 3, 12) + RK_PINDRIVE(0, 3, 0x20C, 0, 2), + RK_PINDRIVE(0, 3, 0x20C, 1, 4), + RK_PINDRIVE(0, 3, 0x20C, 2, 8), + RK_PINDRIVE(0, 3, 0x20C, 3, 12), - RK_PINDRIVE(1, 0, 0x210, 0, 2) - RK_PINDRIVE(1, 0, 0x210, 1, 4) - RK_PINDRIVE(1, 0, 0x210, 2, 8) - RK_PINDRIVE(1, 0, 0x210, 3, 12) + RK_PINDRIVE(1, 0, 0x210, 0, 2), + RK_PINDRIVE(1, 0, 0x210, 1, 4), + RK_PINDRIVE(1, 0, 0x210, 2, 8), + RK_PINDRIVE(1, 0, 0x210, 3, 12), - RK_PINDRIVE(1, 1, 0x214, 0, 2) - RK_PINDRIVE(1, 1, 0x214, 1, 4) - RK_PINDRIVE(1, 1, 0x214, 2, 8) - RK_PINDRIVE(1, 1, 0x214, 3, 12) + RK_PINDRIVE(1, 1, 0x214, 0, 2), + RK_PINDRIVE(1, 1, 0x214, 1, 4), + RK_PINDRIVE(1, 1, 0x214, 2, 8), + RK_PINDRIVE(1, 1, 0x214, 3, 12), - RK_PINDRIVE(1, 2, 0x218, 0, 2) - RK_PINDRIVE(1, 2, 0x218, 1, 4) - RK_PINDRIVE(1, 2, 0x218, 2, 8) - RK_PINDRIVE(1, 2, 0x218, 3, 12) + RK_PINDRIVE(1, 2, 0x218, 0, 2), + RK_PINDRIVE(1, 2, 0x218, 1, 4), + RK_PINDRIVE(1, 2, 0x218, 2, 8), + RK_PINDRIVE(1, 2, 0x218, 3, 12), - RK_PINDRIVE(1, 3, 0x21C, 0, 2) - RK_PINDRIVE(1, 3, 0x21C, 1, 4) - RK_PINDRIVE(1, 3, 0x21C, 2, 8) - RK_PINDRIVE(1, 3, 0x21C, 3, 12) + RK_PINDRIVE(1, 3, 0x21C, 0, 2), + RK_PINDRIVE(1, 3, 0x21C, 1, 4), + RK_PINDRIVE(1, 3, 0x21C, 2, 8), + RK_PINDRIVE(1, 3, 0x21C, 3, 12), - RK_PINDRIVE(2, 0, 0x220, 0, 2) - RK_PINDRIVE(2, 0, 0x220, 1, 4) - RK_PINDRIVE(2, 0, 0x220, 2, 8) - RK_PINDRIVE(2, 0, 0x220, 3, 12) + RK_PINDRIVE(2, 0, 0x220, 0, 2), + RK_PINDRIVE(2, 0, 0x220, 1, 4), + RK_PINDRIVE(2, 0, 0x220, 2, 8), + RK_PINDRIVE(2, 0, 0x220, 3, 12), - RK_PINDRIVE(2, 1, 0x224, 0, 2) - RK_PINDRIVE(2, 1, 0x224, 1, 4) - RK_PINDRIVE(2, 1, 0x224, 2, 8) - RK_PINDRIVE(2, 1, 0x224, 3, 12) + RK_PINDRIVE(2, 1, 0x224, 0, 2), + RK_PINDRIVE(2, 1, 0x224, 1, 4), + RK_PINDRIVE(2, 1, 0x224, 2, 8), + RK_PINDRIVE(2, 1, 0x224, 3, 12), - RK_PINDRIVE(2, 2, 0x228, 0, 2) - RK_PINDRIVE(2, 2, 0x228, 1, 4) - RK_PINDRIVE(2, 2, 0x228, 2, 8) - RK_PINDRIVE(2, 2, 0x228, 3, 12) + RK_PINDRIVE(2, 2, 0x228, 0, 2), + RK_PINDRIVE(2, 2, 0x228, 1, 4), + RK_PINDRIVE(2, 2, 0x228, 2, 8), + RK_PINDRIVE(2, 2, 0x228, 3, 12), - RK_PINDRIVE(2, 3, 0x22C, 0, 2) - RK_PINDRIVE(2, 3, 0x22C, 1, 4) - RK_PINDRIVE(2, 3, 0x22C, 2, 8) - RK_PINDRIVE(2, 3, 0x22C, 3, 12) + RK_PINDRIVE(2, 3, 0x22C, 0, 2), + RK_PINDRIVE(2, 3, 0x22C, 1, 4), + RK_PINDRIVE(2, 3, 0x22C, 2, 8), + RK_PINDRIVE(2, 3, 0x22C, 3, 12), - RK_PINDRIVE(3, 0, 0x230, 0, 2) - RK_PINDRIVE(3, 0, 0x230, 1, 4) - RK_PINDRIVE(3, 0, 0x230, 2, 8) - RK_PINDRIVE(3, 0, 0x230, 3, 12) + RK_PINDRIVE(3, 0, 0x230, 0, 2), + RK_PINDRIVE(3, 0, 0x230, 1, 4), + RK_PINDRIVE(3, 0, 0x230, 2, 8), + RK_PINDRIVE(3, 0, 0x230, 3, 12), - RK_PINDRIVE(3, 1, 0x234, 0, 2) - RK_PINDRIVE(3, 1, 0x234, 1, 4) - RK_PINDRIVE(3, 1, 0x234, 2, 8) - RK_PINDRIVE(3, 1, 0x234, 3, 12) + RK_PINDRIVE(3, 1, 0x234, 0, 2), + RK_PINDRIVE(3, 1, 0x234, 1, 4), + RK_PINDRIVE(3, 1, 0x234, 2, 8), + RK_PINDRIVE(3, 1, 0x234, 3, 12), - RK_PINDRIVE(3, 2, 0x238, 0, 2) - RK_PINDRIVE(3, 2, 0x238, 1, 4) - RK_PINDRIVE(3, 2, 0x238, 2, 8) - RK_PINDRIVE(3, 2, 0x238, 3, 12) + RK_PINDRIVE(3, 2, 0x238, 0, 2), + RK_PINDRIVE(3, 2, 0x238, 1, 4), + RK_PINDRIVE(3, 2, 0x238, 2, 8), + RK_PINDRIVE(3, 2, 0x238, 3, 12), - RK_PINDRIVE(3, 3, 0x23C, 0, 2) - RK_PINDRIVE(3, 3, 0x23C, 1, 4) - RK_PINDRIVE(3, 3, 0x23C, 2, 8) - RK_PINDRIVE(3, 3, 0x23C, 3, 12) + RK_PINDRIVE(3, 3, 0x23C, 0, 2), + RK_PINDRIVE(3, 3, 0x23C, 1, 4), + RK_PINDRIVE(3, 3, 0x23C, 2, 8), + RK_PINDRIVE(3, 3, 0x23C, 3, 12), }; static uint32_t @@ -335,171 +521,83 @@ struct rk_pinctrl_conf rk3328_conf = { .npin_fixup = nitems(rk3328_pin_fixup), .pin_drive = rk3328_pin_drive, .npin_drive = nitems(rk3328_pin_drive), + .gpio_bank = rk3328_gpio_bank, + .ngpio_bank = nitems(rk3328_gpio_bank), .get_pd_offset = rk3328_get_pd_offset, .get_syscon = rk3328_get_syscon, }; +static struct rk_pinctrl_gpio rk3399_gpio_bank[] = { + RK_GPIO(0, "gpio0"), + RK_GPIO(1, "gpio1"), + RK_GPIO(2, "gpio2"), + RK_GPIO(3, "gpio3"), + RK_GPIO(4, "gpio4"), +}; + static struct rk_pinctrl_bank rk3399_iomux_bank[] = { - { - .bank_num = 0, - .subbank_num = 0, - .offset = 0x00, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 1, - .offset = 0x04, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 2, - .offset = 0x08, - .nbits = 2, - }, - { - .bank_num = 0, - .subbank_num = 3, - .offset = 0x0c, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 0, - .offset = 0x10, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 1, - .offset = 0x14, - .nbits = 2, - }, - { - .bank_num = 1, - .subbank_num = 2, - .offset = 0x18, - .nbits = 2, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Nov 28 17:45:58 2019 Return-Path: Delivered-To: svn-src-stable@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 BC2A01B0BF7; Thu, 28 Nov 2019 17:45: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) server-signature RSA-PSS (4096 bits) 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 47P4n25KYKz3Lxf; Thu, 28 Nov 2019 17:45: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 9B0EC153B; Thu, 28 Nov 2019 17:45: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 xASHjwrW068057; Thu, 28 Nov 2019 17:45:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASHjvcx068051; Thu, 28 Nov 2019 17:45:57 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281745.xASHjvcx068051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 17:45: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: r355177 - in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf dev/iicbus X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf dev/iicbus X-SVN-Commit-Revision: 355177 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 17:45:58 -0000 Author: manu Date: Thu Nov 28 17:45:57 2019 New Revision: 355177 URL: https://svnweb.freebsd.org/changeset/base/355177 Log: MFC r352853, r352903-r352904, r352936-r352937 r352853: arm64: rockchip: Add usb2phy driver This driver is for the usb phy present on rockchip SoC. It only support RK3399 and host mode for now. The driver expose the usb clock needed by the usb controller. r352903: arm64: rockchip: correct reset value If bit is 0 the reset is not asserted. Also register our self as a reset provider, this was commented in r352850 Reported by: mmel r352904: arm64: rockchip: rk_clk_pll: Check mode on recalc If the pll is in slow or deep slow mode return the correct frequency. r352936: arm64: rockchip: rk805: Switch to iicdev_{readfrom,writeto} This simpify the code a bit. r352937: syr827: Switch to iicdev_{readfrom,writeto} Also use IIC_INTRWAIT as we need this to work with the rockchip i2c driver. Added: stable/12/sys/arm64/rockchip/rk_usb2phy.c - copied unchanged from r352853, head/sys/arm64/rockchip/rk_usb2phy.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c stable/12/sys/arm64/rockchip/clk/rk_cru.c stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/conf/files.arm64 stable/12/sys/dev/iicbus/syr827.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/arm64/conf/GENERIC Thu Nov 28 17:45:57 2019 (r355177) @@ -178,6 +178,7 @@ device pl011 # USB support device aw_ehci # Allwinner EHCI USB interface (USB 2.0) device aw_usbphy # Allwinner USB PHY +device rk_usb2phy # Rockchip USB2PHY device dwcotg # DWC OTG controller device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Thu Nov 28 17:45:57 2019 (r355177) @@ -367,7 +367,7 @@ rk3399_clk_pll_recalc(struct clknode *clk, uint64_t *f uint32_t postdiv1, postdiv2, fracdiv; uint32_t con1, con2, con3, con4; uint64_t foutvco; - + uint32_t mode; sc = clknode_get_softc(clk); DEVICE_LOCK(clk); @@ -376,6 +376,21 @@ rk3399_clk_pll_recalc(struct clknode *clk, uint64_t *f READ4(clk, sc->base_offset + 8, &con3); READ4(clk, sc->base_offset + 0xC, &con4); DEVICE_UNLOCK(clk); + + /* + * if we are in slow mode the output freq + * is the parent one, the 24Mhz external oscillator + * if we are in deep mode the output freq is 32.768khz + */ + mode = (con4 & RK3399_CLK_PLL_MODE_MASK) >> RK3399_CLK_PLL_MODE_SHIFT; + if (mode == RK3399_CLK_PLL_MODE_SLOW) { + dprintf("pll in slow mode, con4=%x\n", con4); + return (0); + } else if (mode == RK3399_CLK_PLL_MODE_DEEPSLOW) { + dprintf("pll in deep slow, con4=%x\n", con4); + *freq = 32768; + return (0); + } dprintf("con0: %x\n", con1); dprintf("con1: %x\n", con2); Modified: stable/12/sys/arm64/rockchip/clk/rk_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_cru.c Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/arm64/rockchip/clk/rk_cru.c Thu Nov 28 17:45:57 2019 (r355177) @@ -153,7 +153,7 @@ rk_cru_reset_is_asserted(device_t dev, intptr_t id, bo val = CCU_READ4(sc, reg); mtx_unlock(&sc->mtx); - *reset = true; + *reset = false; if (val & (1 << bit)) *reset = true; @@ -263,9 +263,8 @@ rk_cru_attach(device_t dev) clk_set_assigned(dev, node); - /* If we have resets, register our self as a reset provider */ - /* if (sc->resets) */ - /* hwreset_register_ofw_provider(dev); */ + /* register our self as a reset provider */ + hwreset_register_ofw_provider(dev); return (0); } Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/arm64/rockchip/rk805.c Thu Nov 28 17:45:57 2019 (r355177) @@ -227,24 +227,16 @@ static struct rk805_regdef rk808_regdefs[] = { static int rk805_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) { + int err; - return (iicdev_readfrom(dev, reg, data, size, IIC_INTRWAIT)); + err = iicdev_readfrom(dev, reg, data, size, IIC_INTRWAIT); + return (err); } static int rk805_write(device_t dev, uint8_t reg, uint8_t data) { - struct iic_msg msg; - uint8_t buf[2]; - - buf[0] = reg; - buf[1] = data; - msg.slave = iicbus_get_addr(dev); - msg.flags = IIC_M_WR; - msg.buf = buf; - msg.len = sizeof(buf); - - return (iicbus_transfer_excl(dev, &msg, 1, IIC_INTRWAIT)); + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int Copied: stable/12/sys/arm64/rockchip/rk_usb2phy.c (from r352853, head/sys/arm64/rockchip/rk_usb2phy.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_usb2phy.c Thu Nov 28 17:45:57 2019 (r355177, copy of r352853, head/sys/arm64/rockchip/rk_usb2phy.c) @@ -0,0 +1,374 @@ +/*- + * 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 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. + */ + +/* + * Rockchip USB2PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "clkdev_if.h" +#include "syscon_if.h" + +#define RK3399_GRF_USB20_PHY0_CON0 0x0 +#define RK3399_GRF_USB20_PHY0_CON1 0x4 +#define RK3399_GRF_USB20_PHY0_CON2 0x8 +#define RK3399_GRF_USB20_PHY0_CON3 0xC + +struct rk_usb2phy_reg { + uint32_t offset; + uint32_t enable_mask; + uint32_t disable_mask; +}; + +struct rk_usb2phy_regs { + struct rk_usb2phy_reg clk_ctl; +}; + +struct rk_usb2phy_regs rk3399_regs = { + .clk_ctl = { + /* bit 4 put pll in suspend */ + .enable_mask = 0x100000, + .disable_mask = 0x100010, + } +}; + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-usb2phy", (uintptr_t)&rk3399_regs }, + { NULL, 0 } +}; + +struct rk_usb2phy_softc { + device_t dev; + struct syscon *grf; + regulator_t phy_supply; + clk_t clk; +}; + +/* Phy class and methods. */ +static int rk_usb2phy_enable(struct phynode *phynode, bool enable); +static phynode_method_t rk_usb2phy_phynode_methods[] = { + PHYNODEMETHOD(phynode_enable, rk_usb2phy_enable), + + PHYNODEMETHOD_END +}; + +DEFINE_CLASS_1(rk_usb2phy_phynode, rk_usb2phy_phynode_class, + rk_usb2phy_phynode_methods, + sizeof(struct phynode_usb_sc), phynode_usb_class); + +enum RK3399_USBPHY { + RK3399_USBPHY_HOST = 0, + RK3399_USBPHY_OTG, +}; + +static int +rk_usb2phy_enable(struct phynode *phynode, bool enable) +{ + struct rk_usb2phy_softc *sc; + device_t dev; + intptr_t phy; + int error; + + dev = phynode_get_device(phynode); + phy = phynode_get_id(phynode); + sc = device_get_softc(dev); + + if (phy != RK3399_USBPHY_HOST) + return (ERANGE); + + if (sc->phy_supply) { + if (enable) + error = regulator_enable(sc->phy_supply); + else + error = regulator_disable(sc->phy_supply); + if (error != 0) { + device_printf(dev, "Cannot %sable the regulator\n", + enable ? "En" : "Dis"); + goto fail; + } + } + + return (0); +fail: + return (ENXIO); +} + +/* Clock class and method */ +struct rk_usb2phy_clk_sc { + device_t clkdev; + struct syscon *grf; + struct rk_usb2phy_regs *regs; +}; + +static int +rk_usb2phy_clk_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +rk_usb2phy_clk_set_gate(struct clknode *clk, bool enable) +{ + struct rk_usb2phy_clk_sc *sc; + + sc = clknode_get_softc(clk); + + if (enable) + SYSCON_WRITE_4(sc->grf, sc->regs->clk_ctl.offset, + sc->regs->clk_ctl.enable_mask); + else + SYSCON_WRITE_4(sc->grf, sc->regs->clk_ctl.offset, + sc->regs->clk_ctl.disable_mask); + return (0); +} + +static int +rk_usb2phy_clk_recalc(struct clknode *clk, uint64_t *freq) +{ + + *freq = 480000000; + + return (0); +} + +static clknode_method_t rk_usb2phy_clk_clknode_methods[] = { + /* Device interface */ + + CLKNODEMETHOD(clknode_init, rk_usb2phy_clk_init), + CLKNODEMETHOD(clknode_set_gate, rk_usb2phy_clk_set_gate), + CLKNODEMETHOD(clknode_recalc_freq, rk_usb2phy_clk_recalc), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(rk_usb2phy_clk_clknode, rk_usb2phy_clk_clknode_class, + rk_usb2phy_clk_clknode_methods, sizeof(struct rk_usb2phy_clk_sc), + clknode_class); + +static int +rk_usb2phy_clk_ofw_map(struct clkdom *clkdom, uint32_t ncells, + phandle_t *cells, struct clknode **clk) +{ + + if (ncells != 0) + return (ERANGE); + + *clk = clknode_find_by_id(clkdom, 0); + + if (*clk == NULL) + return (ENXIO); + return (0); +} + +static int +rk_usb2phy_export_clock(struct rk_usb2phy_softc *devsc) +{ + struct clknode_init_def def; + struct rk_usb2phy_clk_sc *sc; + const char **clknames; + struct clkdom *clkdom; + struct clknode *clk; + clk_t clk_parent; + phandle_t node; + phandle_t regs[2]; + int i, nclocks, ncells, error; + + node = ofw_bus_get_node(devsc->dev); + + error = ofw_bus_parse_xref_list_get_length(node, "clocks", + "#clock-cells", &ncells); + if (error != 0 || ncells != 1) { + device_printf(devsc->dev, "couldn't find parent clock\n"); + return (ENXIO); + } + + nclocks = ofw_bus_string_list_to_array(node, "clock-output-names", + &clknames); + if (nclocks != 1) + return (ENXIO); + + clkdom = clkdom_create(devsc->dev); + clkdom_set_ofw_mapper(clkdom, rk_usb2phy_clk_ofw_map); + + memset(&def, 0, sizeof(def)); + def.id = 0; + def.name = clknames[0]; + def.parent_names = malloc(sizeof(char *) * ncells, M_OFWPROP, M_WAITOK); + for (i = 0; i < ncells; i++) { + error = clk_get_by_ofw_index(devsc->dev, 0, i, &clk_parent); + if (error != 0) { + device_printf(devsc->dev, "cannot get clock %d\n", error); + return (ENXIO); + } + def.parent_names[i] = clk_get_name(clk_parent); + clk_release(clk_parent); + } + def.parent_cnt = ncells; + + clk = clknode_create(clkdom, &rk_usb2phy_clk_clknode_class, &def); + if (clk == NULL) { + device_printf(devsc->dev, "cannot create clknode\n"); + return (ENXIO); + } + + sc = clknode_get_softc(clk); + sc->clkdev = device_get_parent(devsc->dev); + sc->grf = devsc->grf; + sc->regs = (struct rk_usb2phy_regs *)ofw_bus_search_compatible(devsc->dev, compat_data)->ocd_data; + OF_getencprop(node, "reg", regs, sizeof(regs)); + sc->regs->clk_ctl.offset = regs[0]; + clknode_register(clkdom, clk); + + if (clkdom_finit(clkdom) != 0) { + device_printf(devsc->dev, "cannot finalize clkdom initialization\n"); + return (ENXIO); + } + + if (bootverbose) + clkdom_dump(clkdom); + + return (0); +} + +static int +rk_usb2phy_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, "Rockchip RK3399 USB2PHY"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_usb2phy_attach(device_t dev) +{ + struct rk_usb2phy_softc *sc; + struct phynode_init_def phy_init; + struct phynode *phynode; + phandle_t node, host; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + if (syscon_get_handle_default(dev, &sc->grf) != 0) { + device_printf(dev, "Cannot get syscon handle\n"); + return (ENXIO); + } + + if (clk_get_by_ofw_name(dev, 0, "phyclk", &sc->clk) != 0) { + device_printf(dev, "Cannot get clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk)); + return (ENXIO); + } + + err = rk_usb2phy_export_clock(sc); + if (err != 0) + return (err); + + /* Only host is supported right now */ + + host = ofw_bus_find_child(node, "host-port"); + if (host == 0) { + device_printf(dev, "Cannot find host-port child node\n"); + return (ENXIO); + } + + if (!ofw_bus_node_status_okay(host)) { + device_printf(dev, "host-port isn't okay\n"); + return (0); + } + + regulator_get_by_ofw_property(dev, host, "phy-supply", &sc->phy_supply); + phy_init.id = RK3399_USBPHY_HOST; + phy_init.ofw_node = host; + phynode = phynode_create(dev, &rk_usb2phy_phynode_class, &phy_init); + if (phynode == NULL) { + device_printf(dev, "failed to create host USB2PHY\n"); + return (ENXIO); + } + if (phynode_register(phynode) == NULL) { + device_printf(dev, "failed to register host USB2PHY\n"); + return (ENXIO); + } + + OF_device_register_xref(OF_xref_from_node(host), dev); + + return (0); +} + +static device_method_t rk_usb2phy_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_usb2phy_probe), + DEVMETHOD(device_attach, rk_usb2phy_attach), + + DEVMETHOD_END +}; + +static driver_t rk_usb2phy_driver = { + "rk_usb2phy", + rk_usb2phy_methods, + sizeof(struct rk_usb2phy_softc) +}; + +static devclass_t rk_usb2phy_devclass; +EARLY_DRIVER_MODULE(rk_usb2phy, simplebus, rk_usb2phy_driver, + rk_usb2phy_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(rk_usb2phy, 1); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/conf/files.arm64 Thu Nov 28 17:45:57 2019 (r355177) @@ -278,6 +278,7 @@ arm64/rockchip/rk805.c optional fdt rk805 soc_rockch arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 Modified: stable/12/sys/dev/iicbus/syr827.c ============================================================================== --- stable/12/sys/dev/iicbus/syr827.c Thu Nov 28 17:42:11 2019 (r355176) +++ stable/12/sys/dev/iicbus/syr827.c Thu Nov 28 17:45:57 2019 (r355177) @@ -90,42 +90,13 @@ struct syr827_softc { static int syr827_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) { - struct syr827_softc *sc; - struct iic_msg msg[2]; - - sc = device_get_softc(dev); - - msg[0].slave = sc->addr; - msg[0].flags = IIC_M_WR; - msg[0].len = 1; - msg[0].buf = ® - - msg[1].slave = sc->addr; - msg[1].flags = IIC_M_RD; - msg[1].len = size; - msg[1].buf = data; - - return (iicbus_transfer(dev, msg, 2)); + return (iicdev_readfrom(dev, reg, data, size, IIC_INTRWAIT)); } static int syr827_write(device_t dev, uint8_t reg, uint8_t val) { - struct syr827_softc *sc; - struct iic_msg msg; - uint8_t buffer[2]; - - sc = device_get_softc(dev); - - buffer[0] = reg; - buffer[1] = val; - - msg.slave = sc->addr; - msg.flags = IIC_M_WR; - msg.len = 2; - msg.buf = buffer; - - return (iicbus_transfer(dev, &msg, 1)); + return (iicdev_writeto(dev, reg, &val, 1, IIC_INTRWAIT)); } static int From owner-svn-src-stable@freebsd.org Thu Nov 28 17:52:27 2019 Return-Path: Delivered-To: svn-src-stable@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 806B01B10A9; Thu, 28 Nov 2019 17:52:27 +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) server-signature RSA-PSS (4096 bits) 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 47P4wW3f0Wz3MRy; Thu, 28 Nov 2019 17:52:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FFC41710; Thu, 28 Nov 2019 17:52:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xASHqRhl072490; Thu, 28 Nov 2019 17:52:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASHqPpe072482; Thu, 28 Nov 2019 17:52:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281752.xASHqPpe072482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 17:52:25 +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: r355178 - in stable/12/sys: arm/allwinner arm64/conf arm64/rockchip conf dev/usb/controller X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner arm64/conf arm64/rockchip conf dev/usb/controller X-SVN-Commit-Revision: 355178 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 17:52:27 -0000 Author: manu Date: Thu Nov 28 17:52:25 2019 New Revision: 355178 URL: https://svnweb.freebsd.org/changeset/base/355178 Log: MFC r352940-r352941, r352943-r352944, r353062-r353063, r353125 r352940: generic_ohci: Look for the phy based on the id phy-names was never in the bindings schema even if it was present in some DTS. Get the optional phy based on its ID. r352941: arm: allwinner: a10_ehci: Look for the phy based on the id phy-names was never in the bindings schema even if it was present in some DTS. Get the optional phy based on its ID. PR: 240978 r352943: arm: allwinner: a10_ehci: Enable all phys Even if there should be only one phy enable all the ones declared in the dts just to be sure. r352944: generic_ehci: Enable all phys and resets The number of phys and resets is not defined and it controller dependent so enable/disable every one of them. r353062: Split out the attachment from the generic-ehci driver Create an attachment file for the existing ACPI attachment, and create a new FDT attachment for the generic-ehci driver. Submitted by: andrew (Original version) Differential Revision: https://reviews.freebsd.org/D19389 r353063: allwinner: Remove a10_ehci driver We have generic-ehci since r353062 so use it. X-MFC-With: r353062 r353125: arm64: rockchip: usb2phy: Add set/get mode We only support host mode so those functions are just added so we won't panic when generic-{e,o}hci will set the phy to host mode. X-MFC-With: r353062 Added: stable/12/sys/dev/usb/controller/generic_ehci.h - copied unchanged from r353063, head/sys/dev/usb/controller/generic_ehci.h stable/12/sys/dev/usb/controller/generic_ehci_acpi.c - copied unchanged from r353063, head/sys/dev/usb/controller/generic_ehci_acpi.c stable/12/sys/dev/usb/controller/generic_ehci_fdt.c - copied unchanged from r353063, head/sys/dev/usb/controller/generic_ehci_fdt.c Deleted: stable/12/sys/arm/allwinner/a10_ehci.c Modified: stable/12/sys/arm/allwinner/files.allwinner stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/rk_usb2phy.c stable/12/sys/conf/files.arm64 stable/12/sys/dev/usb/controller/generic_ehci.c stable/12/sys/dev/usb/controller/generic_ohci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/files.allwinner ============================================================================== --- stable/12/sys/arm/allwinner/files.allwinner Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/arm/allwinner/files.allwinner Thu Nov 28 17:52:25 2019 (r355178) @@ -4,7 +4,6 @@ arm/allwinner/a10_ahci.c optional ahci arm/allwinner/a10_codec.c optional sound arm/allwinner/a10_dmac.c optional a10_dmac arm/allwinner/a31_dmac.c optional a31_dmac -arm/allwinner/a10_ehci.c optional ehci arm/allwinner/a10_sramc.c optional SOC_ALLWINNER_A10 arm/allwinner/aw_gpio.c optional gpio arm/allwinner/aw_if_dwc.c optional dwc @@ -26,6 +25,8 @@ arm/allwinner/sunxi_dma_if.m optional a10_dmac | a31_ dev/iicbus/twsi/a10_twsi.c optional twsi dev/usb/controller/generic_ohci.c optional ohci dev/usb/controller/generic_usb_if.m optional ohci +dev/usb/controller/generic_ehci.c optional ehci +dev/usb/controller/generic_ehci_fdt.c optional ehci arm/allwinner/aw_sid.c optional aw_sid arm/allwinner/aw_thermal.c optional aw_thermal arm/allwinner/aw_cir.c optional aw_cir evdev Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/arm64/conf/GENERIC Thu Nov 28 17:52:25 2019 (r355178) @@ -176,7 +176,6 @@ device uart_snps device pl011 # USB support -device aw_ehci # Allwinner EHCI USB interface (USB 2.0) device aw_usbphy # Allwinner USB PHY device rk_usb2phy # Rockchip USB2PHY device dwcotg # DWC OTG controller Modified: stable/12/sys/arm64/rockchip/rk_usb2phy.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_usb2phy.c Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/arm64/rockchip/rk_usb2phy.c Thu Nov 28 17:52:25 2019 (r355178) @@ -87,12 +87,17 @@ struct rk_usb2phy_softc { struct syscon *grf; regulator_t phy_supply; clk_t clk; + int mode; }; /* Phy class and methods. */ static int rk_usb2phy_enable(struct phynode *phynode, bool enable); +static int rk_usb2phy_get_mode(struct phynode *phy, int *mode); +static int rk_usb2phy_set_mode(struct phynode *phy, int mode); static phynode_method_t rk_usb2phy_phynode_methods[] = { - PHYNODEMETHOD(phynode_enable, rk_usb2phy_enable), + PHYNODEMETHOD(phynode_enable, rk_usb2phy_enable), + PHYNODEMETHOD(phynode_usb_get_mode, rk_usb2phy_get_mode), + PHYNODEMETHOD(phynode_usb_set_mode, rk_usb2phy_set_mode), PHYNODEMETHOD_END }; @@ -136,6 +141,44 @@ rk_usb2phy_enable(struct phynode *phynode, bool enable return (0); fail: return (ENXIO); +} + +static int +rk_usb2phy_get_mode(struct phynode *phynode, int *mode) +{ + struct rk_usb2phy_softc *sc; + intptr_t phy; + device_t dev; + + dev = phynode_get_device(phynode); + phy = phynode_get_id(phynode); + sc = device_get_softc(dev); + + if (phy != RK3399_USBPHY_HOST) + return (ERANGE); + + *mode = sc->mode; + + return (0); +} + +static int +rk_usb2phy_set_mode(struct phynode *phynode, int mode) +{ + struct rk_usb2phy_softc *sc; + intptr_t phy; + device_t dev; + + dev = phynode_get_device(phynode); + phy = phynode_get_id(phynode); + sc = device_get_softc(dev); + + if (phy != RK3399_USBPHY_HOST) + return (ERANGE); + + sc->mode = mode; + + return (0); } /* Clock class and method */ Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/conf/files.arm64 Thu Nov 28 17:52:25 2019 (r355178) @@ -25,7 +25,6 @@ cloudabi64_vdso_blob.o optional compat_cloudabi64 \ # # Allwinner common files -arm/allwinner/a10_ehci.c optional ehci aw_ehci fdt arm/allwinner/a10_timer.c optional a10_timer fdt arm/allwinner/a10_codec.c optional sound a10_codec arm/allwinner/a31_dmac.c optional a31_dmac @@ -239,7 +238,9 @@ dev/uart/uart_dev_mu.c optional uart uart_mu dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 dev/usb/controller/ehci_mv.c optional ehci_mv fdt -dev/usb/controller/generic_ehci.c optional ehci acpi +dev/usb/controller/generic_ehci.c optional ehci +dev/usb/controller/generic_ehci_acpi.c optional ehci acpi +dev/usb/controller/generic_ehci_fdt.c optional ehci fdt dev/usb/controller/generic_ohci.c optional ohci fdt dev/usb/controller/generic_usb_if.m optional ohci fdt dev/usb/controller/usb_nop_xceiv.c optional fdt ext_resources Modified: stable/12/sys/dev/usb/controller/generic_ehci.c ============================================================================== --- stable/12/sys/dev/usb/controller/generic_ehci.c Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/dev/usb/controller/generic_ehci.c Thu Nov 28 17:52:25 2019 (r355178) @@ -60,27 +60,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include "generic_ehci.h" -static device_attach_t generic_ehci_attach; -static device_detach_t generic_ehci_detach; - -static int -generic_ehci_probe(device_t self) -{ - ACPI_HANDLE h; - - if ((h = acpi_get_handle(self)) == NULL || - !acpi_MatchHid(h, "PNP0D20")) - return (ENXIO); - - device_set_desc(self, "Generic EHCI Controller"); - return (BUS_PROBE_DEFAULT); -} - -static int +int generic_ehci_attach(device_t self) { ehci_softc_t *sc = device_get_softc(self); @@ -152,7 +134,7 @@ error: return (ENXIO); } -static int +int generic_ehci_detach(device_t self) { ehci_softc_t *sc = device_get_softc(self); @@ -192,7 +174,6 @@ generic_ehci_detach(device_t self) static device_method_t ehci_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, generic_ehci_probe), DEVMETHOD(device_attach, generic_ehci_attach), DEVMETHOD(device_detach, generic_ehci_detach), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -202,13 +183,8 @@ static device_method_t ehci_methods[] = { DEVMETHOD_END }; -static driver_t ehci_driver = { +driver_t generic_ehci_driver = { .name = "ehci", .methods = ehci_methods, .size = sizeof(ehci_softc_t), }; - -static devclass_t ehci_devclass; - -DRIVER_MODULE(ehci, acpi, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); Copied: stable/12/sys/dev/usb/controller/generic_ehci.h (from r353063, head/sys/dev/usb/controller/generic_ehci.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/usb/controller/generic_ehci.h Thu Nov 28 17:52:25 2019 (r355178, copy of r353063, head/sys/dev/usb/controller/generic_ehci.h) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2016 The FreeBSD Foundation + * Copyright (c) 2019 Andrew Turner + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 _GENERIC_EHCI_H_ +#define _GENERIC_EHCI_H_ + +extern driver_t generic_ehci_driver; + +device_attach_t generic_ehci_attach; +device_detach_t generic_ehci_detach; + +#endif /* !_GENERIC_EHCI_H_ */ Copied: stable/12/sys/dev/usb/controller/generic_ehci_acpi.c (from r353063, head/sys/dev/usb/controller/generic_ehci_acpi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/usb/controller/generic_ehci_acpi.c Thu Nov 28 17:52:25 2019 (r355178, copy of r353063, head/sys/dev/usb/controller/generic_ehci_acpi.c) @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "generic_ehci.h" + +static int +generic_ehci_acpi_probe(device_t self) +{ + ACPI_HANDLE h; + + if ((h = acpi_get_handle(self)) == NULL || + !acpi_MatchHid(h, "PNP0D20")) + return (ENXIO); + + device_set_desc(self, "Generic EHCI Controller"); + return (BUS_PROBE_DEFAULT); +} + +static device_method_t ehci_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, generic_ehci_acpi_probe), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(ehci, ehci_acpi_driver, ehci_acpi_methods, + sizeof(ehci_softc_t), generic_ehci_driver); + +static devclass_t ehci_acpi_devclass; + +DRIVER_MODULE(ehci, acpi, ehci_acpi_driver, ehci_acpi_devclass, 0, 0); +MODULE_DEPEND(ehci, usb, 1, 1, 1); Copied: stable/12/sys/dev/usb/controller/generic_ehci_fdt.c (from r353063, head/sys/dev/usb/controller/generic_ehci_fdt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/usb/controller/generic_ehci_fdt.c Thu Nov 28 17:52:25 2019 (r355178, copy of r353063, head/sys/dev/usb/controller/generic_ehci_fdt.c) @@ -0,0 +1,255 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#ifdef EXT_RESOURCES +#include +#include +#include +#include +#endif + +#include "generic_ehci.h" + +#ifdef EXT_RESOURCES +struct clk_list { + TAILQ_ENTRY(clk_list) next; + clk_t clk; +}; + + +struct hwrst_list { + TAILQ_ENTRY(hwrst_list) next; + hwreset_t rst; +}; + +struct phy_list { + TAILQ_ENTRY(phy_list) next; + phy_t phy; +}; +#endif + +struct generic_ehci_fdt_softc { + ehci_softc_t ehci_sc; + +#ifdef EXT_RESOURCES + TAILQ_HEAD(, clk_list) clk_list; + TAILQ_HEAD(, hwrst_list) rst_list; + TAILQ_HEAD(, phy_list) phy_list; +#endif +}; + +static device_probe_t generic_ehci_fdt_probe; +static device_attach_t generic_ehci_fdt_attach; +static device_detach_t generic_ehci_fdt_detach; + +static int +generic_ehci_fdt_probe(device_t self) +{ + + if (!ofw_bus_status_okay(self)) + return (ENXIO); + + if (!ofw_bus_is_compatible(self, "generic-ehci")) + return (ENXIO); + + device_set_desc(self, "Generic EHCI Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +generic_ehci_fdt_attach(device_t dev) +{ +#ifdef EXT_RESOURCES + struct generic_ehci_fdt_softc *sc; + struct clk_list *clkp; + clk_t clk; + struct hwrst_list *rstp; + hwreset_t rst; + struct phy_list *phyp; + phy_t phy; + int err, off; + + sc = device_get_softc(dev); + + TAILQ_INIT(&sc->clk_list); + /* Enable clock */ + for (off = 0; clk_get_by_ofw_index(dev, 0, off, &clk) == 0; off++) { + err = clk_enable(clk); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(clk)); + goto error; + } + clkp = malloc(sizeof(*clkp), M_DEVBUF, M_WAITOK | M_ZERO); + clkp->clk = clk; + TAILQ_INSERT_TAIL(&sc->clk_list, clkp, next); + } + + /* De-assert reset */ + TAILQ_INIT(&sc->rst_list); + for (off = 0; hwreset_get_by_ofw_idx(dev, 0, off, &rst) == 0; off++) { + err = hwreset_deassert(rst); + if (err != 0) { + device_printf(dev, "Could not de-assert reset\n"); + goto error; + } + rstp = malloc(sizeof(*rstp), M_DEVBUF, M_WAITOK | M_ZERO); + rstp->rst = rst; + TAILQ_INSERT_TAIL(&sc->rst_list, rstp, next); + } + + /* Enable USB PHY */ + TAILQ_INIT(&sc->phy_list); + for (off = 0; phy_get_by_ofw_idx(dev, 0, off, &phy) == 0; off++) { + err = phy_usb_set_mode(phy, PHY_USB_MODE_HOST); + if (err != 0) { + device_printf(dev, "Could not set phy to host mode\n"); + goto error; + } + err = phy_enable(phy); + if (err != 0) { + device_printf(dev, "Could not enable phy\n"); + goto error; + } + phyp = malloc(sizeof(*phyp), M_DEVBUF, M_WAITOK | M_ZERO); + phyp->phy = phy; + TAILQ_INSERT_TAIL(&sc->phy_list, phyp, next); + } +#endif + + err = generic_ehci_attach(dev); + if (err != 0) + goto error; + + return (0); + +error: + generic_ehci_fdt_detach(dev); + return (err); +} + +static int +generic_ehci_fdt_detach(device_t dev) +{ +#ifdef EXT_RESOURCES + struct generic_ehci_fdt_softc *sc; + struct clk_list *clk, *clk_tmp; + struct hwrst_list *rst, *rst_tmp; + struct phy_list *phy, *phy_tmp; +#endif + int err; + + err = generic_ehci_detach(dev); + if (err != 0) + return (err); + +#ifdef EXT_RESOURCES + sc = device_get_softc(dev); + + /* Disable clock */ + TAILQ_FOREACH_SAFE(clk, &sc->clk_list, next, clk_tmp) { + err = clk_disable(clk->clk); + if (err != 0) + device_printf(dev, "Could not disable clock %s\n", + clk_get_name(clk->clk)); + err = clk_release(clk->clk); + if (err != 0) + device_printf(dev, "Could not release clock %s\n", + clk_get_name(clk->clk)); + TAILQ_REMOVE(&sc->clk_list, clk, next); + free(clk, M_DEVBUF); + } + + /* Assert reset */ + TAILQ_FOREACH_SAFE(rst, &sc->rst_list, next, rst_tmp) { + hwreset_assert(rst->rst); + hwreset_release(rst->rst); + TAILQ_REMOVE(&sc->rst_list, rst, next); + free(rst, M_DEVBUF); + } + + /* Disable phys */ + TAILQ_FOREACH_SAFE(phy, &sc->phy_list, next, phy_tmp) { + err = phy_disable(phy->phy); + if (err != 0) + device_printf(dev, "Could not disable phy\n"); + phy_release(phy->phy); + TAILQ_REMOVE(&sc->phy_list, phy, next); + free(phy, M_DEVBUF); + } +#endif + + return (0); +} + +static device_method_t ehci_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, generic_ehci_fdt_probe), + DEVMETHOD(device_attach, generic_ehci_fdt_attach), + DEVMETHOD(device_detach, generic_ehci_fdt_detach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(ehci, ehci_fdt_driver, ehci_fdt_methods, + sizeof(ehci_softc_t), generic_ehci_driver); + +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); Modified: stable/12/sys/dev/usb/controller/generic_ohci.c ============================================================================== --- stable/12/sys/dev/usb/controller/generic_ohci.c Thu Nov 28 17:45:57 2019 (r355177) +++ stable/12/sys/dev/usb/controller/generic_ohci.c Thu Nov 28 17:52:25 2019 (r355178) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif #include "generic_usb_if.h" @@ -70,15 +71,23 @@ struct clk_list { TAILQ_ENTRY(clk_list) next; clk_t clk; }; +struct phy_list { + TAILQ_ENTRY(phy_list) next; + phy_t phy; +}; +struct hwrst_list { + TAILQ_ENTRY(hwrst_list) next; + hwreset_t rst; +}; #endif struct generic_ohci_softc { ohci_softc_t ohci_sc; #ifdef EXT_RESOURCES - hwreset_t rst; - phy_t phy; - TAILQ_HEAD(, clk_list) clk_list; + TAILQ_HEAD(, clk_list) clk_list; + TAILQ_HEAD(, phy_list) phy_list; + TAILQ_HEAD(, hwrst_list) rst_list; #endif }; @@ -107,7 +116,11 @@ generic_ohci_attach(device_t dev) #ifdef EXT_RESOURCES int off; struct clk_list *clkp; + struct phy_list *phyp; + struct hwrst_list *rstp; clk_t clk; + phy_t phy; + hwreset_t rst; #endif sc->ohci_sc.sc_bus.parent = dev; @@ -174,22 +187,34 @@ generic_ohci_attach(device_t dev) } /* De-assert reset */ - if (hwreset_get_by_ofw_idx(dev, 0, 0, &sc->rst) == 0) { - err = hwreset_deassert(sc->rst); + TAILQ_INIT(&sc->rst_list); + for (off = 0; hwreset_get_by_ofw_idx(dev, 0, off, &rst) == 0; off++) { + err = hwreset_deassert(rst); if (err != 0) { - device_printf(dev, "Could not de-assert reset %d\n", - off); + device_printf(dev, "Could not de-assert reset\n"); goto error; } + rstp = malloc(sizeof(*rstp), M_DEVBUF, M_WAITOK | M_ZERO); + rstp->rst = rst; + TAILQ_INSERT_TAIL(&sc->rst_list, rstp, next); } /* Enable phy */ - if (phy_get_by_ofw_name(dev, 0, "usb", &sc->phy) == 0) { - err = phy_enable(sc->phy); + TAILQ_INIT(&sc->phy_list); + for (off = 0; phy_get_by_ofw_idx(dev, 0, off, &phy) == 0; off++) { + err = phy_usb_set_mode(phy, PHY_USB_MODE_HOST); if (err != 0) { + device_printf(dev, "Could not set phy to host mode\n"); + goto error; + } + err = phy_enable(phy); + if (err != 0) { device_printf(dev, "Could not enable phy\n"); goto error; } + phyp = malloc(sizeof(*phyp), M_DEVBUF, M_WAITOK | M_ZERO); + phyp->phy = phy; + TAILQ_INSERT_TAIL(&sc->phy_list, phyp, next); } #endif @@ -217,6 +242,8 @@ generic_ohci_detach(device_t dev) int err; #ifdef EXT_RESOURCES struct clk_list *clk, *clk_tmp; + struct phy_list *phy, *phy_tmp; + struct hwrst_list *rst, *rst_tmp; #endif /* during module unload there are lots of children leftover */ @@ -258,13 +285,23 @@ generic_ohci_detach(device_t dev) #ifdef EXT_RESOURCES /* Disable phy */ - if (sc->phy) { - err = phy_disable(sc->phy); + TAILQ_FOREACH_SAFE(phy, &sc->phy_list, next, phy_tmp) { + err = phy_disable(phy->phy); if (err != 0) device_printf(dev, "Could not disable phy\n"); - phy_release(sc->phy); + phy_release(phy->phy); + TAILQ_REMOVE(&sc->phy_list, phy, next); + free(phy, M_DEVBUF); } + /* Assert reset */ + TAILQ_FOREACH_SAFE(rst, &sc->rst_list, next, rst_tmp) { + hwreset_assert(rst->rst); + hwreset_release(rst->rst); + TAILQ_REMOVE(&sc->rst_list, rst, next); + free(rst, M_DEVBUF); + } + /* Disable clock */ TAILQ_FOREACH_SAFE(clk, &sc->clk_list, next, clk_tmp) { err = clk_disable(clk->clk); @@ -277,14 +314,6 @@ generic_ohci_detach(device_t dev) clk_get_name(clk->clk)); TAILQ_REMOVE(&sc->clk_list, clk, next); free(clk, M_DEVBUF); - } - - /* De-assert reset */ - if (sc->rst) { - err = hwreset_assert(sc->rst); - if (err != 0) - device_printf(dev, "Could not assert reset\n"); - hwreset_release(sc->rst); } #endif From owner-svn-src-stable@freebsd.org Thu Nov 28 18:02:16 2019 Return-Path: Delivered-To: svn-src-stable@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 7B2D71B1738; Thu, 28 Nov 2019 18:02: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) server-signature RSA-PSS (4096 bits) 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 47P57r3Sd5z3N51; Thu, 28 Nov 2019 18:02: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 58E3E18C8; Thu, 28 Nov 2019 18:02: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 xASI2GiD079677; Thu, 28 Nov 2019 18:02:16 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASI2EAg079322; Thu, 28 Nov 2019 18:02:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281802.xASI2EAg079322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 18:02: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: r355179 - in stable/12/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Commit-Revision: 355179 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 18:02:16 -0000 Author: manu Date: Thu Nov 28 18:02:13 2019 New Revision: 355179 URL: https://svnweb.freebsd.org/changeset/base/355179 Log: MFC r353524-r353527, r353534 r353524: aw_ccung: Add more debug printfs No functional changes r353525: arm64: allwinner: Add new clock aw_clk_np This is a clock type present in Allwinner H6 where the formula is : f = fparent * N / P r353526: arm64: allwinner: Add aw_clk_nmm clock This is a clock type present on Allwinner H6 where the formula is : f = fparent * n / m0 / m1 r353527: arm: allwinner: Disable the clock before changing it's freq You aren't supposed to changing the freq of a clock when it is enable so disable the clock before changing the freq and then re-enable it. r353534: arm: allwinner: Add np and nmm clock file to the build Added: stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.c - copied unchanged from r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.c stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.h - copied unchanged from r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.h stable/12/sys/arm/allwinner/clkng/aw_clk_np.c - copied unchanged from r353527, head/sys/arm/allwinner/clkng/aw_clk_np.c stable/12/sys/arm/allwinner/clkng/aw_clk_np.h - copied unchanged from r353527, head/sys/arm/allwinner/clkng/aw_clk_np.h Modified: stable/12/sys/arm/allwinner/aw_mmc.c stable/12/sys/arm/allwinner/clkng/aw_ccung.c stable/12/sys/arm/allwinner/clkng/aw_ccung.h stable/12/sys/arm/allwinner/clkng/aw_clk.h stable/12/sys/arm/allwinner/files.allwinner stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_mmc.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_mmc.c Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/arm/allwinner/aw_mmc.c Thu Nov 28 18:02:13 2019 (r355179) @@ -1424,6 +1424,10 @@ aw_mmc_update_ios(device_t bus, device_t child) } /* Set the MMC clock. */ + error = clk_disable(sc->aw_clk_mmc); + if (error != 0 && bootverbose) + device_printf(sc->aw_dev, + "failed to disable mmc clock: %d\n", error); error = clk_set_freq(sc->aw_clk_mmc, clock, CLK_SET_ROUND_DOWN); if (error != 0) { @@ -1432,6 +1436,10 @@ aw_mmc_update_ios(device_t bus, device_t child) clock, error); return (error); } + error = clk_enable(sc->aw_clk_mmc); + if (error != 0 && bootverbose) + device_printf(sc->aw_dev, + "failed to re-enable mmc clock: %d\n", error); if (sc->aw_mmc_conf->can_calibrate) AW_MMC_WRITE_4(sc, AW_MMC_SAMP_DL, AW_MMC_SAMP_DL_SW_EN); Modified: stable/12/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_ccung.c Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/arm/allwinner/clkng/aw_ccung.c Thu Nov 28 18:02:13 2019 (r355179) @@ -130,10 +130,12 @@ aw_ccung_reset_assert(device_t dev, intptr_t id, bool mtx_lock(&sc->mtx); val = CCU_READ4(sc, sc->resets[id].offset); + dprintf("offset=%x Read %x\n", sc->resets[id].offset, val); if (reset) val &= ~(1 << sc->resets[id].shift); else val |= 1 << sc->resets[id].shift; + dprintf("offset=%x Write %x\n", sc->resets[id].offset, val); CCU_WRITE4(sc, sc->resets[id].offset, val); mtx_unlock(&sc->mtx); @@ -153,6 +155,7 @@ aw_ccung_reset_is_asserted(device_t dev, intptr_t id, mtx_lock(&sc->mtx); val = CCU_READ4(sc, sc->resets[id].offset); + dprintf("offset=%x Read %x\n", sc->resets[id].offset, val); *reset = (val & (1 << sc->resets[id].shift)) != 0 ? false : true; mtx_unlock(&sc->mtx); @@ -311,6 +314,13 @@ aw_ccung_attach(device_t dev) break; case AW_CLK_MIPI: aw_clk_mipi_register(sc->clkdom, sc->clks[i].clk.mipi); + break; + case AW_CLK_NP: + aw_clk_np_register(sc->clkdom, sc->clks[i].clk.np); + break; + case AW_CLK_NMM: + aw_clk_nmm_register(sc->clkdom, sc->clks[i].clk.nmm); + break; } } Modified: stable/12/sys/arm/allwinner/clkng/aw_ccung.h ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_ccung.h Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/arm/allwinner/clkng/aw_ccung.h Thu Nov 28 18:02:13 2019 (r355179) @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #include @@ -52,6 +54,8 @@ enum aw_ccung_clk_type { AW_CLK_FRAC, AW_CLK_M, AW_CLK_MIPI, + AW_CLK_NP, + AW_CLK_NMM, }; struct aw_ccung_clk { @@ -66,6 +70,8 @@ struct aw_ccung_clk { struct aw_clk_frac_def *frac; struct aw_clk_m_def *m; struct aw_clk_mipi_def *mipi; + struct aw_clk_np_def *np; + struct aw_clk_nmm_def *nmm; } clk; }; Modified: stable/12/sys/arm/allwinner/clkng/aw_clk.h ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_clk.h Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/arm/allwinner/clkng/aw_clk.h Thu Nov 28 18:02:13 2019 (r355179) @@ -407,6 +407,69 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .flags = _flags, \ } +#define NMM_CLK(_clkname, _id, _name, _pnames, \ + _offset, \ + _nshift, _nwidth, _nvalue, _nflags, \ + _m0shift, _m0width, _m0value, _m0flags, \ + _m1shift, _m1width, _m1value, _m1flags, \ + _gate_shift, \ + _lock, _lock_retries, \ + _flags) \ + static struct aw_clk_nmm_def _clkname = { \ + .clkdef = { \ + .id = _id, \ + .name = _name, \ + .parent_names = _pnames, \ + .parent_cnt = nitems(_pnames), \ + }, \ + .offset = _offset, \ + .n.shift = _nshift, \ + .n.width = _nwidth, \ + .n.value = _nvalue, \ + .n.flags = _nflags, \ + .m0.shift = _m0shift, \ + .m0.width = _m0width, \ + .m0.value = _m0value, \ + .m0.flags = _m0flags, \ + .m1.shift = _m1shift, \ + .m1.width = _m1width, \ + .m1.value = _m1value, \ + .m1.flags = _m1flags, \ + .gate_shift = _gate_shift, \ + .lock_shift = _lock, \ + .lock_retries = _lock_retries, \ + .flags = _flags, \ + } + +#define NP_CLK(_clkname, _id, _name, _pnames, \ + _offset, \ + _nshift, _nwidth, _nvalue, _nflags, \ + _pshift, _pwidth, _pvalue, _pflags, \ + _gate_shift, \ + _lock, _lock_retries, \ + _flags) \ + static struct aw_clk_np_def _clkname = { \ + .clkdef = { \ + .id = _id, \ + .name = _name, \ + .parent_names = _pnames, \ + .parent_cnt = nitems(_pnames), \ + }, \ + .offset = _offset, \ + .n.shift = _nshift, \ + .n.width = _nwidth, \ + .n.value = _nvalue, \ + .n.flags = _nflags, \ + .p.shift = _pshift, \ + .p.width = _pwidth, \ + .p.value = _pvalue, \ + .p.flags = _pflags, \ + .gate_shift = _gate_shift, \ + .lock_shift = _lock, \ + .lock_retries = _lock_retries, \ + .flags = _flags, \ + } + #define PREDIV_CLK(_clkname, _id, _name, _pnames, \ _offset, \ _mux_shift, _mux_width, \ Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.c (from r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.c Thu Nov 28 18:02:13 2019 (r355179, copy of r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.c) @@ -0,0 +1,285 @@ +/*- + * 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 "clkdev_if.h" + +/* + * clknode for clocks matching the formula : + * + * clk = clkin * n / m0 / m1 + * + */ + +struct aw_clk_nmm_sc { + uint32_t offset; + + struct aw_clk_factor n; + struct aw_clk_factor m0; + struct aw_clk_factor m1; + + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +static int +aw_clk_nmm_init(struct clknode *clk, device_t dev) +{ + struct aw_clk_nmm_sc *sc; + + sc = clknode_get_softc(clk); + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +aw_clk_nmm_set_gate(struct clknode *clk, bool enable) +{ + struct aw_clk_nmm_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_GATE) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) + val |= (1 << sc->gate_shift); + else + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static uint64_t +aw_clk_nmm_find_best(struct aw_clk_nmm_sc *sc, uint64_t fparent, uint64_t *fout, + uint32_t *factor_n, uint32_t *factor_m0, uint32_t *factor_m1) +{ + uint64_t cur, best; + uint32_t n, m0, m1; + uint32_t max_n, max_m0, max_m1; + uint32_t min_n, min_m0, min_m1; + + *factor_n = *factor_m0 = *factor_m1 = 0; + + max_n = aw_clk_factor_get_max(&sc->n); + min_n = aw_clk_factor_get_min(&sc->n); + max_m0 = aw_clk_factor_get_max(&sc->m0); + min_m0 = aw_clk_factor_get_min(&sc->m0); + max_m1 = aw_clk_factor_get_max(&sc->m1); + min_m1 = aw_clk_factor_get_min(&sc->m1); + + for (m0 = min_m0; m0 <= max_m0; ) { + for (m1 = min_m1; m1 <= max_m1; ) { + for (n = min_n; n <= max_n; ) { + cur = fparent * n / m0 / m1; + if (abs(*fout - cur) < abs(*fout - best)) { + best = cur; + *factor_n = n; + *factor_m0 = m0; + *factor_m1 = m1; + } + n++; + } + m1++; + } + m0++; + } + + return (best); +} + +static int +aw_clk_nmm_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct aw_clk_nmm_sc *sc; + uint64_t cur, best; + uint32_t val, n, m0, m1, best_n, best_m0, best_m1; + int retry; + + sc = clknode_get_softc(clk); + + best = cur = 0; + + best = aw_clk_nmm_find_best(sc, fparent, fout, + &best_n, &best_m0, &best_m1); + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + if ((best < *fout) && + ((flags & CLK_SET_ROUND_DOWN) == 0)) { + *stop = 1; + return (ERANGE); + } + if ((best > *fout) && + ((flags & CLK_SET_ROUND_UP) == 0)) { + *stop = 1; + return (ERANGE); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + + n = aw_clk_factor_get_value(&sc->n, best_n); + m0 = aw_clk_factor_get_value(&sc->m0, best_m0); + m1 = aw_clk_factor_get_value(&sc->m1, best_m1); + val &= ~sc->n.mask; + val &= ~sc->m0.mask; + val &= ~sc->m1.mask; + val |= n << sc->n.shift; + val |= m0 << sc->m0.shift; + val |= m1 << sc->m1.shift; + + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + if ((sc->flags & AW_CLK_HAS_LOCK) != 0) { + for (retry = 0; retry < sc->lock_retries; retry++) { + READ4(clk, sc->offset, &val); + if ((val & (1 << sc->lock_shift)) != 0) + break; + DELAY(1000); + } + } + + *fout = best; + *stop = 1; + + return (0); +} + +static int +aw_clk_nmm_recalc(struct clknode *clk, uint64_t *freq) +{ + struct aw_clk_nmm_sc *sc; + uint32_t val, n, m0, m1; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + n = aw_clk_get_factor(val, &sc->n); + m0 = aw_clk_get_factor(val, &sc->m0); + m1 = aw_clk_get_factor(val, &sc->m1); + + *freq = *freq * n / m0 / m1; + + return (0); +} + +static clknode_method_t aw_nmm_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, aw_clk_nmm_init), + CLKNODEMETHOD(clknode_set_gate, aw_clk_nmm_set_gate), + CLKNODEMETHOD(clknode_recalc_freq, aw_clk_nmm_recalc), + CLKNODEMETHOD(clknode_set_freq, aw_clk_nmm_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(aw_nmm_clknode, aw_nmm_clknode_class, aw_nmm_clknode_methods, + sizeof(struct aw_clk_nmm_sc), clknode_class); + +int +aw_clk_nmm_register(struct clkdom *clkdom, struct aw_clk_nmm_def *clkdef) +{ + struct clknode *clk; + struct aw_clk_nmm_sc *sc; + + clk = clknode_create(clkdom, &aw_nmm_clknode_class, &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + + sc->n.shift = clkdef->n.shift; + sc->n.width = clkdef->n.width; + sc->n.mask = ((1 << sc->n.width) - 1) << sc->n.shift; + sc->n.value = clkdef->n.value; + sc->n.flags = clkdef->n.flags; + + sc->m0.shift = clkdef->m0.shift; + sc->m0.width = clkdef->m0.width; + sc->m0.mask = ((1 << sc->m0.width) - 1) << sc->m0.shift; + sc->m0.value = clkdef->m0.value; + sc->m0.flags = clkdef->m0.flags; + + sc->m1.shift = clkdef->m1.shift; + sc->m1.width = clkdef->m1.width; + sc->m1.mask = ((1 << sc->m1.width) - 1) << sc->m1.shift; + sc->m1.value = clkdef->m1.value; + sc->m1.flags = clkdef->m1.flags; + + sc->gate_shift = clkdef->gate_shift; + + sc->lock_shift = clkdef->lock_shift; + sc->lock_retries = clkdef->lock_retries; + + sc->flags = clkdef->flags; + + clknode_register(clkdom, clk); + + return (0); +} Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.h (from r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_nmm.h Thu Nov 28 18:02:13 2019 (r355179, copy of r353527, head/sys/arm/allwinner/clkng/aw_clk_nmm.h) @@ -0,0 +1,52 @@ +/*- + * 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$ + */ + +#ifndef __AW_CLK_NMM_H__ +#define __AW_CLK_NMM_H__ + +#include + +struct aw_clk_nmm_def { + struct clknode_init_def clkdef; + uint32_t offset; + + struct aw_clk_factor n; + struct aw_clk_factor m0; + struct aw_clk_factor m1; + + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +int aw_clk_nmm_register(struct clkdom *clkdom, struct aw_clk_nmm_def *clkdef); + +#endif /* __AW_CLK_NMM_H__ */ Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_np.c (from r353527, head/sys/arm/allwinner/clkng/aw_clk_np.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_np.c Thu Nov 28 18:02:13 2019 (r355179, copy of r353527, head/sys/arm/allwinner/clkng/aw_clk_np.c) @@ -0,0 +1,267 @@ +/*- + * 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 "clkdev_if.h" + +/* + * clknode for clocks matching the formula : + * + * clk = clkin * n / p + * + */ + +struct aw_clk_np_sc { + uint32_t offset; + + struct aw_clk_factor n; + struct aw_clk_factor p; + + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +static int +aw_clk_np_init(struct clknode *clk, device_t dev) +{ + struct aw_clk_np_sc *sc; + + sc = clknode_get_softc(clk); + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +aw_clk_np_set_gate(struct clknode *clk, bool enable) +{ + struct aw_clk_np_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_GATE) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) + val |= (1 << sc->gate_shift); + else + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static uint64_t +aw_clk_np_find_best(struct aw_clk_np_sc *sc, uint64_t fparent, uint64_t *fout, + uint32_t *factor_n, uint32_t *factor_p) +{ + uint64_t cur, best; + uint32_t n, p, max_n, max_p, min_n, min_p; + + *factor_n = *factor_p = 0; + + max_n = aw_clk_factor_get_max(&sc->n); + max_p = aw_clk_factor_get_max(&sc->p); + min_n = aw_clk_factor_get_min(&sc->n); + min_p = aw_clk_factor_get_min(&sc->p); + + for (p = min_p; p <= max_p; ) { + for (n = min_n; n <= max_n; ) { + cur = fparent * n / p; + if (abs(*fout - cur) < abs(*fout - best)) { + best = cur; + *factor_n = n; + *factor_p = p; + } + + n++; + } + p++; + } + + return (best); +} + +static int +aw_clk_np_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct aw_clk_np_sc *sc; + uint64_t cur, best; + uint32_t val, n, p, best_n, best_p; + int retry; + + sc = clknode_get_softc(clk); + + best = cur = 0; + + best = aw_clk_np_find_best(sc, fparent, fout, + &best_n, &best_p); + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + if ((best < *fout) && + ((flags & CLK_SET_ROUND_DOWN) == 0)) { + *stop = 1; + return (ERANGE); + } + if ((best > *fout) && + ((flags & CLK_SET_ROUND_UP) == 0)) { + *stop = 1; + return (ERANGE); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + + n = aw_clk_factor_get_value(&sc->n, best_n); + p = aw_clk_factor_get_value(&sc->p, best_p); + val &= ~sc->n.mask; + val &= ~sc->p.mask; + val |= n << sc->n.shift; + val |= p << sc->p.shift; + + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + if ((sc->flags & AW_CLK_HAS_LOCK) != 0) { + for (retry = 0; retry < sc->lock_retries; retry++) { + READ4(clk, sc->offset, &val); + if ((val & (1 << sc->lock_shift)) != 0) + break; + DELAY(1000); + } + } + + *fout = best; + *stop = 1; + + return (0); +} + +static int +aw_clk_np_recalc(struct clknode *clk, uint64_t *freq) +{ + struct aw_clk_np_sc *sc; + uint32_t val, n, p; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + n = aw_clk_get_factor(val, &sc->n); + p = aw_clk_get_factor(val, &sc->p); + + *freq = *freq * n / p; + + return (0); +} + +static clknode_method_t aw_np_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, aw_clk_np_init), + CLKNODEMETHOD(clknode_set_gate, aw_clk_np_set_gate), + CLKNODEMETHOD(clknode_recalc_freq, aw_clk_np_recalc), + CLKNODEMETHOD(clknode_set_freq, aw_clk_np_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(aw_np_clknode, aw_np_clknode_class, aw_np_clknode_methods, + sizeof(struct aw_clk_np_sc), clknode_class); + +int +aw_clk_np_register(struct clkdom *clkdom, struct aw_clk_np_def *clkdef) +{ + struct clknode *clk; + struct aw_clk_np_sc *sc; + + clk = clknode_create(clkdom, &aw_np_clknode_class, &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + + sc->n.shift = clkdef->n.shift; + sc->n.width = clkdef->n.width; + sc->n.mask = ((1 << sc->n.width) - 1) << sc->n.shift; + sc->n.value = clkdef->n.value; + sc->n.flags = clkdef->n.flags; + + sc->p.shift = clkdef->p.shift; + sc->p.width = clkdef->p.width; + sc->p.mask = ((1 << sc->p.width) - 1) << sc->p.shift; + sc->p.value = clkdef->p.value; + sc->p.flags = clkdef->p.flags; + + sc->gate_shift = clkdef->gate_shift; + + sc->lock_shift = clkdef->lock_shift; + sc->lock_retries = clkdef->lock_retries; + + sc->flags = clkdef->flags; + + clknode_register(clkdom, clk); + + return (0); +} Copied: stable/12/sys/arm/allwinner/clkng/aw_clk_np.h (from r353527, head/sys/arm/allwinner/clkng/aw_clk_np.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_np.h Thu Nov 28 18:02:13 2019 (r355179, copy of r353527, head/sys/arm/allwinner/clkng/aw_clk_np.h) @@ -0,0 +1,51 @@ +/*- + * 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$ + */ + +#ifndef __AW_CLK_NP_H__ +#define __AW_CLK_NP_H__ + +#include + +struct aw_clk_np_def { + struct clknode_init_def clkdef; + uint32_t offset; + + struct aw_clk_factor n; + struct aw_clk_factor p; + + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +int aw_clk_np_register(struct clkdom *clkdom, struct aw_clk_np_def *clkdef); + +#endif /* __AW_CLK_NP_H__ */ Modified: stable/12/sys/arm/allwinner/files.allwinner ============================================================================== --- stable/12/sys/arm/allwinner/files.allwinner Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/arm/allwinner/files.allwinner Thu Nov 28 18:02:13 2019 (r355179) @@ -41,4 +41,6 @@ arm/allwinner/clkng/aw_clk_m.c standard arm/allwinner/clkng/aw_clk_mipi.c standard arm/allwinner/clkng/aw_clk_nkmp.c standard arm/allwinner/clkng/aw_clk_nm.c standard +arm/allwinner/clkng/aw_clk_np.c standard +arm/allwinner/clkng/aw_clk_nmm.c standard arm/allwinner/clkng/aw_clk_prediv_mux.c standard Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Thu Nov 28 17:52:25 2019 (r355178) +++ stable/12/sys/conf/files.arm64 Thu Nov 28 18:02:13 2019 (r355179) @@ -53,6 +53,8 @@ arm/allwinner/clkng/aw_clk_m.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_mipi.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_nmm.c optional aw_ccu fdt +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 From owner-svn-src-stable@freebsd.org Thu Nov 28 18:15:09 2019 Return-Path: Delivered-To: svn-src-stable@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 D939C1B1CB2; Thu, 28 Nov 2019 18:15:09 +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) server-signature RSA-PSS (4096 bits) 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 47P5Qj4rGKz3Nk8; Thu, 28 Nov 2019 18:15:09 +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 89B531AA4; Thu, 28 Nov 2019 18:15:09 +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 xASIF9Mg086314; Thu, 28 Nov 2019 18:15:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASIF6xL086299; Thu, 28 Nov 2019 18:15:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281815.xASIF6xL086299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 18:15: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: r355180 - in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/apm arm64/arm arm64/bitmain arm64/broadcom arm64/broadcom/stingray arm64/cavium arm64/exynos arm... X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/apm arm64/arm arm64/bitmain arm64/broadcom arm64/broadcom/stingray arm64/cavium arm64/exynos arm64/freescale arm64/hisili... X-SVN-Commit-Revision: 355180 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 18:15:10 -0000 Author: manu Date: Thu Nov 28 18:15:05 2019 New Revision: 355180 URL: https://svnweb.freebsd.org/changeset/base/355180 Log: MFC r352858, r352860, r353172 r352858: Import DTS files from Linux 5.2 r352860: Import DTS files from Linux 5.3 r353172: arm: dts: ti: Fix mmc3 instance by setting it to disabled DTS Import of Linux 5.3 added a patch that rework the L3 mmc instance in the AM335x SoC but removed the status = 'disabled' on the node. This cause the kernel to probe the device even if the board doesn't have this mmc used and since we don't correctly activate the clock for this module we panic with an external data abort. Beaglebone(s) don't have this device anyway so simply disabling it. Patch for the DTS was sent upstream. https://patchwork.kernel.org/patch/11176921/ PR: 241089 Reported by: phk Added: stable/12/sys/gnu/dts/arm/am335x-regor-rdk.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/am335x-regor-rdk.dts stable/12/sys/gnu/dts/arm/am335x-regor.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/am335x-regor.dtsi stable/12/sys/gnu/dts/arm/am5718.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/am5718.dtsi stable/12/sys/gnu/dts/arm/am5728.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/am5728.dtsi stable/12/sys/gnu/dts/arm/am5748.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/am5748.dtsi stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-microsoft-olympus.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-microsoft-olympus.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts stable/12/sys/gnu/dts/arm/dra71x.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/dra71x.dtsi stable/12/sys/gnu/dts/arm/ibm-power9-dual.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/ibm-power9-dual.dtsi stable/12/sys/gnu/dts/arm/imx50-kobo-aura.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/imx50-kobo-aura.dts stable/12/sys/gnu/dts/arm/imx53-m53menlo.dts - copied, changed from r352858, head/sys/gnu/dts/arm/imx53-m53menlo.dts stable/12/sys/gnu/dts/arm/imx6dl-eckelmann-ci4x10.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/imx6dl-eckelmann-ci4x10.dts stable/12/sys/gnu/dts/arm/imx6dl-kontron-samx6i.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/imx6dl-kontron-samx6i.dtsi stable/12/sys/gnu/dts/arm/imx6q-kontron-samx6i.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/imx6q-kontron-samx6i.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-kontron-samx6i.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/imx6qdl-kontron-samx6i.dtsi stable/12/sys/gnu/dts/arm/imx7-mba7.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7-mba7.dtsi stable/12/sys/gnu/dts/arm/imx7-tqma7.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7-tqma7.dtsi stable/12/sys/gnu/dts/arm/imx7d-mba7.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7d-mba7.dts stable/12/sys/gnu/dts/arm/imx7d-meerkat96.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/imx7d-meerkat96.dts stable/12/sys/gnu/dts/arm/imx7d-tqma7.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7d-tqma7.dtsi stable/12/sys/gnu/dts/arm/imx7d-zii-rpu2.dts - copied, changed from r352858, head/sys/gnu/dts/arm/imx7d-zii-rpu2.dts stable/12/sys/gnu/dts/arm/imx7s-mba7.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7s-mba7.dts stable/12/sys/gnu/dts/arm/imx7s-tqma7.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/imx7s-tqma7.dtsi stable/12/sys/gnu/dts/arm/intel-ixp42x-linksys-nslu2.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp42x-linksys-nslu2.dts stable/12/sys/gnu/dts/arm/intel-ixp42x.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp42x.dtsi stable/12/sys/gnu/dts/arm/intel-ixp43x-gateworks-gw2358.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp43x-gateworks-gw2358.dts stable/12/sys/gnu/dts/arm/intel-ixp43x.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp43x.dtsi stable/12/sys/gnu/dts/arm/intel-ixp45x-ixp46x.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp45x-ixp46x.dtsi stable/12/sys/gnu/dts/arm/intel-ixp4xx.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/intel-ixp4xx.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit-28.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit-28.dts stable/12/sys/gnu/dts/arm/ls1021a-tsn.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/ls1021a-tsn.dts stable/12/sys/gnu/dts/arm/omap4-l4-abe.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/omap4-l4-abe.dtsi stable/12/sys/gnu/dts/arm/omap4-mcpdm.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/omap4-mcpdm.dtsi stable/12/sys/gnu/dts/arm/omap5-l4-abe.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm/omap5-l4-abe.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-mighty.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/rk3288-veyron-mighty.dts stable/12/sys/gnu/dts/arm/stm32mp157a-avenger96.dts - copied unchanged from r352860, head/sys/gnu/dts/arm/stm32mp157a-avenger96.dts stable/12/sys/gnu/dts/arm/stm32mp157a-dk1.dts - copied, changed from r352858, head/sys/gnu/dts/arm/stm32mp157a-dk1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-dk2.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/stm32mp157c-dk2.dts stable/12/sys/gnu/dts/arm/stm32mp157xaa-pinctrl.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/stm32mp157xaa-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xab-pinctrl.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/stm32mp157xab-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xac-pinctrl.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/stm32mp157xac-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157xad-pinctrl.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm/stm32mp157xad-pinctrl.dtsi stable/12/sys/gnu/dts/arm/sun8i-h3-rervision-dvk.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/sun8i-h3-rervision-dvk.dts stable/12/sys/gnu/dts/arm/vf610-zii-spb4.dts - copied unchanged from r352858, head/sys/gnu/dts/arm/vf610-zii-spb4.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts - copied, changed from r352858, head/sys/gnu/dts/arm64/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts - copied, changed from r352858, head/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray-usb.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/broadcom/stingray/stingray-usb.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts - copied, changed from r352858, head/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mm.dtsi - copied, changed from r352858, head/sys/gnu/dts/arm64/freescale/imx8mm.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mn-pinfunc.h - copied unchanged from r352860, head/sys/gnu/dts/arm64/freescale/imx8mn-pinfunc.h stable/12/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-rmb3.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-rmb3.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-zest.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra-zest.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi - copied unchanged from r352858, head/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hi3660-coresight.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/hisilicon/hi3660-coresight.dtsi stable/12/sys/gnu/dts/arm64/intel/ - copied from r352858, head/sys/gnu/dts/arm64/intel/ stable/12/sys/gnu/dts/arm64/mediatek/mt8183-evb.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/mediatek/mt8183-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt8183-pinfunc.h - copied unchanged from r352858, head/sys/gnu/dts/arm64/mediatek/mt8183-pinfunc.h stable/12/sys/gnu/dts/arm64/mediatek/mt8183.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/mediatek/mt8183.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p3450-0000.dts - copied, changed from r352858, head/sys/gnu/dts/arm64/nvidia/tegra210-p3450-0000.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza-r1.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/qcom/sdm845-cheza-r1.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza-r2.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/qcom/sdm845-cheza-r2.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza-r3.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/qcom/sdm845-cheza-r3.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts stable/12/sys/gnu/dts/arm64/renesas/hihope-common.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/renesas/hihope-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m-ex.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m-ex.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-hugsun-x99.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399-hugsun-x99.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge-captain.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge-captain.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge-v.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge-v.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399-khadas-edge.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopi-neo4.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/rockchip/rk3399-nanopi-neo4.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-orangepi.dts - copied unchanged from r352858, head/sys/gnu/dts/arm64/rockchip/rk3399-orangepi.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399pro.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/rockchip/rk3399pro.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts - copied unchanged from r352860, head/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-mcu-wakeup.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/ti/k3-j721e-mcu-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-som-p0.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/ti/k3-j721e-som-p0.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e.dtsi - copied unchanged from r352860, head/sys/gnu/dts/arm64/ti/k3-j721e.dtsi stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8183-clk.h - copied unchanged from r352858, head/sys/gnu/dts/include/dt-bindings/clock/mt8183-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8516-clk.h - copied, changed from r352858, head/sys/gnu/dts/include/dt-bindings/clock/mt8516-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gpucc-msm8998.h - copied unchanged from r352860, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gpucc-msm8998.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,turingcc-qcs404.h - copied unchanged from r352858, head/sys/gnu/dts/include/dt-bindings/clock/qcom,turingcc-qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/clock/xlnx-zynqmp-clk.h - copied unchanged from r352858, head/sys/gnu/dts/include/dt-bindings/clock/xlnx-zynqmp-clk.h stable/12/sys/gnu/dts/include/dt-bindings/iio/temperature/ - copied from r352858, head/sys/gnu/dts/include/dt-bindings/iio/temperature/ stable/12/sys/gnu/dts/include/dt-bindings/phy/phy-am654-serdes.h - copied unchanged from r352858, head/sys/gnu/dts/include/dt-bindings/phy/phy-am654-serdes.h stable/12/sys/gnu/dts/include/dt-bindings/power/qcom-aoss-qmp.h - copied unchanged from r352860, head/sys/gnu/dts/include/dt-bindings/power/qcom-aoss-qmp.h stable/12/sys/gnu/dts/include/dt-bindings/reset/bitmain,bm1880-reset.h - copied unchanged from r352860, head/sys/gnu/dts/include/dt-bindings/reset/bitmain,bm1880-reset.h stable/12/sys/gnu/dts/include/dt-bindings/sound/madera.h - copied unchanged from r352860, head/sys/gnu/dts/include/dt-bindings/sound/madera.h stable/12/sys/gnu/dts/include/dt-bindings/sound/meson-g12a-tohdmitx.h - copied unchanged from r352860, head/sys/gnu/dts/include/dt-bindings/sound/meson-g12a-tohdmitx.h Deleted: stable/12/sys/gnu/dts/include/dt-bindings/clock/xlnx,zynqmp-clk.h Modified: stable/12/sys/gnu/dts/arm/aks-cdu.dts stable/12/sys/gnu/dts/arm/am335x-baltos-ir2110.dts stable/12/sys/gnu/dts/arm/am335x-baltos-ir3220.dts stable/12/sys/gnu/dts/arm/am335x-baltos-ir5221.dts stable/12/sys/gnu/dts/arm/am335x-baltos-leds.dtsi stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi stable/12/sys/gnu/dts/arm/am335x-base0033.dts stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi stable/12/sys/gnu/dts/arm/am335x-bone.dts stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi stable/12/sys/gnu/dts/arm/am335x-boneblack-wireless.dts stable/12/sys/gnu/dts/arm/am335x-boneblack.dts stable/12/sys/gnu/dts/arm/am335x-boneblue.dts stable/12/sys/gnu/dts/arm/am335x-bonegreen-common.dtsi stable/12/sys/gnu/dts/arm/am335x-bonegreen-wireless.dts stable/12/sys/gnu/dts/arm/am335x-bonegreen.dts stable/12/sys/gnu/dts/arm/am335x-chiliboard.dts stable/12/sys/gnu/dts/arm/am335x-chilisom.dtsi 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-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-2101.dts stable/12/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts stable/12/sys/gnu/dts/arm/am335x-nano.dts stable/12/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts stable/12/sys/gnu/dts/arm/am335x-osd335x-common.dtsi 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-phycore-rdk.dts stable/12/sys/gnu/dts/arm/am335x-phycore-som.dtsi stable/12/sys/gnu/dts/arm/am335x-pocketbeagle.dts stable/12/sys/gnu/dts/arm/am335x-sancloud-bbe.dts stable/12/sys/gnu/dts/arm/am335x-sbc-t335.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-rdk.dts stable/12/sys/gnu/dts/arm/am335x-wega.dtsi stable/12/sys/gnu/dts/arm/am33xx-clocks.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-craneboard.dts stable/12/sys/gnu/dts/arm/am3517-evm-ui.dtsi stable/12/sys/gnu/dts/arm/am3517-evm.dts stable/12/sys/gnu/dts/arm/am3517-som.dtsi stable/12/sys/gnu/dts/arm/am3517_mt_ventoux.dts stable/12/sys/gnu/dts/arm/am35xx-clocks.dtsi stable/12/sys/gnu/dts/arm/am4372.dtsi stable/12/sys/gnu/dts/arm/am437x-cm-t43.dts 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-sbc-t43.dts 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.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-beagle-x15.dts stable/12/sys/gnu/dts/arm/am57xx-cl-som-am57x.dts stable/12/sys/gnu/dts/arm/am57xx-idk-common.dtsi stable/12/sys/gnu/dts/arm/am57xx-sbc-am57x.dts stable/12/sys/gnu/dts/arm/animeo_ip.dts stable/12/sys/gnu/dts/arm/arm-realview-eb.dtsi stable/12/sys/gnu/dts/arm/arm-realview-pb1176.dts stable/12/sys/gnu/dts/arm/arm-realview-pb11mp.dts stable/12/sys/gnu/dts/arm/arm-realview-pbx.dtsi stable/12/sys/gnu/dts/arm/armada-370-netgear-rn104.dts 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/aspeed-ast2500-evb.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts 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-witherspoon.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.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/at91-ariag25.dts stable/12/sys/gnu/dts/arm/at91-cosino.dtsi stable/12/sys/gnu/dts/arm/at91-cosino_mega2560.dts stable/12/sys/gnu/dts/arm/at91-foxg20.dts stable/12/sys/gnu/dts/arm/at91-kizbox.dts stable/12/sys/gnu/dts/arm/at91-kizbox2.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini.dts stable/12/sys/gnu/dts/arm/at91-linea.dtsi stable/12/sys/gnu/dts/arm/at91-qil_a9260.dts stable/12/sys/gnu/dts/arm/at91-sam9_l9260.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-sama5d3_xplained.dts stable/12/sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi stable/12/sys/gnu/dts/arm/at91-sama5d4_ma5d4evk.dts stable/12/sys/gnu/dts/arm/at91-sama5d4_xplained.dts stable/12/sys/gnu/dts/arm/at91-sama5d4ek.dts stable/12/sys/gnu/dts/arm/at91-tse850-3.dts stable/12/sys/gnu/dts/arm/at91-vinco.dts stable/12/sys/gnu/dts/arm/at91-wb50n.dtsi stable/12/sys/gnu/dts/arm/at91rm9200.dtsi stable/12/sys/gnu/dts/arm/at91rm9200_pqfp.dtsi stable/12/sys/gnu/dts/arm/at91rm9200ek.dts stable/12/sys/gnu/dts/arm/at91sam9260.dtsi stable/12/sys/gnu/dts/arm/at91sam9260ek.dts stable/12/sys/gnu/dts/arm/at91sam9261.dtsi stable/12/sys/gnu/dts/arm/at91sam9261ek.dts stable/12/sys/gnu/dts/arm/at91sam9263.dtsi stable/12/sys/gnu/dts/arm/at91sam9263ek.dts stable/12/sys/gnu/dts/arm/at91sam9g15.dtsi stable/12/sys/gnu/dts/arm/at91sam9g15ek.dts stable/12/sys/gnu/dts/arm/at91sam9g20.dtsi stable/12/sys/gnu/dts/arm/at91sam9g20ek.dts stable/12/sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts stable/12/sys/gnu/dts/arm/at91sam9g20ek_common.dtsi stable/12/sys/gnu/dts/arm/at91sam9g25.dtsi stable/12/sys/gnu/dts/arm/at91sam9g25ek.dts stable/12/sys/gnu/dts/arm/at91sam9g35.dtsi stable/12/sys/gnu/dts/arm/at91sam9g35ek.dts stable/12/sys/gnu/dts/arm/at91sam9g45.dtsi stable/12/sys/gnu/dts/arm/at91sam9m10g45ek.dts stable/12/sys/gnu/dts/arm/at91sam9n12.dtsi stable/12/sys/gnu/dts/arm/at91sam9n12ek.dts stable/12/sys/gnu/dts/arm/at91sam9rl.dtsi stable/12/sys/gnu/dts/arm/at91sam9rlek.dts stable/12/sys/gnu/dts/arm/at91sam9x25.dtsi stable/12/sys/gnu/dts/arm/at91sam9x25ek.dts stable/12/sys/gnu/dts/arm/at91sam9x35.dtsi stable/12/sys/gnu/dts/arm/at91sam9x35ek.dts stable/12/sys/gnu/dts/arm/at91sam9x5.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_can.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_isi.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_lcd.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_macb0.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_macb1.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_usart3.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5cm.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5dm.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5ek.dtsi stable/12/sys/gnu/dts/arm/at91sam9xe.dtsi stable/12/sys/gnu/dts/arm/atlas6-evb.dts stable/12/sys/gnu/dts/arm/atlas6.dtsi stable/12/sys/gnu/dts/arm/atlas7-evb.dts stable/12/sys/gnu/dts/arm/atlas7.dtsi stable/12/sys/gnu/dts/arm/axm5516-amarillo.dts stable/12/sys/gnu/dts/arm/axm5516-cpus.dtsi stable/12/sys/gnu/dts/arm/axm55xx.dtsi stable/12/sys/gnu/dts/arm/axp81x.dtsi stable/12/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi stable/12/sys/gnu/dts/arm/bcm-cygnus.dtsi stable/12/sys/gnu/dts/arm/bcm-nsp.dtsi stable/12/sys/gnu/dts/arm/bcm11351.dtsi stable/12/sys/gnu/dts/arm/bcm21664-garnet.dts stable/12/sys/gnu/dts/arm/bcm21664.dtsi stable/12/sys/gnu/dts/arm/bcm23550-sparrow.dts stable/12/sys/gnu/dts/arm/bcm23550.dtsi stable/12/sys/gnu/dts/arm/bcm28155-ap.dts stable/12/sys/gnu/dts/arm/bcm283x.dtsi stable/12/sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts stable/12/sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts stable/12/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts stable/12/sys/gnu/dts/arm/bcm4708-linksys-ea6300-v1.dts stable/12/sys/gnu/dts/arm/bcm4708-linksys-ea6500-v2.dts stable/12/sys/gnu/dts/arm/bcm4708-luxul-xap-1510.dts stable/12/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts stable/12/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts stable/12/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts stable/12/sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts stable/12/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts stable/12/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts stable/12/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts stable/12/sys/gnu/dts/arm/bcm47081-luxul-xap-1410.dts stable/12/sys/gnu/dts/arm/bcm47081-luxul-xwr-1200.dts stable/12/sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts stable/12/sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts stable/12/sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts stable/12/sys/gnu/dts/arm/bcm4709-linksys-ea9200.dts stable/12/sys/gnu/dts/arm/bcm4709-netgear-r7000.dts stable/12/sys/gnu/dts/arm/bcm4709-netgear-r8000.dts stable/12/sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts stable/12/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts stable/12/sys/gnu/dts/arm/bcm47094-linksys-panamera.dts stable/12/sys/gnu/dts/arm/bcm47094-luxul-abr-4500.dts stable/12/sys/gnu/dts/arm/bcm47094-luxul-xap-1610.dts stable/12/sys/gnu/dts/arm/bcm47094-luxul-xbr-4500.dts stable/12/sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts stable/12/sys/gnu/dts/arm/bcm47094-luxul-xwr-3150-v1.dts stable/12/sys/gnu/dts/arm/bcm47094-netgear-r8500.dts stable/12/sys/gnu/dts/arm/bcm47094-phicomm-k3.dts (contents, props changed) stable/12/sys/gnu/dts/arm/bcm47189-luxul-xap-1440.dts stable/12/sys/gnu/dts/arm/bcm47189-luxul-xap-810.dts stable/12/sys/gnu/dts/arm/bcm47189-tenda-ac9.dts stable/12/sys/gnu/dts/arm/bcm5301x.dtsi stable/12/sys/gnu/dts/arm/bcm53573.dtsi stable/12/sys/gnu/dts/arm/bcm59056.dtsi stable/12/sys/gnu/dts/arm/bcm63138.dtsi stable/12/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts stable/12/sys/gnu/dts/arm/bcm7445.dtsi stable/12/sys/gnu/dts/arm/bcm911360_entphn.dts stable/12/sys/gnu/dts/arm/bcm94708.dts stable/12/sys/gnu/dts/arm/bcm94709.dts stable/12/sys/gnu/dts/arm/bcm947189acdbmr.dts stable/12/sys/gnu/dts/arm/bcm953012er.dts stable/12/sys/gnu/dts/arm/bcm953012k.dts stable/12/sys/gnu/dts/arm/bcm958522er.dts stable/12/sys/gnu/dts/arm/bcm958525er.dts stable/12/sys/gnu/dts/arm/bcm958525xmc.dts stable/12/sys/gnu/dts/arm/bcm958622hr.dts stable/12/sys/gnu/dts/arm/bcm958623hr.dts stable/12/sys/gnu/dts/arm/bcm958625hr.dts stable/12/sys/gnu/dts/arm/bcm958625k.dts stable/12/sys/gnu/dts/arm/bcm963138dvt.dts stable/12/sys/gnu/dts/arm/bcm988312hr.dts stable/12/sys/gnu/dts/arm/compulab-sb-som.dtsi stable/12/sys/gnu/dts/arm/cros-adc-thermistors.dtsi stable/12/sys/gnu/dts/arm/cros-ec-keyboard.dtsi stable/12/sys/gnu/dts/arm/da850-enbw-cmc.dts stable/12/sys/gnu/dts/arm/da850-evm.dts stable/12/sys/gnu/dts/arm/da850-lcdk.dts stable/12/sys/gnu/dts/arm/da850-lego-ev3.dts stable/12/sys/gnu/dts/arm/da850.dtsi stable/12/sys/gnu/dts/arm/dm8148-evm.dts stable/12/sys/gnu/dts/arm/dm8148-t410.dts stable/12/sys/gnu/dts/arm/dm814x-clocks.dtsi stable/12/sys/gnu/dts/arm/dm8168-evm.dts stable/12/sys/gnu/dts/arm/dm816x-clocks.dtsi stable/12/sys/gnu/dts/arm/dra62x-clocks.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/dra71-evm.dts stable/12/sys/gnu/dts/arm/dra72-evm-common.dtsi stable/12/sys/gnu/dts/arm/dra72-evm-revc.dts stable/12/sys/gnu/dts/arm/dra72-evm-tps65917.dtsi stable/12/sys/gnu/dts/arm/dra72-evm.dts stable/12/sys/gnu/dts/arm/dra72x.dtsi stable/12/sys/gnu/dts/arm/dra74x-mmc-iodelay.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-mmc-iodelay.dtsi stable/12/sys/gnu/dts/arm/dra76x.dtsi stable/12/sys/gnu/dts/arm/dra7xx-clocks.dtsi stable/12/sys/gnu/dts/arm/ecx-2000.dts stable/12/sys/gnu/dts/arm/ecx-common.dtsi stable/12/sys/gnu/dts/arm/emev2-kzm9d.dts stable/12/sys/gnu/dts/arm/ep7209.dtsi stable/12/sys/gnu/dts/arm/ep7211-edb7211.dts stable/12/sys/gnu/dts/arm/ep7211.dtsi stable/12/sys/gnu/dts/arm/ethernut5.dts stable/12/sys/gnu/dts/arm/evk-pro3.dts stable/12/sys/gnu/dts/arm/exynos3250-artik5.dtsi stable/12/sys/gnu/dts/arm/exynos3250-monk.dts stable/12/sys/gnu/dts/arm/exynos3250-rinato.dts stable/12/sys/gnu/dts/arm/exynos3250.dtsi stable/12/sys/gnu/dts/arm/exynos4.dtsi stable/12/sys/gnu/dts/arm/exynos4210-origen.dts stable/12/sys/gnu/dts/arm/exynos4210-smdkv310.dts stable/12/sys/gnu/dts/arm/exynos4210-trats.dts 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-itop-scp-core.dtsi stable/12/sys/gnu/dts/arm/exynos4412-midas.dtsi stable/12/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi stable/12/sys/gnu/dts/arm/exynos4412-odroidu3.dts stable/12/sys/gnu/dts/arm/exynos4412-origen.dts stable/12/sys/gnu/dts/arm/exynos4412-prime.dtsi stable/12/sys/gnu/dts/arm/exynos4412-smdk4412.dts stable/12/sys/gnu/dts/arm/exynos4412-trats2.dts stable/12/sys/gnu/dts/arm/exynos4412.dtsi stable/12/sys/gnu/dts/arm/exynos5250-smdk5250.dts stable/12/sys/gnu/dts/arm/exynos5250.dtsi stable/12/sys/gnu/dts/arm/exynos5260-pinctrl.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-smdk5420.dts stable/12/sys/gnu/dts/arm/exynos5420.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroid-core.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi stable/12/sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi stable/12/sys/gnu/dts/arm/exynos54xx.dtsi stable/12/sys/gnu/dts/arm/ge863-pro3.dtsi stable/12/sys/gnu/dts/arm/gemini-dlink-dir-685.dts stable/12/sys/gnu/dts/arm/gemini-dlink-dns-313.dts stable/12/sys/gnu/dts/arm/hi3519-demb.dts stable/12/sys/gnu/dts/arm/hi3519.dtsi stable/12/sys/gnu/dts/arm/hi3620-hi4511.dts stable/12/sys/gnu/dts/arm/hi3620.dtsi stable/12/sys/gnu/dts/arm/highbank.dts stable/12/sys/gnu/dts/arm/hip01-ca9x2.dts stable/12/sys/gnu/dts/arm/hip01.dtsi stable/12/sys/gnu/dts/arm/hip04-d01.dts stable/12/sys/gnu/dts/arm/hip04.dtsi stable/12/sys/gnu/dts/arm/hisi-x5hd2-dkb.dts stable/12/sys/gnu/dts/arm/hisi-x5hd2.dtsi stable/12/sys/gnu/dts/arm/imx1-ads.dts stable/12/sys/gnu/dts/arm/imx1-apf9328.dts stable/12/sys/gnu/dts/arm/imx1-pinfunc.h stable/12/sys/gnu/dts/arm/imx23-olinuxino.dts stable/12/sys/gnu/dts/arm/imx23-stmp378x_devb.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts stable/12/sys/gnu/dts/arm/imx25-karo-tx25.dts stable/12/sys/gnu/dts/arm/imx25-pinfunc.h stable/12/sys/gnu/dts/arm/imx27-apf27.dts stable/12/sys/gnu/dts/arm/imx27-apf27dev.dts stable/12/sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi stable/12/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi stable/12/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx27-pinfunc.h stable/12/sys/gnu/dts/arm/imx28-apf28.dts stable/12/sys/gnu/dts/arm/imx28-apf28dev.dts stable/12/sys/gnu/dts/arm/imx28-cfa10036.dts stable/12/sys/gnu/dts/arm/imx28-cfa10037.dts stable/12/sys/gnu/dts/arm/imx28-cfa10049.dts stable/12/sys/gnu/dts/arm/imx28-cfa10055.dts stable/12/sys/gnu/dts/arm/imx28-cfa10056.dts stable/12/sys/gnu/dts/arm/imx28-cfa10057.dts stable/12/sys/gnu/dts/arm/imx28-cfa10058.dts stable/12/sys/gnu/dts/arm/imx28-duckbill-2-485.dts stable/12/sys/gnu/dts/arm/imx28-duckbill-2-enocean.dts stable/12/sys/gnu/dts/arm/imx28-duckbill-2-spi.dts stable/12/sys/gnu/dts/arm/imx28-duckbill-2.dts stable/12/sys/gnu/dts/arm/imx28-duckbill.dts stable/12/sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts stable/12/sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts stable/12/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi stable/12/sys/gnu/dts/arm/imx28-m28.dtsi stable/12/sys/gnu/dts/arm/imx28-m28cu3.dts stable/12/sys/gnu/dts/arm/imx28-m28evk.dts stable/12/sys/gnu/dts/arm/imx28-sps1.dts stable/12/sys/gnu/dts/arm/imx28-ts4600.dts stable/12/sys/gnu/dts/arm/imx31-bug.dts stable/12/sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi stable/12/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts stable/12/sys/gnu/dts/arm/imx35-pinfunc.h stable/12/sys/gnu/dts/arm/imx35.dtsi stable/12/sys/gnu/dts/arm/imx50-pinfunc.h stable/12/sys/gnu/dts/arm/imx50.dtsi stable/12/sys/gnu/dts/arm/imx51-apf51.dts stable/12/sys/gnu/dts/arm/imx51-apf51dev.dts stable/12/sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts stable/12/sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi stable/12/sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi stable/12/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts stable/12/sys/gnu/dts/arm/imx51-pinfunc.h stable/12/sys/gnu/dts/arm/imx51-zii-rdu1.dts stable/12/sys/gnu/dts/arm/imx51.dtsi stable/12/sys/gnu/dts/arm/imx53-ard.dts stable/12/sys/gnu/dts/arm/imx53-cx9020.dts stable/12/sys/gnu/dts/arm/imx53-m53.dtsi stable/12/sys/gnu/dts/arm/imx53-m53evk.dts stable/12/sys/gnu/dts/arm/imx53-mba53.dts stable/12/sys/gnu/dts/arm/imx53-pinfunc.h stable/12/sys/gnu/dts/arm/imx53-smd.dts stable/12/sys/gnu/dts/arm/imx53-tqma53.dtsi stable/12/sys/gnu/dts/arm/imx53-voipac-bsb.dts stable/12/sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi stable/12/sys/gnu/dts/arm/imx53.dtsi stable/12/sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/imx6dl-aristainetos_4.dts stable/12/sys/gnu/dts/arm/imx6dl-aristainetos_7.dts stable/12/sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts stable/12/sys/gnu/dts/arm/imx6dl-gw51xx.dts stable/12/sys/gnu/dts/arm/imx6dl-gw52xx.dts stable/12/sys/gnu/dts/arm/imx6dl-gw53xx.dts stable/12/sys/gnu/dts/arm/imx6dl-gw54xx.dts stable/12/sys/gnu/dts/arm/imx6dl-gw552x.dts stable/12/sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts stable/12/sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi stable/12/sys/gnu/dts/arm/imx6dl-pinfunc.h stable/12/sys/gnu/dts/arm/imx6dl-rex-basic.dts stable/12/sys/gnu/dts/arm/imx6dl-riotboard.dts stable/12/sys/gnu/dts/arm/imx6dl-sabreauto.dts stable/12/sys/gnu/dts/arm/imx6q-arm2.dts stable/12/sys/gnu/dts/arm/imx6q-ba16.dtsi stable/12/sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts stable/12/sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts stable/12/sys/gnu/dts/arm/imx6q-gw51xx.dts stable/12/sys/gnu/dts/arm/imx6q-gw52xx.dts stable/12/sys/gnu/dts/arm/imx6q-gw53xx.dts stable/12/sys/gnu/dts/arm/imx6q-gw5400-a.dts stable/12/sys/gnu/dts/arm/imx6q-gw54xx.dts stable/12/sys/gnu/dts/arm/imx6q-gw552x.dts stable/12/sys/gnu/dts/arm/imx6q-logicpd.dts (contents, props changed) stable/12/sys/gnu/dts/arm/imx6q-marsboard.dts stable/12/sys/gnu/dts/arm/imx6q-mccmon6.dts stable/12/sys/gnu/dts/arm/imx6q-phytec-pbab01.dts stable/12/sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi stable/12/sys/gnu/dts/arm/imx6q-pinfunc.h stable/12/sys/gnu/dts/arm/imx6q-rex-pro.dts stable/12/sys/gnu/dts/arm/imx6q-sbc6x.dts stable/12/sys/gnu/dts/arm/imx6q-tbs2910.dts stable/12/sys/gnu/dts/arm/imx6q-zii-rdu2.dts stable/12/sys/gnu/dts/arm/imx6qdl-apf6.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-emcon.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw551x.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-gw5903.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-rex.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sr-som.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-var-dart.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/imx6qdl.dtsi stable/12/sys/gnu/dts/arm/imx6qp-zii-rdu2.dts stable/12/sys/gnu/dts/arm/imx6sl-evk.dts stable/12/sys/gnu/dts/arm/imx6sl-pinfunc.h 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-pinfunc.h stable/12/sys/gnu/dts/arm/imx6sx-sabreauto.dts 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-sdb.dtsi stable/12/sys/gnu/dts/arm/imx6sx-softing-vining-2000.dts stable/12/sys/gnu/dts/arm/imx6sx-udoo-neo-basic.dts stable/12/sys/gnu/dts/arm/imx6sx-udoo-neo-extended.dts stable/12/sys/gnu/dts/arm/imx6sx-udoo-neo-full.dts stable/12/sys/gnu/dts/arm/imx6sx-udoo-neo.dtsi 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-geam.dts stable/12/sys/gnu/dts/arm/imx6ul-isiot.dtsi stable/12/sys/gnu/dts/arm/imx6ul-pico-hobbit.dts stable/12/sys/gnu/dts/arm/imx6ul-pico-pi.dts stable/12/sys/gnu/dts/arm/imx6ul-pinfunc.h 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.dtsi stable/12/sys/gnu/dts/arm/imx6ull-pinfunc.h stable/12/sys/gnu/dts/arm/imx6ull.dtsi stable/12/sys/gnu/dts/arm/imx7d-pico.dtsi stable/12/sys/gnu/dts/arm/imx7d-pinfunc.h stable/12/sys/gnu/dts/arm/imx7d-sdb.dts stable/12/sys/gnu/dts/arm/imx7d.dtsi stable/12/sys/gnu/dts/arm/imx7s-warp.dts stable/12/sys/gnu/dts/arm/imx7s.dtsi stable/12/sys/gnu/dts/arm/imx7ulp-evk.dts stable/12/sys/gnu/dts/arm/imx7ulp-pinfunc.h stable/12/sys/gnu/dts/arm/imx7ulp.dtsi stable/12/sys/gnu/dts/arm/integrator.dtsi stable/12/sys/gnu/dts/arm/iwg20d-q7-common.dtsi stable/12/sys/gnu/dts/arm/logicpd-som-lv-35xx-devkit.dts stable/12/sys/gnu/dts/arm/logicpd-som-lv-37xx-devkit.dts stable/12/sys/gnu/dts/arm/logicpd-som-lv-baseboard.dtsi stable/12/sys/gnu/dts/arm/logicpd-som-lv.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-35xx-devkit.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/lpc3250-ea3250.dts stable/12/sys/gnu/dts/arm/lpc3250-phy3250.dts stable/12/sys/gnu/dts/arm/lpc32xx.dtsi stable/12/sys/gnu/dts/arm/ls1021a-moxa-uc-8410a.dts stable/12/sys/gnu/dts/arm/ls1021a-qds.dts stable/12/sys/gnu/dts/arm/ls1021a-twr.dts stable/12/sys/gnu/dts/arm/ls1021a.dtsi stable/12/sys/gnu/dts/arm/meson.dtsi stable/12/sys/gnu/dts/arm/meson6-atv1200.dts stable/12/sys/gnu/dts/arm/meson6.dtsi stable/12/sys/gnu/dts/arm/meson8-minix-neo-x8.dts 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/meson8m2-mxiii-plus.dts stable/12/sys/gnu/dts/arm/meson8m2.dtsi stable/12/sys/gnu/dts/arm/mmp2-brownstone.dts stable/12/sys/gnu/dts/arm/mmp2.dtsi stable/12/sys/gnu/dts/arm/motorola-cpcap-mapphone.dtsi stable/12/sys/gnu/dts/arm/moxart-uc7112lx.dts stable/12/sys/gnu/dts/arm/moxart.dtsi stable/12/sys/gnu/dts/arm/mpa1600.dts stable/12/sys/gnu/dts/arm/mt2701-pinfunc.h stable/12/sys/gnu/dts/arm/mt8135-pinfunc.h stable/12/sys/gnu/dts/arm/nspire-classic.dtsi stable/12/sys/gnu/dts/arm/nspire-clp.dts stable/12/sys/gnu/dts/arm/nspire-cx.dts stable/12/sys/gnu/dts/arm/nspire-tp.dts stable/12/sys/gnu/dts/arm/nspire.dtsi stable/12/sys/gnu/dts/arm/omap2420-clocks.dtsi stable/12/sys/gnu/dts/arm/omap2420-h4.dts stable/12/sys/gnu/dts/arm/omap2420-n810.dts stable/12/sys/gnu/dts/arm/omap2430-clocks.dtsi stable/12/sys/gnu/dts/arm/omap2430-sdp.dts stable/12/sys/gnu/dts/arm/omap24xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap3-beagle-xm-ab.dts 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-devkit8000-common.dtsi stable/12/sys/gnu/dts/arm/omap3-devkit8000-lcd-common.dtsi 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-evm-37xx.dts stable/12/sys/gnu/dts/arm/omap3-evm.dts stable/12/sys/gnu/dts/arm/omap3-gta04.dtsi stable/12/sys/gnu/dts/arm/omap3-gta04a3.dts stable/12/sys/gnu/dts/arm/omap3-gta04a4.dts stable/12/sys/gnu/dts/arm/omap3-gta04a5.dts stable/12/sys/gnu/dts/arm/omap3-gta04a5one.dts stable/12/sys/gnu/dts/arm/omap3-ha-common.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-igep.dtsi stable/12/sys/gnu/dts/arm/omap3-igep0020-common.dtsi 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-common.dtsi 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-alto35-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-alto35.dts stable/12/sys/gnu/dts/arm/omap3-overo-base.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-chestnut43-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-chestnut43.dts stable/12/sys/gnu/dts/arm/omap3-overo-common-dvi.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-common-lcd35.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-common-lcd43.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-common-peripherals.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-gallop43-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-gallop43.dts stable/12/sys/gnu/dts/arm/omap3-overo-palo35-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-palo35.dts stable/12/sys/gnu/dts/arm/omap3-overo-palo43-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-palo43.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-overo-storm.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-summit-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-summit.dts stable/12/sys/gnu/dts/arm/omap3-overo-tobi-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-tobi.dts stable/12/sys/gnu/dts/arm/omap3-overo-tobiduo-common.dtsi stable/12/sys/gnu/dts/arm/omap3-overo-tobiduo.dts stable/12/sys/gnu/dts/arm/omap3-overo.dtsi stable/12/sys/gnu/dts/arm/omap3-pandora-1ghz.dts stable/12/sys/gnu/dts/arm/omap3-pandora-600mhz.dts stable/12/sys/gnu/dts/arm/omap3-pandora-common.dtsi 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/omap3430-sdp.dts stable/12/sys/gnu/dts/arm/omap3430es1-clocks.dtsi stable/12/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi stable/12/sys/gnu/dts/arm/omap36xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.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-duovero-parlor.dts stable/12/sys/gnu/dts/arm/omap4-duovero.dtsi stable/12/sys/gnu/dts/arm/omap4-kc1.dts stable/12/sys/gnu/dts/arm/omap4-l4.dtsi stable/12/sys/gnu/dts/arm/omap4-panda-a4.dts stable/12/sys/gnu/dts/arm/omap4-panda-common.dtsi stable/12/sys/gnu/dts/arm/omap4-panda-es.dts stable/12/sys/gnu/dts/arm/omap4-panda.dts stable/12/sys/gnu/dts/arm/omap4-sdp-es23plus.dts stable/12/sys/gnu/dts/arm/omap4-sdp.dts stable/12/sys/gnu/dts/arm/omap4-var-dvk-om44.dts stable/12/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi stable/12/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi stable/12/sys/gnu/dts/arm/omap4-var-som-om44.dtsi stable/12/sys/gnu/dts/arm/omap4-var-stk-om44.dts stable/12/sys/gnu/dts/arm/omap4.dtsi stable/12/sys/gnu/dts/arm/omap443x-clocks.dtsi stable/12/sys/gnu/dts/arm/omap446x-clocks.dtsi stable/12/sys/gnu/dts/arm/omap44xx-clocks.dtsi stable/12/sys/gnu/dts/arm/omap5-board-common.dtsi stable/12/sys/gnu/dts/arm/omap5-igep0050.dts stable/12/sys/gnu/dts/arm/omap5-uevm.dts stable/12/sys/gnu/dts/arm/omap5.dtsi stable/12/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/12/sys/gnu/dts/arm/ox810se-wd-mbwe.dts stable/12/sys/gnu/dts/arm/ox810se.dtsi stable/12/sys/gnu/dts/arm/ox820-cloudengines-pogoplug-series-3.dts stable/12/sys/gnu/dts/arm/ox820.dtsi stable/12/sys/gnu/dts/arm/picoxcell-pc3x2.dtsi stable/12/sys/gnu/dts/arm/picoxcell-pc3x3.dtsi stable/12/sys/gnu/dts/arm/picoxcell-pc7302-pc3x2.dts stable/12/sys/gnu/dts/arm/picoxcell-pc7302-pc3x3.dts stable/12/sys/gnu/dts/arm/pm9g45.dts stable/12/sys/gnu/dts/arm/prima2-evb.dts stable/12/sys/gnu/dts/arm/prima2.dtsi stable/12/sys/gnu/dts/arm/pxa168-aspenite.dts stable/12/sys/gnu/dts/arm/pxa168.dtsi stable/12/sys/gnu/dts/arm/pxa25x.dtsi stable/12/sys/gnu/dts/arm/pxa2xx.dtsi stable/12/sys/gnu/dts/arm/pxa300-raumfeld-common.dtsi stable/12/sys/gnu/dts/arm/pxa300-raumfeld-controller.dts stable/12/sys/gnu/dts/arm/pxa300-raumfeld-speaker-one.dts stable/12/sys/gnu/dts/arm/pxa3xx.dtsi stable/12/sys/gnu/dts/arm/pxa910-dkb.dts stable/12/sys/gnu/dts/arm/pxa910.dtsi stable/12/sys/gnu/dts/arm/qcom-apq8064.dtsi stable/12/sys/gnu/dts/arm/qcom-ipq4019.dtsi stable/12/sys/gnu/dts/arm/qcom-mdm9615.dtsi stable/12/sys/gnu/dts/arm/qcom-msm8660.dtsi stable/12/sys/gnu/dts/arm/qcom-msm8974-fairphone-fp2.dts stable/12/sys/gnu/dts/arm/qcom-msm8974-lge-nexus5-hammerhead.dts stable/12/sys/gnu/dts/arm/qcom-msm8974.dtsi stable/12/sys/gnu/dts/arm/qcom-pma8084.dtsi stable/12/sys/gnu/dts/arm/r7s72100-genmai.dts stable/12/sys/gnu/dts/arm/r7s72100-rskrza1.dts stable/12/sys/gnu/dts/arm/r7s72100.dtsi stable/12/sys/gnu/dts/arm/r7s9210-rza2mevb.dts (contents, props changed) stable/12/sys/gnu/dts/arm/r7s9210.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm/r8a73a4-ape6evm.dts stable/12/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts stable/12/sys/gnu/dts/arm/r8a7743-sk-rzg1m.dts stable/12/sys/gnu/dts/arm/r8a7745-iwg22d-sodimm.dts stable/12/sys/gnu/dts/arm/r8a7745-sk-rzg1e.dts 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-bockw.dts stable/12/sys/gnu/dts/arm/r8a7779-marzen.dts stable/12/sys/gnu/dts/arm/r8a7790-lager.dts stable/12/sys/gnu/dts/arm/r8a7790-stout.dts stable/12/sys/gnu/dts/arm/r8a7791-koelsch.dts stable/12/sys/gnu/dts/arm/r8a7791-porter.dts stable/12/sys/gnu/dts/arm/r8a7792-blanche.dts stable/12/sys/gnu/dts/arm/r8a7792-wheat.dts stable/12/sys/gnu/dts/arm/r8a7792.dtsi stable/12/sys/gnu/dts/arm/r8a7793-gose.dts stable/12/sys/gnu/dts/arm/r8a7794-alt.dts stable/12/sys/gnu/dts/arm/r8a7794-silk.dts stable/12/sys/gnu/dts/arm/rk3036-kylin.dts stable/12/sys/gnu/dts/arm/rk3036.dtsi stable/12/sys/gnu/dts/arm/rk3066a-marsboard.dts stable/12/sys/gnu/dts/arm/rk3066a-mk808.dts stable/12/sys/gnu/dts/arm/rk3066a-rayeager.dts stable/12/sys/gnu/dts/arm/rk3066a.dtsi stable/12/sys/gnu/dts/arm/rk3188-px3-evb.dts stable/12/sys/gnu/dts/arm/rk3188-radxarock.dts stable/12/sys/gnu/dts/arm/rk3188.dtsi stable/12/sys/gnu/dts/arm/rk322x.dtsi stable/12/sys/gnu/dts/arm/rk3288-evb-act8846.dts stable/12/sys/gnu/dts/arm/rk3288-evb.dtsi stable/12/sys/gnu/dts/arm/rk3288-fennec.dts stable/12/sys/gnu/dts/arm/rk3288-firefly-beta.dts stable/12/sys/gnu/dts/arm/rk3288-firefly-reload-core.dtsi stable/12/sys/gnu/dts/arm/rk3288-firefly-reload.dts stable/12/sys/gnu/dts/arm/rk3288-firefly.dts stable/12/sys/gnu/dts/arm/rk3288-firefly.dtsi stable/12/sys/gnu/dts/arm/rk3288-miqi.dts stable/12/sys/gnu/dts/arm/rk3288-phycore-rdk.dts stable/12/sys/gnu/dts/arm/rk3288-phycore-som.dtsi stable/12/sys/gnu/dts/arm/rk3288-r89.dts stable/12/sys/gnu/dts/arm/rk3288-rock2-som.dtsi stable/12/sys/gnu/dts/arm/rk3288-rock2-square.dts stable/12/sys/gnu/dts/arm/rk3288-tinker-s.dts 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-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-sdmmc.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-speedy.dts stable/12/sys/gnu/dts/arm/rk3288-veyron.dtsi stable/12/sys/gnu/dts/arm/rk3288-vyasa.dts stable/12/sys/gnu/dts/arm/rk3288.dtsi stable/12/sys/gnu/dts/arm/rv1108-elgin-r1.dts (contents, props changed) stable/12/sys/gnu/dts/arm/rv1108.dtsi stable/12/sys/gnu/dts/arm/s5pv210-goni.dts stable/12/sys/gnu/dts/arm/s5pv210.dtsi stable/12/sys/gnu/dts/arm/sama5d2.dtsi stable/12/sys/gnu/dts/arm/sama5d3.dtsi stable/12/sys/gnu/dts/arm/sama5d31.dtsi stable/12/sys/gnu/dts/arm/sama5d31ek.dts stable/12/sys/gnu/dts/arm/sama5d33.dtsi stable/12/sys/gnu/dts/arm/sama5d33ek.dts stable/12/sys/gnu/dts/arm/sama5d34.dtsi stable/12/sys/gnu/dts/arm/sama5d34ek.dts stable/12/sys/gnu/dts/arm/sama5d35.dtsi stable/12/sys/gnu/dts/arm/sama5d35ek.dts stable/12/sys/gnu/dts/arm/sama5d36.dtsi stable/12/sys/gnu/dts/arm/sama5d36ek.dts stable/12/sys/gnu/dts/arm/sama5d36ek_cmp.dts stable/12/sys/gnu/dts/arm/sama5d3_can.dtsi stable/12/sys/gnu/dts/arm/sama5d3_emac.dtsi stable/12/sys/gnu/dts/arm/sama5d3_gmac.dtsi stable/12/sys/gnu/dts/arm/sama5d3_lcd.dtsi stable/12/sys/gnu/dts/arm/sama5d3_mci2.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/sama5d3xcm.dtsi stable/12/sys/gnu/dts/arm/sama5d3xcm_cmp.dtsi stable/12/sys/gnu/dts/arm/sama5d3xdm.dtsi stable/12/sys/gnu/dts/arm/sama5d3xmb.dtsi stable/12/sys/gnu/dts/arm/sama5d3xmb_cmp.dtsi stable/12/sys/gnu/dts/arm/sama5d3xmb_emac.dtsi stable/12/sys/gnu/dts/arm/sama5d3xmb_gmac.dtsi stable/12/sys/gnu/dts/arm/sama5d4.dtsi stable/12/sys/gnu/dts/arm/sh73a0-kzm9g.dts stable/12/sys/gnu/dts/arm/socfpga_arria10.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10_socdk.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10_socdk_sdmmc.dts stable/12/sys/gnu/dts/arm/spear1310-evb.dts stable/12/sys/gnu/dts/arm/spear1310.dtsi stable/12/sys/gnu/dts/arm/spear1340-evb.dts stable/12/sys/gnu/dts/arm/spear1340.dtsi stable/12/sys/gnu/dts/arm/spear13xx.dtsi stable/12/sys/gnu/dts/arm/spear300-evb.dts stable/12/sys/gnu/dts/arm/spear300.dtsi stable/12/sys/gnu/dts/arm/spear310-evb.dts stable/12/sys/gnu/dts/arm/spear310.dtsi stable/12/sys/gnu/dts/arm/spear320-evb.dts stable/12/sys/gnu/dts/arm/spear320-hmi.dts stable/12/sys/gnu/dts/arm/spear320.dtsi stable/12/sys/gnu/dts/arm/spear3xx.dtsi stable/12/sys/gnu/dts/arm/spear600-evb.dts stable/12/sys/gnu/dts/arm/spear600.dtsi stable/12/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/12/sys/gnu/dts/arm/ste-href-ab8500.dtsi stable/12/sys/gnu/dts/arm/ste-href-ab8505.dtsi stable/12/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-href-stuib.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/stih407-b2120.dts stable/12/sys/gnu/dts/arm/stih407-clock.dtsi stable/12/sys/gnu/dts/arm/stih407-family.dtsi stable/12/sys/gnu/dts/arm/stih407-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stih407.dtsi stable/12/sys/gnu/dts/arm/stih410-b2120.dts stable/12/sys/gnu/dts/arm/stih410-b2260.dts stable/12/sys/gnu/dts/arm/stih410-clock.dtsi stable/12/sys/gnu/dts/arm/stih410-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stih410.dtsi stable/12/sys/gnu/dts/arm/stih418-b2199.dts stable/12/sys/gnu/dts/arm/stih418-clock.dtsi stable/12/sys/gnu/dts/arm/stih418.dtsi stable/12/sys/gnu/dts/arm/stihxxx-b2120.dtsi stable/12/sys/gnu/dts/arm/stm32746g-eval.dts stable/12/sys/gnu/dts/arm/stm32f429.dtsi stable/12/sys/gnu/dts/arm/stm32f769-disco.dts stable/12/sys/gnu/dts/arm/stm32h743-pinctrl.dtsi 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/stm32mp157-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157c-ed1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ev1.dts stable/12/sys/gnu/dts/arm/stm32mp157c.dtsi stable/12/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts stable/12/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-dserve-dsrv9703c.dts stable/12/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts stable/12/sys/gnu/dts/arm/sun4i-a10-inet1.dts stable/12/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts stable/12/sys/gnu/dts/arm/sun4i-a10-inet9f-rev03.dts stable/12/sys/gnu/dts/arm/sun4i-a10-marsboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun4i-a10-pcduino.dts stable/12/sys/gnu/dts/arm/sun4i-a10-pov-protab2-ips9.dts stable/12/sys/gnu/dts/arm/sun4i-a10.dtsi stable/12/sys/gnu/dts/arm/sun5i-a10s-auxtek-t004.dts stable/12/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun5i-a13-empire-electronix-d709.dts stable/12/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts stable/12/sys/gnu/dts/arm/sun5i-a13-licheepi-one.dts stable/12/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts stable/12/sys/gnu/dts/arm/sun5i-a13-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun5i-a13-utoo-p66.dts stable/12/sys/gnu/dts/arm/sun5i-gr8-chip-pro.dts stable/12/sys/gnu/dts/arm/sun5i-gr8-evb.dts stable/12/sys/gnu/dts/arm/sun5i-r8-chip.dts stable/12/sys/gnu/dts/arm/sun5i-reference-design-tablet.dtsi stable/12/sys/gnu/dts/arm/sun5i.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31-colombus.dts stable/12/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts stable/12/sys/gnu/dts/arm/sun6i-a31-i7.dts stable/12/sys/gnu/dts/arm/sun6i-a31.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31s-primo81.dts stable/12/sys/gnu/dts/arm/sun6i-reference-design-tablet.dtsi stable/12/sys/gnu/dts/arm/sun7i-a20-bananapi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-icnova-swac.dts stable/12/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olimex-som204-evb.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi-mini.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts stable/12/sys/gnu/dts/arm/sun7i-a20-wexler-tab7200.dts stable/12/sys/gnu/dts/arm/sun7i-a20-wits-pro-a20-dkt.dts 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-a23-ippo-q8h-v1.2.dts stable/12/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts stable/12/sys/gnu/dts/arm/sun8i-a23-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun8i-a33-et-q8-v1.6.dts stable/12/sys/gnu/dts/arm/sun8i-a33-ippo-q8h-v1.2.dts stable/12/sys/gnu/dts/arm/sun8i-a33-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun8i-a33-sinlinx-sina33.dts stable/12/sys/gnu/dts/arm/sun8i-a33.dtsi stable/12/sys/gnu/dts/arm/sun8i-a83t-bananapi-m3.dts 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-h2-plus-bananapi-m2-zero.dts stable/12/sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts stable/12/sys/gnu/dts/arm/sun8i-h3-beelink-x2.dts stable/12/sys/gnu/dts/arm/sun8i-h3-mapleboard-mp130.dts stable/12/sys/gnu/dts/arm/sun8i-h3-nanopi-m1-plus.dts stable/12/sys/gnu/dts/arm/sun8i-h3-nanopi-m1.dts stable/12/sys/gnu/dts/arm/sun8i-h3-nanopi-neo-air.dts stable/12/sys/gnu/dts/arm/sun8i-h3-nanopi.dtsi stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-2.dts stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-lite.dts stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-one.dts stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-pc.dts stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-plus.dts stable/12/sys/gnu/dts/arm/sun8i-h3-orangepi-zero-plus2.dts stable/12/sys/gnu/dts/arm/sun8i-h3.dtsi stable/12/sys/gnu/dts/arm/sun8i-q8-common.dtsi stable/12/sys/gnu/dts/arm/sun8i-r16-nintendo-nes-classic.dts stable/12/sys/gnu/dts/arm/sun8i-r16-parrot.dts stable/12/sys/gnu/dts/arm/sun8i-r40-bananapi-m2-ultra.dts stable/12/sys/gnu/dts/arm/sun8i-r40.dtsi stable/12/sys/gnu/dts/arm/sun8i-reference-design-tablet.dtsi stable/12/sys/gnu/dts/arm/sun8i-v3s-licheepi-zero.dts stable/12/sys/gnu/dts/arm/sun8i-v3s.dtsi stable/12/sys/gnu/dts/arm/sun8i-v40-bananapi-m2-berry.dts stable/12/sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts stable/12/sys/gnu/dts/arm/sun9i-a80-optimus.dts stable/12/sys/gnu/dts/arm/sun9i-a80.dtsi stable/12/sys/gnu/dts/arm/sunxi-bananapi-m2-plus-v1.2.dtsi stable/12/sys/gnu/dts/arm/sunxi-bananapi-m2-plus.dtsi stable/12/sys/gnu/dts/arm/sunxi-h3-h5.dtsi stable/12/sys/gnu/dts/arm/sunxi-libretech-all-h3-cc.dtsi stable/12/sys/gnu/dts/arm/tegra124-apalis-emc.dtsi stable/12/sys/gnu/dts/arm/tegra124-apalis-eval.dts stable/12/sys/gnu/dts/arm/tegra124-apalis-v1.2-eval.dts stable/12/sys/gnu/dts/arm/tegra124-apalis-v1.2.dtsi stable/12/sys/gnu/dts/arm/tegra124-apalis.dtsi stable/12/sys/gnu/dts/arm/tegra124-jetson-tk1.dts stable/12/sys/gnu/dts/arm/tegra124-nyan.dtsi stable/12/sys/gnu/dts/arm/tegra124-venice2.dts stable/12/sys/gnu/dts/arm/tegra30.dtsi stable/12/sys/gnu/dts/arm/tny_a9260.dts stable/12/sys/gnu/dts/arm/tny_a9260_common.dtsi stable/12/sys/gnu/dts/arm/tny_a9263.dts stable/12/sys/gnu/dts/arm/tny_a9g20.dts stable/12/sys/gnu/dts/arm/tps6507x.dtsi stable/12/sys/gnu/dts/arm/tps65217.dtsi stable/12/sys/gnu/dts/arm/tps65910.dtsi stable/12/sys/gnu/dts/arm/twl4030.dtsi stable/12/sys/gnu/dts/arm/twl4030_omap3.dtsi stable/12/sys/gnu/dts/arm/twl6030.dtsi stable/12/sys/gnu/dts/arm/twl6030_omap4.dtsi stable/12/sys/gnu/dts/arm/uniphier-ld4-ref.dts stable/12/sys/gnu/dts/arm/uniphier-ld4.dtsi stable/12/sys/gnu/dts/arm/uniphier-ld6b-ref.dts stable/12/sys/gnu/dts/arm/uniphier-pro4-ref.dts 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-ref.dts stable/12/sys/gnu/dts/arm/uniphier-sld8.dtsi stable/12/sys/gnu/dts/arm/usb_a9260.dts stable/12/sys/gnu/dts/arm/usb_a9260_common.dtsi stable/12/sys/gnu/dts/arm/usb_a9263.dts stable/12/sys/gnu/dts/arm/usb_a9g20-dab-mmx.dtsi stable/12/sys/gnu/dts/arm/usb_a9g20.dts stable/12/sys/gnu/dts/arm/usb_a9g20_common.dtsi stable/12/sys/gnu/dts/arm/usb_a9g20_lpw.dts stable/12/sys/gnu/dts/arm/versatile-ab.dts stable/12/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2m.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts stable/12/sys/gnu/dts/arm/vf610-bk4.dts stable/12/sys/gnu/dts/arm/vf610-cosmic.dts stable/12/sys/gnu/dts/arm/vf610-pinfunc.h stable/12/sys/gnu/dts/arm/vf610-zii-cfu1.dts stable/12/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts stable/12/sys/gnu/dts/arm/vf610-zii-dev-rev-c.dts stable/12/sys/gnu/dts/arm/vf610-zii-dev.dtsi stable/12/sys/gnu/dts/arm/vf610-zii-scu4-aib.dts stable/12/sys/gnu/dts/arm/vf610-zii-ssmb-dtu.dts (contents, props changed) stable/12/sys/gnu/dts/arm/vf610-zii-ssmb-spu3.dts stable/12/sys/gnu/dts/arm/vt8500-bv07.dts stable/12/sys/gnu/dts/arm/vt8500.dtsi stable/12/sys/gnu/dts/arm/wm8505-ref.dts stable/12/sys/gnu/dts/arm/wm8505.dtsi stable/12/sys/gnu/dts/arm/wm8650-mid.dts stable/12/sys/gnu/dts/arm/wm8650.dtsi stable/12/sys/gnu/dts/arm/wm8750-apc8750.dts stable/12/sys/gnu/dts/arm/wm8750.dtsi stable/12/sys/gnu/dts/arm/wm8850-w70v2.dts stable/12/sys/gnu/dts/arm/wm8850.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-orangepi-win.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.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-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-orangepi.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64.dts 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-s400.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-u200.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-x96-max.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a.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-p200.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-gxbb.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-p241.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905d-p230.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905d-phicomm-n1.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-nexbox-a1.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-q200.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-rbox-pro.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm.dtsi stable/12/sys/gnu/dts/arm64/apm/apm-merlin.dts stable/12/sys/gnu/dts/arm64/apm/apm-mustang.dts stable/12/sys/gnu/dts/arm64/apm/apm-shadowcat.dtsi stable/12/sys/gnu/dts/arm64/apm/apm-storm.dtsi stable/12/sys/gnu/dts/arm64/arm/juno-base.dtsi stable/12/sys/gnu/dts/arm64/arm/juno-cs-r1r2.dtsi stable/12/sys/gnu/dts/arm64/arm/juno-motherboard.dtsi stable/12/sys/gnu/dts/arm64/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm64/bitmain/bm1880-sophon-edge.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/bitmain/bm1880.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray.dtsi stable/12/sys/gnu/dts/arm64/cavium/thunder2-99xx.dts stable/12/sys/gnu/dts/arm64/cavium/thunder2-99xx.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.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-ls1012a-oxalis.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1012a.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-ls1043a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1043a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls208xa.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a-qds.dts 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-pinfunc.h (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8mq-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-mek.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/freescale/imx8qxp.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/hisilicon/hi3660.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hi3670-hikey970.dts stable/12/sys/gnu/dts/arm64/hisilicon/hi3670.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hi6220-coresight.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hikey970-pinctrl.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hip05-d02.dts stable/12/sys/gnu/dts/arm64/hisilicon/hip05.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hip06-d03.dts stable/12/sys/gnu/dts/arm64/hisilicon/hip06.dtsi stable/12/sys/gnu/dts/arm64/hisilicon/hip07-d05.dts stable/12/sys/gnu/dts/arm64/hisilicon/hip07.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dts stable/12/sys/gnu/dts/arm64/marvell/armada-7040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-clearfog-gt-8k.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-mcbin.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-cp110.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt2712-pinfunc.h stable/12/sys/gnu/dts/arm64/mediatek/mt2712e.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt6755-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt6795-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt6797-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt7622.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt8173-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt8173-pinfunc.h stable/12/sys/gnu/dts/arm64/mediatek/mt8173.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-p2371-2180.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p2597.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p2894.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/nvidia/tegra210-smaug.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra210.dtsi stable/12/sys/gnu/dts/arm64/qcom/apq8016-sbc.dts stable/12/sys/gnu/dts/arm64/qcom/apq8016-sbc.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/qcom/apq8096-db820c.dts stable/12/sys/gnu/dts/arm64/qcom/apq8096-db820c.dtsi stable/12/sys/gnu/dts/arm64/qcom/ipq8074-hk01.dts stable/12/sys/gnu/dts/arm64/qcom/ipq8074.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-mtp.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8992-bullhead-rev-101.dts stable/12/sys/gnu/dts/arm64/qcom/msm8992-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8992.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8994-angler-rev-101.dts stable/12/sys/gnu/dts/arm64/qcom/msm8994-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8994-smd-rpm.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8994.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/msm8996-mtp.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996-pins.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998-mtp.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8005.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pmi8994.dtsi stable/12/sys/gnu/dts/arm64/qcom/pmi8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pms405.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404-evb-1000.dts stable/12/sys/gnu/dts/arm64/qcom/qcs404-evb-4000.dts 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-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845.dtsi stable/12/sys/gnu/dts/arm64/renesas/cat875.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-cat874.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/renesas/r8a774c0.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/renesas/r8a7795.dtsi 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.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77970-eagle.dts 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-draak.dts 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-kf.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/rk3328-evb.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328-roc-cc.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328-rock64.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3368-evb.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3368-geekbox.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368-lion-haikou.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368-lion.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3368-orion-r68-meta.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368-px5-evb.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368-r88.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3368.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-evb.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-ficus.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-bob.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-chromebook.dtsi 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-gru.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopc-t4.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopi4.dtsi (contents, props changed) stable/12/sys/gnu/dts/arm64/rockchip/rk3399-puma-haikou.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-puma.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rock-pi-4.dts (contents, props changed) stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rock960.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.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399.dtsi stable/12/sys/gnu/dts/arm64/socionext/uniphier-ld11-global.dts 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-ref.dts stable/12/sys/gnu/dts/arm64/socionext/uniphier-pxs3.dtsi stable/12/sys/gnu/dts/arm64/sprd/sc9836.dtsi stable/12/sys/gnu/dts/arm64/sprd/sc9860.dtsi stable/12/sys/gnu/dts/arm64/sprd/whale2.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-wakeup.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/xilinx/zynqmp-zc1751-xm016-dc2.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/include/dt-bindings/arm/ux500_pm_domains.h stable/12/sys/gnu/dts/include/dt-bindings/clock/alphascale,asm9260.h stable/12/sys/gnu/dts/include/dt-bindings/clock/am3.h stable/12/sys/gnu/dts/include/dt-bindings/clock/am4.h stable/12/sys/gnu/dts/include/dt-bindings/clock/at91.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ath79-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/axis,artpec6-clkctrl.h stable/12/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/dm814.h stable/12/sys/gnu/dts/include/dt-bindings/clock/dm816.h stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h stable/12/sys/gnu/dts/include/dt-bindings/clock/exynos4.h stable/12/sys/gnu/dts/include/dt-bindings/clock/exynos5410.h stable/12/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h stable/12/sys/gnu/dts/include/dt-bindings/clock/g12a-aoclkc.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/g12a-clkc.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/hi3516cv300-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hi3519-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hi3620-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hi3660-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hi6220-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hip04-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/histb-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/hix5hd2-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx1-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx21-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx27-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx5-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx7d-clock.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 (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mq-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/jz4725b-cgu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h stable/12/sys/gnu/dts/include/dt-bindings/clock/maxim,max77620.h stable/12/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h stable/12/sys/gnu/dts/include/dt-bindings/clock/meson8b-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/microchip,pic32-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt2701-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt2712-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt6797-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt7622-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8135-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8173-clk.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/oxsemi,ox810se.h stable/12/sys/gnu/dts/include/dt-bindings/clock/oxsemi,ox820.h stable/12/sys/gnu/dts/include/dt-bindings/clock/pistachio-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq8074.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-mdm9615.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8916.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8994.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8996.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8998.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-ipq806x.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-mdm9615.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-msm8960.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8996.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,rpmcc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a73a4-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7740-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7778-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7779-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7790-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7791-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r8a7792-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3036-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3066a-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3128-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3228-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3288-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3328-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3368-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3399-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rv1108-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/s5pv210-audss.h stable/12/sys/gnu/dts/include/dt-bindings/clock/s5pv210.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sh73a0-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sifive-fu540-prci.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/stm32fx-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/stratix10-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun5i-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/vf610-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/zx296702-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/zx296718-clock.h stable/12/sys/gnu/dts/include/dt-bindings/dma/at91.h stable/12/sys/gnu/dts/include/dt-bindings/dma/nbpfaxi.h stable/12/sys/gnu/dts/include/dt-bindings/firmware/imx/rsrc.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/gpio/meson-gxbb-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/gpio/meson-gxl-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/gpio/meson8-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/gpio/meson8b-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/gpio/tegra186-gpio.h stable/12/sys/gnu/dts/include/dt-bindings/i2c/i2c.h stable/12/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h stable/12/sys/gnu/dts/include/dt-bindings/input/ti-drv260x.h stable/12/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq-st.h stable/12/sys/gnu/dts/include/dt-bindings/media/omap3-isp.h stable/12/sys/gnu/dts/include/dt-bindings/media/tvp5150.h stable/12/sys/gnu/dts/include/dt-bindings/memory/mt2701-larb-port.h stable/12/sys/gnu/dts/include/dt-bindings/memory/mt8173-larb-port.h stable/12/sys/gnu/dts/include/dt-bindings/mfd/arizona.h stable/12/sys/gnu/dts/include/dt-bindings/mfd/atmel-flexcom.h stable/12/sys/gnu/dts/include/dt-bindings/mips/lantiq_rcu_gphy.h stable/12/sys/gnu/dts/include/dt-bindings/net/ti-dp83867.h stable/12/sys/gnu/dts/include/dt-bindings/phy/phy-pistachio-usb.h stable/12/sys/gnu/dts/include/dt-bindings/phy/phy.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/am33xx.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/dra.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/mt65xx.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/nomadik.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/stm32-pinfunc.h stable/12/sys/gnu/dts/include/dt-bindings/power/imx7-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/mt2701-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/mt2712-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/mt7622-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/qcom-rpmpd.h (contents, props changed) stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7743-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7745-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7779-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7790-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7791-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7792-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7793-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7794-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7795-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a7796-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a77965-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a77970-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/r8a77995-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/power/tegra186-powergate.h stable/12/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-a10.h stable/12/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-a10sr.h stable/12/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-s10.h stable/12/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr.h stable/12/sys/gnu/dts/include/dt-bindings/reset/imx7-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt2701-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt7622-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt8135-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt8173-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/oxsemi,ox810se.h stable/12/sys/gnu/dts/include/dt-bindings/reset/oxsemi,ox820.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-apq8084.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-ipq806x.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-mdm9615.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8660.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8916.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8960.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8974.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-apq8084.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8960.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8974.h stable/12/sys/gnu/dts/include/dt-bindings/reset/sun5i-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/reset/tegra186-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/ti-syscon.h stable/12/sys/gnu/dts/include/dt-bindings/soc/qcom,gsbi.h stable/12/sys/gnu/dts/include/dt-bindings/soc/zte,pm_domains.h stable/12/sys/gnu/dts/include/dt-bindings/sound/cs42l42.h stable/12/sys/gnu/dts/include/dt-bindings/spmi/spmi.h stable/12/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h stable/12/sys/gnu/dts/include/dt-bindings/thermal/thermal.h Directory Properties: stable/12/ (props changed) stable/12/sys/gnu/dts/arm/am335x-guardian.dts (props changed) stable/12/sys/gnu/dts/arm/am3874-iceboard.dts (props changed) stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts (props changed) stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts (props changed) stable/12/sys/gnu/dts/arm/imx6-logicpd-som.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6dl-yapp4-draco.dts (props changed) stable/12/sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts (props changed) stable/12/sys/gnu/dts/arm/imx6dl-yapp4-ursa.dts (props changed) stable/12/sys/gnu/dts/arm/imx6sll-pinfunc.h (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-pcl063.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-peb-eval-01.dtsi (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin-full.dts (props changed) stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin.dtsi (props changed) stable/12/sys/gnu/dts/arm/lpc4357-myd-lpc4357.dts (props changed) stable/12/sys/gnu/dts/arm/milbeaut-m10v-evb.dts (props changed) stable/12/sys/gnu/dts/arm/milbeaut-m10v.dtsi (props changed) stable/12/sys/gnu/dts/arm/socfpga_cyclone5_chameleon96.dts (props changed) stable/12/sys/gnu/dts/arm64/arm/fvp-base-revc.dts (props changed) stable/12/sys/gnu/dts/arm64/arm/rtsm_ve-motherboard-rs2.dtsi (props changed) stable/12/sys/gnu/dts/arm64/broadcom/bcm2837-rpi-3-a-plus.dts (props changed) stable/12/sys/gnu/dts/arm64/marvell/armada-3720-uDPU.dts (props changed) stable/12/sys/gnu/dts/arm64/nvidia/tegra210-p2894-0050-a08.dts (props changed) stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-ek874.dts (props changed) stable/12/sys/gnu/dts/arm64/rockchip/rk3399-nanopi-m4.dts (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clk/lochnagar.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/clock/actions,s500-cmu.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/iio/adc/ingenic,adc.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,sdm845.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/mfd/st,stpmic1.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/lochnagar.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/power/xlnx-zynqmp-power.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-reset.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/g12a-aoclkc.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/imx8mq-reset.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/reset/xlnx-zynqmp-resets.h (props changed) stable/12/sys/gnu/dts/include/dt-bindings/soc/bcm2835-pm.h (props changed) Modified: stable/12/sys/gnu/dts/arm/aks-cdu.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/aks-cdu.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/aks-cdu.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,10 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * aks-cdu.dts - Device Tree file for AK signal CDU * * Copyright (C) 2012 AK signal Brno a.s. * 2012 Jiri Prchal - * - * Licensed under GPLv2 or later. */ /dts-v1/; Modified: stable/12/sys/gnu/dts/arm/am335x-baltos-ir2110.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos-ir2110.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-baltos-ir2110.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -23,16 +20,22 @@ &am33xx_pinmux { uart1_pins: pinmux_uart1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ - AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ - AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ - AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ - AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ - AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ - AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ >; }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT, MUX_MODE7) /* MMC1 CD */ + >; + }; }; &uart1 { @@ -68,7 +71,13 @@ }; &cpsw_emac1 { - phy-mode = "rgmii-txid"; + phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; phy-handle = <&phy1>; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; Modified: stable/12/sys/gnu/dts/arm/am335x-baltos-ir3220.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos-ir3220.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-baltos-ir3220.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -23,37 +20,43 @@ &am33xx_pinmux { tca6416_pins: pinmux_tca6416_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ >; }; uart1_pins: pinmux_uart1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ - AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ - AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ - AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ - AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ - AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ - AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ >; }; uart2_pins: pinmux_uart2_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ - AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ - AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ - AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ - AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ - AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ - AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ - AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ + AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT, MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ + AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT, MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLDOWN, MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ - AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ + AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT_PULLUP, MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ >; }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT, MUX_MODE7) /* MMC1 CD */ + >; + }; }; &uart1 { @@ -110,7 +113,13 @@ }; &cpsw_emac1 { - phy-mode = "rgmii-txid"; + phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; phy-handle = <&phy1>; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio2 18 GPIO_ACTIVE_LOW>; }; Modified: stable/12/sys/gnu/dts/arm/am335x-baltos-ir5221.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos-ir5221.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-baltos-ir5221.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -23,46 +20,51 @@ &am33xx_pinmux { tca6416_pins: pinmux_tca6416_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */ >; }; dcan1_pins: pinmux_dcan1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x968, PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.dcan1_tx_mux0 */ - AM33XX_IOPAD(0x96c, PIN_INPUT | MUX_MODE2) /* uart0_rtsn.dcan1_rx_mux0 */ + AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* uart0_ctsn.dcan1_tx_mux0 */ + AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT, MUX_MODE2) /* uart0_rtsn.dcan1_rx_mux0 */ >; }; uart1_pins: pinmux_uart1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* uart1_rxd */ - AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0) /* uart1_txd */ - AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn */ - AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ - AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ - AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ - AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* lcd_vsync.gpio2[22] DTR */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_hsync.gpio2[23] DSR */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_pclk.gpio2[24] DCD */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* lcd_ac_bias_en.gpio2[25] RI */ >; }; uart2_pins: pinmux_uart2_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ - AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ - AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ - AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ - AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ - AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ - AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ - AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ + AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT, MUX_MODE1) /* spi0_sclk.uart2_rxd_mux3 */ + AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT, MUX_MODE1) /* spi0_d0.uart2_txd_mux3 */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLDOWN, MUX_MODE2) /* i2c0_sda.uart2_ctsn_mux0 */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* i2c0_scl.uart2_rtsn_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad12.gpio1[12] DTR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad13.gpio1[13] DSR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad14.gpio1[14] DCD */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad15.gpio1[15] RI */ - AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ + AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT_PULLUP, MUX_MODE7) /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */ >; }; + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT, MUX_MODE7) /* MMC1 CD */ + >; + }; }; &uart1 { @@ -128,7 +130,7 @@ }; &cpsw_emac1 { - phy-mode = "rgmii-txid"; + phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; phy-handle = <&phy1>; }; @@ -138,4 +140,10 @@ pinctrl-0 = <&dcan1_pins>; status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio2 18 GPIO_ACTIVE_LOW>; }; Modified: stable/12/sys/gnu/dts/arm/am335x-baltos-leds.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos-leds.dtsi Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-baltos-leds.dtsi Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -42,9 +39,9 @@ &am33xx_pinmux { user_leds: pinmux_user_leds { pinctrl-single,pins = < - AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_col.gpio3_0 PWR LED */ - AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txd3.gpio0_16 WLAN LED */ - AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txd2.gpio0_17 APP LED */ + AM33XX_PADCONF(AM335X_PIN_MII1_COL, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mii1_col.gpio3_0 PWR LED */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mii1_txd3.gpio0_16 WLAN LED */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mii1_txd2.gpio0_17 APP LED */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-baltos.dtsi Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -53,130 +50,130 @@ &am33xx_pinmux { mmc2_pins: pinmux_mmc2_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0_mux0 */ - AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1_mux0 */ - AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2_mux0 */ - AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3_mux0 */ - AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk_mux0 */ - AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd_mux0 */ - AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLUP | MUX_MODE7) /* emu0.gpio3[7] */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD8, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_ad8.mmc1_dat0_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD9, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_ad9.mmc1_dat1_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_ad10.mmc1_dat2_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_ad11.mmc1_dat3_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN1, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn1.mmc1_clk_mux0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN2, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn2.mmc1_cmd_mux0 */ + AM33XX_PADCONF(AM335X_PIN_EMU0, PIN_INPUT_PULLUP, MUX_MODE7) /* emu0.gpio3[7] */ >; }; wl12xx_gpio: pinmux_wl12xx_gpio { pinctrl-single,pins = < - AM33XX_IOPAD(0x9e8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* emu1.gpio3[8] */ + AM33XX_PADCONF(AM335X_PIN_EMU1, PIN_OUTPUT_PULLUP, MUX_MODE7) /* emu1.gpio3[8] */ >; }; tps65910_pins: pinmux_tps65910_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ben1.gpio1[28] */ + AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_INPUT_PULLUP, MUX_MODE7) /* gpmc_ben1.gpio1[28] */ >; }; i2c1_pins: pinmux_i2c1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE2) /* spi0_d1.i2c1_sda_mux3 */ - AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE2) /* spi0_cs0.i2c1_scl_mux3 */ + AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT, MUX_MODE2) /* spi0_d1.i2c1_sda_mux3 */ + AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT, MUX_MODE2) /* spi0_cs0.i2c1_scl_mux3 */ >; }; uart0_pins: pinmux_uart0_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ - AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) >; }; cpsw_default: cpsw_default { pinctrl-single,pins = < /* Slave 1 */ - AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ - AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_tx_en.rmii1_txen */ - AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ - AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ - AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */ + AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* mii1_tx_en.rmii1_txen */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */ /* Slave 2 */ - AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ - AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ - AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ - AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ - AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ - AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ - AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ - AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ - AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ - AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ - AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ - AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A3, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A4, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A9, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_INPUT_PULLDOWN, MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ >; }; cpsw_sleep: cpsw_sleep { pinctrl-single,pins = < /* Slave 1 reset value */ - AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* Slave 2 reset value*/ - AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A3, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A4, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A9, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_INPUT_PULLDOWN, MUX_MODE7) >; }; davinci_mdio_default: davinci_mdio_default { pinctrl-single,pins = < /* MDIO */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ - AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) /* mdio_clk.mdio_clk */ >; }; davinci_mdio_sleep: davinci_mdio_sleep { pinctrl-single,pins = < /* MDIO reset value */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) >; }; nandflash_pins_s0: nandflash_pins_s0 { pinctrl-single,pins = < - AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ - AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ - AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ - AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ - AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ - AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ - AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ - AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ - AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ - AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ - AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ - AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ - AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ - AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ - AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD0, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD1, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD2, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD3, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD4, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD5, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD6, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD7, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_INPUT_PULLUP, MUX_MODE7) /* gpmc_wpn.gpio0_30 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_OUTPUT, MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_OUTPUT, MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT, MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ + AM33XX_PADCONF(AM335X_PIN_GPMC_WEN, PIN_OUTPUT, MUX_MODE0) /* gpmc_wen.gpmc_wen */ + AM33XX_PADCONF(AM335X_PIN_GPMC_BEN0_CLE, PIN_OUTPUT, MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-base0033.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-base0033.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-base0033.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,11 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * am335x-base0033.dts - Device Tree file for IGEP AQUILA EXPANSION * * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include "am335x-igep0033.dtsi" @@ -46,39 +43,39 @@ &am33xx_pinmux { nxp_hdmi_pins: pinmux_nxp_hdmi_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ - AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0 */ - AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1 */ - AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2 */ - AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3 */ - AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4 */ - AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5 */ - AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6 */ - AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7 */ - AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8 */ - AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9 */ - AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10 */ - AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11 */ - AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12 */ - AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13 */ - AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14 */ - AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15 */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0) /* lcd_vsync */ - AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0) /* lcd_hsync */ - AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0) /* lcd_pclk */ - AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT, MUX_MODE3) /* xdma_event_intr0.clkout1 */ + AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT, MUX_MODE0) >; }; nxp_hdmi_off_pins: pinmux_nxp_hdmi_off_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT, MUX_MODE3) /* xdma_event_intr0.clkout1 */ >; }; leds_base_pins: pinmux_leds_base_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ - AM33XX_IOPAD(0x888, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn3.gpio2_0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_csn3.gpio2_0 */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-bone-common.dtsi Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ / { @@ -71,118 +68,118 @@ user_leds_s0: user_leds_s0 { pinctrl-single,pins = < - AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ - AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ - AM33XX_IOPAD(0x85c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ - AM33XX_IOPAD(0x860, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a6.gpio1_22 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a8.gpio1_24 */ >; }; i2c0_pins: pinmux_i2c0_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ - AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_scl.i2c0_scl */ >; }; i2c2_pins: pinmux_i2c2_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */ - AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */ + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* uart1_ctsn.i2c2_sda */ + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* uart1_rtsn.i2c2_scl */ >; }; uart0_pins: pinmux_uart0_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ - AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) >; }; clkout2_pin: pinmux_clkout2_pin { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_OUTPUT_PULLDOWN, MUX_MODE3) /* xdma_event_intr1.clkout2 */ >; }; cpsw_default: cpsw_default { pinctrl-single,pins = < /* Slave 1 */ - AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ - AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ - AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ - AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ - AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ - AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ - AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ - AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ - AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ - AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ - AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ - AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ + AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLUP, MUX_MODE0) >; }; cpsw_sleep: cpsw_sleep { pinctrl-single,pins = < /* Slave 1 reset value */ - AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) >; }; davinci_mdio_default: davinci_mdio_default { pinctrl-single,pins = < /* MDIO */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ - AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) >; }; davinci_mdio_sleep: davinci_mdio_sleep { pinctrl-single,pins = < /* MDIO reset value */ - AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) - AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) >; }; mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spio0_cs1.gpio0_6 */ - AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */ - AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */ - AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */ - AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */ - AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */ - AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */ + AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7) /* spio0_cs1.gpio0_6 */ + AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0) >; }; emmc_pins: pinmux_emmc_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ - AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ - AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ - AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ - AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ - AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ - AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ - AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ - AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ - AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN1, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN2, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD0, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD1, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD2, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD3, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD4, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD5, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD6, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD7, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-bone.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-bone.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-bone.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /dts-v1/; Modified: stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include @@ -30,43 +27,43 @@ &am33xx_pinmux { nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ - AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */ - AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */ - AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */ - AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */ - AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */ - AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */ - AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */ - AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */ - AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */ - AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */ - AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */ - AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */ - AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */ - AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */ - AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */ - AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */ - AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */ - AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */ - AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */ - AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) >; }; nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3) >; }; mcasp0_pins: mcasp0_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */ - AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/ - AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */ - AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */ - AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */ + AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_INPUT_PULLUP, MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */ + AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/ + AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a11.GPIO1_27 */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-boneblack-wireless.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblack-wireless.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-boneblack-wireless.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /dts-v1/; @@ -32,35 +29,35 @@ &am33xx_pinmux { bt_pins: pinmux_bt_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_txd0.gpio0_28 - BT_EN */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gmii1_txd0.gpio0_28 - BT_EN */ >; }; mmc3_pins: pinmux_mmc3_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE6 ) /* (L15) gmii1_rxd1.mmc2_clk */ - AM33XX_IOPAD(0x914, PIN_INPUT_PULLUP | MUX_MODE6 ) /* (J16) gmii1_txen.mmc2_cmd */ - AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (J17) gmii1_rxdv.mmc2_dat0 */ - AM33XX_IOPAD(0x91c, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (J18) gmii1_txd3.mmc2_dat1 */ - AM33XX_IOPAD(0x920, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (K15) gmii1_txd2.mmc2_dat2 */ - AM33XX_IOPAD(0x908, PIN_INPUT_PULLUP | MUX_MODE5 ) /* (H16) gmii1_col.mmc2_dat3 */ + AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLUP, MUX_MODE6 ) /* (L15) gmii1_rxd1.mmc2_clk */ + AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLUP, MUX_MODE6 ) /* (J16) gmii1_txen.mmc2_cmd */ + AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (J17) gmii1_rxdv.mmc2_dat0 */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (J18) gmii1_txd3.mmc2_dat1 */ + AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (K15) gmii1_txd2.mmc2_dat2 */ + AM33XX_PADCONF(AM335X_PIN_MII1_COL, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (H16) gmii1_col.mmc2_dat3 */ >; }; uart3_pins: pinmux_uart3_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* gmii1_rxd3.uart3_rxd */ - AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gmii1_rxd2.uart3_txd */ - AM33XX_IOPAD(0x948, PIN_INPUT | MUX_MODE3) /* mdio_data.uart3_ctsn */ - AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mdio_clk.uart3_rtsn */ + AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLUP, MUX_MODE1) /* gmii1_rxd3.uart3_rxd */ + AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* gmii1_rxd2.uart3_txd */ + AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT, MUX_MODE3) /* mdio_data.uart3_ctsn */ + AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLDOWN, MUX_MODE3) /* mdio_clk.uart3_rtsn */ >; }; wl18xx_pins: pinmux_wl18xx_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */ - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) /* rmii1_refclk.gpio0_29 WL_IRQ */ - AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_rxclk.gpio3_10 LS_BUF_EN */ + AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */ + AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* rmii1_refclk.gpio0_29 WL_IRQ */ + AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gmii1_rxclk.gpio3_10 LS_BUF_EN */ >; }; }; Modified: stable/12/sys/gnu/dts/arm/am335x-boneblack.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblack.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-boneblack.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /dts-v1/; Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Thu Nov 28 18:02:13 2019 (r355179) +++ stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Thu Nov 28 18:15:05 2019 (r355180) @@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /dts-v1/; @@ -130,135 +127,135 @@ &am33xx_pinmux { user_leds_s0: user_leds_s0 { pinctrl-single,pins = < - AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7) /* (V15) gpmc_a5.gpio1[21] - USR_LED_0 */ - AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7) /* (U15) gpmc_a6.gpio1[22] - USR_LED_1 */ - AM33XX_IOPAD(0x85c, PIN_OUTPUT | MUX_MODE7) /* (T15) gpmc_a7.gpio1[23] - USR_LED_2 */ - AM33XX_IOPAD(0x860, PIN_OUTPUT | MUX_MODE7) /* (V16) gpmc_a8.gpio1[24] - USR_LED_3 */ - AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE7) /* (A15) xdma_event_intr0.gpio0[19] - WIFI_LED */ - AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE7) /* (R7) gpmc_advn_ale.gpio2[2] - P8.7, LED_RED, GP1_PIN_5 */ - AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE7) /* (T7) gpmc_oen_ren.gpio2[3] - P8.8, LED_GREEN, GP1_PIN_6 */ - AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE7) /* (U12) gpmc_ad11.gpio0[27] - P8.17, BATT_LED_1 */ - AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE7) /* (T5) lcd_data15.gpio0[11] - P8.32, BATT_LED_2 */ - AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE7) /* (V6) gpmc_csn0.gpio1[29] - P8.26, BATT_LED_3 */ - AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE7) /* (T11) gpmc_ad10.gpio0[26] - P8.14, BATT_LED_4 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT, MUX_MODE7) /* (V15) gpmc_a5.gpio1[21] - USR_LED_0 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT, MUX_MODE7) /* (U15) gpmc_a6.gpio1[22] - USR_LED_1 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT, MUX_MODE7) /* (T15) gpmc_a7.gpio1[23] - USR_LED_2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT, MUX_MODE7) /* (V16) gpmc_a8.gpio1[24] - USR_LED_3 */ + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT, MUX_MODE7) /* (A15) xdma_event_intr0.gpio0[19] - WIFI_LED */ + AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_OUTPUT, MUX_MODE7) /* (R7) gpmc_advn_ale.gpio2[2] - P8.7, LED_RED, GP1_PIN_5 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT, MUX_MODE7) /* (T7) gpmc_oen_ren.gpio2[3] - P8.8, LED_GREEN, GP1_PIN_6 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_OUTPUT, MUX_MODE7) /* (U12) gpmc_ad11.gpio0[27] - P8.17, BATT_LED_1 */ + AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE7) /* (T5) lcd_data15.gpio0[11] - P8.32, BATT_LED_2 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_OUTPUT, MUX_MODE7) /* (V6) gpmc_csn0.gpio1[29] - P8.26, BATT_LED_3 */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_OUTPUT, MUX_MODE7) /* (T11) gpmc_ad10.gpio0[26] - P8.14, BATT_LED_4 */ >; }; i2c0_pins: pinmux_i2c0_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ - AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ >; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Nov 28 18:18:11 2019 Return-Path: Delivered-To: svn-src-stable@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 856081B1E0C; Thu, 28 Nov 2019 18:18:11 +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) server-signature RSA-PSS (4096 bits) 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 47P5VC30ZRz3Ny5; Thu, 28 Nov 2019 18:18:11 +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 4576C1AAC; Thu, 28 Nov 2019 18:18:11 +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 xASIIBGM086493; Thu, 28 Nov 2019 18:18:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASIIB69086492; Thu, 28 Nov 2019 18:18:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281818.xASIIB69086492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 18:18:11 +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: r355181 - 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: 355181 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 18:18:11 -0000 Author: manu Date: Thu Nov 28 18:18:10 2019 New Revision: 355181 URL: https://svnweb.freebsd.org/changeset/base/355181 Log: MFC r353354: dwmmc: Reset the dma controller at attach If the bootloader enabled DMA we need to fully reset the DMA controller otherwise we might have some stale data in it that provoke weird behavior. Modified: stable/12/sys/dev/mmc/host/dwmmc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mmc/host/dwmmc.c ============================================================================== --- stable/12/sys/dev/mmc/host/dwmmc.c Thu Nov 28 18:15:05 2019 (r355180) +++ stable/12/sys/dev/mmc/host/dwmmc.c Thu Nov 28 18:18:10 2019 (r355181) @@ -559,6 +559,7 @@ dwmmc_attach(device_t dev) } if (!sc->use_pio) { + dma_stop(sc); if (dma_setup(sc)) return (ENXIO); From owner-svn-src-stable@freebsd.org Thu Nov 28 18:44:08 2019 Return-Path: Delivered-To: svn-src-stable@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 5B9CD1B3158; Thu, 28 Nov 2019 18:44: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) server-signature RSA-PSS (4096 bits) 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 47P6481bK4z3Qsm; Thu, 28 Nov 2019 18:44: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 01254200C; Thu, 28 Nov 2019 18:44: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 xASIi752003991; Thu, 28 Nov 2019 18:44:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASIi6rE003983; Thu, 28 Nov 2019 18:44:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281844.xASIi6rE003983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 18:44: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: r355183 - in stable/12/sys: arm/allwinner arm64/rockchip dev/extres/regulator X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner arm64/rockchip dev/extres/regulator X-SVN-Commit-Revision: 355183 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 18:44:08 -0000 Author: manu Date: Thu Nov 28 18:44:06 2019 New Revision: 355183 URL: https://svnweb.freebsd.org/changeset/base/355183 Log: MFC r353917-r353919, r354396-r354397 r353917: regulator: Add a regnode_method_init This is a default init method for regulator that don't really need one. r353918: axp81x: Use the default regnode_init method r353919: regulator: Add a regnode_set_constraint function This method check that boot_on or always_on is set to 1 and if it is it will try to enable the regulator. The binding docs aren't clear on what to do but Linux enable the regulator if any of those properties is set so we want to do the same. The function first check the status to see if the regulator is already enabled it then get the voltage to check if it is in a acceptable range and then enables it. This will be either called from the regnode_init method (if it's needed by the platform) or by a SYSINIT at SI_SUB_LAST Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D22106 r354396: regulator: Add regulator_check_voltage function This function will call the regnode_check_voltage method for a given regulator and check if the desired voltage in reachable by it. Also adds a default method that check the std_param and which should be enough for most regulators and add it as the method for axp* rk805 and fixed regulators. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D22260 r354397: arm: allwinner: aw_mmc: Check if the regulator support the voltage Don't blindy say that we support both 3.3V and 1.8V. If we have a regulator for the data lines, check that the voltage is supported before adding the signaling caps. If we don't have a regulator, just assume that the data lines are 3.3V This unbreak eMMC on some allwinner boards. Reported by: ganbold X-MFC-With: r354396 Modified: stable/12/sys/arm/allwinner/aw_mmc.c stable/12/sys/arm/allwinner/axp209.c stable/12/sys/arm/allwinner/axp81x.c stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/dev/extres/regulator/regnode_if.m stable/12/sys/dev/extres/regulator/regulator.c stable/12/sys/dev/extres/regulator/regulator.h stable/12/sys/dev/extres/regulator/regulator_fixed.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_mmc.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_mmc.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/arm/allwinner/aw_mmc.c Thu Nov 28 18:44:06 2019 (r355183) @@ -509,7 +509,13 @@ aw_mmc_attach(device_t dev) MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 | MMC_CAP_MMC_DDR52; - sc->aw_host.caps |= MMC_CAP_SIGNALING_330 | MMC_CAP_SIGNALING_180; + 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; Modified: stable/12/sys/arm/allwinner/axp209.c ============================================================================== --- stable/12/sys/arm/allwinner/axp209.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/arm/allwinner/axp209.c Thu Nov 28 18:44:06 2019 (r355183) @@ -753,6 +753,7 @@ static regnode_method_t axp2xx_regnode_methods[] = { REGNODEMETHOD(regnode_enable, axp2xx_regnode_enable), REGNODEMETHOD(regnode_set_voltage, axp2xx_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, axp2xx_regnode_get_voltage), + REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; DEFINE_CLASS_1(axp2xx_regnode, axp2xx_regnode_class, axp2xx_regnode_methods, Modified: stable/12/sys/arm/allwinner/axp81x.c ============================================================================== --- stable/12/sys/arm/allwinner/axp81x.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/arm/allwinner/axp81x.c Thu Nov 28 18:44:06 2019 (r355183) @@ -747,12 +747,6 @@ axp8xx_write(device_t dev, uint8_t reg, uint8_t val) } static int -axp8xx_regnode_init(struct regnode *regnode) -{ - return (0); -} - -static int axp8xx_regnode_enable(struct regnode *regnode, bool enable, int *udelay) { struct axp8xx_reg_sc *sc; @@ -869,10 +863,10 @@ 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), + REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; DEFINE_CLASS_1(axp8xx_regnode, axp8xx_regnode_class, axp8xx_regnode_methods, Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/arm64/rockchip/rk805.c Thu Nov 28 18:44:06 2019 (r355183) @@ -362,6 +362,7 @@ static regnode_method_t rk805_regnode_methods[] = { REGNODEMETHOD(regnode_enable, rk805_regnode_enable), REGNODEMETHOD(regnode_set_voltage, rk805_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, rk805_regnode_get_voltage), + REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; DEFINE_CLASS_1(rk805_regnode, rk805_regnode_class, rk805_regnode_methods, Modified: stable/12/sys/dev/extres/regulator/regnode_if.m ============================================================================== --- stable/12/sys/dev/extres/regulator/regnode_if.m Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/dev/extres/regulator/regnode_if.m Thu Nov 28 18:44:06 2019 (r355183) @@ -91,6 +91,15 @@ METHOD int get_voltage { }; # +# Check if a given voltage is supported by the regulator +# Returns 0 on success or a standard errno value. +# +METHOD int check_voltage { + struct regnode *regnode; + int uvolt; +}; + +# # Stop (shutdown) regulator # Returns 0 on success or a standard errno value. # Modified: stable/12/sys/dev/extres/regulator/regulator.c ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/dev/extres/regulator/regulator.c Thu Nov 28 18:44:06 2019 (r355183) @@ -65,22 +65,26 @@ typedef TAILQ_HEAD(regnode_list, regnode) regnode_list typedef TAILQ_HEAD(regulator_list, regulator) regulator_list_t; /* Default regulator methods. */ +static int regnode_method_init(struct regnode *regnode); static int regnode_method_enable(struct regnode *regnode, bool enable, int *udelay); static int regnode_method_status(struct regnode *regnode, int *status); static int regnode_method_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay); static int regnode_method_get_voltage(struct regnode *regnode, int *uvolt); +static void regulator_constraint(void *dummy); static void regulator_shutdown(void *dummy); /* * Regulator controller methods. */ static regnode_method_t regnode_methods[] = { + REGNODEMETHOD(regnode_init, regnode_method_init), REGNODEMETHOD(regnode_enable, regnode_method_enable), REGNODEMETHOD(regnode_status, regnode_method_status), REGNODEMETHOD(regnode_set_voltage, regnode_method_set_voltage), REGNODEMETHOD(regnode_get_voltage, regnode_method_get_voltage), + REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; @@ -152,9 +156,27 @@ SX_SYSINIT(regulator_topology, ®node_topo_lock, "Re #define REGNODE_XLOCK(_sc) sx_xlock(&((_sc)->lock)) #define REGNODE_UNLOCK(_sc) sx_unlock(&((_sc)->lock)) +SYSINIT(regulator_constraint, SI_SUB_LAST, SI_ORDER_ANY, regulator_constraint, + NULL); SYSINIT(regulator_shutdown, SI_SUB_LAST, SI_ORDER_ANY, regulator_shutdown, NULL); +static void +regulator_constraint(void *dummy) +{ + struct regnode *entry; + int rv; + + REG_TOPO_SLOCK(); + TAILQ_FOREACH(entry, ®node_list, reglist_link) { + rv = regnode_set_constraint(entry); + if (rv != 0 && bootverbose) + printf("regulator: setting constraint on %s failed (%d)\n", + entry->name, rv); + } + REG_TOPO_UNLOCK(); +} + /* * Disable unused regulator * We run this function at SI_SUB_LAST which mean that every driver that needs @@ -213,6 +235,13 @@ regnode_uvolt_sysctl(SYSCTL_HANDLER_ARGS) * */ static int +regnode_method_init(struct regnode *regnode) +{ + + return (0); +} + +static int regnode_method_enable(struct regnode *regnode, bool enable, int *udelay) { @@ -250,6 +279,16 @@ regnode_method_get_voltage(struct regnode *regnode, in (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2); } +int +regnode_method_check_voltage(struct regnode *regnode, int uvolt) +{ + + if ((uvolt > regnode->std_param.max_uvolt) || + (uvolt < regnode->std_param.min_uvolt)) + return (ERANGE); + return (0); +} + /* ---------------------------------------------------------------------------- * * Internal functions. @@ -771,6 +810,56 @@ regnode_set_voltage_checked(struct regnode *regnode, s return (rv); } +int +regnode_set_constraint(struct regnode *regnode) +{ + int status, rv, uvolt; + + if (regnode->std_param.boot_on != true && + regnode->std_param.always_on != true) + return (0); + + rv = regnode_status(regnode, &status); + if (rv != 0) { + if (bootverbose) + printf("Cannot get regulator status for %s\n", + regnode_get_name(regnode)); + return (rv); + } + + if (status == REGULATOR_STATUS_ENABLED) + return (0); + + rv = regnode_get_voltage(regnode, &uvolt); + if (rv != 0) { + if (bootverbose) + printf("Cannot get regulator voltage for %s\n", + regnode_get_name(regnode)); + return (rv); + } + + if (uvolt < regnode->std_param.min_uvolt || + uvolt > regnode->std_param.max_uvolt) { + if (bootverbose) + printf("Regulator %s current voltage %d is not in the" + " acceptable range : %d<->%d\n", + regnode_get_name(regnode), + uvolt, regnode->std_param.min_uvolt, + regnode->std_param.max_uvolt); + return (ERANGE); + } + + rv = regnode_enable(regnode); + if (rv != 0) { + if (bootverbose) + printf("Cannot enable regulator %s\n", + regnode_get_name(regnode)); + return (rv); + } + + return (0); +} + #ifdef FDT phandle_t regnode_get_ofw_node(struct regnode *regnode) @@ -913,6 +1002,22 @@ regulator_set_voltage(regulator_t reg, int min_uvolt, reg->min_uvolt = min_uvolt; reg->max_uvolt = max_uvolt; } + REG_TOPO_UNLOCK(); + return (rv); +} + +int +regulator_check_voltage(regulator_t reg, int uvolt) +{ + int rv; + struct regnode *regnode; + + regnode = reg->regnode; + KASSERT(regnode->ref_cnt > 0, + ("Attempt to access unreferenced regulator: %s\n", regnode->name)); + + REG_TOPO_SLOCK(); + rv = REGNODE_CHECK_VOLTAGE(regnode, uvolt); REG_TOPO_UNLOCK(); return (rv); } Modified: stable/12/sys/dev/extres/regulator/regulator.h ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator.h Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/dev/extres/regulator/regulator.h Thu Nov 28 18:44:06 2019 (r355183) @@ -116,6 +116,11 @@ int regnode_stop(struct regnode *regnode, int depth); int regnode_status(struct regnode *regnode, int *status); int regnode_get_voltage(struct regnode *regnode, int *uvolt); int regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt); +int regnode_set_constraint(struct regnode *regnode); + +/* Standard method that aren't default */ +int regnode_method_check_voltage(struct regnode *regnode, int uvolt); + #ifdef FDT phandle_t regnode_get_ofw_node(struct regnode *regnode); #endif @@ -133,6 +138,7 @@ int regulator_stop(regulator_t reg); int regulator_status(regulator_t reg, int *status); int regulator_get_voltage(regulator_t reg, int *uvolt); int regulator_set_voltage(regulator_t reg, int min_uvolt, int max_uvolt); +int regulator_check_voltage(regulator_t reg, int uvolt); #ifdef FDT int regulator_get_by_ofw_property(device_t dev, phandle_t node, char *name, Modified: stable/12/sys/dev/extres/regulator/regulator_fixed.c ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator_fixed.c Thu Nov 28 18:28:35 2019 (r355182) +++ stable/12/sys/dev/extres/regulator/regulator_fixed.c Thu Nov 28 18:44:06 2019 (r355183) @@ -80,6 +80,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_check_voltage, regnode_method_check_voltage), REGNODEMETHOD_END }; DEFINE_CLASS_1(regnode_fixed, regnode_fixed_class, regnode_fixed_methods, From owner-svn-src-stable@freebsd.org Thu Nov 28 18:50:33 2019 Return-Path: Delivered-To: svn-src-stable@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 E949C1B364C; Thu, 28 Nov 2019 18:50: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) server-signature RSA-PSS (4096 bits) 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 47P6CY5whRz3RFg; Thu, 28 Nov 2019 18:50:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF87B2015; Thu, 28 Nov 2019 18:50:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xASIoXbf004338; Thu, 28 Nov 2019 18:50:33 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASIoXGv004337; Thu, 28 Nov 2019 18:50:33 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911281850.xASIoXGv004337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 28 Nov 2019 18:50:33 +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: r355184 - stable/12/lib/libpmc X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/lib/libpmc X-SVN-Commit-Revision: 355184 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 18:50:34 -0000 Author: manu Date: Thu Nov 28 18:50:33 2019 New Revision: 355184 URL: https://svnweb.freebsd.org/changeset/base/355184 Log: MFC r354549-r354550 r354549: libpmc: Match on the cpuid with a regex The CPUID is, or can be, a regex to be matched. Use regex from libc instead of strcmp Tested-by: gallatin r354550: libpmc: Forgot regex.h Reported by: ci X-MFC-With: r354549 Modified: stable/12/lib/libpmc/libpmc_pmu_util.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- stable/12/lib/libpmc/libpmc_pmu_util.c Thu Nov 28 18:44:06 2019 (r355183) +++ stable/12/lib/libpmc/libpmc_pmu_util.c Thu Nov 28 18:50:33 2019 (r355184) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -165,8 +166,11 @@ struct pmu_event_desc { static const struct pmu_events_map * pmu_events_map_get(const char *cpuid) { - size_t s; + regex_t re; + regmatch_t pmatch[1]; + size_t s, len; char buf[64]; + int match; const struct pmu_events_map *pme; if (cpuid != NULL) { @@ -179,9 +183,20 @@ pmu_events_map_get(const char *cpuid) (void *)NULL, 0) == -1) return (NULL); } - for (pme = pmu_events_map; pme->cpuid != NULL; pme++) - if (strcmp(buf, pme->cpuid) == 0) - return (pme); + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) { + if (regcomp(&re, pme->cpuid, REG_EXTENDED) != 0) { + printf("regex '%s' failed to compile, ignoring\n", + pme->cpuid); + continue; + } + match = regexec(&re, buf, 1, pmatch, 0); + regfree(&re); + if (match == 0) { + len = pmatch[0].rm_eo - pmatch[0].rm_so; + if(len == strlen(buf)) + return (pme); + } + } return (NULL); } From owner-svn-src-stable@freebsd.org Thu Nov 28 20:09:21 2019 Return-Path: Delivered-To: svn-src-stable@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 29DA11B5AB5; Thu, 28 Nov 2019 20:09:21 +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) server-signature RSA-PSS (4096 bits) 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 47P7yT0PBrz41cW; Thu, 28 Nov 2019 20:09:21 +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 E50EA2E55; Thu, 28 Nov 2019 20:09:20 +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 xASK9Kww051836; Thu, 28 Nov 2019 20:09:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASK9KED051835; Thu, 28 Nov 2019 20:09:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201911282009.xASK9KED051835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 28 Nov 2019 20:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355189 - in stable: 11/lib/clang/libclang 11/lib/clang/libllvm 12/lib/clang/libclang 12/lib/clang/libllvm X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/clang/libclang 11/lib/clang/libllvm 12/lib/clang/libclang 12/lib/clang/libllvm X-SVN-Commit-Revision: 355189 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 20:09:21 -0000 Author: dim Date: Thu Nov 28 20:09:19 2019 New Revision: 355189 URL: https://svnweb.freebsd.org/changeset/base/355189 Log: MFC r354908: Add explanatory comments for the different SRCS_xxx variables used in the Makefiles for libllvm and libclang. While here, cleanup a commented out SRCS entry in libllvmminimal's Makefile. Modified: stable/11/lib/clang/libclang/Makefile stable/11/lib/clang/libllvm/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/clang/libclang/Makefile stable/12/lib/clang/libllvm/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/clang/libclang/Makefile ============================================================================== --- stable/11/lib/clang/libclang/Makefile Thu Nov 28 19:38:57 2019 (r355188) +++ stable/11/lib/clang/libclang/Makefile Thu Nov 28 20:09:19 2019 (r355189) @@ -20,6 +20,12 @@ CXXFLAGS.Module.cpp+= -fpermissive SRCDIR= tools/clang/lib +# Explanation of different SRCS variants below: +# SRCS_MIN: always required, even for bootstrap +# SRCS_EXT: required for MK_CLANG_EXTRAS +# SRCS_FUL: required for MK_CLANG_FULL +# SRCS_LDB: required for MK_LLDB + SRCS_FUL+= ARCMigrate/ARCMT.cpp SRCS_FUL+= ARCMigrate/ARCMTActions.cpp SRCS_FUL+= ARCMigrate/FileRemapper.cpp Modified: stable/11/lib/clang/libllvm/Makefile ============================================================================== --- stable/11/lib/clang/libllvm/Makefile Thu Nov 28 19:38:57 2019 (r355188) +++ stable/11/lib/clang/libllvm/Makefile Thu Nov 28 20:09:19 2019 (r355189) @@ -26,6 +26,17 @@ CFLAGS+= -I${LLVM_SRCS}/lib/Target/${arch} SRCDIR= lib +# Explanation of different SRCS variants below: +# SRCS_MIN: always required, even for bootstrap +# SRCS_MIW: required for world stage (after cross-tools) +# SRCS_EXT: required for MK_CLANG_EXTRAS +# SRCS_EXL: required for MK_CLANG_EXTRAS and MK_LLD +# SRCS_FUL: required for MK_CLANG_FULL +# SRCS_LLD: required for MK_LLD +# SRCS_XDB: required for MK_CLANG_EXTRAS and MK_LLDB +# SRCS_XDL: required for MK_CLANG_EXTRAS, MK_LLD and MK_LLDB +# SRCS_XDW: required for MK_CLANG_EXTRAS and MK_LLDB in world stage + SRCS_MIN+= Analysis/AliasAnalysis.cpp SRCS_MIN+= Analysis/AliasAnalysisEvaluator.cpp SRCS_MIN+= Analysis/AliasAnalysisSummary.cpp From owner-svn-src-stable@freebsd.org Thu Nov 28 20:09:20 2019 Return-Path: Delivered-To: svn-src-stable@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 B19351B5AB0; Thu, 28 Nov 2019 20:09:20 +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) server-signature RSA-PSS (4096 bits) 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 47P7yS3zQ8z41cV; Thu, 28 Nov 2019 20:09:20 +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 6896C2E54; Thu, 28 Nov 2019 20:09:20 +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 xASK9K1G051829; Thu, 28 Nov 2019 20:09:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASK9K9A051828; Thu, 28 Nov 2019 20:09:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201911282009.xASK9K9A051828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 28 Nov 2019 20:09:20 +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: r355189 - in stable: 11/lib/clang/libclang 11/lib/clang/libllvm 12/lib/clang/libclang 12/lib/clang/libllvm X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/clang/libclang 11/lib/clang/libllvm 12/lib/clang/libclang 12/lib/clang/libllvm X-SVN-Commit-Revision: 355189 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 20:09:20 -0000 Author: dim Date: Thu Nov 28 20:09:19 2019 New Revision: 355189 URL: https://svnweb.freebsd.org/changeset/base/355189 Log: MFC r354908: Add explanatory comments for the different SRCS_xxx variables used in the Makefiles for libllvm and libclang. While here, cleanup a commented out SRCS entry in libllvmminimal's Makefile. Modified: stable/12/lib/clang/libclang/Makefile stable/12/lib/clang/libllvm/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/clang/libclang/Makefile stable/11/lib/clang/libllvm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/clang/libclang/Makefile ============================================================================== --- stable/12/lib/clang/libclang/Makefile Thu Nov 28 19:38:57 2019 (r355188) +++ stable/12/lib/clang/libclang/Makefile Thu Nov 28 20:09:19 2019 (r355189) @@ -20,6 +20,12 @@ CXXFLAGS.Module.cpp+= -fpermissive SRCDIR= tools/clang/lib +# Explanation of different SRCS variants below: +# SRCS_MIN: always required, even for bootstrap +# SRCS_EXT: required for MK_CLANG_EXTRAS +# SRCS_FUL: required for MK_CLANG_FULL +# SRCS_LDB: required for MK_LLDB + SRCS_FUL+= ARCMigrate/ARCMT.cpp SRCS_FUL+= ARCMigrate/ARCMTActions.cpp SRCS_FUL+= ARCMigrate/FileRemapper.cpp Modified: stable/12/lib/clang/libllvm/Makefile ============================================================================== --- stable/12/lib/clang/libllvm/Makefile Thu Nov 28 19:38:57 2019 (r355188) +++ stable/12/lib/clang/libllvm/Makefile Thu Nov 28 20:09:19 2019 (r355189) @@ -26,6 +26,17 @@ CFLAGS+= -I${LLVM_SRCS}/lib/Target/${arch} SRCDIR= lib +# Explanation of different SRCS variants below: +# SRCS_MIN: always required, even for bootstrap +# SRCS_MIW: required for world stage (after cross-tools) +# SRCS_EXT: required for MK_CLANG_EXTRAS +# SRCS_EXL: required for MK_CLANG_EXTRAS and MK_LLD +# SRCS_FUL: required for MK_CLANG_FULL +# SRCS_LLD: required for MK_LLD +# SRCS_XDB: required for MK_CLANG_EXTRAS and MK_LLDB +# SRCS_XDL: required for MK_CLANG_EXTRAS, MK_LLD and MK_LLDB +# SRCS_XDW: required for MK_CLANG_EXTRAS and MK_LLDB in world stage + SRCS_MIN+= Analysis/AliasAnalysis.cpp SRCS_MIN+= Analysis/AliasAnalysisEvaluator.cpp SRCS_MIN+= Analysis/AliasAnalysisSummary.cpp From owner-svn-src-stable@freebsd.org Fri Nov 29 00:25:39 2019 Return-Path: Delivered-To: svn-src-stable@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 B62E01BD30C; Fri, 29 Nov 2019 00:25:39 +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) server-signature RSA-PSS (4096 bits) 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 47PFfC4RGyz4GlN; Fri, 29 Nov 2019 00:25:39 +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 7C8765FCC; Fri, 29 Nov 2019 00:25:39 +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 xAT0PdaD005090; Fri, 29 Nov 2019 00:25:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT0PdmD005088; Fri, 29 Nov 2019 00:25:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290025.xAT0PdmD005088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 00:25: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: r355195 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 355195 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 00:25:39 -0000 Author: mav Date: Fri Nov 29 00:25:39 2019 New Revision: 355195 URL: https://svnweb.freebsd.org/changeset/base/355195 Log: MFC r354753: Initialize *comp_update with valid value. I've noticed that sometimes with enabled DMAR initial write from device to this address is somehow getting delayed, triggering assertion due to zero default being invalid. Modified: stable/12/sys/dev/ioat/ioat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Thu Nov 28 23:34:23 2019 (r355194) +++ stable/12/sys/dev/ioat/ioat.c Fri Nov 29 00:25:39 2019 (r355195) @@ -545,10 +545,9 @@ ioat3_attach(device_t device) dma_hw_desc->next = RING_PHYS_ADDR(ioat, i + 1); } - ioat->head = 0; - ioat->tail = 0; - ioat->last_seen = 0; - *ioat->comp_update = 0; + ioat->tail = ioat->head = 0; + *ioat->comp_update = ioat->last_seen = + RING_PHYS_ADDR(ioat, ioat->tail - 1); return (0); } @@ -1591,8 +1590,8 @@ ioat_reset_hw(struct ioat_softc *ioat) * at zero as well. */ ioat->tail = ioat->head = 0; - ioat->last_seen = 0; - *ioat->comp_update = 0; + *ioat->comp_update = ioat->last_seen = + RING_PHYS_ADDR(ioat, ioat->tail - 1); ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); From owner-svn-src-stable@freebsd.org Fri Nov 29 00:26:06 2019 Return-Path: Delivered-To: svn-src-stable@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 97B061BD38A; Fri, 29 Nov 2019 00:26:06 +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) server-signature RSA-PSS (4096 bits) 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 47PFfk3K2Mz4GsK; Fri, 29 Nov 2019 00:26:06 +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 55BF75FCD; Fri, 29 Nov 2019 00:26:06 +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 xAT0Q6wO005167; Fri, 29 Nov 2019 00:26:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT0Q68h005166; Fri, 29 Nov 2019 00:26:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290026.xAT0Q68h005166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 00:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355196 - stable/11/sys/dev/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ioat X-SVN-Commit-Revision: 355196 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 00:26:06 -0000 Author: mav Date: Fri Nov 29 00:26:05 2019 New Revision: 355196 URL: https://svnweb.freebsd.org/changeset/base/355196 Log: MFC r354753: Initialize *comp_update with valid value. I've noticed that sometimes with enabled DMAR initial write from device to this address is somehow getting delayed, triggering assertion due to zero default being invalid. Modified: stable/11/sys/dev/ioat/ioat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat.c ============================================================================== --- stable/11/sys/dev/ioat/ioat.c Fri Nov 29 00:25:39 2019 (r355195) +++ stable/11/sys/dev/ioat/ioat.c Fri Nov 29 00:26:05 2019 (r355196) @@ -535,10 +535,9 @@ ioat3_attach(device_t device) dma_hw_desc->next = RING_PHYS_ADDR(ioat, i + 1); } - ioat->head = 0; - ioat->tail = 0; - ioat->last_seen = 0; - *ioat->comp_update = 0; + ioat->tail = ioat->head = 0; + *ioat->comp_update = ioat->last_seen = + RING_PHYS_ADDR(ioat, ioat->tail - 1); return (0); } @@ -1581,8 +1580,8 @@ ioat_reset_hw(struct ioat_softc *ioat) * at zero as well. */ ioat->tail = ioat->head = 0; - ioat->last_seen = 0; - *ioat->comp_update = 0; + *ioat->comp_update = ioat->last_seen = + RING_PHYS_ADDR(ioat, ioat->tail - 1); ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); From owner-svn-src-stable@freebsd.org Fri Nov 29 00:38:17 2019 Return-Path: Delivered-To: svn-src-stable@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 5A8831BD725; Fri, 29 Nov 2019 00:38:17 +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) server-signature RSA-PSS (4096 bits) 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 47PFwn1hNDz4HG1; Fri, 29 Nov 2019 00:38:17 +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 18DD96185; Fri, 29 Nov 2019 00:38:17 +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 xAT0cGFS011146; Fri, 29 Nov 2019 00:38:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT0cGwm011143; Fri, 29 Nov 2019 00:38:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290038.xAT0cGwm011143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 00:38: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: r355197 - in stable/12: sys/dev/ioat tools/tools/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: sys/dev/ioat tools/tools/ioat X-SVN-Commit-Revision: 355197 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 00:38:17 -0000 Author: mav Date: Fri Nov 29 00:38:16 2019 New Revision: 355197 URL: https://svnweb.freebsd.org/changeset/base/355197 Log: MFC r345812 (by tychon): ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc and crc-copy modes. Modified: stable/12/sys/dev/ioat/ioat_test.c stable/12/sys/dev/ioat/ioat_test.h stable/12/tools/tools/ioat/ioatcontrol.8 stable/12/tools/tools/ioat/ioatcontrol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat_test.c ============================================================================== --- stable/12/sys/dev/ioat/ioat_test.c Fri Nov 29 00:26:05 2019 (r355196) +++ stable/12/sys/dev/ioat/ioat_test.c Fri Nov 29 00:38:16 2019 (r355197) @@ -65,6 +65,7 @@ struct test_transaction { void *buf[IOAT_MAX_BUFS]; uint32_t length; uint32_t depth; + uint32_t crc[IOAT_MAX_BUFS]; struct ioat_test *test; TAILQ_ENTRY(test_transaction) entry; }; @@ -312,6 +313,28 @@ ioat_test_submit_1_tx(struct ioat_test *test, bus_dmae desc = ioat_copy_8k_aligned(dma, dest, dst2, src, src2, cb, tx, flags); + } else if (test->testkind == IOAT_TEST_DMA_8K_PB) { + bus_addr_t src2, dst2; + + src2 = vtophys((vm_offset_t)tx->buf[2*i+1] + PAGE_SIZE); + dst2 = vtophys((vm_offset_t)tx->buf[2*i] + PAGE_SIZE); + + desc = ioat_copy_8k_aligned(dma, dest, dst2, src, src2, + cb, tx, flags); + } else if (test->testkind == IOAT_TEST_DMA_CRC) { + bus_addr_t crc; + + tx->crc[i] = 0; + crc = vtophys((vm_offset_t)&tx->crc[i]); + desc = ioat_crc(dma, src, tx->length, + NULL, crc, cb, tx, flags | DMA_CRC_STORE); + } else if (test->testkind == IOAT_TEST_DMA_CRC_COPY) { + bus_addr_t crc; + + tx->crc[i] = 0; + crc = vtophys((vm_offset_t)&tx->crc[i]); + desc = ioat_copy_crc(dma, dest, src, tx->length, + NULL, crc, cb, tx, flags | DMA_CRC_STORE); } if (desc == NULL) break; @@ -346,7 +369,8 @@ ioat_dma_test(void *arg) test = arg; memset(__DEVOLATILE(void *, test->status), 0, sizeof(test->status)); - if (test->testkind == IOAT_TEST_DMA_8K && + if ((test->testkind == IOAT_TEST_DMA_8K || + test->testkind == IOAT_TEST_DMA_8K_PB) && test->buffer_size != 2 * PAGE_SIZE) { ioat_test_log(0, "Asked for 8k test and buffer size isn't 8k\n"); test->status[IOAT_TEST_INVALID_INPUT]++; Modified: stable/12/sys/dev/ioat/ioat_test.h ============================================================================== --- stable/12/sys/dev/ioat/ioat_test.h Fri Nov 29 00:26:05 2019 (r355196) +++ stable/12/sys/dev/ioat/ioat_test.h Fri Nov 29 00:38:16 2019 (r355197) @@ -44,6 +44,9 @@ enum ioat_test_kind { IOAT_TEST_RAW_DMA, IOAT_TEST_DMA_8K, IOAT_TEST_MEMCPY, + IOAT_TEST_DMA_8K_PB, + IOAT_TEST_DMA_CRC, + IOAT_TEST_DMA_CRC_COPY, IOAT_NUM_TESTKINDS }; Modified: stable/12/tools/tools/ioat/ioatcontrol.8 ============================================================================== --- stable/12/tools/tools/ioat/ioatcontrol.8 Fri Nov 29 00:26:05 2019 (r355196) +++ stable/12/tools/tools/ioat/ioatcontrol.8 Fri Nov 29 00:38:16 2019 (r355197) @@ -35,9 +35,12 @@ .Nm .Op Fl c Ar period .Op Fl E +.Op Fl e .Op Fl f .Op Fl m .Op Fl V +.Op Fl x +.Op Fl X .Op Fl z .Ar channel_number .Ar num_txns @@ -65,6 +68,8 @@ The arguments are as follows: Configure the channel's interrupt coalescing period, in microseconds (defaults to 0). .It Fl E +Test contiguous 8k copy. +.It Fl e Test non-contiguous 8k copy. .It Fl f Test block fill (by default, @@ -74,6 +79,10 @@ tests copy) Test memcpy instead of DMA. .It Fl V Verify copies/fills for accuracy +.It Fl x +Test DMA CRC. +.It Fl X +Test DMA copy with CRC. .It Fl z Zero device statistics before running test. .El Modified: stable/12/tools/tools/ioat/ioatcontrol.c ============================================================================== --- stable/12/tools/tools/ioat/ioatcontrol.c Fri Nov 29 00:26:05 2019 (r355196) +++ stable/12/tools/tools/ioat/ioatcontrol.c Fri Nov 29 00:38:16 2019 (r355197) @@ -54,13 +54,16 @@ usage(void) printf(" %s -r [-c period] [-vVwz] channel-number address []\n\n", getprogname()); printf(" -c period - Enable interrupt coalescing (us) (default: 0)\n"); - printf(" -E - Test non-contiguous 8k copy.\n"); - printf(" -f - Test block fill (default: DMA copy).\n"); + printf(" -E - Test contiguous 8k copy.\n"); + printf(" -e - Test non-contiguous 8k copy.\n"); + printf(" -f - Test block fill.\n"); printf(" -m - Test memcpy instead of DMA.\n"); printf(" -r - Issue DMA to or from a specific address.\n"); printf(" -V - Enable verification\n"); printf(" -v -
is a kernel virtual address\n"); printf(" -w - Write to the specified address\n"); + printf(" -x - Test DMA CRC.\n"); + printf(" -X - Test DMA CRC copy.\n"); printf(" -z - Zero device stats before test\n"); exit(EX_USAGE); } @@ -107,15 +110,15 @@ main(int argc, char **argv) { struct ioat_test t; int fd, ch; - bool fflag, rflag, Eflag, mflag; + bool fflag, rflag, Eflag, eflag, mflag, xflag, Xflag; unsigned modeflags; memset(&t, 0, sizeof(t)); - fflag = rflag = Eflag = mflag = false; + fflag = rflag = Eflag = eflag = mflag = xflag = Xflag = false; modeflags = 0; - while ((ch = getopt(argc, argv, "c:EfmrvVwz")) != -1) { + while ((ch = getopt(argc, argv, "c:EefmrvVwxXz")) != -1) { switch (ch) { case 'c': t.coalesce_period = atoi(optarg); @@ -124,6 +127,10 @@ main(int argc, char **argv) Eflag = true; modeflags++; break; + case 'e': + eflag = true; + modeflags++; + break; case 'f': fflag = true; modeflags++; @@ -145,6 +152,12 @@ main(int argc, char **argv) case 'w': t.raw_write = true; break; + case 'x': + xflag = true; + break; + case 'X': + Xflag = true; + break; case 'z': t.zero_stats = true; break; @@ -171,11 +184,15 @@ main(int argc, char **argv) if (fflag) t.testkind = IOAT_TEST_FILL; - else if (Eflag) { + else if (Eflag || eflag) { t.testkind = IOAT_TEST_DMA_8K; t.buffer_size = 8 * 1024; } else if (mflag) t.testkind = IOAT_TEST_MEMCPY; + else if (xflag) + t.testkind = IOAT_TEST_DMA_CRC; + else if (xflag) + t.testkind = IOAT_TEST_DMA_CRC_COPY; t.channel_index = atoi(argv[0]); if (t.channel_index > 8) { From owner-svn-src-stable@freebsd.org Fri Nov 29 00:38:36 2019 Return-Path: Delivered-To: svn-src-stable@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 3E9911BD7A4; Fri, 29 Nov 2019 00:38: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) server-signature RSA-PSS (4096 bits) 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 47PFx80wV3z4HN2; Fri, 29 Nov 2019 00:38: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 03F956186; Fri, 29 Nov 2019 00:38: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 xAT0cZaO011208; Fri, 29 Nov 2019 00:38:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT0cZ9p011205; Fri, 29 Nov 2019 00:38:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290038.xAT0cZ9p011205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 00:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355198 - in stable/11: sys/dev/ioat tools/tools/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: sys/dev/ioat tools/tools/ioat X-SVN-Commit-Revision: 355198 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 00:38:36 -0000 Author: mav Date: Fri Nov 29 00:38:34 2019 New Revision: 355198 URL: https://svnweb.freebsd.org/changeset/base/355198 Log: MFC r345812 (by tychon): ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc and crc-copy modes. Modified: stable/11/sys/dev/ioat/ioat_test.c stable/11/sys/dev/ioat/ioat_test.h stable/11/tools/tools/ioat/ioatcontrol.8 stable/11/tools/tools/ioat/ioatcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat_test.c ============================================================================== --- stable/11/sys/dev/ioat/ioat_test.c Fri Nov 29 00:38:16 2019 (r355197) +++ stable/11/sys/dev/ioat/ioat_test.c Fri Nov 29 00:38:34 2019 (r355198) @@ -65,6 +65,7 @@ struct test_transaction { void *buf[IOAT_MAX_BUFS]; uint32_t length; uint32_t depth; + uint32_t crc[IOAT_MAX_BUFS]; struct ioat_test *test; TAILQ_ENTRY(test_transaction) entry; }; @@ -312,6 +313,28 @@ ioat_test_submit_1_tx(struct ioat_test *test, bus_dmae desc = ioat_copy_8k_aligned(dma, dest, dst2, src, src2, cb, tx, flags); + } else if (test->testkind == IOAT_TEST_DMA_8K_PB) { + bus_addr_t src2, dst2; + + src2 = vtophys((vm_offset_t)tx->buf[2*i+1] + PAGE_SIZE); + dst2 = vtophys((vm_offset_t)tx->buf[2*i] + PAGE_SIZE); + + desc = ioat_copy_8k_aligned(dma, dest, dst2, src, src2, + cb, tx, flags); + } else if (test->testkind == IOAT_TEST_DMA_CRC) { + bus_addr_t crc; + + tx->crc[i] = 0; + crc = vtophys((vm_offset_t)&tx->crc[i]); + desc = ioat_crc(dma, src, tx->length, + NULL, crc, cb, tx, flags | DMA_CRC_STORE); + } else if (test->testkind == IOAT_TEST_DMA_CRC_COPY) { + bus_addr_t crc; + + tx->crc[i] = 0; + crc = vtophys((vm_offset_t)&tx->crc[i]); + desc = ioat_copy_crc(dma, dest, src, tx->length, + NULL, crc, cb, tx, flags | DMA_CRC_STORE); } if (desc == NULL) break; @@ -346,7 +369,8 @@ ioat_dma_test(void *arg) test = arg; memset(__DEVOLATILE(void *, test->status), 0, sizeof(test->status)); - if (test->testkind == IOAT_TEST_DMA_8K && + if ((test->testkind == IOAT_TEST_DMA_8K || + test->testkind == IOAT_TEST_DMA_8K_PB) && test->buffer_size != 2 * PAGE_SIZE) { ioat_test_log(0, "Asked for 8k test and buffer size isn't 8k\n"); test->status[IOAT_TEST_INVALID_INPUT]++; Modified: stable/11/sys/dev/ioat/ioat_test.h ============================================================================== --- stable/11/sys/dev/ioat/ioat_test.h Fri Nov 29 00:38:16 2019 (r355197) +++ stable/11/sys/dev/ioat/ioat_test.h Fri Nov 29 00:38:34 2019 (r355198) @@ -44,6 +44,9 @@ enum ioat_test_kind { IOAT_TEST_RAW_DMA, IOAT_TEST_DMA_8K, IOAT_TEST_MEMCPY, + IOAT_TEST_DMA_8K_PB, + IOAT_TEST_DMA_CRC, + IOAT_TEST_DMA_CRC_COPY, IOAT_NUM_TESTKINDS }; Modified: stable/11/tools/tools/ioat/ioatcontrol.8 ============================================================================== --- stable/11/tools/tools/ioat/ioatcontrol.8 Fri Nov 29 00:38:16 2019 (r355197) +++ stable/11/tools/tools/ioat/ioatcontrol.8 Fri Nov 29 00:38:34 2019 (r355198) @@ -35,9 +35,12 @@ .Nm .Op Fl c Ar period .Op Fl E +.Op Fl e .Op Fl f .Op Fl m .Op Fl V +.Op Fl x +.Op Fl X .Op Fl z .Ar channel_number .Ar num_txns @@ -65,6 +68,8 @@ The arguments are as follows: Configure the channel's interrupt coalescing period, in microseconds (defaults to 0). .It Fl E +Test contiguous 8k copy. +.It Fl e Test non-contiguous 8k copy. .It Fl f Test block fill (by default, @@ -74,6 +79,10 @@ tests copy) Test memcpy instead of DMA. .It Fl V Verify copies/fills for accuracy +.It Fl x +Test DMA CRC. +.It Fl X +Test DMA copy with CRC. .It Fl z Zero device statistics before running test. .El Modified: stable/11/tools/tools/ioat/ioatcontrol.c ============================================================================== --- stable/11/tools/tools/ioat/ioatcontrol.c Fri Nov 29 00:38:16 2019 (r355197) +++ stable/11/tools/tools/ioat/ioatcontrol.c Fri Nov 29 00:38:34 2019 (r355198) @@ -54,13 +54,16 @@ usage(void) printf(" %s -r [-c period] [-vVwz] channel-number address []\n\n", getprogname()); printf(" -c period - Enable interrupt coalescing (us) (default: 0)\n"); - printf(" -E - Test non-contiguous 8k copy.\n"); - printf(" -f - Test block fill (default: DMA copy).\n"); + printf(" -E - Test contiguous 8k copy.\n"); + printf(" -e - Test non-contiguous 8k copy.\n"); + printf(" -f - Test block fill.\n"); printf(" -m - Test memcpy instead of DMA.\n"); printf(" -r - Issue DMA to or from a specific address.\n"); printf(" -V - Enable verification\n"); printf(" -v -
is a kernel virtual address\n"); printf(" -w - Write to the specified address\n"); + printf(" -x - Test DMA CRC.\n"); + printf(" -X - Test DMA CRC copy.\n"); printf(" -z - Zero device stats before test\n"); exit(EX_USAGE); } @@ -107,15 +110,15 @@ main(int argc, char **argv) { struct ioat_test t; int fd, ch; - bool fflag, rflag, Eflag, mflag; + bool fflag, rflag, Eflag, eflag, mflag, xflag, Xflag; unsigned modeflags; memset(&t, 0, sizeof(t)); - fflag = rflag = Eflag = mflag = false; + fflag = rflag = Eflag = eflag = mflag = xflag = Xflag = false; modeflags = 0; - while ((ch = getopt(argc, argv, "c:EfmrvVwz")) != -1) { + while ((ch = getopt(argc, argv, "c:EefmrvVwxXz")) != -1) { switch (ch) { case 'c': t.coalesce_period = atoi(optarg); @@ -124,6 +127,10 @@ main(int argc, char **argv) Eflag = true; modeflags++; break; + case 'e': + eflag = true; + modeflags++; + break; case 'f': fflag = true; modeflags++; @@ -145,6 +152,12 @@ main(int argc, char **argv) case 'w': t.raw_write = true; break; + case 'x': + xflag = true; + break; + case 'X': + Xflag = true; + break; case 'z': t.zero_stats = true; break; @@ -171,11 +184,15 @@ main(int argc, char **argv) if (fflag) t.testkind = IOAT_TEST_FILL; - else if (Eflag) { + else if (Eflag || eflag) { t.testkind = IOAT_TEST_DMA_8K; t.buffer_size = 8 * 1024; } else if (mflag) t.testkind = IOAT_TEST_MEMCPY; + else if (xflag) + t.testkind = IOAT_TEST_DMA_CRC; + else if (xflag) + t.testkind = IOAT_TEST_DMA_CRC_COPY; t.channel_index = atoi(argv[0]); if (t.channel_index > 8) { From owner-svn-src-stable@freebsd.org Fri Nov 29 00:58:19 2019 Return-Path: Delivered-To: svn-src-stable@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 BA9201BE106; Fri, 29 Nov 2019 00:58:19 +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) server-signature RSA-PSS (4096 bits) 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 47PGMv4Wcyz4JBy; Fri, 29 Nov 2019 00:58:19 +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 79B056510; Fri, 29 Nov 2019 00:58:19 +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 xAT0wJt7022934; Fri, 29 Nov 2019 00:58:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT0wJpY022932; Fri, 29 Nov 2019 00:58:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290058.xAT0wJpY022932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 00:58: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: r355199 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 355199 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 00:58:19 -0000 Author: mav Date: Fri Nov 29 00:58:18 2019 New Revision: 355199 URL: https://svnweb.freebsd.org/changeset/base/355199 Log: MFC r345813 (by tychon): ioat(4) should use bus_dma(9) for the operation source and destination addresses Modified: stable/12/sys/dev/ioat/ioat.c stable/12/sys/dev/ioat/ioat_internal.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Fri Nov 29 00:38:34 2019 (r355198) +++ stable/12/sys/dev/ioat/ioat.c Fri Nov 29 00:58:18 2019 (r355199) @@ -327,10 +327,26 @@ err: return (error); } +static inline int +ioat_bus_dmamap_destroy(struct ioat_softc *ioat, const char *func, + bus_dma_tag_t dmat, bus_dmamap_t map) +{ + int error; + + error = bus_dmamap_destroy(dmat, map); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_destroy failed %d\n", func, error); + } + + return (error); +} + static int ioat_detach(device_t device) { struct ioat_softc *ioat; + int i, error; ioat = DEVICE2SOFTC(device); @@ -366,6 +382,47 @@ ioat_detach(device_t device) bus_release_resource(device, SYS_RES_MEMORY, ioat->pci_resource_id, ioat->pci_resource); + if (ioat->data_tag != NULL) { + for (i = 0; i < 1 << ioat->ring_size_order; i++) { + error = ioat_bus_dmamap_destroy(ioat, __func__, + ioat->data_tag, ioat->ring[i].src_dmamap); + if (error != 0) + return (error); + } + for (i = 0; i < 1 << ioat->ring_size_order; i++) { + error = ioat_bus_dmamap_destroy(ioat, __func__, + ioat->data_tag, ioat->ring[i].dst_dmamap); + if (error != 0) + return (error); + } + + for (i = 0; i < 1 << ioat->ring_size_order; i++) { + error = ioat_bus_dmamap_destroy(ioat, __func__, + ioat->data_tag, ioat->ring[i].src2_dmamap); + if (error != 0) + return (error); + } + for (i = 0; i < 1 << ioat->ring_size_order; i++) { + error = ioat_bus_dmamap_destroy(ioat, __func__, + ioat->data_tag, ioat->ring[i].dst2_dmamap); + if (error != 0) + return (error); + } + + bus_dma_tag_destroy(ioat->data_tag); + } + + if (ioat->data_crc_tag != NULL) { + for (i = 0; i < 1 << ioat->ring_size_order; i++) { + error = ioat_bus_dmamap_destroy(ioat, __func__, + ioat->data_crc_tag, ioat->ring[i].crc_dmamap); + if (error != 0) + return (error); + } + + bus_dma_tag_destroy(ioat->data_crc_tag); + } + if (ioat->ring != NULL) ioat_free_ring(ioat, 1 << ioat->ring_size_order, ioat->ring); @@ -531,6 +588,25 @@ ioat3_attach(device_t device) ioat->hw_desc_ring = hw_desc; + error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), + 1, 0, BUS_SPACE_MAXADDR_40BIT, BUS_SPACE_MAXADDR, NULL, NULL, + ioat->max_xfer_size, 1, ioat->max_xfer_size, 0, NULL, NULL, + &ioat->data_crc_tag); + if (error != 0) { + ioat_log_message(0, "%s: bus_dma_tag_create failed %d\n", + __func__, error); + return (error); + } + + error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), + 1, 0, BUS_SPACE_MAXADDR_48BIT, BUS_SPACE_MAXADDR, NULL, NULL, + ioat->max_xfer_size, 1, ioat->max_xfer_size, 0, NULL, NULL, + &ioat->data_tag); + if (error != 0) { + ioat_log_message(0, "%s: bus_dma_tag_create failed %d\n", + __func__, error); + return (error); + } ioat->ring = malloc_domainset(num_descriptors * sizeof(*ring), M_IOAT, DOMAINSET_PREF(ioat->domain), M_ZERO | M_WAITOK); @@ -538,6 +614,46 @@ ioat3_attach(device_t device) for (i = 0; i < num_descriptors; i++) { memset(&ring[i].bus_dmadesc, 0, sizeof(ring[i].bus_dmadesc)); ring[i].id = i; + error = bus_dmamap_create(ioat->data_tag, 0, + &ring[i].src_dmamap); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_create failed %d\n", __func__, + error); + return (error); + } + error = bus_dmamap_create(ioat->data_tag, 0, + &ring[i].dst_dmamap); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_create failed %d\n", __func__, + error); + return (error); + } + error = bus_dmamap_create(ioat->data_tag, 0, + &ring[i].src2_dmamap); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_create failed %d\n", __func__, + error); + return (error); + } + error = bus_dmamap_create(ioat->data_tag, 0, + &ring[i].dst2_dmamap); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_create failed %d\n", __func__, + error); + return (error); + } + error = bus_dmamap_create(ioat->data_crc_tag, 0, + &ring[i].crc_dmamap); + if (error != 0) { + ioat_log_message(0, + "%s: bus_dmamap_create failed %d\n", __func__, + error); + return (error); + } } for (i = 0; i < num_descriptors; i++) { @@ -731,6 +847,12 @@ ioat_process_events(struct ioat_softc *ioat, boolean_t ioat->chan_idx, ioat->tail, dmadesc, dmadesc->callback_fn, dmadesc->callback_arg); + bus_dmamap_unload(ioat->data_tag, desc->src_dmamap); + bus_dmamap_unload(ioat->data_tag, desc->dst_dmamap); + bus_dmamap_unload(ioat->data_tag, desc->src2_dmamap); + bus_dmamap_unload(ioat->data_tag, desc->dst2_dmamap); + bus_dmamap_unload(ioat->data_crc_tag, desc->crc_dmamap); + if (dmadesc->callback_fn != NULL) dmadesc->callback_fn(dmadesc->callback_arg, 0); @@ -1015,7 +1137,8 @@ ioat_op_generic(struct ioat_softc *ioat, uint8_t op, { struct ioat_generic_hw_descriptor *hw_desc; struct ioat_descriptor *desc; - int mflags; + bus_dma_segment_t seg; + int mflags, nseg, error; mtx_assert(&ioat->submit_lock, MA_OWNED); @@ -1045,9 +1168,31 @@ ioat_op_generic(struct ioat_softc *ioat, uint8_t op, hw_desc->u.control_generic.fence = 1; hw_desc->size = size; - hw_desc->src_addr = src; - hw_desc->dest_addr = dst; + if (src != 0) { + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, desc->src_dmamap, + src, size, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->src_addr = seg.ds_addr; + } + + if (dst != 0) { + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, desc->dst_dmamap, + dst, size, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->dest_addr = seg.ds_addr; + } + desc->bus_dmadesc.callback_fn = callback_fn; desc->bus_dmadesc.callback_arg = callback_arg; return (desc); @@ -1112,6 +1257,9 @@ ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_ad struct ioat_dma_hw_descriptor *hw_desc; struct ioat_descriptor *desc; struct ioat_softc *ioat; + bus_size_t src1_len, dst1_len; + bus_dma_segment_t seg; + int nseg, error; ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); @@ -1121,19 +1269,57 @@ ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_ad KASSERT(((src1 | src2 | dst1 | dst2) & PAGE_MASK) == 0, ("%s: addresses are not page-aligned", __func__)); - desc = ioat_op_generic(ioat, IOAT_OP_COPY, 2 * PAGE_SIZE, src1, dst1, + desc = ioat_op_generic(ioat, IOAT_OP_COPY, 2 * PAGE_SIZE, 0, 0, callback_fn, callback_arg, flags); if (desc == NULL) return (NULL); hw_desc = &ioat_get_descriptor(ioat, desc->id)->dma; - if (src2 != src1 + PAGE_SIZE) { + + src1_len = (src2 != src1 + PAGE_SIZE) ? PAGE_SIZE : 2 * PAGE_SIZE; + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->src_dmamap, src1, src1_len, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->src_addr = seg.ds_addr; + if (src1_len != 2 * PAGE_SIZE) { hw_desc->u.control.src_page_break = 1; - hw_desc->next_src_addr = src2; + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->src2_dmamap, src2, PAGE_SIZE, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->next_src_addr = seg.ds_addr; } - if (dst2 != dst1 + PAGE_SIZE) { + + dst1_len = (dst2 != dst1 + PAGE_SIZE) ? PAGE_SIZE : 2 * PAGE_SIZE; + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->dst_dmamap, dst1, dst1_len, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->dest_addr = seg.ds_addr; + if (dst1_len != 2 * PAGE_SIZE) { hw_desc->u.control.dest_page_break = 1; - hw_desc->next_dest_addr = dst2; + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->dst2_dmamap, dst2, PAGE_SIZE, 0, &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->next_dest_addr = seg.ds_addr; } if (g_ioat_debug_level >= 3) @@ -1153,6 +1339,8 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds struct ioat_softc *ioat; uint32_t teststore; uint8_t op; + bus_dma_segment_t seg; + int nseg, error; ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); @@ -1191,9 +1379,18 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds hw_desc = &ioat_get_descriptor(ioat, desc->id)->crc32; - if ((flags & DMA_CRC_INLINE) == 0) - hw_desc->crc_address = crcptr; - else + if ((flags & DMA_CRC_INLINE) == 0) { + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_crc_tag, + desc->crc_dmamap, crcptr, sizeof(uint32_t), 0, + &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->crc_address = seg.ds_addr; + } else hw_desc->u.control.crc_location = 1; if (initialseed != NULL) { @@ -1218,6 +1415,8 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu struct ioat_softc *ioat; uint32_t teststore; uint8_t op; + bus_dma_segment_t seg; + int nseg, error; ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); @@ -1256,9 +1455,18 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu hw_desc = &ioat_get_descriptor(ioat, desc->id)->crc32; - if ((flags & DMA_CRC_INLINE) == 0) - hw_desc->crc_address = crcptr; - else + if ((flags & DMA_CRC_INLINE) == 0) { + nseg = -1; + error = _bus_dmamap_load_phys(ioat->data_crc_tag, + desc->crc_dmamap, crcptr, sizeof(uint32_t), 0, + &seg, &nseg); + if (error != 0) { + ioat_log_message(0, "%s: _bus_dmamap_load_phys" + " failed %d\n", __func__, error); + return (NULL); + } + hw_desc->crc_address = seg.ds_addr; + } else hw_desc->u.control.crc_location = 1; if (initialseed != NULL) { @@ -1290,12 +1498,13 @@ ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t d KASSERT((dst & (0xffffull << 48)) == 0, ("%s: high 16 bits of crcptr are not zero", __func__)); - desc = ioat_op_generic(ioat, IOAT_OP_FILL, len, fillpattern, dst, + desc = ioat_op_generic(ioat, IOAT_OP_FILL, len, 0, dst, callback_fn, callback_arg, flags); if (desc == NULL) return (NULL); hw_desc = &ioat_get_descriptor(ioat, desc->id)->fill; + hw_desc->src_data = fillpattern; if (g_ioat_debug_level >= 3) dump_descriptor(hw_desc); Modified: stable/12/sys/dev/ioat/ioat_internal.h ============================================================================== --- stable/12/sys/dev/ioat/ioat_internal.h Fri Nov 29 00:38:34 2019 (r355198) +++ stable/12/sys/dev/ioat/ioat_internal.h Fri Nov 29 00:58:18 2019 (r355199) @@ -414,6 +414,11 @@ struct bus_dmadesc { struct ioat_descriptor { struct bus_dmadesc bus_dmadesc; uint32_t id; + bus_dmamap_t src_dmamap; + bus_dmamap_t dst_dmamap; + bus_dmamap_t src2_dmamap; + bus_dmamap_t dst2_dmamap; + bus_dmamap_t crc_dmamap; }; /* Unused by this driver at this time. */ @@ -458,6 +463,9 @@ struct ioat_softc { bus_dma_tag_t hw_desc_tag; bus_dmamap_t hw_desc_map; + + bus_dma_tag_t data_tag; + bus_dma_tag_t data_crc_tag; bus_dma_tag_t comp_update_tag; bus_dmamap_t comp_update_map; From owner-svn-src-stable@freebsd.org Fri Nov 29 01:00:07 2019 Return-Path: Delivered-To: svn-src-stable@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 BBDB31BE1D1; Fri, 29 Nov 2019 01:00:07 +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) server-signature RSA-PSS (4096 bits) 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 47PGPz4Zyzz4JKK; Fri, 29 Nov 2019 01:00:07 +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 80FF36517; Fri, 29 Nov 2019 01:00:07 +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 xAT107gk023133; Fri, 29 Nov 2019 01:00:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT107pV023131; Fri, 29 Nov 2019 01:00:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911290100.xAT107pV023131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Nov 2019 01:00:07 +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: r355200 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 355200 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 01:00:07 -0000 Author: mav Date: Fri Nov 29 01:00:06 2019 New Revision: 355200 URL: https://svnweb.freebsd.org/changeset/base/355200 Log: MFC r354752: Cleanup address range checks in ioat(4). - Deduce allowed address range for bus_dma(9) from the hardware version. Different versions (CPU generations) have different documented limits. - Remove difference between address ranges for src/dst and crc. At least docs for few recent generations of CPUs do not mention anything like that, while older are already limited with above limits. - Remove address assertions from arguments. While I do not think the addresses out of allowed ranges should realistically happen there due to the platforms physical address limitations, there is now bus_dma(9) to make sure of that, preferably via IOMMU. - Since crc now has the same address range as src/dst, remove crc_dmamap, reusing dst2_dmamap instead. Modified: stable/12/sys/dev/ioat/ioat.c stable/12/sys/dev/ioat/ioat_internal.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Fri Nov 29 00:58:18 2019 (r355199) +++ stable/12/sys/dev/ioat/ioat.c Fri Nov 29 01:00:06 2019 (r355200) @@ -63,8 +63,11 @@ __FBSDID("$FreeBSD$"); #include "ioat_internal.h" #ifndef BUS_SPACE_MAXADDR_40BIT -#define BUS_SPACE_MAXADDR_40BIT 0xFFFFFFFFFFULL +#define BUS_SPACE_MAXADDR_40BIT MIN(BUS_SPACE_MAXADDR, 0xFFFFFFFFFFULL) #endif +#ifndef BUS_SPACE_MAXADDR_46BIT +#define BUS_SPACE_MAXADDR_46BIT MIN(BUS_SPACE_MAXADDR, 0x3FFFFFFFFFFFULL) +#endif static int ioat_probe(device_t device); static int ioat_attach(device_t device); @@ -412,17 +415,6 @@ ioat_detach(device_t device) bus_dma_tag_destroy(ioat->data_tag); } - if (ioat->data_crc_tag != NULL) { - for (i = 0; i < 1 << ioat->ring_size_order; i++) { - error = ioat_bus_dmamap_destroy(ioat, __func__, - ioat->data_crc_tag, ioat->ring[i].crc_dmamap); - if (error != 0) - return (error); - } - - bus_dma_tag_destroy(ioat->data_crc_tag); - } - if (ioat->ring != NULL) ioat_free_ring(ioat, 1 << ioat->ring_size_order, ioat->ring); @@ -513,6 +505,7 @@ ioat3_attach(device_t device) struct ioat_descriptor *ring; struct ioat_dma_hw_descriptor *dma_hw_desc; void *hw_desc; + bus_addr_t lowaddr; size_t ringsz; int i, num_descriptors; int error; @@ -548,16 +541,25 @@ ioat3_attach(device_t device) ioat->is_submitter_processing = FALSE; - bus_dma_tag_create(bus_get_dma_tag(ioat->device), sizeof(uint64_t), 0x0, - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + if (ioat->version >= IOAT_VER_3_3) + lowaddr = BUS_SPACE_MAXADDR_48BIT; + else if (ioat->version >= IOAT_VER_3_2) + lowaddr = BUS_SPACE_MAXADDR_46BIT; + else + lowaddr = BUS_SPACE_MAXADDR_40BIT; + + error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), + sizeof(uint64_t), 0x0, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(uint64_t), 1, sizeof(uint64_t), 0, NULL, NULL, &ioat->comp_update_tag); + if (error != 0) + return (error); error = bus_dmamem_alloc(ioat->comp_update_tag, (void **)&ioat->comp_update, BUS_DMA_ZERO | BUS_DMA_WAITOK, &ioat->comp_update_map); - if (ioat->comp_update == NULL) - return (ENOMEM); + if (error != 0) + return (error); error = bus_dmamap_load(ioat->comp_update_tag, ioat->comp_update_map, ioat->comp_update, sizeof(uint64_t), ioat_comp_update_map, ioat, @@ -570,9 +572,8 @@ ioat3_attach(device_t device) ringsz = sizeof(struct ioat_dma_hw_descriptor) * num_descriptors; error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), - 2 * 1024 * 1024, 0x0, (bus_addr_t)BUS_SPACE_MAXADDR_40BIT, - BUS_SPACE_MAXADDR, NULL, NULL, ringsz, 1, ringsz, 0, NULL, NULL, - &ioat->hw_desc_tag); + 2 * 1024 * 1024, 0x0, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, + ringsz, 1, ringsz, 0, NULL, NULL, &ioat->hw_desc_tag); if (error != 0) return (error); @@ -589,24 +590,11 @@ ioat3_attach(device_t device) ioat->hw_desc_ring = hw_desc; error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), - 1, 0, BUS_SPACE_MAXADDR_40BIT, BUS_SPACE_MAXADDR, NULL, NULL, + 1, 0, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, ioat->max_xfer_size, 1, ioat->max_xfer_size, 0, NULL, NULL, - &ioat->data_crc_tag); - if (error != 0) { - ioat_log_message(0, "%s: bus_dma_tag_create failed %d\n", - __func__, error); - return (error); - } - - error = bus_dma_tag_create(bus_get_dma_tag(ioat->device), - 1, 0, BUS_SPACE_MAXADDR_48BIT, BUS_SPACE_MAXADDR, NULL, NULL, - ioat->max_xfer_size, 1, ioat->max_xfer_size, 0, NULL, NULL, &ioat->data_tag); - if (error != 0) { - ioat_log_message(0, "%s: bus_dma_tag_create failed %d\n", - __func__, error); + if (error != 0) return (error); - } ioat->ring = malloc_domainset(num_descriptors * sizeof(*ring), M_IOAT, DOMAINSET_PREF(ioat->domain), M_ZERO | M_WAITOK); @@ -646,14 +634,6 @@ ioat3_attach(device_t device) error); return (error); } - error = bus_dmamap_create(ioat->data_crc_tag, 0, - &ring[i].crc_dmamap); - if (error != 0) { - ioat_log_message(0, - "%s: bus_dmamap_create failed %d\n", __func__, - error); - return (error); - } } for (i = 0; i < num_descriptors; i++) { @@ -851,7 +831,6 @@ ioat_process_events(struct ioat_softc *ioat, boolean_t bus_dmamap_unload(ioat->data_tag, desc->dst_dmamap); bus_dmamap_unload(ioat->data_tag, desc->src2_dmamap); bus_dmamap_unload(ioat->data_tag, desc->dst2_dmamap); - bus_dmamap_unload(ioat->data_crc_tag, desc->crc_dmamap); if (dmadesc->callback_fn != NULL) dmadesc->callback_fn(dmadesc->callback_arg, 0); @@ -1230,10 +1209,6 @@ ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst, struct ioat_softc *ioat; ioat = to_ioat_softc(dmaengine); - - KASSERT(((src | dst) & (0xffffull << 48)) == 0, - ("%s: high 16 bits of src/dst are not zero", __func__)); - desc = ioat_op_generic(ioat, IOAT_OP_COPY, len, src, dst, callback_fn, callback_arg, flags); if (desc == NULL) @@ -1264,8 +1239,6 @@ ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_ad ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); - KASSERT(((src1 | src2 | dst1 | dst2) & (0xffffull << 48)) == 0, - ("%s: high 16 bits of src/dst are not zero", __func__)); KASSERT(((src1 | src2 | dst1 | dst2) & PAGE_MASK) == 0, ("%s: addresses are not page-aligned", __func__)); @@ -1347,8 +1320,6 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds KASSERT((ioat->capabilities & IOAT_DMACAP_MOVECRC) != 0, ("%s: device lacks MOVECRC capability", __func__)); - KASSERT(((src | dst) & (0xffffffull << 40)) == 0, - ("%s: high 24 bits of src/dst are not zero", __func__)); teststore = (flags & _DMA_CRC_TESTSTORE); KASSERT(teststore != _DMA_CRC_TESTSTORE, ("%s: TEST and STORE invalid", __func__)); @@ -1368,10 +1339,6 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds break; } - KASSERT((flags & DMA_CRC_INLINE) != 0 || - (crcptr & (0xffffffull << 40)) == 0, - ("%s: high 24 bits of crcptr are not zero", __func__)); - desc = ioat_op_generic(ioat, op, len, src, dst, callback_fn, callback_arg, flags & ~_DMA_CRC_FLAGS); if (desc == NULL) @@ -1381,8 +1348,8 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds if ((flags & DMA_CRC_INLINE) == 0) { nseg = -1; - error = _bus_dmamap_load_phys(ioat->data_crc_tag, - desc->crc_dmamap, crcptr, sizeof(uint32_t), 0, + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->dst2_dmamap, crcptr, sizeof(uint32_t), 0, &seg, &nseg); if (error != 0) { ioat_log_message(0, "%s: _bus_dmamap_load_phys" @@ -1423,8 +1390,6 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu KASSERT((ioat->capabilities & IOAT_DMACAP_CRC) != 0, ("%s: device lacks CRC capability", __func__)); - KASSERT((src & (0xffffffull << 40)) == 0, - ("%s: high 24 bits of src are not zero", __func__)); teststore = (flags & _DMA_CRC_TESTSTORE); KASSERT(teststore != _DMA_CRC_TESTSTORE, ("%s: TEST and STORE invalid", __func__)); @@ -1444,10 +1409,6 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu break; } - KASSERT((flags & DMA_CRC_INLINE) != 0 || - (crcptr & (0xffffffull << 40)) == 0, - ("%s: high 24 bits of crcptr are not zero", __func__)); - desc = ioat_op_generic(ioat, op, len, src, 0, callback_fn, callback_arg, flags & ~_DMA_CRC_FLAGS); if (desc == NULL) @@ -1457,8 +1418,8 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu if ((flags & DMA_CRC_INLINE) == 0) { nseg = -1; - error = _bus_dmamap_load_phys(ioat->data_crc_tag, - desc->crc_dmamap, crcptr, sizeof(uint32_t), 0, + error = _bus_dmamap_load_phys(ioat->data_tag, + desc->dst2_dmamap, crcptr, sizeof(uint32_t), 0, &seg, &nseg); if (error != 0) { ioat_log_message(0, "%s: _bus_dmamap_load_phys" @@ -1495,8 +1456,6 @@ ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t d KASSERT((ioat->capabilities & IOAT_DMACAP_BFILL) != 0, ("%s: device lacks BFILL capability", __func__)); - KASSERT((dst & (0xffffull << 48)) == 0, - ("%s: high 16 bits of crcptr are not zero", __func__)); desc = ioat_op_generic(ioat, IOAT_OP_FILL, len, 0, dst, callback_fn, callback_arg, flags); Modified: stable/12/sys/dev/ioat/ioat_internal.h ============================================================================== --- stable/12/sys/dev/ioat/ioat_internal.h Fri Nov 29 00:58:18 2019 (r355199) +++ stable/12/sys/dev/ioat/ioat_internal.h Fri Nov 29 01:00:06 2019 (r355200) @@ -418,7 +418,6 @@ struct ioat_descriptor { bus_dmamap_t dst_dmamap; bus_dmamap_t src2_dmamap; bus_dmamap_t dst2_dmamap; - bus_dmamap_t crc_dmamap; }; /* Unused by this driver at this time. */ @@ -465,7 +464,6 @@ struct ioat_softc { bus_dmamap_t hw_desc_map; bus_dma_tag_t data_tag; - bus_dma_tag_t data_crc_tag; bus_dma_tag_t comp_update_tag; bus_dmamap_t comp_update_map; From owner-svn-src-stable@freebsd.org Fri Nov 29 02:16:46 2019 Return-Path: Delivered-To: svn-src-stable@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 16B561BFFF3; Fri, 29 Nov 2019 02:16:46 +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) server-signature RSA-PSS (4096 bits) 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 47PJ6P6vkJz4MLw; Fri, 29 Nov 2019 02:16:45 +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 D04BF7367; Fri, 29 Nov 2019 02:16:45 +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 xAT2Gj7o070088; Fri, 29 Nov 2019 02:16:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAT2GjDH070087; Fri, 29 Nov 2019 02:16:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201911290216.xAT2GjDH070087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Nov 2019 02:16: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: r355202 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 355202 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2019 02:16:46 -0000 Author: markj Date: Fri Nov 29 02:16:45 2019 New Revision: 355202 URL: https://svnweb.freebsd.org/changeset/base/355202 Log: MFC r355000: Fix typos in the cpuset_{get,set}domain() man page. Modified: stable/12/lib/libc/sys/cpuset_getdomain.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/cpuset_getdomain.2 ============================================================================== --- stable/12/lib/libc/sys/cpuset_getdomain.2 Fri Nov 29 02:06:45 2019 (r355201) +++ stable/12/lib/libc/sys/cpuset_getdomain.2 Fri Nov 29 02:16:45 2019 (r355202) @@ -47,7 +47,7 @@ and allow the manipulation of sets of memory domains and allocation policy available to processes, threads, jails and other resources. These functions may manipulate sets of memory domains that contain many processes -or per-object anonymous masks that effect only a single object. +or per-object anonymous masks that affect only a single object. .Pp The valid values for the .Fa level @@ -97,7 +97,8 @@ mask and policy from the object specified by and .Fa id and stores it in the space provided by -.Fa mask and +.Fa mask +and .Fa policy . .Pp .Fn cpuset_setdomain @@ -107,7 +108,8 @@ attempts to set the mask and policy for the object spe and .Fa id to the values in -.Fa mask and +.Fa mask +and .Fa policy . .Sh ALLOCATION POLICIES Valid policy values are as follows: From owner-svn-src-stable@freebsd.org Sat Nov 30 04:55:18 2019 Return-Path: Delivered-To: svn-src-stable@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 07A4E1C858A; Sat, 30 Nov 2019 04:55:18 +0000 (UTC) (envelope-from delphij@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) server-signature RSA-PSS (4096 bits) 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 47PzZs62rCz3CyL; Sat, 30 Nov 2019 04:55:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2B4D2140F; Sat, 30 Nov 2019 04:55:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAU4tHnn015458; Sat, 30 Nov 2019 04:55:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAU4tHDb015457; Sat, 30 Nov 2019 04:55:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911300455.xAU4tHDb015457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 30 Nov 2019 04:55:17 +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: r355219 - stable/12/usr.sbin/ntp/ntpd X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/usr.sbin/ntp/ntpd X-SVN-Commit-Revision: 355219 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 04:55:18 -0000 Author: delphij Date: Sat Nov 30 04:55:17 2019 New Revision: 355219 URL: https://svnweb.freebsd.org/changeset/base/355219 Log: MFC r355128: Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 Modified: stable/12/usr.sbin/ntp/ntpd/leap-seconds Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/ntp/ntpd/leap-seconds ============================================================================== --- stable/12/usr.sbin/ntp/ntpd/leap-seconds Fri Nov 29 23:04:45 2019 (r355218) +++ stable/12/usr.sbin/ntp/ntpd/leap-seconds Sat Nov 30 04:55:17 2019 (r355219) @@ -62,7 +62,7 @@ # Terry Quinn, "The BIPM and the Accurate Measurement # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. -# reprinted in: +# reprinted in: # Christine Hackman and Donald B Sullivan (eds.) # Time and Frequency Measurement # American Association of Physics Teachers (1996) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C57 -# File expires on: 28 December 2019 +# Updated through IERS Bulletin C58 +# File expires on: 28 June 2020 # -#@ 3786480000 +#@ 3802291200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a +#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 From owner-svn-src-stable@freebsd.org Sat Nov 30 05:01:12 2019 Return-Path: Delivered-To: svn-src-stable@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 E5E711C8853; Sat, 30 Nov 2019 05:01:12 +0000 (UTC) (envelope-from delphij@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) server-signature RSA-PSS (4096 bits) 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 47Pzjh5nLDz3DF7; Sat, 30 Nov 2019 05:01:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7FF521456; Sat, 30 Nov 2019 05:01:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAU51CwS019445; Sat, 30 Nov 2019 05:01:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAU51CKf019444; Sat, 30 Nov 2019 05:01:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911300501.xAU51CKf019444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 30 Nov 2019 05:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355220 - stable/11/etc/ntp X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/etc/ntp X-SVN-Commit-Revision: 355220 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 05:01:13 -0000 Author: delphij Date: Sat Nov 30 05:01:12 2019 New Revision: 355220 URL: https://svnweb.freebsd.org/changeset/base/355220 Log: MFC r355128: Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 Modified: stable/11/etc/ntp/leap-seconds Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/ntp/leap-seconds ============================================================================== --- stable/11/etc/ntp/leap-seconds Sat Nov 30 04:55:17 2019 (r355219) +++ stable/11/etc/ntp/leap-seconds Sat Nov 30 05:01:12 2019 (r355220) @@ -62,7 +62,7 @@ # Terry Quinn, "The BIPM and the Accurate Measurement # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. -# reprinted in: +# reprinted in: # Christine Hackman and Donald B Sullivan (eds.) # Time and Frequency Measurement # American Association of Physics Teachers (1996) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C57 -# File expires on: 28 December 2019 +# Updated through IERS Bulletin C58 +# File expires on: 28 June 2020 # -#@ 3786480000 +#@ 3802291200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a +#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 From owner-svn-src-stable@freebsd.org Sat Nov 30 05:43:26 2019 Return-Path: Delivered-To: svn-src-stable@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 724BD1C92CF; Sat, 30 Nov 2019 05:43:26 +0000 (UTC) (envelope-from delphij@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) server-signature RSA-PSS (4096 bits) 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 47Q0fQ2ScXz3Fh4; Sat, 30 Nov 2019 05:43:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EC9E21CD8; Sat, 30 Nov 2019 05:43:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAU5hQsH044495; Sat, 30 Nov 2019 05:43:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAU5hPST044490; Sat, 30 Nov 2019 05:43:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911300543.xAU5hPST044490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 30 Nov 2019 05:43:25 +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: r355221 - stable/12/sbin/fsck_msdosfs X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/sbin/fsck_msdosfs X-SVN-Commit-Revision: 355221 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 05:43:26 -0000 Author: delphij Date: Sat Nov 30 05:43:24 2019 New Revision: 355221 URL: https://svnweb.freebsd.org/changeset/base/355221 Log: MFC r345839, r345894, r345897, r345900-r345901, r345976, r346220, r348602, r348767, r348967, r349047-r349048, r351502, r351623, r352364 r345839: Assert that q can't be NULL. 'empty' is always non-NULL when DIREMPTY r345894: Restore the ability of checking and fixing next free r345897: Restore lfcl when LOSTDIR's chain was corrupted and overwritten r345900: Implement checking of `.' and `..' entries of subdirectory. r345901: Fix build. r345976: Write string constant differently to improve readability. r346220: Don't cast result from malloc(). r348602: Don't increment cl after increment. r348767: preen should work independently with alwaysyes and alwaysno. r348967: Avoid out of boundary access when checking invalid long filenames. r349047: Blankspace. No actual code change. r349048: In ask(): override default option if any of alwaysyes/alwaysno/rdonly is r351502: Comment boot block checks and perform additional sanity checks: r351623: Remove unneeded blank line. No functional change. r352364: Avoid mixing cluster numbers and sector numbers. Makes code more readable. Modified: stable/12/sbin/fsck_msdosfs/boot.c stable/12/sbin/fsck_msdosfs/dir.c stable/12/sbin/fsck_msdosfs/dosfs.h stable/12/sbin/fsck_msdosfs/fat.c stable/12/sbin/fsck_msdosfs/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/12/sbin/fsck_msdosfs/boot.c Sat Nov 30 05:01:12 2019 (r355220) +++ stable/12/sbin/fsck_msdosfs/boot.c Sat Nov 30 05:43:24 2019 (r355221) @@ -33,6 +33,9 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#include + +#include #include #include #include @@ -46,10 +49,8 @@ readboot(int dosfs, struct bootblock *boot) { u_char block[DOSBOOTBLOCKSIZE]; u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; - u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; - int i; - + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perr("could not read boot block"); return FSFATAL; @@ -64,61 +65,133 @@ readboot(int dosfs, struct bootblock *boot) memset(boot, 0, sizeof *boot); boot->ValidFat = -1; - /* decode bios parameter block */ + /* Decode BIOS Parameter Block */ + + /* Bytes per sector: can only be 512, 1024, 2048 and 4096. */ boot->bpbBytesPerSec = block[11] + (block[12] << 8); + if (boot->bpbBytesPerSec < DOSBOOTBLOCKSIZE_REAL || + boot->bpbBytesPerSec > DOSBOOTBLOCKSIZE || + !powerof2(boot->bpbBytesPerSec)) { + pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); + return FSFATAL; + } + + /* Sectors per cluster: can only be: 1, 2, 4, 8, 16, 32, 64, 128. */ boot->bpbSecPerClust = block[13]; + if (boot->bpbSecPerClust == 0 || !powerof2(boot->bpbSecPerClust)) { + pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); + return FSFATAL; + } + + /* Reserved sectors: must be non-zero */ boot->bpbResSectors = block[14] + (block[15] << 8); + if (boot->bpbResSectors < 1) { + pfatal("Invalid reserved sectors: %u", + boot->bpbResSectors); + return FSFATAL; + } + + /* Number of FATs */ boot->bpbFATs = block[16]; + if (boot->bpbFATs == 0) { + pfatal("Invalid number of FATs: %u", boot->bpbFATs); + return FSFATAL; + } + + /* Root directory entries for FAT12 and FAT16 */ boot->bpbRootDirEnts = block[17] + (block[18] << 8); + if (!boot->bpbRootDirEnts) { + /* bpbRootDirEnts = 0 suggests that we are FAT32 */ + boot->flags |= FAT32; + } + + /* Total sectors (16 bits) */ boot->bpbSectors = block[19] + (block[20] << 8); + if (boot->bpbSectors != 0 && (boot->flags & FAT32)) { + pfatal("Invalid 16-bit total sector count on FAT32: %u", + boot->bpbSectors); + return FSFATAL; + } + + /* Media type: ignored */ boot->bpbMedia = block[21]; + + /* FAT12/FAT16: 16-bit count of sectors per FAT */ boot->bpbFATsmall = block[22] + (block[23] << 8); + if (boot->bpbFATsmall != 0 && (boot->flags & FAT32)) { + pfatal("Invalid 16-bit FAT sector count on FAT32: %u", + boot->bpbFATsmall); + return FSFATAL; + } + + /* Legacy CHS geometry numbers: ignored */ boot->SecPerTrack = block[24] + (block[25] << 8); boot->bpbHeads = block[26] + (block[27] << 8); + + /* Hidden sectors: ignored */ boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); + + /* Total sectors (32 bits) */ boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + if (boot->bpbHugeSectors == 0) { + if (boot->flags & FAT32) { + pfatal("FAT32 with sector count of zero"); + return FSFATAL; + } else if (boot->bpbSectors == 0) { + pfatal("FAT with sector count of zero"); + return FSFATAL; + } + boot->NumSectors = boot->bpbSectors; + } else { + if (boot->bpbSectors != 0) { + pfatal("Invalid FAT sector count"); + return FSFATAL; + } + boot->NumSectors = boot->bpbHugeSectors; + } - boot->FATsecs = boot->bpbFATsmall; - if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 || - boot->bpbBytesPerSec / DOSBOOTBLOCKSIZE_REAL == 0) { - pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); - return FSFATAL; - } - if (boot->bpbFATs == 0) { - pfatal("Invalid number of FATs: %u", boot->bpbFATs); - return FSFATAL; - } - if (!boot->bpbRootDirEnts) - boot->flags |= FAT32; + + if (boot->flags & FAT32) { + /* If the OEM Name field is EXFAT, it's not FAT32, so bail */ + if (!memcmp(&block[3], "EXFAT ", 8)) { + pfatal("exFAT filesystem is not supported."); + return FSFATAL; + } + + /* 32-bit count of sectors per FAT */ boot->FATsecs = block[36] + (block[37] << 8) + (block[38] << 16) + (block[39] << 24); + if (block[40] & 0x80) boot->ValidFat = block[40] & 0x0f; - /* check version number: */ + /* FAT32 version, bail out if not 0.0 */ if (block[42] || block[43]) { - /* Correct? XXX */ pfatal("Unknown file system version: %x.%x", block[43], block[42]); return FSFATAL; } + + /* + * Cluster number of the first cluster of root directory. + * + * Should be 2 but do not require it. + */ boot->bpbRootClust = block[44] + (block[45] << 8) + (block[46] << 16) + (block[47] << 24); + + /* Sector number of the FSInfo structure, usually 1 */ boot->bpbFSInfo = block[48] + (block[49] << 8); + + /* Sector number of the backup boot block, ignored */ boot->bpbBackup = block[50] + (block[51] << 8); - /* If the OEM Name field is EXFAT, it's not FAT32, so bail */ - if (!memcmp(&block[3], "EXFAT ", 8)) { - pfatal("exFAT filesystem is not supported."); - return FSFATAL; - } - - /* check basic parameters */ - if ((boot->bpbFSInfo == 0) || (boot->bpbSecPerClust == 0)) { + /* Check basic parameters */ + if (boot->bpbFSInfo == 0) { /* * Either the BIOS Parameter Block has been corrupted, * or this is not a FAT32 filesystem, most likely an @@ -127,6 +200,8 @@ readboot(int dosfs, struct bootblock *boot) pfatal("Invalid FAT32 Extended BIOS Parameter Block"); return FSFATAL; } + + /* Read in and verify the FSInfo block */ if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { @@ -164,8 +239,8 @@ readboot(int dosfs, struct bootblock *boot) ret = FSBOOTMOD; } else boot->bpbFSInfo = 0; - } - if (boot->bpbFSInfo) { + } else { + /* We appear to have a valid FSInfo block, decode */ boot->FSFree = fsinfo[0x1e8] + (fsinfo[0x1e9] << 8) + (fsinfo[0x1ea] << 16) + (fsinfo[0x1eb] << 24); @@ -173,53 +248,31 @@ readboot(int dosfs, struct bootblock *boot) + (fsinfo[0x1ee] << 16) + (fsinfo[0x1ef] << 24); } - - if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, - SEEK_SET) - != boot->bpbBackup * boot->bpbBytesPerSec - || read(dosfs, backup, sizeof backup) != sizeof backup) { - perr("could not read backup bootblock"); - return FSFATAL; - } - backup[65] = block[65]; /* XXX */ - if (memcmp(block + 11, backup + 11, 79)) { - /* - * XXX We require a reference that explains - * that these bytes need to match, or should - * drop the check. gdt@NetBSD has observed - * filesystems that work fine under Windows XP - * and NetBSD that do not match, so the - * requirement is suspect. For now, just - * print out useful information and continue. - */ - pwarn("backup (block %d) mismatch with primary bootblock:\n", - boot->bpbBackup); - for (i = 11; i < 11 + 90; i++) { - if (block[i] != backup[i]) - pwarn("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", - i, block[i], backup[i]); - } - } - /* Check backup bpbFSInfo? XXX */ + } else { + /* !FAT32: FAT12/FAT16 */ + boot->FATsecs = boot->bpbFATsmall; } - if (boot->bpbSecPerClust == 0) { - pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); + if (boot->FATsecs > UINT32_MAX / boot->bpbFATs) { + pfatal("Invalid FATs(%u) with FATsecs(%zu)", + boot->bpbFATs, (size_t)boot->FATsecs); return FSFATAL; } - if (boot->bpbSectors) { - boot->bpbHugeSectors = 0; - boot->NumSectors = boot->bpbSectors; - } else - boot->NumSectors = boot->bpbHugeSectors; - boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + + + boot->FirstCluster = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) / boot->bpbBytesPerSec + - boot->bpbResSectors + boot->bpbFATs * boot->FATsecs - - CLUST_FIRST * boot->bpbSecPerClust; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / - boot->bpbSecPerClust; + boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; - if (boot->flags&FAT32) + if (boot->FirstCluster + boot->bpbSecPerClust > boot->NumSectors) { + pfatal("Cluster offset too large (%u clusters)\n", + boot->FirstCluster); + return FSFATAL; + } + + boot->NumClusters = (boot->NumSectors - boot->FirstCluster) / boot->bpbSecPerClust + + CLUST_FIRST; + + if (boot->flags & FAT32) boot->ClustMask = CLUST32_MASK; else if (boot->NumClusters < (CLUST_RSRVD&CLUST12_MASK)) boot->ClustMask = CLUST12_MASK; Modified: stable/12/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/12/sbin/fsck_msdosfs/dir.c Sat Nov 30 05:01:12 2019 (r355220) +++ stable/12/sbin/fsck_msdosfs/dir.c Sat Nov 30 05:43:24 2019 (r355221) @@ -35,6 +35,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#include #include #include #include @@ -114,7 +115,7 @@ newDosDirEntry(void) struct dosDirEntry *de; if (!(de = freede)) { - if (!(de = (struct dosDirEntry *)malloc(sizeof *de))) + if (!(de = malloc(sizeof *de))) return 0; } else freede = de->next; @@ -139,7 +140,7 @@ newDirTodo(void) struct dirTodoNode *dt; if (!(dt = freedt)) { - if (!(dt = (struct dirTodoNode *)malloc(sizeof *dt))) + if (!(dt = malloc(sizeof *dt))) return 0; } else freedt = dt->next; @@ -316,7 +317,8 @@ delete(int f, struct bootblock *boot, struct fatEntry break; e = delbuf + endoff; } - off = startcl * boot->bpbSecPerClust + boot->ClusterOffset; + off = (startcl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off) { perr("Unable to lseek to %" PRId64, off); @@ -431,7 +433,76 @@ checksize(struct bootblock *boot, struct fatEntry *fat return FSOK; } +static const u_char dot_name[11] = ". "; +static const u_char dotdot_name[11] = ".. "; + /* + * Basic sanity check if the subdirectory have good '.' and '..' entries, + * and they are directory entries. Further sanity checks are performed + * when we traverse into it. + */ +static int +check_subdirectory(int f, struct bootblock *boot, struct dosDirEntry *dir) +{ + u_char *buf, *cp; + off_t off; + cl_t cl; + int retval = FSOK; + + cl = dir->head; + if (dir->parent && (cl < CLUST_FIRST || cl >= boot->NumClusters)) { + return FSERROR; + } + + if (!(boot->flags & FAT32) && !dir->parent) { + off = boot->bpbResSectors + boot->bpbFATs * + boot->FATsecs; + } else { + off = (cl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; + } + + /* + * We only need to check the first two entries of the directory, + * which is found in the first sector of the directory entry, + * so read in only the first sector. + */ + buf = malloc(boot->bpbBytesPerSec); + if (buf == NULL) { + perr("No space for directory buffer (%u)", + boot->bpbBytesPerSec); + return FSFATAL; + } + + off *= boot->bpbBytesPerSec; + if (lseek(f, off, SEEK_SET) != off || + read(f, buf, boot->bpbBytesPerSec) != (ssize_t)boot->bpbBytesPerSec) { + perr("Unable to read directory"); + free(buf); + return FSFATAL; + } + + /* + * Both `.' and `..' must be present and be the first two entries + * and be ATTR_DIRECTORY of a valid subdirectory. + */ + cp = buf; + if (memcmp(cp, dot_name, sizeof(dot_name)) != 0 || + (cp[11] & ATTR_DIRECTORY) != ATTR_DIRECTORY) { + pwarn("%s: Incorrect `.' for %s.\n", __func__, dir->name); + retval |= FSERROR; + } + cp += 32; + if (memcmp(cp, dotdot_name, sizeof(dotdot_name)) != 0 || + (cp[11] & ATTR_DIRECTORY) != ATTR_DIRECTORY) { + pwarn("%s: Incorrect `..' for %s. \n", __func__, dir->name); + retval |= FSERROR; + } + + free(buf); + return retval; +} + +/* * Read a directory and * - resolve long name records * - enter file and directory records into the parent's list @@ -468,7 +539,7 @@ readDosDirSection(int f, struct bootblock *boot, struc boot->FATsecs; } else { last = boot->bpbSecPerClust * boot->bpbBytesPerSec; - off = cl * boot->bpbSecPerClust + boot->ClusterOffset; + off = (cl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; } off *= boot->bpbBytesPerSec; @@ -478,9 +549,6 @@ readDosDirSection(int f, struct bootblock *boot, struc return FSFATAL; } last /= 32; - /* - * Check `.' and `..' entries here? XXX - */ for (p = buffer, i = 0; i < last; i++, p += 32) { if (dir->fsckflags & DIREMPWARN) { *p = SLOT_EMPTY; @@ -508,7 +576,8 @@ readDosDirSection(int f, struct bootblock *boot, struc empcl, empty - buffer, cl, p - buffer, 1) == FSFATAL) return FSFATAL; - q = empcl == cl ? empty : buffer; + q = ((empcl == cl) ? empty : buffer); + assert(q != NULL); for (; q < p; q += 32) *q = SLOT_DELETED; mod |= THISMOD|FSDIRMOD; @@ -549,6 +618,15 @@ readDosDirSection(int f, struct bootblock *boot, struc vallfn = NULL; } lidx = *p & LRNOMASK; + if (lidx == 0) { + pwarn("invalid long name\n"); + if (!invlfn) { + invlfn = vallfn; + invcl = valcl; + } + vallfn = NULL; + continue; + } t = longName + --lidx * 13; for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { @@ -816,6 +894,36 @@ readDosDirSection(int f, struct bootblock *boot, struc } } continue; + } else { + /* + * Only one directory entry can point + * to dir->head, it's '.'. + */ + if (dirent.head == dir->head) { + pwarn("%s entry in %s has incorrect start cluster\n", + dirent.name, fullpath(dir)); + if (ask(1, "Remove")) { + *p = SLOT_DELETED; + mod |= THISMOD|FSDIRMOD; + } else + mod |= FSERROR; + continue; + } else if ((check_subdirectory(f, boot, + &dirent) & FSERROR) == FSERROR) { + /* + * A subdirectory should have + * a dot (.) entry and a dot-dot + * (..) entry of ATTR_DIRECTORY, + * we will inspect further when + * traversing into it. + */ + if (ask(1, "Remove")) { + *p = SLOT_DELETED; + mod |= THISMOD|FSDIRMOD; + } else + mod |= FSERROR; + continue; + } } /* create directory tree node */ @@ -959,10 +1067,12 @@ reconnect(int dosfs, struct bootblock *boot, struct fa if (lfcl < CLUST_FIRST || lfcl >= boot->NumClusters) { /* Extend LOSTDIR? XXX */ pwarn("No space in %s\n", LOSTDIR); + lfcl = (lostDir->head < boot->NumClusters) ? lostDir->head : 0; return FSERROR; } - lfoff = lfcl * boot->ClusterSize - + boot->ClusterOffset * boot->bpbBytesPerSec; + lfoff = (lfcl - CLUST_FIRST) * boot->ClusterSize + + boot->FirstCluster * boot->bpbBytesPerSec; + if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perr("could not read LOST.DIR"); Modified: stable/12/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/12/sbin/fsck_msdosfs/dosfs.h Sat Nov 30 05:01:12 2019 (r355220) +++ stable/12/sbin/fsck_msdosfs/dosfs.h Sat Nov 30 05:43:24 2019 (r355221) @@ -74,7 +74,7 @@ struct bootblock { u_int32_t NumSectors; /* how many sectors are there */ u_int32_t FATsecs; /* how many sectors are in FAT */ u_int32_t NumFatEntries; /* how many entries really are there */ - u_int ClusterOffset; /* at what sector would sector 0 start */ + u_int FirstCluster; /* at what sector is Cluster CLUST_FIRST */ u_int ClusterSize; /* Cluster size in bytes */ /* Now some statistics: */ Modified: stable/12/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/12/sbin/fsck_msdosfs/fat.c Sat Nov 30 05:01:12 2019 (r355220) +++ stable/12/sbin/fsck_msdosfs/fat.c Sat Nov 30 05:43:24 2019 (r355221) @@ -518,7 +518,6 @@ clear: } if (head == fat[n].head) { pwarn("Cluster chain starting at %u loops at cluster %u\n", - head, p); goto clear; } @@ -645,8 +644,8 @@ writefat(int fs, struct bootblock *boot, struct fatEnt break; if (fat[cl].next == CLUST_FREE) boot->NumFree++; - *p++ |= (u_char)(fat[cl + 1].next << 4); - *p++ = (u_char)(fat[cl + 1].next >> 4); + *p++ |= (u_char)(fat[cl].next << 4); + *p++ = (u_char)(fat[cl].next >> 4); break; } } @@ -704,6 +703,20 @@ checklost(int dosfs, struct bootblock *boot, struct fa boot->FSFree = boot->NumFree; ret = 1; } + } + if (boot->FSNext != 0xffffffffU && + (boot->FSNext >= boot->NumClusters || + (boot->NumFree && fat[boot->FSNext].next != CLUST_FREE))) { + pwarn("Next free cluster in FSInfo block (%u) %s\n", + boot->FSNext, + (boot->FSNext >= boot->NumClusters) ? "invalid" : "not free"); + if (ask(1, "fix")) + for (head = CLUST_FIRST; head < boot->NumClusters; head++) + if (fat[head].next == CLUST_FREE) { + boot->FSNext = head; + ret = 1; + break; + } } if (ret) mod |= writefsinfo(dosfs, boot); Modified: stable/12/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/12/sbin/fsck_msdosfs/main.c Sat Nov 30 05:01:12 2019 (r355220) +++ stable/12/sbin/fsck_msdosfs/main.c Sat Nov 30 05:43:24 2019 (r355221) @@ -87,16 +87,15 @@ main(int argc, char **argv) exit(5); case 'n': alwaysno = 1; - alwaysyes = preen = 0; + alwaysyes = 0; break; case 'y': alwaysyes = 1; - alwaysno = preen = 0; + alwaysno = 0; break; case 'p': preen = 1; - alwaysyes = alwaysno = 0; break; default: @@ -130,9 +129,10 @@ ask(int def, const char *fmt, ...) char prompt[256]; int c; + if (alwaysyes || alwaysno || rdonly) + def = (alwaysyes && !rdonly && !alwaysno); + if (preen) { - if (rdonly) - def = 0; if (def) printf("FIXED\n"); return def; @@ -141,9 +141,9 @@ ask(int def, const char *fmt, ...) va_start(ap, fmt); vsnprintf(prompt, sizeof(prompt), fmt, ap); va_end(ap); - if (alwaysyes || rdonly) { - printf("%s? %s\n", prompt, rdonly ? "no" : "yes"); - return !rdonly; + if (alwaysyes || alwaysno || rdonly) { + printf("%s? %s\n", prompt, def ? "yes" : "no"); + return def; } do { printf("%s? [yn] ", prompt); From owner-svn-src-stable@freebsd.org Sat Nov 30 06:02:14 2019 Return-Path: Delivered-To: svn-src-stable@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 8DB881C9851; Sat, 30 Nov 2019 06:02:14 +0000 (UTC) (envelope-from delphij@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) server-signature RSA-PSS (4096 bits) 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 47Q1463G5Nz3GR3; Sat, 30 Nov 2019 06:02:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5341522082; Sat, 30 Nov 2019 06:02:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAU62E7J055602; Sat, 30 Nov 2019 06:02:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAU62EZk055601; Sat, 30 Nov 2019 06:02:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911300602.xAU62EZk055601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 30 Nov 2019 06:02: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: r355223 - stable/12/lib/liblzma X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/lib/liblzma X-SVN-Commit-Revision: 355223 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 06:02:14 -0000 Author: delphij Date: Sat Nov 30 06:02:13 2019 New Revision: 355223 URL: https://svnweb.freebsd.org/changeset/base/355223 Log: MFC r342876: Enable use of Capsicum sandbox when there is only one input file (or the input is stdin) and we are not creating output file. Reported by: Lasse Collin Modified: stable/12/lib/liblzma/config.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/liblzma/config.h ============================================================================== --- stable/12/lib/liblzma/config.h Sat Nov 30 05:57:54 2019 (r355222) +++ stable/12/lib/liblzma/config.h Sat Nov 30 06:02:13 2019 (r355223) @@ -26,7 +26,7 @@ /* #undef HAVE_BYTESWAP_H */ /* Define to 1 if Capsicum is available. */ -/* #undef HAVE_CAPSICUM */ +#define HAVE_CAPSICUM 1 /* Define to 1 if the system has the type `CC_SHA256_CTX'. */ /* #undef HAVE_CC_SHA256_CTX */ @@ -261,7 +261,7 @@ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CAPSICUM_H */ +#define HAVE_SYS_CAPSICUM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_ENDIAN_H 1 From owner-svn-src-stable@freebsd.org Sat Nov 30 17:51:09 2019 Return-Path: Delivered-To: svn-src-stable@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 57D0E1B1E8C; Sat, 30 Nov 2019 17:51:09 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QJp51c7Dz4HF0; Sat, 30 Nov 2019 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B3571E18; Sat, 30 Nov 2019 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUHp81Q066360; Sat, 30 Nov 2019 17:51:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUHp8gU066359; Sat, 30 Nov 2019 17:51:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301751.xAUHp8gU066359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 17:51:08 +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: r355233 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 355233 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 17:51:09 -0000 Author: np Date: Sat Nov 30 17:51:08 2019 New Revision: 355233 URL: https://svnweb.freebsd.org/changeset/base/355233 Log: MFC r353578: cxgbe(4): An EQ update can be requested in a TX_PKTS2 work request. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Sat Nov 30 17:30:01 2019 (r355232) +++ stable/12/sys/dev/cxgbe/t4_sge.c Sat Nov 30 17:51:08 2019 (r355233) @@ -2785,6 +2785,7 @@ wr_can_update_eq(struct fw_eth_tx_pkts_wr *wr) case FW_ULPTX_WR: case FW_ETH_TX_PKT_WR: case FW_ETH_TX_PKTS_WR: + case FW_ETH_TX_PKTS2_WR: case FW_ETH_TX_PKT_VM_WR: return (1); default: From owner-svn-src-stable@freebsd.org Sat Nov 30 17:56:06 2019 Return-Path: Delivered-To: svn-src-stable@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 226231B21D9; Sat, 30 Nov 2019 17:56:06 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QJvp06jmz4Hdr; Sat, 30 Nov 2019 17:56:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB7191FAB; Sat, 30 Nov 2019 17:56:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUHu5m8072184; Sat, 30 Nov 2019 17:56:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUHu5Zr072181; Sat, 30 Nov 2019 17:56:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301756.xAUHu5Zr072181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 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: r355234 - in stable/12/sys/dev/cxgbe: . common iw_cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . common iw_cxgbe X-SVN-Commit-Revision: 355234 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 17:56:06 -0000 Author: np Date: Sat Nov 30 17:56:04 2019 New Revision: 355234 URL: https://svnweb.freebsd.org/changeset/base/355234 Log: MFC r354106: cxgbe(4): Use correct FetchBurstMin values for T6. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_regs_values.h stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_regs_values.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_regs_values.h Sat Nov 30 17:51:08 2019 (r355233) +++ stable/12/sys/dev/cxgbe/common/t4_regs_values.h Sat Nov 30 17:56:04 2019 (r355234) @@ -147,6 +147,11 @@ #define X_FETCHBURSTMIN_64B 2 #define X_FETCHBURSTMIN_128B 3 +/* T6 and later use a single-bit encoding for FetchBurstMin */ +#define X_FETCHBURSTMIN_SHIFT_T6 6 +#define X_FETCHBURSTMIN_64B_T6 0 +#define X_FETCHBURSTMIN_128B_T6 1 + #define X_FETCHBURSTMAX_SHIFT 6 #define X_FETCHBURSTMAX_64B 0 #define X_FETCHBURSTMAX_128B 1 Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c Sat Nov 30 17:51:08 2019 (r355233) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c Sat Nov 30 17:56:04 2019 (r355234) @@ -266,7 +266,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4 res->u.sqrq.dcaen_to_eqsize = cpu_to_be32( V_FW_RI_RES_WR_DCAEN(0) | V_FW_RI_RES_WR_DCACPU(0) | - V_FW_RI_RES_WR_FBMIN(2) | + V_FW_RI_RES_WR_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_RI_RES_WR_FBMAX(3) | V_FW_RI_RES_WR_CIDXFTHRESHO(0) | V_FW_RI_RES_WR_CIDXFTHRESH(0) | @@ -288,7 +289,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4 res->u.sqrq.dcaen_to_eqsize = cpu_to_be32( V_FW_RI_RES_WR_DCAEN(0) | V_FW_RI_RES_WR_DCACPU(0) | - V_FW_RI_RES_WR_FBMIN(2) | + V_FW_RI_RES_WR_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_RI_RES_WR_FBMAX(3) | V_FW_RI_RES_WR_CIDXFTHRESHO(0) | V_FW_RI_RES_WR_CIDXFTHRESH(0) | Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Sat Nov 30 17:51:08 2019 (r355233) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Sat Nov 30 17:56:04 2019 (r355234) @@ -159,7 +159,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(chip_id(sc) <= CHELSIO_T5 ? - X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B) | + X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B_T6) | V_FW_IQ_CMD_FL0FBMAX(chip_id(sc) <= CHELSIO_T5 ? X_FETCHBURSTMAX_512B : X_FETCHBURSTMAX_256B)); c.fl0size = htobe16(na->num_rx_desc / 8 + sp->spg_len / EQ_ESIZE); @@ -274,9 +274,11 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(vi->pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(sc->sge.nm_rxq[nm_txq->iqidx].iq_cntxt_id)); - c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) | - V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | - V_FW_EQ_ETH_CMD_EQSIZE(len / EQ_ESIZE)); + c.dcaen_to_eqsize = + htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | + V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_ETH_CMD_EQSIZE(len / EQ_ESIZE)); c.eqaddr = htobe64(nm_txq->ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Sat Nov 30 17:51:08 2019 (r355233) +++ stable/12/sys/dev/cxgbe/t4_sge.c Sat Nov 30 17:56:04 2019 (r355234) @@ -3138,7 +3138,7 @@ alloc_iq_fl(struct vi_info *vi, struct sge_iq *iq, str } c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(chip_id(sc) <= CHELSIO_T5 ? - X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B) | + X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B_T6) | V_FW_IQ_CMD_FL0FBMAX(chip_id(sc) <= CHELSIO_T5 ? X_FETCHBURSTMAX_512B : X_FETCHBURSTMAX_256B)); c.fl0size = htobe16(fl->qsize); @@ -3724,7 +3724,8 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = - htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | + htobe32(V_FW_EQ_CTRL_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | V_FW_EQ_CTRL_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_CTRL_CMD_EQSIZE(qsize)); @@ -3768,9 +3769,11 @@ eth_eq_alloc(struct adapter *sc, struct vi_info *vi, s htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(eq->iqid)); - c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) | - V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | - V_FW_EQ_ETH_CMD_EQSIZE(qsize)); + c.dcaen_to_eqsize = + htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | + V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_ETH_CMD_EQSIZE(qsize)); c.eqaddr = htobe64(eq->ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); @@ -3812,7 +3815,8 @@ ofld_eq_alloc(struct adapter *sc, struct vi_info *vi, V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = - htobe32(V_FW_EQ_OFLD_CMD_FBMIN(X_FETCHBURSTMIN_64B) | + htobe32(V_FW_EQ_OFLD_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_EQ_OFLD_CMD_FBMAX(X_FETCHBURSTMAX_512B) | V_FW_EQ_OFLD_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_OFLD_CMD_EQSIZE(qsize)); From owner-svn-src-stable@freebsd.org Sat Nov 30 17:57:38 2019 Return-Path: Delivered-To: svn-src-stable@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 9F44F1B2267; Sat, 30 Nov 2019 17:57:38 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QJxZ3kmvz4Hlm; Sat, 30 Nov 2019 17:57:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64A781FAC; Sat, 30 Nov 2019 17:57:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUHvcFS072286; Sat, 30 Nov 2019 17:57:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUHvce9072285; Sat, 30 Nov 2019 17:57:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301757.xAUHvce9072285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 17:57:38 +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: r355235 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 355235 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 17:57:38 -0000 Author: np Date: Sat Nov 30 17:57:37 2019 New Revision: 355235 URL: https://svnweb.freebsd.org/changeset/base/355235 Log: MFC r354110: Fix typo in cxgbe.4. Modified: stable/12/share/man/man4/cxgbe.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/cxgbe.4 ============================================================================== --- stable/12/share/man/man4/cxgbe.4 Sat Nov 30 17:56:04 2019 (r355234) +++ stable/12/share/man/man4/cxgbe.4 Sat Nov 30 17:57:37 2019 (r355235) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 24, 2018 +.Dd Oct 25, 2019 .Dt CXGBE 4 .Os .Sh NAME @@ -292,7 +292,7 @@ Settings can be displayed and controlled on a per-port dev..X.pause_settings sysctl. .It Va hw.cxgbe.fec FEC (Forward Error Correction) settings. -0 diables FEC. +0 disables FEC. Bit 0 enables RS FEC, bit 1 enables BASE-R FEC (aka Firecode FEC). The default is -1 which lets the driver pick a value. This tunable establishes the default FEC settings for all ports. From owner-svn-src-stable@freebsd.org Sat Nov 30 18:03:53 2019 Return-Path: Delivered-To: svn-src-stable@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 B73611B25D8; Sat, 30 Nov 2019 18:03:53 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QK4n4SQZz4JGN; Sat, 30 Nov 2019 18:03:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D8F5216A; Sat, 30 Nov 2019 18:03:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUI3r9G077966; Sat, 30 Nov 2019 18:03:53 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUI3rSU077965; Sat, 30 Nov 2019 18:03:53 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301803.xAUI3rSU077965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 18:03:53 +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: r355236 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 355236 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 18:03:53 -0000 Author: np Date: Sat Nov 30 18:03:53 2019 New Revision: 355236 URL: https://svnweb.freebsd.org/changeset/base/355236 Log: MFC r354522: cxgbe(4): Query Vdd from the firmware if its last known value is 0. TVSENSE may not be ready by the time t4_fw_initialize returns and the firmware returns 0 if the driver asks for the Vdd before the sensor is ready. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Sat Nov 30 17:57:37 2019 (r355235) +++ stable/12/sys/dev/cxgbe/t4_main.c Sat Nov 30 18:03:53 2019 (r355236) @@ -645,6 +645,7 @@ static int sysctl_fec(SYSCTL_HANDLER_ARGS); static int sysctl_autoneg(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); static int sysctl_temperature(SYSCTL_HANDLER_ARGS); +static int sysctl_vdd(SYSCTL_HANDLER_ARGS); static int sysctl_loadavg(SYSCTL_HANDLER_ARGS); static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); @@ -6018,8 +6019,8 @@ t4_sysctls(struct adapter *sc) CTLFLAG_RD, sc, 0, sysctl_loadavg, "A", "microprocessor load averages (debug firmwares only)"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_vdd", CTLFLAG_RD, - &sc->params.core_vdd, 0, "core Vdd (in mV)"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "core_vdd", CTLTYPE_INT | + CTLFLAG_RD, sc, 0, sysctl_vdd, "I", "core Vdd (in mV)"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "local_cpus", CTLTYPE_STRING | CTLFLAG_RD, sc, LOCAL_CPUS, @@ -7150,6 +7151,31 @@ sysctl_temperature(SYSCTL_HANDLER_ARGS) rc = sysctl_handle_int(oidp, &t, 0, req); return (rc); +} + +static int +sysctl_vdd(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int rc; + uint32_t param, val; + + if (sc->params.core_vdd == 0) { + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, + "t4vdd"); + if (rc) + return (rc); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_VDD); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + end_synchronized_op(sc, 0); + if (rc) + return (rc); + sc->params.core_vdd = val; + } + + return (sysctl_handle_int(oidp, &sc->params.core_vdd, 0, req)); } static int From owner-svn-src-stable@freebsd.org Sat Nov 30 18:05:39 2019 Return-Path: Delivered-To: svn-src-stable@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 7C61E1B26E7; Sat, 30 Nov 2019 18:05:39 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QK6q2mb5z4JT7; Sat, 30 Nov 2019 18:05:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4306E216C; Sat, 30 Nov 2019 18:05:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUI5dap078093; Sat, 30 Nov 2019 18:05:39 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUI5cUq078092; Sat, 30 Nov 2019 18:05:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301805.xAUI5cUq078092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 18:05:38 +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: r355237 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 355237 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 18:05:39 -0000 Author: np Date: Sat Nov 30 18:05:38 2019 New Revision: 355237 URL: https://svnweb.freebsd.org/changeset/base/355237 Log: MFC r354742: cxgbev(4): Catch up with the pciids in the PF driver. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_iov.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_iov.c Sat Nov 30 18:03:53 2019 (r355236) +++ stable/12/sys/dev/cxgbe/t4_iov.c Sat Nov 30 18:05:38 2019 (r355237) @@ -81,16 +81,10 @@ struct { {0x5012, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5014, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ {0x5015, "Chelsio T502-BT"}, /* 2 x 1G */ -#ifdef notyet - {0x5004, "Chelsio T520-BCH"}, - {0x5005, "Chelsio T540-BCH"}, - {0x5006, "Chelsio T540-CH"}, - {0x5008, "Chelsio T520-CX"}, - {0x500b, "Chelsio B520-SR"}, - {0x500c, "Chelsio B504-BT"}, - {0x500f, "Chelsio Amsterdam"}, - {0x5013, "Chelsio T580-CHR"}, -#endif + {0x5018, "Chelsio T540-BT"}, /* 4 x 10GBaseT */ + {0x5019, "Chelsio T540-LP-BT"}, /* 4 x 10GBaseT */ + {0x501a, "Chelsio T540-SO-BT"}, /* 4 x 10GBaseT, nomem */ + {0x501b, "Chelsio T540-SO-CR"}, /* 4 x 10G, nomem */ }, t6iov_pciids[] = { {0x6000, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6001, "Chelsio T6225-CR"}, /* 2 x 10/25G */ @@ -111,6 +105,12 @@ struct { /* Custom */ {0x6080, "Chelsio T6225 80"}, {0x6081, "Chelsio T62100 81"}, + {0x6082, "Chelsio T6225-CR 82"}, + {0x6083, "Chelsio T62100-CR 83"}, + {0x6084, "Chelsio T64100-CR 84"}, + {0x6085, "Chelsio T6240-SO 85"}, + {0x6086, "Chelsio T6225-SO-CR 86"}, + {0x6087, "Chelsio T6225-CR 87"}, }; static int t4iov_attach_child(device_t dev); Modified: stable/12/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_vf.c Sat Nov 30 18:03:53 2019 (r355236) +++ stable/12/sys/dev/cxgbe/t4_vf.c Sat Nov 30 18:05:38 2019 (r355237) @@ -97,16 +97,10 @@ struct { {0x5812, "Chelsio T560-CR VF"}, /* 1 x 40G, 2 x 10G */ {0x5814, "Chelsio T580-LP-SO-CR VF"}, /* 2 x 40G, nomem */ {0x5815, "Chelsio T502-BT VF"}, /* 2 x 1G */ -#ifdef notyet - {0x5804, "Chelsio T520-BCH VF"}, - {0x5805, "Chelsio T540-BCH VF"}, - {0x5806, "Chelsio T540-CH VF"}, - {0x5808, "Chelsio T520-CX VF"}, - {0x580b, "Chelsio B520-SR VF"}, - {0x580c, "Chelsio B504-BT VF"}, - {0x580f, "Chelsio Amsterdam VF"}, - {0x5813, "Chelsio T580-CHR VF"}, -#endif + {0x5818, "Chelsio T540-BT VF"}, /* 4 x 10GBaseT */ + {0x5819, "Chelsio T540-LP-BT VF"}, /* 4 x 10GBaseT */ + {0x581a, "Chelsio T540-SO-BT VF"}, /* 4 x 10GBaseT, nomem */ + {0x581b, "Chelsio T540-SO-CR VF"}, /* 4 x 10G, nomem */ }, t6vf_pciids[] = { {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ @@ -127,6 +121,12 @@ struct { /* Custom */ {0x6880, "Chelsio T6225 80 VF"}, {0x6881, "Chelsio T62100 81 VF"}, + {0x6882, "Chelsio T6225-CR 82 VF"}, + {0x6883, "Chelsio T62100-CR 83 VF"}, + {0x6884, "Chelsio T64100-CR 84 VF"}, + {0x6885, "Chelsio T6240-SO 85 VF"}, + {0x6886, "Chelsio T6225-SO-CR 86 VF"}, + {0x6887, "Chelsio T6225-CR 87 VF"}, }; static d_ioctl_t t4vf_ioctl; From owner-svn-src-stable@freebsd.org Sat Nov 30 18:55:50 2019 Return-Path: Delivered-To: svn-src-stable@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 B31251B38F4; Sat, 30 Nov 2019 18:55:50 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QLDk4Hzmz4LJ5; Sat, 30 Nov 2019 18:55:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77FF52A69; Sat, 30 Nov 2019 18:55:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUItomo007436; Sat, 30 Nov 2019 18:55:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUItof2007435; Sat, 30 Nov 2019 18:55:50 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301855.xAUItof2007435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 18:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355238 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 355238 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 18:55:50 -0000 Author: np Date: Sat Nov 30 18:55:50 2019 New Revision: 355238 URL: https://svnweb.freebsd.org/changeset/base/355238 Log: MFC r349242: cxgbe/t4_tom: DDP_DEAD is a ddp flag and not a toepcb flag. The driver was in effect setting TPF_ABORT_SHUTDOWN on the toepcb instead of what was intended. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Sat Nov 30 18:05:38 2019 (r355237) +++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Sat Nov 30 18:55:50 2019 (r355238) @@ -225,7 +225,7 @@ release_ddp_resources(struct toepcb *toep) int i; DDP_LOCK(toep); - toep->flags |= DDP_DEAD; + toep->ddp.flags |= DDP_DEAD; for (i = 0; i < nitems(toep->ddp.db); i++) { free_ddp_buffer(toep->td, &toep->ddp.db[i]); } From owner-svn-src-stable@freebsd.org Sat Nov 30 19:21:30 2019 Return-Path: Delivered-To: svn-src-stable@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 D4A311B464A; Sat, 30 Nov 2019 19:21:30 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QLpL4ym5z4Mkx; Sat, 30 Nov 2019 19:21:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E3D52F44; Sat, 30 Nov 2019 19:21:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUJLUEU020868; Sat, 30 Nov 2019 19:21:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUJLUBx020866; Sat, 30 Nov 2019 19:21:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301921.xAUJLUBx020866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 19:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355240 - stable/11/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 355240 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 19:21:30 -0000 Author: np Date: Sat Nov 30 19:21:29 2019 New Revision: 355240 URL: https://svnweb.freebsd.org/changeset/base/355240 Log: MFC r349499: cxgbe/iw_cxgbe: Remove unused field from the endpoint structure. Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Sat Nov 30 19:16:44 2019 (r355239) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Sat Nov 30 19:21:29 2019 (r355240) @@ -526,7 +526,6 @@ set_tcpinfo(struct c4iw_ep *ep) ep->hwtid = toep->tid; ep->snd_seq = tp->snd_nxt; ep->rcv_seq = tp->rcv_nxt; - ep->emss = max(tp->t_maxseg, 128); done: INP_WUNLOCK(inp); return (rc); Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Sat Nov 30 19:16:44 2019 (r355239) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Sat Nov 30 19:21:29 2019 (r355240) @@ -860,7 +860,6 @@ struct c4iw_ep { u32 tx_chan; u32 mtu; u16 mss; - u16 emss; u16 plen; u16 rss_qid; u16 txq_idx; From owner-svn-src-stable@freebsd.org Sat Nov 30 19:33:15 2019 Return-Path: Delivered-To: svn-src-stable@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 C07F21B4CCA; Sat, 30 Nov 2019 19:33:15 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QM3v4lDhz4Ncf; Sat, 30 Nov 2019 19:33:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85F4C3177; Sat, 30 Nov 2019 19:33:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUJXF2v030602; Sat, 30 Nov 2019 19:33:15 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUJXFdr030599; Sat, 30 Nov 2019 19:33:15 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301933.xAUJXFdr030599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 19:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355242 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 355242 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 19:33:15 -0000 Author: np Date: Sat Nov 30 19:33:14 2019 New Revision: 355242 URL: https://svnweb.freebsd.org/changeset/base/355242 Log: MFC r349500: cxgbe/t4_tom: Fix regression in t_maxseg usage within t4_tom. t_maxseg was changed in r293284 to not have any adjustment for TCP timestamps. t4_tom inadvertently went back to pre-r293284 semantics in r332506. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Nov 30 19:33:02 2019 (r355241) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Nov 30 19:33:14 2019 (r355242) @@ -337,31 +337,33 @@ send_reset(struct adapter *sc, struct toepcb *toep, ui * reported by HW to FreeBSD's native format. */ static void -assign_rxopt(struct tcpcb *tp, unsigned int opt) +assign_rxopt(struct tcpcb *tp, uint16_t opt) { struct toepcb *toep = tp->t_toe; struct inpcb *inp = tp->t_inpcb; struct adapter *sc = td_adapter(toep->td); - int n; INP_LOCK_ASSERT(inp); + toep->tcp_opt = opt; + toep->mtu_idx = G_TCPOPT_MSS(opt); + tp->t_maxseg = sc->params.mtus[toep->mtu_idx]; if (inp->inp_inc.inc_flags & INC_ISIPV6) - n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); + tp->t_maxseg -= sizeof(struct ip6_hdr) + sizeof(struct tcphdr); else - n = sizeof(struct ip) + sizeof(struct tcphdr); - tp->t_maxseg = sc->params.mtus[G_TCPOPT_MSS(opt)] - n; + tp->t_maxseg -= sizeof(struct ip) + sizeof(struct tcphdr); + toep->emss = tp->t_maxseg; if (G_TCPOPT_TSTAMP(opt)) { tp->t_flags |= TF_RCVD_TSTMP; /* timestamps ok */ tp->ts_recent = 0; /* hmmm */ tp->ts_recent_age = tcp_ts_getticks(); - tp->t_maxseg -= TCPOLEN_TSTAMP_APPA; + toep->emss -= TCPOLEN_TSTAMP_APPA; } - CTR5(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u), mss %u", __func__, - toep->tid, G_TCPOPT_MSS(opt), sc->params.mtus[G_TCPOPT_MSS(opt)], - tp->t_maxseg); + CTR6(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u), t_maxseg %u, emss %u", + __func__, toep->tid, toep->mtu_idx, + sc->params.mtus[G_TCPOPT_MSS(opt)], tp->t_maxseg, toep->emss); if (G_TCPOPT_SACK(opt)) tp->t_flags |= TF_SACK_PERMIT; /* should already be set */ @@ -409,7 +411,7 @@ make_established(struct toepcb *toep, uint32_t iss, ui tp->irs = irs; tcp_rcvseqinit(tp); - tp->rcv_wnd = toep->opt0_rcv_bufsize << 10; + tp->rcv_wnd = (u_int)toep->opt0_rcv_bufsize << 10; tp->rcv_adv += tp->rcv_wnd; tp->last_ack_sent = tp->rcv_nxt; @@ -431,7 +433,7 @@ make_established(struct toepcb *toep, uint32_t iss, ui ftxp.snd_nxt = tp->snd_nxt; ftxp.rcv_nxt = tp->rcv_nxt; ftxp.snd_space = bufsize; - ftxp.mss = tp->t_maxseg; + ftxp.mss = toep->emss; send_flowc_wr(toep, &ftxp); soisconnected(so); @@ -623,7 +625,7 @@ write_tx_wr(void *dst, struct toepcb *toep, unsigned i if (txalign > 0) { struct tcpcb *tp = intotcpcb(toep->inp); - if (plen < 2 * tp->t_maxseg) + if (plen < 2 * toep->emss) txwr->lsodisable_to_flags |= htobe32(F_FW_OFLD_TX_DATA_WR_LSODISABLE); else Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Sat Nov 30 19:33:02 2019 (r355241) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Sat Nov 30 19:33:14 2019 (r355242) @@ -532,8 +532,7 @@ remove_tid(struct adapter *sc, int tid, int ntids) * What mtu_idx to use, given a 4-tuple. Note that both s->mss and tcp_mssopt * have the MSS that we should advertise in our SYN. Advertised MSS doesn't * account for any TCP options so the effective MSS (only payload, no headers or - * options) could be different. We fill up tp->t_maxseg with the effective MSS - * at the end of the 3-way handshake. + * options) could be different. */ int find_best_mtu_idx(struct adapter *sc, struct in_conninfo *inc, Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Sat Nov 30 19:33:02 2019 (r355241) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Sat Nov 30 19:33:14 2019 (r355242) @@ -178,7 +178,10 @@ struct toepcb { u_int tx_nocompl; /* tx WR credits since last compl request */ u_int plen_nocompl; /* payload since last compl request */ - int opt0_rcv_bufsize; /* XXX: save full opt0/opt2 for later? */ + uint16_t opt0_rcv_bufsize; /* XXX: save full opt0/opt2 for later? */ + uint16_t mtu_idx; + uint16_t emss; + uint16_t tcp_opt; u_int ulp_mode; /* ULP mode */ void *ulpcb; From owner-svn-src-stable@freebsd.org Sat Nov 30 19:35:20 2019 Return-Path: Delivered-To: svn-src-stable@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 D99D81B4DDF; Sat, 30 Nov 2019 19:35:20 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QM6J4L4yz4Nls; Sat, 30 Nov 2019 19:35:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78E61317D; Sat, 30 Nov 2019 19:35:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUJZKfj030742; Sat, 30 Nov 2019 19:35:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUJZKvB030741; Sat, 30 Nov 2019 19:35:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301935.xAUJZKvB030741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 19:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355243 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe X-SVN-Commit-Revision: 355243 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 19:35:20 -0000 Author: np Date: Sat Nov 30 19:35:20 2019 New Revision: 355243 URL: https://svnweb.freebsd.org/changeset/base/355243 Log: MFC r349865: cxgbe(4): Use the simplest configuration possible when falling back from the default configuration. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Sat Nov 30 19:33:14 2019 (r355242) +++ stable/11/sys/dev/cxgbe/t4_main.c Sat Nov 30 19:35:20 2019 (r355243) @@ -3959,10 +3959,8 @@ retry: rc, cfg_file); snprintf(cfg_file, sizeof(cfg_file), "%s", BUILTIN_CF); bzero(&caps_allowed, sizeof(caps_allowed)); - COPY_CAPS(nbm); - COPY_CAPS(link); COPY_CAPS(switch); - COPY_CAPS(nic); + caps_allowed.niccaps = FW_CAPS_CONFIG_NIC; fallback = false; goto retry; } From owner-svn-src-stable@freebsd.org Sat Nov 30 19:52:48 2019 Return-Path: Delivered-To: svn-src-stable@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 8081E1B55D2; Sat, 30 Nov 2019 19:52:48 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QMVS2rMRz4Pg6; Sat, 30 Nov 2019 19:52:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 461F136B8; Sat, 30 Nov 2019 19:52:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUJqmvb042393; Sat, 30 Nov 2019 19:52:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUJqm8x042392; Sat, 30 Nov 2019 19:52:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301952.xAUJqm8x042392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 19:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355244 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/common X-SVN-Commit-Revision: 355244 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 19:52:48 -0000 Author: np Date: Sat Nov 30 19:52:47 2019 New Revision: 355244 URL: https://svnweb.freebsd.org/changeset/base/355244 Log: MFC r349956: cxgbe(4): Completely ignore all top level interrupts that are not enabled. The driver used to log any non-zero cause and when running with a single line interrupt it would spam the console/logs with reports of interrupts that are of no interest to anyone. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Sat Nov 30 19:35:20 2019 (r355243) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Sat Nov 30 19:52:47 2019 (r355244) @@ -4021,17 +4021,16 @@ t4_handle_intr(struct adapter *adap, const struct intr bool rc; const struct intr_action *action; - /* read and display cause. */ - cause = t4_read_reg(adap, ii->cause_reg); - if (verbose || cause != 0) - t4_show_intr_info(adap, ii, cause); /* - * The top level interrupt cause is a bit special and we need to ignore - * the bits that are not in the enable. Note that we did display them - * above in t4_show_intr_info but will not clear them. + * Read and display cause. Note that the top level PL_INT_CAUSE is a + * bit special and we need to completely ignore the bits that are not in + * PL_INT_ENABLE. */ + cause = t4_read_reg(adap, ii->cause_reg); if (ii->cause_reg == A_PL_INT_CAUSE) cause &= t4_read_reg(adap, ii->enable_reg); + if (verbose || cause != 0) + t4_show_intr_info(adap, ii, cause); fatal = cause & ii->fatal; if (fatal != 0 && ii->flags & NONFATAL_IF_DISABLED) fatal &= t4_read_reg(adap, ii->enable_reg); From owner-svn-src-stable@freebsd.org Sat Nov 30 19:54:46 2019 Return-Path: Delivered-To: svn-src-stable@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 A711D1B5689; Sat, 30 Nov 2019 19:54:46 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QMXk3Pyzz4PnP; Sat, 30 Nov 2019 19:54:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5419436B9; Sat, 30 Nov 2019 19:54:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUJskdt042524; Sat, 30 Nov 2019 19:54:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUJskJN042523; Sat, 30 Nov 2019 19:54:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911301954.xAUJskJN042523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 19:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355245 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 355245 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 19:54:46 -0000 Author: np Date: Sat Nov 30 19:54:45 2019 New Revision: 355245 URL: https://svnweb.freebsd.org/changeset/base/355245 Log: MFC r351445: whitespace nit. Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Sat Nov 30 19:52:47 2019 (r355244) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Sat Nov 30 19:54:45 2019 (r355245) @@ -1143,7 +1143,7 @@ get_l2te_for_nexthop(struct port_info *pi, struct ifne struct l2t_entry *e; struct sockaddr_in6 sin6; struct sockaddr *dst = (void *)&sin6; - + if (inc->inc_flags & INC_ISIPV6) { struct nhop6_basic nh6; From owner-svn-src-stable@freebsd.org Sat Nov 30 20:04:40 2019 Return-Path: Delivered-To: svn-src-stable@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 D165B1B5B9D; Sat, 30 Nov 2019 20:04:40 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QMm85Dkxz4QLT; Sat, 30 Nov 2019 20:04:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96FFE389F; Sat, 30 Nov 2019 20:04:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUK4e1o048347; Sat, 30 Nov 2019 20:04:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUK4ecS048346; Sat, 30 Nov 2019 20:04:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302004.xAUK4ecS048346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 20:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355246 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 355246 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 20:04:40 -0000 Author: np Date: Sat Nov 30 20:04:40 2019 New Revision: 355246 URL: https://svnweb.freebsd.org/changeset/base/355246 Log: MFC r351446: cxgbe/t4_tom: Any invalid scaling factor in the hardware's wsf field implies that window scaling is not in use. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Sat Nov 30 19:54:45 2019 (r355245) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Sat Nov 30 20:04:40 2019 (r355246) @@ -992,7 +992,7 @@ t4opt_to_tcpopt(const struct tcp_options *t4opt, struc to->to_mss = be16toh(t4opt->mss); } - if (t4opt->wsf) { + if (t4opt->wsf > 0 && t4opt->wsf < 15) { to->to_flags |= TOF_SCALE; to->to_wscale = t4opt->wsf; } From owner-svn-src-stable@freebsd.org Sat Nov 30 20:22:04 2019 Return-Path: Delivered-To: svn-src-stable@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 19B541B6A65; Sat, 30 Nov 2019 20:22:04 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QN8C6zgGz4S7P; Sat, 30 Nov 2019 20:22:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2DF53C8F; Sat, 30 Nov 2019 20:22:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUKM3mQ059027; Sat, 30 Nov 2019 20:22:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUKM3XH059026; Sat, 30 Nov 2019 20:22:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302022.xAUKM3XH059026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 20:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355249 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 355249 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 20:22:04 -0000 Author: np Date: Sat Nov 30 20:22:03 2019 New Revision: 355249 URL: https://svnweb.freebsd.org/changeset/base/355249 Log: MFC r351524: cxgbe/t4_tom: Limit work requests with immediate payload to a single descriptor. The per-tid tx credits are in demand during active Tx and it's best not to use too many just for payload. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Nov 30 20:10:50 2019 (r355248) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Nov 30 20:22:03 2019 (r355249) @@ -572,7 +572,7 @@ t4_close_conn(struct adapter *sc, struct toepcb *toep) static inline int max_imm_payload(int tx_credits) { - const int n = 2; /* Use only up to 2 desc for imm. data WR */ + const int n = 1; /* Use no more than one desc for imm. data WR */ KASSERT(tx_credits >= 0 && tx_credits <= MAX_OFLD_TX_CREDITS, From owner-svn-src-stable@freebsd.org Sat Nov 30 20:42:19 2019 Return-Path: Delivered-To: svn-src-stable@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 5412C1B788B; Sat, 30 Nov 2019 20:42:19 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QNbb1XKGz4TwY; Sat, 30 Nov 2019 20:42:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 192074092; Sat, 30 Nov 2019 20:42:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUKgImK072133; Sat, 30 Nov 2019 20:42:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUKgIqI072130; Sat, 30 Nov 2019 20:42:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302042.xAUKgIqI072130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 20:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355250 - in stable/11/sys/dev/cxgbe: . common iw_cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/11/sys/dev/cxgbe: . common iw_cxgbe X-SVN-Commit-Revision: 355250 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 20:42:19 -0000 Author: np Date: Sat Nov 30 20:42:18 2019 New Revision: 355250 URL: https://svnweb.freebsd.org/changeset/base/355250 Log: MFC r354106: cxgbe(4): Use correct FetchBurstMin values for T6. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_regs_values.h stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c stable/11/sys/dev/cxgbe/t4_netmap.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_regs_values.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_regs_values.h Sat Nov 30 20:22:03 2019 (r355249) +++ stable/11/sys/dev/cxgbe/common/t4_regs_values.h Sat Nov 30 20:42:18 2019 (r355250) @@ -145,6 +145,11 @@ #define X_FETCHBURSTMIN_64B 2 #define X_FETCHBURSTMIN_128B 3 +/* T6 and later use a single-bit encoding for FetchBurstMin */ +#define X_FETCHBURSTMIN_SHIFT_T6 6 +#define X_FETCHBURSTMIN_64B_T6 0 +#define X_FETCHBURSTMIN_128B_T6 1 + #define X_FETCHBURSTMAX_SHIFT 6 #define X_FETCHBURSTMAX_64B 0 #define X_FETCHBURSTMAX_128B 1 Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Sat Nov 30 20:22:03 2019 (r355249) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Sat Nov 30 20:42:18 2019 (r355250) @@ -264,7 +264,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4 res->u.sqrq.dcaen_to_eqsize = cpu_to_be32( V_FW_RI_RES_WR_DCAEN(0) | V_FW_RI_RES_WR_DCACPU(0) | - V_FW_RI_RES_WR_FBMIN(2) | + V_FW_RI_RES_WR_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_RI_RES_WR_FBMAX(3) | V_FW_RI_RES_WR_CIDXFTHRESHO(0) | V_FW_RI_RES_WR_CIDXFTHRESH(0) | @@ -286,7 +287,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4 res->u.sqrq.dcaen_to_eqsize = cpu_to_be32( V_FW_RI_RES_WR_DCAEN(0) | V_FW_RI_RES_WR_DCACPU(0) | - V_FW_RI_RES_WR_FBMIN(2) | + V_FW_RI_RES_WR_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_RI_RES_WR_FBMAX(3) | V_FW_RI_RES_WR_CIDXFTHRESHO(0) | V_FW_RI_RES_WR_CIDXFTHRESH(0) | Modified: stable/11/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_netmap.c Sat Nov 30 20:22:03 2019 (r355249) +++ stable/11/sys/dev/cxgbe/t4_netmap.c Sat Nov 30 20:42:18 2019 (r355250) @@ -134,7 +134,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(chip_id(sc) <= CHELSIO_T5 ? - X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B) | + X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B_T6) | V_FW_IQ_CMD_FL0FBMAX(chip_id(sc) <= CHELSIO_T5 ? X_FETCHBURSTMAX_512B : X_FETCHBURSTMAX_256B)); c.fl0size = htobe16(na->num_rx_desc / 8 + sp->spg_len / EQ_ESIZE); @@ -248,9 +248,11 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(vi->pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(sc->sge.nm_rxq[nm_txq->iqidx].iq_cntxt_id)); - c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) | - V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | - V_FW_EQ_ETH_CMD_EQSIZE(len / EQ_ESIZE)); + c.dcaen_to_eqsize = + htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | + V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_ETH_CMD_EQSIZE(len / EQ_ESIZE)); c.eqaddr = htobe64(nm_txq->ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Sat Nov 30 20:22:03 2019 (r355249) +++ stable/11/sys/dev/cxgbe/t4_sge.c Sat Nov 30 20:42:18 2019 (r355250) @@ -2886,7 +2886,7 @@ alloc_iq_fl(struct vi_info *vi, struct sge_iq *iq, str } c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(chip_id(sc) <= CHELSIO_T5 ? - X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B) | + X_FETCHBURSTMIN_128B : X_FETCHBURSTMIN_64B_T6) | V_FW_IQ_CMD_FL0FBMAX(chip_id(sc) <= CHELSIO_T5 ? X_FETCHBURSTMAX_512B : X_FETCHBURSTMAX_256B)); c.fl0size = htobe16(fl->qsize); @@ -3458,7 +3458,8 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = - htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | + htobe32(V_FW_EQ_CTRL_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | V_FW_EQ_CTRL_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_CTRL_CMD_EQSIZE(qsize)); @@ -3502,9 +3503,11 @@ eth_eq_alloc(struct adapter *sc, struct vi_info *vi, s htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(eq->iqid)); - c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) | - V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | - V_FW_EQ_ETH_CMD_EQSIZE(qsize)); + c.dcaen_to_eqsize = + htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | + V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_ETH_CMD_EQSIZE(qsize)); c.eqaddr = htobe64(eq->ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); @@ -3546,7 +3549,8 @@ ofld_eq_alloc(struct adapter *sc, struct vi_info *vi, V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = - htobe32(V_FW_EQ_OFLD_CMD_FBMIN(X_FETCHBURSTMIN_64B) | + htobe32(V_FW_EQ_OFLD_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? + X_FETCHBURSTMIN_64B : X_FETCHBURSTMIN_64B_T6) | V_FW_EQ_OFLD_CMD_FBMAX(X_FETCHBURSTMAX_512B) | V_FW_EQ_OFLD_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_OFLD_CMD_EQSIZE(qsize)); From owner-svn-src-stable@freebsd.org Sat Nov 30 20:43:31 2019 Return-Path: Delivered-To: svn-src-stable@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 919151B79B5; Sat, 30 Nov 2019 20:43:31 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QNcz3MXHz4V6V; Sat, 30 Nov 2019 20:43:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5655A40B0; Sat, 30 Nov 2019 20:43:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUKhV2N072226; Sat, 30 Nov 2019 20:43:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUKhVtS072225; Sat, 30 Nov 2019 20:43:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302043.xAUKhVtS072225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 20:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355251 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 355251 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 20:43:31 -0000 Author: np Date: Sat Nov 30 20:43:30 2019 New Revision: 355251 URL: https://svnweb.freebsd.org/changeset/base/355251 Log: MFC r354110: Fix typo in cxgbe.4. Modified: stable/11/share/man/man4/cxgbe.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/cxgbe.4 ============================================================================== --- stable/11/share/man/man4/cxgbe.4 Sat Nov 30 20:42:18 2019 (r355250) +++ stable/11/share/man/man4/cxgbe.4 Sat Nov 30 20:43:30 2019 (r355251) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 24, 2018 +.Dd Oct 25, 2019 .Dt CXGBE 4 .Os .Sh NAME @@ -291,7 +291,7 @@ Settings can be displayed and controlled on a per-port dev..X.pause_settings sysctl. .It Va hw.cxgbe.fec FEC (Forward Error Correction) settings. -0 diables FEC. +0 disables FEC. Bit 0 enables RS FEC, bit 1 enables BASE-R FEC (aka Firecode FEC). The default is -1 which lets the driver pick a value. This tunable establishes the default FEC settings for all ports. From owner-svn-src-stable@freebsd.org Sat Nov 30 20:51:48 2019 Return-Path: Delivered-To: svn-src-stable@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 365FA1B7E55; Sat, 30 Nov 2019 20:51:48 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QNpX0jkTz4Vh9; Sat, 30 Nov 2019 20:51:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0BF9412A; Sat, 30 Nov 2019 20:51:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAUKplaF077154; Sat, 30 Nov 2019 20:51:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAUKplal077151; Sat, 30 Nov 2019 20:51:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302051.xAUKplal077151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 20:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355252 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe X-SVN-Commit-Revision: 355252 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 20:51:48 -0000 Author: np Date: Sat Nov 30 20:51:47 2019 New Revision: 355252 URL: https://svnweb.freebsd.org/changeset/base/355252 Log: MFC r354522: cxgbe(4): Query Vdd from the firmware if its last known value is 0. TVSENSE may not be ready by the time t4_fw_initialize returns and the firmware returns 0 if the driver asks for the Vdd before the sensor is ready. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Sat Nov 30 20:43:30 2019 (r355251) +++ stable/11/sys/dev/cxgbe/t4_main.c Sat Nov 30 20:51:47 2019 (r355252) @@ -640,6 +640,7 @@ static int sysctl_fec(SYSCTL_HANDLER_ARGS); static int sysctl_autoneg(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); static int sysctl_temperature(SYSCTL_HANDLER_ARGS); +static int sysctl_vdd(SYSCTL_HANDLER_ARGS); static int sysctl_loadavg(SYSCTL_HANDLER_ARGS); static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); @@ -5959,8 +5960,8 @@ t4_sysctls(struct adapter *sc) CTLFLAG_RD, sc, 0, sysctl_loadavg, "A", "microprocessor load averages (debug firmwares only)"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_vdd", CTLFLAG_RD, - &sc->params.core_vdd, 0, "core Vdd (in mV)"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "core_vdd", CTLTYPE_INT | + CTLFLAG_RD, sc, 0, sysctl_vdd, "I", "core Vdd (in mV)"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "local_cpus", CTLTYPE_STRING | CTLFLAG_RD, sc, LOCAL_CPUS, @@ -7087,6 +7088,31 @@ sysctl_temperature(SYSCTL_HANDLER_ARGS) rc = sysctl_handle_int(oidp, &t, 0, req); return (rc); +} + +static int +sysctl_vdd(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int rc; + uint32_t param, val; + + if (sc->params.core_vdd == 0) { + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, + "t4vdd"); + if (rc) + return (rc); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_VDD); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + end_synchronized_op(sc, 0); + if (rc) + return (rc); + sc->params.core_vdd = val; + } + + return (sysctl_handle_int(oidp, &sc->params.core_vdd, 0, req)); } static int From owner-svn-src-stable@freebsd.org Sat Nov 30 21:11:18 2019 Return-Path: Delivered-To: svn-src-stable@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 083FE1B8D47; Sat, 30 Nov 2019 21:11:18 +0000 (UTC) (envelope-from np@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) server-signature RSA-PSS (4096 bits) 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 47QPF16WtGz4XBq; Sat, 30 Nov 2019 21:11:17 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3F1A4479; Sat, 30 Nov 2019 21:11:17 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAULBHIm085436; Sat, 30 Nov 2019 21:11:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAULBHOO085435; Sat, 30 Nov 2019 21:11:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201911302111.xAULBHOO085435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 30 Nov 2019 21:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355253 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe X-SVN-Commit-Revision: 355253 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@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2019 21:11:18 -0000 Author: np Date: Sat Nov 30 21:11:17 2019 New Revision: 355253 URL: https://svnweb.freebsd.org/changeset/base/355253 Log: MFC r354742: cxgbev(4): Catch up with the pciids in the PF driver. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_iov.c stable/11/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Sat Nov 30 20:51:47 2019 (r355252) +++ stable/11/sys/dev/cxgbe/t4_iov.c Sat Nov 30 21:11:17 2019 (r355253) @@ -81,16 +81,10 @@ struct { {0x5012, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5014, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ {0x5015, "Chelsio T502-BT"}, /* 2 x 1G */ -#ifdef notyet - {0x5004, "Chelsio T520-BCH"}, - {0x5005, "Chelsio T540-BCH"}, - {0x5006, "Chelsio T540-CH"}, - {0x5008, "Chelsio T520-CX"}, - {0x500b, "Chelsio B520-SR"}, - {0x500c, "Chelsio B504-BT"}, - {0x500f, "Chelsio Amsterdam"}, - {0x5013, "Chelsio T580-CHR"}, -#endif + {0x5018, "Chelsio T540-BT"}, /* 4 x 10GBaseT */ + {0x5019, "Chelsio T540-LP-BT"}, /* 4 x 10GBaseT */ + {0x501a, "Chelsio T540-SO-BT"}, /* 4 x 10GBaseT, nomem */ + {0x501b, "Chelsio T540-SO-CR"}, /* 4 x 10G, nomem */ }, t6iov_pciids[] = { {0x6000, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6001, "Chelsio T6225-CR"}, /* 2 x 10/25G */ @@ -111,6 +105,12 @@ struct { /* Custom */ {0x6080, "Chelsio T6225 80"}, {0x6081, "Chelsio T62100 81"}, + {0x6082, "Chelsio T6225-CR 82"}, + {0x6083, "Chelsio T62100-CR 83"}, + {0x6084, "Chelsio T64100-CR 84"}, + {0x6085, "Chelsio T6240-SO 85"}, + {0x6086, "Chelsio T6225-SO-CR 86"}, + {0x6087, "Chelsio T6225-CR 87"}, }; static int t4iov_attach_child(device_t dev); Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Sat Nov 30 20:51:47 2019 (r355252) +++ stable/11/sys/dev/cxgbe/t4_vf.c Sat Nov 30 21:11:17 2019 (r355253) @@ -97,16 +97,10 @@ struct { {0x5812, "Chelsio T560-CR VF"}, /* 1 x 40G, 2 x 10G */ {0x5814, "Chelsio T580-LP-SO-CR VF"}, /* 2 x 40G, nomem */ {0x5815, "Chelsio T502-BT VF"}, /* 2 x 1G */ -#ifdef notyet - {0x5804, "Chelsio T520-BCH VF"}, - {0x5805, "Chelsio T540-BCH VF"}, - {0x5806, "Chelsio T540-CH VF"}, - {0x5808, "Chelsio T520-CX VF"}, - {0x580b, "Chelsio B520-SR VF"}, - {0x580c, "Chelsio B504-BT VF"}, - {0x580f, "Chelsio Amsterdam VF"}, - {0x5813, "Chelsio T580-CHR VF"}, -#endif + {0x5818, "Chelsio T540-BT VF"}, /* 4 x 10GBaseT */ + {0x5819, "Chelsio T540-LP-BT VF"}, /* 4 x 10GBaseT */ + {0x581a, "Chelsio T540-SO-BT VF"}, /* 4 x 10GBaseT, nomem */ + {0x581b, "Chelsio T540-SO-CR VF"}, /* 4 x 10G, nomem */ }, t6vf_pciids[] = { {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ @@ -127,6 +121,12 @@ struct { /* Custom */ {0x6880, "Chelsio T6225 80 VF"}, {0x6881, "Chelsio T62100 81 VF"}, + {0x6882, "Chelsio T6225-CR 82 VF"}, + {0x6883, "Chelsio T62100-CR 83 VF"}, + {0x6884, "Chelsio T64100-CR 84 VF"}, + {0x6885, "Chelsio T6240-SO 85 VF"}, + {0x6886, "Chelsio T6225-SO-CR 86 VF"}, + {0x6887, "Chelsio T6225-CR 87 VF"}, }; static d_ioctl_t t4vf_ioctl;