svn commit: r319595 - head/usr.bin/truss
Author: jhb Date: Mon Jun 5 05:25:50 2017 New Revision: 319595 URL: https://svnweb.freebsd.org/changeset/base/319595 Log: Decode arguments to dup, dup2, getdirentries, pread, and pwrite. - dup and dup2 print fd arguments in decimal. - pread and pwrite are similar to read and write with the addition of the file offset. - getdirentries displays the output entries as a string for now and also prints the value returned in *basep. Eventually the buffer for getdirentries should perhaps be decoded as an array of dirent structures. PR: 214885 Submitted by: Jonathan de Boyne PollardModified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hMon Jun 5 05:17:42 2017 (r319594) +++ head/usr.bin/truss/syscall.hMon Jun 5 05:25:50 2017 (r319595) @@ -48,7 +48,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, - Sockoptname, Msgflags, CapRights, PUInt, + Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Mon Jun 5 05:17:42 2017 (r319594) +++ head/usr.bin/truss/syscalls.c Mon Jun 5 05:25:50 2017 (r319595) @@ -125,6 +125,10 @@ static struct syscall decoded_syscalls[] = { { .name = "connectat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, + { .name = "dup", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "dup2", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Int, 1 } } }, { .name = "eaccess", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, { .name = "execve", .ret_type = 1, .nargs = 3, @@ -165,6 +169,9 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, { .name = "futimesat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, + { .name = "getdirentries", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, + { PQuadHex | OUT, 3 } } }, { .name = "getfsstat", .ret_type = 1, .nargs = 3, .args = { { Ptr, 0 }, { Long, 1 }, { Getfsstatmode, 2 } } }, { .name = "getitimer", .ret_type = 1, .nargs = 2, @@ -275,8 +282,14 @@ static struct syscall decoded_syscalls[] = { { Fadvice, 3 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, + { .name = "pread", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 }, + { QuadHex, 3 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, .args = { { Idtype, 0 }, { Quad, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, + { .name = "pwrite", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 }, + { QuadHex, 3 } } }, { .name = "read", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlink", .ret_type = 1, .nargs = 3, @@ -1354,6 +1367,16 @@ print_arg(struct syscall_args *sc, unsigned long *args break; } #endif + case PQuadHex: { + uint64_t val; + + if (get_struct(pid, (void *)args[sc->offset], , + sizeof(val)) == 0) + fprintf(fp, "{ 0x%jx }", (uintmax_t)val); + else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } case Ptr: fprintf(fp, "0x%lx", args[sc->offset]); 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"
Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390
On 6/1/17 5:51 PM, Bryan Drewery wrote: > On 6/1/2017 5:18 PM, Bryan Drewery wrote: >> On 5/23/2017 12:00 PM, O. Hartmann wrote: >>> Am Tue, 23 May 2017 12:52:35 -0500 >>> Pedro Giffunischrieb: >>> On 23/05/2017 12:12, O. Hartmann wrote: > Am Tue, 23 May 2017 16:38:10 + (UTC) > "Pedro F. Giffuni" schrieb: > >> Author: pfg >> Date: Tue May 23 16:38:10 2017 >> New Revision: 318750 >> URL: https://svnweb.freebsd.org/changeset/base/318750 >> >> Log: >>Bring some rough support for FreeBSD S/390 to the GNU toolchain. >> >>This is no-op and only for reference: the S/390 port seems to be >> elusive >>in the BSDs so it is convenient to keep some trace from past efforts. >>It is likely newer attempts will focus on a newer toolchain using >> clang >>instead. >> >>Obtained from:Perforce depot/projects/s390 >> >> Added: >>head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (contents, >> props changed) >>head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents, >> props changed) >>head/contrib/gcc/config/s390/freebsd.h >> - copied, changed from r318546, >> head/contrib/gcc/config/s390/linux.h >> Modified: >>head/contrib/binutils/bfd/config.bfd >>head/contrib/binutils/ld/configure.tgt >>head/contrib/gcc/config.gcc ... >> Buildworld fails on r318751 with a "Segmentation fault" error as shown >> below: >> >> Building /usr/obj/usr/src/lib/libkiconv/_libinstall >> --- lib/libmd__L --- >> --- skein_block_asm.o --- >> Segmentation fault >> *** [skein_block_asm.o] Error code 139 >> >> make[4]: stopped in /usr/src/lib/libmd >> .ERROR_TARGET='skein_block_asm.o' >> .ERROR_META_FILE='/usr/obj/usr/src/lib/libmd/skein_block_asm.o.meta' >> .MAKE.LEVEL='4' >> MAKEFILE='' >> >> >> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: Tue >> May 23 >> 18:52:59 CEST 2017 amd64 It shouldn't be related to this change: 1) This only affects s390 configuration which is never activated 2) I did run a tinderbox build to make sure nothing was affected (the only thing failing was an unrelated powerpc warning that was fixed). Pedro. >>> >>> Hello, >>> >>> the problem could be resolved by deleting the /usr/obj folder and start a >>> clean build >>> again. >>> >> >> I think this is fallout from ino64 combined with META_MODE. META_MODE >> assumes that host tools will be ABI-compatible and generally does not >> [force] rebuild them very often. So the act of upgrading to ino64 host >> and then doing another build, your ld and various other host tools will >> still be running pre-ino64 binaries via COMPAT_FREEBSD11. I think the >> bug in this system is that it is possible for some of these tools to get >> mixed-ABI objects linked together resulting in differing ideas of what >> 'struct stat' is for example. This could be possible since META_MODE >> won't force rebuild all objects for a directory/tool but it may rebuild >> 1 object for some reason or just relink the resulting binary. >> >> Here's an example of what I'm talking about with the host ld object files: >> >>> -rwxr-xr-x 1 root wheel 1857312 Jun 1 12:59 ld.bfd* >>> -rwxr-xr-x 1 root wheel 931304 Jun 1 12:59 ld.bfd.debug* >>> -rw-r--r-- 1 root wheel 978 Jun 1 12:59 ld.bfd.debug.meta >>> -rwxr-xr-x 1 root wheel 2600311 Jun 1 12:59 ld.bfd.full* >>> -rw-r--r-- 1 root wheel 3988 Jun 1 12:59 ld.bfd.full.meta >>> -rw-r--r-- 1 root wheel 999 Jun 1 12:59 ld.bfd.meta >>> -rw-r--r-- 1 root wheel 154400 Apr 18 16:12 ldcref.o >>> -rw-r--r-- 1 root wheel 4553 Apr 18 16:12 ldcref.o.meta >>> -rw-r--r-- 1 root wheel 137088 May 11 14:14 ldctor.o >>> -rw-r--r-- 1 root wheel 4348 May 11 14:14 ldctor.o.meta >>> -rw-r--r-- 1 root wheel 205 Oct 11 2016 ldemul-list.h >>> -rw-r--r-- 1 root wheel 814 Oct 11 2016 ldemul-list.h.meta >>> -rw-r--r-- 1 root wheel 144088 Oct 13 2016 ldemul.o >>> -rw-r--r-- 1 root wheel 4374 Oct 13 2016 ldemul.o.meta >> >> The object files predate ino64 but the linked binaries do not. I did >> not dig into these object files more but I suspect somewhere there are >> mixed-ABI object files hitting this bug or that just linking pre-ino64 >> objects may cause a problem. I don't think linking would be a problem >> though. > > This commit did cause a mixed-ABI object issue that I predicted. > > Built before, updated, built again and targets.o is rebuilt. > >> Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targmatch.h >> Skipping meta for .depend: no commands >> Skipping
svn commit: r319592 - head/share/mk
Author: bdrewery Date: Mon Jun 5 05:17:36 2017 New Revision: 319592 URL: https://svnweb.freebsd.org/changeset/base/319592 Log: META_MODE: Allow not ignoring host headers with NO_META_IGNORE_HOST_HEADERS. See r301467 for more details on NO_META_IGNORE_HOST. Usually the full list of host ignores should have no real impact on the host tools. The headers however may reliably define what the ABI is for the host. It may be useful to allow using the headers for the build but still not caring about things like /bin/sh, /lib/libedit.so, etc. Sponsored by: Dell EMC Isilon Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkSun Jun 4 21:58:02 2017(r319591) +++ head/share/mk/sys.mkMon Jun 5 05:17:36 2017(r319592) @@ -70,7 +70,8 @@ META_MODE+= missing-filemon=yes META_MODE?= normal .export META_MODE .MAKE.MODE?= ${META_MODE} -.if !empty(.MAKE.MODE:Mmeta) && !defined(NO_META_IGNORE_HOST) +.if !empty(.MAKE.MODE:Mmeta) +.if !defined(NO_META_IGNORE_HOST) # Ignore host file changes that will otherwise cause # buildworld -> installworld -> buildworld to rebuild everything. # Since the build is self-reliant and bootstraps everything it needs, @@ -85,17 +86,20 @@ META_MODE?= normal /rescue \ /sbin \ /usr/bin \ - /usr/include \ /usr/lib \ /usr/sbin \ /usr/share \ +.else +NO_META_IGNORE_HOST_HEADERS= 1 .endif -.if !empty(.MAKE.MODE:Mmeta) +.if !defined(NO_META_IGNORE_HOST_HEADERS) +.MAKE.META.IGNORE_PATHS+= /usr/include +.endif # We do not want everything out-of-date just because # some unrelated shared lib updated this. .MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d -.endif +.endif # !empty(.MAKE.MODE:Mmeta) .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed ___ 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: r319594 - head
Author: bdrewery Date: Mon Jun 5 05:17:42 2017 New Revision: 319594 URL: https://svnweb.freebsd.org/changeset/base/319594 Log: META_MODE: Force a host tool rebuild for ino64 in r318736. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Jun 5 05:17:39 2017(r319593) +++ head/Makefile.inc1 Mon Jun 5 05:17:42 2017(r319594) @@ -649,6 +649,8 @@ LIBCOMPAT= SOFT # to get updated host tools. .if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \ !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) +# r318736 - ino64 major ABI breakage +META_MODE_BAD_ABI_VERS+= 1200031 .if !defined(OBJDIR_HOST_OSRELDATE) .if exists(${OBJTREE}${.CURDIR}/host-osreldate.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"
svn commit: r319593 - in head: . share/mk
Author: bdrewery Date: Mon Jun 5 05:17:39 2017 New Revision: 319593 URL: https://svnweb.freebsd.org/changeset/base/319593 Log: META_MODE: Add framework to force rebuilding for major ABI changes. Normally META_MODE ignores host files for "meta mode" decisions on whether a file should be rebuilt or not. This is because a simple installworld can update timestamps and cause the next build to rebuild all host tools, when the previous ones may not have any changes in the source tree. These tools are normally still ABI compatible. They are only rebuilt if NO_META_IGNORE_HOST is set from the workaround/hack in r301467. One of the major problems with this is when a host tool has objects spread across many revisions that have mixed-ABI. For example, if struct stat were to change on the host, some objects for a tool may have different ideas of that struct's definition. If just 1 source file were modified and rebuilt and linked into the tool, then that toll will have mixed-ABI objects and crash. This exact thing happened with the ino64 commit in r301467 followed by a trivial update to libbfd in r318750. The resulting binary would crash in buildworld. Sponsored by: Dell EMC Isilon Modified: head/Makefile head/Makefile.inc1 head/share/mk/sys.mk Modified: head/Makefile == --- head/Makefile Mon Jun 5 05:17:36 2017(r319592) +++ head/Makefile Mon Jun 5 05:17:39 2017(r319593) @@ -127,7 +127,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel bu installworld kernel-toolchain libraries lint maninstall \ obj objlink rerelease showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ - _build-tools _compiler-metadata _cross-tools _includes _libraries \ + _build-tools _build-metadata _cross-tools _includes _libraries \ build32 distribute32 install32 buildsoft distributesoft installsoft \ builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Jun 5 05:17:36 2017(r319592) +++ head/Makefile.inc1 Mon Jun 5 05:17:39 2017(r319593) @@ -643,6 +643,49 @@ LIBCOMPAT= SOFT .include "Makefile.libcompat" .endif +# META_MODE normally ignores host file changes since every build updates +# timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times +# when the ABI breaks though that we want to force rebuilding WORLDTMP +# to get updated host tools. +.if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \ +!defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) + +.if !defined(OBJDIR_HOST_OSRELDATE) +.if exists(${OBJTREE}${.CURDIR}/host-osreldate.h) +OBJDIR_HOST_OSRELDATE!=\ +awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ +${OBJTREE}${.CURDIR}/host-osreldate.h +.else +OBJDIR_HOST_OSRELDATE= 0 +.endif +.export OBJDIR_HOST_OSRELDATE +.endif + +# Note that this logic is the opposite of normal BOOTSTRAP handling. We want +# to compare the WORLDTMP's OSRELDATE to the host's OSRELDATE. If the WORLDTMP +# is older than the ABI-breakage OSRELDATE of the HOST then we rebuild. +.for _ver in ${META_MODE_BAD_ABI_VERS} +.if ${OSRELDATE} >= ${_ver} && ${OBJDIR_HOST_OSRELDATE} < ${_ver} +_meta_mode_need_rebuild= ${_ver} +.endif +.endfor +.if defined(_meta_mode_need_rebuild) +.info META_MODE: Rebuilding host tools due to ABI breakage in __FreeBSD_version ${_meta_mode_need_rebuild}. +NO_META_IGNORE_HOST_HEADERS= 1 +.export NO_META_IGNORE_HOST_HEADERS +.endif +.endif +# This is only used for META_MODE+filemon to track what the oldest +# __FreeBSD_version is in WORLDTMP. This purposely does NOT have +# a make dependency on /usr/include/osreldate.h as the file should +# only be copied when it is missing or meta mode determines it has changed. +# Since host files are normally ignored without NO_META_IGNORE_HOST +# the file will never be updated unless that flag is specified. This +# allows tracking the oldest osreldate to force rebuilds via +# META_MODE_BADABI_REVS above. +host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here + @cp -f /usr/include/osreldate.h ${.TARGET} + WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} IMAKEENV= ${CROSSENV} @@ -820,12 +863,13 @@ _cross-tools: @rm -f ${.OBJDIR}/compiler-metadata.mk ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools -_compiler-metadata: +_build-metadata: @echo @echo "--" - @echo ">>> stage 3.1: recording compiler metadata" + @echo ">>> stage 3.1: recording build metadata"
Re: svn commit: r318441 - in head/etc: . cron.d
On Saturday, June 03, 2017 01:49:34 PM Ngie Cooper wrote: > > > On Jun 3, 2017, at 12:05, John Baldwinwrote: > > … > > > Ping? bapt@ agreed with this, but I haven't seen any other feedback? If > > others > > agree then we should either revert back to a single foo.conf or we should > > fully > > split newsyslog.conf and syslogd.conf out to individual files. > > Please, no. The single monolithic foo.conf idea may have made sense back in > the day, but with the various knobs that are available for building the > system, for ease-of-use/intuitiveness the feature makes sense. > I planned on introducing more of these files for other areas of the system > that aren’t currently being handled— like bsnmpd’s logging, etc. I think the > modularization makes sense. To be clear, I listed two options, and you have only implemented a third (which is to mix the two styles). I think mixing the two styles is the absolute worst thing to do. If we are going to split a given foo.conf up we should split it up fully so that the out-of-box configuration for a given daemon is consistent. -- John Baldwin ___ 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: r319507 - head/sys/fs/msdosfs
On 6/4/17 4:27 PM, Ed Maste wrote: > On 4 June 2017 at 14:06, Bryan Drewerywrote: >> >> In r189170. It seems to me we should change systm.h back to a macro >> #define memmove(dst, src, len) bcopy((src), (dst), (len)) > > Note that they're not quite equivalent: memmove returns dst, while > bcopy has no return value. > #define memmove(dst, src, len) (bcopy((src), (dst), (len)), dst) Obscure comma operator, or we just add an inline memmove in systm.h too. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r319507 - head/sys/fs/msdosfs
On 4 June 2017 at 14:06, Bryan Drewerywrote: > > In r189170. It seems to me we should change systm.h back to a macro > #define memmove(dst, src, len) bcopy((src), (dst), (len)) Note that they're not quite equivalent: memmove returns dst, while bcopy has no return value. ___ 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: r319591 - head/bin/sh
Author: jilles Date: Sun Jun 4 21:58:02 2017 New Revision: 319591 URL: https://svnweb.freebsd.org/changeset/base/319591 Log: sh: Make sure to process SIGINT if SETINTON re-enables processing. If INTON re-enables interrupts, it processes any interrupt that occurred while interrupts were disabled. Make SETINTON do the same. Modified: head/bin/sh/error.h Modified: head/bin/sh/error.h == --- head/bin/sh/error.h Sun Jun 4 21:39:37 2017(r319590) +++ head/bin/sh/error.h Sun Jun 4 21:58:02 2017(r319591) @@ -73,7 +73,7 @@ extern volatile sig_atomic_t intpending; #define INTOFF suppressint++ #define INTON { if (--suppressint == 0 && intpending) onint(); } #define is_int_on() suppressint -#define SETINTON(s) suppressint = (s) +#define SETINTON(s) do { suppressint = (s); if (suppressint == 0 && intpending) onint(); } while (0) #define FORCEINTON {suppressint = 0; if (intpending) onint();} #define SET_PENDING_INT intpending = 1 #define CLEAR_PENDING_INT intpending = 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: r319590 - head/tests/sys/aio
Author: jilles Date: Sun Jun 4 21:39:37 2017 New Revision: 319590 URL: https://svnweb.freebsd.org/changeset/base/319590 Log: tests/sys/aio: Add missing mode to open() calls with O_CREAT. Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c == --- head/tests/sys/aio/aio_test.c Sun Jun 4 21:28:52 2017 (r319589) +++ head/tests/sys/aio/aio_test.c Sun Jun 4 21:39:37 2017 (r319590) @@ -385,7 +385,7 @@ aio_file_test(completion comp) ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_UNSAFE_AIO(); - fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); arg.afa_fd = fd; @@ -834,7 +834,7 @@ ATF_TC_BODY(aio_large_read_test, tc) len = INT_MAX; #endif - fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); unlink(FILE_PATHNAME); @@ -1088,7 +1088,7 @@ ATF_TC_BODY(aio_fsync_test, tc) ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_UNSAFE_AIO(); - fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); unlink(FILE_PATHNAME); ___ 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: r319589 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:28:52 2017 New Revision: 319589 URL: https://svnweb.freebsd.org/changeset/base/319589 Log: [iwm] Remove support for fw older than -17 and -22 * iwm(4) didn't use any of these definitions yet, anyway. Obtained from:dragonflybsd.git f95003b8f1f7382c8396a6d408e3072632afdd3d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:28:03 2017(r319588) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:28:52 2017(r319589) @@ -3451,8 +3451,7 @@ iwm_update_sched(struct iwm_softc *sc, int qid, int id scd_bc_tbl = sc->sched_dma.vaddr; len += 8; /* magic numbers came naturally from paris */ - if (sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_DW_BC_TABLE) - len = roundup(len, 4) / 4; + len = roundup(len, 4) / 4; w_val = htole16(sta_id << 12 | len); Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:28:03 2017 (r319588) +++ head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:28:52 2017 (r319589) @@ -594,8 +594,6 @@ enum iwm_dtd_diode_reg { * @IWM_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behaviour on hidden SSID, * treats good CRC threshold as a boolean * @IWM_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w). - * @IWM_UCODE_TLV_FLAGS_P2P: This uCode image supports P2P. - * @IWM_UCODE_TLV_FLAGS_DW_BC_TABLE: The SCD byte count table is in DWORDS * @IWM_UCODE_TLV_FLAGS_UAPSD: This uCode image supports uAPSD * @IWM_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan * offload profile config command. @@ -605,35 +603,24 @@ enum iwm_dtd_diode_reg { * from the probe request template. * @IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL: new NS offload (small version) * @IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version) - * @IWM_UCODE_TLV_FLAGS_P2P_PS: P2P client power save is supported (only on a - * single bound interface). * @IWM_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD * @IWM_UCODE_TLV_FLAGS_EBS_SUPPORT: this uCode image supports EBS. * @IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save * @IWM_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering. - * @IWM_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients - * */ enum iwm_ucode_tlv_flag { IWM_UCODE_TLV_FLAGS_PAN = (1 << 0), IWM_UCODE_TLV_FLAGS_NEWSCAN = (1 << 1), IWM_UCODE_TLV_FLAGS_MFP = (1 << 2), - IWM_UCODE_TLV_FLAGS_P2P = (1 << 3), - IWM_UCODE_TLV_FLAGS_DW_BC_TABLE = (1 << 4), IWM_UCODE_TLV_FLAGS_SHORT_BL= (1 << 7), IWM_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = (1 << 10), IWM_UCODE_TLV_FLAGS_NO_BASIC_SSID = (1 << 12), IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL= (1 << 15), IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE= (1 << 16), - IWM_UCODE_TLV_FLAGS_P2P_PS = (1 << 21), - IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM = (1 << 22), - IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM = (1 << 23), IWM_UCODE_TLV_FLAGS_UAPSD_SUPPORT = (1 << 24), IWM_UCODE_TLV_FLAGS_EBS_SUPPORT = (1 << 25), IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD= (1 << 26), IWM_UCODE_TLV_FLAGS_BCAST_FILTERING = (1 << 29), - IWM_UCODE_TLV_FLAGS_GO_UAPSD= (1 << 30), - IWM_UCODE_TLV_FLAGS_LTE_COEX= (1 << 31), }; #define IWM_UCODE_TLV_FLAG_BITS \ @@ -647,22 +634,14 @@ P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_PS_UAPSD\36BCAS * @IWM_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time * longer than the passive one, which is essential for fragmented scan. * @IWM_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. - * @IWM_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header * @IWM_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params - * @IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority - * instead of 3. - * @IWM_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size - * (command version 3) that supports per-chain limits * * @IWM_NUM_UCODE_TLV_API: number of bits used */ enum iwm_ucode_tlv_api { IWM_UCODE_TLV_API_FRAGMENTED_SCAN = 8, IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = 9, - IWM_UCODE_TLV_API_WIDE_CMD_HDR = 14, IWM_UCODE_TLV_API_LQ_SS_PARAMS = 18, - IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = 24, - IWM_UCODE_TLV_API_TX_POWER_CHAIN= 27, IWM_NUM_UCODE_TLV_API = 32 }; @@ -4144,7 +4123,6 @@ struct
svn commit: r319588 - in head/sys/modules/iwmfw: iwm7265Dfw iwm8000Cfw
Author: adrian Date: Sun Jun 4 21:28:03 2017 New Revision: 319588 URL: https://svnweb.freebsd.org/changeset/base/319588 Log: [iwmfw] bump built firmware now to version 22 for 7265D and 8000C. Modified: head/sys/modules/iwmfw/iwm7265Dfw/Makefile head/sys/modules/iwmfw/iwm8000Cfw/Makefile Modified: head/sys/modules/iwmfw/iwm7265Dfw/Makefile == --- head/sys/modules/iwmfw/iwm7265Dfw/Makefile Sun Jun 4 21:27:50 2017 (r319587) +++ head/sys/modules/iwmfw/iwm7265Dfw/Makefile Sun Jun 4 21:28:03 2017 (r319588) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm7265Dfw -IMG= iwm-7265D-17 +IMG= iwm-7265D-22 .include Modified: head/sys/modules/iwmfw/iwm8000Cfw/Makefile == --- head/sys/modules/iwmfw/iwm8000Cfw/Makefile Sun Jun 4 21:27:50 2017 (r319587) +++ head/sys/modules/iwmfw/iwm8000Cfw/Makefile Sun Jun 4 21:28:03 2017 (r319588) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm8000Cfw -IMG= iwm-8000C-16 +IMG= iwm-8000C-22 .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: r319586 - head/sys/contrib/dev/iwm
Author: adrian Date: Sun Jun 4 21:27:39 2017 New Revision: 319586 URL: https://svnweb.freebsd.org/changeset/base/319586 Log: [iwmfw] 8000C ver 22 firmware. Added: head/sys/contrib/dev/iwm/iwm-8000C-22.fw.uu (contents, props changed) Added: head/sys/contrib/dev/iwm/iwm-8000C-22.fw.uu == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-8000C-22.fw.uu Sun Jun 4 21:27:39 2017 (r319586) @@ -0,0 +1,47134 @@ +begin 644 iwm-8000C-22.fw +M`$E73`IS=')E86TZ0V]R94-Y8VQE,3E?"`$"'@@" +MCWX#`!P0`!L$`@```"`$ +M`*`!`#,,@```@`$`,PP!``"(``"` +M```S#`(``$```(`&`!,```"\`@```$!```8```"A```! +M``"&@P<6(+[/`0!`0`$$A`4` +M +MU7?1O$KMC 1P! +M%L)AM`1@'DT[FA#1OWMZR()DJ-L;GQEBIN9H[A^ZS%KH6MG.(:=CV\&$V<0:'I[5@L7 +M;]O#+S6])Q;OTUZ`@Q9O#\ZQZUROU1XL3>@GIX0A'ZLQS3.]EM]`#)-:.@LH +M#44.K^C\7[\`!P3DY4F9W;8[]70ZRI8T>H?6RDCG3OM8]KY^9H/)$3]O$5[ -'Q@DA?.@%-O*2PZO`YB\^`DJ%ID^ +MU;IA,PR_`>K^.AN312;7/A1B]+LQ(V3P\*UQ5Z=;M)')C]J\?K/@J:98N +MJQOM?UA7<.[NM3[WW_V:XN&4IC\K8WM>$7?2$@*@8=[LZ\%::.OKRW[IDOCD +MA+=T'/X2ZUEGV6^`(6"B0,R)YR**TD[=T/MKV(*^_OZ\&[4V>#XE=`DE +M._=^`P<(@`$```"```"``0`'"``%``4`!P```$B\ +M@$0`0+P``!,$@`$```"6!(0%```!:-J` +M`#PH@`!``8$`Q/B``)P4@`"`<($` +M;"#`$`\;"2+<'<`0"@`;0"``,``!A@``;;D```&$``1MN4P``80`" +M``!A``0;;GX``&$0`!MN`0``88```&%[``!A```;)"``'<`12`GA&!\` +M"&(``!LE`0`;)```!24!``4D``@%.0$`!6*((,`1`@`%)``(!3D!``5BC"#` +M$00`!20`"`4Y`0`%8I`@P!$(``4D``@%.0$`!6*4(,`1$``%)``(!3D!``5B +MF"#`$2``!20`"`4Y`0`%8IP@P!%```4D``@%.0$`!6*@(,`1```()0``""1( +M">$91`GA&10)P!(!`!MP"@``80\<'2($`!TF)`G`$@$;(R+H'<`0`0`C<`$` +M`&$1`!LP`0`;,.@=P!#P!A```;)(``'<`1"`!?<`D``&'0",`2``D; +M*,P(@($``,`7U`C`$@`)("("!``#`%ZP/`&',",`2X`B`@0``P!?(",`2 +MW`B`@0``P!>E#P!A```;)``!'<`1"`!?<*`/`&$```4EX@0%)-0(P!(` +M"1LH``4;*=P(@($``,`7T`C`$@`)@`!1LIX`B`@0``P!>3#P!A```;)``" +M'<`1"`!?<`P``&'L'\`0__\;,^P?P!'.[@TE@ID-)`\--R)L(,`0#QLW +M(O__#24._PTD#PTW(H(/`&'L'\`0```;,>P?P!'.[@TE@ID-)`\--R)L(,`0 +M#QLW(O__#26._PTD#PTW(G8/`&$```!A```;)2``<',`18=P=P!`` +M`!TD(0$`6#'.[@TE`8$-)`\--R(/1# +MP!`*`!-``@`3;@0``&$!``@D```()40)X1D!``!A`(!8,`@`9#$```!A"`!8 +M;N,/`&$``!,E```3)"00P!$`@!,D```3)3@!,B``#&$0,``20```$E#T4`(@!<`#GO_P`R%P``9`"`$R0! +M`!,E.!S`$0]W$R+@',`1`@`!8@\!$R($",`1?`S`$LA)QQ&0"\`2`0`!;@,` +M$S`,`,T1"`!8,0\4%2($`!4F`P`3)```$R4$",`1```3)#A%P!$%``!A``!8 +M.`0`6#$``!,D`0`3)3@ @=P!#F_Q,R__\3,^@=P!$```$D +M"``!)0\!8R(!`%(D"``';@(``&$``!4D#P``80X``&'H'<`0^^K=[OOJW>[[ZMWN^^ +MK=[OOJW>[[ZMWN^^K=[OOJW>[[ZMWN^^K=[OOJW>[[ZMWN^^K=X` +M +M +M`-`'``$!`0$!`0$!O1\``&,N``#_ +M```( +M```!`0`` +M +M +M +M +M +M +M +M +M +M +M +M```S,``` +M$1HH +M +M
svn commit: r319584 - head/sys/contrib/dev/iwm
Author: adrian Date: Sun Jun 4 21:26:31 2017 New Revision: 319584 URL: https://svnweb.freebsd.org/changeset/base/319584 Log: [iwmfw] add 7265D-22 firmware Added: head/sys/contrib/dev/iwm/iwm-7265D-22.fw.uu (contents, props changed) Added: head/sys/contrib/dev/iwm/iwm-7265D-22.fw.uu == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7265D-22.fw.uu Sun Jun 4 21:26:31 2017 (r319584) @@ -0,0 +1,22855 @@ +begin 644 iwm-7265D-22.fw +M`$E73`IS=')E86TZ0V]R94-Y8VQE,3E?"`(```"*8@$`'!`` +M0!,PP```"3 +M!(`!@```%@2$!0```0```'C#@`#4-(``]/N``(CL +M@`#T'8``@.Z``@P!`/!W` +M$`H``@`!MN"@``88``\``!A``$;;CT``&$``AMN/@``81``!``!A +M7```85<``&$``!LD(``;)>0=P!&(!^$8'P`(8@``!`!LD```%)0$`!20` +M"`4Y`0`%8H@@P!$"``4D``@%.0$`!6*,(,`1!``%)``(!3D!``5BD"#`$0@` +M!20`"`4Y`0`%8I0@P!$0``4D``@%.0$`!6*8(,`1(``%)``(!3D!``5BG"#` +M$4``!20`"`4Y`0`%8J`@P!$```@E```()(@'X1F$!^$90`?`$@$``(``!A +M#QP=(@0`'2;H'<`0`0`;,.@=P!&"!!LD"``;)00HP!&^#P!A```;)(`` +M'<`1```;)``!'<`1```;)``"'<`1"`!?<`P``&'8'<`0__X;,M@= +MP!'.[@TE@ID-)`\--R)L(,`0#QLW(O__#24._PTD#PTW(J__`#(<``!D`(`3)`$`$R4X',`1#W<3 +M(N`Q,B`0`3,`0HP!$/%!4B`@`5)@]- +M$R($$,41`@`3)/` ^^K=[OOJW>[[ZMW@``"``` +M```! +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M``!$`(`D*"PP-``` +M`#@\0&0```!H;'!T>'P```"` +MA(@```",D)4```"9G0```*$```"9G0```*$```"E +M*@```#H```!J>@```(H```";GP($!@0` +M```,$P```!LC*P```"T!``0% +M_P#_``$!`P`!!00``@(#```#_P``_@8!`/\!`0``_P$!`?\!`@+_ +M`0`$!0$!!?\!`0,'`@#_`@(``/\"`0'_`@("_P("!?\"`@,'```$`.0&`0`. +M`#`-!0`D`M@'!@!0`/P)!P"H`60*"`"X``P,"0!8`,0,"@!X`.@&"P!X`&`' +M#P`4`!P-$0`8`$P*$@"D`0``$P`,`$`-%``$`$P-%0`$`%`- +M'@```!Z('HA: +M5@```%:(5H@"`0``J@```*J(JHC^`0``C`H``%2,5(RD'P`` +M`/X```$`_P`"`?\!`/\!`0#^`@$#`O\!`0#_`0$!_P(`_P,"`/X$`@,"_P(" +M`/\"`@'_`P#_!0,`_@8#``/_`P,`_P,#`?\```"`-0``"@`` +M``0```"(Q8``X#4```4$B,6` +M```!I'4$`+!W!``0=P0`@'<$`$AR!`!` +M<@0`B!8$`)04!`#D%`0`O)4!"_\```0"```&_P``
svn commit: r319583 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Sun Jun 4 21:21:44 2017 New Revision: 319583 URL: https://svnweb.freebsd.org/changeset/base/319583 Log: [ath_hal] add USB reset PLL work around for AR9331/AR9344 (Hornet/Wasp.) It turns out that this is useful on hornet and wasp SoCs but it isn't enabled in ye olde HAL /unless/ you were using a version from one of the business units building USB targetted devices. It eventually got fixed for all of them as people started wanting to use the USB ports on their SoCs (eg for flash storage, bluetooth, 4G/LTE widgets, etc.) This is actually a fix from ath9k but I'm merging it with the available-but- disabled code in the QCA reference HAL. Tested: * AR9331 SoC Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Jun 4 21:14:23 2017(r319582) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Jun 4 21:21:44 2017(r319583) @@ -90,6 +90,29 @@ do { \ #define WAR_USB_DISABLE_PLL_LOCK_DETECT(__ah) #endif +/* + * Note: the below is the version that ships with ath9k. + * The original HAL version is above. + */ + +static void +ar9300_disable_pll_lock_detect(struct ath_hal *ah) +{ + /* +* On AR9330 and AR9340 devices, some PHY registers must be +* tuned to gain better stability/performance. These registers +* might be changed while doing wlan reset so the registers must +* be reprogrammed after each reset. +*/ + if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah)) { + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: called\n", __func__); + OS_REG_CLR_BIT(ah, AR_PHY_USB_CTRL1, (1 << 20)); + OS_REG_RMW(ah, AR_PHY_USB_CTRL2, + (1 << 21) | (0xf << 22), + (1 << 21) | (0x3 << 22)); + } +} + static inline void ar9300_attach_hw_platform(struct ath_hal *ah) { @@ -1850,6 +1873,7 @@ ar9300_set_reset(struct ath_hal *ah, int type) /* Clear AHB reset */ OS_REG_WRITE(ah, AR_HOSTIF_REG(ah, AR_RC), 0); +ar9300_disable_pll_lock_detect(ah); ar9300_attach_hw_platform(ah); @@ -1984,6 +2008,7 @@ ar9300_phy_disable(struct ath_hal *ah) ar9300_init_pll(ah, AH_NULL); +ar9300_disable_pll_lock_detect(ah); return AH_TRUE; } @@ -4774,7 +4799,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, st * successfully - skip the rest of reset */ if (AH9300(ah)->ah_dma_stuck != AH_TRUE) { -WAR_USB_DISABLE_PLL_LOCK_DETECT(ah); +ar9300_disable_pll_lock_detect(ah); #if ATH_SUPPORT_MCI if (AH_PRIVATE(ah)->ah_caps.halMciSupport && ahp->ah_mci_ready) { @@ -5350,7 +5375,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, st #undef REG_WRITE #endif /* ATH_LOW_POWER_ENABLE */ -WAR_USB_DISABLE_PLL_LOCK_DETECT(ah); +ar9300_disable_pll_lock_detect(ah); /* H/W Green TX */ ar9300_control_signals_for_green_tx_mode(ah); ___ 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: r319582 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:14:23 2017 New Revision: 319582 URL: https://svnweb.freebsd.org/changeset/base/319582 Log: [iwm] Ignore IWM_DEBUG_LOG_MSG notifications. * Firmware versions 21 and 22 generate some IWM_DEBUG_LOG_MSG notifications, which seem to be harmless. Avoid spamming the system log with "frame ... UNHANDLED (this should not happen)" messages. Obtained from:dragonflybsd.git dda889ac57d8e5b46bb1b1ecf53c17a18481c7c8 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:13:13 2017(r319581) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:14:23 2017(r319582) @@ -5190,7 +5190,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) "rx packet qid=%d idx=%d type=%x\n", qid & ~0x80, pkt->hdr.idx, code); - len = le32toh(pkt->len_n_flags) & IWM_FH_RSCSR_FRAME_SIZE_MSK; + len = iwm_rx_packet_len(pkt); len += sizeof(uint32_t); /* account for status word */ nextoff = offset + roundup2(len, IWM_FH_RSCSR_FRAME_ALIGN); @@ -5428,6 +5428,13 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) notif->status, notif->action); break; } + + /* +* Firmware versions 21 and 22 generate some DEBUG_LOG_MSG +* messages. Just ignore them for now. +*/ + case IWM_DEBUG_LOG_MSG: + break; case IWM_MCAST_FILTER_CMD: 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: r319581 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:13:13 2017 New Revision: 319581 URL: https://svnweb.freebsd.org/changeset/base/319581 Log: [iwm] Set command code for PHY_DB as well. Obtained from:dragonflybsd.git 58318c956a74382d1286ccabaf767012fdcfe1a2 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:12:11 2017(r319580) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:13:13 2017(r319581) @@ -5370,7 +5370,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) break; /* ignore */ - case 0x6c: /* IWM_PHY_DB_CMD, no idea why it's not in fw-api.h */ + case IWM_PHY_DB_CMD: break; case IWM_INIT_COMPLETE_NOTIF: Modified: head/sys/dev/iwm/if_iwm_phy_db.c == --- head/sys/dev/iwm/if_iwm_phy_db.cSun Jun 4 21:12:11 2017 (r319580) +++ head/sys/dev/iwm/if_iwm_phy_db.cSun Jun 4 21:13:13 2017 (r319581) @@ -195,7 +195,7 @@ enum iwm_phy_db_section_type { IWM_PHY_DB_MAX }; -#define PHY_DB_CMD 0x6c/* TEMP API - The actual is 0x8c */ +#define PHY_DB_CMD 0x6c /* * phy db - configure operational ucode Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:12:11 2017 (r319580) +++ head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:13:13 2017 (r319581) @@ -1806,7 +1806,7 @@ enum { /* Phy */ IWM_PHY_CONFIGURATION_CMD = 0x6a, IWM_CALIB_RES_NOTIF_PHY_DB = 0x6b, - /* IWM_PHY_DB_CMD = 0x6c, */ + IWM_PHY_DB_CMD = 0x6c, /* Power - legacy power table command */ IWM_POWER_TABLE_CMD = 0x77, ___ 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: r319580 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:12:11 2017 New Revision: 319580 URL: https://svnweb.freebsd.org/changeset/base/319580 Log: [iwm] Set correct state in smart-fifo configuration. Obtained from:dragonflybsd.git 666737f64b4f6dd42ffd9f0ace9fc46ccc1ebaab Modified: head/sys/dev/iwm/if_iwm_sf.c Modified: head/sys/dev/iwm/if_iwm_sf.c == --- head/sys/dev/iwm/if_iwm_sf.cSun Jun 4 21:11:28 2017 (r319579) +++ head/sys/dev/iwm/if_iwm_sf.cSun Jun 4 21:12:11 2017 (r319580) @@ -248,7 +248,7 @@ iwm_mvm_sf_config(struct iwm_softc *sc, struct ieee802 enum iwm_sf_state new_state) { struct iwm_sf_cfg_cmd sf_cmd = { - .state = htole32(IWM_SF_FULL_ON), + .state = htole32(new_state), }; int ret = 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: r319579 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:11:28 2017 New Revision: 319579 URL: https://svnweb.freebsd.org/changeset/base/319579 Log: [iwm] Remove dead code from iwm_pcie_load_cpu_sections(). * If device family is 8000 then iwm_pcie_load_cpu_sections() won't be called at all (iwm_pcie_load_cpu_sections_8000() is called in that case) so this piece of code never gets called. Obtained from:dragonflybsd.git 3e9aaef308100a4d630feffc131e3aca2ae12f8a Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:10:14 2017(r319578) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:11:28 2017(r319579) @@ -2571,14 +2571,6 @@ iwm_pcie_load_cpu_sections(struct iwm_softc *sc, return ret; } - if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) - iwm_set_bits_prph(sc, - IWM_CSR_UCODE_LOAD_STATUS_ADDR, - (IWM_LMPM_CPU_UCODE_LOADING_COMPLETED | - IWM_LMPM_CPU_HDRS_LOADING_COMPLETED | - IWM_LMPM_CPU_UCODE_LOADING_STARTED) << - shift_param); - *first_ucode_section = last_read_idx; return 0; Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:10:14 2017 (r319578) +++ head/sys/dev/iwm/if_iwmreg.hSun Jun 4 21:11:28 2017 (r319579) @@ -439,23 +439,11 @@ enum iwm_secure_boot_status_reg { }; #define IWM_FH_UCODE_LOAD_STATUS 0x1af0 -#define IWM_CSR_UCODE_LOAD_STATUS_ADDR 0x1e70 -enum iwm_secure_load_status_reg { - IWM_LMPM_CPU_UCODE_LOADING_STARTED = 0x0001, - IWM_LMPM_CPU_HDRS_LOADING_COMPLETED = 0x0003, - IWM_LMPM_CPU_UCODE_LOADING_COMPLETED= 0x0007, - IWM_LMPM_CPU_STATUS_NUM_OF_LAST_COMPLETED = 0x00F8, - IWM_LMPM_CPU_STATUS_NUM_OF_LAST_LOADED_BLOCK= 0xFF00, -}; #define IWM_FH_MEM_TB_MAX_LENGTH 0x2 -#define IWM_LMPM_SECURE_INSPECTOR_CODE_ADDR0x1e38 -#define IWM_LMPM_SECURE_INSPECTOR_DATA_ADDR0x1e3c #define IWM_LMPM_SECURE_UCODE_LOAD_CPU1_HDR_ADDR 0x1e78 #define IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR 0x1e7c -#define IWM_LMPM_SECURE_INSPECTOR_CODE_MEM_SPACE 0x40 -#define IWM_LMPM_SECURE_INSPECTOR_DATA_MEM_SPACE 0x402000 #define IWM_LMPM_SECURE_CPU1_HDR_MEM_SPACE 0x42 #define IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE 0x420400 ___ 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: r319578 - head/sys/dev/iwm
Author: adrian Date: Sun Jun 4 21:10:14 2017 New Revision: 319578 URL: https://svnweb.freebsd.org/changeset/base/319578 Log: [iwm] Check for lar_disable tunable, and lar_enabled flag from NVM. * LAR can be disabled with the hw.iwm.lar.disable tunable now. * On Family 8000 devices we need to check the lar_enabled flag from nvm_data in addition to the TLV_CAPA_LAR_SUPPORT flag from the firmware. * Add a separate IWM_DEBUG_LAR debugging flag. Obtained from:dragonflybsd.git 0593e39cb295aa996ecf789ed4990c3b255f1770 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_debug.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:05:58 2017(r319577) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:10:14 2017(r319578) @@ -356,6 +356,8 @@ static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidiwm_endscan_cb(void *, int); static int iwm_send_bt_init_conf(struct iwm_softc *); +static boolean_t iwm_mvm_is_lar_supported(struct iwm_softc *); +static boolean_t iwm_mvm_is_wifi_mcc_supported(struct iwm_softc *); static int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *); static voidiwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t); static int iwm_init_hw(struct iwm_softc *); @@ -394,6 +396,9 @@ static void iwm_scan_curchan(struct ieee80211_scan_sta static voidiwm_scan_mindwell(struct ieee80211_scan_state *); static int iwm_detach(device_t); +static int iwm_lar_disable = 0; +TUNABLE_INT("hw.iwm.lar.disable", _lar_disable); + /* * Firmware parser. */ @@ -2186,6 +2191,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, { struct iwm_nvm_data *data; uint32_t sku, radio_cfg; + uint16_t lar_config; if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { data = malloc(sizeof(*data) + @@ -2211,6 +2217,16 @@ iwm_parse_nvm_data(struct iwm_softc *sc, data->n_hw_addrs = iwm_get_n_hw_addrs(sc, nvm_sw); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { + uint16_t lar_offset = data->nvm_version < 0xE39 ? + IWM_NVM_LAR_OFFSET_8000_OLD : + IWM_NVM_LAR_OFFSET_8000; + + lar_config = le16_to_cpup(regulatory + lar_offset); + data->lar_enabled = !!(lar_config & + IWM_NVM_LAR_ENABLED_8000); + } + /* If no valid mac address was found - bail out */ if (iwm_set_hw_address(sc, data, nvm_hw, mac_override)) { free(data, M_DEVBUF); @@ -4507,6 +4523,35 @@ iwm_send_bt_init_conf(struct iwm_softc *sc) _cmd); } +static boolean_t +iwm_mvm_is_lar_supported(struct iwm_softc *sc) +{ + boolean_t nvm_lar = sc->nvm_data->lar_enabled; + boolean_t tlv_lar = fw_has_capa(>ucode_capa, + IWM_UCODE_TLV_CAPA_LAR_SUPPORT); + + if (iwm_lar_disable) + return FALSE; + + /* +* Enable LAR only if it is supported by the FW (TLV) && +* enabled in the NVM +*/ + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) + return nvm_lar && tlv_lar; + else + return tlv_lar; +} + +static boolean_t +iwm_mvm_is_wifi_mcc_supported(struct iwm_softc *sc) +{ + return fw_has_api(>ucode_capa, + IWM_UCODE_TLV_API_WIFI_MCC_UPDATE) || + fw_has_capa(>ucode_capa, + IWM_UCODE_TLV_CAPA_LAR_MULTI_MCC); +} + static int iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2) { @@ -4527,10 +4572,15 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const ch int resp_v2 = fw_has_capa(>ucode_capa, IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2); + if (!iwm_mvm_is_lar_supported(sc)) { + IWM_DPRINTF(sc, IWM_DEBUG_LAR, "%s: no LAR support\n", + __func__); + return 0; + } + memset(_cmd, 0, sizeof(mcc_cmd)); mcc_cmd.mcc = htole16(alpha2[0] << 8 | alpha2[1]); - if (fw_has_api(>ucode_capa, IWM_UCODE_TLV_API_WIFI_MCC_UPDATE) || - fw_has_capa(>ucode_capa, IWM_UCODE_TLV_CAPA_LAR_MULTI_MCC)) + if (iwm_mvm_is_wifi_mcc_supported(sc)) mcc_cmd.source_id = IWM_MCC_SOURCE_GET_CURRENT; else mcc_cmd.source_id = IWM_MCC_SOURCE_OLD_FW; @@ -4540,7 +4590,7 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const ch else hcmd.len[0] = sizeof(struct iwm_mcc_update_cmd_v1); - IWM_DPRINTF(sc, IWM_DEBUG_NODE, + IWM_DPRINTF(sc, IWM_DEBUG_LAR, "send MCC update to FW with '%c%c' src = %d\n", alpha2[0], alpha2[1],
svn commit: r319577 - in head/sys: conf dev/iwm modules/iwm
Author: adrian Date: Sun Jun 4 21:05:58 2017 New Revision: 319577 URL: https://svnweb.freebsd.org/changeset/base/319577 Log: [iwm] Move Smart Fifo handling into if_iwm_sf.c, sync with Linux iwlwifi. * This change also fixes a possible issue in the existing smart-fifo code, which set the IWM_SF_CFG_DUMMY_NOTIF_OFF bit on AC8260 chipsets, although that's only used in iwlwifi for Family 8000 chipsets connected via SDIO interface. Obtained from:Dragonflybsd.git cb650b01526b0aeef3c4307d926e7f1428997d50 Added: head/sys/dev/iwm/if_iwm_sf.c (contents, props changed) head/sys/dev/iwm/if_iwm_sf.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwmvar.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Sun Jun 4 21:02:48 2017(r319576) +++ head/sys/conf/files Sun Jun 4 21:05:58 2017(r319577) @@ -1864,6 +1864,7 @@ dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.coptional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm +dev/iwm/if_iwm_sf.coptional iwm dev/iwm/if_iwm_sta.c optional iwm dev/iwm/if_iwm_time_event.coptional iwm dev/iwm/if_iwm_util.c optional iwm Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:02:48 2017(r319576) +++ head/sys/dev/iwm/if_iwm.c Sun Jun 4 21:05:58 2017(r319577) @@ -164,6 +164,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -354,10 +355,6 @@ static voidiwm_setrates(struct iwm_softc *, struct iw static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidiwm_endscan_cb(void *, int); -static voidiwm_mvm_fill_sf_command(struct iwm_softc *, - struct iwm_sf_cfg_cmd *, - struct ieee80211_node *); -static int iwm_mvm_sf_config(struct iwm_softc *, enum iwm_sf_state); static int iwm_send_bt_init_conf(struct iwm_softc *); static int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *); static voidiwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t); @@ -2989,11 +2986,6 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justn goto error; } - /* Init Smart FIFO. */ - ret = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF); - if (ret) - goto error; - /* Send TX valid antennas before triggering calibrations */ ret = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); if (ret) { @@ -3991,10 +3983,6 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *s goto out; } - error = iwm_mvm_sf_config(sc, IWM_SF_FULL_ON); - if (error != 0) - return error; - error = iwm_allow_mcast(vap, sc); if (error) { device_printf(sc->sc_dev, @@ -4469,6 +4457,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_ "%s: failed to update MAC: %d\n", __func__, error); } + iwm_mvm_sf_update(sc, vap, FALSE); iwm_mvm_enable_beacon_filter(sc, ivp); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); @@ -4506,143 +4495,7 @@ iwm_endscan_cb(void *arg, int pending) ieee80211_scan_done(TAILQ_FIRST(>ic_vaps)); } -/* - * Aging and idle timeouts for the different possible scenarios - * in default configuration - */ -static const uint32_t -iwm_sf_full_timeout_def[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES] = { - { - htole32(IWM_SF_SINGLE_UNICAST_AGING_TIMER_DEF), - htole32(IWM_SF_SINGLE_UNICAST_IDLE_TIMER_DEF) - }, - { - htole32(IWM_SF_AGG_UNICAST_AGING_TIMER_DEF), - htole32(IWM_SF_AGG_UNICAST_IDLE_TIMER_DEF) - }, - { - htole32(IWM_SF_MCAST_AGING_TIMER_DEF), - htole32(IWM_SF_MCAST_IDLE_TIMER_DEF) - }, - { - htole32(IWM_SF_BA_AGING_TIMER_DEF), - htole32(IWM_SF_BA_IDLE_TIMER_DEF) - }, - { - htole32(IWM_SF_TX_RE_AGING_TIMER_DEF), - htole32(IWM_SF_TX_RE_IDLE_TIMER_DEF) - }, -}; - -/* - * Aging and idle timeouts for the different possible scenarios - * in single BSS MAC configuration. - */ -static const uint32_t -iwm_sf_full_timeout[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES] = { - { - htole32(IWM_SF_SINGLE_UNICAST_AGING_TIMER), - htole32(IWM_SF_SINGLE_UNICAST_IDLE_TIMER) -
svn commit: r319576 - head/bin/sh
Author: bdrewery Date: Sun Jun 4 21:02:48 2017 New Revision: 319576 URL: https://svnweb.freebsd.org/changeset/base/319576 Log: Allow defining nofork builtins from builtins.def and move always-safe ones there. The generated code remains the same. Reviewed by: jilles Differential Revision:https://reviews.freebsd.org/D11042 Modified: head/bin/sh/builtins.def head/bin/sh/eval.c head/bin/sh/mkbuiltins Modified: head/bin/sh/builtins.def == --- head/bin/sh/builtins.defSun Jun 4 20:52:55 2017(r319575) +++ head/bin/sh/builtins.defSun Jun 4 21:02:48 2017(r319576) @@ -41,6 +41,9 @@ # without job control. # The -h flag specifies that this command is to be excluded from systems # based on the NO_HISTORY compile-time symbol. +# The -n flag specifies that this command can safely be run in the same +# process when it is the only command in a command substitution. Some +# commands have special logic defined in safe_builtin(). # The -s flag specifies that this is a POSIX 'special built-in' command. # The rest of the line specifies the command name or names used to run the # command. The entry for bltincmd, which is run when the user does not specify @@ -48,43 +51,43 @@ # # NOTE: bltincmd must come first! -bltincmd builtin +bltincmd -nbuiltin aliascmd alias bgcmd -j bg bindcmdbind breakcmd -s break -s continue cdcmd cd chdir -commandcmd command +commandcmd -n command dotcmd -s . -echocmdecho +echocmd -n echo evalcmd-s eval execcmd-s exec exitcmd-s exit letcmd let exportcmd -s export -s readonly #exprcmd expr -falsecmd false +falsecmd -nfalse fgcmd -j fg freebsd_wordexpcmd freebsd_wordexp getoptscmd getopts hashcmdhash histcmd -h fc -jobidcmd jobid -jobscmdjobs -killcmdkill +jobidcmd -njobid +jobscmd -n jobs +killcmd -n kill localcmd local -printfcmd printf -pwdcmd pwd +printfcmd -n printf +pwdcmd -n pwd readcmdread returncmd -s return setcmd -s set setvarcmd setvar shiftcmd -s shift -testcmdtest [ -timescmd -s times +testcmd -n test [ +timescmd -n-s times trapcmd-s trap -truecmd-s : true -typecmdtype +truecmd -n -s : true +typecmd -n type ulimitcmd ulimit umaskcmd umask unaliascmd unalias Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Sun Jun 4 20:52:55 2017(r319575) +++ head/bin/sh/eval.c Sun Jun 4 21:02:48 2017(r319576) @@ -800,11 +800,8 @@ xtracecommand(struct arglist *varlist, int argc, char static int safe_builtin(int idx, int argc, char **argv) { - if (idx == BLTINCMD || idx == COMMANDCMD || idx == ECHOCMD || - idx == FALSECMD || idx == JOBIDCMD || idx == JOBSCMD || - idx == KILLCMD || idx == PRINTFCMD || idx == PWDCMD || - idx == TESTCMD || idx == TIMESCMD || idx == TRUECMD || - idx == TYPECMD) + /* Generated from builtins.def. */ + if (safe_builtin_always(idx)) return (1); if (idx == EXPORTCMD || idx == TRAPCMD || idx == ULIMITCMD || idx == UMASKCMD) Modified: head/bin/sh/mkbuiltins == --- head/bin/sh/mkbuiltins Sun Jun 4 20:52:55 2017(r319575) +++ head/bin/sh/mkbuiltins Sun Jun 4 21:02:48 2017(r319576) @@ -66,6 +66,9 @@ const unsigned char builtincmd[] = {' awk '{ for (i = 2 ; i <= NF ; i++) { if ($i == "-s") { spc = 1; + } else if ($i == "-n") { + # Handled later for builtins.h + continue } else { printf "\t\"\\%03o\\%03o%s\"\n", length($i), (spc ? 128 : 0) + NR-1, $i spc = 0; @@ -90,4 +93,45 @@ extern int (*const builtinfunc[])(int, char **); extern const unsigned char builtincmd[]; ' awk '{ printf "int %s(int, char **);\n", $1}' $temp + +# Build safe_builtin_always() +cat
svn commit: r319575 - in head/bin/sh: . tests/errors
Author: jilles Date: Sun Jun 4 20:52:55 2017 New Revision: 319575 URL: https://svnweb.freebsd.org/changeset/base/319575 Log: sh: Fix INTOFF leak when a redirection on a compound command fails. Reported by: bdrewery Added: head/bin/sh/tests/errors/redirection-error8.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/tests/errors/Makefile Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Sun Jun 4 19:58:14 2017(r319574) +++ head/bin/sh/eval.c Sun Jun 4 20:52:55 2017(r319575) @@ -470,6 +470,7 @@ evalredir(union node *n, int flags) if (e == EXERROR || e == EXEXEC) { if (in_redirect) { exitstatus = 2; + FORCEINTON; return; } } Modified: head/bin/sh/tests/errors/Makefile == --- head/bin/sh/tests/errors/Makefile Sun Jun 4 19:58:14 2017 (r319574) +++ head/bin/sh/tests/errors/Makefile Sun Jun 4 20:52:55 2017 (r319575) @@ -29,6 +29,7 @@ ${PACKAGE}FILES+= redirection-error4.0 ${PACKAGE}FILES+= redirection-error5.0 ${PACKAGE}FILES+= redirection-error6.0 ${PACKAGE}FILES+= redirection-error7.0 +${PACKAGE}FILES+= redirection-error8.0 ${PACKAGE}FILES+= write-error1.0 .include Added: head/bin/sh/tests/errors/redirection-error8.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/errors/redirection-error8.0 Sun Jun 4 20:52:55 2017(r319575) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c '{ { :; } /dev/null || kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] ___ 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: r318441 - in head/etc: . cron.d
On 6/4/17 11:43 AM, Alexey Dokuchaev wrote: > On Sun, Jun 04, 2017 at 11:32:21AM -0700, Rodney W. Grimes wrote: >>> On 06/03/17 21:39, Rodney W. Grimes wrote: Are we going to end up with /etc/rc.conf.d? >>> >>> We've had this for over 15 years -- ever since NetBSD rc.d system was >>> imported. >> >> We have had it, but it ships empty, > > I'm also not that sure about 15 years: I don't see it on my 8.4-STABLE. > > ./danfe > It came in the original import in r78345. > ~/svn/base # svn diff -c 78345 |grep -F rc.conf.d > + if [ -f /etc/rc.conf.d/"$_command" ]; then > + . /etc/rc.conf.d/"$_command" > ~/svn/base # svn log -vr 78345 ^/|grep rc.subr >A /head/etc/rc.subr (from /vendor/NetBSD/dist/etc/rc.subr:78344) > r78345 | obrien | 2001-06-16 00:16:14 -0700 (Sat, 16 Jun 2001) | 3 lines -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r318441 - in head/etc: . cron.d
On Sun, Jun 04, 2017 at 11:32:21AM -0700, Rodney W. Grimes wrote: > > On 06/03/17 21:39, Rodney W. Grimes wrote: > > > Are we going to end up with /etc/rc.conf.d? > > > > We've had this for over 15 years -- ever since NetBSD rc.d system was > > imported. > > We have had it, but it ships empty, I'm also not that sure about 15 years: I don't see it on my 8.4-STABLE. ./danfe ___ 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: r318441 - in head/etc: . cron.d
[ Charset UTF-8 unsupported, converting... ] > On Sun, Jun 4, 2017 at 12:32 PM, Rodney W. Grimes < > free...@pdx.rh.cn85.dnsmgr.net> wrote: > > > [ Charset windows-1252 unsupported, converting... ] > > > On 06/03/17 21:39, Rodney W. Grimes wrote: > > > > Are we going to end up with /etc/rc.conf.d? > > > > > > We've had this for over 15 years -- ever since NetBSD rc.d system was > > > imported. > > > > We have had it, but it ships empty, that is different than what is > > going on with newsyslog/syslog/cron, we have had those too for > > various amounts of time, but now we are not shipping them empty. > > > > Shipping empty is over rated. What's the point of having a feature we can > use to make things less monolithic if we don't use that feature? Shipped empty is extremly valuable, it is why we have /etc/defaults/rc.conf and ship without an /etc/rc.conf. It would be nice to have similiar functionality for all of this. The feature is there for the system administrators to use, not for the developers to use to implement policies rather than methods. -- Rod Grimes rgri...@freebsd.org ___ 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: r319571 - head/sys/compat/linux
Author: dchagin Date: Sun Jun 4 18:35:30 2017 New Revision: 319571 URL: https://svnweb.freebsd.org/changeset/base/319571 Log: On success, getrandom() Linux system call returns the number of bytes that were copied to the buffer supplied by the user. PR: 219464 Submitted by: Maciej Pasternacki Reported by: Maciej Pasternacki MFC after:1 week Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c Sun Jun 4 18:24:41 2017 (r319570) +++ head/sys/compat/linux/linux_misc.c Sun Jun 4 18:35:30 2017 (r319571) @@ -2516,6 +2516,7 @@ linux_getrandom(struct thread *td, struct linux_getran { struct uio uio; struct iovec iov; + int error; if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) return (EINVAL); @@ -2532,7 +2533,10 @@ linux_getrandom(struct thread *td, struct linux_getran uio.uio_rw = UIO_READ; uio.uio_td = td; - return (read_random_uio(, args->flags & LINUX_GRND_NONBLOCK)); + error = read_random_uio(, args->flags & LINUX_GRND_NONBLOCK); + if (error == 0) + td->td_retval[0] = args->count - uio.uio_resid; + return (error); } int ___ 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: r318441 - in head/etc: . cron.d
On Sun, Jun 4, 2017 at 12:32 PM, Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset windows-1252 unsupported, converting... ] > > On 06/03/17 21:39, Rodney W. Grimes wrote: > > > Are we going to end up with /etc/rc.conf.d? > > > > We've had this for over 15 years -- ever since NetBSD rc.d system was > > imported. > > We have had it, but it ships empty, that is different than what is > going on with newsyslog/syslog/cron, we have had those too for > various amounts of time, but now we are not shipping them empty. > Shipping empty is over rated. What's the point of having a feature we can use to make things less monolithic if we don't use that feature? Warner ___ 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: r318441 - in head/etc: . cron.d
[ Charset windows-1252 unsupported, converting... ] > On 06/03/17 21:39, Rodney W. Grimes wrote: > > Are we going to end up with /etc/rc.conf.d? > > We've had this for over 15 years -- ever since NetBSD rc.d system was > imported. We have had it, but it ships empty, that is different than what is going on with newsyslog/syslog/cron, we have had those too for various amounts of time, but now we are not shipping them empty. -- Rod Grimes rgri...@freebsd.org ___ 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: r319570 - in head/sys: compat/linux conf modules/linux modules/linux64
Author: dchagin Date: Sun Jun 4 18:24:41 2017 New Revision: 319570 URL: https://svnweb.freebsd.org/changeset/base/319570 Log: Revert r319053 due to lack of sence. As pointed out by kib@ opt_global.h contains such fundamental settings as e.g. SMP option and fake opt_global.h almost never match real configured kernels. Reported by: kib@ Modified: head/sys/compat/linux/linux_misc.c head/sys/conf/config.mk head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c Sun Jun 4 09:11:14 2017 (r319569) +++ head/sys/compat/linux/linux_misc.c Sun Jun 4 18:24:41 2017 (r319570) @@ -31,9 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if defined(KLD_MODULE) -#include "opt_global.h" -#endif #include #include @@ -2519,7 +2516,6 @@ linux_getrandom(struct thread *td, struct linux_getran { struct uio uio; struct iovec iov; - int error; if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) return (EINVAL); @@ -2536,10 +2532,7 @@ linux_getrandom(struct thread *td, struct linux_getran uio.uio_rw = UIO_READ; uio.uio_td = td; - error = read_random_uio(, args->flags & LINUX_GRND_NONBLOCK); - if (error == 0) - td->td_retval[0] = args->count - uio.uio_resid; - return (error); + return (read_random_uio(, args->flags & LINUX_GRND_NONBLOCK)); } int Modified: head/sys/conf/config.mk == --- head/sys/conf/config.mk Sun Jun 4 09:11:14 2017(r319569) +++ head/sys/conf/config.mk Sun Jun 4 18:24:41 2017(r319570) @@ -8,8 +8,6 @@ # the code here when they all produce identical results # (or should) .if !defined(KERNBUILDDIR) -opt_global.h: - echo "#define DEV_RANDOM 1" >> ${.TARGET} opt_bpf.h: echo "#define DEV_BPF 1" > ${.TARGET} .if ${MK_INET_SUPPORT} != "no" Modified: head/sys/modules/linux/Makefile == --- head/sys/modules/linux/Makefile Sun Jun 4 09:11:14 2017 (r319569) +++ head/sys/modules/linux/Makefile Sun Jun 4 18:24:41 2017 (r319570) @@ -15,7 +15,7 @@ SRCS= linux_fork.c linux${SFX}_dummy.c linux_file.c li linux${SFX}_machdep.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_time.c \ - linux_timer.c linux_vdso.c opt_global.h \ + linux_timer.c linux_vdso.c \ opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \ device_if.h bus_if.h assym.s \ linux${SFX}_support.s Modified: head/sys/modules/linux64/Makefile == --- head/sys/modules/linux64/Makefile Sun Jun 4 09:11:14 2017 (r319569) +++ head/sys/modules/linux64/Makefile Sun Jun 4 18:24:41 2017 (r319570) @@ -10,7 +10,7 @@ SRCS= linux_fork.c linux_dummy.c linux_file.c linux_ev linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \ - opt_inet6.h opt_compat.h opt_global.h opt_posix.h opt_usb.h \ + opt_inet6.h opt_compat.h opt_posix.h opt_usb.h \ vnode_if.h device_if.h bus_if.h assym.s \ linux_support.s DPSRCS=linux_genassym.c ___ 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: r319507 - head/sys/fs/msdosfs
On 6/3/2017 12:05 AM, Bruce Evans wrote: > bcopy() is essentially the same as memmove(), but is implemented more > optimally > (the non-use of memmove() in the kernel used to be implememented by > by not having it, but someone broke this by adding an memmove() wrapper > which is an extern function that calls bcopy(). This is even slower than > the inline wrappers used to break intentionally leaving out some of the > other functions). In r189170. It seems to me we should change systm.h back to a macro #define memmove(dst, src, len) bcopy((src), (dst), (len)) And then keep the symbol in sys/libkern/memmove.c for the cases where Clang insists on having the symbol for linking. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r319569 - in head/sys/arm: allwinner annapurna/alpine freescale/imx
Author: andrew Date: Sun Jun 4 09:11:14 2017 New Revision: 319569 URL: https://svnweb.freebsd.org/changeset/base/319569 Log: Start to rename files with common or generic names to be SoC specific. The build system doesn't handle two files with the same name. Added: head/sys/arm/allwinner/aw_console.c - copied unchanged from r319568, head/sys/arm/allwinner/console.c head/sys/arm/annapurna/alpine/alpine_common.c - copied unchanged from r319568, head/sys/arm/annapurna/alpine/common.c head/sys/arm/freescale/imx/imx_console.c - copied unchanged from r319568, head/sys/arm/freescale/imx/console.c Deleted: head/sys/arm/allwinner/console.c head/sys/arm/annapurna/alpine/common.c head/sys/arm/freescale/imx/console.c Modified: head/sys/arm/allwinner/files.allwinner head/sys/arm/annapurna/alpine/files.alpine head/sys/arm/freescale/imx/files.imx5 head/sys/arm/freescale/imx/files.imx6 Copied: head/sys/arm/allwinner/aw_console.c (from r319568, head/sys/arm/allwinner/console.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/aw_console.c Sun Jun 4 09:11:14 2017 (r319569, copy of r319568, head/sys/arm/allwinner/console.c) @@ -0,0 +1,142 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Simple UART console driver for Allwinner A10 */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#ifndefA10_UART_BASE +#defineA10_UART_BASE 0xe1c28000 /* UART0 */ +#endif + +#defineREG_SHIFT 2 + +#defineUART_DLL0 /* Out: Divisor Latch Low */ +#defineUART_DLM1 /* Out: Divisor Latch High */ +#defineUART_FCR2 /* Out: FIFO Control Register */ +#defineUART_LCR3 /* Out: Line Control Register */ +#defineUART_MCR4 /* Out: Modem Control Register */ +#defineUART_LSR5 /* In: Line Status Register */ +#defineUART_LSR_THRE 0x20/* Transmit-hold-register empty */ +#defineUART_LSR_DR 0x01/* Receiver data ready */ +#defineUART_MSR6 /* In: Modem Status Register */ +#defineUART_SCR7 /* I/O: Scratch Register */ + +static uint32_t +uart_getreg(uint32_t *bas) +{ + return *((volatile uint32_t *)(bas)) & 0xff; +} + +static void +uart_setreg(uint32_t *bas, uint32_t val) +{ + *((volatile uint32_t *)(bas)) = val; +} + +static int +ub_getc(void) +{ + while ((uart_getreg((uint32_t *)(A10_UART_BASE + + (UART_LSR << REG_SHIFT))) & UART_LSR_DR) == 0); + __asm __volatile("nop"); + + return (uart_getreg((uint32_t *)A10_UART_BASE) & 0xff); +} + +static void +ub_putc(unsigned char c) +{ + if (c == '\n') + ub_putc('\r'); + + while ((uart_getreg((uint32_t *)(A10_UART_BASE + + (UART_LSR << REG_SHIFT))) & UART_LSR_THRE) == 0) + __asm __volatile("nop"); + + uart_setreg((uint32_t *)A10_UART_BASE, c); +} + +static cn_probe_t uart_cnprobe; +static cn_init_t uart_cninit; +static cn_term_t uart_cnterm; +static cn_getc_t uart_cngetc; +static cn_putc_t uart_cnputc; +static cn_grab_t uart_cngrab; +static cn_ungrab_t uart_cnungrab; + +static void +uart_cngrab(struct consdev *cp) +{ +} + +static void +uart_cnungrab(struct consdev *cp) +{ +} + + +static void +uart_cnprobe(struct consdev *cp) +{ + sprintf(cp->cn_name, "uart"); +
Re: svn commit: r319561 - head/usr.bin/primes
Hi Colin, Minor nitpicking follows. On Sat, Jun 3, 2017 at 7:36 PM, Colin Percivalwrote: > Author: cperciva > Date: Sun Jun 4 02:36:37 2017 > New Revision: 319561 > URL: https://svnweb.freebsd.org/changeset/base/319561 > > Log: > Using results from > J. Sorenson and J. Webster, Strong pseudoprimes to twelve prime > bases, Math. Comp. 86(304):985-1003, 2017. > teach primes(6) to enumerate primes up to 2^64 - 1. Until Sorenson > and Webster's paper, we did not know how many strong speudoprime tests > were required when testing alleged primes between 3825123056546413051 > and 2^64 - 1. > ... > Modified: head/usr.bin/primes/primes.c > == > --- head/usr.bin/primes/primes.cSun Jun 4 02:21:38 2017 > (r319560) > +++ head/usr.bin/primes/primes.cSun Jun 4 02:36:37 2017 > (r319561) > @@ -120,7 +120,7 @@ main(int argc, char *argv[]) > argv += optind; > > start = 0; > - stop = SPSPMAX; > + stop = (uint64_t)(-1); Isn't this usually spelled UINT64_MAX? Best, Conrad ___ 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"