svn commit: r345520 - head/sys/powerpc/aim
Author: jhibbits Date: Tue Mar 26 02:53:35 2019 New Revision: 345520 URL: https://svnweb.freebsd.org/changeset/base/345520 Log: powerpc64: Micro-optimize moea64 native pmap tlbie * Cache moea64_need_lock in a local variable; gcc generates slightly better code this way, it doesn't need to reload the value from memory each read. * VPN cropping is only needed on PowerPC ISA 2.02 and older cores, a subset of those that need serialization, so move this under the need_lock check, so those that don't need the lock don't even need to check this. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c == --- head/sys/powerpc/aim/moea64_native.cTue Mar 26 02:45:23 2019 (r345519) +++ head/sys/powerpc/aim/moea64_native.cTue Mar 26 02:53:35 2019 (r345520) @@ -146,18 +146,19 @@ TLBIE(uint64_t vpn) { #endif static volatile u_int tlbie_lock = 0; + bool need_lock = moea64_need_lock; vpn <<= ADDR_PIDX_SHFT; /* Hobo spinlock: we need stronger guarantees than mutexes provide */ - if (moea64_need_lock) { + if (need_lock) { while (!atomic_cmpset_int(_lock, 0, 1)); isync(); /* Flush instruction queue once lock acquired */ + + if (moea64_crop_tlbie) + vpn &= ~(0xULL << 48); } - if (moea64_crop_tlbie) - vpn &= ~(0xULL << 48); - #ifdef __powerpc64__ /* * Explicitly clobber r0. The tlbie instruction has two forms: an old @@ -196,7 +197,7 @@ TLBIE(uint64_t vpn) { #endif /* No barriers or special ops -- taken care of by ptesync above */ - if (moea64_need_lock) + if (need_lock) tlbie_lock = 0; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345519 - head/sys/conf
Author: kevans Date: Tue Mar 26 02:45:23 2019 New Revision: 345519 URL: https://svnweb.freebsd.org/changeset/base/345519 Log: Allow kernel config to specify DTS/DTSO to build, and out-of-tree support This allows for directives such as makeoptions DTS+=/out/of/tree/myboard.dts # in tree! Same rules applied as if this were in a dtb/ module makeoptions DTS+=otherboard.dts to be specified in config(5) and have these built/installed alongside th kernel. The assumption that overlays live in an overlays/ directory is only made for in-tree DTSO, but we still make the assumption that out-of-tree arm64 DTS will be in vendored directories (for now). This lowers the cost to hacking on an overlay or dts by being able to quickly throw it in a custom config, especially if it doesn't fit one of the current dtb/modules quite appropriately or it's not intended for commit there. The build/install targets were split out of dtb.mk to centralize the build logic and leave out the all/realinstall/CLEANFILES additions... it was believed that we didn't want to pollute the kernel build with these. The build rules were converted to suffix rules at the suggestion of Ian to clean things up a little bit in a world where we can have mixed in-tree/out-of-tree DTS/DTSO specified. Reviewed by: ian MFC after:1 week Differential Revision:https://reviews.freebsd.org/D19351 Added: head/sys/conf/dtb.build.mk (contents, props changed) Modified: head/sys/conf/dtb.mk head/sys/conf/kern.post.mk Added: head/sys/conf/dtb.build.mk == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/dtb.build.mk Tue Mar 26 02:45:23 2019(r345519) @@ -0,0 +1,77 @@ +# $FreeBSD$ + +.include +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" + +DTC?= dtc + +.if !defined(SYSDIR) +.if defined(S) +SYSDIR=${S} +.else +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys +.if exists(${_dir}/kern/) +SYSDIR=${_dir:tA} +.endif +.endfor +.endif # defined(S) +.endif # defined(SYSDIR) + +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) +.error "can't find kernel source tree" +.endif + +DTB=${DTS:T:R:S/$/.dtb/} +DTBO=${DTSO:T:R:S/$/.dtbo/} + +.SUFFIXES: .dtb .dts .dtbo .dtso +.PATH.dts: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} +.PATH.dtso: ${SYSDIR}/dts/${MACHINE}/overlays + +.export DTC ECHO + +.dts.dtb: ${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +.dtso.dtbo:${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +# Add dependencies on the source file so that out-of-tree things can be included +# without any .PATH additions. +.for _dts in ${DTS} +${_dts:R:T}.dtb: ${_dts} +.endfor + +.for _dtso in ${DTSO} +${_dtso:R:T}.dtbo: ${_dtso} +.endfor + +_dtbinstall: +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. We don't recreate it to avoid duplicate +# entries in the NO_ROOT case. + test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} +.for _dtb in ${DTB} +.if ${MACHINE_CPUARCH} == "aarch64" + # :H:T here to grab the vendor component of the DTB path in a way that + # allows out-of-tree DTS builds, too. We make the assumption that + # out-of-tree DTS will have a similar directory structure to in-tree, + # with .dts files appearing in a vendor/ directory. + test -d ${DESTDIR}${DTBDIR}/${_dtb:H:T} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}/${_dtb:H:T} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb:T} ${DESTDIR}${DTBDIR}/${_dtb:H:T} +.else + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ +.endif +.endfor + test -d ${DESTDIR}${DTBODIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBODIR} +.for _dtbo in ${DTBO} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtbo} ${DESTDIR}${DTBODIR}/ +.endfor Modified: head/sys/conf/dtb.mk == --- head/sys/conf/dtb.mkTue Mar 26 02:35:58 2019(r345518) +++ head/sys/conf/dtb.mkTue Mar 26 02:45:23 2019(r345519) @@ -8,6 +8,8 @@ # # DTS List of the dts files to build and install. # +# DTSO List of the dts overlay files to build and install. +# # DTBDIR Base path for dtb modules [/boot/dtb] # #
svn commit: r345518 - head/stand/lua
Author: kevans Date: Tue Mar 26 02:35:58 2019 New Revision: 345518 URL: https://svnweb.freebsd.org/changeset/base/345518 Log: lualoader: Fix up some luacheck concerns - Garbage collect an unused (removed because it was useless) constant - Don't bother with vararg notation if args will not be used MFC after:1 week Modified: head/stand/lua/config.lua head/stand/lua/menu.lua Modified: head/stand/lua/config.lua == --- head/stand/lua/config.lua Tue Mar 26 02:33:27 2019(r345517) +++ head/stand/lua/config.lua Tue Mar 26 02:35:58 2019(r345518) @@ -45,7 +45,6 @@ local MSG_FAILOPENCFG = "Failed to open config: '%s'" local MSG_FAILREADCFG = "Failed to read config: '%s'" local MSG_FAILPARSECFG = "Failed to parse config: '%s'" local MSG_FAILEXBEF = "Failed to execute '%s' before loading '%s'" -local MSG_FAILEXMOD = "Failed to execute '%s'" local MSG_FAILEXAF = "Failed to execute '%s' after loading '%s'" local MSG_MALFORMED = "Malformed line (%d):\n\t'%s'" local MSG_DEFAULTKERNFAIL = "No kernel set, failed to load from module_path" Modified: head/stand/lua/menu.lua == --- head/stand/lua/menu.lua Tue Mar 26 02:33:27 2019(r345517) +++ head/stand/lua/menu.lua Tue Mar 26 02:35:58 2019(r345518) @@ -494,7 +494,7 @@ function menu.autoboot(delay) end -- CLI commands -function cli.menu(...) +function cli.menu() menu.run() end ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345517 - head/stand/lua
Author: kevans Date: Tue Mar 26 02:33:27 2019 New Revision: 345517 URL: https://svnweb.freebsd.org/changeset/base/345517 Log: lualoader: Clear the screen before prompting for password Assuming that the autoboot sequence was interrupted, we've done enough cursor manipulation that the prompt for the password will be sufficiently obscured a couple of lines up. Clear the screen and reset the cursor position here, too. MFC after:1 week Modified: head/stand/lua/password.lua Modified: head/stand/lua/password.lua == --- head/stand/lua/password.lua Tue Mar 26 02:21:09 2019(r345516) +++ head/stand/lua/password.lua Tue Mar 26 02:33:27 2019(r345517) @@ -40,6 +40,12 @@ local show_password_mask = false local twiddle_chars = {"/", "-", "\\", "|"} local screen_setup = false +local function setup_screen() + screen.clear() + screen.defcursor() + screen_setup = true +end + -- Module exports function password.read(prompt_length) local str = "" @@ -90,9 +96,7 @@ function password.check() end if not screen_setup then - screen.clear() - screen.defcursor() - screen_setup = true + setup_screen() end while true do @@ -131,6 +135,11 @@ function password.check() local pwd = loader.getenv("password") if pwd ~= nil then core.autoboot() + -- The autoboot sequence was interrupted, so we'll need to + -- prompt for a password. Put the screen back into a known + -- good state, otherwise we're drawing back a couple lines + -- in the middle of other text. + setup_screen() end compare("Loader password:", pwd) end ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345516 - head/contrib/netbsd-tests/lib/libc/regex
Author: kevans Date: Tue Mar 26 02:21:09 2019 New Revision: 345516 URL: https://svnweb.freebsd.org/changeset/base/345516 Log: MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust MFC after:3 days Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c == --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.cTue Mar 26 02:13:25 2019(r345515) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.cTue Mar 26 02:21:09 2019(r345516) @@ -1,4 +1,4 @@ -/* $NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $ */ +/* $NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $"); +__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $"); #include #include @@ -56,7 +56,7 @@ mkstr(const char *str, size_t len) { size_t slen = strlen(str); char *p = malloc(slen * len + 1); - ATF_REQUIRE(p != NULL); + ATF_REQUIRE_MSG(p != NULL, "slen=%zu, len=%zu", slen, len); for (size_t i = 0; i < len; i++) strcpy([i * slen], str); return p; @@ -183,11 +183,12 @@ ATF_TC_HEAD(regcomp_too_big, tc) ATF_TC_BODY(regcomp_too_big, tc) { regex_t re; - struct rlimit limit; int e; + struct rlimit limit; - limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024; + limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, ) != -1); + for (size_t i = 0; i < __arraycount(tests); i++) { char *d = (*tests[i].pattern)(REGEX_MAXSIZE); e = regcomp(, d, tests[i].type); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345514 - head/sys/fs/tmpfs
Author: sobomax Date: Tue Mar 26 01:28:10 2019 New Revision: 345514 URL: https://svnweb.freebsd.org/changeset/base/345514 Log: Refine r345425: get rid of superfluous helper macro that I have added. MFC after:2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c == --- head/sys/fs/tmpfs/tmpfs_vfsops.cMon Mar 25 21:38:58 2019 (r345513) +++ head/sys/fs/tmpfs/tmpfs_vfsops.cTue Mar 26 01:28:10 2019 (r345514) @@ -137,8 +137,6 @@ tmpfs_node_fini(void *mem, int size) mtx_destroy(>tn_interlock); } -#define TMPFS_SC(mp) ((struct tmpfs_mount *)(mp)->mnt_data) - static int tmpfs_mount(struct mount *mp) { @@ -174,11 +172,11 @@ tmpfs_mount(struct mount *mp) * parameter, say trying to change rw to ro or vice * versa, would cause vfs_filteropt() to bail. */ - if (size_max != TMPFS_SC(mp)->tm_size_max) + if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) return (EOPNOTSUPP); } if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - !(TMPFS_SC(mp)->tm_ronly)) { + !(VFS_TO_TMPFS(mp)->tm_ronly)) { /* RW -> RO */ error = VFS_SYNC(mp, MNT_WAIT); if (error) @@ -189,14 +187,14 @@ tmpfs_mount(struct mount *mp) error = vflush(mp, 0, flags, curthread); if (error) return (error); - TMPFS_SC(mp)->tm_ronly = 1; + VFS_TO_TMPFS(mp)->tm_ronly = 1; MNT_ILOCK(mp); mp->mnt_flag |= MNT_RDONLY; MNT_IUNLOCK(mp); } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - TMPFS_SC(mp)->tm_ronly) { + VFS_TO_TMPFS(mp)->tm_ronly) { /* RO -> RW */ - TMPFS_SC(mp)->tm_ronly = 0; + VFS_TO_TMPFS(mp)->tm_ronly = 0; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345513 - head/sys/kern
Author: markj Date: Mon Mar 25 21:38:58 2019 New Revision: 345513 URL: https://svnweb.freebsd.org/changeset/base/345513 Log: Reject F_SETLK_REMOTE commands when sysid == 0. A sysid of 0 denotes the local system, and some handlers for remote locking commands do not attempt to deal with local locks. Note that F_SETLK_REMOTE is only available to privileged users as it is intended to be used as a testing interface. Reviewed by: kib Reported by: syzbot+9c457a6ae014a3281...@syzkaller.appspotmail.com MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D19702 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cMon Mar 25 21:14:51 2019 (r345512) +++ head/sys/kern/kern_descrip.cMon Mar 25 21:38:58 2019 (r345513) @@ -601,7 +601,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ case F_SETLK_REMOTE: error = priv_check(td, PRIV_NFS_LOCKD); - if (error) + if (error != 0) return (error); flg = F_REMOTE; goto do_setlk; @@ -612,6 +612,12 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ case F_SETLK: do_setlk: + flp = (struct flock *)arg; + if ((flg & F_REMOTE) != 0 && flp->l_sysid == 0) { + error = EINVAL; + break; + } + error = fget_unlocked(fdp, fd, _flock_rights, , NULL); if (error != 0) break; @@ -621,7 +627,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ break; } - flp = (struct flock *)arg; if (flp->l_whence == SEEK_CUR) { foffset = foffset_get(fp); if (foffset < 0 || @@ -667,10 +672,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ flp, flg); break; case F_UNLCKSYS: - /* -* Temporary api for testing remote lock -* infrastructure. -*/ if (flg != F_REMOTE) { error = EINVAL; break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345512 - head/usr.sbin/daemon
Author: grembo (ports committer) Date: Mon Mar 25 21:14:51 2019 New Revision: 345512 URL: https://svnweb.freebsd.org/changeset/base/345512 Log: Correct contradictory information on default syslog logging priority. MFC after:1 week Modified: head/usr.sbin/daemon/daemon.8 Modified: head/usr.sbin/daemon/daemon.8 == --- head/usr.sbin/daemon/daemon.8 Mon Mar 25 18:19:37 2019 (r345511) +++ head/usr.sbin/daemon/daemon.8 Mon Mar 25 21:14:51 2019 (r345512) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2018 +.Dd March 25, 2019 .Dt DAEMON 8 .Os .Sh NAME @@ -129,7 +129,7 @@ Requires adequate superuser privileges. .It Fl s Ar syslog_priority These priorities are accepted: emerg, alert, crit, err, warning, notice, info, and debug. -The default is info. +The default is notice. .It Fl l Ar syslog_facility These facilities are accepted: auth, authpriv, console, cron, daemon, ftp, kern, lpr, mail, news, ntp, security, syslog, user, uucp, and ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs
In message <3398a21318a4a6715609004d569d20de86f1dc7a.ca...@freebsd.org> , Ian Le pore writes: > On Mon, 2019-03-25 at 05:42 -0700, Cy Schubert wrote: > > In message <201903250746.x2p7kkuu019...@repo.freebsd.org>, Allan > > Jude > > writes: > > > Author: allanjude > > > Date: Mon Mar 25 07:46:20 2019 > > > New Revision: 345491 > > > URL: https://svnweb.freebsd.org/changeset/base/345491 > > > > > > Log: > > > Make TMPFS_PAGES_MINRESERVED a kernel option > > > > > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for > > > the system > > > and not used by tmpfs. > > > > > > On very small memory systems, the default value may be too high > > > and this > > > prevents these small memory systems from using reroot, which is > > > required > > > for them to install firmware updates. > > > > > > Submitted by: Hiroki Mori > > > Reviewed by:mizhka > > > Differential Revision: https://reviews.freebsd.org/D13583 > > > > > > Modified: > > > head/sys/conf/options > > > head/sys/fs/tmpfs/tmpfs.h > > > head/sys/fs/tmpfs/tmpfs_vfsops.c > > > head/sys/modules/tmpfs/Makefile > > > > > > > Would this be a good candidate for a sysctl or tuneable? > > > > The small-memory embedded systems most affected by this often don't use > loader(8) at all, so tunables aren't an option, and sysctl may be too > late. No reason it can't be a tunable as well, but it'll probably need > to remain as a compile-time option too. Yes, I should have been more clear. I can see using a tuneable on a 2 GB or 4 GB Intel pandaboard. (Perfect for a firewall or a UPS management station.) -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345510 - head/sys/arm64/arm64
Author: andrew Date: Mon Mar 25 18:02:04 2019 New Revision: 345510 URL: https://svnweb.freebsd.org/changeset/base/345510 Log: Sort printing of the ID registers on arm64 to be identical to the documentation. This will simplify checking new fields when they are added. MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c == --- head/sys/arm64/arm64/identcpu.c Mon Mar 25 17:45:47 2019 (r345509) +++ head/sys/arm64/arm64/identcpu.c Mon Mar 25 18:02:04 2019 (r345510) @@ -494,63 +494,68 @@ print_cpu_features(u_int cpu) printed = 0; sbuf_printf(sb, " Instruction Set Attributes 0 = <"); - switch (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_RDM_NONE: + switch (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_DP_NONE: break; - case ID_AA64ISAR0_RDM_IMPL: - sbuf_printf(sb, "%sRDM", SEP_STR); + case ID_AA64ISAR0_DP_IMPL: + sbuf_printf(sb, "%sDotProd", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown RDM", SEP_STR); + sbuf_printf(sb, "%sUnknown DP", SEP_STR); + break; } - switch (ID_AA64ISAR0_ATOMIC(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_ATOMIC_NONE: + switch (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM4_NONE: break; - case ID_AA64ISAR0_ATOMIC_IMPL: - sbuf_printf(sb, "%sAtomic", SEP_STR); + case ID_AA64ISAR0_SM4_IMPL: + sbuf_printf(sb, "%sSM4", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown Atomic", SEP_STR); + sbuf_printf(sb, "%sUnknown SM4", SEP_STR); + break; } - switch (ID_AA64ISAR0_AES(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_AES_NONE: + switch (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM3_NONE: break; - case ID_AA64ISAR0_AES_BASE: - sbuf_printf(sb, "%sAES", SEP_STR); + case ID_AA64ISAR0_SM3_IMPL: + sbuf_printf(sb, "%sSM3", SEP_STR); break; - case ID_AA64ISAR0_AES_PMULL: - sbuf_printf(sb, "%sAES+PMULL", SEP_STR); - break; default: - sbuf_printf(sb, "%sUnknown AES", SEP_STR); + sbuf_printf(sb, "%sUnknown SM3", SEP_STR); break; } - switch (ID_AA64ISAR0_SHA1(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SHA1_NONE: + switch (ID_AA64ISAR0_SHA3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA3_NONE: break; - case ID_AA64ISAR0_SHA1_BASE: - sbuf_printf(sb, "%sSHA1", SEP_STR); + case ID_AA64ISAR0_SHA3_IMPL: + sbuf_printf(sb, "%sSHA3", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown SHA1", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA3", SEP_STR); break; } - switch (ID_AA64ISAR0_SHA2(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SHA2_NONE: + switch (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_RDM_NONE: break; - case ID_AA64ISAR0_SHA2_BASE: - sbuf_printf(sb, "%sSHA2", SEP_STR); + case ID_AA64ISAR0_RDM_IMPL: + sbuf_printf(sb, "%sRDM", SEP_STR); break; - case ID_AA64ISAR0_SHA2_512: - sbuf_printf(sb, "%sSHA2+SHA512", SEP_STR); - break; default: - sbuf_printf(sb, "%sUnknown SHA2", SEP_STR); + sbuf_printf(sb, "%sUnknown RDM", SEP_STR); + } + + switch (ID_AA64ISAR0_ATOMIC(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_ATOMIC_NONE: break; + case ID_AA64ISAR0_ATOMIC_IMPL: + sbuf_printf(sb, "%sAtomic", SEP_STR); + break; + default: +
svn commit: r345505 - head/sys/netinet
Author: tuexen Date: Mon Mar 25 16:40:54 2019 New Revision: 345505 URL: https://svnweb.freebsd.org/changeset/base/345505 Log: Initialize scheduler specific data for the FCFS scheduler. This is joint work with rrs@. The issue was reported by using syzkaller. MFC after:1 week Modified: head/sys/netinet/sctp_ss_functions.c Modified: head/sys/netinet/sctp_ss_functions.c == --- head/sys/netinet/sctp_ss_functions.cMon Mar 25 15:23:20 2019 (r345504) +++ head/sys/netinet/sctp_ss_functions.cMon Mar 25 16:40:54 2019 (r345505) @@ -838,6 +838,8 @@ sctp_ss_fcfs_init_stream(struct sctp_tcb *stcb, struct stcb->asoc.ss_data.last_out_stream = strq; } } + strq->ss_params.fb.next_spoke.tqe_next = NULL; + strq->ss_params.fb.next_spoke.tqe_prev = NULL; return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345504 - head/sys/netinet
Author: tuexen Date: Mon Mar 25 15:23:20 2019 New Revision: 345504 URL: https://svnweb.freebsd.org/changeset/base/345504 Log: Improve locking when tearing down an SCTP association. This is joint work with rrs@ and the issue was found by syzkaller. MFC after:1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Mon Mar 25 14:50:38 2019(r345503) +++ head/sys/netinet/sctp_pcb.c Mon Mar 25 15:23:20 2019(r345504) @@ -4982,6 +4982,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc * in case. */ /* anything on the wheel needs to be removed */ + SCTP_TCB_SEND_LOCK(stcb); for (i = 0; i < asoc->streamoutcnt; i++) { struct sctp_stream_out *outs; @@ -4990,7 +4991,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc TAILQ_FOREACH_SAFE(sp, >outqueue, next, nsp) { atomic_subtract_int(>stream_queue_cnt, 1); TAILQ_REMOVE(>outqueue, sp, next); - stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 0); + stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 1); sctp_free_spbufspace(stcb, asoc, sp); if (sp->data) { if (so) { @@ -5012,6 +5013,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc sctp_free_a_strmoq(stcb, sp, SCTP_SO_LOCKED); } } + SCTP_TCB_SEND_UNLOCK(stcb); /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH_SAFE(strrst, >resetHead, next_resp, nstrrst) { TAILQ_REMOVE(>resetHead, strrst, next_resp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs
On Mon, 2019-03-25 at 05:42 -0700, Cy Schubert wrote: > In message <201903250746.x2p7kkuu019...@repo.freebsd.org>, Allan > Jude > writes: > > Author: allanjude > > Date: Mon Mar 25 07:46:20 2019 > > New Revision: 345491 > > URL: https://svnweb.freebsd.org/changeset/base/345491 > > > > Log: > > Make TMPFS_PAGES_MINRESERVED a kernel option > > > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for > > the system > > and not used by tmpfs. > > > > On very small memory systems, the default value may be too high > > and this > > prevents these small memory systems from using reroot, which is > > required > > for them to install firmware updates. > > > > Submitted by: Hiroki Mori > > Reviewed by: mizhka > > Differential Revision:https://reviews.freebsd.org/D13583 > > > > Modified: > > head/sys/conf/options > > head/sys/fs/tmpfs/tmpfs.h > > head/sys/fs/tmpfs/tmpfs_vfsops.c > > head/sys/modules/tmpfs/Makefile > > > > Would this be a good candidate for a sysctl or tuneable? > The small-memory embedded systems most affected by this often don't use loader(8) at all, so tunables aren't an option, and sysctl may be too late. No reason it can't be a tunable as well, but it'll probably need to remain as a compile-time option too. -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345499 - head/sys/sys
Author: hselasky Date: Mon Mar 25 13:50:38 2019 New Revision: 345499 URL: https://svnweb.freebsd.org/changeset/base/345499 Log: Change all kernel C-type macros into static inline functions. The current kernel C-type macros might obscurely hide the fact that the input argument might be used multiple times. This breaks code like: isalpha(*ptr++) Use static inline functions instead of macros to fix this. Reviewed by: kib @ Differential Revision:https://reviews.freebsd.org/D19694 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/ctype.h Modified: head/sys/sys/ctype.h == --- head/sys/sys/ctype.hMon Mar 25 12:15:42 2019(r345498) +++ head/sys/sys/ctype.hMon Mar 25 13:50:38 2019(r345499) @@ -41,19 +41,65 @@ #ifdef _KERNEL -#define isspace(c) ((c) == ' ' || ((c) >= '\t' && (c) <= '\r')) -#define isascii(c) (((c) & ~0x7f) == 0) -#define isupper(c) ((c) >= 'A' && (c) <= 'Z') -#define islower(c) ((c) >= 'a' && (c) <= 'z') -#define isalpha(c) (isupper(c) || islower(c)) -#define isdigit(c) ((c) >= '0' && (c) <= '9') -#define isxdigit(c)(isdigit(c) \ - || ((c) >= 'A' && (c) <= 'F') \ - || ((c) >= 'a' && (c) <= 'f')) -#define isprint(c) ((c) >= ' ' && (c) <= '~') +static __inline int +isspace(int c) +{ + return (c == ' ' || (c >= '\t' && c <= '\r')); +} -#define toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z'))) -#define tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z'))) +static __inline int +isascii(int c) +{ + return ((c & ~0x7f) == 0); +} + +static __inline int +isupper(int c) +{ + return (c >= 'A' && c <= 'Z'); +} + +static __inline int +islower(int c) +{ + return (c >= 'a' && c <= 'z'); +} + +static __inline int +isalpha(int c) +{ + return (isupper(c) || islower(c)); +} + +static __inline int +isdigit(int c) +{ + return (c >= '0' && c <= '9'); +} + +static __inline int +isxdigit(int c) +{ + return (isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')); +} + +static __inline int +isprint(int c) +{ + return (c >= ' ' && c <= '~'); +} + +static __inline int +toupper(int c) +{ + return (c - 0x20 * ((c >= 'a') && (c <= 'z'))); +} + +static __inline int +tolower(int c) +{ + return (c + 0x20 * ((c >= 'A') && (c <= 'Z'))); +} #endif #endif /* !_SYS_CTYPE_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs
In message <201903250746.x2p7kkuu019...@repo.freebsd.org>, Allan Jude writes: > Author: allanjude > Date: Mon Mar 25 07:46:20 2019 > New Revision: 345491 > URL: https://svnweb.freebsd.org/changeset/base/345491 > > Log: > Make TMPFS_PAGES_MINRESERVED a kernel option > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for the system > and not used by tmpfs. > > On very small memory systems, the default value may be too high and this > prevents these small memory systems from using reroot, which is required > for them to install firmware updates. > > Submitted by: Hiroki Mori > Reviewed by:mizhka > Differential Revision: https://reviews.freebsd.org/D13583 > > Modified: > head/sys/conf/options > head/sys/fs/tmpfs/tmpfs.h > head/sys/fs/tmpfs/tmpfs_vfsops.c > head/sys/modules/tmpfs/Makefile > Would this be a good candidate for a sysctl or tuneable? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345497 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests
Author: mm Date: Mon Mar 25 11:49:57 2019 New Revision: 345497 URL: https://svnweb.freebsd.org/changeset/base/345497 Log: MFV r345495: Sync libarchive with vendor. Relevant vendor changes: PR #1153: fixed 2 bugs in ZIP reader [1] PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK Changes to file flags code, support more file flags on FreeBSD: UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM UF_ARCHIVE is not supported by intention (yet) PR: 236300 MFC after:2 weeks Added: head/contrib/libarchive/libarchive/test/test_read_format_zip_bz2_hang.zip.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_bz2_hang.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_crash_1.zipx.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_1.zipx.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_crash_2.zipx.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_2.zipx.uu Modified: head/contrib/libarchive/libarchive/archive_blake2sp_ref.c head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c head/contrib/libarchive/libarchive/test/test_entry.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_xar.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_blake2sp_ref.c == --- head/contrib/libarchive/libarchive/archive_blake2sp_ref.c Mon Mar 25 11:48:40 2019(r345496) +++ head/contrib/libarchive/libarchive/archive_blake2sp_ref.c Mon Mar 25 11:49:57 2019(r345497) @@ -89,7 +89,7 @@ int blake2sp_init( blake2sp_state *S, size_t outlen ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) -if( blake2sp_init_leaf( S->S[i], outlen, 0, i ) < 0 ) return -1; +if( blake2sp_init_leaf( S->S[i], outlen, 0, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -112,7 +112,7 @@ int blake2sp_init_key( blake2sp_state *S, size_t outle return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) -if( blake2sp_init_leaf( S->S[i], outlen, keylen, i ) < 0 ) return -1; +if( blake2sp_init_leaf( S->S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -230,7 +230,7 @@ int blake2sp( void *out, size_t outlen, const void *in if( keylen > BLAKE2S_KEYBYTES ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) -if( blake2sp_init_leaf( S[i], outlen, keylen, i ) < 0 ) return -1; +if( blake2sp_init_leaf( S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S[PARALLELISM_DEGREE - 1]->last_node = 1; /* mark last node */ Modified: head/contrib/libarchive/libarchive/archive_entry.c == --- head/contrib/libarchive/libarchive/archive_entry.c Mon Mar 25 11:48:40 2019(r345496) +++ head/contrib/libarchive/libarchive/archive_entry.c Mon Mar 25 11:49:57 2019(r345497) @@ -1632,6 +1632,51 @@ _archive_entry_acl_text_l(struct archive_entry *entry, * SUCH DAMAGE. */ +/* + * Supported file flags on FreeBSD and Mac OS: + * sappnd,sappend SF_APPEND + * arch,archived SF_ARCHIVED + * schg,schange,simmutable SF_IMMUTABLE + * sunlnk,sunlink SF_NOUNLINK (FreeBSD only) + * uappnd,uappend UF_APPEND + * compressed UF_COMPRESSED (Mac OS only) + * hidden,uhidden UF_HIDDEN + * uchg,uchange,uimmutable UF_IMMUTABLE + * nodump UF_NODUMP + * uunlnk,uunlink UF_NOUNLINK (FreeBSD only) + * offline,uofflineUF_OFFLINE (FreeBSD only) + * opaque UF_OPAQUE + * rdonly,urdonly,readonly UF_READONLY (FreeBSD only) + * reparse,ureparseUF_REPARSE (FreeBSD only) + * sparse,usparse UF_SPARSE (FreeBSD only) + * system,usystem UF_SYSTEM (FreeBSD only) + * + * See chflags(2) for more information + * + * Supported file attributes on Linux: + * a append only
svn commit: r345496 - head/lib/libvgl
Author: bde Date: Mon Mar 25 11:48:40 2019 New Revision: 345496 URL: https://svnweb.freebsd.org/changeset/base/345496 Log: Fix another type of buffer overrun for segmented modes. The buffer index was not taken modulo the window size in VGLClear(). Segmented modes also need a kernel fix to almost work. The ioctl to set the window origin is broken. These bugs are rarely problems since non-VESA modes only need segmentation to support multiple pages but libvgl doesn't support multiple pages and treats these modes as non-segmented, and VESA modes are usually mapped linearly except on old hardware so they really are non-segmented. Modified: head/lib/libvgl/simple.c Modified: head/lib/libvgl/simple.c == --- head/lib/libvgl/simple.cMon Mar 25 11:39:49 2019(r345495) +++ head/lib/libvgl/simple.cMon Mar 25 11:48:40 2019(r345496) @@ -535,7 +535,8 @@ VGLClear(VGLBitmap *object, u_long color) VGLSetSegment(offset); len = min(total - offset, VGLAdpInfo.va_window_size); for (i = 0; i < len; i += object->PixelBytes) - bcopy(b, object->Bitmap + offset + i, object->PixelBytes); + bcopy(object->Bitmap + (offset + i) % VGLAdpInfo.va_window_size, b, + object->PixelBytes); offset += len; } break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345494 - head/sys/netinet
Author: tuexen Date: Mon Mar 25 09:47:22 2019 New Revision: 345494 URL: https://svnweb.freebsd.org/changeset/base/345494 Log: Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in https://github.com/sctplab/usrsctp/issues/286 for the userland stack. This is joint work with rrs@. MFC after:1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Mon Mar 25 09:10:07 2019 (r345493) +++ head/sys/netinet/sctp_indata.c Mon Mar 25 09:47:22 2019 (r345494) @@ -947,6 +947,15 @@ sctp_inject_old_unordered_data(struct sctp_tcb *stcb, SCTPDBG(SCTP_DEBUG_XXX, "chunk is a first fsn: %u becomes fsn_included\n", chk->rec.data.fsn); + at = TAILQ_FIRST(>reasm); + if (at && SCTP_TSN_GT(chk->rec.data.fsn, at->rec.data.fsn)) { + /* +* The first chunk in the reassembly is a smaller +* TSN than this one, even though this has a first, +* it must be from a subsequent msg. +*/ + goto place_chunk; + } if (control->first_frag_seen) { /* * In old un-ordered we can reassembly on one ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345493 - head/sys/dev/usb/wlan
Author: avos Date: Mon Mar 25 09:10:07 2019 New Revision: 345493 URL: https://svnweb.freebsd.org/changeset/base/345493 Log: run(4): merge some common TSF-related code into run_disable_tsf() No functional change intended. MFC after:5 days Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c == --- head/sys/dev/usb/wlan/if_run.c Mon Mar 25 07:48:52 2019 (r345492) +++ head/sys/dev/usb/wlan/if_run.c Mon Mar 25 09:10:07 2019 (r345493) @@ -464,6 +464,7 @@ static void run_usb_timeout_cb(void *); static voidrun_reset_livelock(struct run_softc *); static voidrun_enable_tsf_sync(struct run_softc *); static voidrun_enable_tsf(struct run_softc *); +static voidrun_disable_tsf(struct run_softc *); static voidrun_get_tsf(struct run_softc *, uint64_t *); static voidrun_enable_mrr(struct run_softc *); static voidrun_set_txpreamble(struct run_softc *); @@ -2090,7 +2091,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_ struct run_vap *rvp = RUN_VAP(vap); enum ieee80211_state ostate; uint32_t sta[3]; - uint32_t tmp; uint8_t ratectl; uint8_t restart_ratectl = 0; uint8_t bid = 1 << rvp->rvp_id; @@ -2123,12 +2123,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_ sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if (--sc->running == 0) { - run_read(sc, RT2860_BCN_TIME_CFG, ); - run_write(sc, RT2860_BCN_TIME_CFG, - tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN)); - } + if (--sc->running == 0) + run_disable_tsf(sc); break; case IEEE80211_S_RUN: @@ -4863,15 +4859,11 @@ static void run_scan_start(struct ieee80211com *ic) { struct run_softc *sc = ic->ic_softc; - uint32_t tmp; RUN_LOCK(sc); /* abort TSF synchronization */ - run_read(sc, RT2860_BCN_TIME_CFG, ); - run_write(sc, RT2860_BCN_TIME_CFG, - tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN)); + run_disable_tsf(sc); run_set_bssid(sc, ieee80211broadcastaddr); RUN_UNLOCK(sc); @@ -5158,6 +5150,18 @@ run_enable_tsf(struct run_softc *sc) } static void +run_disable_tsf(struct run_softc *sc) +{ + uint32_t tmp; + + if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) { + tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | + RT2860_TBTT_TIMER_EN); + run_write(sc, RT2860_BCN_TIME_CFG, tmp); + } +} + +static void run_get_tsf(struct run_softc *sc, uint64_t *buf) { run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf, @@ -6108,10 +6112,7 @@ run_init_locked(struct run_softc *sc) } /* abort TSF synchronization */ - run_read(sc, RT2860_BCN_TIME_CFG, ); - tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN); - run_write(sc, RT2860_BCN_TIME_CFG, tmp); + run_disable_tsf(sc); /* clear RX WCID search table */ run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs
Author: allanjude Date: Mon Mar 25 07:46:20 2019 New Revision: 345491 URL: https://svnweb.freebsd.org/changeset/base/345491 Log: Make TMPFS_PAGES_MINRESERVED a kernel option TMPFS_PAGES_MINRESERVED controls how much memory is reserved for the system and not used by tmpfs. On very small memory systems, the default value may be too high and this prevents these small memory systems from using reroot, which is required for them to install firmware updates. Submitted by: Hiroki Mori Reviewed by: mizhka Differential Revision:https://reviews.freebsd.org/D13583 Modified: head/sys/conf/options head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/modules/tmpfs/Makefile Modified: head/sys/conf/options == --- head/sys/conf/options Mon Mar 25 01:18:26 2019(r345490) +++ head/sys/conf/options Mon Mar 25 07:46:20 2019(r345491) @@ -640,6 +640,9 @@ NFS_MINDIRATTRTIMO opt_nfs.h NFS_MAXDIRATTRTIMO opt_nfs.h NFS_DEBUG opt_nfs.h +# TMPFS options +TMPFS_PAGES_MINRESERVEDopt_tmpfs.h + # For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver OVERRIDE_CARD opt_bktr.h OVERRIDE_TUNER opt_bktr.h Modified: head/sys/fs/tmpfs/tmpfs.h == --- head/sys/fs/tmpfs/tmpfs.h Mon Mar 25 01:18:26 2019(r345490) +++ head/sys/fs/tmpfs/tmpfs.h Mon Mar 25 07:46:20 2019(r345491) @@ -487,7 +487,9 @@ struct tmpfs_dirent *tmpfs_dir_next(struct tmpfs_node * Amount of memory pages to reserve for the system (e.g., to not use by * tmpfs). */ +#if !defined(TMPFS_PAGES_MINRESERVED) #define TMPFS_PAGES_MINRESERVED(4 * 1024 * 1024 / PAGE_SIZE) +#endif size_t tmpfs_mem_avail(void); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c == --- head/sys/fs/tmpfs/tmpfs_vfsops.cMon Mar 25 01:18:26 2019 (r345490) +++ head/sys/fs/tmpfs/tmpfs_vfsops.cMon Mar 25 07:46:20 2019 (r345491) @@ -42,6 +42,9 @@ * memory-specific data structures and algorithms to automatically * allocate and release resources. */ + +#include "opt_tmpfs.h" + #include __FBSDID("$FreeBSD$"); Modified: head/sys/modules/tmpfs/Makefile == --- head/sys/modules/tmpfs/Makefile Mon Mar 25 01:18:26 2019 (r345490) +++ head/sys/modules/tmpfs/Makefile Mon Mar 25 07:46:20 2019 (r345491) @@ -4,6 +4,6 @@ KMOD= tmpfs SRCS= vnode_if.h \ - tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c + tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c opt_tmpfs.h .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345492 - head/sys/mips/atheros
Author: allanjude Date: Mon Mar 25 07:48:52 2019 New Revision: 345492 URL: https://svnweb.freebsd.org/changeset/base/345492 Log: The Atheros AR7241 has 20 GPIO pins AR724X_GPIO_PINS used for this family is defined as 18 The datasheet for the AR7241 describes 20 pins, allow all to be used. Submitted by: Hiroki Mori Reviewed by: mizhka Differential Revision:https://reviews.freebsd.org/D17580 Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h Modified: head/sys/mips/atheros/ar71xx_gpio.c == --- head/sys/mips/atheros/ar71xx_gpio.c Mon Mar 25 07:46:20 2019 (r345491) +++ head/sys/mips/atheros/ar71xx_gpio.c Mon Mar 25 07:48:52 2019 (r345492) @@ -226,9 +226,11 @@ ar71xx_gpio_pin_max(device_t dev, int *maxpin) *maxpin = AR91XX_GPIO_PINS - 1; break; case AR71XX_SOC_AR7240: - case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7242: *maxpin = AR724X_GPIO_PINS - 1; + break; + case AR71XX_SOC_AR7241: + *maxpin = AR7241_GPIO_PINS - 1; break; case AR71XX_SOC_AR9330: case AR71XX_SOC_AR9331: Modified: head/sys/mips/atheros/ar71xx_gpiovar.h == --- head/sys/mips/atheros/ar71xx_gpiovar.h Mon Mar 25 07:46:20 2019 (r345491) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Mon Mar 25 07:48:52 2019 (r345492) @@ -55,6 +55,7 @@ #defineAR71XX_GPIO_PINS12 #defineAR724X_GPIO_PINS18 +#defineAR7241_GPIO_PINS20 #defineAR91XX_GPIO_PINS22 struct ar71xx_gpio_softc { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"