svn commit: r235050 - head/sys/arm/arm
Author: imp Date: Sat May 5 07:15:34 2012 New Revision: 235050 URL: http://svn.freebsd.org/changeset/base/235050 Log: Big endian arm boxes need to have a uname -m of armeb, not arm, so that the bootstrap from source works correctly. MFC after:4 days Modified: head/sys/arm/arm/identcpu.c Modified: head/sys/arm/arm/identcpu.c == --- head/sys/arm/arm/identcpu.c Sat May 5 02:53:19 2012(r235049) +++ head/sys/arm/arm/identcpu.c Sat May 5 07:15:34 2012(r235050) @@ -52,11 +52,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#if _BYTE_ORDER == _LITTLE_ENDIAN char machine[] = "arm"; +#else +char machine[] = "armeb"; +#endif SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r234386 - in head/sys: fs/coda fs/ext2fs fs/msdosfs fs/nfsclient kern nfsclient sys ufs/ffs ufs/ufs
On 17 April 2012 20:28, Kirk McKusick wrote: > Author: mckusick > Date: Tue Apr 17 16:28:22 2012 > New Revision: 234386 > URL: http://svn.freebsd.org/changeset/base/234386 > > Log: > Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. > The primary changes are that the user of the interface no longer > needs to manage the mount-mutex locking and that the vnode that > is returned has its mutex locked (thus avoiding the need to check > to see if its is DOOMED or other possible end of life senarios). > > To minimize compatibility issues for third-party developers, the > old MNT_VNODE_FOREACH interface will remain available so that this > change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH > will be removed in head. > > The reason for this update is to prepare for the addition of the > MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the > active vnodes associated with a mount point (typically less than > 1% of the vnodes associated with the mount point). > > Reviewed by: kib > Tested by: Peter Holm > MFC after: 2 weeks > Hi. This commit crashes on old nfsclient. Looks like this change is missed. Index: nfsclient/nfs_vfsops.c === --- nfsclient/nfs_vfsops.c (revision 235051) +++ nfsclient/nfs_vfsops.c (working copy) @@ -1452,6 +1452,7 @@ MNT_IUNLOCK(mp); return (EBADF); } + MNT_IUNLOCK(mp); /* * Force stale buffer cache information to be flushed. [...] > > Modified: head/sys/nfsclient/nfs_vfsops.c > == > --- head/sys/nfsclient/nfs_vfsops.c Tue Apr 17 14:54:00 2012 > (r234385) > +++ head/sys/nfsclient/nfs_vfsops.c Tue Apr 17 16:28:22 2012 > (r234386) > @@ -1457,19 +1457,15 @@ nfs_sync(struct mount *mp, int waitfor) > * Force stale buffer cache information to be flushed. > */ > loop: > - MNT_VNODE_FOREACH(vp, mp, mvp) { > - VI_LOCK(vp); > - MNT_IUNLOCK(mp); > + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { Now this call results in malloc() and MNT_ILOCK(mp) inside __mnt_vnode_first_all(). But MNT_ILOCK(mp) is already done few lines above (probably because its MNT_IUNLOCK() counterpart was missed in this commit?). [...] > +struct vnode * > +__mnt_vnode_first_all(struct vnode **mvp, struct mount *mp) > +{ > + struct vnode *vp; > + To the moment it already holds MNT_ILOCK(mp) from sys/nfsclient/nfs_vfsops.c:1445 > + *mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | > M_ZERO); > + MNT_ILOCK(mp); > + MNT_REF(mp); > + (*mvp)->v_type = VMARKER; > + > + vp = TAILQ_FIRST(&mp->mnt_nvnodelist); > + while (vp != NULL && (vp->v_type == VMARKER || > + (vp->v_iflag & VI_DOOMED) != 0)) > + vp = TAILQ_NEXT(vp, v_nmntvnodes); > + > + /* Check if we are done */ > + if (vp == NULL) { > + *mvp = NULL; > + MNT_REL(mp); > + MNT_IUNLOCK(mp); > + free(*mvp, M_VNODE_MARKER); > + return (NULL); > + } > + (*mvp)->v_mount = mp; > + TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes); > + VI_LOCK(vp); > + MNT_IUNLOCK(mp); > + return (vp); > +} [...] uma_zalloc_arg: zone "1024" with the following non-sleepable locks held: exclusive sleep mutex struct mount mtx (struct mount mtx) r = 0 (0xfe0002907750) locked @ /usr/src/sys/nfsclient/nfs_vfsops.c:1445 KDB: stack backtrace: db_trace_self_wrapper() at 0x802c75aa = db_trace_self_wrapper+0x2a kdb_backtrace() at 0x80476547 = kdb_backtrace+0x37 _witness_debugger() at 0x8048d48c = _witness_debugger+0x2c witness_warn() at 0x8048e274 = witness_warn+0x2c4 uma_zalloc_arg() at 0x8068be24 = uma_zalloc_arg+0x384 malloc() at 0x80425026 = malloc+0xc6 __mnt_vnode_first_all() at 0x804dd3f9 = __mnt_vnode_first_all+0x29 nfs_sync() at 0x805f231d = nfs_sync+0x8d sys_sync() at 0x804e8906 = sys_sync+0x146 amd64_syscall() at 0x806c780c = amd64_syscall+0x38c Xfast_syscall() at 0x806b2c47 = Xfast_syscall+0xf7 --- syscall (36, FreeBSD ELF64, sys_sync), rip = 0x800a95a0c, rsp = 0x7fffd958, rbp = 0x7fffdd50 --- panic: _mtx_lock_sleep: recursed on non-recursive mutex struct mount mtx @ /usr/src/sys/kern/vfs_subr.c:4595 cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at 0x802c75aa = db_trace_self_wrapper+0x2a kdb_backtrace() at 0x80476547 = kdb_backtrace+0x37 panic() at 0x8043bc3e = panic+0x1ce _mtx_lock_sleep() at 0x80429058 = _mtx_lock_sleep+0x538 _mtx_lock_flags() at 0x804291e4 = _mtx_lock_flags+0x184 __mnt_vnode_first_all() at 0x804dd413 = __mnt_vnode_first_all+0x43 nfs_sync() at 0x805f231d = nfs_sy
Re: svn commit: r233435 - head/etc/mtree
On Fri, 4 May 2012, Pawel Jakub Dawidek wrote: On Sat, Mar 24, 2012 at 09:10:19PM +, Eitan Adler wrote: Log: Fix build by adding new directory to mtree in r233429 Submitted by: flo Approved by: cperciva MFC after:1 week Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist == --- head/etc/mtree/BSD.usr.dist Sat Mar 24 19:59:14 2012(r233434) +++ head/etc/mtree/BSD.usr.dist Sat Mar 24 21:10:19 2012(r233435) @@ -209,6 +209,8 @@ .. bootforth .. + csh + .. cvs You need to use only spaces in this file for indentation just like in all the other lines. That's a shame it was merged into 7, 8 and 9. Of course, it doesn't help that mtree files are among the few whose formatting style is specified in detail (in mtree/README). BSD.usr.dist is the only one that has any tabs (82 lines out of 1364). Other misformattings are harder to grep for, but unlikely to be null. A relatively serious ones (equivalent to leaving out necessary braces for a compound statement in C) is visible in the above: the tab for the ".." for csh is not just a style bug, but misindents to an extra level, so the level can't be read off from the indentation. This is without spurious indentation from mailer quoting or tab mis-expansion; in this reply, the mailer quoting combined with only some lines using tabs makes it look like "csh" is missing indentation instead of its ".." having extra indentation. The strings are "<4 spaces>csh" and .." but should be "<12 spaces>" for both.) There is no indent(1) for mtree files, but the README has instructions for producing the correct formatting by running mtree(1) with suitable options. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235052 - head/sys/nfsclient
Author: pluknet Date: Sat May 5 09:34:35 2012 New Revision: 235052 URL: http://svn.freebsd.org/changeset/base/235052 Log: Fix mount mutex handling missed in r234386. Modified: head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/nfsclient/nfs_vfsops.c == --- head/sys/nfsclient/nfs_vfsops.c Sat May 5 07:55:50 2012 (r235051) +++ head/sys/nfsclient/nfs_vfsops.c Sat May 5 09:34:35 2012 (r235052) @@ -1452,6 +1452,7 @@ nfs_sync(struct mount *mp, int waitfor) MNT_IUNLOCK(mp); return (EBADF); } + MNT_IUNLOCK(mp); /* * Force stale buffer cache information to be flushed. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On Fri, 4 May 2012, Doug Barton wrote: On 05/04/2012 11:22 AM, Baptiste Daroussin wrote: fetch -s "${FETCHFILE}" >${SIZEFILE} SIZE="`cat ${SIZEFILE}`" - SIZE="`expr ${SIZE} / 1024`" + SIZE=$((SIZE/1024)) Bug; should be '$SIZE/' No this is perfectly valid Yes, that works, but it's not our usual style. However, the point is moot as that whole block should be reduced down to: SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) The KNF rule that there shall be spaces around binary operators should probably apply in shell expressions too, but I don't like the spaces on 1 side of (( and )). Shell syntax doesn't even allow spaces between '$' ((. The rc.d style seems to be to use backquotes and not use $(cmd), but I prefer the opposite except possibly in shell expressions like the above so that it is easier to separate the commands from the shell expressions. If SIZEFILE is needed elsewhere that's a different matter, but as it is that's a hot mess. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r234386 - in head/sys: fs/coda fs/ext2fs fs/msdosfs fs/nfsclient kern nfsclient sys ufs/ffs ufs/ufs
On Sat, May 05, 2012 at 01:00:36PM +0400, Sergey Kandaurov wrote: > On 17 April 2012 20:28, Kirk McKusick wrote: > > Author: mckusick > > Date: Tue Apr 17 16:28:22 2012 > > New Revision: 234386 > > URL: http://svn.freebsd.org/changeset/base/234386 > > > > Log: > > Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. > > The primary changes are that the user of the interface no longer > > needs to manage the mount-mutex locking and that the vnode that > > is returned has its mutex locked (thus avoiding the need to check > > to see if its is DOOMED or other possible end of life senarios). > > > > To minimize compatibility issues for third-party developers, the > > old MNT_VNODE_FOREACH interface will remain available so that this > > change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH > > will be removed in head. > > > > The reason for this update is to prepare for the addition of the > > MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the > > active vnodes associated with a mount point (typically less than > > 1% of the vnodes associated with the mount point). > > > > Reviewed by: kib > > Tested by: Peter Holm > > MFC after: 2 weeks > > > > Hi. > > This commit crashes on old nfsclient. Looks like this change is missed. > > Index: nfsclient/nfs_vfsops.c > === > --- nfsclient/nfs_vfsops.c (revision 235051) > +++ nfsclient/nfs_vfsops.c (working copy) > @@ -1452,6 +1452,7 @@ > MNT_IUNLOCK(mp); > return (EBADF); > } > + MNT_IUNLOCK(mp); > > /* > * Force stale buffer cache information to be flushed. > Yes, looks so. And, for the purposes for which the check of MNTK_UNMOUNTF was added, the interlock of the struct mount is not needed there at all. I suggest that you just remove MNT_ILOCK/partial MNT_IUNLOCK and commit the change. Thanks. pgpeDXYXEAGQb.pgp Description: PGP signature
svn commit: r235054 - head/libexec/rtld-elf
Author: kib Date: Sat May 5 11:26:08 2012 New Revision: 235054 URL: http://svn.freebsd.org/changeset/base/235054 Log: Work around a situation where symlook_obj() could be called for the object for which digest_dynamic1() was not done yet. Just return EINVAL and do not try to dereference NULL buckets hash array. This seems to happen on ia64 for rtld object itself, where the R_IA_64_FPTR64LSB relocations require symbol lookup. The dynamic linker itself does not rely on identity of the C-level function pointers (i.e. function descriptors). Reported and reviewed by: marcel MFC after: 8 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cSat May 5 10:05:13 2012 (r235053) +++ head/libexec/rtld-elf/rtld.cSat May 5 11:26:08 2012 (r235054) @@ -3480,13 +3480,15 @@ symlook_obj(SymLook *req, const Obj_Entr int flags, res, mres; /* - * There is at least one valid hash at this point, and we prefer to use - * the faster GNU version if available. + * If there is at least one valid hash at this point, we prefer to + * use the faster GNU version if available. */ if (obj->valid_hash_gnu) mres = symlook_obj1_gnu(req, obj); -else +else if (obj->valid_hash_sysv) mres = symlook_obj1_sysv(req, obj); +else + return (EINVAL); if (mres == 0) { if (obj->needed_filtees != NULL) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235057 - head/sys/netinet
Author: tuexen Date: Sat May 5 14:06:15 2012 New Revision: 235057 URL: http://svn.freebsd.org/changeset/base/235057 Log: Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC, and SCTP_ADD_STREAMS socket options as specified by RFC 6525. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Sat May 5 11:34:27 2012 (r235056) +++ head/sys/netinet/sctp_usrreq.c Sat May 5 14:06:15 2012 (r235057) @@ -4164,7 +4164,6 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(strrst, optval, struct sctp_reset_streams, optsize); SCTP_FIND_STCB(inp, stcb, strrst->srs_assoc_id); - if (stcb == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOENT); error = ENOENT; @@ -4179,15 +4178,6 @@ sctp_setopt(struct socket *so, int optna SCTP_TCB_UNLOCK(stcb); break; } - if (!(stcb->asoc.local_strreset_support & SCTP_ENABLE_RESET_STREAM_REQ)) { - /* -* User did not enable the operation. -*/ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EPERM); - error = EPERM; - SCTP_TCB_UNLOCK(stcb); - break; - } if (stcb->asoc.stream_reset_outstanding) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); error = EALREADY; @@ -4246,6 +4236,21 @@ sctp_setopt(struct socket *so, int optna error = ENOENT; break; } + if (stcb->asoc.peer_supports_strreset == 0) { + /* +* Peer does not support the chunk type. +*/ + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP); + error = EOPNOTSUPP; + SCTP_TCB_UNLOCK(stcb); + break; + } + if (stcb->asoc.stream_reset_outstanding) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); + error = EALREADY; + SCTP_TCB_UNLOCK(stcb); + break; + } if ((stradd->sas_outstrms == 0) && (stradd->sas_instrms == 0)) { error = EINVAL; @@ -4309,15 +4314,6 @@ sctp_setopt(struct socket *so, int optna SCTP_TCB_UNLOCK(stcb); break; } - if (!(stcb->asoc.local_strreset_support & SCTP_ENABLE_RESET_ASSOC_REQ)) { - /* -* User did not enable the operation. -*/ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EPERM); - error = EPERM; - SCTP_TCB_UNLOCK(stcb); - break; - } if (stcb->asoc.stream_reset_outstanding) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); error = EALREADY; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235058 - in head: . lib/clang/include
Author: dim Date: Sat May 5 15:35:22 2012 New Revision: 235058 URL: http://svn.freebsd.org/changeset/base/235058 Log: Make sure a few new internal clang headers get installed, I missed these in the last import. They are sometimes needed when you want to use advanced instructions. Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since it is redundant: we already have a stdalign.h header in /usr/include. Pointy hat to:dim PR: kern/167574 Submitted by: jkim Reported by: Oliver Hartmann MFC after:2 weeks Modified: head/ObsoleteFiles.inc head/lib/clang/include/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat May 5 14:06:15 2012(r235057) +++ head/ObsoleteFiles.inc Sat May 5 15:35:22 2012(r235058) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20120505: new clang import installed a redundant internal header +OLD_FILES+=usr/include/clang/3.1/stdalign.h # 20120425: libusb version bump (r234684) OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib32/libusb.so.2 Modified: head/lib/clang/include/Makefile == --- head/lib/clang/include/Makefile Sat May 5 14:06:15 2012 (r235057) +++ head/lib/clang/include/Makefile Sat May 5 15:35:22 2012 (r235058) @@ -5,17 +5,23 @@ INCSDIR=${INCLUDEDIR}/clang/3.1 INCS= altivec.h \ + avx2intrin.h \ avxintrin.h \ + bmi2intrin.h \ + bmiintrin.h \ cpuid.h \ emmintrin.h \ + fma4intrin.h \ immintrin.h \ + lzcntintrin.h \ mm3dnow.h \ mm_malloc.h \ mmintrin.h \ + module.map \ nmmintrin.h \ pmmintrin.h \ + popcntintrin.h \ smmintrin.h \ - stdalign.h \ tmmintrin.h \ unwind.h \ wmmintrin.h \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235050 - head/sys/arm/arm
On 05/05/12 02:15, Warner Losh wrote: Author: imp Date: Sat May 5 07:15:34 2012 New Revision: 235050 URL: http://svn.freebsd.org/changeset/base/235050 Log: Big endian arm boxes need to have a uname -m of armeb, not arm, so that the bootstrap from source works correctly. MFC after: 4 days Modified: head/sys/arm/arm/identcpu.c Modified: head/sys/arm/arm/identcpu.c == --- head/sys/arm/arm/identcpu.c Sat May 5 02:53:19 2012(r235049) +++ head/sys/arm/arm/identcpu.c Sat May 5 07:15:34 2012(r235050) @@ -52,11 +52,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#if _BYTE_ORDER == _LITTLE_ENDIAN char machine[] = "arm"; +#else +char machine[] = "armeb"; +#endif SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); Didn't you mean to change MACHINE_ARCH in /sys/arm/include/param.h? Setting MACHINE=armeb will break lots of things, including self-hosting. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235059 - head/libexec/rtld-elf
Author: bapt Date: Sat May 5 16:37:14 2012 New Revision: 235059 URL: http://svn.freebsd.org/changeset/base/235059 Log: open the resolved path fix debug message Submitted by: John Marino Approved by: des (mentor) Modified: head/libexec/rtld-elf/libmap.c Modified: head/libexec/rtld-elf/libmap.c == --- head/libexec/rtld-elf/libmap.c Sat May 5 15:35:22 2012 (r235058) +++ head/libexec/rtld-elf/libmap.c Sat May 5 16:37:14 2012 (r235059) @@ -121,16 +121,16 @@ lmc_parse_file(char *path) } } - fd = open(path, O_RDONLY); + fd = open(rpath, O_RDONLY); if (fd == -1) { - dbg("lm_init: open(\"%s\") failed, %s", path, + dbg("lm_parse_file: open(\"%s\") failed, %s", rpath, rtld_strerror(errno)); free(rpath); return; } if (fstat(fd, &st) == -1) { close(fd); - dbg("lm_init: fstat(\"%s\") failed, %s", path, + dbg("lm_parse_file: fstat(\"%s\") failed, %s", rpath, rtld_strerror(errno)); free(rpath); return; @@ -138,7 +138,7 @@ lmc_parse_file(char *path) lm_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if (lm_map == (const char *)MAP_FAILED) { close(fd); - dbg("lm_init: mmap(\"%s\") failed, %s", path, + dbg("lm_parse_file: mmap(\"%s\") failed, %s", rpath, rtld_strerror(errno)); free(rpath); return; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235061 - head/share/misc
Author: issyl0 (doc committer) Date: Sat May 5 16:50:12 2012 New Revision: 235061 URL: http://svn.freebsd.org/changeset/base/235061 Log: - Add my mentor/mentee relationship to committers-doc.dot. (where me = issyl0) Approved by: gabor (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot == --- head/share/misc/committers-doc.dot Sat May 5 16:41:17 2012 (r235060) +++ head/share/misc/committers-doc.dot Sat May 5 16:50:12 2012 (r235061) @@ -60,6 +60,7 @@ ganbold [label="Ganbold Tsagaankhuu\ngan gavin [label="Gavin Atkinson\nga...@freebsd.org\n2011/07/18"] gjb [label="Glen Barber\n...@freebsd.org\n2010/09/01"] hrs [label="Hiroki Sato\n...@freebsd.org\n2000/07/06"] +issyl0 [label="Isabell Long\niss...@freebsd.org\n2012/04/25"] jkois [label="Johann Kois\njk...@freebsd.org\n2004/11/11"] joel [label="Joel Dahl\nj...@freebsd.org\n2005/04/05"] keramida [label="Giorgos Keramidas\nkeram...@freebsd.org\n2001/10/12"] @@ -107,6 +108,7 @@ delphij -> loader gabor -> pgj gabor -> manolis gabor -> taras +gabor -> issyl0 gjb -> wblock ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235050 - head/sys/arm/arm
On May 5, 2012, at 10:19 AM, Nathan Whitehorn wrote: > On 05/05/12 02:15, Warner Losh wrote: >> Author: imp >> Date: Sat May 5 07:15:34 2012 >> New Revision: 235050 >> URL: http://svn.freebsd.org/changeset/base/235050 >> >> Log: >> Big endian arm boxes need to have a uname -m of armeb, not arm, so >> that the bootstrap from source works correctly. >> >> MFC after: 4 days >> >> Modified: >> head/sys/arm/arm/identcpu.c >> >> Modified: head/sys/arm/arm/identcpu.c >> == >> --- head/sys/arm/arm/identcpu.c Sat May 5 02:53:19 2012 >> (r235049) >> +++ head/sys/arm/arm/identcpu.c Sat May 5 07:15:34 2012 >> (r235050) >> @@ -52,11 +52,16 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> >> #include >> #include >> >> +#if _BYTE_ORDER == _LITTLE_ENDIAN >> char machine[] = "arm"; >> +#else >> +char machine[] = "armeb"; >> +#endif >> >> SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, >> machine, 0, "Machine class"); > > Didn't you mean to change MACHINE_ARCH in /sys/arm/include/param.h? Setting > MACHINE=armeb will break lots of things, including self-hosting. DOh! You're right... I'll fix that. :( Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235062 - head/sys/arm/arm
Author: imp Date: Sat May 5 17:20:12 2012 New Revision: 235062 URL: http://svn.freebsd.org/changeset/base/235062 Log: I need to change uname -p, not uname -m, so back this out. Also, fix a couple of style(9) issues while I'm here. Submitted by: nathanw, bde Modified: head/sys/arm/arm/identcpu.c Modified: head/sys/arm/arm/identcpu.c == --- head/sys/arm/arm/identcpu.c Sat May 5 16:50:12 2012(r235061) +++ head/sys/arm/arm/identcpu.c Sat May 5 17:20:12 2012(r235062) @@ -57,14 +57,10 @@ __FBSDID("$FreeBSD$"); #include #include -#if _BYTE_ORDER == _LITTLE_ENDIAN char machine[] = "arm"; -#else -char machine[] = "armeb"; -#endif SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, -machine, 0, "Machine class"); + machine, 0, "Machine class"); static const char * const generic_steppings[16] = { "rev 0","rev 1","rev 2","rev 3", @@ -140,7 +136,7 @@ static const char * const pxa2x0_steppin }; /* Steppings for PXA255/26x. - * rev 5: PXA26x B0, rev 6: PXA255 A0 + * rev 5: PXA26x B0, rev 6: PXA255 A0 */ static const char * const pxa255_steppings[16] = { "rev 0","rev 1","rev 2","step A-0", @@ -460,7 +456,7 @@ identify_arm_cpu(void) printf(" %dKB/%dB %d-way %s Data cache\n", arm_pdcache_size / 1024, arm_pdcache_line_size, arm_pdcache_ways, - wtnames[arm_pcache_type]); + wtnames[arm_pcache_type]); } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235063 - in head/sys: amd64/linux32 compat/linux i386/linux
Author: netchild Date: Sat May 5 19:42:38 2012 New Revision: 235063 URL: http://svn.freebsd.org/changeset/base/235063 Log: - >500 static DTrace probes for the linuxulator - DTrace scripts to check for errors, performance, ... they serve mostly as examples of what you can do with the static probe;s with moderate load the scripts may be overwhelmed, excessive lock-tracing may influence program behavior (see the last design decission) Design decissions: - use "linuxulator" as the provider for the native bitsize; add the bitsize for the non-native emulation (e.g. "linuxuator32" on amd64) - Add probes only for locks which are acquired in one function and released in another function. Locks which are aquired and released in the same function should be easy to pair in the code, inter-function locking is more easy to verify in DTrace. - Probes for locks should be fired after locking and before releasing to prevent races (to provide data/function stability in DTrace, see the man-page of "dtrace -v ..." and the corresponding DTrace docs). Added: head/sys/compat/linux/check_error.d (contents, props changed) head/sys/compat/linux/check_internal_locks.d (contents, props changed) head/sys/compat/linux/linux_dtrace.h (contents, props changed) head/sys/compat/linux/stats_timing.d (contents, props changed) head/sys/compat/linux/trace_futexes.d (contents, props changed) Modified: head/sys/amd64/linux32/linux.h head/sys/amd64/linux32/linux32_dummy.c head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_emul.h head/sys/compat/linux/linux_fork.c head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_sysctl.c head/sys/compat/linux/linux_time.c head/sys/compat/linux/linux_uid16.c head/sys/compat/linux/linux_util.c head/sys/compat/linux/linux_util.h head/sys/i386/linux/linux.h head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux32/linux.h == --- head/sys/amd64/linux32/linux.h Sat May 5 17:20:12 2012 (r235062) +++ head/sys/amd64/linux32/linux.h Sat May 5 19:42:38 2012 (r235063) @@ -42,6 +42,7 @@ extern u_char linux_debug_map[]; #defineldebug(name)isclr(linux_debug_map, LINUX_SYS_linux_ ## name) #defineARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid #defineLMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid +#defineLINUX_DTRACElinuxulator32 #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_LINUX); Modified: head/sys/amd64/linux32/linux32_dummy.c == --- head/sys/amd64/linux32/linux32_dummy.c Sat May 5 17:20:12 2012 (r235062) +++ head/sys/amd64/linux32/linux32_dummy.c Sat May 5 19:42:38 2012 (r235063) @@ -29,14 +29,23 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" +#include "opt_kdtrace.h" + #include +#include +#include #include #include #include #include +#include #include +/* DTrace init */ +LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); + DUMMY(stime); DUMMY(olduname); DUMMY(syslog); Added: head/sys/compat/linux/check_error.d == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/check_error.d Sat May 5 19:42:38 2012 (r235063) @@ -0,0 +1,144 @@ +#!/usr/sbin/dtrace -qs + +/*- + * Copyright (c) 2008-2012 Alexander Leidinger + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer + *in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF
svn commit: r235064 - head/sys/netinet
Author: tuexen Date: Sat May 5 20:07:33 2012 New Revision: 235064 URL: http://svn.freebsd.org/changeset/base/235064 Log: Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming requests. Fix also the provided result in the response and use names as specified in RFC 6525. MFC after: 3 days Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_header.h == --- head/sys/netinet/sctp_header.h Sat May 5 19:42:38 2012 (r235063) +++ head/sys/netinet/sctp_header.h Sat May 5 20:07:33 2012 (r235064) @@ -499,12 +499,13 @@ struct sctp_stream_reset_add_strm { uint16_t reserved; } SCTP_PACKED; -#define SCTP_STREAM_RESET_NOTHING 0x /* Nothing for me to do */ -#define SCTP_STREAM_RESET_PERFORMED 0x0001 /* Did it */ -#define SCTP_STREAM_RESET_REJECT0x0002 /* refused to do it */ -#define SCTP_STREAM_RESET_ERROR_STR 0x0003 /* bad Stream no */ -#define SCTP_STREAM_RESET_TRY_LATER 0x0004 /* collision, try again */ -#define SCTP_STREAM_RESET_BAD_SEQNO 0x0005 /* bad str-reset seq no */ +#define SCTP_STREAM_RESET_RESULT_NOTHING_TO_DO 0x/* XXX: unused */ +#define SCTP_STREAM_RESET_RESULT_PERFORMED 0x0001 +#define SCTP_STREAM_RESET_RESULT_DENIED 0x0002 +#define SCTP_STREAM_RESET_RESULT_ERR__WRONG_SSN 0x0003/* XXX: unused */ +#define SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS 0x0004 +#define SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO 0x0005 +#define SCTP_STREAM_RESET_RESULT_IN_PROGRESS 0x0006/* XXX: unused */ /* * convience structures, note that if you are making a request for specific Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sat May 5 19:42:38 2012 (r235063) +++ head/sys/netinet/sctp_input.c Sat May 5 20:07:33 2012 (r235064) @@ -3599,7 +3599,7 @@ sctp_handle_stream_reset_response(struct asoc->stream_reset_out_is_outstanding = 0; if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action == SCTP_STREAM_RESET_PERFORMED) { + if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { /* do it */ sctp_reset_out_streams(stcb, number_entries, srparam->list_of_streams); } else { @@ -3610,7 +3610,7 @@ sctp_handle_stream_reset_response(struct number_entries = (lparm_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action != SCTP_STREAM_RESET_PERFORMED) { + if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_IN, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); } @@ -3626,7 +3626,7 @@ sctp_handle_stream_reset_response(struct stcb->asoc.strm_pending_add_size = 0; if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action == SCTP_STREAM_RESET_PERFORMED) { + if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { /* Put the new streams into effect */ stcb->asoc.streamoutcnt += num_stream; sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, 0); @@ -3637,7 +3637,7 @@ sctp_handle_stream_reset_response(struct } else if (type == SCTP_STR_RESET_ADD_IN_STREAMS) { if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action != SCTP_STREAM_RESET_PERFORMED) { + if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, SCTP_STREAM_CHANGED_DENIED); } @@ -3655,7 +3655,7 @@ sctp_handle_stream_reset_response(struct /* huh ? */
svn commit: r235066 - head/sys/netinet
Author: tuexen Date: Sat May 5 21:41:16 2012 New Revision: 235066 URL: http://svn.freebsd.org/changeset/base/235066 Log: Provide the flags in the SCTP stream reconfig related notification as specified in RFC 6525. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_constants.h == --- head/sys/netinet/sctp_constants.h Sat May 5 21:40:32 2012 (r235065) +++ head/sys/netinet/sctp_constants.h Sat May 5 21:41:16 2012 (r235066) @@ -779,10 +779,9 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_SPECIAL_SP_FAIL 27 #define SCTP_NOTIFY_NO_PEER_AUTH28 #define SCTP_NOTIFY_SENDER_DRY 29 -#define SCTP_NOTIFY_STR_RESET_ADD_OK30 -#define SCTP_NOTIFY_STR_RESET_ADD_FAIL 31 -#define SCTP_NOTIFY_STR_RESET_INSTREAM_ADD_OK 32 -#define SCTP_NOTIFY_MAX 32 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT30 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 +#define SCTP_NOTIFY_MAX 31 /* This is the value for messages that are NOT completely Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sat May 5 21:40:32 2012 (r235065) +++ head/sys/netinet/sctp_input.c Sat May 5 21:41:16 2012 (r235066) @@ -3602,6 +3602,8 @@ sctp_handle_stream_reset_response(struct if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { /* do it */ sctp_reset_out_streams(stcb, number_entries, srparam->list_of_streams); + } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_OUT, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); } else { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_OUT, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); } @@ -3610,7 +3612,10 @@ sctp_handle_stream_reset_response(struct number_entries = (lparm_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { + if (action == SCTP_STREAM_RESET_RESULT_DENIED) { + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_IN, stcb, + number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); + } else if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_IN, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); } @@ -3630,16 +3635,22 @@ sctp_handle_stream_reset_response(struct /* Put the new streams into effect */ stcb->asoc.streamoutcnt += num_stream; sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, 0); + } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { + sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, + SCTP_STREAM_CHANGE_DENIED); } else { sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGED_DENIED); + SCTP_STREAM_CHANGE_FAILED); } } else if (type == SCTP_STR_RESET_ADD_IN_STREAMS) { if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; - if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { + if (action == SCTP_STREAM_RESET_RESULT_DENIED) { sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGED_DENIED); +
svn commit: r235068 - head/lib/libthr/thread
Author: davidxu Date: Sat May 5 23:51:24 2012 New Revision: 235068 URL: http://svn.freebsd.org/changeset/base/235068 Log: Fix mis-merged line, move SC_LOOKUP() call to upper level. Modified: head/lib/libthr/thread/thr_sleepq.c Modified: head/lib/libthr/thread/thr_sleepq.c == --- head/lib/libthr/thread/thr_sleepq.c Sat May 5 22:44:08 2012 (r235067) +++ head/lib/libthr/thread/thr_sleepq.c Sat May 5 23:51:24 2012 (r235068) @@ -113,11 +113,11 @@ _sleepq_add(void *wchan, struct pthread struct sleepqueue_chain *sc; struct sleepqueue *sq; + sc = SC_LOOKUP(wchan); sq = _sleepq_lookup(wchan); if (sq != NULL) { SLIST_INSERT_HEAD(&sq->sq_freeq, td->sleepqueue, sq_flink); } else { - sc = SC_LOOKUP(wchan); sq = td->sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On Sat, 5 May 2012, Bruce Evans wrote: On Fri, 4 May 2012, Doug Barton wrote: On 05/04/2012 11:22 AM, Baptiste Daroussin wrote: fetch -s "${FETCHFILE}" >${SIZEFILE} SIZE="`cat ${SIZEFILE}`" - SIZE="`expr ${SIZE} / 1024`" + SIZE=$((SIZE/1024)) Bug; should be '$SIZE/' No this is perfectly valid Yes, that works, but it's not our usual style. However, the point is moot as that whole block should be reduced down to: SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) The KNF rule that there shall be spaces around binary operators should probably apply in shell expressions too, but I don't like the spaces on 1 side of (( and )). Shell syntax doesn't even allow spaces between '$' ((. The "extra" spaces there are a personal style thing. I do it for 2 reasons, readability primarily, but also to distinguish arithmetic operations from $(command) style. The rc.d style seems to be to use backquotes and not use $(cmd), but I prefer the opposite except possibly in shell expressions like the above so that it is easier to separate the commands from the shell expressions. Yeah, backticks over $() is also a personal style issue, for no particular good reason other than "looks better to me." :) Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235069 - head/sys/geom/multipath
Author: mav Date: Sun May 6 05:49:23 2012 New Revision: 235069 URL: http://svn.freebsd.org/changeset/base/235069 Log: Fix `gmultipath configure` for big-endian machines. MFC after:1 week Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c == --- head/sys/geom/multipath/g_multipath.c Sat May 5 23:51:24 2012 (r235068) +++ head/sys/geom/multipath/g_multipath.c Sun May 6 05:49:23 2012 (r235069) @@ -944,7 +944,7 @@ g_multipath_ctl_configure(struct gctl_re struct g_geom *gp; struct g_consumer *cp; struct g_provider *pp; - struct g_multipath_metadata *md; + struct g_multipath_metadata md; const char *name; int error, *val; void *buf; @@ -980,14 +980,15 @@ g_multipath_ctl_configure(struct gctl_re return; } g_topology_unlock(); - md = buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); - strlcpy(md->md_magic, G_MULTIPATH_MAGIC, sizeof(md->md_magic)); - memcpy(md->md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); - strlcpy(md->md_name, name, sizeof(md->md_name)); - md->md_version = G_MULTIPATH_VERSION; - md->md_size = pp->mediasize; - md->md_sectorsize = pp->sectorsize; - md->md_active_active = sc->sc_active_active; + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); + strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_version = G_MULTIPATH_VERSION; + md.md_size = pp->mediasize; + md.md_sectorsize = pp->sectorsize; + md.md_active_active = sc->sc_active_active; + multipath_metadata_encode(&md, buf); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, pp->sectorsize); g_topology_lock(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235070 - head/sys/mips/gxemul
Author: jmallett Date: Sun May 6 05:58:56 2012 New Revision: 235070 URL: http://svn.freebsd.org/changeset/base/235070 Log: Get the memory size from the gxemul mp device. Don't dump the environment if it is not present. Added: head/sys/mips/gxemul/mpreg.h (contents, props changed) Modified: head/sys/mips/gxemul/files.gxemul head/sys/mips/gxemul/gxemul_machdep.c Modified: head/sys/mips/gxemul/files.gxemul == --- head/sys/mips/gxemul/files.gxemul Sun May 6 05:49:23 2012 (r235069) +++ head/sys/mips/gxemul/files.gxemul Sun May 6 05:58:56 2012 (r235070) @@ -3,3 +3,6 @@ dev/gxemul/cons/gxemul_cons.c optional mips/gxemul/gxemul_machdep.c standard mips/mips/intr_machdep.c standard mips/mips/tick.c standard + +dev/gxemul/disk/gxemul_disk.c optional gxemul_disk +dev/gxemul/ether/gxemul_ether.coptional gxemul_ether Modified: head/sys/mips/gxemul/gxemul_machdep.c == --- head/sys/mips/gxemul/gxemul_machdep.c Sun May 6 05:49:23 2012 (r235069) +++ head/sys/mips/gxemul/gxemul_machdep.c Sun May 6 05:58:56 2012 (r235070) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + extern int *edata; extern int *end; @@ -123,7 +125,6 @@ platform_start(__register_t a0, __regist int argc = a0; char **argv = (char **)a1; char **envp = (char **)a2; - unsigned int memsize = a3; int i; /* clear the BSS and SBSS segments */ @@ -152,14 +153,16 @@ platform_start(__register_t a0, __regist printf("%s ", argv[i]); printf("\n"); - printf("envp:\n"); - for (i = 0; envp[i]; i += 2) - printf("\t%s = %s\n", envp[i], envp[i+1]); - - printf("memsize = %08x\n", memsize); + if (envp != NULL) { + printf("envp:\n"); + for (i = 0; envp[i]; i += 2) + printf("\t%s = %s\n", envp[i], envp[i+1]); + } else { + printf("no envp.\n"); + } } - realmem = btoc(memsize); + realmem = btoc(GXEMUL_MP_DEV_READ(GXEMUL_MP_DEV_MEMORY)); mips_init(); mips_timer_init_params(platform_counter_freq, 0); Added: head/sys/mips/gxemul/mpreg.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/gxemul/mpreg.hSun May 6 05:58:56 2012 (r235070) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2004-2012 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef_MIPS_GXEMUL_MPREG_H_ +#define_MIPS_GXEMUL_MPREG_H_ + +#defineGXEMUL_MP_DEV_BASE 0x1100 + +#defineGXEMUL_MP_DEV_WHOAMI0x +#defineGXEMUL_MP_DEV_NCPUS 0x0010 +#defineGXEMUL_MP_DEV_START 0x0020 +#defineGXEMUL_MP_DEV_STARTADDR 0x0030 +#defineGXEMUL_MP_DEV_STACK 0x0070 +#defineGXEMUL_MP_DEV_MEMORY0x0090 +#defineGXEMUL_MP_DEV_IPI_ONE 0x00a0 +#defineGXEMUL_MP_DEV_IPI_MANY 0x00b0 +#defineGXEMUL_MP_DEV_IPI_READ 0x00c0 + +#defineGXEMUL_MP_DEV_FUNCTION(f) \ + (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) +#defineGXEMUL_MP_DEV_READ(f)
svn commit: r235071 - head/sbin/geom/class/raid
Author: mav Date: Sun May 6 06:25:17 2012 New Revision: 235071 URL: http://svn.freebsd.org/changeset/base/235071 Log: Add description for GEOM RAID tunables/sysctls. MFC after:1 week Modified: head/sbin/geom/class/raid/graid.8 Modified: head/sbin/geom/class/raid/graid.8 == --- head/sbin/geom/class/raid/graid.8 Sun May 6 05:58:56 2012 (r235070) +++ head/sbin/geom/class/raid/graid.8 Sun May 6 06:25:17 2012 (r235071) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2012 +.Dd May 6, 2012 .Dt GRAID 8 .Os .Sh NAME @@ -276,6 +276,33 @@ corruption! .Sh 2TiB BARRIERS Promise metadata format does not support disks above 2TiB. NVIDIA metadata format does not support volumes above 2TiB. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variable can be used to control the behavior of the +.Nm RAID +GEOM class. +.Bl -tag -width indent +.It Va kern.geom.raid.aggressive_spare : No 0 +Use any disks without metadata connected to controllers of the vendor +matching to volume metadata format as spare. +Use it with much care to not lose data if connecting unrelated disk! +.It Va kern.geom.raid.clean_time : No 5 +Mark volume as clean when idle for the specified number of seconds. +.It Va kern.geom.raid.debug : No 0 +Debug level of the +.Nm RAID +GEOM class. +.It Va kern.geom.raid.idle_threshold : No 100 +Time in microseconds to consider a volume idle for rebuild puroses. +.It Va kern.geom.raid.name_format : No 0 +Providers name format: 0 -- raid/r{num}, 1 -- raid/{label}. +.It Va kern.geom.raid.read_err_thresh : No 10 +Number of read errors equated to disk failure. +Write errors are always considered as disk failures. +.It Va kern.geom.raid.start_timeout : No 30 +Time to wait for missing array components on startup. +.El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. .Sh SEE ALSO ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"