svn commit: r362983 - stable/12/share/man/man7
Author: lwhsu Date: Tue Jul 7 06:04:21 2020 New Revision: 362983 URL: https://svnweb.freebsd.org/changeset/base/362983 Log: MFC r362539: Mention CI system information in development(7) Approved by: 0mp, bcr Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25340 Modified: stable/12/share/man/man7/development.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/development.7 == --- stable/12/share/man/man7/development.7 Tue Jul 7 02:43:53 2020 (r362982) +++ stable/12/share/man/man7/development.7 Tue Jul 7 06:04:21 2020 (r362983) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 22, 2018 +.Dd June 23, 2020 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -103,6 +103,14 @@ suggest improvements, and, eventually, allows them to commit it: .Pp .Lk https://reviews.FreeBSD.org/ +.Pp +To check the latest +.Fx +build and test status of CURRENT and STABLE branches, +the continuous integration system is at: +.Pp +.Lk https://ci.FreeBSD.org +.Pp .Sh EXAMPLES Check out the CURRENT branch, build it, and install, overwriting the current system: ___ 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-unsubscr...@freebsd.org"
svn commit: r362982 - head
Author: glebius Date: Tue Jul 7 02:43:53 2020 New Revision: 362982 URL: https://svnweb.freebsd.org/changeset/base/362982 Log: Fixup r362981: remove gzipped manual pages. Pointy hat to:glebius Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Jul 7 02:41:51 2020(r362981) +++ head/ObsoleteFiles.inc Tue Jul 7 02:43:53 2020(r362982) @@ -37,10 +37,10 @@ # done # 20200706: update of sglist(9), r360574 -OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9.gz # 20200617: update opencsd to 0.14.2 OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.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-unsubscr...@freebsd.org"
svn commit: r362981 - in head: . share/man/man9
Author: glebius Date: Tue Jul 7 02:41:51 2020 New Revision: 362981 URL: https://svnweb.freebsd.org/changeset/base/362981 Log: Fixup for r360574: install new mlinks for sglist(9) and remove old ones. Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Jul 7 00:42:23 2020(r362980) +++ head/ObsoleteFiles.inc Tue Jul 7 02:41:51 2020(r362981) @@ -36,6 +36,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20200706: update of sglist(9), r360574 +OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9 + # 20200617: update opencsd to 0.14.2 OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileTue Jul 7 00:42:23 2020 (r362980) +++ head/share/man/man9/MakefileTue Jul 7 02:41:51 2020 (r362981) @@ -1902,9 +1902,8 @@ MLINKS+=sf_buf.9 sf_buf_alloc.9 \ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_append.9 \ sglist.9 sglist_append_bio.9 \ - sglist.9 sglist_append_ext_pgs.9 \ - sglist.9 sglist_append_mb_ext_pgs.9 \ sglist.9 sglist_append_mbuf.9 \ + sglist.9 sglist_append_mbuf_epg.9 \ sglist.9 sglist_append_phys.9 \ sglist.9 sglist_append_sglist.9 \ sglist.9 sglist_append_uio.9 \ @@ -1914,8 +1913,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_clone.9 \ sglist.9 sglist_consume_uio.9 \ sglist.9 sglist_count.9 \ - sglist.9 sglist_count_ext_pgs.9 \ - sglist.9 sglist_count_mb_ext_pgs.9 \ + sglist.9 sglist_count_mbuf_epg.9 \ sglist.9 sglist_count_vmpages.9 \ sglist.9 sglist_free.9 \ sglist.9 sglist_hold.9 \ ___ 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-unsubscr...@freebsd.org"
svn commit: r362980 - head/sys/fs/nfs
Author: rmacklem Date: Tue Jul 7 00:42:23 2020 New Revision: 362980 URL: https://svnweb.freebsd.org/changeset/base/362980 Log: Add support for ext_pgs mbufs to nfsrvd_rephead(). This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cMon Jul 6 22:39:42 2020 (r362979) +++ head/sys/fs/nfs/nfs_commonsubs.cTue Jul 7 00:42:23 2020 (r362980) @@ -4443,21 +4443,30 @@ nfsrvd_rephead(struct nfsrv_descript *nd) { struct mbuf *mreq; - /* -* If this is a big reply, use a cluster. -*/ - if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && - nfs_bigreply[nd->nd_procnum]) { - NFSMCLGET(mreq, M_WAITOK); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + if ((nd->nd_flag & ND_EXTPG) != 0) { + mreq = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + nd->nd_mreq = nd->nd_mb = mreq; + nd->nd_bpos = (char *)(void *) + PHYS_TO_DMAP(mreq->m_epg_pa[0]); + nd->nd_bextpg = 0; + nd->nd_bextpgsiz = PAGE_SIZE; } else { - NFSMGET(mreq); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + /* +* If this is a big reply, use a cluster. +*/ + if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && + nfs_bigreply[nd->nd_procnum]) { + NFSMCLGET(mreq, M_WAITOK); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } else { + NFSMGET(mreq); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } + nd->nd_bpos = mtod(mreq, char *); + mreq->m_len = 0; } - nd->nd_bpos = mtod(mreq, caddr_t); - mreq->m_len = 0; if ((nd->nd_flag & ND_GSSINITREPLY) == 0) NFSM_BUILD(nd->nd_errp, int *, NFSX_UNSIGNED); ___ 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-unsubscr...@freebsd.org"
svn commit: r362979 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Author: brooks Date: Mon Jul 6 22:39:42 2020 New Revision: 362979 URL: https://svnweb.freebsd.org/changeset/base/362979 Log: Fix a Wvoid-pointer-to-enum-cast warning missed in r359978. This pattern is used in callbacks with void * data arguments and seems both relatively uncommon and relatively harmless. Silence the warning by casting through uintptr_t. This warning is on by default in Clang 11. MFC after:3 days Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D24425 Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c == --- head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.cMon Jul 6 21:39:14 2020(r362978) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.cMon Jul 6 22:39:42 2020(r362979) @@ -179,7 +179,7 @@ int iidesc_count_type(void *data, void *private) { iidesc_t *ii = data; - iitype_t match = (iitype_t)private; + iitype_t match = (iitype_t)(uintptr_t)private; return (ii->ii_type == match); } ___ 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-unsubscr...@freebsd.org"
svn commit: r362978 - head/stand
Author: mhorne Date: Mon Jul 6 21:39:14 2020 New Revision: 362978 URL: https://svnweb.freebsd.org/changeset/base/362978 Log: Fix cleandir target post r362973 Reported by: mmacy Modified: head/stand/defs.mk Modified: head/stand/defs.mk == --- head/stand/defs.mk Mon Jul 6 21:29:50 2020(r362977) +++ head/stand/defs.mk Mon Jul 6 21:39:14 2020(r362978) @@ -151,7 +151,7 @@ CFLAGS+=-fPIC # Some RISC-V linkers have support for relaxations, while some (lld) do not # yet. If this is the case we inhibit the compiler from emitting relaxations. -.if ${LINKER_FEATURES:Mriscv-relaxations} == "" +.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS+= -mno-relax .endif ___ 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-unsubscr...@freebsd.org"
svn commit: r362977 - head/sys/riscv/riscv
Author: kp Date: Mon Jul 6 21:29:50 2020 New Revision: 362977 URL: https://svnweb.freebsd.org/changeset/base/362977 Log: riscv plic: Do not complete interrupts until the interrupt handler has run We cannot complete the interrupt (i.e. write to the claims/complete register until the interrupt handler has actually run. We don't run the interrupt handler immediately from intr_isrc_dispatch(), we only schedule it for later execution. If we immediately complete it (i.e. before the interrupt handler proper has run) the interrupt may be triggered again if the interrupt source remains set. From RISC-V Instruction Set Manual: Volume II: Priviliged Architecture, 7.4 Interrupt Gateways: "If a level-sensitive interrupt source deasserts the interrupt after the PLIC core accepts the request and before the interrupt is serviced, the interrupt request remains present in the IP bit of the PLIC core and will be serviced by a handler, which will then have to determine that the interrupt device no longer requires service." In other words, we may receive interrupts twice. Avoid that by postponing the completion until after the interrupt handler has run. If the interrupt is handled by a filter rather than by scheduling an interrupt thread we must also complete the interrupt, so set up a post_filter handler (which is the same as the post_ithread handler). Reviewed by: mhorne Sponsored by: Axiado Differential Revision:https://reviews.freebsd.org/D25531 Modified: head/sys/riscv/riscv/plic.c Modified: head/sys/riscv/riscv/plic.c == --- head/sys/riscv/riscv/plic.c Mon Jul 6 21:20:57 2020(r362976) +++ head/sys/riscv/riscv/plic.c Mon Jul 6 21:29:50 2020(r362977) @@ -169,11 +169,11 @@ plic_intr(void *arg) sc = arg; cpu = PCPU_GET(cpuid); + /* Claim any pending interrupt. */ pending = RD4(sc, PLIC_CLAIM(sc, cpu)); if (pending) { tf = curthread->td_intr_frame; plic_irq_dispatch(sc, pending, tf); - WR4(sc, PLIC_CLAIM(sc, cpu), pending); } return (FILTER_HANDLED); @@ -384,7 +384,17 @@ plic_pre_ithread(device_t dev, struct intr_irqsrc *isr static void plic_post_ithread(device_t dev, struct intr_irqsrc *isrc) { + struct plic_softc *sc; + struct plic_irqsrc *src; + uint32_t cpu; + sc = device_get_softc(dev); + src = (struct plic_irqsrc *)isrc; + + cpu = CPU_FFS(&isrc->isrc_cpu) - 1; + + /* Complete the interrupt. */ + WR4(sc, PLIC_CLAIM(sc, cpu), src->irq); plic_enable_intr(dev, isrc); } @@ -451,6 +461,7 @@ static device_method_t plic_methods[] = { DEVMETHOD(pic_map_intr, plic_map_intr), DEVMETHOD(pic_pre_ithread, plic_pre_ithread), DEVMETHOD(pic_post_ithread, plic_post_ithread), + DEVMETHOD(pic_post_filter, plic_post_ithread), DEVMETHOD(pic_setup_intr, plic_setup_intr), DEVMETHOD(pic_bind_intr,plic_bind_intr), ___ 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-unsubscr...@freebsd.org"
svn commit: r362976 - head/sys/net/route
Author: markj Date: Mon Jul 6 21:20:57 2020 New Revision: 362976 URL: https://svnweb.freebsd.org/changeset/base/362976 Log: Split nhop_ref_object(). Now nhop_ref_object() unconditionally acquires a reference, and the new nhop_try_ref_object() uses refcount_acquire_if_not_zero() to conditionally acquire a reference. Since the former is cheaper, use it when we know that the initial counter value is non-zero. No functional change intended. Reviewed by: melifaro Differential Revision:https://reviews.freebsd.org/D25535 Modified: head/sys/net/route/nhop_ctl.c head/sys/net/route/shared.h Modified: head/sys/net/route/nhop_ctl.c == --- head/sys/net/route/nhop_ctl.c Mon Jul 6 20:23:14 2020 (r362975) +++ head/sys/net/route/nhop_ctl.c Mon Jul 6 21:20:57 2020 (r362976) @@ -598,10 +598,19 @@ destroy_nhop_epoch(epoch_context_t ctx) destroy_nhop(nh_priv); } -int +void nhop_ref_object(struct nhop_object *nh) { + u_int old; + old = refcount_acquire(&nh->nh_priv->nh_refcnt); + KASSERT(old > 0, ("%s: nhop object %p has 0 refs", __func__, nh)); +} + +int +nhop_try_ref_object(struct nhop_object *nh) +{ + return (refcount_acquire_if_not_zero(&nh->nh_priv->nh_refcnt)); } @@ -654,7 +663,7 @@ int nhop_ref_any(struct nhop_object *nh) { - return (nhop_ref_object(nh)); + return (nhop_try_ref_object(nh)); } void Modified: head/sys/net/route/shared.h == --- head/sys/net/route/shared.h Mon Jul 6 20:23:14 2020(r362975) +++ head/sys/net/route/shared.h Mon Jul 6 21:20:57 2020(r362976) @@ -51,7 +51,8 @@ struct rib_head; void nhops_init(void); int nhops_init_rib(struct rib_head *rh); void nhops_destroy_rib(struct rib_head *rh); -int nhop_ref_object(struct nhop_object *nh); +void nhop_ref_object(struct nhop_object *nh); +int nhop_try_ref_object(struct nhop_object *nh); int nhop_ref_any(struct nhop_object *nh); void nhop_free_any(struct nhop_object *nh); ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r362736 - head/sys/arm64/rockchip
Peter Jeremy (pe...@rulingia.com) wrote: > On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko wrote: > >Could you try kernel with this patch? It's mostly debug output, > >with one possible clock-related fix. > > > >https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch > > It's still not working for me. I get the following: > dwc0: mem 0xff54-0xff54 irq 44 > on ofwbus0 > setting RK3328 RX/TX delays: 24/36 > >>> RK3328_GRF_MAC_CON1 (0413): > >>> gmac2io_gmii_clk_sel: 0x0 > >>> gmac2io_rmii_extclk_sel: 0x1 > >>> gmac2io_rmii_mode: 0x0 > >>> gmac2io_rmii_clk_sel: 0x0 > >>> gmac2io_phy_intf_sel: 0x1 > >>> gmac2io_flowctrl: 0x0 > >>> gmac2io_rxclk_dly_ena: 0x1 > >>> gmac2io_txclk_dly_ena: 0x1 > >>> RK3328_GRF_MAC_CON0 (0c24): > miibus0: on dwc0 > rgephy0: PHY 0 on miibus0 > rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 > rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto Thanks for running the test. Register values seem OK :( > >I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so > >my tests are not reliable. I'll try to get another RK3328 board for tests, > >but it may take some time. > > I've asked on -arm if anyone else has tried this on a Rock64 v2 or v3. > > >If the clock fix doesn't help, I'll make > >delays configuration run-time configurable with off by default until > >more hardware is tested. > > That sounds like a good way forward - maybe boot and run-time configurable. > It's a pity that there doesn't seem to be any documentation on what the > numbers represent (or what the "default" value is) - which means that > actually adjusting the delay numbers would be very time consuming. There are no "default" values AFAIK. They depend on the board schematics. I was told that Rockhip partners use some kind of proprietary tool which they feed with values based on the scematics (like trace lengths) and tool calculates delays. With boot-time or run-time configuration I think it's possible to automate the search for good value. Something like this: https://github.com/ayufan-rock64/linux-build/blob/master/recipes/gmac-delays-test/range-test but with loader.conf modifications instead of DTB -- gonzo ___ 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-unsubscr...@freebsd.org"
svn commit: r362975 - stable/11/sys/netinet6
Author: markj Date: Mon Jul 6 20:23:14 2020 New Revision: 362975 URL: https://svnweb.freebsd.org/changeset/base/362975 Log: MFC r359154: Fix synchronization in the IPV6_2292PKTOPTIONS set handler. Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c == --- stable/11/sys/netinet6/ip6_output.c Mon Jul 6 18:43:00 2020 (r362974) +++ stable/11/sys/netinet6/ip6_output.c Mon Jul 6 20:23:14 2020 (r362975) @@ -1514,8 +1514,10 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) error = soopt_mcopyin(sopt, m); /* XXX */ if (error != 0) break; + INP_WLOCK(in6p); error = ip6_pcbopts(&in6p->in6p_outputopts, m, so, sopt); + INP_WUNLOCK(in6p); m_freem(m); /* XXX */ break; } @@ -2260,8 +2262,11 @@ ip6_pcbopts(struct ip6_pktopts **pktopt, struct mbuf * printf("ip6_pcbopts: all specified options are cleared.\n"); #endif ip6_clearpktopts(opt, -1); - } else - opt = malloc(sizeof(*opt), M_IP6OPT, M_WAITOK); + } else { + opt = malloc(sizeof(*opt), M_IP6OPT, M_NOWAIT); + if (opt == NULL) + return (ENOMEM); + } *pktopt = NULL; if (!m || m->m_len == 0) { ___ 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-unsubscr...@freebsd.org"
svn commit: r362974 - head/share/man/man5
Author: mhorne Date: Mon Jul 6 18:43:00 2020 New Revision: 362974 URL: https://svnweb.freebsd.org/changeset/base/362974 Log: src.conf.5: regen after r362972, r362973, RISC-V EFI support Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Mon Jul 6 18:19:42 2020 (r362973) +++ head/share/man/man5/src.conf.5 Mon Jul 6 18:43:00 2020 (r362974) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 24, 2020 +.Dd July 6, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -585,7 +585,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_EFI Set to build .Xr efivar 3 @@ -593,7 +593,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include
On Mon, Jul 6, 2020 at 3:19 PM Mitchell Horne wrote: > > Author: mhorne > Date: Mon Jul 6 18:19:42 2020 > New Revision: 362973 > URL: https://svnweb.freebsd.org/changeset/base/362973 > > Log: > RISC-V boot1.efi and loader.efi support > > This implementation doesn't have any major deviations from the other EFI > ports. I've copied the boilerplate from arm and arm64. > > I've tested this with the following boot flows: > OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD > OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD > > Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is > required, > as the HSM extension is needed to bring them up explicitly. Because of this, > using BBL as the SBI implementation will not be possible. Additionally, > there > are a few recent u-boot changes that are required as well, all of which > will be > present in the upcoming v2020.07 release. > > Looks good: emaste > Differential Revision:https://reviews.freebsd.org/D25135 > > Added: > head/stand/efi/include/riscv/ > head/stand/efi/include/riscv/efibind.h > - copied unchanged from r362787, head/stand/efi/include/arm64/efibind.h > head/stand/efi/loader/arch/riscv/ > head/stand/efi/loader/arch/riscv/Makefile.inc (contents, props changed) > head/stand/efi/loader/arch/riscv/exec.c > - copied, changed from r362787, head/stand/efi/loader/arch/arm/exec.c > head/stand/efi/loader/arch/riscv/ldscript.riscv (contents, props changed) > head/stand/efi/loader/arch/riscv/start.S (contents, props changed) > Modified: > head/share/mk/src.opts.mk > head/stand/common/self_reloc.c > head/stand/defs.mk > head/stand/efi/libefi/Makefile > head/stand/efi/loader/copy.c > head/stand/efi/loader/main.c > head/stand/loader.mk > head/sys/riscv/include/metadata.h > > Modified: head/share/mk/src.opts.mk > == > --- head/share/mk/src.opts.mk Mon Jul 6 17:47:29 2020(r362972) > +++ head/share/mk/src.opts.mk Mon Jul 6 18:19:42 2020(r362973) > @@ -318,8 +318,8 @@ BROKEN_OPTIONS+=LIBSOFT > # marked no longer broken with the switch to LLVM. > BROKEN_OPTIONS+=GOOGLETEST SSP > .endif > -# EFI doesn't exist on mips, powerpc, or riscv. > -.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Mriscv*} > +# EFI doesn't exist on mips or powerpc. > +.if ${__T:Mmips*} || ${__T:Mpowerpc*} > BROKEN_OPTIONS+=EFI > .endif > # OFW is only for powerpc, exclude others > I meant to commit this hunk separately, but included it by mistake. The log would have been: Enable MK_EFI by default on RISC-V We can now build the EFI libraries, utilities, and bootloader. This is enough for EFI boot-time services and for us to un-break this option. Reviewed by: br Differential Revision: https://reviews.freebsd.org/D25137 > Modified: head/stand/common/self_reloc.c > == > --- head/stand/common/self_reloc.c Mon Jul 6 17:47:29 2020 > (r362972) > +++ head/stand/common/self_reloc.c Mon Jul 6 18:19:42 2020 > (r362973) > @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#if defined(__aarch64__) || defined(__amd64__) > +#if defined(__aarch64__) || defined(__amd64__) || defined(__riscv) > #defineElfW_RelElf64_Rela > #defineElfW_DynElf64_Dyn > #defineELFW_R_TYPE ELF64_R_TYPE > @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); > #elif defined(__i386__) > #defineRELOC_TYPE_NONE R_386_NONE > #defineRELOC_TYPE_RELATIVE R_386_RELATIVE > +#elif defined(__riscv) > +#defineRELOC_TYPE_NONE R_RISCV_NONE > +#defineRELOC_TYPE_RELATIVE R_RISCV_RELATIVE > #endif > > void self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic); > > Modified: head/stand/defs.mk > == > --- head/stand/defs.mk Mon Jul 6 17:47:29 2020(r362972) > +++ head/stand/defs.mk Mon Jul 6 18:19:42 2020(r362973) > @@ -115,13 +115,14 @@ AFLAGS+= --32 > SSP_CFLAGS= > > # Add in the no float / no SIMD stuff and announce we're freestanding > -# aarch64 and riscv don't have -msoft-float, but all others do. riscv > -# currently has no /boot/loader, but may soon. > +# aarch64 and riscv don't have -msoft-float, but all others do. > CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} > .if ${MACHINE_CPUARCH} == "aarch64" > CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC > .elif ${MACHINE_CPUARCH} == "riscv" > -CFLAGS+= -march=rv64imac -mabi=lp64 > +CFLAGS+= -march=rv64imac -mabi=lp64 -fPIC > +CFLAGS.clang+= -mcmodel=medium > +CFLAGS.gcc+= -mcmodel=medany > .else > CFLAGS+= -msoft-float > .endif > @@ -146,6 +147,12 @@ CFLAGS+= -fPIC -mno-red-zone > CFLAGS.clang+= -mno-movt > CFLAGS.clang+=
svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include
Author: mhorne Date: Mon Jul 6 18:19:42 2020 New Revision: 362973 URL: https://svnweb.freebsd.org/changeset/base/362973 Log: RISC-V boot1.efi and loader.efi support This implementation doesn't have any major deviations from the other EFI ports. I've copied the boilerplate from arm and arm64. I've tested this with the following boot flows: OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required, as the HSM extension is needed to bring them up explicitly. Because of this, using BBL as the SBI implementation will not be possible. Additionally, there are a few recent u-boot changes that are required as well, all of which will be present in the upcoming v2020.07 release. Looks good: emaste Differential Revision:https://reviews.freebsd.org/D25135 Added: head/stand/efi/include/riscv/ head/stand/efi/include/riscv/efibind.h - copied unchanged from r362787, head/stand/efi/include/arm64/efibind.h head/stand/efi/loader/arch/riscv/ head/stand/efi/loader/arch/riscv/Makefile.inc (contents, props changed) head/stand/efi/loader/arch/riscv/exec.c - copied, changed from r362787, head/stand/efi/loader/arch/arm/exec.c head/stand/efi/loader/arch/riscv/ldscript.riscv (contents, props changed) head/stand/efi/loader/arch/riscv/start.S (contents, props changed) Modified: head/share/mk/src.opts.mk head/stand/common/self_reloc.c head/stand/defs.mk head/stand/efi/libefi/Makefile head/stand/efi/loader/copy.c head/stand/efi/loader/main.c head/stand/loader.mk head/sys/riscv/include/metadata.h Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Mon Jul 6 17:47:29 2020(r362972) +++ head/share/mk/src.opts.mk Mon Jul 6 18:19:42 2020(r362973) @@ -318,8 +318,8 @@ BROKEN_OPTIONS+=LIBSOFT # marked no longer broken with the switch to LLVM. BROKEN_OPTIONS+=GOOGLETEST SSP .endif -# EFI doesn't exist on mips, powerpc, or riscv. -.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Mriscv*} +# EFI doesn't exist on mips or powerpc. +.if ${__T:Mmips*} || ${__T:Mpowerpc*} BROKEN_OPTIONS+=EFI .endif # OFW is only for powerpc, exclude others Modified: head/stand/common/self_reloc.c == --- head/stand/common/self_reloc.c Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/common/self_reloc.c Mon Jul 6 18:19:42 2020 (r362973) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__aarch64__) || defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__riscv) #defineElfW_RelElf64_Rela #defineElfW_DynElf64_Dyn #defineELFW_R_TYPE ELF64_R_TYPE @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #elif defined(__i386__) #defineRELOC_TYPE_NONE R_386_NONE #defineRELOC_TYPE_RELATIVE R_386_RELATIVE +#elif defined(__riscv) +#defineRELOC_TYPE_NONE R_RISCV_NONE +#defineRELOC_TYPE_RELATIVE R_RISCV_RELATIVE #endif void self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic); Modified: head/stand/defs.mk == --- head/stand/defs.mk Mon Jul 6 17:47:29 2020(r362972) +++ head/stand/defs.mk Mon Jul 6 18:19:42 2020(r362973) @@ -115,13 +115,14 @@ AFLAGS+= --32 SSP_CFLAGS= # Add in the no float / no SIMD stuff and announce we're freestanding -# aarch64 and riscv don't have -msoft-float, but all others do. riscv -# currently has no /boot/loader, but may soon. +# aarch64 and riscv don't have -msoft-float, but all others do. CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC .elif ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imac -mabi=lp64 +CFLAGS+= -march=rv64imac -mabi=lp64 -fPIC +CFLAGS.clang+= -mcmodel=medium +CFLAGS.gcc+= -mcmodel=medany .else CFLAGS+= -msoft-float .endif @@ -146,6 +147,12 @@ CFLAGS+= -fPIC -mno-red-zone CFLAGS.clang+= -mno-movt CFLAGS.clang+= -mfpu=none CFLAGS+= -fPIC +.endif + +# Some RISC-V linkers have support for relaxations, while some (lld) do not +# yet. If this is the case we inhibit the compiler from emitting relaxations. +.if ${LINKER_FEATURES:Mriscv-relaxations} == "" +CFLAGS+= -mno-relax .endif # The boot loader build uses dd status=none, where possible, for reproducible Copied: head/stand/efi/include/riscv/efibind.h (from r362787, head/stand/efi/include/arm64/efibind.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly
svn commit: r362972 - head/lib/libefivar
Author: mhorne Date: Mon Jul 6 17:47:29 2020 New Revision: 362972 URL: https://svnweb.freebsd.org/changeset/base/362972 Log: libefivar: define MDE_CPU_RISCV64 The necessary definitions from EDK2 are present, so this allows the library to be built on RISC-V. Modified: head/lib/libefivar/efi-osdep.h Modified: head/lib/libefivar/efi-osdep.h == --- head/lib/libefivar/efi-osdep.h Mon Jul 6 16:34:49 2020 (r362971) +++ head/lib/libefivar/efi-osdep.h Mon Jul 6 17:47:29 2020 (r362972) @@ -104,6 +104,8 @@ typedef void VOID; #define MDE_CPU_ARM #elif defined(__aarch64__) #define MDE_CPU_AARCH64 +#elif defined(__riscv) +#define MDE_CPU_RISCV64 #endif /* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ ___ 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-unsubscr...@freebsd.org"
svn commit: r362971 - in head/sys: compat/freebsd32 kern
Author: markj Date: Mon Jul 6 16:34:49 2020 New Revision: 362971 URL: https://svnweb.freebsd.org/changeset/base/362971 Log: Regenerate. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cMon Jul 6 16:34:29 2020(r362970) +++ head/sys/compat/freebsd32/freebsd32_sysent.cMon Jul 6 16:34:49 2020(r362971) @@ -650,8 +650,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_mknodat_args), (sy_call_t *)freebsd32_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = freebsd32_mknodat */ #endif { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 560 = freebsd32_kevent */ - { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ - { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ + { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ + { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 563 = getrandom */ { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ Modified: head/sys/kern/init_sysent.c == --- head/sys/kern/init_sysent.c Mon Jul 6 16:34:29 2020(r362970) +++ head/sys/kern/init_sysent.c Mon Jul 6 16:34:49 2020(r362971) @@ -616,8 +616,8 @@ struct sysent sysent[] = { { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 558 = fhstatfs */ { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = mknodat */ { AS(kevent_args), (sy_call_t *)sys_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 560 = kevent */ - { AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = cpuset_getdomain */ - { AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = cpuset_setdomain */ + { AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 561 = cpuset_getdomain */ + { AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 562 = cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 563 = getrandom */ { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ ___ 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-unsubscr...@freebsd.org"
svn commit: r362970 - head/sys/kern
Author: markj Date: Mon Jul 6 16:34:29 2020 New Revision: 362970 URL: https://svnweb.freebsd.org/changeset/base/362970 Log: Permit cpuset_(get|set)domain() in capability mode. These system calls already perform validation of their parameters when called in capability mode, identical to cpuset_(get|set)affinity(). MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf == --- head/sys/kern/capabilities.conf Mon Jul 6 16:34:15 2020 (r362969) +++ head/sys/kern/capabilities.conf Mon Jul 6 16:34:29 2020 (r362970) @@ -149,8 +149,10 @@ copy_file_range ## #cpuset cpuset_getaffinity +cpuset_getdomain #cpuset_getid cpuset_setaffinity +cpuset_setdomain #cpuset_setid ## ___ 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-unsubscr...@freebsd.org"
svn commit: r362969 - head/sys/kern
Author: kaktus Date: Mon Jul 6 16:34:15 2020 New Revision: 362969 URL: https://svnweb.freebsd.org/changeset/base/362969 Log: kern.tty_info_kstacks: set compact format as default Modified: head/sys/kern/tty_info.c Modified: head/sys/kern/tty_info.c == --- head/sys/kern/tty_info.cMon Jul 6 16:34:09 2020(r362968) +++ head/sys/kern/tty_info.cMon Jul 6 16:34:15 2020(r362969) @@ -239,7 +239,7 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK -static int tty_info_kstacks = STACK_SBUF_FMT_LONG; +static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT; static int sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS) ___ 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-unsubscr...@freebsd.org"
svn commit: r362968 - head/sys/kern
Author: markj Date: Mon Jul 6 16:34:09 2020 New Revision: 362968 URL: https://svnweb.freebsd.org/changeset/base/362968 Log: Allow accesses of the caller's CPU and domain sets in capability mode. cpuset_(get|set)(affinity|domain)(2) permit a get or set of the calling thread or process' CPU and domain set in capability mode, but only when the thread or process ID is specified as -1. Extend this to cover the case where the ID actually matches the caller's TID or PID, since some code, such as our pthread_attr_get_np() implementation, always provides an explicit ID. It was not and still is not permitted to access CPU and domain sets for other threads in the same process when the process is in capability mode. This might change in the future. Submitted by: Greg V (original version) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25552 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Mon Jul 6 16:33:28 2020(r362967) +++ head/sys/kern/kern_cpuset.c Mon Jul 6 16:34:09 2020(r362968) @@ -1595,7 +1595,9 @@ cpuset_check_capabilities(struct thread *td, cpulevel_ return (ECAPMODE); if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) return (ECAPMODE); - if (id != -1) + if (id != -1 && + !(which == CPU_WHICH_TID && id == td->td_tid) && + !(which == CPU_WHICH_PID && id == td->td_proc->p_pid)) return (ECAPMODE); } return (0); ___ 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-unsubscr...@freebsd.org"
svn commit: r362967 - in head/sys: kern sys
Author: kaktus Date: Mon Jul 6 16:33:28 2020 New Revision: 362967 URL: https://svnweb.freebsd.org/changeset/base/362967 Log: kern.tty_info_kstacks: add a compact format Add a more compact display format for kern.tty_info_kstacks inspired by procstat -kk. Set it as a default one. # sysctl kern.tty_info_kstacks=1 kern.tty_info_kstacks: 0 -> 1 # sleep 2 ^T load: 0.17 cmd: sleep 623 [nanslp] 0.72r 0.00u 0.00s 0% 2124k #0 0x80c4443e at mi_switch+0xbe #1 0x80c98044 at sleepq_catch_signals+0x494 #2 0x80c982c2 at sleepq_timedwait_sig+0x12 #3 0x80c43af3 at _sleep+0x193 #4 0x80c50e31 at kern_clock_nanosleep+0x1a1 #5 0x80c5119b at sys_nanosleep+0x3b #6 0x810ffc69 at amd64_syscall+0x119 #7 0x810d5520 at fast_syscall_common+0x101 sleep: about 1 second(s) left out of the original 2 ^C # sysctl kern.tty_info_kstacks=2 kern.tty_info_kstacks: 1 -> 2 # sleep 2 ^T load: 0.24 cmd: sleep 625 [nanslp] 0.81r 0.00u 0.00s 0% 2124k mi_switch+0xbe sleepq_catch_signals+0x494 sleepq_timedwait_sig+0x12 sleep+0x193 kern_clock_nanosleep+0x1a1 sys_nanosleep+0x3b amd64_syscall+0x119 fast_syscall_common+0x101 sleep: about 1 second(s) left out of the original 2 ^C Suggested by: avg Reviewed by: mjg Relnotes: yes Sponsored by: Mysterious Code Ltd. Differential Revision:https://reviews.freebsd.org/D25487 Modified: head/sys/kern/subr_stack.c head/sys/kern/tty_info.c head/sys/sys/stack.h Modified: head/sys/kern/subr_stack.c == --- head/sys/kern/subr_stack.c Mon Jul 6 16:33:21 2020(r362966) +++ head/sys/kern/subr_stack.c Mon Jul 6 16:33:28 2020(r362967) @@ -170,7 +170,8 @@ stack_print_short_ddb(const struct stack *st) * flags - M_WAITOK or M_NOWAIT (EWOULDBLOCK). */ int -stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags) +stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags, +enum stack_sbuf_fmt format) { char namebuf[64]; long offset; @@ -182,9 +183,19 @@ stack_sbuf_print_flags(struct sbuf *sb, const struct s &offset, flags); if (error == EWOULDBLOCK) return (error); - sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], - namebuf, offset); + switch (format) { + case STACK_SBUF_FMT_LONG: + sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, + (void *)st->pcs[i], namebuf, offset); + break; + case STACK_SBUF_FMT_COMPACT: + sbuf_printf(sb, "%s+%#lx ", namebuf, offset); + break; + default: + __assert_unreachable(); + } } + sbuf_nl_terminate(sb); return (0); } @@ -192,7 +203,7 @@ void stack_sbuf_print(struct sbuf *sb, const struct stack *st) { - (void)stack_sbuf_print_flags(sb, st, M_WAITOK); + (void)stack_sbuf_print_flags(sb, st, M_WAITOK, STACK_SBUF_FMT_LONG); } #if defined(DDB) || defined(WITNESS) Modified: head/sys/kern/tty_info.c == --- head/sys/kern/tty_info.cMon Jul 6 16:33:21 2020(r362966) +++ head/sys/kern/tty_info.cMon Jul 6 16:33:28 2020(r362967) @@ -239,10 +239,36 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK -static bool tty_info_kstacks = true; -SYSCTL_BOOL(_kern, OID_AUTO, tty_info_kstacks, CTLFLAG_RWTUN, -&tty_info_kstacks, 0, -"Enable printing kernel stack(9) traces on ^T (tty info)"); +static int tty_info_kstacks = STACK_SBUF_FMT_LONG; + +static int +sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS) +{ + enum stack_sbuf_fmt val; + int error; + + val = tty_info_kstacks; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + switch (val) { + case STACK_SBUF_FMT_NONE: + case STACK_SBUF_FMT_LONG: + case STACK_SBUF_FMT_COMPACT: + tty_info_kstacks = val; + break; + default: + error = EINVAL; + } + + return (error); +} +SYSCTL_PROC(_kern, OID_AUTO, tty_info_kstacks, +CTLFLAG_RWTUN | CTLFLAG_MPSAFE | CTLTYPE_INT, NULL, 0, +sysctl_tty_info_kstacks, "I", +"Adjust format of kernel stack(9) traces on ^T (tty info): " +"0 - disabled; 1 - long; 2 - compact"); #endif /* @@ -254,7 +280,8 @@ tty_info(struct tty *tp) struct timeval rtime, utime, stime; #ifdef STACK struct stack stack; - int sterr; + int sterr, kstacks_val; + bool print_kstacks; #endif struct proc *p, *ppick; struct thread *td, *tdpick; @@ -337,
svn commit: r362966 - head/sys/kern
Author: markj Date: Mon Jul 6 16:33:21 2020 New Revision: 362966 URL: https://svnweb.freebsd.org/changeset/base/362966 Log: Lift cpuset Capsicum checks into a subroutine. Otherwise the same checks are duplicated across four different system call implementations, cpuset_(get|set)(affinity|domain)(). No functional change intended. MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Mon Jul 6 15:15:37 2020(r362965) +++ head/sys/kern/kern_cpuset.c Mon Jul 6 16:33:21 2020(r362966) @@ -1582,6 +1582,25 @@ cpuset_setproc_update_set(struct proc *p, struct cpuse return (0); } +/* + * In Capability mode, the only accesses that are permitted are to the current + * thread and process' CPU and domain sets. + */ +static int +cpuset_check_capabilities(struct thread *td, cpulevel_t level, cpuwhich_t which, +id_t id) +{ + if (IN_CAPABILITY_MODE(td)) { + if (level != CPU_LEVEL_WHICH) + return (ECAPMODE); + if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) + return (ECAPMODE); + if (id != -1) + return (ECAPMODE); + } + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct cpuset_args { cpusetid_t *setid; @@ -1739,15 +1758,9 @@ kern_cpuset_getaffinity(struct thread *td, cpulevel_t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only get your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); size = cpusetsize; mask = malloc(size, M_TEMP, M_WAITOK | M_ZERO); error = cpuset_which(which, id, &p, &ttd, &set); @@ -1856,15 +1869,9 @@ kern_cpuset_setaffinity(struct thread *td, cpulevel_t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only set your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); mask = malloc(cpusetsize, M_TEMP, M_WAITOK | M_ZERO); error = copyin(maskp, mask, cpusetsize); if (error) @@ -1987,15 +1994,9 @@ kern_cpuset_getdomain(struct thread *td, cpulevel_t le if (domainsetsize < sizeof(domainset_t) || domainsetsize > DOMAINSET_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only get your own domain set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); bzero(&outset, sizeof(outset)); error = cpuset_which(which, id, &p, &ttd, &set); @@ -2122,15 +2123,9 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le if (policy <= DOMAINSET_POLICY_INVALID || policy > DOMAINSET_POLICY_MAX) return (EINVAL); - /* In Capability mode, you can only set your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); memset(&domain, 0, sizeof(domain)); mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); error = copyin(maskp, mask, domainsetsize); ___ svn-src
svn commit: r362965 - head/sys/powerpc/powernv
Author: bdragon Date: Mon Jul 6 15:15:37 2020 New Revision: 362965 URL: https://svnweb.freebsd.org/changeset/base/362965 Log: [PowerPC] XIVE dispatch tweaks * Only read the DPCPU pointer once per xive_dispatch call. * Optimize HE decoding for the common cases. Reported by: jhibbits (in irc) Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D25545 Modified: head/sys/powerpc/powernv/xive.c Modified: head/sys/powerpc/powernv/xive.c == --- head/sys/powerpc/powernv/xive.c Mon Jul 6 15:00:28 2020 (r362964) +++ head/sys/powerpc/powernv/xive.c Mon Jul 6 15:15:37 2020 (r362965) @@ -507,6 +507,7 @@ xive_dispatch(device_t dev, struct trapframe *tf) sc = device_get_softc(dev); + xive_cpud = DPCPU_PTR(xive_cpu_data); for (;;) { ack = xive_read_2(sc, XIVE_TM_SPC_ACK); cppr = (ack & 0xff); @@ -515,19 +516,17 @@ xive_dispatch(device_t dev, struct trapframe *tf) if (he == TM_QW3_NSR_HE_NONE) break; - switch (he) { - case TM_QW3_NSR_HE_NONE: - goto end; - case TM_QW3_NSR_HE_POOL: - case TM_QW3_NSR_HE_LSI: + + else if (__predict_false(he != TM_QW3_NSR_HE_PHYS)) { + /* +* We don't support TM_QW3_NSR_HE_POOL or +* TM_QW3_NSR_HE_LSI interrupts. +*/ device_printf(dev, "Unexpected interrupt he type: %d\n", he); goto end; - case TM_QW3_NSR_HE_PHYS: - break; } - xive_cpud = DPCPU_PTR(xive_cpu_data); xive_write_1(sc, XIVE_TM_CPPR, cppr); for (;;) { ___ 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-unsubscr...@freebsd.org"
svn commit: r362964 - stable/12/lib/libc/riscv
Author: mhorne Date: Mon Jul 6 15:00:28 2020 New Revision: 362964 URL: https://svnweb.freebsd.org/changeset/base/362964 Log: MFC r362788: Fix printf(3) output of long doubles on RISC-V PR: 242067 Modified: stable/12/lib/libc/riscv/_fpmath.h Modified: stable/12/lib/libc/riscv/_fpmath.h == --- stable/12/lib/libc/riscv/_fpmath.h Mon Jul 6 14:52:21 2020 (r362963) +++ stable/12/lib/libc/riscv/_fpmath.h Mon Jul 6 15:00:28 2020 (r362964) @@ -46,19 +46,6 @@ union IEEEl2bits { #defineLDBL_IMPLICIT_NBIT #definemask_nbit_l(u) ((void)0) -#defineLDBL_MANH_SIZE 20 -#defineLDBL_MANL_SIZE 32 - -#defineLDBL_TO_ARRAY32(u, a) do { \ - (a)[0] = (uint32_t)(u).bits.manl; \ - (a)[1] = (uint32_t)(u).bits.manh; \ -} while(0) - -/* - * TODO: Due to compiler problem we are temporary using - * LDBL_PREC == 53. Use code below for LDBL_PREC == 113 - */ -#if 0 #defineLDBL_MANH_SIZE 48 #defineLDBL_MANL_SIZE 64 @@ -68,4 +55,3 @@ union IEEEl2bits { (a)[2] = (uint32_t)(u).bits.manh; \ (a)[3] = (uint32_t)((u).bits.manh >> 32); \ } while(0) -#endif ___ 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-unsubscr...@freebsd.org"
svn commit: r362963 - head/sys/net
Author: markj Date: Mon Jul 6 14:52:21 2020 New Revision: 362963 URL: https://svnweb.freebsd.org/changeset/base/362963 Log: iflib: Fix some nits in the rx refill code. - Get rid of the ifl_vm_addrs array. It is not used by any existing consumer, so we are just dirtying a couple of cache lines for no reason. - Use uma_zalloc(fl->ifl_zone) instead of m_cljget(). Otherwise m_cljget() is doing unnecessary work to look up the correct zone, when iflib already knows what that zone is. - ifl_gen is only used when INVARIANTS is on, so make that more clear. - Fix some style nits and inconsistencies. Reviewed by: gallatin Tested by:pho MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25490 Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cMon Jul 6 14:52:09 2020(r362962) +++ head/sys/net/iflib.cMon Jul 6 14:52:21 2020(r362963) @@ -206,8 +206,6 @@ struct iflib_ctx { #define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get #define isc_rxd_refill ifc_txrx.ift_rxd_refill #define isc_rxd_flush ifc_txrx.ift_rxd_flush -#define isc_rxd_refill ifc_txrx.ift_rxd_refill -#define isc_rxd_refill ifc_txrx.ift_rxd_refill #define isc_legacy_intr ifc_txrx.ift_legacy_intr eventhandler_tag ifc_vlan_attach_event; eventhandler_tag ifc_vlan_detach_event; @@ -392,8 +390,7 @@ struct iflib_fl { bus_dma_tag_t ifl_buf_tag; iflib_dma_info_tifl_ifdi; uint64_tifl_bus_addrs[IFLIB_MAX_RX_REFRESH] __aligned(CACHE_LINE_SIZE); - caddr_t ifl_vm_addrs[IFLIB_MAX_RX_REFRESH]; - qidx_t ifl_rxd_idxs[IFLIB_MAX_RX_REFRESH]; + qidx_t ifl_rxd_idxs[IFLIB_MAX_RX_REFRESH]; } __aligned(CACHE_LINE_SIZE); static inline qidx_t @@ -854,7 +851,6 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ return netmap_ring_reinit(kring); - fl->ifl_vm_addrs[tmp_pidx] = addr; if (__predict_false(init)) { netmap_load_map(na, fl->ifl_buf_tag, map[nic_i], addr); @@ -1295,7 +1291,6 @@ iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t fl = &rxq->ifr_fl[flid]; iru->iru_paddrs = fl->ifl_bus_addrs; - iru->iru_vaddrs = &fl->ifl_vm_addrs[0]; iru->iru_idxs = fl->ifl_rxd_idxs; iru->iru_qsidx = rxq->ifr_id; iru->iru_buf_size = fl->ifl_buf_size; @@ -1916,7 +1911,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int } /** - * _iflib_fl_refill - refill an rxq free-buffer list + * iflib_fl_refill - refill an rxq free-buffer list * @ctx: the iflib context * @fl: the free list to refill * @count: the number of new buffers to allocate @@ -1925,7 +1920,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int * The caller must assure that @count does not exceed the queue's capacity. */ static uint8_t -_iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) +iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) { struct if_rxd_update iru; struct rxq_refill_cb_arg cb_arg; @@ -1962,12 +1957,13 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun if (n > 8) DBG_COUNTER_INC(fl_refills_large); iru_init(&iru, fl->ifl_rxq, fl->ifl_id); - while (n--) { + while (n-- > 0) { /* * We allocate an uninitialized mbuf + cluster, mbuf is * initialized after rx. * -* If the cluster is still set then we know a minimum sized packet was received +* If the cluster is still set then we know a minimum sized +* packet was received */ bit_ffc_at(fl->ifl_rx_bitmap, frag_idx, fl->ifl_size, &frag_idx); @@ -1975,7 +1971,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun bit_ffc(fl->ifl_rx_bitmap, fl->ifl_size, &frag_idx); MPASS(frag_idx >= 0); if ((cl = sd_cl[frag_idx]) == NULL) { - cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size); + cl = uma_zalloc(fl->ifl_zone, M_NOWAIT); if (__predict_false(cl == NULL)) break; @@ -1989,7 +1985,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun break; } - sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; + sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; sd_cl[frag_idx] = cl; #if MEMORY_
svn commit: r362962 - head/sys/net
Author: markj Date: Mon Jul 6 14:52:09 2020 New Revision: 362962 URL: https://svnweb.freebsd.org/changeset/base/362962 Log: iflib: Fix handling of mbuf cluster allocation failures. When refilling an rx freelist, make sure we only update the hardware producer index if at least one cluster was allocated. Otherwise the NIC is programmed to write a previously used cluster, typically resulting in a use-after-free when packet data is written by the hardware. Also make sure that we don't update the fragment index cursor if the last allocation attempt didn't succeed. For at least Intel drivers, iflib assumes that the consumer index and fragment index cursor stay in lockstep, but this assumption was violated in the face of cluster allocation failures. Reported and tested by: pho Reviewed by: gallatin, hselasky MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25489 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cMon Jul 6 14:00:20 2020(r362961) +++ head/sys/net/iflib.cMon Jul 6 14:52:09 2020(r362962) @@ -1975,7 +1975,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun bit_ffc(fl->ifl_rx_bitmap, fl->ifl_size, &frag_idx); MPASS(frag_idx >= 0); if ((cl = sd_cl[frag_idx]) == NULL) { - if ((cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size)) == NULL) + cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size); + if (__predict_false(cl == NULL)) break; cb_arg.error = 0; @@ -1983,12 +1984,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun err = bus_dmamap_load(fl->ifl_buf_tag, sd_map[frag_idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, BUS_DMA_NOWAIT); - if (err != 0 || cb_arg.error) { - /* -* !zone_pack ? -*/ - if (fl->ifl_zone == zone_pack) - uma_zfree(fl->ifl_zone, cl); + if (__predict_false(err != 0 || cb_arg.error)) { + uma_zfree(fl->ifl_zone, cl); break; } @@ -2004,9 +2001,9 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun BUS_DMASYNC_PREREAD); if (sd_m[frag_idx] == NULL) { - if ((m = m_gethdr(M_NOWAIT, MT_NOINIT)) == NULL) { + m = m_gethdr(M_NOWAIT, MT_NOINIT); + if (__predict_false(m == NULL)) break; - } sd_m[frag_idx] = m; } bit_set(fl->ifl_rx_bitmap, frag_idx); @@ -2036,25 +2033,32 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun } } - if (i) { - iru.iru_pidx = pidx; - iru.iru_count = i; - ctx->isc_rxd_refill(ctx->ifc_softc, &iru); - fl->ifl_pidx = idx; - fl->ifl_credits = credits; - } - DBG_COUNTER_INC(rxd_flush); - if (fl->ifl_pidx == 0) - pidx = fl->ifl_size - 1; - else - pidx = fl->ifl_pidx - 1; + if (n < count - 1) { + if (i != 0) { + iru.iru_pidx = pidx; + iru.iru_count = i; + ctx->isc_rxd_refill(ctx->ifc_softc, &iru); + fl->ifl_pidx = idx; + fl->ifl_credits = credits; + } + DBG_COUNTER_INC(rxd_flush); + if (fl->ifl_pidx == 0) + pidx = fl->ifl_size - 1; + else + pidx = fl->ifl_pidx - 1; - bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); - fl->ifl_fragidx = frag_idx + 1; - if (fl->ifl_fragidx == fl->ifl_size) - fl->ifl_fragidx = 0; + bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, + fl->ifl_id, pidx); + if (__predict_true(bit_test(fl->ifl_rx_bitmap, frag_idx))) { + fl->ifl_fragidx = frag_idx + 1; + if (fl->ifl_fragidx == fl->ifl_size) +
svn commit: r362961 - in stable/12: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf
Author: markj Date: Mon Jul 6 14:00:20 2020 New Revision: 362961 URL: https://svnweb.freebsd.org/changeset/base/362961 Log: MFC r362338: Add the SCTP_SUPPORT kernel option. Modified: stable/12/share/man/man4/sctp.4 stable/12/sys/conf/NOTES stable/12/sys/conf/options stable/12/sys/kern/uipc_socket.c stable/12/sys/netinet/in_proto.c stable/12/sys/netinet/ip_divert.c stable/12/sys/netinet/ip_output.c stable/12/sys/netinet/sctp_crc32.c stable/12/sys/netinet/sctp_crc32.h stable/12/sys/netinet6/in6_proto.c stable/12/sys/netinet6/ip6_forward.c stable/12/sys/netinet6/ip6_output.c stable/12/sys/netipsec/ipsec_output.c stable/12/sys/netpfil/pf/pf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/sctp.4 == --- stable/12/share/man/man4/sctp.4 Mon Jul 6 13:54:44 2020 (r362960) +++ stable/12/share/man/man4/sctp.4 Mon Jul 6 14:00:20 2020 (r362961) @@ -26,13 +26,16 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2020 +.Dd June 18, 2020 .Dt SCTP 4 .Os .Sh NAME .Nm sctp .Nd Internet Stream Control Transmission Protocol .Sh SYNOPSIS +.Cd "options SCTP" +.Cd "options SCTP_SUPPORT" +.Pp .In sys/types.h .In sys/socket.h .In netinet/sctp.h Modified: stable/12/sys/conf/NOTES == --- stable/12/sys/conf/NOTESMon Jul 6 13:54:44 2020(r362960) +++ stable/12/sys/conf/NOTESMon Jul 6 14:00:20 2020(r362961) @@ -692,7 +692,12 @@ optionsLIBALIAS # the V6 and V4.. since an association can span # both a V6 and V4 address at the SAME time :-) # +# The SCTP_SUPPORT option does not enable SCTP, but provides the necessary +# support for loading SCTP as a loadable kernel module. +# optionsSCTP +optionsSCTP_SUPPORT + # There are bunches of options: # this one turns on all sorts of # nastily printing that you can @@ -705,6 +710,7 @@ options SCTP # bits and prints.. which makes the code run # faster.. if you are not debugging don't use. optionsSCTP_DEBUG + # # All that options after that turn on specific types of # logging. You can monitor CWND growth, flight size @@ -727,7 +733,6 @@ options SCTP_MBCNT_LOGGING optionsSCTP_PACKET_LOGGING optionsSCTP_LTRACE_CHUNKS optionsSCTP_LTRACE_ERRORS - # altq(9). Enable the base part of the hooks with the ALTQ option. # Individual disciplines must be built into the base system and can not be Modified: stable/12/sys/conf/options == --- stable/12/sys/conf/options Mon Jul 6 13:54:44 2020(r362960) +++ stable/12/sys/conf/options Mon Jul 6 14:00:20 2020(r362961) @@ -478,6 +478,7 @@ XBONEHACK # SCTP # SCTP opt_sctp.h +SCTP_SUPPORT opt_sctp.h SCTP_DEBUG opt_sctp.h # Enable debug printfs SCTP_LOCK_LOGGING opt_sctp.h # Log to KTR lock activity SCTP_MBUF_LOGGING opt_sctp.h # Log to KTR general mbuf aloc/free Modified: stable/12/sys/kern/uipc_socket.c == --- stable/12/sys/kern/uipc_socket.cMon Jul 6 13:54:44 2020 (r362960) +++ stable/12/sys/kern/uipc_socket.cMon Jul 6 14:00:20 2020 (r362961) @@ -689,7 +689,7 @@ sonewconn(struct socket *head, int connstatus) return (so); } -#ifdef SCTP +#if defined(SCTP) || defined(SCTP_SUPPORT) /* * Socket part of sctp_peeloff(). Detach a new socket from an * association. The new socket is returned with a reference. Modified: stable/12/sys/netinet/in_proto.c == --- stable/12/sys/netinet/in_proto.cMon Jul 6 13:54:44 2020 (r362960) +++ stable/12/sys/netinet/in_proto.cMon Jul 6 14:00:20 2020 (r362961) @@ -97,7 +97,7 @@ static struct pr_usrreqs nousrreqs; #include #include #include -#endif /* SCTP */ +#endif FEATURE(inet, "Internet Protocol version 4"); @@ -327,7 +327,7 @@ SYSCTL_NODE(_net_inet, IPPROTO_IP, ip, CTLFLAG_RW, 0, SYSCTL_NODE(_net_inet, IPPROTO_ICMP, icmp, CTLFLAG_RW, 0, "ICMP"); SYSCTL_NODE(_net_inet, IPPROTO_UDP,udp,CTLFLAG_RW, 0, "UDP"); SYSCTL_NODE(_net_inet, IPPROTO_TCP,tcp,CTLFLAG_RW, 0, "TCP"); -#ifdef SCTP +#if defined(SCTP) || defined(SCTP_SUPPORT) SYSCTL_NODE(_net_inet, IPPROTO_SCTP, sctp, CTLFLAG_RW, 0, "SCTP"); #endif SYSCTL_NODE(_net_inet, IPPROTO_IGMP, igmp, CTLFLAG_RW, 0, "IGMP"); Modified: stable/12/sys/netinet/ip_divert.c == --- stable/12/sys/netinet/ip_divert.c Mon Jul 6 13:54:44 2020 (r362960) +++ stable/12/sys/netinet/ip_divert.c Mon Jul 6 14:00:20 2020 (r362961) @@ -69,7 +69,7 @@ __
svn commit: r362959 - in stable/12: share/man/man4 sys/dev/acpi_support
Author: markj Date: Mon Jul 6 13:54:18 2020 New Revision: 362959 URL: https://svnweb.freebsd.org/changeset/base/362959 Log: MFC r362496, r362592: acpi_ibm(4): Add support for putting fans in disengaged mode. PR: 247306 Modified: stable/12/share/man/man4/acpi_ibm.4 stable/12/sys/dev/acpi_support/acpi_ibm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/acpi_ibm.4 == --- stable/12/share/man/man4/acpi_ibm.4 Mon Jul 6 11:57:59 2020 (r362958) +++ stable/12/share/man/man4/acpi_ibm.4 Mon Jul 6 13:54:18 2020 (r362959) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 19, 2015 +.Dd June 24, 2020 .Dt ACPI_IBM 4 .Os .Sh NAME @@ -289,7 +289,12 @@ fan control might overheat the ThinkPad and lead to pe is not set accordingly. .It Va dev.acpi_ibm.0.fan_level Indicates at what speed the fan should run when being in manual mode. -Values are ranging from 0 (off) to 7 (max). +Valid values range from 0 (off) to 7 (max) and 8. +Level 8 is used by the driver to set the fan in unthrottled mode. +In this mode, the fan is set to spin freely and will quickly reach a very +high speed. +Use this mode only if absolutely necessary, e.g., if the system has reached its +critical temperature and it is about to shut down. The resulting speed differs from model to model. On a T41p this is as follows: .Pp @@ -302,6 +307,8 @@ off ~3600 RPM .It Li 6, 7 ~4300 RPM +.It Li 8 +~6400 RPM (Full-speed, unthrottled) .El .It Va dev.acpi_ibm.0.fan_speed (read-only) Modified: stable/12/sys/dev/acpi_support/acpi_ibm.c == --- stable/12/sys/dev/acpi_support/acpi_ibm.c Mon Jul 6 11:57:59 2020 (r362958) +++ stable/12/sys/dev/acpi_support/acpi_ibm.c Mon Jul 6 13:54:18 2020 (r362959) @@ -2,6 +2,7 @@ * Copyright (c) 2004 Takanori Watanabe * Copyright (c) 2005 Markus Brueffer * All rights reserved. + * Copyright (c) 2020 Ali Abdallah * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -105,7 +106,7 @@ ACPI_MODULE_NAME("IBM") #define IBM_EC_MASK_MUTE (1 << 6) #define IBM_EC_FANSTATUS 0x2F #define IBM_EC_MASK_FANLEVEL 0x3f -#define IBM_EC_MASK_FANDISENGAGED(1 << 6) +#define IBM_EC_MASK_FANUNTHROTTLED (1 << 6) #define IBM_EC_MASK_FANSTATUS(1 << 7) #define IBM_EC_FANSPEED0x84 @@ -263,7 +264,8 @@ static struct { { .name = "fan_level", .method = ACPI_IBM_METHOD_FANLEVEL, - .description= "Fan level", + .description= "Fan level, 0-7 (recommended max), " + "8 (unthrottled, full-speed)", }, { .name = "fan", @@ -830,7 +832,10 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int met */ if (!sc->fan_handle) { ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - val = val_ec & IBM_EC_MASK_FANLEVEL; + if (val_ec & IBM_EC_MASK_FANUNTHROTTLED) + val = 8; + else + val = val_ec & IBM_EC_MASK_FANLEVEL; } break; @@ -914,15 +919,23 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int met break; case ACPI_IBM_METHOD_FANLEVEL: - if (arg < 0 || arg > 7) + if (arg < 0 || arg > 8) return (EINVAL); if (!sc->fan_handle) { - /* Read the current fanstatus */ + /* Read the current fan status. */ ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - val = val_ec & (~IBM_EC_MASK_FANLEVEL); + val = val_ec & ~(IBM_EC_MASK_FANLEVEL | + IBM_EC_MASK_FANUNTHROTTLED); - return ACPI_EC_WRITE(sc->ec_dev, IBM_EC_FANSTATUS, val | arg, 1); + if (arg == 8) + /* Full speed, set the unthrottled bit. */ + val |= 7 | IBM_EC_MASK_FANUNTHROTTLED; + else + val |= arg; + + return (ACPI_EC_WRITE(sc->ec_dev, IBM_EC_FANSTATUS, val, + 1)); } break; ___ 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-unsubscr...@freebsd.org"
svn commit: r362960 - in stable/12/sys: compat/linuxkpi/common/src dev/md
Author: markj Date: Mon Jul 6 13:54:44 2020 New Revision: 362960 URL: https://svnweb.freebsd.org/changeset/base/362960 Log: MFC r362739: Remove some redundant assignments and computations. Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c stable/12/sys/dev/md/md.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c == --- stable/12/sys/compat/linuxkpi/common/src/linux_page.c Mon Jul 6 13:54:18 2020(r362959) +++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c Mon Jul 6 13:54:44 2020(r362960) @@ -201,7 +201,7 @@ linux_get_user_pages_internal(vm_map_t map, unsigned l int i; prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; - len = ((size_t)nr_pages) << PAGE_SHIFT; + len = ptoa((vm_offset_t)nr_pages); count = vm_fault_quick_hold_pages(map, start, len, prot, pages, nr_pages); if (count == -1) return (-EFAULT); @@ -232,9 +232,8 @@ __get_user_pages_fast(unsigned long start, int nr_page return (0); MPASS(pages != NULL); - va = start; map = &curthread->td_proc->p_vmspace->vm_map; - end = start + (((size_t)nr_pages) << PAGE_SHIFT); + end = start + ptoa((vm_offset_t)nr_pages); if (!vm_map_range_valid(map, start, end)) return (-EINVAL); prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; Modified: stable/12/sys/dev/md/md.c == --- stable/12/sys/dev/md/md.c Mon Jul 6 13:54:18 2020(r362959) +++ stable/12/sys/dev/md/md.c Mon Jul 6 13:54:44 2020(r362960) @@ -1562,8 +1562,8 @@ mdresize(struct md_s *sc, struct md_req *mdr) if (mdr->md_mediasize <= 0 || (mdr->md_mediasize % PAGE_SIZE) != 0) return (EDOM); - oldpages = OFF_TO_IDX(round_page(sc->mediasize)); - newpages = OFF_TO_IDX(round_page(mdr->md_mediasize)); + oldpages = OFF_TO_IDX(sc->mediasize); + newpages = OFF_TO_IDX(mdr->md_mediasize); if (newpages < oldpages) { VM_OBJECT_WLOCK(sc->object); vm_object_page_remove(sc->object, newpages, 0, 0); ___ 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-unsubscr...@freebsd.org"
svn commit: r362958 - head/libexec/rtld-elf
Author: luporl Date: Mon Jul 6 11:57:59 2020 New Revision: 362958 URL: https://svnweb.freebsd.org/changeset/base/362958 Log: Handle non-PLT GNU IFUNC relocations in rtld In the last IFUNC related changes to rtld, the code that handled non-PLT GNU IFUNC relocations ended up getting lost. This could leave some relocations unhandled, causing crashes or misbehavior. This change restores the handling of these relocations, but now together with the other IFUNC relocations, allowing resolvers to reference external symbols. Reviewed by: kib MFC after:2 weeks Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision:https://reviews.freebsd.org/D25550 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cMon Jul 6 10:05:35 2020 (r362957) +++ head/libexec/rtld-elf/rtld.cMon Jul 6 11:57:59 2020 (r362958) @@ -3111,7 +3111,8 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in return (0); obj->ifuncs_resolved = true; if (!obj->irelative && !obj->irelative_nonplt && - !((obj->bind_now || bind_now) && obj->gnu_ifunc)) + !((obj->bind_now || bind_now) && obj->gnu_ifunc) && + !obj->non_plt_gnu_ifunc) return (0); if (obj_disable_relro(obj) == -1 || (obj->irelative && reloc_iresolve(obj, lockstate) == -1) || @@ -3119,6 +3120,8 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in lockstate) == -1) || ((obj->bind_now || bind_now) && obj->gnu_ifunc && reloc_gnu_ifunc(obj, flags, lockstate) == -1) || + (obj->non_plt_gnu_ifunc && reloc_non_plt(obj, &obj_rtld, + flags | SYMLOOK_IFUNC, lockstate) == -1) || obj_enforce_relro(obj) == -1) return (-1); return (0); ___ 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-unsubscr...@freebsd.org"
svn commit: r362957 - head/bin/sh
Author: 0mp (doc,ports committer) Date: Mon Jul 6 10:05:35 2020 New Revision: 362957 URL: https://svnweb.freebsd.org/changeset/base/362957 Log: Fix description of the "\$" sequence for PS1 The manual page documents "\$" to expand to either "$" or "#" followed by a single space. In reality, the single space character is not appended. PR: 247791 Submitted by: kd-...@pm.me MFC after:7 days Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Mon Jul 6 09:53:00 2020(r362956) +++ head/bin/sh/sh.1Mon Jul 6 10:05:35 2020(r362957) @@ -32,7 +32,7 @@ .\"from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd February 24, 2019 +.Dd July 6, 2020 .Dt SH 1 .Os .Sh NAME @@ -1425,9 +1425,9 @@ The final component of the current working directory. The entire path of the current working directory. .It Li \e$ Superuser status. -.Dq Li "$ " +.Dq Li "$" for normal users and -.Dq Li "# " +.Dq Li "#" for superusers. .It Li \e\e A literal backslash. ___ 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-unsubscr...@freebsd.org"
svn commit: r362956 - head/lib/libcam
Author: 0mp (doc,ports committer) Date: Mon Jul 6 09:53:00 2020 New Revision: 362956 URL: https://svnweb.freebsd.org/changeset/base/362956 Log: Clean up cam.3 - Add a missing Pp [1] - Remove uses of Tn - Use "Xr open 2" when appropriate PR: 247783 [1] Submitted by: PauAmma [1] MFC after:3 days Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 == --- head/lib/libcam/cam.3 Mon Jul 6 09:04:06 2020(r362955) +++ head/lib/libcam/cam.3 Mon Jul 6 09:53:00 2020(r362956) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2017 +.Dd July 6, 2020 .Dt CAM 3 .Os .Sh NAME @@ -218,15 +218,12 @@ structure using .Fn cam_open_btl is similar to .Fn cam_open_spec_device , -except that it takes a -.Tn SCSI -bus, target and logical unit instead of a device name and unit number as +except that it takes a SCSI bus, +target and logical unit instead of a device name and unit number as arguments. The .Va path_id -argument is the CAM equivalent of a -.Tn SCSI -bus number. +argument is the CAM equivalent of a SCSI bus number. It represents the logical bus number in the system. The .Ar flags @@ -263,10 +260,13 @@ should be if the user wants the CAM library to allocate space for the .Va cam_device structure. +.Pp .Fn cam_close_device frees the .Va cam_device -structure allocated by one of the above open() calls, and closes the file +structure allocated by one of the above +.Xr open 2 +calls, and closes the file descriptor to the passthrough device. This routine should not be called if the user allocated space for the @@ -276,7 +276,9 @@ Instead, the user should call .Fn cam_close_spec_device . .Pp .Fn cam_close_spec_device -merely closes the file descriptor opened in one of the open() routines +merely closes the file descriptor opened in one of the +.Xr open 2 +routines described above. This function should be called when the .Va cam_device ___ 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-unsubscr...@freebsd.org"
svn commit: r362955 - in stable/12: crypto/heimdal/lib/krb5 lib/libcasper/libcasper
Author: 0mp (doc,ports committer) Date: Mon Jul 6 09:04:06 2020 New Revision: 362955 URL: https://svnweb.freebsd.org/changeset/base/362955 Log: MFC 362676: Fix trailing-comma-related typos in the tree when the Xr macro is used Modified: stable/12/crypto/heimdal/lib/krb5/krb5.conf.5 stable/12/lib/libcasper/libcasper/libcasper_service.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/heimdal/lib/krb5/krb5.conf.5 == --- stable/12/crypto/heimdal/lib/krb5/krb5.conf.5 Mon Jul 6 08:51:55 2020(r362954) +++ stable/12/crypto/heimdal/lib/krb5/krb5.conf.5 Mon Jul 6 09:04:06 2020(r362955) @@ -257,7 +257,7 @@ Setting this flag to make it store the MIT way, this is default for Heimdal 0.7. .It Li check-rd-req-server If set to "ignore", the framework will ignore any the server input to -.Xr krb5_rd_req 3, +.Xr krb5_rd_req 3 , this is very useful when the GSS-API server input the wrong server name into the gss_accept_sec_context call. .El Modified: stable/12/lib/libcasper/libcasper/libcasper_service.3 == --- stable/12/lib/libcasper/libcasper/libcasper_service.3 Mon Jul 6 08:51:55 2020(r362954) +++ stable/12/lib/libcasper/libcasper/libcasper_service.3 Mon Jul 6 09:04:06 2020(r362955) @@ -51,7 +51,7 @@ macro to create a new Casper service. The .Fa name is a string containing the service name, which will be used in the -.Xr cap_service_open 3, +.Xr cap_service_open 3 , function to identify it. .Pp The ___ 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-unsubscr...@freebsd.org"
svn commit: r362954 - in head/sys: arm/broadcom/bcm2835 conf dev/pci
Author: andrew Date: Mon Jul 6 08:51:55 2020 New Revision: 362954 URL: https://svnweb.freebsd.org/changeset/base/362954 Log: Add a driver for bcm2838 PCI express controller This adds support for the Broadcom bcm2711 PCI express controller, found on the Raspberry Pi 4 (aka the bcm2838 SoC). The driver has only been developed against the soldered-on VIA XHCI controller and not tested with other end points. Submitted by: Robert Crowston Differential Revision:https://reviews.freebsd.org/D25068 Added: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/conf/files.arm64 head/sys/dev/pci/pci_host_generic_fdt.c head/sys/dev/pci/pci_host_generic_fdt.h Added: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Mon Jul 6 08:51:55 2020 (r362954) @@ -0,0 +1,743 @@ +/*- + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2020 Dr Robert Harvey Crowston + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * + * $FreeBSD$ + * + */ + +/* + * BCM2838-compatible PCI-express controller. + * + * Broadcom likes to give the same chip lots of different names. The name of + * this driver is taken from the Raspberry Pi 4 Broadcom 2838 chip. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" +#include "msi_if.h" + +extern struct bus_space memmap_bus; + +#define BUS_SPACE_3G_MAXADDR 0xc000 +#define PCI_ID_VAL30x43c +#define CLASS_SHIFT0x10 +#define SUBCLASS_SHIFT 0x8 + +#define REG_CONTROLLER_HW_REV 0x406c +#define REG_BRIDGE_CTRL0x9210 +#define BRIDGE_DISABLE_FLAG0x1 +#define BRIDGE_RESET_FLAG 0x2 +#define REG_BRIDGE_SERDES_MODE 0x4204 +#define REG_BRIDGE_CONFIG 0x4008 +#define REG_BRIDGE_MEM_WINDOW_LOW 0x4034 +#define REG_BRIDGE_MEM_WINDOW_HIGH 0x4038 +#define REG_BRIDGE_MEM_WINDOW_10x403c +#define REG_BRIDGE_GISB_WINDOW 0x402c +#define REG_BRIDGE_STATE 0x4068 +#define REG_BRIDGE_LINK_STATE 0x00bc +#define REG_BRIDGE_BUS_WINDOW_LOW 0x400c +#define REG_BRIDGE_BUS_WINDOW_HIGH 0x4010 +#define REG_BRIDGE_CPU_WINDOW_LOW 0x4070 +#define REG_BRIDGE_CPU_WINDOW_START_HIGH 0x4080 +#define REG_BRIDGE_CPU_WINDOW_END_HIGH 0x4084 + +#define REG_MSI_ADDR_LOW 0x4044 +#define REG_MSI_ADDR_HIGH 0x4048 +#define REG_MSI_CONFIG 0x404c +#define REG_MSI_CLR0x4508 +#define REG_MSI_MASK_CLR 0x4514 +#define REG_MSI_RAISED 0x4500 +#define REG_MSI_EOI0x4060 +#define NUM_MSI32 + +#define REG_EP_CONFIG_CHOICE 0x9000 +#define REG_EP_CONFIG_DATA 0x8000 + +/* + * These values were obtained from runtime inspection of a Linux system using a + * JTAG. The very limited documentation I have obtained from Broadcom does not + * explain how to compute them. + */ +#define REG_VALUE_4GB_WINDOW 0x11 +#define REG_VALUE_4GB_CONFIG 0x88003000 +#define REG_VALUE_MSI_CONFIG 0xffe06540 + +struct bcm_pcib_irqsrc { + struct intr_irqsrc isrc; + u_int irq; + boolallocated; +}; + +struct bcm_pcib_softc { + struct generic_pcie_fdt_softc base; + device_tdev; + struct mtx config_mtx; + struct mtx msi_mtx; + struct resource *msi_irq_res; + void*msi_intr_cookie; + struct bcm_pcib_irqsrc *msi_isrcs; + pci_addr_t
svn commit: r362953 - in head/sys: dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_fpga_tools dev/mlx5/mlx5_ib dev/mthca ofed/drivers/infiniba...
Author: hselasky Date: Mon Jul 6 08:50:11 2020 New Revision: 362953 URL: https://svnweb.freebsd.org/changeset/base/362953 Log: Infiniband clients must be attached and detached in a specific order in ibcore. Currently the linking order of the infiniband, IB, modules decide in which order the clients are attached and detached. For example one IB client may use resources from another IB client. This can lead to a potential deadlock at shutdown. For example if the ipoib is unregistered after the ib_multicast client is detached, then if ipoib is using multicast addresses a deadlock may happen, because ib_multicast will wait for all its resources to be freed before returning from the remove method. Fix this by using module_xxx_order() instead of module_xxx(). Differential Revision:https://reviews.freebsd.org/D23973 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mthca/mthca_main.c head/sys/ofed/drivers/infiniband/core/ib_cm.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_device.c head/sys/ofed/drivers/infiniband/core/ib_iwcm.c head/sys/ofed/drivers/infiniband/core/ib_ucm.c head/sys/ofed/drivers/infiniband/core/ib_ucma.c head/sys/ofed/drivers/infiniband/core/ib_user_mad.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/infiniband/util/madeye.c Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c == --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -4218,8 +4218,8 @@ static void __exit mlx4_cleanup(void) destroy_workqueue(mlx4_wq); } -module_init(mlx4_init); -module_exit(mlx4_cleanup); +module_init_order(mlx4_init, SI_ORDER_FIRST); +module_exit_order(mlx4_cleanup, SI_ORDER_FIRST); static int mlx4_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c == --- head/sys/dev/mlx4/mlx4_en/mlx4_en_main.cMon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_main.cMon Jul 6 08:50:11 2020 (r362953) @@ -304,8 +304,8 @@ static void __exit mlx4_en_cleanup(void) mlx4_unregister_interface(&mlx4_en_interface); } -module_init(mlx4_en_init); -module_exit(mlx4_en_cleanup); +module_init_order(mlx4_en_init, SI_ORDER_SIXTH); +module_exit_order(mlx4_en_cleanup, SI_ORDER_SIXTH); static int mlx4en_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c == --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.cMon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.cMon Jul 6 08:50:11 2020 (r362953) @@ -3319,8 +3319,8 @@ static void __exit mlx4_ib_cleanup(void) destroy_workqueue(wq); } -module_init_order(mlx4_ib_init, SI_ORDER_THIRD); -module_exit(mlx4_ib_cleanup); +module_init_order(mlx4_ib_init, SI_ORDER_SEVENTH); +module_exit_order(mlx4_ib_cleanup, SI_ORDER_SEVENTH); static int mlx4ib_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c == --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -2026,5 +2026,5 @@ static void __exit cleanup(void) pci_unregister_driver(&mlx5_core_driver); } -module_init(init); -module_exit(cleanup); +module_init_order(init, SI_ORDER_FIRST); +module_exit_order(cleanup, SI_ORDER_FIRST); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c == --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cMon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cMon Jul 6 08:50:11 2020 (r362953) @@ -4723,8 +4723,8 @@ mlx5e_show_version(void __unused *arg) } SYSINIT(mlx5e_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5e_show_version, NULL); -module_init_order(mlx5e_init, SI_ORDER_THIRD); -module_exit_order(mlx5e_cleanup, SI_ORDER_THIRD); +module_init_order(mlx5e_init, SI_ORDER_SIXTH); +module_exit_order(mlx5e_cleanup, SI_ORDER_SIXTH); #if (__FreeBSD
svn commit: r362952 - head/usr.sbin/bhyve
Author: grehan Date: Mon Jul 6 08:36:14 2020 New Revision: 362952 URL: https://svnweb.freebsd.org/changeset/base/362952 Log: Silence ACPI RTC error/warning in Linux guests. Allow guests to set the RTC bit in the ACPI PM control register. This eliminates an annoying (and harmless) Linux kernel boot message. PR: 244721 Submitted by: Jose Luis Duran MFC after:1 week Modified: head/usr.sbin/bhyve/pm.c Modified: head/usr.sbin/bhyve/pm.c == --- head/usr.sbin/bhyve/pm.cMon Jul 6 02:00:35 2020(r362951) +++ head/usr.sbin/bhyve/pm.cMon Jul 6 08:36:14 2020(r362952) @@ -198,7 +198,7 @@ pm1_enable_handler(struct vmctx *ctx, int vcpu, int in * the global lock, but ACPI-CA whines profusely if it * can't set GBL_EN. */ - pm1_enable = *eax & (PM1_PWRBTN_EN | PM1_GBL_EN); + pm1_enable = *eax & (PM1_RTC_EN | PM1_PWRBTN_EN | PM1_GBL_EN); sci_update(ctx); } pthread_mutex_unlock(&pm_lock); ___ 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-unsubscr...@freebsd.org"