svn commit: r321908 - stable/11/sys/sys
Author: kib Date: Wed Aug 2 07:58:36 2017 New Revision: 321908 URL: https://svnweb.freebsd.org/changeset/base/321908 Log: MFC r321512: Mark name_PCTRIE_LOOKUP_LE() generated function unused. Modified: stable/11/sys/sys/pctrie.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/pctrie.h == --- stable/11/sys/sys/pctrie.h Wed Aug 2 05:47:26 2017(r321907) +++ stable/11/sys/sys/pctrie.h Wed Aug 2 07:58:36 2017(r321908) @@ -76,7 +76,7 @@ name##_PCTRIE_LOOKUP(struct pctrie *ptree, uint64_t ke return name##_PCTRIE_VAL2PTR(pctrie_lookup(ptree, key));\ } \ \ -static __inline struct type * \ +static __inline __unused struct type * \ name##_PCTRIE_LOOKUP_LE(struct pctrie *ptree, uint64_t key)\ { \ \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321909 - stable/11/sys/fs/nfsclient
Author: kib Date: Wed Aug 2 08:03:40 2017 New Revision: 321909 URL: https://svnweb.freebsd.org/changeset/base/321909 Log: MFC r321580: Move rtvals initialization out of the region protected by NFS node lock. Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c == --- stable/11/sys/fs/nfsclient/nfs_clbio.c Wed Aug 2 07:58:36 2017 (r321908) +++ stable/11/sys/fs/nfsclient/nfs_clbio.c Wed Aug 2 08:03:40 2017 (r321909) @@ -306,10 +306,6 @@ ncl_putpages(struct vop_putpages_args *ap) printf("ncl_putpages: called on noncache-able vnode\n"); mtx_lock(&np->n_mtx); } - - for (i = 0; i < npages; i++) - rtvals[i] = VM_PAGER_ERROR; - /* * When putting pages, do not extend file past EOF. */ @@ -319,6 +315,9 @@ ncl_putpages(struct vop_putpages_args *ap) count = 0; } mtx_unlock(&np->n_mtx); + + for (i = 0; i < npages; i++) + rtvals[i] = VM_PAGER_ERROR; PCPU_INC(cnt.v_vnodeout); PCPU_ADD(cnt.v_vnodepgsout, count); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321910 - in stable/11/sys: fs/nfsclient fs/smbfs vm
Author: kib Date: Wed Aug 2 08:07:13 2017 New Revision: 321910 URL: https://svnweb.freebsd.org/changeset/base/321910 Log: MFC r321581: Mark pages after EOF as clean after pageout. Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c stable/11/sys/fs/smbfs/smbfs_io.c stable/11/sys/vm/vnode_pager.c stable/11/sys/vm/vnode_pager.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c == --- stable/11/sys/fs/nfsclient/nfs_clbio.c Wed Aug 2 08:03:40 2017 (r321909) +++ stable/11/sys/fs/nfsclient/nfs_clbio.c Wed Aug 2 08:07:13 2017 (r321910) @@ -336,8 +336,10 @@ ncl_putpages(struct vop_putpages_args *ap) cred); crfree(cred); - if (error == 0 || !nfs_keep_dirty_on_error) - vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); + if (error == 0 || !nfs_keep_dirty_on_error) { + vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid, + np->n_size - offset, npages * PAGE_SIZE); + } return (rtvals[0]); } Modified: stable/11/sys/fs/smbfs/smbfs_io.c == --- stable/11/sys/fs/smbfs/smbfs_io.c Wed Aug 2 08:03:40 2017 (r321909) +++ stable/11/sys/fs/smbfs/smbfs_io.c Wed Aug 2 08:07:13 2017 (r321910) @@ -621,9 +621,11 @@ smbfs_putpages(ap) relpbuf(bp, &smbfs_pbuf_freecnt); - if (!error) - vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); - return rtvals[0]; + if (error == 0) { + vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid, + npages * PAGE_SIZE, npages * PAGE_SIZE); + } + return (rtvals[0]); #endif /* SMBFS_RWGENERIC */ } Modified: stable/11/sys/vm/vnode_pager.c == --- stable/11/sys/vm/vnode_pager.c Wed Aug 2 08:03:40 2017 (r321909) +++ stable/11/sys/vm/vnode_pager.c Wed Aug 2 08:07:13 2017 (r321910) @@ -1276,13 +1276,24 @@ vnode_pager_putpages_ioflags(int pager_flags) return (ioflags); } +/* + * vnode_pager_undirty_pages(). + * + * A helper to mark pages as clean after pageout that was possibly + * done with a short write. The lpos argument specifies the page run + * length in bytes, and the written argument specifies how many bytes + * were actually written. eof is the offset past the last valid byte + * in the vnode using the absolute file position of the first byte in + * the run as the base from which it is computed. + */ void -vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written) +vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written, off_t eof, +int lpos) { vm_object_t obj; - int i, pos; + int i, pos, pos_devb; - if (written == 0) + if (written == 0 && eof >= lpos) return; obj = ma[0]->object; VM_OBJECT_WLOCK(obj); @@ -1296,6 +1307,37 @@ vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, vm_page_clear_dirty(ma[i], 0, written & PAGE_MASK); } } + if (eof >= lpos) /* avoid truncation */ + goto done; + for (pos = eof, i = OFF_TO_IDX(trunc_page(pos)); pos < lpos; i++) { + if (pos != trunc_page(pos)) { + /* +* The page contains the last valid byte in +* the vnode, mark the rest of the page as +* clean, potentially making the whole page +* clean. +*/ + pos_devb = roundup2(pos & PAGE_MASK, DEV_BSIZE); + vm_page_clear_dirty(ma[i], pos_devb, PAGE_SIZE - + pos_devb); + + /* +* If the page was cleaned, report the pageout +* on it as successful. msync() no longer +* needs to write out the page, endlessly +* creating write requests and dirty buffers. +*/ + if (ma[i]->dirty == 0) + rtvals[i] = VM_PAGER_OK; + + pos = round_page(pos); + } else { + /* vm_pageout_flush() clears dirty */ + rtvals[i] = VM_PAGER_BAD; + pos += PAGE_SIZE; + } + } +done: VM_OBJECT_WUNLOCK(obj); } Modified: stable/11/sys/vm/vnode_pager.h == --- stable/11/sys/vm/vnode_pager.h Wed Aug 2 08:03:40 2017 (r321909) +++ stable/11/sys/vm/vnode_pager.h Wed
svn commit: r321912 - in head: bin/cat bin/date bin/dd bin/echo bin/expr bin/ln bin/ls bin/mv bin/pax bin/pkill bin/sh bin/sleep bin/test cddl cddl/lib cddl/sbin cddl/usr.bin cddl/usr.sbin contrib/...
Author: ngie Date: Wed Aug 2 08:35:51 2017 New Revision: 321912 URL: https://svnweb.freebsd.org/changeset/base/321912 Log: Convert traditional ${MK_TESTS} conditional idiom for including test directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after:1 weeks Modified: head/bin/cat/Makefile head/bin/date/Makefile head/bin/dd/Makefile head/bin/echo/Makefile head/bin/expr/Makefile head/bin/ln/Makefile head/bin/ls/Makefile head/bin/mv/Makefile head/bin/pax/Makefile head/bin/pkill/Makefile head/bin/sh/Makefile head/bin/sleep/Makefile head/bin/test/Makefile head/cddl/Makefile head/cddl/lib/Makefile head/cddl/sbin/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.sbin/Makefile head/contrib/ofed/usr.bin/Makefile head/gnu/Makefile head/lib/atf/Makefile head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c/Makefile head/lib/libarchive/Makefile head/lib/libc/Makefile head/lib/libcasper/services/cap_dns/Makefile head/lib/libcasper/services/cap_grp/Makefile head/lib/libcasper/services/cap_pwd/Makefile head/lib/libcasper/services/cap_sysctl/Makefile head/lib/libcrypt/Makefile head/lib/libmp/Makefile head/lib/libnv/Makefile head/lib/libpathconv/Makefile head/lib/libproc/Makefile head/lib/librt/Makefile head/lib/libthr/Makefile head/lib/libutil/Makefile head/lib/libxo/Makefile head/lib/msun/Makefile head/libexec/atf/atf-check/Makefile head/libexec/atf/atf-sh/Makefile head/libexec/rtld-elf/Makefile head/sbin/devd/Makefile head/sbin/dhclient/Makefile head/sbin/growfs/Makefile head/sbin/ifconfig/Makefile head/sbin/mdconfig/Makefile head/sbin/pfctl/Makefile head/secure/Makefile head/secure/lib/Makefile head/secure/libexec/Makefile head/secure/usr.bin/Makefile head/secure/usr.sbin/Makefile head/share/Makefile head/share/examples/Makefile head/share/zoneinfo/Makefile head/usr.bin/apply/Makefile head/usr.bin/basename/Makefile head/usr.bin/bsdcat/Makefile head/usr.bin/calendar/Makefile head/usr.bin/cmp/Makefile head/usr.bin/col/Makefile head/usr.bin/comm/Makefile head/usr.bin/compress/Makefile head/usr.bin/cpio/Makefile head/usr.bin/csplit/Makefile head/usr.bin/cut/Makefile head/usr.bin/diff/Makefile head/usr.bin/diff3/Makefile head/usr.bin/dirname/Makefile head/usr.bin/file2c/Makefile head/usr.bin/getconf/Makefile head/usr.bin/grep/Makefile head/usr.bin/gzip/Makefile head/usr.bin/hexdump/Makefile head/usr.bin/ident/Makefile head/usr.bin/indent/Makefile head/usr.bin/join/Makefile head/usr.bin/jot/Makefile head/usr.bin/lastcomm/Makefile head/usr.bin/limits/Makefile head/usr.bin/m4/Makefile head/usr.bin/mkimg/Makefile head/usr.bin/ncal/Makefile head/usr.bin/pr/Makefile head/usr.bin/printf/Makefile head/usr.bin/procstat/Makefile head/usr.bin/sdiff/Makefile head/usr.bin/sed/Makefile head/usr.bin/soelim/Makefile head/usr.bin/tail/Makefile head/usr.bin/tar/Makefile head/usr.bin/timeout/Makefile head/usr.bin/tr/Makefile head/usr.bin/truncate/Makefile head/usr.bin/uniq/Makefile head/usr.bin/units/Makefile head/usr.bin/uudecode/Makefile head/usr.bin/uuencode/Makefile head/usr.bin/xargs/Makefile head/usr.bin/xinstall/Makefile head/usr.bin/xo/Makefile head/usr.bin/yacc/Makefile head/usr.sbin/chown/Makefile head/usr.sbin/etcupdate/Makefile head/usr.sbin/extattr/Makefile head/usr.sbin/fstyp/Makefile head/usr.sbin/makefs/Makefile head/usr.sbin/newsyslog/Makefile head/usr.sbin/nmtree/Makefile head/usr.sbin/pw/Makefile head/usr.sbin/rpcbind/Makefile head/usr.sbin/sa/Makefile Modified: head/bin/cat/Makefile == --- head/bin/cat/Makefile Wed Aug 2 08:14:06 2017(r321911) +++ head/bin/cat/Makefile Wed Aug 2 08:35:51 2017(r321912) @@ -6,8 +6,6 @@ PACKAGE=runtime PROG= cat -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/date/Makefile == --- head/bin/date/Makefile Wed Aug 2 08:14:06 2017(r321911) +++ head/bin/date/Makefile Wed Aug 2 08:35:51 2017(r321912) @@ -7,8 +7,6 @@ PACKAGE=runtime PROG= date SRCS= date.c netdate.c vary.c -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/dd/Makefile == --- head/bin/dd/MakefileWed Aug 2 08:14:06 2017(r321911) +++ head/bin/dd/MakefileWed Aug 2 08:35:51 2017(r321912) @@ -38,8 +38,6 @@ test: ${PROG} gen @rm -f gen 1M_zeroes* obs_zeroes -.if ${MK_TESTS} != "no" -SUBDIR+= test
svn commit: r321915 - head/lib/libcrypt
Author: ngie Date: Wed Aug 2 08:54:18 2017 New Revision: 321915 URL: https://svnweb.freebsd.org/changeset/base/321915 Log: Remove bogus bsd.subdir.mk .include bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk. MFC after:3 days Modified: head/lib/libcrypt/Makefile Modified: head/lib/libcrypt/Makefile == --- head/lib/libcrypt/Makefile Wed Aug 2 08:50:42 2017(r321914) +++ head/lib/libcrypt/Makefile Wed Aug 2 08:54:18 2017(r321915) @@ -46,4 +46,3 @@ PRECIOUSLIB= SUBDIR.${MK_TESTS}+= tests .include -.include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321916 - head/contrib/ofed/usr.bin
Author: ngie Date: Wed Aug 2 09:00:18 2017 New Revision: 321916 URL: https://svnweb.freebsd.org/changeset/base/321916 Log: Fix accidental misconversion done in r321912 SUBDIR.${MK_TESTS} should append osmtest, not tests MFC after:1 week MFC with: r321912 Modified: head/contrib/ofed/usr.bin/Makefile Modified: head/contrib/ofed/usr.bin/Makefile == --- head/contrib/ofed/usr.bin/Makefile Wed Aug 2 08:54:18 2017 (r321915) +++ head/contrib/ofed/usr.bin/Makefile Wed Aug 2 09:00:18 2017 (r321916) @@ -4,7 +4,7 @@ SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibrout ibsysstat ibtracert opensm perfquery saquery \ sminfo smpdump smpquery vendstat -SUBDIR.${MK_TESTS}+= tests +SUBDIR.${MK_TESTS}+= osmtest SUBDIR_PARALLEL= ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321918 - head/tests/sys/aio
Author: ngie Date: Wed Aug 2 09:49:41 2017 New Revision: 321918 URL: https://svnweb.freebsd.org/changeset/base/321918 Log: Fix cosmetic issue with error message Add missing space in error message related to PR noted. MFC after:2 weeks PR: 220398 Modified: head/tests/sys/aio/lio_test.c Modified: head/tests/sys/aio/lio_test.c == --- head/tests/sys/aio/lio_test.c Wed Aug 2 09:00:59 2017 (r321917) +++ head/tests/sys/aio/lio_test.c Wed Aug 2 09:49:41 2017 (r321918) @@ -99,7 +99,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_signal, tc) struct sigevent sev; atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - "asynchronous notification if nent==0"); + " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGUSR1; @@ -120,7 +120,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) struct sigevent sev; atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - "asynchronous notification if nent==0"); + " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); bzero(&sev, sizeof(sev)); sev.sigev_notify = SIGEV_THREAD; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321919 - in head/sys: amd64/amd64 i386/i386
Author: kib Date: Wed Aug 2 10:12:10 2017 New Revision: 321919 URL: https://svnweb.freebsd.org/changeset/base/321919 Log: Do not call trapsignal() after handling usermode fault or interrupt, when a signal is not intended to be sent. The variable holding the signal number to send is left uninitialized, which sometimes triggers invalid signal checks. For NMI, a return to usermode without ast processing is done. On the other hand, for spurious dtrace probe interrupt it is usermode which triggered the interrupt, so handle it through userret() as any other fault. Reported by: Nils Beyer PR: 221151 Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c Modified: head/sys/amd64/amd64/trap.c == --- head/sys/amd64/amd64/trap.c Wed Aug 2 09:49:41 2017(r321918) +++ head/sys/amd64/amd64/trap.c Wed Aug 2 10:12:10 2017(r321919) @@ -370,7 +370,7 @@ trap(struct trapframe *frame) #ifdef DEV_ISA case T_NMI: nmi_handle_intr(type, frame); - break; + goto out; #endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ @@ -408,7 +408,7 @@ trap(struct trapframe *frame) if (dtrace_return_probe_ptr != NULL && dtrace_return_probe_ptr(®s) == 0) goto out; - break; + goto userout; #endif } } else { Modified: head/sys/i386/i386/trap.c == --- head/sys/i386/i386/trap.c Wed Aug 2 09:49:41 2017(r321918) +++ head/sys/i386/i386/trap.c Wed Aug 2 10:12:10 2017(r321919) @@ -455,7 +455,7 @@ user_trctrap_out: goto userout; #else /* !POWERFAIL_NMI */ nmi_handle_intr(type, frame); - break; + goto out; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ @@ -499,7 +499,7 @@ user_trctrap_out: if (dtrace_return_probe_ptr != NULL && dtrace_return_probe_ptr(®s) == 0) goto out; - break; + goto userout; #endif } } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321920 - head/sys/sys
Author: kib Date: Wed Aug 2 10:14:17 2017 New Revision: 321920 URL: https://svnweb.freebsd.org/changeset/base/321920 Log: Change major()/minor() to work with 64bit dev_t. Since traditional types for the macros values are int, remove the cookie trick and just split the dev_t at the word boundary. Reported by: Victor Stinner PR: 221048 Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h == --- head/sys/sys/types.hWed Aug 2 10:12:10 2017(r321919) +++ head/sys/sys/types.hWed Aug 2 10:14:17 2017(r321920) @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) #include -/* - * minor() gives a cookie instead of an index since we don't want to - * change the meanings of bits 0-15 or waste time and space shifting - * bits 16-31 for devices that don't use them. - */ -#definemajor(x)((int)(((u_int)(x) >> 8)&0xff)) /* major number */ -#defineminor(x)((int)((x)&0x00ff)) /* minor number */ -#definemakedev(x,y)((dev_t)(((x) << 8) | (y))) /* create dev_t */ +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ +#defineminor(x)((int)((x) & 0x)) /* minor number */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 12:14, Konstantin Belousov wrote: Author: kib Date: Wed Aug 2 10:14:17 2017 New Revision: 321920 URL: https://svnweb.freebsd.org/changeset/base/321920 Log: Change major()/minor() to work with 64bit dev_t. Since traditional types for the macros values are int, remove the cookie trick and just split the dev_t at the word boundary. Reported by: Victor Stinner PR: 221048 Sponsored by:The FreeBSD Foundation Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h == --- head/sys/sys/types.hWed Aug 2 10:12:10 2017(r321919) +++ head/sys/sys/types.hWed Aug 2 10:14:17 2017(r321920) @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) #include -/* - * minor() gives a cookie instead of an index since we don't want to - * change the meanings of bits 0-15 or waste time and space shifting - * bits 16-31 for devices that don't use them. - */ -#definemajor(x)((int)(((u_int)(x) >> 8)&0xff)) /* major number */ -#defineminor(x)((int)((x)&0x00ff)) /* minor number */ -#definemakedev(x,y)((dev_t)(((x) << 8) | (y))) /* create dev_t */ +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ +#defineminor(x)((int)((x) & 0x)) /* minor number */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (y))/* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in Hi, This change looks like it affects user-space applications? Why is not the FreeBSD version number bumped? --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321921 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: mav Date: Wed Aug 2 10:33:47 2017 New Revision: 321921 URL: https://svnweb.freebsd.org/changeset/base/321921 Log: Add compat shim part missed at r305197. This fixes compatibility between old kernel and new ZFS tools. It seems to be tradition to forget it. :( PR: 221112 MFC after:3 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Wed Aug 2 10:14:17 2017(r321920) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Wed Aug 2 10:33:47 2017(r321921) @@ -74,6 +74,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_t *zc) if (zfs_ioctl_version >= ZFS_IOCVER_DEADMAN) { switch (zfs_ioctl_version) { + case ZFS_IOCVER_INLANES: + cflag = ZFS_CMD_COMPAT_INLANES; + break; case ZFS_IOCVER_RESUME: cflag = ZFS_CMD_COMPAT_RESUME; break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 12:14, Konstantin Belousov wrote: Author: kib Date: Wed Aug 2 10:14:17 2017 New Revision: 321920 URL: https://svnweb.freebsd.org/changeset/base/321920 Log: Change major()/minor() to work with 64bit dev_t. Since traditional types for the macros values are int, remove the cookie trick and just split the dev_t at the word boundary. Reported by: Victor Stinner PR: 221048 Sponsored by:The FreeBSD Foundation Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h == --- head/sys/sys/types.hWed Aug 2 10:12:10 2017(r321919) +++ head/sys/sys/types.hWed Aug 2 10:14:17 2017(r321920) @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) #include -/* - * minor() gives a cookie instead of an index since we don't want to - * change the meanings of bits 0-15 or waste time and space shifting - * bits 16-31 for devices that don't use them. - */ -#definemajor(x)((int)(((u_int)(x) >> 8)&0xff)) /* major number */ -#defineminor(x)((int)((x)&0x00ff)) /* minor number */ -#definemakedev(x,y)((dev_t)(((x) << 8) | (y))) /* create dev_t */ +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ +#defineminor(x)((int)((x) & 0x)) /* minor number */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (y))/* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in Hi, This change breaks the LinuxKPI: struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) { int unit = MKDEV(major, minor); struct cdev *cdev; dev_lock(); LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { struct linux_cdev *ldev = cdev->si_drv1; if (dev2unit(cdev) == unit && strcmp(kobject_name(&ldev->kobj), name) == 0) { break; } } dev_unlock(); return (cdev != NULL ? cdev->si_drv1 : NULL); } You will also need to change cdev->si_drv0 to dev_t and fix the make_dev() functions too. struct cdev { void*si_spare0; u_int si_flags; #define SI_ETERNAL 0x0001 /* never destroyed */ #define SI_ALIAS0x0002 /* carrier of alias name */ #define SI_NAMED0x0004 /* make_dev{_alias} has been called */ #define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ #define SI_CHILD0x0010 /* child of another struct cdev **/ #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ #define SI_CLONELIST0x0200 /* on a clone list */ #define SI_UNMAPPED 0x0400 /* can handle unmapped I/O */ #define SI_NOSPLIT 0x0800 /* I/O should not be split up */ struct timespec si_atime; struct timespec si_ctime; struct timespec si_mtime; uid_t si_uid; gid_t si_gid; mode_t si_mode; struct ucred*si_cred; /* cached clone-time credential */ int si_drv0; Further this update assigns a 64-bit value to tfsid.val[0], which is 32-bit ?? > sys/sys/mount.h:typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ sys/kern/vfs_subr.c:tfsid.val[0] = makedev(255, And there are more places like this! Did you properly check all uses of makedev() in the kernel before making this change? --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 12:23:22PM +0200, Hans Petter Selasky wrote: > On 08/02/17 12:14, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Aug 2 10:14:17 2017 > > New Revision: 321920 > > URL: https://svnweb.freebsd.org/changeset/base/321920 > > > > Log: > >Change major()/minor() to work with 64bit dev_t. > > > >Since traditional types for the macros values are int, remove the > >cookie trick and just split the dev_t at the word boundary. > > > >Reported by: Victor Stinner > >PR: 221048 > >Sponsored by:The FreeBSD Foundation > > > > Modified: > >head/sys/sys/types.h > > > > Modified: head/sys/sys/types.h > > == > > --- head/sys/sys/types.hWed Aug 2 10:12:10 2017(r321919) > > +++ head/sys/sys/types.hWed Aug 2 10:14:17 2017(r321920) > > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > > > #include > > > > -/* > > - * minor() gives a cookie instead of an index since we don't want to > > - * change the meanings of bits 0-15 or waste time and space shifting > > - * bits 16-31 for devices that don't use them. > > - */ > > -#definemajor(x)((int)(((u_int)(x) >> 8)&0xff)) /* major number > > */ > > -#defineminor(x)((int)((x)&0x00ff)) /* minor number > > */ > > -#definemakedev(x,y)((dev_t)(((x) << 8) | (y))) /* create dev_t > > */ > > +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number > > */ > > +#defineminor(x)((int)((x) & 0x)) /* minor number > > */ > > +#definemakedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t > > */ > > > > /* > >* These declarations belong elsewhere, but are repeated here and in > > Hi, > > This change looks like it affects user-space applications? Why is not > the FreeBSD version number bumped? This change is the trailing fix for the ino64 commit. More details are following: main feature of major/minor is the deconstruction of the dev_t into components which can be used to reconstruct original dev_t with makedev(). In other words, if makedev(major(x), minor(x)) != x then the major/minor API is useless. And it was useless right after ino64 commit r318736 and up to the commit you replied to. The fact that nobody complained until the referenced PR, indicates that the API is not actively used (finally). I do not see a need to bump the __FreeBSD_version for this, we do not support older HEADs in any way. This means that we assume that HEAD users always use the latest HEAD. So no bump for such minor fix. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 12:35:47PM +0200, Hans Petter Selasky wrote: > On 08/02/17 12:14, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Aug 2 10:14:17 2017 > > New Revision: 321920 > > URL: https://svnweb.freebsd.org/changeset/base/321920 > > > > Log: > >Change major()/minor() to work with 64bit dev_t. > > > >Since traditional types for the macros values are int, remove the > >cookie trick and just split the dev_t at the word boundary. > > > >Reported by: Victor Stinner > >PR: 221048 > >Sponsored by:The FreeBSD Foundation > > > > Modified: > >head/sys/sys/types.h > > > > Modified: head/sys/sys/types.h > > == > > --- head/sys/sys/types.hWed Aug 2 10:12:10 2017(r321919) > > +++ head/sys/sys/types.hWed Aug 2 10:14:17 2017(r321920) > > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > > > #include > > > > -/* > > - * minor() gives a cookie instead of an index since we don't want to > > - * change the meanings of bits 0-15 or waste time and space shifting > > - * bits 16-31 for devices that don't use them. > > - */ > > -#definemajor(x)((int)(((u_int)(x) >> 8)&0xff)) /* major number > > */ > > -#defineminor(x)((int)((x)&0x00ff)) /* minor number > > */ > > -#definemakedev(x,y)((dev_t)(((x) << 8) | (y))) /* create dev_t > > */ > > +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number > > */ > > +#defineminor(x)((int)((x) & 0x)) /* minor number > > */ > > +#definemakedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t > > */ > > > > /* > >* These declarations belong elsewhere, but are repeated here and in > > > > Hi, > > This change breaks the LinuxKPI: > > > struct linux_cdev * > > linux_find_cdev(const char *name, unsigned major, unsigned minor) > > { > > int unit = MKDEV(major, minor); > > struct cdev *cdev; > > > > dev_lock(); > > LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { > > struct linux_cdev *ldev = cdev->si_drv1; > > if (dev2unit(cdev) == unit && > > strcmp(kobject_name(&ldev->kobj), name) == 0) { > > break; > > } > > } > > dev_unlock(); > > > > return (cdev != NULL ? cdev->si_drv1 : NULL); > > } So linuxkpi was broken before this commit as well, as I noted in my other reply ? > > You will also need to change cdev->si_drv0 to dev_t and fix the > make_dev() functions too. Why do you think that si_drv0 needs to be changes ? > > > struct cdev { > > void*si_spare0; > > u_int si_flags; > > #define SI_ETERNAL 0x0001 /* never destroyed */ > > #define SI_ALIAS0x0002 /* carrier of alias name */ > > #define SI_NAMED0x0004 /* make_dev{_alias} has been called */ > > #define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode > > reclaims */ > > #define SI_CHILD0x0010 /* child of another struct cdev **/ > > #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ > > #define SI_CLONELIST0x0200 /* on a clone list */ > > #define SI_UNMAPPED 0x0400 /* can handle unmapped I/O */ > > #define SI_NOSPLIT 0x0800 /* I/O should not be split up */ > > struct timespec si_atime; > > struct timespec si_ctime; > > struct timespec si_mtime; > > uid_t si_uid; > > gid_t si_gid; > > mode_t si_mode; > > struct ucred*si_cred; /* cached clone-time credential */ > > int si_drv0; > > > Further this update assigns a 64-bit value to tfsid.val[0], which is > 32-bit ?? > > > sys/sys/mount.h:typedef struct fsid { int32_t val[2]; } fsid_t;/* > filesystem id type */ > > sys/kern/vfs_subr.c:tfsid.val[0] = makedev(255, >From my reading if the vfs_getnewfsid() code, it is fine. It ignores the 255-major value, which does not add much sense to the returned value, just that byte 1 is not zero and not 0xff. > > And there are more places like this! I see the use of makedev() in nfsserver, where the change seemingly improve the situation by initializing na_rdev to the full 64 bit value, and in fdescfs, which does not care. > > Did you properly check all uses of makedev() in the kernel before making > this change? > > --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 13:06, Konstantin Belousov wrote: So linuxkpi was broken before this commit as well, as I noted in my other reply ? Hi, The LinuxKPI uses minor/major/makedev internally. y = makedev(z,t) Then the LinuxKPI assumes z and t can be retrieved through minor and major: minor(y) == z and major(y) == t If "y" is an "int" and it is assigned a 64-bit value, it is obvious that this code no longer holds true. Same might be in userspace/ports. So yes, this change breaks the LinuxKPI, at least some parts of it. --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 01:11:48PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:06, Konstantin Belousov wrote: > > So linuxkpi was broken before this commit as well, as I noted in my > > other reply ? > > Hi, > > The LinuxKPI uses minor/major/makedev internally. > > y = makedev(z,t) > > Then the LinuxKPI assumes z and t can be retrieved through minor and > major: minor(y) == z and major(y) == t > > If "y" is an "int" and it is assigned a 64-bit value, it is obvious that > this code no longer holds true. Same might be in userspace/ports. But y must be dev_t. > > So yes, this change breaks the LinuxKPI, at least some parts of it. > > --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321922 - head/sys/amd64/amd64
Author: mjg Date: Wed Aug 2 11:25:38 2017 New Revision: 321922 URL: https://svnweb.freebsd.org/changeset/base/321922 Log: amd64: annotate the syscall return address check with __predict_false before: 0x80b03ebb <+2059>:mov0x460(%r14),%rax 0x80b03ec2 <+2066>:mov0x98(%rax),%rax 0x80b03ec9 <+2073>:shr$0x2f,%rax 0x80b03ecd <+2077>:je 0x80b03edd 0x80b03ecf <+2079>:mov0x3f8(%r14),%rax 0x80b03ed6 <+2086>:orl$0x1,0xc8(%rax) 0x80b03edd <+2093>:add$0xf8,%rsp after: 0x80b03ebb <+2059>:mov0x460(%r14),%rax 0x80b03ec2 <+2066>:mov0x98(%rax),%rax 0x80b03ec9 <+2073>:shr$0x2f,%rax 0x80b03ecd <+2077>:jne0x80b03eef 0x80b03ecf <+2079>:add$0xf8,%rsp Reviewed by: kib MFC after:1 week Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c == --- head/sys/amd64/amd64/trap.c Wed Aug 2 10:33:47 2017(r321921) +++ head/sys/amd64/amd64/trap.c Wed Aug 2 11:25:38 2017(r321922) @@ -935,6 +935,6 @@ amd64_syscall(struct thread *td, int traced) * not be safe. Instead, use the full return path which * catches the problem safely. */ - if (td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS) + if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 13:17, Konstantin Belousov wrote: But y must be dev_t. Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain dev_t ? --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:17, Konstantin Belousov wrote: > > But y must be dev_t. > > Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain > dev_t ? Why should it contain dev_t ? Linux KPI abused that field it seems. Lets change the focus of the discussion. You cited the struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) function which finds cdev (or some mockup of the native cdev) by major/minor. Where does these major/minor numbers come from ? I mean that if they are contructed as major(struct stat.st_rdev) and minor(struct stat.st_rdev), then even the original code looks wrong without the ino64 addition. Since devfs reports the internal inode number into st_rdev, which formally is not accessible outside the devfs filesystem. So should the code for linux_find_cdev() changed to match cdevs against inode number ? cdp_inode is serially generated so on real machine it is really a small number for any /dev node. You can watch that by ls -l /dev. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 13:43, Konstantin Belousov wrote: On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: On 08/02/17 13:17, Konstantin Belousov wrote: But y must be dev_t. Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain dev_t ? Why should it contain dev_t ? Linux KPI abused that field it seems. Hi, The LinuxKPI uses si_drv0 to contain the output from mkdev(). Before the mkdev() function would fit into 32-bits. Now it is 64-bits. I can fix the LinuxKPI bits this time. We can store this information in si_drv1->xxx instead of using si_drv0 and dev2unit(). Lets change the focus of the discussion. You cited the struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) function which finds cdev (or some mockup of the native cdev) by major/minor. Where does these major/minor numbers come from ? The major number is in the range 0..255 and decides the type of device. The minor number is in the range 0..255 aswell typically and defines a unique number for each LinuxKPI created character device. I mean that if they are contructed as major(struct stat.st_rdev) and minor(struct stat.st_rdev), then even the original code looks wrong without the ino64 addition. Since devfs reports the internal inode number into st_rdev, which formally is not accessible outside the devfs filesystem. So should the code for linux_find_cdev() changed to match cdevs against inode number ? These numbers do not come from any user-visible files. They are just used internally in the kernel to pass around information. cdp_inode is serially generated so on real machine it is really a small number for any /dev node. You can watch that by ls -l /dev. Sure. While at it, I found that contrib/mknod/pack_dev.c, still has hardcoded references to the old makedev(): contrib/mknod/pack_dev.c:#definemakedev_freebsd(x,y)((portdev_t)x) << 8) & 0xff00) | \ contrib/mknod/pack_dev.c: dev = makedev_freebsd(numbers[0], numbers[1]); Same goes for: contrib/libarchive/libarchive/archive_pack_dev.c And if you "grep -r makedev /usr/src" you'll find more. --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321923 - head/share/misc
Author: dru (doc committer) Date: Wed Aug 2 12:31:03 2017 New Revision: 321923 URL: https://svnweb.freebsd.org/changeset/base/321923 Log: Update my entry in marketing. Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot == --- head/share/misc/organization.dotWed Aug 2 11:25:38 2017 (r321922) +++ head/share/misc/organization.dotWed Aug 2 12:31:03 2017 (r321923) @@ -57,7 +57,7 @@ webmaster [label="Webmaster Team\nwebmas...@freebsd.or # Misc hats go here alphabetically sorted donations [label="Donations Team\ndonati...@freebsd.org\nwilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] -marketing [label="Marketing Team\nmarket...@freebsd.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] +marketing [label="Marketing Team\nmarket...@freebsd.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, dru, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] vendorrelations [label="Vendor Relations\nvendor-relati...@freebsd.org\ncore, FreeBSD Foundation"] # Here are the team relationships. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 12:14, Konstantin Belousov wrote: +#definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ +#defineminor(x)((int)((x) & 0x)) /* minor number */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (y))/* create dev_t */ One more comment on this issue: I think makedev(x, y) should be declared like this, to avoid issues when "y" is negative: #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) /* create dev_t */ ??? --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 02:26:46PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:43, Konstantin Belousov wrote: > > On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: > >> On 08/02/17 13:17, Konstantin Belousov wrote: > >>> But y must be dev_t. > >> > >> Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain > >> dev_t ? > > > > Why should it contain dev_t ? > > Linux KPI abused that field it seems. > > > > Hi, > > The LinuxKPI uses si_drv0 to contain the output from mkdev(). Before the > mkdev() function would fit into 32-bits. Now it is 64-bits. > > I can fix the LinuxKPI bits this time. We can store this information in > si_drv1->xxx instead of using si_drv0 and dev2unit(). si_drv1 is 32bit on 32bit platforms. > > > Lets change the focus of the discussion. > > You cited the > > struct linux_cdev * > > linux_find_cdev(const char *name, unsigned major, unsigned minor) > > function which finds cdev (or some mockup of the native cdev) by > > major/minor. > > Where does these major/minor numbers come from ? > > The major number is in the range 0..255 and decides the type of device. > The minor number is in the range 0..255 aswell typically and defines a > unique number for each LinuxKPI created character device. > > > I mean that if they are contructed as major(struct stat.st_rdev) and > > minor(struct stat.st_rdev), then even the original code looks wrong > > without the ino64 addition. Since devfs reports the internal inode > > number into st_rdev, which formally is not accessible outside the devfs > > filesystem. So should the code for linux_find_cdev() changed to match > > cdevs against inode number ? > > These numbers do not come from any user-visible files. They are just > used internally in the kernel to pass around information. > > > cdp_inode is serially generated so on real machine it is really a small > > number for any /dev node. You can watch that by ls -l /dev. > > Sure. > > > > > While at it, I found that contrib/mknod/pack_dev.c, still has hardcoded > references to the old makedev(): > > > contrib/mknod/pack_dev.c:#definemakedev_freebsd(x,y) > > ((portdev_t)x) << 8) & 0xff00) | \ > > contrib/mknod/pack_dev.c: dev = makedev_freebsd(numbers[0], > > numbers[1]); > > Same goes for: contrib/libarchive/libarchive/archive_pack_dev.c I do not see how pack_dev.c can be used for anything non-broken on FreeBSD, at least in connection with devfs. For non-devfs filesystems it can be streamlined, of course. I will look at this later. > > And if you "grep -r makedev /usr/src" you'll find more. > > --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 14:37, Konstantin Belousov wrote: si_drv1->xxx instead of using si_drv0 and dev2unit(). si_drv1 is 32bit on 32bit platforms. I mean the LinuxKPI structure pointed to by si_drv1, not si_drv1 itself. --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 14:36, Hans Petter Selasky wrote: On 08/02/17 12:14, Konstantin Belousov wrote: +#definemajor(x)((int)((dev_t)(x) >> 32))/* major number */ +#defineminor(x)((int)((x) & 0x))/* minor number */ +#definemakedev(x, y)(((dev_t)(x) << 32) | (y))/* create dev_t */ One more comment on this issue: I think makedev(x, y) should be declared like this, to avoid issues when "y" is negative: #definemakedev(x, y)(((dev_t)(x) << 32) | (unsigned int)(y)) /* create dev_t */ ??? --HPS And you'll probably want a final wrapping dev_t cast aswell. 128-bit numbers are not yet there. #define makedev(x, y)((dev_t)(((dev_t)(x) << 32) | (unsigned int)(y))) > /* create dev_t */ --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321924 - head/sys/amd64/cloudabi64
Author: ed Date: Wed Aug 2 13:08:10 2017 New Revision: 321924 URL: https://svnweb.freebsd.org/changeset/base/321924 Log: Keep top page on CloudABI to work around AMD Ryzen stability issues. Similar to r321899, reduce sv_maxuser by one page inside of CloudABI. This ensures that the stack, the vDSO and any allocations cannot touch the top page of user virtual memory. Considering that CloudABI userspace is completely oblivious to virtual memory layout, don't bother making this conditional based on the CPU of the running system. Reviewed by: kib, truckman Differential Revision:https://reviews.freebsd.org/D11808 Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c == --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 12:31:03 2017(r321923) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 13:08:10 2017(r321924) @@ -199,7 +199,8 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_coredump= elf64_coredump, .sv_pagesize= PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, - .sv_maxuser = VM_MAXUSER_ADDRESS, + /* Keep top page reserved to work around AMD Ryzen stability issues. */ + .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, .sv_copyout_strings = cloudabi64_copyout_strings, .sv_setregs = cloudabi64_proc_setregs, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, Aug 02, 2017 at 02:38:50PM +0200, Hans Petter Selasky wrote: > On 08/02/17 14:36, Hans Petter Selasky wrote: > > On 08/02/17 12:14, Konstantin Belousov wrote: > >> +#definemajor(x)((int)((dev_t)(x) >> 32))/* major number */ > >> +#defineminor(x)((int)((x) & 0x))/* minor number */ > >> +#definemakedev(x, y)(((dev_t)(x) << 32) | (y))/* create > >> dev_t */ > > > > One more comment on this issue: > > > > I think makedev(x, y) should be declared like this, to avoid issues when > > "y" is negative: > > > > #definemakedev(x, y)(((dev_t)(x) << 32) | (unsigned int)(y)) > > /* create dev_t */ > > > > ??? > > > > --HPS > > > > > > And you'll probably want a final wrapping dev_t cast aswell. 128-bit > numbers are not yet there. > > #define makedev(x, y)((dev_t)(((dev_t)(x) << 32) | (unsigned > int)(y))) > > /* create dev_t */ I agree with the usefulness of the y cast to unsigned type, but I am not sure what is the use of final dev_t cast. By the usual arithmetic conversion rules, the final type of the '|' is the highest rank type of the operands. Something unusual can only happen if int is wider than dev_t. So I am going to commit the following update. diff --git a/sys/sys/types.h b/sys/sys/types.h index fce57e412ed..30a08724443 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ #defineminor(x)((int)((x) & 0x)) /* minor number */ -#definemakedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On 08/02/17 15:54, Konstantin Belousov wrote: I agree with the usefulness of the y cast to unsigned type, but I am not sure what is the use of final dev_t cast. By the usual arithmetic conversion rules, the final type of the '|' is the highest rank type of the operands. Something unusual can only happen if int is wider than dev_t. So I am going to commit the following update. OK, Looks good! --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321925 - head/sys/arm/arm
Author: andrew Date: Wed Aug 2 14:12:47 2017 New Revision: 321925 URL: https://svnweb.freebsd.org/changeset/base/321925 Log: Fix the return type for get_cntxc(). The register is 64-bit on both arm and arm64 so move any truncation to the caller. Submitted by: Mihai Carabas X-Differential Revision: https://reviews.freebsd.org/D10213 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cWed Aug 2 13:08:10 2017 (r321924) +++ head/sys/arm/arm/generic_timer.cWed Aug 2 14:12:47 2017 (r321925) @@ -138,7 +138,7 @@ get_freq(void) return (get_el0(cntfrq)); } -static long +static uint64_t get_cntxct(bool physical) { uint64_t val; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321926 - in head/sys/compat/linuxkpi/common: include/linux src
Author: hselasky Date: Wed Aug 2 14:27:27 2017 New Revision: 321926 URL: https://svnweb.freebsd.org/changeset/base/321926 Log: Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in the "linux_cdev" structure to store and lookup this value. While at it remove superfluous use of parenthesis inside the MAJOR(), MINOR() and MKDEV() macros in the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/include/linux/kdev_t.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h == --- head/sys/compat/linuxkpi/common/include/linux/cdev.hWed Aug 2 14:12:47 2017(r321925) +++ head/sys/compat/linuxkpi/common/include/linux/cdev.hWed Aug 2 14:27:27 2017(r321926) @@ -95,7 +95,6 @@ cdev_add(struct linux_cdev *cdev, dev_t dev, unsigned args.mda_gid = 0; args.mda_mode = 0700; args.mda_si_drv1 = cdev; - args.mda_unit = dev; error = make_dev_s(&args, &cdev->cdev, "%s", kobject_name(&cdev->kobj)); @@ -121,7 +120,6 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t args.mda_gid = gid; args.mda_mode = mode; args.mda_si_drv1 = cdev; - args.mda_unit = dev; error = make_dev_s(&args, &cdev->cdev, "%s/%d", kobject_name(&cdev->kobj), MINOR(dev)); Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h == --- head/sys/compat/linuxkpi/common/include/linux/fs.h Wed Aug 2 14:12:47 2017(r321925) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Wed Aug 2 14:27:27 2017(r321926) @@ -229,12 +229,8 @@ nonseekable_open(struct inode *inode, struct file *fil return 0; } -static inline dev_t -iminor(struct inode *inode) -{ - - return (minor(dev2unit(inode->v_rdev))); -} +extern unsigned int linux_iminor(struct inode *); +#defineiminor(...) linux_iminor(__VA_ARGS__) static inline struct linux_file * get_file(struct linux_file *f) Modified: head/sys/compat/linuxkpi/common/include/linux/kdev_t.h == --- head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Wed Aug 2 14:12:47 2017(r321925) +++ head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Wed Aug 2 14:27:27 2017(r321926) @@ -33,9 +33,9 @@ #include -#define MAJOR(dev) major((dev)) -#define MINOR(dev) minor((dev)) -#define MKDEV(ma, mi) makedev((ma), (mi)) +#define MAJOR(dev) major(dev) +#define MINOR(dev) minor(dev) +#define MKDEV(ma, mi) makedev(ma, mi) static inline uint16_t old_encode_dev(dev_t dev) Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c == --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Aug 2 14:12:47 2017(r321925) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Aug 2 14:27:27 2017(r321926) @@ -1417,6 +1417,21 @@ linux_file_fill_kinfo(struct file *fp, struct kinfo_fi return (0); } +unsigned int +linux_iminor(struct inode *inode) +{ + struct linux_cdev *ldev; + + if (inode == NULL || inode->v_rdev == NULL || + inode->v_rdev->si_devsw != &linuxcdevsw) + return (-1U); + ldev = inode->v_rdev->si_drv1; + if (ldev == NULL) + return (-1U); + + return (minor(ldev->dev)); +} + struct fileops linuxfileops = { .fo_read = linux_file_read, .fo_write = invfo_rdwr, @@ -1975,13 +1990,13 @@ linux_in_atomic(void) struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) { - int unit = MKDEV(major, minor); + dev_t dev = MKDEV(major, minor); struct cdev *cdev; dev_lock(); LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { struct linux_cdev *ldev = cdev->si_drv1; - if (dev2unit(cdev) == unit && + if (ldev->dev == dev && strcmp(kobject_name(&ldev->kobj), name) == 0) { break; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321927 - stable/11/usr.sbin/diskinfo
Author: mav Date: Wed Aug 2 14:43:12 2017 New Revision: 321927 URL: https://svnweb.freebsd.org/changeset/base/321927 Log: MFC r320555, r320576 (by allanjude): Add -s (serial) and -p (physpath) to diskinfo Return the bare requested information, intended for scripting. The serial number of a SAS/SCSI device can be returned with 'camcontrol inquiry disk -S', but there is no similar switch for SATA. This provides a way to get this information from both SAS and SATA disks the -s and -p flags are mutually exclusive, and cannot be used with any other flags. Modified: stable/11/usr.sbin/diskinfo/diskinfo.8 stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/diskinfo/diskinfo.8 == --- stable/11/usr.sbin/diskinfo/diskinfo.8 Wed Aug 2 14:27:27 2017 (r321926) +++ stable/11/usr.sbin/diskinfo/diskinfo.8 Wed Aug 2 14:43:12 2017 (r321927) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd July 1, 2017 .Dt DISKINFO 8 .Os .Sh NAME @@ -38,6 +38,12 @@ .Nm .Op Fl citv .Ar disk ... +.Nm +.Op Fl p +.Ar disk ... +.Nm +.Op Fl s +.Ar disk ... .Sh DESCRIPTION The .Nm @@ -52,6 +58,12 @@ Print fields one per line with a descriptive comment. Perform a simple measurement of the I/O read command overhead. .It Fl i Perform a simple IOPS benchmark. +.It Fl p +Return the physical path of the disk. +This is a string that identifies the physical path to the disk in the +storage enclosure. +.It Fl s +Return the disk serial number .It Fl t Perform a simple and rather naive benchmark of the disks seek and transfer performance. @@ -62,6 +74,13 @@ with the following fields: device name, sectorsize, me media size in sectors, stripe size, stripe offset, firmware cylinders, firmware heads, and firmware sectors. The last three fields are only present if the information is available. +.It Fl i +Return the disk ident, usually the serial number. +.It Fl p +Return the physical path of the disk. +This is a string that identifies the physical path to the disk in the +storage enclosure. +.El .Sh HISTORY The .Nm Modified: stable/11/usr.sbin/diskinfo/diskinfo.c == --- stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:27:27 2017 (r321926) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:43:12 2017 (r321927) @@ -55,7 +55,7 @@ usage(void) exit (1); } -static int opt_c, opt_i, opt_t, opt_v; +static int opt_c, opt_i, opt_p, opt_s, opt_t, opt_v; static void speeddisk(int fd, off_t mediasize, u_int sectorsize); static void commandtime(int fd, off_t mediasize, u_int sectorsize); @@ -74,7 +74,7 @@ main(int argc, char **argv) u_int sectorsize, fwsectors, fwheads, zoned = 0; uint32_t zone_mode; - while ((ch = getopt(argc, argv, "citv")) != -1) { + while ((ch = getopt(argc, argv, "cipstv")) != -1) { switch (ch) { case 'c': opt_c = 1; @@ -84,6 +84,12 @@ main(int argc, char **argv) opt_i = 1; opt_v = 1; break; + case 'p': + opt_p = 1; + break; + case 's': + opt_s = 1; + break; case 't': opt_t = 1; opt_v = 1; @@ -101,6 +107,11 @@ main(int argc, char **argv) if (argc < 1) usage(); + if ((opt_p && opt_s) || ((opt_p || opt_s) && (opt_c || opt_i || opt_t || opt_v))) { + warnx("-p or -s cannot be used with other options"); + usage(); + } + for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { @@ -124,7 +135,27 @@ main(int argc, char **argv) fwheads = 0; stripesize = sb.st_blksize; stripeoffset = 0; + if (opt_p || opt_s) { + warnx("-p and -s only operate on physical devices: %s", argv[i]); + goto out; + } } else { + if (opt_p) { + if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) { + printf("%s\n", physpath); + } else { + warnx("Failed to determine physpath for: %s", argv[i]); + } + goto out; + } + if (opt_s) { + if (ioctl(fd, DIOC
svn commit: r321928 - stable/11/usr.sbin/diskinfo
Author: mav Date: Wed Aug 2 14:45:22 2017 New Revision: 321928 URL: https://svnweb.freebsd.org/changeset/base/321928 Log: MFC r320683: Add naive benchmark for SSDs in ZFS SLOG role. ZFS SLOGs have very specific access pattern with many cache flushes, which none of benchmarks I know can simulate. Since SSD vendors rarely specify cache flush time, this measurement can be useful to explain why some ZFS pools are slower then expected. This test writes data chunks of different size followed by cache flush, alike to what ZFS SLOG does, and measures average time. To illustrate, here is result for 6 years old SATA Intel 710 Series SSD: Synchronous random writes: 0.5 kbytes:138.3 usec/IO = 3.5 Mbytes/s 1 kbytes:137.7 usec/IO = 7.1 Mbytes/s 2 kbytes:151.1 usec/IO = 12.9 Mbytes/s 4 kbytes:158.2 usec/IO = 24.7 Mbytes/s 8 kbytes:175.6 usec/IO = 44.5 Mbytes/s 16 kbytes:210.1 usec/IO = 74.4 Mbytes/s 32 kbytes:274.2 usec/IO =114.0 Mbytes/s 64 kbytes:416.5 usec/IO =150.1 Mbytes/s 128 kbytes:776.6 usec/IO =161.0 Mbytes/s 256 kbytes: 1503.1 usec/IO =166.3 Mbytes/s 512 kbytes: 2968.7 usec/IO =168.4 Mbytes/s 1024 kbytes: 5866.8 usec/IO =170.5 Mbytes/s 2048 kbytes: 11696.6 usec/IO =171.0 Mbytes/s 4096 kbytes: 23329.6 usec/IO =171.5 Mbytes/s 8192 kbytes: 46779.5 usec/IO =171.0 Mbytes/s , and much newer and supposedly much faster NVMe Samsung 950 PRO SSD: Synchronous random writes: 0.5 kbytes: 2092.9 usec/IO = 0.2 Mbytes/s 1 kbytes: 2013.1 usec/IO = 0.5 Mbytes/s 2 kbytes: 2014.8 usec/IO = 1.0 Mbytes/s 4 kbytes: 2090.7 usec/IO = 1.9 Mbytes/s 8 kbytes: 2044.5 usec/IO = 3.8 Mbytes/s 16 kbytes: 2084.8 usec/IO = 7.5 Mbytes/s 32 kbytes: 2137.1 usec/IO = 14.6 Mbytes/s 64 kbytes: 2173.4 usec/IO = 28.8 Mbytes/s 128 kbytes: 2923.9 usec/IO = 42.8 Mbytes/s 256 kbytes: 3085.3 usec/IO = 81.0 Mbytes/s 512 kbytes: 3112.2 usec/IO =160.7 Mbytes/s 1024 kbytes: 2430.6 usec/IO =411.4 Mbytes/s 2048 kbytes: 3788.9 usec/IO =527.9 Mbytes/s 4096 kbytes: 6198.0 usec/IO =645.4 Mbytes/s 8192 kbytes: 10764.9 usec/IO =743.2 Mbytes/s While the first one obviously has maximal throughput limitations, the second one has so high cache flush latency (about 2 millisecond), that it makes one almost useless in SLOG role, despite of its good throughput numbers. Power loss protection is out of scope of this test, but I suspect it can be related. Modified: stable/11/usr.sbin/diskinfo/diskinfo.8 stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/diskinfo/diskinfo.8 == --- stable/11/usr.sbin/diskinfo/diskinfo.8 Wed Aug 2 14:43:12 2017 (r321927) +++ stable/11/usr.sbin/diskinfo/diskinfo.8 Wed Aug 2 14:45:22 2017 (r321928) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Poul-Henning Kamp +.\" Copyright (c) 2017 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -28,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2017 +.Dd July 4, 2017 .Dt DISKINFO 8 .Os .Sh NAME @@ -36,7 +37,7 @@ .Nd get information about disk device .Sh SYNOPSIS .Nm -.Op Fl citv +.Op Fl citSvw .Ar disk ... .Nm .Op Fl p @@ -64,9 +65,16 @@ This is a string that identifies the physical path to storage enclosure. .It Fl s Return the disk serial number +.It Fl S +Perform synchronous random write test (ZFS SLOG test), +measuring time required to write data blocks of different size and +flush disk cache. +Blocks of more then 128KB are written with multiple parallel operations. .It Fl t Perform a simple and rather naive benchmark of the disks seek and transfer performance. +.It Fl w +Allow disruptive write tests. .El .Pp If given no arguments, the output will be a single line per specified device Modified: stable/11/usr.sbin/diskinfo/diskinfo.c == --- stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:43:12 2017 (r321927) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:45:22 2017 (r321928) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003 Poul-Henning Kamp * Copyright (c) 2015 Spectra Logic Corporation + * Copyright (c) 2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +41,7 @
svn commit: r321929 - stable/11/usr.sbin/diskinfo
Author: mav Date: Wed Aug 2 14:45:58 2017 New Revision: 321929 URL: https://svnweb.freebsd.org/changeset/base/321929 Log: MFC r320730: Report device descr in addition to ident. Serial number without device model is somewhat less useful. Modified: stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/diskinfo/diskinfo.c == --- stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:45:22 2017 (r321928) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Wed Aug 2 14:45:58 2017 (r321929) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -73,6 +74,7 @@ main(int argc, char **argv) int i, ch, fd, error, exitval = 0; char buf[BUFSIZ], ident[DISK_IDENT_SIZE], physpath[MAXPATHLEN]; char zone_desc[64]; + struct diocgattr_arg arg; off_t mediasize, stripesize, stripeoffset; u_int sectorsize, fwsectors, fwheads, zoned = 0, isreg; uint32_t zone_mode; @@ -230,6 +232,10 @@ main(int argc, char **argv) printf("\t%-12u\t# Heads according to firmware.\n", fwheads); printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors); } + strlcpy(arg.name, "GEOM::descr", sizeof(arg.name)); + arg.len = sizeof(arg.value.str); + if (ioctl(fd, DIOCGATTR, &arg) == 0) + printf("\t%-12s\t# Disk descr.\n", arg.value.str); if (ioctl(fd, DIOCGIDENT, ident) == 0) printf("\t%-12s\t# Disk ident.\n", ident); if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321930 - head/sys/sys
Author: kib Date: Wed Aug 2 14:54:54 2017 New Revision: 321930 URL: https://svnweb.freebsd.org/changeset/base/321930 Log: For makedev(), cast the minor argument to unsigned type explicitely, avoiding possible sign propagation. Submitted by: hselasky Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h == --- head/sys/sys/types.hWed Aug 2 14:45:58 2017(r321929) +++ head/sys/sys/types.hWed Aug 2 14:54:54 2017(r321930) @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #definemajor(x)((int)((dev_t)(x) >> 32)) /* major number */ #defineminor(x)((int)((x) & 0x)) /* minor number */ -#definemakedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321931 - stable/11/sys/dev/ichsmb
Author: gavin Date: Wed Aug 2 15:11:06 2017 New Revision: 321931 URL: https://svnweb.freebsd.org/changeset/base/321931 Log: Merge r316113,316184,316413 from head: - Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091 - Switch device_probe() from large case statement to a lookup table - Add several missing SMBus controllers Modified: stable/11/sys/dev/ichsmb/ichsmb_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichsmb/ichsmb_pci.c == --- stable/11/sys/dev/ichsmb/ichsmb_pci.c Wed Aug 2 14:54:54 2017 (r321930) +++ stable/11/sys/dev/ichsmb/ichsmb_pci.c Wed Aug 2 15:11:06 2017 (r321931) @@ -67,35 +67,89 @@ __FBSDID("$FreeBSD$"); #include /* PCI unique identifiers */ -#define ID_82801AA 0x24138086 -#define ID_82801AB 0x24238086 -#define ID_82801BA 0x24438086 -#define ID_82801CA 0x24838086 -#define ID_82801DC 0x24C38086 -#define ID_82801EB 0x24D38086 -#define ID_82801FB 0x266A8086 -#define ID_82801GB 0x27da8086 -#define ID_82801H 0x283e8086 -#define ID_82801I 0x29308086 -#define ID_82801JI 0x3a308086 -#define ID_PCH 0x3b308086 -#define ID_6300ESB 0x25a48086 -#defineID_631xESB 0x269b8086 -#define ID_DH89XXCC0x23308086 -#define ID_PATSBURG0x1d228086 -#define ID_CPT 0x1c228086 -#define ID_PPT 0x1e228086 -#define ID_AVOTON 0x1f3c8086 -#define ID_COLETOCRK 0x23B08086 -#define ID_LPT 0x8c228086 -#define ID_LPTLP 0x9c228086 -#define ID_WCPT0x8ca28086 -#define ID_WCPTLP 0x9ca28086 -#defineID_WELLSBURG0x8d228086 -#defineID_SRPT 0xa1238086 -#defineID_SRPTLP 0x9d238086 +#definePCI_VENDOR_INTEL0x8086 +#defineID_82801AA 0x2413 +#defineID_82801AB 0x2423 +#defineID_82801BA 0x2443 +#defineID_82801CA 0x2483 +#defineID_82801DC 0x24C3 +#defineID_82801EB 0x24D3 +#defineID_82801FB 0x266A +#defineID_82801GB 0x27da +#defineID_82801H 0x283e +#defineID_82801I 0x2930 +#defineID_EP80579 0x5032 +#defineID_82801JI 0x3a30 +#defineID_82801JD 0x3a60 +#defineID_PCH 0x3b30 +#defineID_6300ESB 0x25a4 +#defineID_631xESB 0x269b +#defineID_DH89XXCC 0x2330 +#defineID_PATSBURG 0x1d22 +#defineID_CPT 0x1c22 +#defineID_PPT 0x1e22 +#defineID_AVOTON 0x1f3c +#defineID_COLETOCRK0x23B0 +#defineID_LPT 0x8c22 +#defineID_LPTLP0x9c22 +#defineID_WCPT 0x8ca2 +#defineID_WCPTLP 0x9ca2 +#defineID_BAYTRAIL 0x0f12 +#defineID_BRASWELL 0x2292 +#defineID_WELLSBURG0x8d22 +#defineID_SRPT 0xa123 +#defineID_SRPTLP 0x9d23 +#defineID_DENVERTON0x19df +#defineID_BROXTON 0x5ad4 +#defineID_LEWISBURG0xa1a3 +#defineID_LEWISBURG2 0xa223 +#defineID_KABYLAKE 0xa2a3 -#define PCIS_SERIALBUS_SMBUS_PROGIF0x00 +static const struct ichsmb_device { + uint16_tid; + const char *name; +} ichsmb_devices[] = { + { ID_82801AA, "Intel 82801AA (ICH) SMBus controller" }, + { ID_82801AB, "Intel 82801AB (ICH0) SMBus controller" }, + { ID_82801BA, "Intel 82801BA (ICH2) SMBus controller" }, + { ID_82801CA, "Intel 82801CA (ICH3) SMBus controller" }, + { ID_82801DC, "Intel 82801DC (ICH4) SMBus controller" }, + { ID_82801EB, "Intel 82801EB (ICH5) SMBus controller" }, + { ID_82801FB, "Intel 82801FB (ICH6) SMBus controller" }, +
svn commit: r321932 - stable/10/sys/dev/ichsmb
Author: gavin Date: Wed Aug 2 15:13:13 2017 New Revision: 321932 URL: https://svnweb.freebsd.org/changeset/base/321932 Log: Merge r316113,316184,316413 from head: - Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091 - Switch device_probe() from large case statement to a lookup table - Add several missing SMBus controllers Modified: stable/10/sys/dev/ichsmb/ichsmb_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ichsmb/ichsmb_pci.c == --- stable/10/sys/dev/ichsmb/ichsmb_pci.c Wed Aug 2 15:11:06 2017 (r321931) +++ stable/10/sys/dev/ichsmb/ichsmb_pci.c Wed Aug 2 15:13:13 2017 (r321932) @@ -67,35 +67,89 @@ __FBSDID("$FreeBSD$"); #include /* PCI unique identifiers */ -#define ID_82801AA 0x24138086 -#define ID_82801AB 0x24238086 -#define ID_82801BA 0x24438086 -#define ID_82801CA 0x24838086 -#define ID_82801DC 0x24C38086 -#define ID_82801EB 0x24D38086 -#define ID_82801FB 0x266A8086 -#define ID_82801GB 0x27da8086 -#define ID_82801H 0x283e8086 -#define ID_82801I 0x29308086 -#define ID_82801JI 0x3a308086 -#define ID_PCH 0x3b308086 -#define ID_6300ESB 0x25a48086 -#defineID_631xESB 0x269b8086 -#define ID_DH89XXCC0x23308086 -#define ID_PATSBURG0x1d228086 -#define ID_CPT 0x1c228086 -#define ID_PPT 0x1e228086 -#define ID_AVOTON 0x1f3c8086 -#define ID_COLETOCRK 0x23B08086 -#define ID_LPT 0x8c228086 -#define ID_LPTLP 0x9c228086 -#define ID_WCPT0x8ca28086 -#define ID_WCPTLP 0x9ca28086 -#defineID_WELLSBURG0x8d228086 -#defineID_SRPT 0xa1238086 -#defineID_SRPTLP 0x9d238086 +#definePCI_VENDOR_INTEL0x8086 +#defineID_82801AA 0x2413 +#defineID_82801AB 0x2423 +#defineID_82801BA 0x2443 +#defineID_82801CA 0x2483 +#defineID_82801DC 0x24C3 +#defineID_82801EB 0x24D3 +#defineID_82801FB 0x266A +#defineID_82801GB 0x27da +#defineID_82801H 0x283e +#defineID_82801I 0x2930 +#defineID_EP80579 0x5032 +#defineID_82801JI 0x3a30 +#defineID_82801JD 0x3a60 +#defineID_PCH 0x3b30 +#defineID_6300ESB 0x25a4 +#defineID_631xESB 0x269b +#defineID_DH89XXCC 0x2330 +#defineID_PATSBURG 0x1d22 +#defineID_CPT 0x1c22 +#defineID_PPT 0x1e22 +#defineID_AVOTON 0x1f3c +#defineID_COLETOCRK0x23B0 +#defineID_LPT 0x8c22 +#defineID_LPTLP0x9c22 +#defineID_WCPT 0x8ca2 +#defineID_WCPTLP 0x9ca2 +#defineID_BAYTRAIL 0x0f12 +#defineID_BRASWELL 0x2292 +#defineID_WELLSBURG0x8d22 +#defineID_SRPT 0xa123 +#defineID_SRPTLP 0x9d23 +#defineID_DENVERTON0x19df +#defineID_BROXTON 0x5ad4 +#defineID_LEWISBURG0xa1a3 +#defineID_LEWISBURG2 0xa223 +#defineID_KABYLAKE 0xa2a3 -#define PCIS_SERIALBUS_SMBUS_PROGIF0x00 +static const struct ichsmb_device { + uint16_tid; + const char *name; +} ichsmb_devices[] = { + { ID_82801AA, "Intel 82801AA (ICH) SMBus controller" }, + { ID_82801AB, "Intel 82801AB (ICH0) SMBus controller" }, + { ID_82801BA, "Intel 82801BA (ICH2) SMBus controller" }, + { ID_82801CA, "Intel 82801CA (ICH3) SMBus controller" }, + { ID_82801DC, "Intel 82801DC (ICH4) SMBus controller" }, + { ID_82801EB, "Intel 82801EB (ICH5) SMBus controller" }, + { ID_82801FB, "Intel 82801FB (ICH6) SMBus controller" }, +
svn commit: r321933 - head/sys/arm/freescale/imx
Author: ian Date: Wed Aug 2 15:15:18 2017 New Revision: 321933 URL: https://svnweb.freebsd.org/changeset/base/321933 Log: The imx6_snvs driver is not strictly required for the system to run, so change it from standard to optional and add a device statement for it so that it's included unless someone uses nodevice to eliminate it. Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/std.imx6 Modified: head/sys/arm/freescale/imx/files.imx6 == --- head/sys/arm/freescale/imx/files.imx6 Wed Aug 2 15:13:13 2017 (r321932) +++ head/sys/arm/freescale/imx/files.imx6 Wed Aug 2 15:15:18 2017 (r321933) @@ -14,7 +14,7 @@ arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.coptional smp arm/freescale/imx/imx6_pl310.c standard -arm/freescale/imx/imx6_snvs.c standard +arm/freescale/imx/imx6_snvs.c optional imx6_snvs arm/freescale/imx/imx6_src.c standard arm/freescale/imx/imx_epit.c standard arm/freescale/imx/imx_iomux.c standard Modified: head/sys/arm/freescale/imx/std.imx6 == --- head/sys/arm/freescale/imx/std.imx6 Wed Aug 2 15:13:13 2017 (r321932) +++ head/sys/arm/freescale/imx/std.imx6 Wed Aug 2 15:15:18 2017 (r321933) @@ -9,7 +9,8 @@ makeoptions KERNVIRTADDR= 0xc200 optionsIPI_IRQ_START=0 optionsIPI_IRQ_END=15 -device fdt_pinctrl +device fdt_pinctrl +device imx6_snvs files "../freescale/imx/files.imx6" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321934 - in head/sys/modules/i2c: ds1307 ds3231 isl12xx
Author: ian Date: Wed Aug 2 15:16:40 2017 New Revision: 321934 URL: https://svnweb.freebsd.org/changeset/base/321934 Log: Add missing ofw_bus_if.h src file. Modified: head/sys/modules/i2c/ds1307/Makefile head/sys/modules/i2c/ds3231/Makefile head/sys/modules/i2c/isl12xx/Makefile Modified: head/sys/modules/i2c/ds1307/Makefile == --- head/sys/modules/i2c/ds1307/MakefileWed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/ds1307/MakefileWed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds1307 -SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include Modified: head/sys/modules/i2c/ds3231/Makefile == --- head/sys/modules/i2c/ds3231/MakefileWed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/ds3231/MakefileWed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds3231 -SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include Modified: head/sys/modules/i2c/isl12xx/Makefile == --- head/sys/modules/i2c/isl12xx/Makefile Wed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/isl12xx/Makefile Wed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = isl12xx -SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321935 - svnadmin/conf
Author: hselasky Date: Wed Aug 2 15:59:02 2017 New Revision: 321935 URL: https://svnweb.freebsd.org/changeset/base/321935 Log: Add myself to import new OFED user-space into projects/bsd_rdma_4_9. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf == --- svnadmin/conf/sizelimit.confWed Aug 2 15:16:40 2017 (r321934) +++ svnadmin/conf/sizelimit.confWed Aug 2 15:59:02 2017 (r321935) @@ -19,6 +19,7 @@ bapt brooks davidcs dim +hselasky 200 imp jb jeff ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321937 - svnadmin/conf
Author: hselasky Date: Wed Aug 2 16:01:52 2017 New Revision: 321937 URL: https://svnweb.freebsd.org/changeset/base/321937 Log: Remove myself. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf == --- svnadmin/conf/sizelimit.confWed Aug 2 16:00:30 2017 (r321936) +++ svnadmin/conf/sizelimit.confWed Aug 2 16:01:52 2017 (r321937) @@ -19,7 +19,6 @@ bapt brooks davidcs dim -hselasky 200 imp jb jeff ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321938 - head/sys/arm/freescale/imx
Author: ian Date: Wed Aug 2 18:28:06 2017 New Revision: 321938 URL: https://svnweb.freebsd.org/changeset/base/321938 Log: Fix the interface to imx_iomux_gpr_get/set(). The functions were defined as taking a register number, and that would get multiplied by 4 to make a register address. But the header file that consumers have to reference this stuff publishes register addresses, not numbers. So now everything works in terms of register addresses. Note that the HDMI init code was writing into the wrong register before this change. Apparently whatever it wrote to was harmless, and apparently HDMI was working because uboot had set up the right bits. Modified: head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm/freescale/imx/imx_iomuxvar.h Modified: head/sys/arm/freescale/imx/imx_iomux.c == --- head/sys/arm/freescale/imx/imx_iomux.c Wed Aug 2 16:01:52 2017 (r321937) +++ head/sys/arm/freescale/imx/imx_iomux.c Wed Aug 2 18:28:06 2017 (r321938) @@ -70,7 +70,7 @@ struct iomux_softc { device_tdev; struct resource *mem_res; - u_int last_gpreg; + u_int last_gpregaddr; }; static struct iomux_softc *iomux_sc; @@ -213,19 +213,19 @@ iomux_attach(device_t dev) switch (imx_soc_type()) { case IMXSOC_51: - sc->last_gpreg = 1; + sc->last_gpregaddr = 1 * sizeof(uint32_t); break; case IMXSOC_53: - sc->last_gpreg = 2; + sc->last_gpregaddr = 2 * sizeof(uint32_t); break; case IMXSOC_6DL: case IMXSOC_6S: case IMXSOC_6SL: case IMXSOC_6Q: - sc->last_gpreg = 13; + sc->last_gpregaddr = 13 * sizeof(uint32_t); break; case IMXSOC_6UL: - sc->last_gpreg = 14; + sc->last_gpregaddr = 14 * sizeof(uint32_t); break; default: device_printf(dev, "Unknown SoC type\n"); @@ -261,45 +261,48 @@ iomux_attach(device_t dev) } uint32_t -imx_iomux_gpr_get(u_int regnum) +imx_iomux_gpr_get(u_int regaddr) { struct iomux_softc * sc; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - return (RD4(iomux_sc, regnum * 4)); + return (RD4(iomux_sc, regaddr)); } void -imx_iomux_gpr_set(u_int regnum, uint32_t val) +imx_iomux_gpr_set(u_int regaddr, uint32_t val) { struct iomux_softc * sc; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - WR4(iomux_sc, regnum * 4, val); + WR4(iomux_sc, regaddr, val); } void -imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits) +imx_iomux_gpr_set_masked(u_int regaddr, uint32_t clrbits, uint32_t setbits) { struct iomux_softc * sc; uint32_t val; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - val = RD4(iomux_sc, regnum * 4); + val = RD4(iomux_sc, regaddr * 4); val = (val & ~clrbits) | setbits; - WR4(iomux_sc, regnum * 4, val); + WR4(iomux_sc, regaddr, val); } static device_method_t imx_iomux_methods[] = { Modified: head/sys/arm/freescale/imx/imx_iomuxvar.h == --- head/sys/arm/freescale/imx/imx_iomuxvar.h Wed Aug 2 16:01:52 2017 (r321937) +++ head/sys/arm/freescale/imx/imx_iomuxvar.h Wed Aug 2 18:28:06 2017 (r321938) @@ -42,8 +42,8 @@ u_intiomux_get_pad_config(u_int pin); * with IO pin assignments or pad control. These functions let other soc level * code manipulate these values. */ -uint32_t imx_iomux_gpr_get(u_int regnum); -void imx_iomux_gpr_set(u_int regnum, uint32_t val); -void imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits); +uint32_t imx_iomux_gpr_get(u_int regaddr); +void
svn commit: r321939 - head/usr.bin/calendar/calendars
Author: rstone Date: Wed Aug 2 19:45:09 2017 New Revision: 321939 URL: https://svnweb.freebsd.org/changeset/base/321939 Log: Add my birthdate to the calendar Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdWed Aug 2 18:28:06 2017(r321938) +++ head/usr.bin/calendar/calendars/calendar.freebsdWed Aug 2 19:45:09 2017(r321939) @@ -374,6 +374,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 10/31 Taras Korenko born in Cherkasy region, Ukraine, 1980 +11/03 Ryan Stone born in Ottawa, Ontario, Canada, 1985 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321941 - head/sys/arm/allwinner/clk
Author: manu Date: Wed Aug 2 20:17:04 2017 New Revision: 321941 URL: https://svnweb.freebsd.org/changeset/base/321941 Log: allwiner: modclk: Do not try to enable parent clock if it doesn't exist Modified: head/sys/arm/allwinner/clk/aw_modclk.c Modified: head/sys/arm/allwinner/clk/aw_modclk.c == --- head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 19:53:43 2017 (r321940) +++ head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 20:17:04 2017 (r321941) @@ -89,7 +89,10 @@ aw_modclk_init(struct clknode *clk, device_t dev) index = (val & CLK_SRC_SEL) >> CLK_SRC_SEL_SHIFT; - clknode_init_parent_idx(clk, index); + if (index <= clknode_get_parents_num(clk)) + clknode_init_parent_idx(clk, index); + else + clknode_init_parent_idx(clk, 0); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321942 - in head/sys: arm/allwinner arm/allwinner/clkng arm64/conf conf
Author: manu Date: Wed Aug 2 20:19:19 2017 New Revision: 321942 URL: https://svnweb.freebsd.org/changeset/base/321942 Log: arm64: Add Allwinner H5 SoC Allwinner H5 is an H3 (arm32) with Cortex A53 cores. Add support for it and enable it in GENERIC kernel config Tested on: OrangePi PC2 Modified: head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/clkng/aw_ccung.c head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/conf/options.arm64 Modified: head/sys/arm/allwinner/aw_ccu.c == --- head/sys/arm/allwinner/aw_ccu.c Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/arm/allwinner/aw_ccu.c Wed Aug 2 20:19:19 2017 (r321942) @@ -80,6 +80,7 @@ static struct ofw_compat_data compat_data[] = { { "allwinner,sun6i-a31",CLOCK_CCU }, { "allwinner,sun6i-a31s", CLOCK_CCU }, { "allwinner,sun50i-a64", CLOCK_CCU }, + { "allwinner,sun50i-h5",CLOCK_CCU }, { "allwinner,sun8i-a33",CLOCK_CCU }, { "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL }, { "allwinner,sun8i-h2-plus",CLOCK_CCU|CLOCK_PRCM }, Modified: head/sys/arm/allwinner/clkng/aw_ccung.c == --- head/sys/arm/allwinner/clkng/aw_ccung.c Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Wed Aug 2 20:19:19 2017 (r321942) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) #include #endif @@ -78,7 +78,7 @@ static struct resource_spec aw_ccung_spec[] = { { -1, 0 } }; -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) #defineH3_CCU 1 #endif @@ -91,7 +91,7 @@ static struct resource_spec aw_ccung_spec[] = { #endif static struct ofw_compat_data compat_data[] = { -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) { "allwinner,sun8i-h3-ccu", H3_CCU }, #endif #if defined(SOC_ALLWINNER_A31) @@ -316,7 +316,7 @@ aw_ccung_attach(device_t dev) panic("Cannot create clkdom\n"); switch (sc->type) { -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) case H3_CCU: ccu_h3_register_clocks(sc); break; Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Wed Aug 2 20:17:04 2017(r321941) +++ head/sys/arm64/conf/GENERIC Wed Aug 2 20:19:19 2017(r321942) @@ -89,6 +89,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) # SoC support optionsSOC_ALLWINNER_A64 +optionsSOC_ALLWINNER_H5 optionsSOC_CAVM_THUNDERX optionsSOC_HISI_HI6220 optionsSOC_BRCM_BCM2837 Modified: head/sys/conf/files.arm64 == --- head/sys/conf/files.arm64 Wed Aug 2 20:17:04 2017(r321941) +++ head/sys/conf/files.arm64 Wed Aug 2 20:19:19 2017(r321942) @@ -42,6 +42,7 @@ arm/allwinner/clkng/aw_clk_nkmp.c optionalaw_ccu fdt arm/allwinner/clkng/aw_clk_nm.coptionalaw_ccu fdt arm/allwinner/clkng/aw_clk_prediv_mux.coptionalaw_ccu fdt arm/allwinner/clkng/ccu_a64.c optionalaw_ccu fdt +arm/allwinner/clkng/ccu_h3.c optionalaw_ccu fdt arm/allwinner/if_awg.c optionalawg fdt arm/annapurna/alpine/alpine_ccu.c optionalal_ccu fdt Modified: head/sys/conf/options.arm64 == --- head/sys/conf/options.arm64 Wed Aug 2 20:17:04 2017(r321941) +++ head/sys/conf/options.arm64 Wed Aug 2 20:19:19 2017(r321942) @@ -11,6 +11,7 @@ DEV_PSCI opt_platform.h # SoC Support SOC_ALLWINNER_A64 opt_soc.h +SOC_ALLWINNER_H5 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220opt_soc.h ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321945 - stable/10/sys/dev/isp
Author: ken Date: Wed Aug 2 20:24:28 2017 New Revision: 321945 URL: https://svnweb.freebsd.org/changeset/base/321945 Log: MFC r321622, r321623: r321622 | ken | 2017-07-27 09:33:57 -0600 (Thu, 27 Jul 2017) | 44 lines Fix probing FC targets with hard addressing turned on. This largely reverts FreeBSD SVN change 289937 from October 25th, 2015. The intent of that change was to keep loop IDs persistent across chip reinits. The problem is that the change turned on the PREVLOOP / PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the Qlogic chip to not participate in the loop if it can't get the requested loop address. It also turned off soft addressing on 2400 (4Gb) and newer controllers. The isp(4) driver defaults to loop address 0, and the tape drives I have tested default to loop address 0 if hard addressing is turned on. So when hard loop addressing is turned on on the drive, the isp(4) driver just refuses to participate in the loop. The solution is to largely revert that change. I left some elements in place that are related to virtual ports, since they were new. This does work with IBM tape drives with hard and soft addressing turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers. sys/dev/isp.c: Largely revert FreeBSD SVN change 289937. I left the ispmbox.h changes in place. Don't use the PREV_ADDRESS bit on initialization. It tells the chip to not participate if it can't get the requested loop ID. Do use soft addressing on 2400 and newer chips. Use hard addressing when the user has requested a specific initiator ID. (hint.isp.X.iid=N in /boot/loader.conf) Leave some of the virtual port options from that change in place, but don't turn on the PREV_ADDRESS bit. Reviewed by:mav Sponsored by: Spectra Logic r321623 | ken | 2017-07-27 09:51:56 -0600 (Thu, 27 Jul 2017) | 6 lines Remove duplicate assignments from r321622. Submitted by: mav Sponsored by: Spectra Logic Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c == --- stable/10/sys/dev/isp/isp.c Wed Aug 2 20:24:26 2017(r321944) +++ stable/10/sys/dev/isp/isp.c Wed Aug 2 20:24:28 2017(r321945) @@ -1632,6 +1632,7 @@ isp_fibre_init(ispsoftc_t *isp) fcparam *fcp; isp_icb_t local, *icbp = &local; mbreg_t mbs; + int ownloopid; /* * We only support one channel on non-24XX cards @@ -1710,15 +1711,22 @@ isp_fibre_init(ispsoftc_t *isp) } icbp->icb_retry_delay = fcp->isp_retry_delay; icbp->icb_retry_count = fcp->isp_retry_count; - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; - else - icbp->icb_fwoptions |= ICBOPT_PREV_ADDRESS; + icbp->icb_hardaddr = fcp->isp_loopid; + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) { + icbp->icb_hardaddr = 0; + ownloopid = 0; } /* +* Our life seems so much better with 2200s and later with +* the latest f/w if we set Hard Address. +*/ + if (ownloopid || ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { + icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; + } + + /* * Right now we just set extended options to prefer point-to-point * over loop based upon some soft config options. * @@ -1952,6 +1960,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) isp_icb_2400_t local, *icbp = &local; mbreg_t mbs; int chan; + int ownloopid = 0; /* * Check to see whether all channels have *some* kind of role @@ -2024,14 +2033,17 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_xchgcnt >>= 1; } - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; - else - icbp->icb_fwoptions1 |= ICB2400_OPT1_PREV_ADDRESS; + + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + icbp->icb_hardaddr = fcp->isp_loopid; +
svn commit: r321944 - stable/11/sys/dev/isp
Author: ken Date: Wed Aug 2 20:24:26 2017 New Revision: 321944 URL: https://svnweb.freebsd.org/changeset/base/321944 Log: MFC r321622, r321623: r321622 | ken | 2017-07-27 09:33:57 -0600 (Thu, 27 Jul 2017) | 44 lines Fix probing FC targets with hard addressing turned on. This largely reverts FreeBSD SVN change 289937 from October 25th, 2015. The intent of that change was to keep loop IDs persistent across chip reinits. The problem is that the change turned on the PREVLOOP / PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the Qlogic chip to not participate in the loop if it can't get the requested loop address. It also turned off soft addressing on 2400 (4Gb) and newer controllers. The isp(4) driver defaults to loop address 0, and the tape drives I have tested default to loop address 0 if hard addressing is turned on. So when hard loop addressing is turned on on the drive, the isp(4) driver just refuses to participate in the loop. The solution is to largely revert that change. I left some elements in place that are related to virtual ports, since they were new. This does work with IBM tape drives with hard and soft addressing turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers. sys/dev/isp.c: Largely revert FreeBSD SVN change 289937. I left the ispmbox.h changes in place. Don't use the PREV_ADDRESS bit on initialization. It tells the chip to not participate if it can't get the requested loop ID. Do use soft addressing on 2400 and newer chips. Use hard addressing when the user has requested a specific initiator ID. (hint.isp.X.iid=N in /boot/loader.conf) Leave some of the virtual port options from that change in place, but don't turn on the PREV_ADDRESS bit. Reviewed by:mav Sponsored by: Spectra Logic r321623 | ken | 2017-07-27 09:51:56 -0600 (Thu, 27 Jul 2017) | 6 lines Remove duplicate assignments from r321622. Submitted by: mav Sponsored by: Spectra Logic Modified: stable/11/sys/dev/isp/isp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/isp/isp.c == --- stable/11/sys/dev/isp/isp.c Wed Aug 2 20:23:25 2017(r321943) +++ stable/11/sys/dev/isp/isp.c Wed Aug 2 20:24:26 2017(r321944) @@ -1631,6 +1631,7 @@ isp_fibre_init(ispsoftc_t *isp) fcparam *fcp; isp_icb_t local, *icbp = &local; mbreg_t mbs; + int ownloopid; /* * We only support one channel on non-24XX cards @@ -1709,15 +1710,22 @@ isp_fibre_init(ispsoftc_t *isp) } icbp->icb_retry_delay = fcp->isp_retry_delay; icbp->icb_retry_count = fcp->isp_retry_count; - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; - else - icbp->icb_fwoptions |= ICBOPT_PREV_ADDRESS; + icbp->icb_hardaddr = fcp->isp_loopid; + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) { + icbp->icb_hardaddr = 0; + ownloopid = 0; } /* +* Our life seems so much better with 2200s and later with +* the latest f/w if we set Hard Address. +*/ + if (ownloopid || ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { + icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; + } + + /* * Right now we just set extended options to prefer point-to-point * over loop based upon some soft config options. * @@ -1951,6 +1959,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) isp_icb_2400_t local, *icbp = &local; mbreg_t mbs; int chan; + int ownloopid = 0; /* * Check to see whether all channels have *some* kind of role @@ -2023,14 +2032,17 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_xchgcnt >>= 1; } - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; - else - icbp->icb_fwoptions1 |= ICB2400_OPT1_PREV_ADDRESS; + + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + icbp->icb_hardaddr = fcp->isp_loopid; +
svn commit: r321946 - in stable/10/sys: arm/freescale/imx conf powerpc/mpc85xx
Author: marius Date: Wed Aug 2 20:27:30 2017 New Revision: 321946 URL: https://svnweb.freebsd.org/changeset/base/321946 Log: Apply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that somehow stayed local when committing r318198, probably due to the associated tree conflicts. While at it, register the dependency of sdhci_fsl(4) on sdhci(4) and allow the former to be built. Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c stable/10/sys/powerpc/mpc85xx/fsl_sdhc.h Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c == --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Aug 2 20:24:28 2017 (r321945) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Aug 2 20:27:30 2017 (r321946) @@ -59,10 +59,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include + +#include "mmcbr_if.h" #include "sdhci_if.h" struct imx_sdhci_softc { @@ -803,7 +803,6 @@ static device_method_t imx_sdhci_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar,sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), @@ -822,7 +821,7 @@ static device_method_t imx_sdhci_methods[] = { DEVMETHOD(sdhci_write_4,imx_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, imx_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t imx_sdhci_devclass; @@ -833,7 +832,7 @@ static driver_t imx_sdhci_driver = { sizeof(struct imx_sdhci_softc), }; -DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, 0, 0); +DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, +NULL, NULL); MODULE_DEPEND(sdhci_imx, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(sdhci_imx, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_imx); Modified: stable/10/sys/conf/files.powerpc == --- stable/10/sys/conf/files.powerpcWed Aug 2 20:24:28 2017 (r321945) +++ stable/10/sys/conf/files.powerpcWed Aug 2 20:27:30 2017 (r321946) @@ -131,6 +131,7 @@ powerpc/mpc85xx/ds1553_bus_fdt.coptionalds1553 fdt powerpc/mpc85xx/ds1553_core.c optionalds1553 powerpc/mpc85xx/i2c.c optionaliicbus fdt powerpc/mpc85xx/isa.c optionalmpc85xx isa +powerpc/mpc85xx/fsl_sdhc.c optionalmpc85xx sdhci powerpc/mpc85xx/lbc.c optionalmpc85xx powerpc/mpc85xx/mpc85xx.c optionalmpc85xx powerpc/mpc85xx/platform_mpc85xx.c optionalmpc85xx Modified: stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c == --- stable/10/sys/powerpc/mpc85xx/fsl_sdhc.cWed Aug 2 20:24:28 2017 (r321945) +++ stable/10/sys/powerpc/mpc85xx/fsl_sdhc.cWed Aug 2 20:27:30 2017 (r321946) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -112,7 +111,7 @@ static device_method_t fsl_sdhc_methods[] = { DEVMETHOD(mmcbr_acquire_host, fsl_sdhc_acquire_host), DEVMETHOD(mmcbr_release_host, fsl_sdhc_release_host), - {0, 0}, + DEVMETHOD_END }; /* kobj_class definition */ @@ -124,9 +123,9 @@ static driver_t fsl_sdhc_driver = { static devclass_t fsl_sdhc_devclass; -DRIVER_MODULE(sdhci, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, 0, 0); -DRIVER_MODULE(mmc, sdhci_fsl, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(sdhci_fsl, mmc, 1, 1, 1); +DRIVER_MODULE(sdhci, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_fsl, sdhci, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_fsl); /* * Private methods Modified: stable/10/sys/powerpc/mpc85xx/fsl_sdhc.h == --- stable/10/sys/powerpc/mpc85xx/fsl_sdhc.hWed Aug 2 20:24:28 2017 (r321945) +++ stable/10/sys/powerpc/mpc85xx/fsl_sdhc.hWed Aug 2 20:27:30 2017 (r321946) @@ -46,12 +46,8 @@ #include #include -#include #include -#include "mmcbr_if.h" - - /* * Private defines */ @@ -112,7 +108,6 @@ struct fsl_sdhc_softc { #define FSL_SDHC_DMA_SEGMENT_SIZE (1024) #defineFSL_SDHC_DMA_ALIGNMENT (4) #defineFSL_SDHC_DMA_BLOCK_SIZE
svn commit: r321947 - head/usr.sbin/makefs/tests
Author: ngie Date: Wed Aug 2 20:42:39 2017 New Revision: 321947 URL: https://svnweb.freebsd.org/changeset/base/321947 Log: Require strings(1) with :o_flag_preparer and :o_flag_publisher strings(1) might not be installed on the system, e.g., if MK_TOOLCHAIN == no MFC after:1 week Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh == --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Wed Aug 2 20:27:30 2017(r321946) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Wed Aug 2 20:42:39 2017(r321947) @@ -277,6 +277,10 @@ o_flag_isolevel_3_cleanup() } atf_test_case o_flag_preparer +o_flag_preparer_head() +{ + atf_set "require.progs" "strings" +} o_flag_preparer_body() { create_test_dirs @@ -292,6 +296,10 @@ o_flag_preparer_body() } atf_test_case o_flag_publisher +o_flag_publisher_head() +{ + atf_set "require.progs" "strings" +} o_flag_publisher_body() { create_test_dirs ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321093 - in stable/10: bin/ln bin/ln/tests etc/mtree
> On Jul 31, 2017, at 14:34, Alan Somers wrote: > > On Mon, Jul 17, 2017 at 3:12 PM, Ngie Cooper wrote: >> Author: ngie >> Date: Mon Jul 17 21:12:02 2017 >> New Revision: 321093 >> URL: https://svnweb.freebsd.org/changeset/base/321093 >> >> Log: >> MFC r319857: >> >> ln(1): wordsmith -F option description >> >> Added: >> stable/10/bin/ln/tests/ >> - copied from r319714, head/bin/ln/tests/ >> Modified: >> stable/10/bin/ln/Makefile >> stable/10/etc/mtree/BSD.tests.dist >> Directory Properties: >> stable/10/ (props changed) > > It looks like the commit message for this one was wrong, though the > merge tracking info is correct. The commit message should've read: > > MFC r319714: > > Add tests for ln(1) > > * Verify that when creating a hard link to a symbolic link, '-L' option > creates a hard link to the target of the symbolic link > * Verify that when creating a hard link to a symbolic link, '-P' option > creates a hard link to the symbolic link itself > * Verify that if the target file already exists, '-f' option unlinks it so > that link may occur > * Verify that if the target file or directory is a symbolic link, '-shf' > option prevents following the link > * Verify that if the target file or directory is a symbolic link, '-snf' > option prevents following the link > * Verify that '-s' option creates a symbolic link > * Verify that '-w' option produces a warning if the source of a symbolic > link does not currently exist > > Submitted by: shivansh > Reviewed by: asomers, ngie > MFC after: 1 month > Sponsored by: Google, Inc (GSoC 2017) > Differential Revision: https://reviews.freebsd.org/D11084 Whoops — yeah, I might have screwed that up by accident :(. Thanks for the clarification! -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r321948 - head/sys/dev/mmc
Author: marius Date: Wed Aug 2 21:11:51 2017 New Revision: 321948 URL: https://svnweb.freebsd.org/changeset/base/321948 Log: - Correct the remainder of confusing and error prone mix-ups between "br" or "bridge" where - according to the terminology outlined in comments of bridge.h and mmcbr_if.m around since their addition in r163516 - the bus is meant and used instead. Some of these instances are also rather old, while those in e. g. mmc_subr.c are as new as r315430 and were caused by choosing mmc_wait_for_request(), i. e. the one pre-r315430 outliner existing in mmc.c, as template for function parameters in mmc_subr.c inadvertently. This correction translates to renaming "brdev" to "busdev" and "mmcbr" to "mmcbus" respectively as appropriate. While at it, also rename "reqdev" to just "dev" in mmc_subr.[c,h] for consistency with was already used in mmm.c pre-r315430, again modulo mmc_wait_for_request() that is. - Remove comment lines from bridge.h incorrectly suggesting that there would be a MMC bridge base class driver. - Update comments in bridge.h regarding the star topology of SD and SDIO; since version 3.00 of the SDHCI specification, for eSD and eSDIO bus topologies are actually possible in form of so called "shared buses" (in some subcontext later on renamed to "embedded" buses). Modified: head/sys/dev/mmc/bridge.h head/sys/dev/mmc/mmc_subr.c head/sys/dev/mmc/mmc_subr.h head/sys/dev/mmc/mmcbus_if.m head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/bridge.h == --- head/sys/dev/mmc/bridge.h Wed Aug 2 20:42:39 2017(r321947) +++ head/sys/dev/mmc/bridge.h Wed Aug 2 21:11:51 2017(r321948) @@ -65,12 +65,10 @@ * linux/mmc/host.h file. * * A mmc bridge is a chipset that can have one or more mmc and/or sd - * cards attached to it. mmc cards are attached on a bus topology, - * while sd and sdio cards are attached using a star topology (meaning - * in practice each sd card has its own, independent slot). Each - * mmcbr is assumed to be derived from the mmcbr. This is done to - * allow for easier addition of bridges (as each bridge does not need - * to be added to the mmcbus file). + * cards attached to it. mmc devices are attached on a bus topology, + * while sd and sdio cards usually are attached using a star topology + * (meaning in practice each sd card has its own, independent slot). + * Since SDHCI v3.00, buses for esd and esdio are possible, though. * * Attached to the mmc bridge is an mmcbus. The mmcbus is described * in dev/mmc/mmcbus_if.m. Modified: head/sys/dev/mmc/mmc_subr.c == --- head/sys/dev/mmc/mmc_subr.c Wed Aug 2 20:42:39 2017(r321947) +++ head/sys/dev/mmc/mmc_subr.c Wed Aug 2 21:11:51 2017(r321948) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #defineLOG_PPS 5 /* Log no more than 5 errors per second. */ int -mmc_wait_for_cmd(device_t brdev, device_t reqdev, struct mmc_command *cmd, +mmc_wait_for_cmd(device_t busdev, device_t dev, struct mmc_command *cmd, int retries) { struct mmc_request mreq; @@ -87,14 +87,14 @@ mmc_wait_for_cmd(device_t brdev, device_t reqdev, stru if (cmd->data != NULL) cmd->data->mrq = &mreq; mreq.cmd = cmd; - if (MMCBUS_WAIT_FOR_REQUEST(brdev, reqdev, &mreq) != 0) + if (MMCBUS_WAIT_FOR_REQUEST(busdev, dev, &mreq) != 0) err = MMC_ERR_FAILED; else err = cmd->error; } while (err != MMC_ERR_NONE && retries-- > 0); - if (err != MMC_ERR_NONE && brdev == reqdev) { - sc = device_get_softc(brdev); + if (err != MMC_ERR_NONE && busdev == dev) { + sc = device_get_softc(busdev); if (sc->squelched == 0 && ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", @@ -106,14 +106,14 @@ mmc_wait_for_cmd(device_t brdev, device_t reqdev, stru } int -mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, uint16_t rca, +mmc_wait_for_app_cmd(device_t busdev, device_t dev, uint16_t rca, struct mmc_command *cmd, int retries) { struct mmc_command appcmd; struct mmc_softc *sc; int err; - sc = device_get_softc(brdev); + sc = device_get_softc(busdev); /* Squelch error reporting at lower levels, we report below. */ sc->squelched++; @@ -122,14 +122,14 @@ mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, appcmd.opcode = MMC_APP_CMD; appcmd.arg = (uint32_t)rca << 16; appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - if (mmc_wait_for_cmd(brdev, reqdev, &appcmd
svn commit: r321949 - head/bin/chmod/tests
Author: ngie Date: Wed Aug 2 21:18:54 2017 New Revision: 321949 URL: https://svnweb.freebsd.org/changeset/base/321949 Log: Add expected failures for ZFS - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1]. - :v_flag fails on ZFS because the mode for foo is [always] updated unnecessarily. get_filesystem(..) (supporting function that was added to the test script) is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh . MFC after:1 week PR: 221189 [1], 221188 [2] Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh == --- head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:11:51 2017 (r321948) +++ head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:18:54 2017 (r321949) @@ -25,6 +25,11 @@ # # $FreeBSD$ +get_filesystem() +{ + df -T . | tail -n 1 | cut -wf 2 +} + atf_test_case RH_flag RH_flag_head() { @@ -94,6 +99,11 @@ f_flag_body() { atf_check truncate -s 0 foo bar atf_check chmod 0750 foo bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS doesn't support UF_IMMUTABLE; returns EPERM - bug 221189" + ;; + esac atf_check chflags uchg foo atf_check -e not-empty -s not-exit:0 chmod 0700 foo bar atf_check -o inline:'100750\n100700\n' stat -f '%p' foo bar @@ -140,6 +150,11 @@ v_flag_body() atf_check truncate -s 0 foo bar atf_check chmod 0600 foo atf_check chmod 0750 bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS updates mode for foo unnecessarily - bug 221188" + ;; + esac atf_check -o 'inline:bar\n' chmod -v 0600 foo bar atf_check chmod -v 0600 foo bar for f in foo bar; do ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321950 - head/bin/chmod/tests
Author: ngie Date: Wed Aug 2 21:20:49 2017 New Revision: 321950 URL: https://svnweb.freebsd.org/changeset/base/321950 Log: Always use first parameter passed to get_filesystem(..) instead of discarding it and using `.` instead. MFC after:1 week MFC with: r321949 PR: 221189 [1], 221188 [2] Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh == --- head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:18:54 2017 (r321949) +++ head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:20:49 2017 (r321950) @@ -27,7 +27,9 @@ get_filesystem() { - df -T . | tail -n 1 | cut -wf 2 + local mountpoint=$1 + + df -T $mountpoint | tail -n 1 | cut -wf 2 } atf_test_case RH_flag ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321951 - head/share/mk
Author: ngie Date: Wed Aug 2 21:31:46 2017 New Revision: 321951 URL: https://svnweb.freebsd.org/changeset/base/321951 Log: Some minor doc fixups - Tweak a sentence by placing the modifier before an adjective to make it flow better. - Fix a typo. MFC after:3 days Modified: head/share/mk/bsd.opts.mk Modified: head/share/mk/bsd.opts.mk == --- head/share/mk/bsd.opts.mk Wed Aug 2 21:20:49 2017(r321950) +++ head/share/mk/bsd.opts.mk Wed Aug 2 21:31:46 2017(r321951) @@ -4,7 +4,7 @@ # # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} -# with sensible (usually) defaults. +# with (usually) sensible defaults. # # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that # are applicable for that Makefile (typically there are none, but sometimes there @@ -41,7 +41,7 @@ : # # Only these options are used by bsd.*.mk. KERBEROS and OPENSSH are -# unforutnately needed to support statically linking the entire +# unfortunately needed to support statically linking the entire # tree. su(1) wouldn't link since it depends on PAM which depends on # ssh libraries when building with OPENSSH, and likewise for KERBEROS. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321952 - head/share/mk
Author: ngie Date: Wed Aug 2 21:38:15 2017 New Revision: 321952 URL: https://svnweb.freebsd.org/changeset/base/321952 Log: Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS. MFC after:1 month Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed Aug 2 21:31:46 2017(r321951) +++ head/share/mk/src.opts.mk Wed Aug 2 21:38:15 2017(r321952) @@ -376,6 +376,10 @@ MK_ATM:= no MK_BLUETOOTH:= no .endif +.if ${MK_NLS} == "no" +MK_NLS_CATALOGS:= no +.endif + .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321953 - head/share/man/man5
Author: ngie Date: Wed Aug 2 21:40:51 2017 New Revision: 321953 URL: https://svnweb.freebsd.org/changeset/base/321953 Log: Regenerate src.conf(5) per change made in r321952 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Aug 2 21:38:15 2017 (r321952) +++ head/share/man/man5/src.conf.5 Wed Aug 2 21:40:51 2017 (r321953) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd July 5, 2017 +.Dd August 2, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1156,6 +1156,12 @@ and remove entries. .It Va WITHOUT_NLS Set to not build NLS catalogs. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_NLS_CATALOGS +.El .It Va WITHOUT_NLS_CATALOGS Set to not build NLS catalog support for .Xr csh 1 . ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321954 - head/share/mk
Author: ngie Date: Wed Aug 2 21:49:37 2017 New Revision: 321954 URL: https://svnweb.freebsd.org/changeset/base/321954 Log: Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options" src.conf(5) should document which knobs are which and the dependency between each; remove the comment so the variable can apply to non-"meta mode options". MFC after:2 weeks Modified: head/share/mk/bsd.opts.mk Modified: head/share/mk/bsd.opts.mk == --- head/share/mk/bsd.opts.mk Wed Aug 2 21:40:51 2017(r321953) +++ head/share/mk/bsd.opts.mk Wed Aug 2 21:49:37 2017(r321954) @@ -72,7 +72,6 @@ __DEFAULT_NO_OPTIONS = \ INSTALL_AS_USER \ STALE_STAGED -# meta mode related __DEFAULT_DEPENDENT_OPTIONS = \ STAGING_MAN/STAGING \ STAGING_PROG/STAGING \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321959 - head/tests/sys/kern
Author: ngie Date: Wed Aug 2 22:19:45 2017 New Revision: 321959 URL: https://svnweb.freebsd.org/changeset/base/321959 Log: Annotate tests that require root privileges appropriately This unbreaks running the tests with unprivileged users. MFC after:1 week Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c == --- head/tests/sys/kern/ptrace_test.c Wed Aug 2 22:08:49 2017 (r321958) +++ head/tests/sys/kern/ptrace_test.c Wed Aug 2 22:19:45 2017 (r321959) @@ -1868,7 +1868,12 @@ mask_usr1_thread(void *arg) * Verify that the SIGKILL from PT_KILL takes priority over other signals * and prevents spurious stops due to those other signals. */ -ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_signal); +ATF_TC(ptrace__PT_KILL_competing_signal); +ATF_TC_HEAD(ptrace__PT_KILL_competing_signal, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) { pid_t fpid, wpid; @@ -1962,7 +1967,12 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) * Verify that the SIGKILL from PT_KILL takes priority over other stop events * and prevents spurious stops caused by those events. */ -ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_stop); +ATF_TC(ptrace__PT_KILL_competing_stop); +ATF_TC_HEAD(ptrace__PT_KILL_competing_stop, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) { pid_t fpid, wpid; @@ -2940,13 +2950,24 @@ terminate_with_pending_sigstop(bool sigstop_from_main_ * to the older thread (the second test). This behavior has changed in the * past, so make no assumption. */ -ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop1); +ATF_TC(ptrace__parent_terminate_with_pending_sigstop1); +ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop1, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop1, tc) { terminate_with_pending_sigstop(true); } -ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop2); + +ATF_TC(ptrace__parent_terminate_with_pending_sigstop2); +ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop2, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop2, tc) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321963 - in head: . cddl/contrib/opensolaris/cmd/lockstat share/man/man4 sys/dev/ksyms sys/sys
Author: markj Date: Thu Aug 3 00:38:13 2017 New Revision: 321963 URL: https://svnweb.freebsd.org/changeset/base/321963 Log: Rework and simplify the ksyms(4) implementation. - Store the symbol table contents in an anonymous swap-backed object. Have mmap(/dev/ksyms) map that object, and stop mapping the symbol table into the calling process in ksyms_open(). Previously we would cache a pointer to the pmap of the opening process, and mmap(/dev/ksyms) would create a mapping using the physical address found by a pmap lookup at the initial mapping address. However, this assumes that the cached pmap is valid, which may not be the case. [1] - Remove the ksyms ioctl interface. It appears to have been added to work around a limitation in libelf that no longer exists; see r321842. Moreover, the interface is difficult to support and isn't present in illumos. Since ksyms was added specifically to support lockstat(1), it is expected that this removal won't have any real impact. - Simplify ksyms_read() to avoid unnecessary copying. - Don't call the device handle destructor if we fail to capture a snapshot of the kernel's symbol table. devfs will do that for us. Reported by: Ilja van Sprundel [1] Reviewed by: kib (previous revision) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D11789 Deleted: head/sys/sys/ksyms.h Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/share/man/man4/ksyms.4 head/sys/dev/ksyms/ksyms.c Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Aug 3 00:35:35 2017(r321962) +++ head/ObsoleteFiles.inc Thu Aug 3 00:38:13 2017(r321963) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170802: ksyms(4) ioctl interface was removed +OLD_FILES+=usr/include/sys/ksyms.h + # 20170722: new clang import which bumps version from 4.0.0 to 5.0.0. OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c == --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.cThu Aug 3 00:35:35 2017(r321962) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.cThu Aug 3 00:38:13 2017(r321963) @@ -48,7 +48,6 @@ #include #else #include -#include #include #include #include Modified: head/share/man/man4/ksyms.4 == --- head/share/man/man4/ksyms.4 Thu Aug 3 00:35:35 2017(r321962) +++ head/share/man/man4/ksyms.4 Thu Aug 3 00:38:13 2017(r321963) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 5, 2009 +.Dd August 2, 2017 .Dt KSYMS 4 .Os .Sh NAME @@ -69,24 +69,6 @@ driver does not block the loading or unloading of modu while the .Pa /dev/ksyms file is open but may contain stale data. -.Sh IOCTLS -The -.Xr ioctl 2 -command codes below are defined in -.Aq Pa sys/ksyms.h . -.Pp -The (third) argument to the -.Xr ioctl 2 -should be a pointer to the type indicated. -.Bl -tag -width indent -offset indent -.It Dv KIOCGSIZE (size_t) -Returns the total size of the current symbol table. -This can be used when allocating a buffer to make a copy of -the kernel symbol table. -.It Dv KIOCGADDR (void *) -Returns the address of the kernel symbol table mapped in -the process memory. -.El .Sh FILES .Bl -tag -width /dev/ksymsX .It Pa /dev/ksyms @@ -112,7 +94,6 @@ This may occur if the kernel was in the process of loa unloading a module. .El .Sh SEE ALSO -.Xr ioctl 2 , .Xr nlist 3 , .Xr elf 5 , .Xr kldload 8 @@ -152,12 +133,3 @@ file once at a time. The process must close the .Pa /dev/ksyms before it is allowed to open it again. -.Pp -The -.Nm -driver uses the calling process' memory address space to store the snapshot. -.Xr ioctl 2 -can be used to get the memory address where the symbol table is stored to -save kernel memory. -.Xr mmap 2 -may also be used but it will map it to another address. Modified: head/sys/dev/ksyms/ksyms.c == --- head/sys/dev/ksyms/ksyms.c Thu Aug 3 00:35:35 2017(r321962) +++ head/sys/dev/ksyms/ksyms.c Thu Aug 3 00:38:13 2017(r321963) @@ -32,16 +32,15 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include @@ -49,7 +48,7 @@ #include #include #include -#include +#include #include "linker_if.h" @@ -68,18 +67,14 @@ static d_open_t ksyms_open; static d_read_t ksyms_read; -static d_close_t ksyms_close; -static d_ioctl_t
svn commit: r321964 - in stable/10: contrib/bmake contrib/bmake/PSD.doc contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake
Author: sjg Date: Thu Aug 3 01:40:05 2017 New Revision: 321964 URL: https://svnweb.freebsd.org/changeset/base/321964 Log: MFC bmake-20170720 PR: 221023 Added: stable/10/contrib/bmake/mk/files.mk - copied unchanged from r318163, head/contrib/bmake/mk/files.mk stable/10/contrib/bmake/mk/sys.debug.mk - copied unchanged from r310304, head/contrib/bmake/mk/sys.debug.mk stable/10/contrib/bmake/mk/sys.vars.mk - copied, changed from r310304, head/contrib/bmake/mk/sys.vars.mk Modified: stable/10/contrib/bmake/ChangeLog stable/10/contrib/bmake/Makefile stable/10/contrib/bmake/PSD.doc/tutorial.ms stable/10/contrib/bmake/README stable/10/contrib/bmake/arch.c stable/10/contrib/bmake/bmake.1 stable/10/contrib/bmake/bmake.cat1 stable/10/contrib/bmake/boot-strap stable/10/contrib/bmake/buf.h stable/10/contrib/bmake/compat.c stable/10/contrib/bmake/cond.c stable/10/contrib/bmake/config.h.in stable/10/contrib/bmake/configure stable/10/contrib/bmake/configure.in stable/10/contrib/bmake/dir.c stable/10/contrib/bmake/dir.h stable/10/contrib/bmake/dirname.c stable/10/contrib/bmake/for.c stable/10/contrib/bmake/getopt.c stable/10/contrib/bmake/hash.h stable/10/contrib/bmake/job.c stable/10/contrib/bmake/main.c stable/10/contrib/bmake/make-bootstrap.sh.in stable/10/contrib/bmake/make.1 stable/10/contrib/bmake/make.c stable/10/contrib/bmake/make.h stable/10/contrib/bmake/make_malloc.c stable/10/contrib/bmake/meta.c stable/10/contrib/bmake/meta.h stable/10/contrib/bmake/mk/ChangeLog stable/10/contrib/bmake/mk/FILES stable/10/contrib/bmake/mk/auto.dep.mk stable/10/contrib/bmake/mk/auto.obj.mk stable/10/contrib/bmake/mk/autodep.mk stable/10/contrib/bmake/mk/dirdeps.mk stable/10/contrib/bmake/mk/doc.mk stable/10/contrib/bmake/mk/dpadd.mk stable/10/contrib/bmake/mk/final.mk stable/10/contrib/bmake/mk/gendirdeps.mk stable/10/contrib/bmake/mk/inc.mk stable/10/contrib/bmake/mk/init.mk stable/10/contrib/bmake/mk/install-mk stable/10/contrib/bmake/mk/lib.mk stable/10/contrib/bmake/mk/libnames.mk stable/10/contrib/bmake/mk/meta.autodep.mk stable/10/contrib/bmake/mk/meta.stage.mk stable/10/contrib/bmake/mk/meta.sys.mk stable/10/contrib/bmake/mk/meta2deps.py stable/10/contrib/bmake/mk/meta2deps.sh stable/10/contrib/bmake/mk/mkopt.sh stable/10/contrib/bmake/mk/nls.mk stable/10/contrib/bmake/mk/own.mk stable/10/contrib/bmake/mk/prog.mk stable/10/contrib/bmake/mk/scripts.mk stable/10/contrib/bmake/mk/subdir.mk stable/10/contrib/bmake/mk/sys.clean-env.mk stable/10/contrib/bmake/mk/sys.dependfile.mk stable/10/contrib/bmake/mk/sys.mk stable/10/contrib/bmake/mk/sys/AIX.mk stable/10/contrib/bmake/mk/sys/Darwin.mk stable/10/contrib/bmake/mk/sys/Generic.mk stable/10/contrib/bmake/mk/sys/HP-UX.mk stable/10/contrib/bmake/mk/sys/IRIX.mk stable/10/contrib/bmake/mk/sys/Linux.mk stable/10/contrib/bmake/mk/sys/NetBSD.mk stable/10/contrib/bmake/mk/sys/OSF1.mk stable/10/contrib/bmake/mk/sys/OpenBSD.mk stable/10/contrib/bmake/mk/sys/SunOS.mk stable/10/contrib/bmake/mk/sys/UnixWare.mk stable/10/contrib/bmake/mk/warnings.mk stable/10/contrib/bmake/nonints.h stable/10/contrib/bmake/os.sh stable/10/contrib/bmake/parse.c stable/10/contrib/bmake/sprite.h stable/10/contrib/bmake/str.c stable/10/contrib/bmake/suff.c stable/10/contrib/bmake/targ.c stable/10/contrib/bmake/unit-tests/export-env.exp stable/10/contrib/bmake/unit-tests/export-env.mk stable/10/contrib/bmake/unit-tests/modmatch.exp stable/10/contrib/bmake/unit-tests/modmatch.mk stable/10/contrib/bmake/unit-tests/modts.exp stable/10/contrib/bmake/unit-tests/modts.mk stable/10/contrib/bmake/unit-tests/varmisc.exp stable/10/contrib/bmake/unit-tests/varmisc.mk stable/10/contrib/bmake/var.c stable/10/usr.bin/bmake/Makefile stable/10/usr.bin/bmake/Makefile.inc stable/10/usr.bin/bmake/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bmake/ChangeLog == --- stable/10/contrib/bmake/ChangeLog Thu Aug 3 00:38:13 2017 (r321963) +++ stable/10/contrib/bmake/ChangeLog Thu Aug 3 01:40:05 2017 (r321964) @@ -1,3 +1,296 @@ +2017-07-20 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170720 + Merge with NetBSD make, pick up + o compat.c: pass SIGINT etc onto child and wait for it to exit + before we self-terminate. + +2017-07-11 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170711 + forgot to update after merge on 20170708 ;-) + o main.c: refactor to reduce size of main function. + add -v option to always fully expand values. + o meta.c: ensure command output in meta file has ending newline + even when filemon not being used. + When matching ${.MAKE.META.IGNORE_PATTERNS} do not use +
svn commit: r321965 - head/sys/dev/hyperv/utilities
Author: sephe Date: Thu Aug 3 01:44:40 2017 New Revision: 321965 URL: https://svnweb.freebsd.org/changeset/base/321965 Log: hyperv/kvp: Use proper size macro for adapter id. Submitted by: Christopher Ertl MFC after:3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/utilities/hv_kvp.c Modified: head/sys/dev/hyperv/utilities/hv_kvp.c == --- head/sys/dev/hyperv/utilities/hv_kvp.c Thu Aug 3 01:40:05 2017 (r321964) +++ head/sys/dev/hyperv/utilities/hv_kvp.c Thu Aug 3 01:44:40 2017 (r321965) @@ -253,7 +253,7 @@ hv_kvp_convert_utf8_ipinfo_to_utf16(struct hv_kvp_msg UNUSED_FLAG, &err_dns); utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, - MAX_IP_ADDR_SIZE, + MAX_ADAPTER_ID_SIZE, (char *)umsg->body.kvp_ip_val.adapter_id, strlen((char *)umsg->body.kvp_ip_val.adapter_id), UNUSED_FLAG, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321966 - head/usr.bin/calendar/calendars
Author: rmacklem Date: Thu Aug 3 02:08:01 2017 New Revision: 321966 URL: https://svnweb.freebsd.org/changeset/base/321966 Log: Added entry as requested by Kirk. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdThu Aug 3 01:44:40 2017(r321965) +++ head/usr.bin/calendar/calendars/calendar.freebsdThu Aug 3 02:08:01 2017(r321966) @@ -350,6 +350,7 @@ 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 +10/11 Rick Macklem born in Ontario, Canada, 1955 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 10/15 Eugene Grosbein born in Novokuznetsk, Russian Republic, USSR, 1976 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321967 - head/tests/sys/fs/tmpfs
Author: ngie Date: Thu Aug 3 03:43:41 2017 New Revision: 321967 URL: https://svnweb.freebsd.org/changeset/base/321967 Log: Chase r321920 and r321930 (dev_t being widened) The layout of st_rdev has changed after this commit, and assumptions made in the NetBSD tests are no longer valid. Change the hardcoded assumed values to account for the fact that major/minor are now represented by 64 bits as opposed to the less precise legacy precision of 16 bits. PR: 221048 Relnotes: st_rdev layout changed; warning about impact of r321920 to downstream consumers Modified: head/tests/sys/fs/tmpfs/Makefile Modified: head/tests/sys/fs/tmpfs/Makefile == --- head/tests/sys/fs/tmpfs/MakefileThu Aug 3 02:08:01 2017 (r321966) +++ head/tests/sys/fs/tmpfs/MakefileThu Aug 3 03:43:41 2017 (r321967) @@ -41,7 +41,13 @@ ${PACKAGE}FILESDIR= ${TESTSDIR} PROGS+=h_tools BINDIR.h_tools=${TESTSDIR} +# NOTE: dev_t is represented by 64-bits after r321920 (it was 16-bits +# previously). +# +# The old hardcoded values assume the 16-bit layout for .st_rdev . ATF_TESTS_SH_SED_mknod_test= \ + -e '/$${st_rdev} -eq 512/s/512/8589934592/g' \ + -e '/$${st_rdev} -eq 514/s/514/8589934594/g' \ -e 's,mknod pipe p,mkfifo pipe,g' \ -e 's,mknod dir/pipe p,mkfifo dir/pipe,g' ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Wed, 2 Aug 2017, Konstantin Belousov wrote: On Wed, Aug 02, 2017 at 02:38:50PM +0200, Hans Petter Selasky wrote: On 08/02/17 14:36, Hans Petter Selasky wrote: On 08/02/17 12:14, Konstantin Belousov wrote: +#definemajor(x)((int)((dev_t)(x) >> 32))/* major number */ +#defineminor(x)((int)((x) & 0x))/* minor number */ +#definemakedev(x, y)(((dev_t)(x) << 32) | (y))/* create dev_t */ One more comment on this issue: I think makedev(x, y) should be declared like this, to avoid issues when "y" is negative: #definemakedev(x, y)(((dev_t)(x) << 32) | (unsigned int)(y)) /* create dev_t */ I think this has a lot of style bugs: - long line constructed by blind expansion - verbose spelling of 'unsigned' in the expansion to make the long line longer - banal comment to make the long line. The comment on this line is not quite as banal as the ones on the preceding 2 line -- those do less than echo the code. And you'll probably want a final wrapping dev_t cast aswell. 128-bit numbers are not yet there. #define makedev(x, y)((dev_t)(((dev_t)(x) << 32) | (unsigned int)(y))) > /* create dev_t */ You mean 128-bit ints. I agree with the usefulness of the y cast to unsigned type, but I am not sure what is the use of final dev_t cast. By the usual arithmetic conversion rules, the final type of the '|' is the highest rank type of the operands. Something unusual can only happen if int is wider than dev_t. So it happens with 128 ints (or 65-bit ints) if dev_t remains 64 bits. So I am going to commit the following update. Almost OK. The necessary casts and parentheses are already ugly enough. This is the implementation, so it can assume that int is 32 bits and dev_t is 64 bits and not have the complexity to support the general case. Ints are probably assumed to be 32 bits in a few thousand similar definitions and a few million lines of code just in FreeBSD sources. diff --git a/sys/sys/types.h b/sys/sys/types.h index fce57e412ed..30a08724443 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #define major(x)((int)((dev_t)(x) >> 32)) /* major number */ #define minor(x)((int)((x) & 0x)) /* minor number */ -#definemakedev(x, y) (((dev_t)(x) << 32) | (y))/* create dev_t */ +#definemakedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in You fixed the long line by not spelling 'unsigned' verbosely and not aligning the comments uniformly. It would be better to remove the comments. makedev() actually has a man page (a FreeBSD addition makedev(3)). This could have been better, and is now out of date. The largest error is that major() is still documented to return a value between 0 and 255. This reduction prevented makedev() being the inverse of major()+minor() on arbitrary args. The man page doesn't claim that it is, and barely gives a hint that makedev() can be used to synthesize a dev_t from (x, y) provided 0 <= x <= 255. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2
Author: ngie Date: Thu Aug 3 05:27:05 2017 New Revision: 321969 URL: https://svnweb.freebsd.org/changeset/base/321969 Log: Fix the return types for printf and putchar to match their libc and POSIX equivalents Both printf and putchar return int, not void. This will allow code that leverages the libcalls and checks/rely on the return type to interchangeably between loader code and non-loader code. MFC after:1 month Modified: head/sys/boot/arm/at91/libat91/lib.h head/sys/boot/arm/at91/libat91/printf.c head/sys/boot/arm/at91/libat91/putchar.c head/sys/boot/arm/ixp425/boot2/ixp425_board.c head/sys/boot/arm/ixp425/boot2/lib.h head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/arm/at91/libat91/lib.h == --- head/sys/boot/arm/at91/libat91/lib.hThu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/lib.hThu Aug 3 05:27:05 2017 (r321969) @@ -28,9 +28,9 @@ #define ARM_BOOT_LIB_H int getc(int); -void putchar(int); -void xputchar(int); -void printf(const char *fmt,...); +int putchar(int); +int xputchar(int); +int printf(const char *fmt,...); /* The following function write eeprom at ee_addr using data */ /* from data_add for size bytes. */ Modified: head/sys/boot/arm/at91/libat91/printf.c == --- head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 05:27:05 2017 (r321969) @@ -20,12 +20,13 @@ #include #include "lib.h" -void +int printf(const char *fmt,...) { va_list ap; const char *hex = "0123456789abcdef"; char buf[10]; + const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -66,5 +67,5 @@ printf(const char *fmt,...) } va_end(ap); - return; + return (int)(fmt - fmt_orig); } Modified: head/sys/boot/arm/at91/libat91/putchar.c == --- head/sys/boot/arm/at91/libat91/putchar.cThu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/putchar.cThu Aug 3 05:27:05 2017 (r321969) @@ -39,11 +39,11 @@ #include "lib.h" /* - * void putchar(int ch) + * int putchar(int ch) * Writes a character to the DBGU port. It assumes that DBGU has * already been initialized. */ -void +int putchar(int ch) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; @@ -51,12 +51,14 @@ putchar(int ch) while (!(pUSART->US_CSR & AT91C_US_TXRDY)) continue; pUSART->US_THR = (ch & 0xFF); + return (1); } -void +int xputchar(int ch) { -if (ch == '\n') - putchar('\r'); -putchar(ch); + if (ch == '\n') + putchar('\r'); + putchar(ch); + return (ch == '\n' ? 2 : 1); } Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c == --- head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 03:45:48 2017(r321968) +++ head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 05:27:05 2017(r321969) @@ -165,7 +165,7 @@ getc(int seconds) return c; } -void +int putchar(int ch) { int delay, limit; @@ -179,14 +179,16 @@ putchar(int ch) limit = 40; while ((uart_getreg(ubase, REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); + return (1); } -void +int xputchar(int ch) { if (ch == '\n') putchar('\r'); putchar(ch); + return (ch == '\n' ? 2 : 1); } void Modified: head/sys/boot/arm/ixp425/boot2/lib.h == --- head/sys/boot/arm/ixp425/boot2/lib.hThu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/ixp425/boot2/lib.hThu Aug 3 05:27:05 2017 (r321969) @@ -35,12 +35,12 @@ int main(void); void DELAY(int); int getc(int); -void putchar(int); -void xputchar(int); +int putchar(int); +int xputchar(int); void putstr(const char *); void puthex8(u_int8_t); void puthexlist(const u_int8_t *, int); -void printf(const char *fmt,...); +int printf(const char *fmt,...); void bzero(void *, size_t); char *strcpy(char *to, const char *from); Modified: head/sys/boot/i386/boot2/boot2.c == --- head/sys/boot/i386/boot2/boot2.cThu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/i386/boot2/boot2.cThu Aug 3 05:27:05 2017 (r321969) @@ -114,8 +114,8 @@ void exit(int); static void load(void); static int parse(void); static int dskread(void *, unsigned, unsigned); -static void printf(con
svn commit: r321973 - head/sys/dev/ksyms
Author: markj Date: Thu Aug 3 05:55:01 2017 New Revision: 321973 URL: https://svnweb.freebsd.org/changeset/base/321973 Log: Remove D_TRACKCLOSE now that ksyms no longer has a close method. Reported by: jhb X-MFC with: r321963 Modified: head/sys/dev/ksyms/ksyms.c Modified: head/sys/dev/ksyms/ksyms.c == --- head/sys/dev/ksyms/ksyms.c Thu Aug 3 05:32:27 2017(r321972) +++ head/sys/dev/ksyms/ksyms.c Thu Aug 3 05:55:01 2017(r321973) @@ -71,7 +71,7 @@ static d_mmap_single_t ksyms_mmap_single; static struct cdevsw ksyms_cdevsw = { .d_version =D_VERSION, - .d_flags = D_TRACKCLOSE, + .d_flags = 0, .d_open = ksyms_open, .d_read = ksyms_read, .d_mmap_single = ksyms_mmap_single, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"