svn commit: r298098 - in head: include sbin share sys targets usr.bin/calendar usr.bin/colldef usr.bin/mkimg usr.bin/mklocale usr.bin/procstat usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyveload us...
Author: gjb Date: Sat Apr 16 04:09:31 2016 New Revision: 298098 URL: https://svnweb.freebsd.org/changeset/base/298098 Log: Final pass through bogus svn:mergeinfo removal. Note, paths part of 'contrib' were left alone for now. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: head/include/ (props changed) head/sbin/ (props changed) head/share/ (props changed) head/sys/ (props changed) head/targets/ (props changed) head/usr.bin/calendar/ (props changed) head/usr.bin/colldef/ (props changed) head/usr.bin/mkimg/ (props changed) head/usr.bin/mklocale/ (props changed) head/usr.bin/procstat/ (props changed) head/usr.sbin/bhyve/ (props changed) head/usr.sbin/bhyvectl/ (props changed) head/usr.sbin/bhyveload/ (props changed) head/usr.sbin/jail/ (props changed) head/usr.sbin/ndiscvt/ (props changed) head/usr.sbin/rtadvctl/ (props changed) head/usr.sbin/rtadvd/ (props changed) head/usr.sbin/rtsold/ (props changed) head/usr.sbin/zic/ (props changed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298096 - in head: lib/libc lib/libc/stdtime lib/libedit lib/libedit/edit/readline lib/libutil lib/libvmmapi lib/libz sbin/dumpon sbin/ipfw share/man/man4 share/zoneinfo sys/amd64/inclu...
Author: gjb Date: Sat Apr 16 03:56:28 2016 New Revision: 298096 URL: https://svnweb.freebsd.org/changeset/base/298096 Log: Prune bogus svn:mergeinfo from directores on which it should not ever be present. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: head/lib/libc/ (props changed) head/lib/libc/stdtime/ (props changed) head/lib/libedit/ (props changed) head/lib/libedit/edit/readline/ (props changed) head/lib/libutil/ (props changed) head/lib/libvmmapi/ (props changed) head/lib/libz/ (props changed) head/sbin/dumpon/ (props changed) head/sbin/ipfw/ (props changed) head/share/man/man4/ (props changed) head/share/zoneinfo/ (props changed) head/sys/amd64/include/xen/ (props changed) head/sys/amd64/vmm/ (props changed) head/sys/boot/ (props changed) head/sys/boot/powerpc/boot1.chrp/ (props changed) head/sys/boot/powerpc/kboot/ (props changed) head/sys/boot/powerpc/ofw/ (props changed) head/sys/conf/ (props changed) head/sys/dev/bvm/ (props changed) head/sys/dev/hyperv/ (props changed) head/sys/gnu/dts/ (props changed) head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/modules/hyperv/ (props changed) head/sys/modules/vmm/ (props changed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298094 - in head: contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter share/doc/usd/10.exref/e...
Author: gjb Date: Sat Apr 16 03:44:50 2016 New Revision: 298094 URL: https://svnweb.freebsd.org/changeset/base/298094 Log: Remove svn:mergeinfo on files with which it should never have existed. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: head/contrib/ipfilter/ml_ipl.c (props changed) head/contrib/ipfilter/mlfk_ipl.c (props changed) head/contrib/ipfilter/mlh_rule.c (props changed) head/contrib/ipfilter/mli_ipl.c (props changed) head/contrib/ipfilter/mln_ipl.c (props changed) head/contrib/ipfilter/mls_ipl.c (props changed) head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h (props changed) head/share/doc/usd/10.exref/exref/ex.rm (props changed) head/share/doc/usd/10.exref/summary/ex.summary (props changed) head/share/doc/usd/11.vitut/edittut.ms (props changed) head/share/doc/usd/12.vi/summary/vi.summary (props changed) head/share/doc/usd/12.vi/vi/vi.chars (props changed) head/share/doc/usd/12.vi/vi/vi.in (props changed) head/share/doc/usd/12.vi/viapwh/vi.apwh.ms (props changed) head/share/doc/usd/13.viref/ex.cmd.roff (props changed) head/share/doc/usd/13.viref/ref.so (props changed) head/share/doc/usd/13.viref/set.opt.roff (props changed) head/share/doc/usd/13.viref/vi.cmd.roff (props changed) head/share/doc/usd/13.viref/vi.ref (props changed) head/share/examples/kld/random_adaptor/random_adaptor_example.c (props changed) head/share/man/man4/bhyve.4 (props changed) head/share/mk/bsd.arch.inc.mk (props changed) head/sys/amd64/include/vmm.h (props changed) head/sys/amd64/include/vmm_dev.h (props changed) head/sys/amd64/include/vmm_instruction_emul.h (props changed) head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (props changed) head/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (props changed) head/sys/mips/beri/fdt_ic_if.m (props changed) head/sys/x86/include/acpica_machdep.h (props changed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298090 - head/tests/sys/aio
Author: jhb Date: Sat Apr 16 00:01:16 2016 New Revision: 298090 URL: https://svnweb.freebsd.org/changeset/base/298090 Log: Add a test for cancelling an active AIO request on a socket. The older AIO code awakened all pending AIO requests on a socket when any data arrived. This could result in AIO daemons blocking on an empty socket buffer. These requests could not be cancelled which led to a deadlock during process exit. This test reproduces this case. The newer AIO code is able to cancel the pending AIO request correctly. Reviewed by: ngie (-ish) Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D4363 Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c == --- head/tests/sys/aio/aio_test.c Fri Apr 15 22:31:22 2016 (r298089) +++ head/tests/sys/aio/aio_test.c Sat Apr 16 00:01:16 2016 (r298090) @@ -722,6 +722,65 @@ finished: close(fd); } +/* + * This tests for a bug where arriving socket data can wakeup multiple + * AIO read requests resulting in an uncancellable request. + */ +ATF_TC_WITHOUT_HEAD(aio_socket_two_reads); +ATF_TC_BODY(aio_socket_two_reads, tc) +{ + struct ioreq { + struct aiocb iocb; + char buffer[1024]; + } ioreq[2]; + struct aiocb *iocb; + unsigned i; + int s[2]; + char c; + + ATF_REQUIRE_KERNEL_MODULE("aio"); +#if __FreeBSD_version < 1100101 + aft_tc_skip("kernel version %d is too old (%d required)", + __FreeBSD_version, 1100101); +#endif + + ATF_REQUIRE(socketpair(PF_UNIX, SOCK_STREAM, 0, s) != -1); + + /* Queue two read requests. */ + memset(, 0, sizeof(ioreq)); + for (i = 0; i < nitems(ioreq); i++) { + ioreq[i].iocb.aio_nbytes = sizeof(ioreq[i].buffer); + ioreq[i].iocb.aio_fildes = s[0]; + ioreq[i].iocb.aio_buf = ioreq[i].buffer; + ATF_REQUIRE(aio_read([i].iocb) == 0); + } + + /* Send a single byte. This should complete one request. */ + c = 0xc3; + ATF_REQUIRE(write(s[1], , sizeof(c)) == 1); + + ATF_REQUIRE(aio_waitcomplete(, NULL) == 1); + + /* Determine which request completed and verify the data was read. */ + if (iocb == [0].iocb) + i = 0; + else + i = 1; + ATF_REQUIRE(ioreq[i].buffer[0] == c); + + i ^= 1; + + /* +* Try to cancel the other request. On broken systems this +* will fail and the process will hang on exit. +*/ + ATF_REQUIRE(aio_error([i].iocb) == EINPROGRESS); + ATF_REQUIRE(aio_cancel(s[0], [i].iocb) == AIO_CANCELED); + + close(s[1]); + close(s[0]); +} + ATF_TP_ADD_TCS(tp) { @@ -732,6 +791,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, aio_pipe_test); ATF_TP_ADD_TC(tp, aio_md_test); ATF_TP_ADD_TC(tp, aio_large_read_test); + ATF_TP_ADD_TC(tp, aio_socket_two_reads); return (atf_no_error()); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r298011 - head/sys/cam/ata
-Original Message- From:on behalf of Warner Losh Date: 2016-04-15, Friday at 16:15 To: Dmitry Morozovsky Cc: Ronald Klop , "svn-src-head@freebsd.org" , "svn-src-...@freebsd.org" , src-committers , Warner Losh Subject: Re: svn commit: r298011 - head/sys/cam/ata >... The 60s value has always been nuts since even the largest caches on the >slowest drives can be flushed in under a second. ... I'm not so sure about that. I've got an HDD with 256MB cache; even if it were all sequential, flushing that to the media would likely take more than a second. If it were mostly random, it would be well over a second. That said, I agree that a full minute is overkill. -Ravi (rpokala@) >Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r298011 - head/sys/cam/ata
On Fri, Apr 15, 2016 at 3:45 PM, Dmitry Morozovskywrote: > On Fri, 15 Apr 2016, Warner Losh wrote: > > > A shorter timeout dramatically cuts the length of time that the > > queue has to be frozen for error recovery. This allows one, > > in theory, to recover the system more quickly after a drive > > goes off into the weeds. > > May be make some more generic changes? Could we detect SSD vs spinning > disk vs > unknown and set timeouts accordigly to the nature of the underlying device? I suppose we could, but keep in mind that this code is part of what helps us at work to more quickly detect and recover from spinning disk failure. The 60s value has always been nuts since even the largest caches on the slowest drives can be flushed in under a second. If there are different defaults for the different drives types and performance profiles, this is almost certainly not going to be one of the ones that would be different. Warner > > > > Warner > > > > > > > On Apr 15, 2016, at 9:23 AM, Ronald Klop wrote: > > > > > > Hello, > > > > > > Out of curiosity, what are these big problems? Broken device or other > things (timeouts/triggers/full queues) going on in the kernel? > > > > > > Regards, > > > Ronald. > > > > > > > > > On Fri, 15 Apr 2016 00:13:46 +0200, Warner Losh > wrote: > > > > > >> Author: imp > > >> Date: Thu Apr 14 22:13:46 2016 > > >> New Revision: 298011 > > >> URL: https://svnweb.freebsd.org/changeset/base/298011 > > >> erLog: > > >> Add a comment about why the timeout for flush was lowered to 5s. > > >> > > >> Modified: > > >> head/sys/cam/ata/ata_da.c > > >> > > >> Modified: head/sys/cam/ata/ata_da.c > > >> > == > > >> --- head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:44 2016 > (r298010) > > >> +++ head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:46 2016 > (r298011) > > >> @@ -912,6 +912,11 @@ adadump(void *arg, void *virtual, vm_off > > >>if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { > > >>xpt_setup_ccb(_h, periph->path, > CAM_PRIORITY_NORMAL); > > >> + /* > > >> + * Tell the drive to flush its intenral cache. if we > > >> + * can't flush in 5s we have big problems. No need to > > >> + * wait the default 60s to detect problems. > > >> + */ > > >>ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > > >>cam_fill_ataio(, > > >>0, > > >> ___ > > >> svn-src-...@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 > " > > > > > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: ma...@freebsd.org ] > > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r298026 - head/sys/cam/scsi
On Friday, April 15, 2016 03:09:58 AM Warner Losh wrote: > Author: imp > Date: Fri Apr 15 03:09:58 2016 > New Revision: 298026 > URL: https://svnweb.freebsd.org/changeset/base/298026 > > Log: > Use the new TUNABLE_INT64 to match the type of sbintime_t. This seems odd and possibly broken. The tunable should accept the same values in the same units as the sysctl (e.g. milliseconds here, not a 64-bit fixed-point sbintime_t). Also, in HEAD if you just add CTLFLAG_TUN you will get that for free I think (as the sysctl code in HEAD will parse the integer from the tunable and pass it to your SYSCTL_PROC handler during boot). -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298089 - in head: sbin/dump sbin/fsck_ffs sbin/ifconfig sbin/mount_nfs usr.bin/bsdiff/bsdiff usr.bin/bsdiff/bspatch usr.bin/calendar usr.bin/rpcgen usr.bin/showmount usr.bin/sort usr.b...
Author: pfg Date: Fri Apr 15 22:31:22 2016 New Revision: 298089 URL: https://svnweb.freebsd.org/changeset/base/298089 Log: Cleanup unnecessary semicolons from utilities we all love. Modified: head/sbin/dump/optr.c head/sbin/fsck_ffs/globs.c head/sbin/ifconfig/sfp.c head/sbin/mount_nfs/mount_nfs.c head/usr.bin/bsdiff/bsdiff/bsdiff.c head/usr.bin/bsdiff/bspatch/bspatch.c head/usr.bin/calendar/dates.c head/usr.bin/calendar/io.c head/usr.bin/rpcgen/rpc_cout.c head/usr.bin/rpcgen/rpc_main.c head/usr.bin/rpcgen/rpc_parse.c head/usr.bin/rpcgen/rpc_svcout.c head/usr.bin/rpcgen/rpc_util.c head/usr.bin/showmount/showmount.c head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/truss/syscalls.c head/usr.bin/xlint/lint1/func.c head/usr.bin/xstr/xstr.c head/usr.sbin/keyserv/keyserv.c head/usr.sbin/lmcconfig/lmcconfig.c head/usr.sbin/mountd/mountd.c head/usr.sbin/nfscbd/nfscbd.c head/usr.sbin/nfsd/nfsd.c head/usr.sbin/pmcstudy/pmcstudy.c head/usr.sbin/portsnap/phttpget/phttpget.c head/usr.sbin/ppp/radius.c Modified: head/sbin/dump/optr.c == --- head/sbin/dump/optr.c Fri Apr 15 21:31:40 2016(r298088) +++ head/sbin/dump/optr.c Fri Apr 15 22:31:22 2016(r298089) @@ -403,7 +403,7 @@ lastdump(int arg) /* w ==> just what to dumpme = tnow > (dtwalk->dd_ddate - (tlast->tm_hour * 3600) - (tlast->tm_min * 60) - tlast->tm_sec + (dt->fs_freq * 86400)); - }; + } if (arg != 'w' || dumpme) (void) printf( "%c %8s\t(%6s) Last dump: Level %d, Date %s\n", Modified: head/sbin/fsck_ffs/globs.c == --- head/sbin/fsck_ffs/globs.c Fri Apr 15 21:31:40 2016(r298088) +++ head/sbin/fsck_ffs/globs.c Fri Apr 15 22:31:22 2016(r298089) @@ -118,7 +118,7 @@ fsckinit(void) bzero(totalreadcnt, sizeof(long) * BT_NUMBUFTYPES); bzero(readtime, sizeof(struct timespec) * BT_NUMBUFTYPES); bzero(totalreadtime, sizeof(struct timespec) * BT_NUMBUFTYPES); - bzero(, sizeof(struct timespec));; + bzero(, sizeof(struct timespec)); bzero(, sizeof(struct bufarea)); pdirbp = NULL; pbp = NULL; Modified: head/sbin/ifconfig/sfp.c == --- head/sbin/ifconfig/sfp.cFri Apr 15 21:31:40 2016(r298088) +++ head/sbin/ifconfig/sfp.cFri Apr 15 22:31:22 2016(r298089) @@ -911,6 +911,6 @@ sfp_status(int s, struct ifreq *ifr, int break; default: print_sfp_status(, verbose); - }; + } } Modified: head/sbin/mount_nfs/mount_nfs.c == --- head/sbin/mount_nfs/mount_nfs.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/sbin/mount_nfs/mount_nfs.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1027,7 +1027,7 @@ xdr_fh(XDR *xdrsp, struct nfhret *np) if (!authfnd && (authcnt > 0 || np->auth != AUTH_SYS)) np->stat = EAUTH; return (1); - }; + } return (0); } Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c == --- head/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Apr 15 22:31:22 2016 (r298089) @@ -57,24 +57,24 @@ static void split(off_t *I,off_t *V,off_ if(V[I[k+i]+h]
Re: svn commit: r298011 - head/sys/cam/ata
On Fri, 15 Apr 2016, Warner Losh wrote: > A shorter timeout dramatically cuts the length of time that the > queue has to be frozen for error recovery. This allows one, > in theory, to recover the system more quickly after a drive > goes off into the weeds. May be make some more generic changes? Could we detect SSD vs spinning disk vs unknown and set timeouts accordigly to the nature of the underlying device? > > Warner > > > > On Apr 15, 2016, at 9:23 AM, Ronald Klopwrote: > > > > Hello, > > > > Out of curiosity, what are these big problems? Broken device or other > > things (timeouts/triggers/full queues) going on in the kernel? > > > > Regards, > > Ronald. > > > > > > On Fri, 15 Apr 2016 00:13:46 +0200, Warner Losh wrote: > > > >> Author: imp > >> Date: Thu Apr 14 22:13:46 2016 > >> New Revision: 298011 > >> URL: https://svnweb.freebsd.org/changeset/base/298011 > >> erLog: > >> Add a comment about why the timeout for flush was lowered to 5s. > >> > >> Modified: > >> head/sys/cam/ata/ata_da.c > >> > >> Modified: head/sys/cam/ata/ata_da.c > >> == > >> --- head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:44 2016 > >> (r298010) > >> +++ head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:46 2016 > >> (r298011) > >> @@ -912,6 +912,11 @@ adadump(void *arg, void *virtual, vm_off > >>if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { > >>xpt_setup_ccb(_h, periph->path, CAM_PRIORITY_NORMAL); > >> + /* > >> + * Tell the drive to flush its intenral cache. if we > >> + * can't flush in 5s we have big problems. No need to > >> + * wait the default 60s to detect problems. > >> + */ > >>ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > >>cam_fill_ataio(, > >>0, > >> ___ > >> svn-src-...@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" > > -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298088 - head/sys/conf
Author: loos Date: Fri Apr 15 21:31:40 2016 New Revision: 298088 URL: https://svnweb.freebsd.org/changeset/base/298088 Log: Replace with . No functional change. Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Fri Apr 15 20:27:36 2016(r298087) +++ head/sys/conf/NOTES Fri Apr 15 21:31:40 2016(r298088) @@ -719,7 +719,7 @@ options ALTQ_CBQ# Class Based Queueing optionsALTQ_RED# Random Early Detection optionsALTQ_RIO# RED In/Out optionsALTQ_HFSC # Hierarchical Packet Scheduler -optionsALTQ_FAIRQ # Fair Packet Scheduler +optionsALTQ_FAIRQ # Fair Packet Scheduler optionsALTQ_CDNR # Traffic conditioner optionsALTQ_PRIQ # Priority Queueing optionsALTQ_NOPCC # Required if the TSC is unusable ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298087 - in head: cddl/lib/libdtrace share/man/man4
Author: hiren Date: Fri Apr 15 20:27:36 2016 New Revision: 298087 URL: https://svnweb.freebsd.org/changeset/base/298087 Log: Fix the 'type' for a few variables from tcpcb. Reviewed by: markj Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D5973 Modified: head/cddl/lib/libdtrace/tcp.d head/share/man/man4/dtrace_tcp.4 Modified: head/cddl/lib/libdtrace/tcp.d == --- head/cddl/lib/libdtrace/tcp.d Fri Apr 15 20:19:32 2016 (r298086) +++ head/cddl/lib/libdtrace/tcp.d Fri Apr 15 20:27:36 2016 (r298087) @@ -108,16 +108,16 @@ typedef struct tcpsinfo { uint32_t tcps_snxt; /* next sequence # to send */ uint32_t tcps_rack; /* sequence # we have acked */ uint32_t tcps_rnxt; /* next sequence # expected */ - uint32_t tcps_swnd; /* send window size */ + u_long tcps_swnd; /* send window size */ int32_t tcps_snd_ws;/* send window scaling */ uint32_t tcps_swl1; /* window update seg seq number */ uint32_t tcps_swl2; /* window update seg ack number */ uint32_t tcps_rup; /* receive urgent pointer */ uint32_t tcps_radv; /* advertised window */ - uint32_t tcps_rwnd; /* receive window size */ + u_long tcps_rwnd; /* receive window size */ int32_t tcps_rcv_ws;/* receive window scaling */ - uint32_t tcps_cwnd; /* congestion window */ - uint32_t tcps_cwnd_ssthresh;/* threshold for congestion avoidance */ + u_long tcps_cwnd; /* congestion window */ + u_long tcps_cwnd_ssthresh; /* threshold for congestion avoidance */ uint32_t tcps_srecover; /* for use in NewReno Fast Recovery */ uint32_t tcps_sack_fack;/* SACK sequence # we have acked */ uint32_t tcps_sack_snxt;/* next SACK seq # for retransmission */ Modified: head/share/man/man4/dtrace_tcp.4 == --- head/share/man/man4/dtrace_tcp.4Fri Apr 15 20:19:32 2016 (r298086) +++ head/share/man/man4/dtrace_tcp.4Fri Apr 15 20:27:36 2016 (r298087) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2015 +.Dd April 15, 2016 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -217,17 +217,17 @@ Next sequence number for send. Sequence number of received and acknowledged data. .It Vt uint32_t tcps_rnxt Next expected sequence number for receive. -.It Vt uint32_t tcps_swnd +.It Vt u_long tcps_swnd TCP send window size. .It Vt int32_t tcps_snd_ws Window scaling factor for the TCP send window. -.It Vt uint32_t tcps_rwnd +.It Vt u_long tcps_rwnd TCP receive window size. .It Vt int32_t tcps_rcv_ws Window scaling factor for the TCP receive window. -.It Vt uint32_t tcps_cwnd +.It Vt u_long tcps_cwnd TCP congestion window size. -.It Vt uint32_t tcps_cwnd_ssthresh +.It Vt u_long tcps_cwnd_ssthresh Congestion window threshold at which slow start ends and congestion avoidance begins. .It Vt uint32_t tcps_sack_fack ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298086 - head/sbin/savecore
Author: cem Date: Fri Apr 15 20:19:32 2016 New Revision: 298086 URL: https://svnweb.freebsd.org/changeset/base/298086 Log: savecore(8): Explicitly cast to fix i386 warning Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c == --- head/sbin/savecore/savecore.c Fri Apr 15 19:06:36 2016 (r298085) +++ head/sbin/savecore/savecore.c Fri Apr 15 20:19:32 2016 (r298086) @@ -506,7 +506,7 @@ DoFile(const char *savedir, const char * } } if (lseek(fd, lasthd, SEEK_SET) != lasthd || - read(fd, temp, sectorsize) != sectorsize) { + read(fd, temp, sectorsize) != (ssize_t)sectorsize) { syslog(LOG_ERR, "error reading last dump header at offset %lld in %s: %m", (long long)lasthd, device); @@ -584,7 +584,7 @@ DoFile(const char *savedir, const char * dumpsize = dtoh64(kdhl.dumplength); firsthd = lasthd - dumpsize - sectorsize; if (lseek(fd, firsthd, SEEK_SET) != firsthd || - read(fd, temp, sectorsize) != sectorsize) { + read(fd, temp, sectorsize) != (ssize_t)sectorsize) { syslog(LOG_ERR, "error reading first dump header at offset %lld in %s: %m", (long long)firsthd, device); @@ -743,7 +743,7 @@ nuke: memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof(kdhl.magic)); memcpy(temp, , sizeof(kdhl)); if (lseek(fd, lasthd, SEEK_SET) != lasthd || - write(fd, temp, sectorsize) != sectorsize) + write(fd, temp, sectorsize) != (ssize_t)sectorsize) syslog(LOG_ERR, "error while clearing the dump header: %m"); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298085 - head/contrib/elftoolchain/elfcopy
Author: emaste Date: Fri Apr 15 19:06:36 2016 New Revision: 298085 URL: https://svnweb.freebsd.org/changeset/base/298085 Log: elfcopy: fix symbol table handling when sections come after symtab/strtab Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab, .strtab and .shstrtab sections in the end of the output object. If the input objects have more sections after any of these 3 sections, the section table will be reordered, and in that case the section symbols should be regenerated for relocations. The bug is triggered since newer clang puts .strtab section in the beginning of the object produced. Ticket: #525 Reported by: royger Obtained from:ELF Tool Chain r3443 Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c == --- head/contrib/elftoolchain/elfcopy/sections.cFri Apr 15 18:49:26 2016(r298084) +++ head/contrib/elftoolchain/elfcopy/sections.cFri Apr 15 19:06:36 2016(r298085) @@ -343,7 +343,7 @@ create_scn(struct elfcopy *ecp) GElf_Shdrish; size_t indx; uint64_t oldndx, newndx; - int elferr, sec_flags; + int elferr, sec_flags, reorder; /* * Insert a pseudo section that contains the ELF header @@ -367,6 +367,7 @@ create_scn(struct elfcopy *ecp) errx(EXIT_FAILURE, "elf_getshstrndx failed: %s", elf_errmsg(-1)); + reorder = 0; is = NULL; while ((is = elf_nextscn(ecp->ein, is)) != NULL) { if (gelf_getshdr(is, ) == NULL) @@ -482,8 +483,20 @@ create_scn(struct elfcopy *ecp) /* create section header based on input object. */ if (strcmp(name, ".symtab") != 0 && strcmp(name, ".strtab") != 0 && - strcmp(name, ".shstrtab") != 0) + strcmp(name, ".shstrtab") != 0) { copy_shdr(ecp, s, NULL, 0, sec_flags); + /* +* elfcopy puts .symtab, .strtab and .shstrtab +* sections in the end of the output object. +* If the input objects have more sections +* after any of these 3 sections, the section +* table will be reordered. section symbols +* should be regenerated for relocations. +*/ + if (reorder) + ecp->flags &= ~SYMTAB_INTACT; + } else + reorder = 1; if (strcmp(name, ".symtab") == 0) { ecp->flags |= SYMTAB_EXIST; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298084 - head/share/mk
Author: bdrewery Date: Fri Apr 15 18:49:26 2016 New Revision: 298084 URL: https://svnweb.freebsd.org/changeset/base/298084 Log: Document SHLIB/SHLIB_CXX/NO_PIC. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README == --- head/share/mk/bsd.READMEFri Apr 15 18:46:15 2016(r298083) +++ head/share/mk/bsd.READMEFri Apr 15 18:49:26 2016(r298084) @@ -419,12 +419,16 @@ with the current needs of the BSD tree. It sets/uses the following variables: -LIBThe name of the library to build. +LIBThe name of the library to build. Both a shared and static + library will be built. NO_PIC can be set to only build a + static library. LIB_CXXThe name of the library to build. It also causes to link the library with the standard C++ library. LIB_CXX overrides the value - of LIB if LIB is also set. + of LIB if LIB is also set. Both a shared and static library + will be built. NO_PIC can be set to only build a static + library. LIBDIR Target directory for libraries. @@ -449,6 +453,10 @@ SRCS List of source files to build the to .c files of the same name. (This is not the default for versions of make.) +SHLIB Like LIB but only builds a shared library. + +SHLIB_CXX Like LIB_CXX but only builds a shared library. + SHLIB_LDSCRIPT Template file to generate shared library linker script. Unless used, a simple symlink is created to the real shared object. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298083 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/encoder/cbor contrib/libxo/libxo contrib/libxo/packaging contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib...
Author: phil Date: Fri Apr 15 18:46:15 2016 New Revision: 298083 URL: https://svnweb.freebsd.org/changeset/base/298083 Log: Import to 0.6.1 0.5.0: document "trim" modifier add xo_emit_field functions Add xo_set_file{,_h} functions Fix LIBXO_* variables; add -L and -I as needed add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url' fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it flush after transitions; fix flush call in xo_do_emit mkdir the version-specific packaging dir use "XO_" instead of LIBXO_ 0.6.0: Add --with-retain-size to set the size (in bits) of the retain hash buckets Add The Argument Modifier ({a:}) Add retain and no-retain to --libxo autoconf: Add test for monitor.h Document quote heuristic go deep with nroff backslashes Use "ULL" for 32 bit check add xo_retain_clear and xo_retain_clear_all docs: combine two 'handles' section; move command line argument section handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD) make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use. new xo_emit_f functions nuke some unused UNUSEDs test code: path must be static update test cases 0.6.1: fix version number (missed a commit during new-release) Reviewed by: sjg Approved by: sjg (mentor) Added: head/contrib/libxo/libxo/xo_emit_f.3 - copied unchanged from r298078, vendor/Juniper/libxo/dist/libxo/xo_emit_f.3 head/contrib/libxo/tests/core/saved/test_12.E.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.E.err head/contrib/libxo/tests/core/saved/test_12.E.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.E.out head/contrib/libxo/tests/core/saved/test_12.H.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.H.err head/contrib/libxo/tests/core/saved/test_12.H.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.H.out head/contrib/libxo/tests/core/saved/test_12.HIPx.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.HIPx.err head/contrib/libxo/tests/core/saved/test_12.HIPx.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.HIPx.out head/contrib/libxo/tests/core/saved/test_12.HP.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.HP.err head/contrib/libxo/tests/core/saved/test_12.HP.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.HP.out head/contrib/libxo/tests/core/saved/test_12.J.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.J.err head/contrib/libxo/tests/core/saved/test_12.J.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.J.out head/contrib/libxo/tests/core/saved/test_12.JP.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.JP.err head/contrib/libxo/tests/core/saved/test_12.JP.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.JP.out head/contrib/libxo/tests/core/saved/test_12.T.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.T.err head/contrib/libxo/tests/core/saved/test_12.T.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.T.out head/contrib/libxo/tests/core/saved/test_12.X.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.X.err head/contrib/libxo/tests/core/saved/test_12.X.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.X.out head/contrib/libxo/tests/core/saved/test_12.XP.err - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.XP.err head/contrib/libxo/tests/core/saved/test_12.XP.out - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/saved/test_12.XP.out head/contrib/libxo/tests/core/test_12.c - copied unchanged from r298078, vendor/Juniper/libxo/dist/tests/core/test_12.c Modified: head/contrib/libxo/Makefile.am head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo-manual.html head/contrib/libxo/doc/libxo.txt head/contrib/libxo/encoder/cbor/enc_cbor.c head/contrib/libxo/libxo-config.in head/contrib/libxo/libxo/libxo.c head/contrib/libxo/libxo/xo.h head/contrib/libxo/libxo/xo_format.5 head/contrib/libxo/libxo/xo_parse_args.3 head/contrib/libxo/packaging/libxo.pc.in
svn commit: r298082 - head/share/mk
Author: bdrewery Date: Fri Apr 15 18:43:54 2016 New Revision: 298082 URL: https://svnweb.freebsd.org/changeset/base/298082 Log: Add SHLIB_CXX to allow building a C++ shared library without a static one. Submitted by: ngie Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkFri Apr 15 18:42:10 2016(r298081) +++ head/share/mk/bsd.lib.mkFri Apr 15 18:43:54 2016(r298082) @@ -4,12 +4,17 @@ .include -.if defined(LIB_CXX) -LIB= ${LIB_CXX} +.if defined(LIB_CXX) || defined(SHLIB_CXX) _LD= ${CXX} .else _LD= ${CC} .endif +.if defined(LIB_CXX) +LIB= ${LIB_CXX} +.endif +.if defined(SHLIB_CXX) +SHLIB= ${SHLIB_CXX} +.endif LIB_PRIVATE= ${PRIVATELIB:Dprivate} # Set up the variables controlling shared libraries. After this section, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298079 - head
Author: bdrewery Date: Fri Apr 15 18:32:05 2016 New Revision: 298079 URL: https://svnweb.freebsd.org/changeset/base/298079 Log: Set CPP from XCPP for the libcompat build. Submitted by: Mark MillardModified: head/Makefile.libcompat Modified: head/Makefile.libcompat == --- head/Makefile.libcompat Fri Apr 15 18:03:53 2016(r298078) +++ head/Makefile.libcompat Fri Apr 15 18:32:05 2016(r298079) @@ -94,6 +94,7 @@ LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NO .endif LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \ CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \ + CPP="${XCPP} ${LIBCOMPATCFLAGS}" \ DESTDIR=${LIBCOMPATTMP} \ -DNO_CPU_CFLAGS \ MK_CTF=no \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r298076 - in head: sbin/savecore sys/amd64/amd64 sys/kern sys/sys
On Fri, Apr 15, 2016 at 10:45 AM, Conrad E. Meyerwrote: > Author: cem > Date: Fri Apr 15 17:45:12 2016 > New Revision: 298076 > URL: https://svnweb.freebsd.org/changeset/base/298076 > > Log: > Add 4Kn kernel dump support > > ... > > Savecore(1) has been updated to deal with these dumps. The format for Should say savecore(8), I guess. Sorry, Conrad ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298076 - in head: sbin/savecore sys/amd64/amd64 sys/kern sys/sys
Author: cem Date: Fri Apr 15 17:45:12 2016 New Revision: 298076 URL: https://svnweb.freebsd.org/changeset/base/298076 Log: Add 4Kn kernel dump support (And 4Kn minidump support, but only for amd64.) Make sure all I/O to the dump device is of the native sector size. To that end, we keep a native sector sized buffer associated with dump devices (di->blockbuf) and use it to pad smaller objects as needed (e.g. kerneldumpheader). Add dump_write_pad() as a convenience API to dump smaller objects with zero padding. (Rather than pull in NPM leftpad, we wrote our own.) Savecore(1) has been updated to deal with these dumps. The format for 512-byte sector dumps should remain backwards compatible. Minidumps for other architectures are left as an exercise for the reader. PR: 194279 Submitted by: ambrisko@ Reviewed by: cem (earlier version), rpokala Tested by:rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D5848 Modified: head/sbin/savecore/savecore.c head/sys/amd64/amd64/minidump_machdep.c head/sys/kern/kern_dump.c head/sys/kern/kern_shutdown.c head/sys/sys/conf.h Modified: head/sbin/savecore/savecore.c == --- head/sbin/savecore/savecore.c Fri Apr 15 17:30:33 2016 (r298075) +++ head/sbin/savecore/savecore.c Fri Apr 15 17:45:12 2016 (r298076) @@ -436,7 +436,7 @@ DoFile(const char *savedir, const char * { xo_handle_t *xostdout, *xoinfo; static char infoname[PATH_MAX], corename[PATH_MAX], linkname[PATH_MAX]; - static char *buf = NULL; + static char *buf = NULL, *temp = NULL; struct kerneldumpheader kdhf, kdhl; off_t mediasize, dumpsize, firsthd, lasthd; FILE *info, *fp; @@ -490,14 +490,29 @@ DoFile(const char *savedir, const char * printf("sectorsize = %u\n", sectorsize); } + if (sectorsize < sizeof(kdhl)) { + syslog(LOG_ERR, + "Sector size is less the kernel dump header %zu", + sizeof(kdhl)); + goto closefd; + } + lasthd = mediasize - sectorsize; + if (temp == NULL) { + temp = malloc(sectorsize); + if (temp == NULL) { + syslog(LOG_ERR, "%m"); + return; + } + } if (lseek(fd, lasthd, SEEK_SET) != lasthd || - read(fd, , sizeof(kdhl)) != sizeof(kdhl)) { + read(fd, temp, sectorsize) != sectorsize) { syslog(LOG_ERR, "error reading last dump header at offset %lld in %s: %m", (long long)lasthd, device); goto closefd; } + memcpy(, temp, sizeof(kdhl)); istextdump = 0; if (strncmp(kdhl.magic, TEXTDUMPMAGIC, sizeof kdhl) == 0) { if (verbose) @@ -567,15 +582,16 @@ DoFile(const char *savedir, const char * goto closefd; } dumpsize = dtoh64(kdhl.dumplength); - firsthd = lasthd - dumpsize - sizeof kdhf; + firsthd = lasthd - dumpsize - sectorsize; if (lseek(fd, firsthd, SEEK_SET) != firsthd || - read(fd, , sizeof(kdhf)) != sizeof(kdhf)) { + read(fd, temp, sectorsize) != sectorsize) { syslog(LOG_ERR, "error reading first dump header at offset %lld in %s: %m", (long long)firsthd, device); nerr++; goto closefd; } + memcpy(, temp, sizeof(kdhf)); if (verbose >= 2) { printf("First dump headers:\n"); @@ -586,7 +602,7 @@ DoFile(const char *savedir, const char * printf("\n"); } - if (memcmp(, , sizeof kdhl)) { + if (memcmp(, , sizeof(kdhl))) { syslog(LOG_ERR, "first and last dump headers disagree on %s", device); nerr++; @@ -603,7 +619,7 @@ DoFile(const char *savedir, const char * exit(0); } - if (kdhl.panicstring[0]) + if (kdhl.panicstring[0] != '\0') syslog(LOG_ALERT, "reboot after panic: %*s", (int)sizeof(kdhl.panicstring), kdhl.panicstring); else @@ -724,9 +740,10 @@ nuke: if (!keep) { if (verbose) printf("clearing dump header\n"); - memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof kdhl.magic); + memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof(kdhl.magic)); + memcpy(temp, , sizeof(kdhl)); if (lseek(fd, lasthd, SEEK_SET) != lasthd || - write(fd, , sizeof(kdhl)) != sizeof(kdhl)) + write(fd, temp, sectorsize) !=
Re: svn commit: r298075 - in head/sys: net netgraph netgraph/atm/ccatm netinet6 netipsec
On 04/15/16 12:30, Pedro F. Giffuni wrote: Author: pfg Date: Fri Apr 15 17:30:33 2016 New Revision: 298075 URL: https://svnweb.freebsd.org/changeset/base/298075 Log: sys/net* : for pointers replace 0 with NULL. Mostly cosmetical, no functional change. Found with devel/coccinelle. And with this I am done with the 0 --> NULL pointer replacements in sys/. Time to look at other possible code-churning scripts ;). Pedro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298075 - in head/sys: net netgraph netgraph/atm/ccatm netinet6 netipsec
Author: pfg Date: Fri Apr 15 17:30:33 2016 New Revision: 298075 URL: https://svnweb.freebsd.org/changeset/base/298075 Log: sys/net* : for pointers replace 0 with NULL. Mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/net/bpf_filter.c head/sys/net/if.c head/sys/net/if_arcsubr.c head/sys/net/if_atmsubr.c head/sys/net/if_bridge.c head/sys/net/if_disc.c head/sys/net/if_ethersubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_iso88025subr.c head/sys/net/if_loop.c head/sys/net/if_spppsubr.c head/sys/net/radix.c head/sys/net/raw_usrreq.c head/sys/netgraph/atm/ccatm/ng_ccatm.c head/sys/netgraph/ng_socket.c head/sys/netgraph/ng_source.c head/sys/netinet6/in6.c head/sys/netinet6/ip6_output.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/net/bpf_filter.c == --- head/sys/net/bpf_filter.c Fri Apr 15 17:28:24 2016(r298074) +++ head/sys/net/bpf_filter.c Fri Apr 15 17:30:33 2016(r298075) @@ -99,7 +99,7 @@ m_xword(struct mbuf *m, bpf_u_int32 k, i while (k >= len) { k -= len; m = m->m_next; - if (m == 0) + if (m == NULL) goto bad; len = m->m_len; } @@ -109,7 +109,7 @@ m_xword(struct mbuf *m, bpf_u_int32 k, i return (EXTRACT_LONG(cp)); } m0 = m->m_next; - if (m0 == 0 || m0->m_len + len - k < 4) + if (m0 == NULL || m0->m_len + len - k < 4) goto bad; *err = 0; np = mtod(m0, u_char *); @@ -148,7 +148,7 @@ m_xhalf(struct mbuf *m, bpf_u_int32 k, i while (k >= len) { k -= len; m = m->m_next; - if (m == 0) + if (m == NULL) goto bad; len = m->m_len; } @@ -158,7 +158,7 @@ m_xhalf(struct mbuf *m, bpf_u_int32 k, i return (EXTRACT_SHORT(cp)); } m0 = m->m_next; - if (m0 == 0) + if (m0 == NULL) goto bad; *err = 0; return ((cp[0] << 8) | mtod(m0, u_char *)[0]); Modified: head/sys/net/if.c == --- head/sys/net/if.c Fri Apr 15 17:28:24 2016(r298074) +++ head/sys/net/if.c Fri Apr 15 17:30:33 2016(r298075) @@ -1948,8 +1948,8 @@ link_rtrequest(int cmd, struct rtentry * struct sockaddr *dst; struct ifnet *ifp; - if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == 0) || - ((ifp = ifa->ifa_ifp) == 0) || ((dst = rt_key(rt)) == 0)) + if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || + ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) return; ifa = ifaof_ifpforaddr(dst, ifp); if (ifa) { @@ -2139,7 +2139,7 @@ if_qflush(struct ifnet *ifp) ALTQ_PURGE(ifq); #endif n = ifq->ifq_head; - while ((m = n) != 0) { + while ((m = n) != NULL) { n = m->m_nextpkt; m_freem(m); } Modified: head/sys/net/if_arcsubr.c == --- head/sys/net/if_arcsubr.c Fri Apr 15 17:28:24 2016(r298074) +++ head/sys/net/if_arcsubr.c Fri Apr 15 17:30:33 2016(r298075) @@ -210,7 +210,7 @@ arc_output(struct ifnet *ifp, struct mbu isphds = arc_isphds(atype); M_PREPEND(m, isphds ? ARC_HDRNEWLEN : ARC_HDRLEN, M_NOWAIT); - if (m == 0) + if (m == NULL) senderr(ENOBUFS); ah = mtod(m, struct arc_header *); ah->arc_type = atype; @@ -261,12 +261,12 @@ arc_frag_next(struct ifnet *ifp) struct arc_header *ah; ac = (struct arccom *)ifp->if_l2com; - if ((m = ac->curr_frag) == 0) { + if ((m = ac->curr_frag) == NULL) { int tfrags; /* dequeue new packet */ IF_DEQUEUE(>if_snd, m); - if (m == 0) + if (m == NULL) return 0; ah = mtod(m, struct arc_header *); @@ -296,7 +296,7 @@ arc_frag_next(struct ifnet *ifp) } M_PREPEND(m, ARC_HDRNEWLEN, M_NOWAIT); - if (m == 0) { + if (m == NULL) { m_freem(ac->curr_frag); ac->curr_frag = 0; return 0; @@ -315,7 +315,7 @@ arc_frag_next(struct ifnet *ifp) ac->curr_frag = 0; M_PREPEND(m, ARC_HDRNEWLEN_EXC, M_NOWAIT); - if (m == 0) + if (m == NULL)
svn commit: r298073 - head/sys/ddb
Author: pfg Date: Fri Apr 15 17:27:20 2016 New Revision: 298073 URL: https://svnweb.freebsd.org/changeset/base/298073 Log: ddb: for pointers replace 0 with NULL. Mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/ddb/db_command.c head/sys/ddb/db_sym.c Modified: head/sys/ddb/db_command.c == --- head/sys/ddb/db_command.c Fri Apr 15 16:36:17 2016(r298072) +++ head/sys/ddb/db_command.c Fri Apr 15 17:27:20 2016(r298073) @@ -144,7 +144,7 @@ static struct command db_cmds[] = { }; struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table); -static struct command *db_last_command = 0; +static struct command *db_last_command = NULL; /* * if 'ed' style: 'dot' is set at start of last item printed, @@ -429,7 +429,7 @@ db_command(struct command **last_cmdp, s } } *last_cmdp = cmd; - if (cmd != 0) { + if (cmd != NULL) { /* * Execute the command. */ Modified: head/sys/ddb/db_sym.c == --- head/sys/ddb/db_sym.c Fri Apr 15 16:36:17 2016(r298072) +++ head/sys/ddb/db_sym.c Fri Apr 15 17:27:20 2016(r298073) @@ -395,7 +395,7 @@ db_symbol_values(c_db_sym_t sym, const c db_expr_t value; if (sym == DB_SYM_NULL) { - *namep = 0; + *namep = NULL; return; } @@ -438,13 +438,13 @@ db_printsym(db_expr_t off, db_strategy_t cursym = db_search_symbol(off, strategy, ); db_symbol_values(cursym, , ); - if (name == 0) + if (name == NULL) value = off; if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) { db_printf("%+#lr", (long)off); return; } - if (name == 0 || d >= (unsigned long)db_maxoff) { + if (name == NULL || d >= (unsigned long)db_maxoff) { db_printf("%#lr", (unsigned long)off); return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298074 - in head/sys/fs: cd9660 msdosfs
Author: pfg Date: Fri Apr 15 17:28:24 2016 New Revision: 298074 URL: https://svnweb.freebsd.org/changeset/base/298074 Log: fs misc: for pointers replace 0 with NULL. Mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c == --- head/sys/fs/cd9660/cd9660_vfsops.c Fri Apr 15 17:27:20 2016 (r298073) +++ head/sys/fs/cd9660/cd9660_vfsops.c Fri Apr 15 17:28:24 2016 (r298074) @@ -709,7 +709,7 @@ cd9660_vget_internal(mp, ino, flags, vpp if (error || *vpp != NULL) return (error); - if (isodir == 0) { + if (isodir == NULL) { int lbn, off; lbn = lblkno(imp, ino); @@ -759,7 +759,7 @@ cd9660_vget_internal(mp, ino, flags, vpp } #endif } else - bp = 0; + bp = NULL; ip->i_mnt = imp; Modified: head/sys/fs/msdosfs/msdosfs_conv.c == --- head/sys/fs/msdosfs/msdosfs_conv.c Fri Apr 15 17:27:20 2016 (r298073) +++ head/sys/fs/msdosfs/msdosfs_conv.c Fri Apr 15 17:28:24 2016 (r298074) @@ -353,7 +353,7 @@ unix2dosfn(const u_char *un, u_char dn[1 * ignores all dots before extension, and use all * chars as filename except for dots. */ - dp = dp1 = 0; + dp = dp1 = NULL; for (cp = un + 1, i = unlen - 1; --i >= 0;) { switch (*cp++) { case '.': @@ -365,7 +365,7 @@ unix2dosfn(const u_char *un, u_char dn[1 default: if (dp1) dp = dp1; - dp1 = 0; + dp1 = NULL; break; } } Modified: head/sys/fs/msdosfs/msdosfs_fat.c == --- head/sys/fs/msdosfs/msdosfs_fat.c Fri Apr 15 17:27:20 2016 (r298073) +++ head/sys/fs/msdosfs/msdosfs_fat.c Fri Apr 15 17:28:24 2016 (r298074) @@ -256,14 +256,14 @@ fc_lookup(struct denode *dep, u_long fin { int i; u_long cn; - struct fatcache *closest = 0; + struct fatcache *closest = NULL; ASSERT_VOP_LOCKED(DETOV(dep), "fc_lookup"); for (i = 0; i < FC_SIZE; i++) { cn = dep->de_fc[i].fc_frcn; if (cn != FCE_EMPTY && cn <= findcn) { - if (closest == 0 || cn > closest->fc_frcn) + if (closest == NULL || cn > closest->fc_frcn) closest = >de_fc[i]; } } Modified: head/sys/fs/msdosfs/msdosfs_lookup.c == --- head/sys/fs/msdosfs/msdosfs_lookup.cFri Apr 15 17:27:20 2016 (r298073) +++ head/sys/fs/msdosfs/msdosfs_lookup.cFri Apr 15 17:28:24 2016 (r298074) @@ -454,7 +454,7 @@ found: * in a deadlock. */ brelse(bp); - bp = 0; + bp = NULL; foundroot: /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298072 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: asomers Date: Fri Apr 15 16:36:17 2016 New Revision: 298072 URL: https://svnweb.freebsd.org/changeset/base/298072 Log: Don't corrupt ZFS label's physpath attribute when booting while a disk is missing Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach prior to verifying the device's GUIDs. vdev_geom_attach calls vdev_geom_attrchange to set the physpath in the vdev object. The result is that if the disk could not be found, then the labels for other disks in the same TLD would overwrite the missing disk's physpath with the physpath of whichever disk currently has the same devname as the missing one used to have. MFC after:4 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 15 16:21:13 2016(r298071) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 15 16:36:17 2016(r298072) @@ -246,9 +246,6 @@ vdev_geom_attach(struct g_provider *pp, cp->private = vd; vd->vdev_tsd = cp; - /* Fetch initial physical path information for this device. */ - vdev_geom_attrchanged(cp, "GEOM::physpath"); - cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); } @@ -805,6 +802,10 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi } } + /* Fetch initial physical path information for this device. */ + if (cp != NULL) + vdev_geom_attrchanged(cp, "GEOM::physpath"); + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298071 - head/sys/compat/linux
Author: pfg Date: Fri Apr 15 16:21:13 2016 New Revision: 298071 URL: https://svnweb.freebsd.org/changeset/base/298071 Log: compat/linux: for pointers replace 0 with NULL. plvc is a pointer, no functional change. Found with devel/coccinelle. Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Fri Apr 15 16:18:07 2016 (r298070) +++ head/sys/compat/linux/linux_ioctl.c Fri Apr 15 16:21:13 2016 (r298071) @@ -2902,7 +2902,7 @@ linux_v4l_cliplist_copy(struct l_video_w vw->clips = NULL; ppvc = &(vw->clips); while (clipcount-- > 0) { - if (plvc == 0) { + if (plvc == NULL) { error = EFAULT; break; } else { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298070 - head/sys/geom/gate
Author: pfg Date: Fri Apr 15 16:18:07 2016 New Revision: 298070 URL: https://svnweb.freebsd.org/changeset/base/298070 Log: g_gate: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c == --- head/sys/geom/gate/g_gate.c Fri Apr 15 16:10:11 2016(r298069) +++ head/sys/geom/gate/g_gate.c Fri Apr 15 16:18:07 2016(r298070) @@ -945,7 +945,7 @@ g_gate_modevent(module_t mod, int type, } mtx_unlock(_gate_units_lock); mtx_destroy(_gate_units_lock); - if (status_dev != 0) + if (status_dev != NULL) destroy_dev(status_dev); free(g_gate_units, M_GATE); break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298069 - in head/sys: kern libkern
Author: pfg Date: Fri Apr 15 16:10:11 2016 New Revision: 298069 URL: https://svnweb.freebsd.org/changeset/base/298069 Log: kern: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/kern/kern_dump.c head/sys/kern/kern_kthread.c head/sys/kern/kern_proc.c head/sys/kern/kern_sysctl.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/sysv_sem.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_sockbuf.c head/sys/kern/uipc_syscalls.c head/sys/kern/vfs_cluster.c head/sys/kern/vfs_export.c head/sys/kern/vfs_lookup.c head/sys/libkern/strtol.c head/sys/libkern/strtoq.c head/sys/libkern/strtoul.c head/sys/libkern/strtouq.c Modified: head/sys/kern/kern_dump.c == --- head/sys/kern/kern_dump.c Fri Apr 15 16:05:41 2016(r298068) +++ head/sys/kern/kern_dump.c Fri Apr 15 16:10:11 2016(r298069) @@ -174,7 +174,7 @@ dumpsys_cb_dumpdata(struct dump_pa *mdp, error = 0; /* catch case in which chunk size is 0 */ counter = 0;/* Update twiddle every 16MB */ - va = 0; + va = NULL; pgs = mdp->pa_size / PAGE_SIZE; pa = mdp->pa_start; maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); Modified: head/sys/kern/kern_kthread.c == --- head/sys/kern/kern_kthread.cFri Apr 15 16:05:41 2016 (r298068) +++ head/sys/kern/kern_kthread.cFri Apr 15 16:10:11 2016 (r298069) @@ -445,7 +445,7 @@ kproc_kthread_add(void (*func)(void *), char buf[100]; struct thread *td; - if (*procptr == 0) { + if (*procptr == NULL) { error = kproc_create(func, arg, procptr, flags, pages, "%s", procname); if (error) Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Fri Apr 15 16:05:41 2016(r298068) +++ head/sys/kern/kern_proc.c Fri Apr 15 16:10:11 2016(r298069) @@ -1444,7 +1444,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) p = LIST_FIRST(); else p = LIST_FIRST(); - for (; p != 0; p = LIST_NEXT(p, p_list)) { + for (; p != NULL; p = LIST_NEXT(p, p_list)) { /* * Skip embryonic processes. */ Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Fri Apr 15 16:05:41 2016(r298068) +++ head/sys/kern/kern_sysctl.c Fri Apr 15 16:10:11 2016(r298069) @@ -912,7 +912,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) name++; continue; } - lsp2 = 0; + lsp2 = NULL; SLIST_FOREACH(oid, lsp, oid_link) { if (oid->oid_number != *name) continue; @@ -1083,7 +1083,7 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR { char *p; int error, oid[CTL_MAXNAME], len = 0; - struct sysctl_oid *op = 0; + struct sysctl_oid *op = NULL; struct rm_priotracker tracker; if (!req->newlen) Modified: head/sys/kern/link_elf.c == --- head/sys/kern/link_elf.cFri Apr 15 16:05:41 2016(r298068) +++ head/sys/kern/link_elf.cFri Apr 15 16:10:11 2016(r298069) @@ -1382,7 +1382,7 @@ link_elf_search_symbol(linker_file_t lf, u_long diff = off; u_long st_value; const Elf_Sym* es; - const Elf_Sym* best = 0; + const Elf_Sym* best = NULL; int i; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { @@ -1400,7 +1400,7 @@ link_elf_search_symbol(linker_file_t lf, } } } - if (best == 0) + if (best == NULL) *diffp = off; else *diffp = diff; Modified: head/sys/kern/link_elf_obj.c == --- head/sys/kern/link_elf_obj.cFri Apr 15 16:05:41 2016 (r298068) +++ head/sys/kern/link_elf_obj.cFri Apr 15 16:10:11 2016 (r298069) @@ -1180,7 +1180,7 @@ link_elf_search_symbol(linker_file_t lf, u_long diff = off; u_long st_value; const Elf_Sym *es; - const Elf_Sym *best = 0; + const Elf_Sym *best = NULL; int i; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { @@ -1198,7 +1198,7 @@ link_elf_search_symbol(linker_file_t lf, }
svn commit: r298068 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid ar...
Author: andrew Date: Fri Apr 15 16:05:41 2016 New Revision: 298068 URL: https://svnweb.freebsd.org/changeset/base/298068 Log: Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine independent code that needs to know about INTRNG such as PCI drivers. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/allwinner/a10_common.c head/sys/arm/altera/socfpga/socfpga_common.c head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/annapurna/alpine/common.c head/sys/arm/arm/gic.c head/sys/arm/arm/machdep_intr.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/nexus.c head/sys/arm/at91/at91_common.c head/sys/arm/broadcom/bcm2835/bcm2835_common.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/broadcom/bcm2835/bcm2835_intr.c head/sys/arm/broadcom/bcm2835/bcm2836.c head/sys/arm/broadcom/bcm2835/bcm2836.h head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/conf/A20 head/sys/arm/conf/ALPINE head/sys/arm/conf/ARMADA38X head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/IMX6 head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 head/sys/arm/conf/SOCKIT.common head/sys/arm/conf/VIRT head/sys/arm/conf/VSATV102 head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/freescale/imx/imx_gpio.c head/sys/arm/freescale/vybrid/vf_common.c head/sys/arm/include/intr.h head/sys/arm/include/smp.h head/sys/arm/lpc/lpc_intc.c head/sys/arm/mv/mpic.c head/sys/arm/mv/mv_common.c head/sys/arm/nvidia/tegra124/std.tegra124 head/sys/arm/qemu/virt_common.c head/sys/arm/rockchip/rk30xx_common.c head/sys/arm/samsung/exynos/exynos5_common.c head/sys/arm/ti/aintc.c head/sys/arm/ti/ti_common.c head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h head/sys/arm/versatile/versatile_common.c head/sys/arm/xilinx/zy7_machdep.c head/sys/conf/files.arm head/sys/conf/options.arm head/sys/conf/options.mips head/sys/dev/fdt/fdt_common.h head/sys/mips/include/intr.h head/sys/mips/include/smp.h head/sys/mips/mips/exception.S head/sys/mips/mips/nexus.c head/sys/mips/mips/tick.c Modified: head/sys/arm/allwinner/a10_common.c == --- head/sys/arm/allwinner/a10_common.c Fri Apr 15 15:50:13 2016 (r298067) +++ head/sys/arm/allwinner/a10_common.c Fri Apr 15 16:05:41 2016 (r298068) @@ -42,7 +42,7 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -#ifndef ARM_INTRNG +#ifndef INTRNG static int fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, @@ -69,4 +69,4 @@ fdt_pic_decode_t fdt_pic_table[] = { NULL }; -#endif /* ARM_INTRNG */ +#endif /* INTRNG */ Modified: head/sys/arm/altera/socfpga/socfpga_common.c == --- head/sys/arm/altera/socfpga/socfpga_common.cFri Apr 15 15:50:13 2016(r298067) +++ head/sys/arm/altera/socfpga/socfpga_common.cFri Apr 15 16:05:41 2016(r298068) @@ -74,7 +74,7 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -#ifndef ARM_INTRNG +#ifndef INTRNG static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c == --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Apr 15 15:50:13 2016(r298067) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Apr 15 16:05:41 2016(r298068) @@ -184,7 +184,7 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -#ifndef ARM_INTRNG +#ifndef INTRNG #ifndef DEV_GIC static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, @@ -213,4 +213,4 @@ fdt_pic_decode_t fdt_pic_table[] = { #endif NULL }; -#endif /* ARM_INTRNG */ +#endif /* INTRNG */ Modified: head/sys/arm/annapurna/alpine/common.c == --- head/sys/arm/annapurna/alpine/common.c Fri Apr 15 15:50:13 2016 (r298067) +++ head/sys/arm/annapurna/alpine/common.c Fri Apr 15 16:05:41 2016 (r298068) @@ -136,7 +136,7 @@ infinite: while (1) {} } -#ifndef ARM_INTRNG +#ifndef INTRNG static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, int *trig, int *pol) Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Fri Apr 15 15:50:13 2016(r298067) +++ head/sys/arm/arm/gic.c Fri Apr 15 16:05:41
svn commit: r298065 - in head/sys: conf mips/include
Author: sgalabov Date: Fri Apr 15 15:44:02 2016 New Revision: 298065 URL: https://svnweb.freebsd.org/changeset/base/298065 Log: Make NIRQ configurable for MIPS Submitted by: kan Reviewed by: kan Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D5964 Modified: head/sys/conf/options.mips head/sys/mips/include/intr.h Modified: head/sys/conf/options.mips == --- head/sys/conf/options.mips Fri Apr 15 15:42:35 2016(r298064) +++ head/sys/conf/options.mips Fri Apr 15 15:44:02 2016(r298065) @@ -145,3 +145,4 @@ PV_STATSopt_pmap.h # Options to use INTRNG code # MIPS_INTRNGopt_global.h +MIPS_NIRQ opt_global.h Modified: head/sys/mips/include/intr.h == --- head/sys/mips/include/intr.hFri Apr 15 15:42:35 2016 (r298064) +++ head/sys/mips/include/intr.hFri Apr 15 15:44:02 2016 (r298065) @@ -47,8 +47,12 @@ #include -#ifndef NIRQ -#defineNIRQ128 +#ifndefMIPS_NIRQ +#defineMIPS_NIRQ 128 +#endif + +#ifndefNIRQ +#defineNIRQMIPS_NIRQ #endif #define INTR_IRQ_NSPC_SWI 4 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298067 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved lib/libxo
Author: phil Date: Fri Apr 15 15:50:13 2016 New Revision: 298067 URL: https://svnweb.freebsd.org/changeset/base/298067 Log: import libxo-0.4.7 Fix bug w/ {e:} in html, where no default encoding format was built docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo) Reviewed by: sjg Approved by: sjg (mentor) Deleted: head/contrib/libxo/libxo/xo_config.h.in Modified: head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo-manual.html head/contrib/libxo/libxo/libxo.c head/contrib/libxo/tests/core/saved/test_01.E.out head/contrib/libxo/tests/core/saved/test_01.H.out head/contrib/libxo/tests/core/saved/test_01.HIPx.out head/contrib/libxo/tests/core/saved/test_01.HP.out head/contrib/libxo/tests/core/saved/test_01.J.out head/contrib/libxo/tests/core/saved/test_01.JP.out head/contrib/libxo/tests/core/saved/test_01.T.out head/contrib/libxo/tests/core/saved/test_01.X.out head/contrib/libxo/tests/core/saved/test_01.XP.out head/contrib/libxo/tests/core/test_01.c head/lib/libxo/add.man head/lib/libxo/xo_config.h Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/configure.ac == --- head/contrib/libxo/configure.ac Fri Apr 15 15:46:41 2016 (r298066) +++ head/contrib/libxo/configure.ac Fri Apr 15 15:50:13 2016 (r298067) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.4.6], [p...@juniper.net]) +AC_INIT([libxo], [0.4.7], [p...@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/doc/libxo-manual.html == --- head/contrib/libxo/doc/libxo-manual.htmlFri Apr 15 15:46:41 2016 (r298066) +++ head/contrib/libxo/doc/libxo-manual.htmlFri Apr 15 15:50:13 2016 (r298067) @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "August 2015"; + content: "December 2015"; } @top-center { @@ -22009,7 +22009,7 @@ jQuery(function ($) { -August 24, 2015 +December 30, 2015 libxo: The Easy Way to Generate text, XML, JSON, and HTML outputlibxo-manual Modified: head/contrib/libxo/libxo/libxo.c == --- head/contrib/libxo/libxo/libxo.cFri Apr 15 15:46:41 2016 (r298066) +++ head/contrib/libxo/libxo/libxo.cFri Apr 15 15:50:13 2016 (r298067) @@ -3374,6 +3374,15 @@ xo_buf_append_div (xo_handle_t *xop, con static char div_end[] = "\">"; static char div_close[] = ""; +/* The encoding format defaults to the normal format */ +if (encoding == NULL) { + char *enc = alloca(vlen + 1); + memcpy(enc, value, vlen); + enc[vlen] = '\0'; + encoding = xo_fix_encoding(xop, enc); + elen = strlen(encoding); +} + /* * To build our XPath predicate, we need to save the va_list before * we format our data, and then restore it before we format the @@ -3406,15 +3415,6 @@ xo_buf_append_div (xo_handle_t *xop, con else xo_buf_append(pbp, "='", 2); - /* The encoding format defaults to the normal format */ - if (encoding == NULL) { - char *enc = alloca(vlen + 1); - memcpy(enc, value, vlen); - enc[vlen] = '\0'; - encoding = xo_fix_encoding(xop, enc); - elen = strlen(encoding); - } - xo_xff_flags_t pflags = flags | XFF_XML | XFF_ATTR; pflags &= ~(XFF_NO_OUTPUT | XFF_ENCODE_ONLY); xo_do_format_field(xop, pbp, encoding, elen, pflags); Modified: head/contrib/libxo/tests/core/saved/test_01.E.out == --- head/contrib/libxo/tests/core/saved/test_01.E.out Fri Apr 15 15:46:41 2016(r298066) +++ head/contrib/libxo/tests/core/saved/test_01.E.out Fri Apr 15 15:50:13 2016(r298067) @@ -114,6 +114,16 @@ op close_list: [item] [] op close_container: [data4] [] op content: [cost] [425] op content: [cost] [455] +op string: [mode] [mode] +op string: [mode_octal] [octal] +op string: [links] [links] +op string: [user] [user] +op string: [group] [group] +op string: [mode] [/some/file] +op content: [mode_octal] [640] +op content: [links] [1] +op string: [user] [user] +op string: [group] [group] op close_container: [top] [] op finish: [] [] op flush: [] [] Modified: head/contrib/libxo/tests/core/saved/test_01.H.out == --- head/contrib/libxo/tests/core/saved/test_01.H.out Fri Apr 15 15:46:41 2016(r298066) +++ head/contrib/libxo/tests/core/saved/test_01.H.out Fri Apr 15 15:50:13 2016(r298067) @@ -1 +1 @@ -Connecting to
svn commit: r298066 - in head/sys/netinet: . libalias
Author: pfg Date: Fri Apr 15 15:46:41 2016 New Revision: 298066 URL: https://svnweb.freebsd.org/changeset/base/298066 Log: netinet: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: ae. tuexen Modified: head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in_mcast.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/libalias/alias_db.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_syscalls.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Fri Apr 15 15:44:02 2016(r298065) +++ head/sys/netinet/if_ether.c Fri Apr 15 15:46:41 2016(r298066) @@ -578,7 +578,7 @@ int arpresolve(struct ifnet *ifp, int is_gw, struct mbuf *m, const struct sockaddr *dst, u_char *desten, uint32_t *pflags) { - struct llentry *la = 0; + struct llentry *la = NULL; if (pflags != NULL) *pflags = 0; Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Fri Apr 15 15:44:02 2016(r298065) +++ head/sys/netinet/igmp.c Fri Apr 15 15:46:41 2016(r298066) @@ -1469,7 +1469,7 @@ igmp_input(struct mbuf **mp, int *offp, else minlen += IGMP_MINLEN; if ((!M_WRITABLE(m) || m->m_len < minlen) && - (m = m_pullup(m, minlen)) == 0) { + (m = m_pullup(m, minlen)) == NULL) { IGMPSTAT_INC(igps_rcv_tooshort); return (IPPROTO_DONE); } Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Fri Apr 15 15:44:02 2016(r298065) +++ head/sys/netinet/in_mcast.c Fri Apr 15 15:46:41 2016(r298066) @@ -1810,7 +1810,7 @@ inp_getmoptions(struct inpcb *inp, struc break; case IP_MULTICAST_TTL: - if (imo == 0) + if (imo == NULL) optval = coptval = IP_DEFAULT_MULTICAST_TTL; else optval = coptval = imo->imo_multicast_ttl; @@ -1822,7 +1822,7 @@ inp_getmoptions(struct inpcb *inp, struc break; case IP_MULTICAST_LOOP: - if (imo == 0) + if (imo == NULL) optval = coptval = IP_DEFAULT_MULTICAST_LOOP; else optval = coptval = imo->imo_multicast_loop; Modified: head/sys/netinet/ip_divert.c == --- head/sys/netinet/ip_divert.cFri Apr 15 15:44:02 2016 (r298065) +++ head/sys/netinet/ip_divert.cFri Apr 15 15:46:41 2016 (r298066) @@ -205,7 +205,7 @@ divert_packet(struct mbuf *m, int incomi } /* Assure header */ if (m->m_len < sizeof(struct ip) && - (m = m_pullup(m, sizeof(struct ip))) == 0) + (m = m_pullup(m, sizeof(struct ip))) == NULL) return; ip = mtod(m, struct ip *); @@ -600,7 +600,7 @@ div_send(struct socket *so, int flags, s /* Packet must have a header (but that's about it) */ if (m->m_len < sizeof (struct ip) && - (m = m_pullup(m, sizeof (struct ip))) == 0) { + (m = m_pullup(m, sizeof (struct ip))) == NULL) { KMOD_IPSTAT_INC(ips_toosmall); m_freem(m); return EINVAL; @@ -666,7 +666,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) return error; inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); - if (inp_list == 0) + if (inp_list == NULL) return ENOMEM; INP_INFO_RLOCK(_divcbinfo); Modified: head/sys/netinet/ip_icmp.c == --- head/sys/netinet/ip_icmp.c Fri Apr 15 15:44:02 2016(r298065) +++ head/sys/netinet/ip_icmp.c Fri Apr 15 15:46:41 2016(r298066) @@ -674,7 +674,7 @@ icmp_reflect(struct mbuf *m) struct in_ifaddr *ia; struct in_addr t; struct nhop4_extended nh_ext; - struct mbuf *opts = 0; + struct mbuf *opts = NULL; int optlen = (ip->ip_hl << 2) - sizeof(struct ip); if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || @@ -790,7 +790,7 @@ match: * add on any record-route or timestamp options. */ cp = (u_char *) (ip + 1); - if ((opts = ip_srcroute(m)) == 0 && + if ((opts = ip_srcroute(m)) == NULL && (opts =
Re: svn commit: r298011 - head/sys/cam/ata
A shorter timeout dramatically cuts the length of time that the queue has to be frozen for error recovery. This allows one, in theory, to recover the system more quickly after a drive goes off into the weeds. Warner > On Apr 15, 2016, at 9:23 AM, Ronald Klopwrote: > > Hello, > > Out of curiosity, what are these big problems? Broken device or other things > (timeouts/triggers/full queues) going on in the kernel? > > Regards, > Ronald. > > > On Fri, 15 Apr 2016 00:13:46 +0200, Warner Losh wrote: > >> Author: imp >> Date: Thu Apr 14 22:13:46 2016 >> New Revision: 298011 >> URL: https://svnweb.freebsd.org/changeset/base/298011 >> erLog: >> Add a comment about why the timeout for flush was lowered to 5s. >> >> Modified: >> head/sys/cam/ata/ata_da.c >> >> Modified: head/sys/cam/ata/ata_da.c >> == >> --- head/sys/cam/ata/ata_da.cThu Apr 14 22:13:44 2016 >> (r298010) >> +++ head/sys/cam/ata/ata_da.cThu Apr 14 22:13:46 2016 >> (r298011) >> @@ -912,6 +912,11 @@ adadump(void *arg, void *virtual, vm_off >> if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { >> xpt_setup_ccb(_h, periph->path, CAM_PRIORITY_NORMAL); >> +/* >> + * Tell the drive to flush its intenral cache. if we >> + * can't flush in 5s we have big problems. No need to >> + * wait the default 60s to detect problems. >> + */ >> ccb.ccb_h.ccb_state = ADA_CCB_DUMP; >> cam_fill_ataio(, >> 0, >> ___ >> svn-src-...@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" signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r298011 - head/sys/cam/ata
Hello, Out of curiosity, what are these big problems? Broken device or other things (timeouts/triggers/full queues) going on in the kernel? Regards, Ronald. On Fri, 15 Apr 2016 00:13:46 +0200, Warner Loshwrote: Author: imp Date: Thu Apr 14 22:13:46 2016 New Revision: 298011 URL: https://svnweb.freebsd.org/changeset/base/298011 erLog: Add a comment about why the timeout for flush was lowered to 5s. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:44 2016(r298010) +++ head/sys/cam/ata/ata_da.c Thu Apr 14 22:13:46 2016(r298011) @@ -912,6 +912,11 @@ adadump(void *arg, void *virtual, vm_off if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { xpt_setup_ccb(_h, periph->path, CAM_PRIORITY_NORMAL); + /* +* Tell the drive to flush its intenral cache. if we +* can't flush in 5s we have big problems. No need to +* wait the default 60s to detect problems. +*/ ccb.ccb_h.ccb_state = ADA_CCB_DUMP; cam_fill_ataio(, 0, ___ svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298062 - head/sys/boot/fdt/dts/mips
Author: sgalabov Date: Fri Apr 15 15:36:09 2016 New Revision: 298062 URL: https://svnweb.freebsd.org/changeset/base/298062 Log: Import Mediatek/Ralink dtsi patches against OpenWRT dtsi files This revision suggests dtsi patches to be used with the original OpenWRT dtsi files so we can re-use what has already been done in OpenWRT for the Mediatek/Ralink SoCs. The only thing that is required after importing this revision should be the following: 1. Import OpenWRT dts/dtsi files into sys/gnu/dts/mips 2. Run the following script in sys/gnu/dts/mips: for f in `ls [mr]t*.dtsi`; do printf "\n#include\n" > $f done This will apply our dtsi patches to OpenWRT's dtsi files and will allow us to re-use dts/dtsi files for ~170 Mediatek/Ralink boards. Currently our drivers are not 100% compatible with OpenWRT's dts files, but they're compatible enough. We can add more functionality in the future that would better leverage the OpenWRT work as well. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5965 Added: head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi (contents, props changed) head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsiFri Apr 15 15:36:09 2016(r298062) @@ -0,0 +1,52 @@ +/* $FreeBSD$ */ + +/ { + + /* +* FreeBSD's stdin and stdout, so we can have a console +*/ + chosen { + stdin = + stdout = + }; + + /* +* OpenWRT doesn't define a clock controller, but we currently need one +*/ + clkctrl: cltctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + palmbus@1000 { + /* +* Make palmbus compatible to our simplebus +*/ + compatible = "simple-bus"; + + /* +* Reference uartlite@c00 as uartlite, so we can address it +* within the chosen node above +*/ + uartlite: uartlite@c00 {}; + }; + + usbphy: usbphy { + clocks = < 22 25>; + clock-names = "host", "device"; + }; + + pcie@1014 { + /* +* Our driver is different that OpenWRT's, so we need slightly +* different values for the reg property +*/ + reg = <0x1014 0x1>; + + /* +* Also, we need resets and clocks defined, so we can properly +* initialize the PCIe +*/ + clocks = < 26>; + }; +}; Added: head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsiFri Apr 15 15:36:09 2016(r298062) @@ -0,0 +1,38 @@ +/* $FreeBSD$ */ + +/ { + + /* +* FreeBSD's stdin and stdout, so we can have a console +*/ + chosen { + stdin = + stdout = + }; + + /* +* OpenWRT doesn't define a clock controller, but we currently need one +*/ + clkctrl: cltctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + palmbus@1000 { + /* +* Make palmbus compatible to our simplebus +*/ + compatible = "simple-bus"; + + /* +* Reference uartlite@c00 as uartlite, so we can address it +* within the chosen node above +*/ + uartlite: uartlite@c00 {}; + }; + + usbphy: usbphy { + clocks = < 22 25>; + clock-names = "host", "device"; + }; +}; Added: head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++
svn commit: r298061 - head/sys/conf
Author: sgalabov Date: Fri Apr 15 15:28:23 2016 New Revision: 298061 URL: https://svnweb.freebsd.org/changeset/base/298061 Log: Change the fdt_static_dtb.S dependency fdt_static_dtb.S dependency in sys/conf/files is currently set as: $S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE} This is wrong, as what fdt_static_dtb.S actually uses is the DTB file produced from the FDT_DTS_FILE. In addition it also makes using DTS files stored in $S/gnu/dts/${MACHINE}/ impossible. So, change the dependency to "fdt_dtb_file", which seems to be the right option here anyway. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5963 Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Fri Apr 15 15:26:31 2016(r298060) +++ head/sys/conf/files Fri Apr 15 15:28:23 2016(r298061) @@ -1443,7 +1443,7 @@ dev/fdt/fdt_pinctrl.c optional fdt fdt_ dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand | fdt mx25l dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ - dependency "$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}" + dependency "fdt_dtb_file" dev/fdt/simplebus.coptional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298060 - head/sys/dev/flash
Author: sgalabov Date: Fri Apr 15 15:26:31 2016 New Revision: 298060 URL: https://svnweb.freebsd.org/changeset/base/298060 Log: Make mx25l compatible with jedec,spi-nor as well A lot of dts files define the SPI flashes supported by mx25l as compatible with 'jedec,spi-nor', so we add this to the mx25l compat_data. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5962 Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c == --- head/sys/dev/flash/mx25l.c Fri Apr 15 15:24:42 2016(r298059) +++ head/sys/dev/flash/mx25l.c Fri Apr 15 15:26:31 2016(r298060) @@ -432,6 +432,12 @@ mx25l_set_4b_mode(device_t dev, uint8_t return (err); } +static struct ofw_compat_data compat_data[] = { + { "st,m25p",1 }, + { "jedec,spi-nor", 1 }, + { NULL, 0 }, +}; + static int mx25l_probe(device_t dev) { @@ -439,7 +445,7 @@ mx25l_probe(device_t dev) #ifdef FDT if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "st,m25p")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); #endif device_set_desc(dev, "M25Pxx Flash Family"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298059 - in head/sys: dev/rt mips/mediatek
Author: sgalabov Date: Fri Apr 15 15:24:42 2016 New Revision: 298059 URL: https://svnweb.freebsd.org/changeset/base/298059 Log: Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitions This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts definitions, so we can reuse them with less modifications later in order to bring support for a lot of boards at once. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5961 Modified: head/sys/dev/rt/if_rt.c head/sys/mips/mediatek/mtk_ehci.c head/sys/mips/mediatek/mtk_gpio_v1.c head/sys/mips/mediatek/mtk_gpio_v2.c head/sys/mips/mediatek/mtk_intr_gic.c head/sys/mips/mediatek/mtk_ohci.c head/sys/mips/mediatek/mtk_pcie.c head/sys/mips/mediatek/mtk_soc.c head/sys/mips/mediatek/mtk_usb_phy.c head/sys/mips/mediatek/mtk_xhci.c Modified: head/sys/dev/rt/if_rt.c == --- head/sys/dev/rt/if_rt.c Fri Apr 15 15:22:28 2016(r298058) +++ head/sys/dev/rt/if_rt.c Fri Apr 15 15:24:42 2016(r298059) @@ -99,13 +99,14 @@ __FBSDID("$FreeBSD$"); #ifdef FDT /* more specific and new models should go first */ static const struct ofw_compat_data rt_compat_data[] = { - { "ralink,rt3050-eth", RT_CHIPID_RT3050 }, - { "ralink,rt3352-eth", RT_CHIPID_RT3050 }, - { "ralink,rt3883-eth", RT_CHIPID_RT3050 }, - { "ralink,rt5350-eth", RT_CHIPID_RT5350 }, - { "ralink,mt7620a-eth", RT_CHIPID_MT7620 }, - { "ralink,mt7621-eth", RT_CHIPID_MT7621 }, - { NULL, 0 } + { "ralink,rt3050-eth", RT_CHIPID_RT3050 }, + { "ralink,rt3352-eth", RT_CHIPID_RT3050 }, + { "ralink,rt3883-eth", RT_CHIPID_RT3050 }, + { "ralink,rt5350-eth", RT_CHIPID_RT5350 }, + { "ralink,mt7620a-eth", RT_CHIPID_MT7620 }, + { "ralink,mt7621-eth", RT_CHIPID_MT7621 }, + { "mediatek,mt7621-eth",RT_CHIPID_MT7621 }, + { NULL, 0 } }; #endif Modified: head/sys/mips/mediatek/mtk_ehci.c == --- head/sys/mips/mediatek/mtk_ehci.c Fri Apr 15 15:22:28 2016 (r298058) +++ head/sys/mips/mediatek/mtk_ehci.c Fri Apr 15 15:24:42 2016 (r298059) @@ -78,7 +78,7 @@ ehci_fdt_probe(device_t self) if (!ofw_bus_status_okay(self)) return (ENXIO); - if (!ofw_bus_is_compatible(self, "ralink,rt3xxx-ehci")) + if (!ofw_bus_is_compatible(self, "generic-ehci")) return (ENXIO); device_set_desc(self, EHCI_HC_DEVSTR); Modified: head/sys/mips/mediatek/mtk_gpio_v1.c == --- head/sys/mips/mediatek/mtk_gpio_v1.cFri Apr 15 15:22:28 2016 (r298058) +++ head/sys/mips/mediatek/mtk_gpio_v1.cFri Apr 15 15:24:42 2016 (r298059) @@ -281,8 +281,8 @@ mtk_gpio_attach(device_t dev) sc->do_remap = 0; } - if (OF_hasprop(node, "mtk,num-pins") && (OF_getencprop(node, - "mtk,num-pins", _pins, sizeof(num_pins)) >= 0)) + if (OF_hasprop(node, "ralink,num-gpios") && (OF_getencprop(node, + "ralink,num-gpios", _pins, sizeof(num_pins)) >= 0)) sc->num_pins = num_pins; else sc->num_pins = MTK_GPIO_PINS; Modified: head/sys/mips/mediatek/mtk_gpio_v2.c == --- head/sys/mips/mediatek/mtk_gpio_v2.cFri Apr 15 15:22:28 2016 (r298058) +++ head/sys/mips/mediatek/mtk_gpio_v2.cFri Apr 15 15:24:42 2016 (r298059) @@ -121,8 +121,8 @@ static int mtk_gpio_intr(void *arg); #define GPIO_PIORESET(_sc) GPIO_REG((_sc), 0x0040) static struct ofw_compat_data compat_data[] = { - { "mtk,mt7621-gpio",1 }, - { "mtk,mt7628-gpio",1 }, + { "mtk,mt7621-gpio-bank", 1 }, + { "mtk,mt7628-gpio-bank", 1 }, { NULL, 0 } }; @@ -281,7 +281,7 @@ mtk_gpio_attach(device_t dev) else sc->num_pins = MTK_GPIO_PINS; - for (i = 0; i < num_pins; i++) { + for (i = 0; i < sc->num_pins; i++) { sc->pins[i].pin_caps |= GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_INVIN | GPIO_PIN_INVOUT; sc->pins[i].intr_polarity = INTR_POLARITY_HIGH; Modified: head/sys/mips/mediatek/mtk_intr_gic.c == --- head/sys/mips/mediatek/mtk_intr_gic.c Fri Apr 15 15:22:28 2016 (r298058) +++ head/sys/mips/mediatek/mtk_intr_gic.c Fri Apr 15 15:24:42 2016 (r298059) @@ -281,10 +281,10 @@ mtk_gic_map_intr(device_t dev, struct in
svn commit: r298058 - head/sys/mips/mediatek
Author: sgalabov Date: Fri Apr 15 15:22:28 2016 New Revision: 298058 URL: https://svnweb.freebsd.org/changeset/base/298058 Log: Remove unneeded initialization in mtk_xhci.c This is actually initialized properly within xhci.c, so it's better to not initialize it in mtk_xhci.c Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5935 Modified: head/sys/mips/mediatek/mtk_xhci.c Modified: head/sys/mips/mediatek/mtk_xhci.c == --- head/sys/mips/mediatek/mtk_xhci.c Fri Apr 15 15:20:41 2016 (r298057) +++ head/sys/mips/mediatek/mtk_xhci.c Fri Apr 15 15:22:28 2016 (r298058) @@ -99,7 +99,6 @@ mtk_xhci_fdt_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; - sc->sc_bus.dma_bits = 32; rid = 0; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298057 - head/sys/mips/conf
Author: sgalabov Date: Fri Apr 15 15:20:41 2016 New Revision: 298057 URL: https://svnweb.freebsd.org/changeset/base/298057 Log: In order to build a kernel with one of these configs the user should do the following: 1. Give the appropriate board dts file to be used by either: 1.1. edit the SoC kernel config required (e.g., MT7620A_FDT) and include the required FDT_DTS_FILE makeoption; or 1.2. simply supply FDT_DTS_FILE="xx.dts" on the command line when building the kernel Of course, the user can also create a completely new kernel config to match the desired board and include the SoC kernel config from within it. If required, edit the MEDIATEK config file, which includes optional drivers and comment out the unneeded ones. 2.1. this would only make sense if kernel size is a concern. Even if we build the kernel with all drivers, if we lzma it and package it as a uImage, its size is still around 1.1MiB. The user will have to choose a dts file (or create a new one) from sys/gnu/dts/mips , where all Mediatek/Ralink dts files will be imported via a later revision. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5966 Added: head/sys/mips/conf/MEDIATEK (contents, props changed) head/sys/mips/conf/MEDIATEK_BASE (contents, props changed) head/sys/mips/conf/MT7620A_FDT (contents, props changed) head/sys/mips/conf/MT7620N_FDT (contents, props changed) head/sys/mips/conf/MT7621_FDT (contents, props changed) head/sys/mips/conf/MT7628_FDT (contents, props changed) head/sys/mips/conf/RT3050_FDT (contents, props changed) head/sys/mips/conf/RT3352_FDT (contents, props changed) head/sys/mips/conf/RT3883_FDT (contents, props changed) head/sys/mips/conf/RT5350_FDT (contents, props changed) Added: head/sys/mips/conf/MEDIATEK == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/MEDIATEK Fri Apr 15 15:20:41 2016(r298057) @@ -0,0 +1,81 @@ +# +# MEDIATEK -- Kernel configuration file for FreeBSD/MIPS Mediatek/Ralink SoCs +# +# This includes all the configurable parts of the kernel. Please read through +# the sections below and customize the options to fit your board if needed. +# +# $FreeBSD$ +# + +#NO_UNIVERSE + +# Don't build any modules by default +makeoptionsMODULES_OVERRIDE="" + +# +# Default rootfs device configuration, should be changed to suit target board +# +optionsROOTDEVNAME=\"ufs:md0.uzip\" + +# +# Optional drivers section +# +# What follows is optional support drivers for the Mediatek SoCs. +# The kernel can be compiled without them if size is a concern. +# All optional drivers are built by default. +# + +# Support geom_uzip(4) compressed disk images +device geom_uzip +optionsGEOM_UZIP + +# Support md(4) and md-based rootfs +device md +optionsMD_ROOT + +# SPI and SPI flash support +device spibus +device mx25l + +# GPIO and gpioled support +device gpio +device gpioled + +# PCI support +device pci + +# +# USB (ehci, ohci, xhci, otg) support. Unneeded drivers can be commented in +# order to lower kernel size. See below for driver SoC support. +# +# For all SoCs that require USB support +device usb +# For RT3050, RT3052 and RT3350 SoCs +device dwcotg +# For RT3352, RT3662, RT3883, RT5350, MT7620, MT7628 and MT7688 +device ohci +device ehci +# For MT7621, or cases where the target board has a XHCI controller on PCI +# (for example Asus RT-N65U) +device xhci + +# USB umass(4) storage and da(4) support +device umass +device da + +# ahci(4) and ada(4) support, depends on PCI +device ahci +device ada + +# CAM support, required if either umass(4) or ahci(4) is enabled above +device pass +device scbus + +# Ethernet, BPS and bridge support +device rt +device bpf +device if_bridge + +# Extres +device ext_resources +device clk Added: head/sys/mips/conf/MEDIATEK_BASE == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/MEDIATEK_BASEFri Apr 15 15:20:41 2016 (r298057) @@ -0,0 +1,89 @@ +# +# MEDIATEK_BASE -- Base kernel configuration file for FreeBSD/MIPS +# Mediatek/Ralink SoCs. +# +# This includes all the required drivers for the SoCs. +# Ususally, users should not build this kernel configuration. It is provided +# only as a minimum base, from which customizations can be made. Please look +# at MEDIATEK kernel
Re: svn commit: r298036 - head/sys/cam
On Fri, Apr 15, 2016 at 9:26 PM Warner Loshwrote: > On Fri, Apr 15, 2016 at 12:05 AM, Howard Su wrote: > >> >> On Fri, Apr 15, 2016 at 1:10 PM Warner Losh wrote: >> >>> Author: imp >>> Date: Fri Apr 15 05:10:32 2016 >>> New Revision: 298036 >>> URL: https://svnweb.freebsd.org/changeset/base/298036 >>> >>> Log: >>> Put function only used by CAM_NETFLIX_IOSCHED under that ifdef. >>> >>> I suggest to remove NETFLIX from the name. >> > > It's the Netflix I/O scheduler as opposed to the default one. So the > name is appropriate. It's better than CAM_WARNER_AWESOME_IOSCHED > which is the only other choice possible... :) > The name didn't give any information about what it is and what it do thing differently. Sounds like this is only useful for netflix and other people should not bother to use it. If so, this is proper name. > > Warner > > >> Modified: >>> head/sys/cam/cam_iosched.c >>> >>> Modified: head/sys/cam/cam_iosched.c >>> >>> == >>> --- head/sys/cam/cam_iosched.c Fri Apr 15 05:10:31 2016(r298035) >>> +++ head/sys/cam/cam_iosched.c Fri Apr 15 05:10:32 2016(r298036) >>> @@ -625,9 +625,11 @@ cam_iosched_cl_maybe_steer(struct contro >>> /* Periph drivers set these flags to indicate >>> work */ >>> #define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16) >>> >>> +#ifdef CAM_NETFLIX_IOSCHED >>> static void >>> cam_iosched_io_metric_update(struct cam_iosched_softc *isc, >>> sbintime_t sim_latency, int cmd, size_t size); >>> +#endif >>> >>> static inline int >>> cam_iosched_has_flagged_work(struct cam_iosched_softc *isc) >>> @@ -1522,6 +1524,7 @@ cam_iosched_update(struct iop_stats *iop >>> iop->sd = (int64_t)var < 0 ? 0 : isqrt64(var); >>> } >>> >>> +#ifdef CAM_NETFLIX_IOSCHED >>> static void >>> cam_iosched_io_metric_update(struct cam_iosched_softc *isc, >>> sbintime_t sim_latency, int cmd, size_t size) >>> @@ -1541,6 +1544,7 @@ cam_iosched_io_metric_update(struct cam_ >>> break; >>> } >>> } >>> +#endif >>> >>> #ifdef DDB >>> static int biolen(struct bio_queue_head *bq) >>> ___ >>> svn-src-head@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/svn-src-head >>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" >>> >> ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298056 - head/sys/x86/x86
Author: kib Date: Fri Apr 15 14:36:38 2016 New Revision: 298056 URL: https://svnweb.freebsd.org/changeset/base/298056 Log: Always calculate divisor for the counter mode of LAPIC timer. Even if initially configured in the TSC deadline mode, eventtimer subsystem can be switched to periodic, and then DCR register is loaded with unitialized value. Reset the LAPIC eventtimer frequency and min/max periods when changing between deadline and counted periodic modes. Reported and tested by: Vladimir ZakharovSponsored by: The FreeBSD Foundation Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c == --- head/sys/x86/x86/local_apic.c Fri Apr 15 14:30:40 2016 (r298055) +++ head/sys/x86/x86/local_apic.c Fri Apr 15 14:36:38 2016 (r298056) @@ -170,7 +170,7 @@ vm_paddr_t lapic_paddr; int x2apic_mode; int lapic_eoi_suppression; static int lapic_timer_tsc_deadline; -static u_long lapic_timer_divisor; +static u_long lapic_timer_divisor, count_freq; static struct eventtimer lapic_et; #ifdef SMP static uint64_t lapic_ipi_wait_mult; @@ -814,20 +814,46 @@ lapic_calibrate_initcount(struct eventti printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); } - et->et_frequency = value; + count_freq = value; } static void lapic_calibrate_deadline(struct eventtimer *et, struct lapic *la __unused) { - et->et_frequency = tsc_freq; if (bootverbose) { printf("lapic: deadline tsc mode, Frequency %ju Hz\n", - (uintmax_t)et->et_frequency); + (uintmax_t)tsc_freq); } } +static void +lapic_change_mode(struct eventtimer *et, struct lapic *la, +enum lat_timer_mode newmode) +{ + + if (la->la_timer_mode == newmode) + return; + switch (newmode) { + case LAT_MODE_PERIODIC: + lapic_timer_set_divisor(lapic_timer_divisor); + et->et_frequency = count_freq; + break; + case LAT_MODE_DEADLINE: + et->et_frequency = tsc_freq; + break; + case LAT_MODE_ONESHOT: + lapic_timer_set_divisor(lapic_timer_divisor); + et->et_frequency = count_freq; + break; + default: + panic("lapic_change_mode %d", newmode); + } + la->la_timer_mode = newmode; + et->et_min_period = (0x0002LLU << 32) / et->et_frequency; + et->et_max_period = (0xfffeLLU << 32) / et->et_frequency; +} + static int lapic_et_start(struct eventtimer *et, sbintime_t first, sbintime_t period) { @@ -835,28 +861,21 @@ lapic_et_start(struct eventtimer *et, sb la = [PCPU_GET(apic_id)]; if (et->et_frequency == 0) { + lapic_calibrate_initcount(et, la); if (lapic_timer_tsc_deadline) lapic_calibrate_deadline(et, la); - else - lapic_calibrate_initcount(et, la); - et->et_min_period = (0x0002LLU << 32) / et->et_frequency; - et->et_max_period = (0xfffeLLU << 32) / et->et_frequency; } if (period != 0) { - if (la->la_timer_mode == LAT_MODE_UNDEF) - lapic_timer_set_divisor(lapic_timer_divisor); - la->la_timer_mode = LAT_MODE_PERIODIC; + lapic_change_mode(et, la, LAT_MODE_PERIODIC); la->la_timer_period = ((uint32_t)et->et_frequency * period) >> 32; lapic_timer_periodic(la); } else if (lapic_timer_tsc_deadline) { - la->la_timer_mode = LAT_MODE_DEADLINE; + lapic_change_mode(et, la, LAT_MODE_DEADLINE); la->la_timer_period = (et->et_frequency * first) >> 32; lapic_timer_deadline(la); } else { - if (la->la_timer_mode == LAT_MODE_UNDEF) - lapic_timer_set_divisor(lapic_timer_divisor); - la->la_timer_mode = LAT_MODE_ONESHOT; + lapic_change_mode(et, la, LAT_MODE_ONESHOT); la->la_timer_period = ((uint32_t)et->et_frequency * first) >> 32; lapic_timer_oneshot(la); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298055 - in head/sys: arm/arm arm/at91 arm/cavium/cns11xx arm/xscale/ixp425 arm64/arm64
Author: pfg Date: Fri Apr 15 14:30:40 2016 New Revision: 298055 URL: https://svnweb.freebsd.org/changeset/base/298055 Log: arm: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/arm/arm/nexus.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/pmap-v6.c head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_pio.c head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/at91_rtc.c head/sys/arm/at91/at91_ssc.c head/sys/arm/at91/at91_twi.c head/sys/arm/at91/if_ate.c head/sys/arm/cavium/cns11xx/if_ece.c head/sys/arm/xscale/ixp425/ixp425_qmgr.c head/sys/arm64/arm64/nexus.c Modified: head/sys/arm/arm/nexus.c == --- head/sys/arm/arm/nexus.cFri Apr 15 14:28:34 2016(r298054) +++ head/sys/arm/arm/nexus.cFri Apr 15 14:30:40 2016(r298055) @@ -234,7 +234,7 @@ nexus_alloc_resource(device_t bus, devic } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) + if (rv == NULL) return (NULL); rman_set_rid(rv, *rid); Modified: head/sys/arm/arm/pmap-v4.c == --- head/sys/arm/arm/pmap-v4.c Fri Apr 15 14:28:34 2016(r298054) +++ head/sys/arm/arm/pmap-v4.c Fri Apr 15 14:30:40 2016(r298055) @@ -265,7 +265,7 @@ void(*pmap_copy_page_offs_func)(vm_pad int cnt); void (*pmap_zero_page_func)(vm_paddr_t, int, int); -struct msgbuf *msgbufp = 0; +struct msgbuf *msgbufp = NULL; /* * Crashdump maps. @@ -842,7 +842,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse ptep = uma_zalloc(l2zone, M_NOWAIT); rw_wlock(_global_lock); PMAP_LOCK(pm); - if (l2b->l2b_kva != 0) { + if (l2b->l2b_kva != NULL) { /* We lost the race. */ l2->l2_occupancy--; uma_zfree(l2zone, ptep); Modified: head/sys/arm/arm/pmap-v6.c == --- head/sys/arm/arm/pmap-v6.c Fri Apr 15 14:28:34 2016(r298054) +++ head/sys/arm/arm/pmap-v6.c Fri Apr 15 14:30:40 2016(r298055) @@ -310,15 +310,15 @@ static pt2_entry_t *CMAP3; static caddr_t CADDR3; caddr_t _tmppt = 0; -struct msgbuf *msgbufp = 0; /* XXX move it to machdep.c */ +struct msgbuf *msgbufp = NULL; /* XXX move it to machdep.c */ /* * Crashdump maps. */ static caddr_t crashdumpmap; -static pt2_entry_t *PMAP1 = 0, *PMAP2; -static pt2_entry_t *PADDR1 = 0, *PADDR2; +static pt2_entry_t *PMAP1 = NULL, *PMAP2; +static pt2_entry_t *PADDR1 = NULL, *PADDR2; #ifdef DDB static pt2_entry_t *PMAP3; static pt2_entry_t *PADDR3; Modified: head/sys/arm/at91/at91_mci.c == --- head/sys/arm/at91/at91_mci.cFri Apr 15 14:28:34 2016 (r298054) +++ head/sys/arm/at91/at91_mci.cFri Apr 15 14:30:40 2016 (r298055) @@ -526,16 +526,16 @@ at91_mci_deactivate(device_t dev) sc = device_get_softc(dev); if (sc->intrhand) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); - sc->intrhand = 0; + sc->intrhand = NULL; bus_generic_detach(sc->dev); if (sc->mem_res) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res), sc->mem_res); - sc->mem_res = 0; + sc->mem_res = NULL; if (sc->irq_res) bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq_res), sc->irq_res); - sc->irq_res = 0; + sc->irq_res = NULL; return; } Modified: head/sys/arm/at91/at91_pio.c == --- head/sys/arm/at91/at91_pio.cFri Apr 15 14:28:34 2016 (r298054) +++ head/sys/arm/at91/at91_pio.cFri Apr 15 14:30:40 2016 (r298055) @@ -240,16 +240,16 @@ at91_pio_deactivate(device_t dev) sc = device_get_softc(dev); if (sc->intrhand) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); - sc->intrhand = 0; + sc->intrhand = NULL; bus_generic_detach(sc->dev); if (sc->mem_res) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res), sc->mem_res); - sc->mem_res = 0; + sc->mem_res = NULL; if (sc->irq_res) bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq_res), sc->irq_res); - sc->irq_res = 0; + sc->irq_res = NULL; } static void Modified: head/sys/arm/at91/at91_pmc.c == ---
Re: svn commit: r298036 - head/sys/cam
On Fri, Apr 15, 2016 at 8:26 AM, Warner Loshwrote: > On Fri, Apr 15, 2016 at 12:05 AM, Howard Su wrote: > > >> I suggest to remove NETFLIX from the name. > > > > It's the Netflix I/O scheduler as opposed to the default one. So the > name is appropriate. It's better than CAM_WARNER_AWESOME_IOSCHED > which is the only other choice possible... :) > Surely there are other options ... who wouldn't want to have a scheduler with imps in it? :) -Ben ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298054 - head/sys/arm/arm
Author: andrew Date: Fri Apr 15 14:28:34 2016 New Revision: 298054 URL: https://svnweb.freebsd.org/changeset/base/298054 Log: Add a flag field to struct gic_irqsrc and use it to mark when we should write to the End of Interrupt (EOI) register before handling the interrupt. This should be a noop as it will be set for all edge triggered interrupts, however this will not be the case for MSI interrupts. These are also edge triggered, however we should not write to the EOI register until later in arm_gic_pre_ithread. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Fri Apr 15 14:26:24 2016(r298053) +++ head/sys/arm/arm/gic.c Fri Apr 15 14:28:34 2016(r298054) @@ -122,6 +122,8 @@ struct gic_irqsrc { uint32_tgi_irq; enum intr_polarity gi_pol; enum intr_trigger gi_trig; +#define GI_FLAG_EARLY_EOI (1 << 0) + u_int gi_flags; }; static u_int gic_irq_cpu; @@ -853,12 +855,12 @@ dispatch_irq: #ifdef GIC_DEBUG_SPURIOUS sc->last_irq[PCPU_GET(cpuid)] = irq; #endif - if (gi->gi_trig == INTR_TRIGGER_EDGE) + if ((gi->gi_flags & GI_FLAG_EARLY_EOI) == GI_FLAG_EARLY_EOI) gic_c_write_4(sc, GICC_EOIR, irq_active_reg); if (intr_isrc_dispatch(>gi_isrc, tf) != 0) { gic_irq_mask(sc, irq); - if (gi->gi_trig != INTR_TRIGGER_EDGE) + if ((gi->gi_flags & GI_FLAG_EARLY_EOI) != GI_FLAG_EARLY_EOI) gic_c_write_4(sc, GICC_EOIR, irq_active_reg); device_printf(sc->gic_dev, "Stray irq %u disabled\n", irq); } @@ -1087,6 +1089,9 @@ arm_gic_setup_intr(device_t dev, struct gi->gi_pol = pol; gi->gi_trig = trig; + /* Edge triggered interrupts need an early EOI sent */ + if (gi->gi_pol == INTR_TRIGGER_EDGE) + gi->gi_flags |= GI_FLAG_EARLY_EOI; /* * XXX - In case that per CPU interrupt is going to be enabled in time @@ -1160,7 +1165,7 @@ arm_gic_post_filter(device_t dev, struct struct gic_irqsrc *gi = (struct gic_irqsrc *)isrc; /* EOI for edge-triggered done earlier. */ - if (gi->gi_trig == INTR_TRIGGER_EDGE) + if ((gi->gi_flags & GI_FLAG_EARLY_EOI) == GI_FLAG_EARLY_EOI) return; arm_irq_memory_barrier(0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298053 - in head/sys/mips: adm5120 alchemy atheros idt mips nlm rmi rt305x
Author: pfg Date: Fri Apr 15 14:26:24 2016 New Revision: 298053 URL: https://svnweb.freebsd.org/changeset/base/298053 Log: mips: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: adrian Modified: head/sys/mips/adm5120/obio.c head/sys/mips/alchemy/obio.c head/sys/mips/atheros/apb.c head/sys/mips/idt/obio.c head/sys/mips/mips/machdep.c head/sys/mips/mips/nexus.c head/sys/mips/nlm/xlp_simplebus.c head/sys/mips/rmi/xlr_pci.c head/sys/mips/rt305x/obio.c head/sys/mips/rt305x/rt305x_gpio.c Modified: head/sys/mips/adm5120/obio.c == --- head/sys/mips/adm5120/obio.cFri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/adm5120/obio.cFri Apr 15 14:26:24 2016 (r298053) @@ -270,7 +270,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/alchemy/obio.c == --- head/sys/mips/alchemy/obio.cFri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/alchemy/obio.cFri Apr 15 14:26:24 2016 (r298053) @@ -271,7 +271,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/atheros/apb.c == --- head/sys/mips/atheros/apb.c Fri Apr 15 14:25:13 2016(r298052) +++ head/sys/mips/atheros/apb.c Fri Apr 15 14:26:24 2016(r298053) @@ -223,7 +223,7 @@ apb_alloc_resource(device_t bus, device_ } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/idt/obio.c == --- head/sys/mips/idt/obio.cFri Apr 15 14:25:13 2016(r298052) +++ head/sys/mips/idt/obio.cFri Apr 15 14:26:24 2016(r298053) @@ -204,7 +204,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/mips/machdep.c == --- head/sys/mips/mips/machdep.cFri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/mips/machdep.cFri Apr 15 14:26:24 2016 (r298053) @@ -316,7 +316,7 @@ cpu_initclocks(void) cpu_initclocks_bsp(); } -struct msgbuf *msgbufp=0; +struct msgbuf *msgbufp = NULL; /* * Initialize the hardware exception vectors, and the jump table used to Modified: head/sys/mips/mips/nexus.c == --- head/sys/mips/mips/nexus.c Fri Apr 15 14:25:13 2016(r298052) +++ head/sys/mips/mips/nexus.c Fri Apr 15 14:26:24 2016(r298053) @@ -315,7 +315,7 @@ nexus_alloc_resource(device_t bus, devic } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource for %s\n", __func__, device_get_nameunit(child)); return (0); Modified: head/sys/mips/nlm/xlp_simplebus.c == --- head/sys/mips/nlm/xlp_simplebus.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/nlm/xlp_simplebus.c Fri Apr 15 14:26:24 2016 (r298053) @@ -244,7 +244,7 @@ xlp_simplebus_alloc_resource(device_t bu } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { device_printf(bus, "%s: could not reserve resource for %s\n", __func__, device_get_nameunit(child)); return (NULL); Modified: head/sys/mips/rmi/xlr_pci.c == --- head/sys/mips/rmi/xlr_pci.c Fri Apr 15 14:25:13 2016(r298052) +++ head/sys/mips/rmi/xlr_pci.c Fri Apr 15 14:26:24 2016(r298053) @@ -537,7 +537,7 @@
svn commit: r298052 - in head/sys/powerpc: powerpc psim
Author: pfg Date: Fri Apr 15 14:25:13 2016 New Revision: 298052 URL: https://svnweb.freebsd.org/changeset/base/298052 Log: powerpc: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: jhibbits Modified: head/sys/powerpc/powerpc/db_disasm.c head/sys/powerpc/powerpc/elf32_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c head/sys/powerpc/psim/iobus.c Modified: head/sys/powerpc/powerpc/db_disasm.c == --- head/sys/powerpc/powerpc/db_disasm.cFri Apr 15 14:19:25 2016 (r298051) +++ head/sys/powerpc/powerpc/db_disasm.cFri Apr 15 14:25:13 2016 (r298052) @@ -836,9 +836,9 @@ disasm_fields(const struct opcode *popco reg = "tbu"; break; default: - reg = 0; + reg = NULL; } - if (reg == 0) + if (reg == NULL) pstr += sprintf(pstr, ", [unknown tbr %d ]", tbr); else pstr += sprintf(pstr, ", %s", reg); Modified: head/sys/powerpc/powerpc/elf32_machdep.c == --- head/sys/powerpc/powerpc/elf32_machdep.cFri Apr 15 14:19:25 2016 (r298051) +++ head/sys/powerpc/powerpc/elf32_machdep.cFri Apr 15 14:25:13 2016 (r298052) @@ -257,7 +257,7 @@ elf_reloc_internal(linker_file_t lf, Elf void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase) { - Elf_Rela *rela = 0, *relalim; + Elf_Rela *rela = NULL, *relalim; Elf_Addr relasz = 0; Elf_Addr *where; Modified: head/sys/powerpc/powerpc/elf64_machdep.c == --- head/sys/powerpc/powerpc/elf64_machdep.cFri Apr 15 14:19:25 2016 (r298051) +++ head/sys/powerpc/powerpc/elf64_machdep.cFri Apr 15 14:25:13 2016 (r298052) @@ -312,7 +312,7 @@ elf_reloc_internal(linker_file_t lf, Elf void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase) { - Elf_Rela *rela = 0, *relalim; + Elf_Rela *rela = NULL, *relalim; Elf_Addr relasz = 0; Elf_Addr *where; Modified: head/sys/powerpc/psim/iobus.c == --- head/sys/powerpc/psim/iobus.c Fri Apr 15 14:19:25 2016 (r298051) +++ head/sys/powerpc/psim/iobus.c Fri Apr 15 14:25:13 2016 (r298052) @@ -272,7 +272,7 @@ iobus_read_ivar(device_t dev, device_t c { struct iobus_devinfo *dinfo; -if ((dinfo = device_get_ivars(child)) == 0) +if ((dinfo = device_get_ivars(child)) == NULL) return (ENOENT); switch (which) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298051 - head/sys/arm/arm
Author: andrew Date: Fri Apr 15 14:19:25 2016 New Revision: 298051 URL: https://svnweb.freebsd.org/changeset/base/298051 Log: Add initial GICv2m support to the arm GIC driver. This will be used to support MSI and MSI-X interrupts, however intrng needs updates before this can happen. For now we just attach the driver until the MSI API is ready. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D5950 Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Fri Apr 15 13:34:59 2016(r298050) +++ head/sys/arm/arm/gic.c Fri Apr 15 14:19:25 2016(r298051) @@ -134,6 +134,19 @@ u_int sgi_first_unused = GIC_FIRST_SGI; #endif #endif +#ifdef ARM_INTRNG +struct arm_gic_range { + uint64_t bus; + uint64_t host; + uint64_t size; +}; + +struct arm_gic_devinfo { + struct ofw_bus_devinfo obdinfo; + struct resource_listrl; +}; +#endif + struct arm_gic_softc { device_tgic_dev; #ifdef ARM_INTRNG @@ -151,6 +164,14 @@ struct arm_gic_softc { #ifdef GIC_DEBUG_SPURIOUS uint32_tlast_irq[MAXCPU]; #endif + +#ifdef ARM_INTRNG + /* FDT child data */ + pcell_t addr_cells; + pcell_t size_cells; + int nranges; + struct arm_gic_range * ranges; +#endif }; #ifdef ARM_INTRNG @@ -195,6 +216,7 @@ static struct ofw_compat_data compat_dat {"arm,cortex-a7-gic", true}, {"arm,arm11mp-gic", true}, {"brcm,brahma-b15-gic", true}, + {"qcom,msm-qgic2", true}, {NULL, false} }; @@ -437,6 +459,107 @@ arm_gic_register_isrcs(struct arm_gic_so sc->nirqs = num; return (0); } + +static int +arm_gic_fill_ranges(phandle_t node, struct arm_gic_softc *sc) +{ + pcell_t host_cells; + cell_t *base_ranges; + ssize_t nbase_ranges; + int i, j, k; + + host_cells = 1; + OF_getencprop(OF_parent(node), "#address-cells", _cells, + sizeof(host_cells)); + sc->addr_cells = 2; + OF_getencprop(node, "#address-cells", >addr_cells, + sizeof(sc->addr_cells)); + sc->size_cells = 2; + OF_getencprop(node, "#size-cells", >size_cells, + sizeof(sc->size_cells)); + + nbase_ranges = OF_getproplen(node, "ranges"); + if (nbase_ranges < 0) + return (-1); + sc->nranges = nbase_ranges / sizeof(cell_t) / + (sc->addr_cells + host_cells + sc->size_cells); + if (sc->nranges == 0) + return (0); + + sc->ranges = malloc(sc->nranges * sizeof(sc->ranges[0]), + M_DEVBUF, M_WAITOK); + base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); + OF_getencprop(node, "ranges", base_ranges, nbase_ranges); + + for (i = 0, j = 0; i < sc->nranges; i++) { + sc->ranges[i].bus = 0; + for (k = 0; k < sc->addr_cells; k++) { + sc->ranges[i].bus <<= 32; + sc->ranges[i].bus |= base_ranges[j++]; + } + sc->ranges[i].host = 0; + for (k = 0; k < host_cells; k++) { + sc->ranges[i].host <<= 32; + sc->ranges[i].host |= base_ranges[j++]; + } + sc->ranges[i].size = 0; + for (k = 0; k < sc->size_cells; k++) { + sc->ranges[i].size <<= 32; + sc->ranges[i].size |= base_ranges[j++]; + } + } + + free(base_ranges, M_DEVBUF); + return (sc->nranges); +} + +static bool +arm_gic_add_children(device_t dev) +{ + struct arm_gic_softc *sc; + struct arm_gic_devinfo *dinfo; + phandle_t child, node; + device_t cdev; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + /* If we have no children don't probe for them */ + child = OF_child(node); + if (child == 0) + return (false); + + if (arm_gic_fill_ranges(node, sc) < 0) { + device_printf(dev, "Have a child, but no ranges\n"); + return (false); + } + + for (; child != 0; child = OF_peer(child)) { + dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO); + + if (ofw_bus_gen_setup_devinfo(>obdinfo, child) != 0) { + free(dinfo, M_DEVBUF); + continue; + } + + resource_list_init(>rl); + ofw_bus_reg_to_rl(dev, child, sc->addr_cells, + sc->size_cells, >rl); + + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev,
svn commit: r298050 - head/sys/kern
Author: trasz Date: Fri Apr 15 13:34:59 2016 New Revision: 298050 URL: https://svnweb.freebsd.org/changeset/base/298050 Log: Allocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there in the first place. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_racct.c == --- head/sys/kern/kern_racct.c Fri Apr 15 12:55:40 2016(r298049) +++ head/sys/kern/kern_racct.c Fri Apr 15 13:34:59 2016(r298050) @@ -1314,7 +1314,7 @@ racct_init(void) return; racct_zone = uma_zcreate("racct", sizeof(struct racct), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* * XXX: Move this somewhere. */ Modified: head/sys/kern/kern_rctl.c == --- head/sys/kern/kern_rctl.c Fri Apr 15 12:55:40 2016(r298049) +++ head/sys/kern/kern_rctl.c Fri Apr 15 13:34:59 2016(r298050) @@ -2194,10 +2194,10 @@ rctl_init(void) return; rctl_rule_zone = uma_zcreate("rctl_rule", sizeof(struct rctl_rule), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); rctl_rule_link_zone = uma_zcreate("rctl_rule_link", sizeof(struct rctl_rule_link), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); /* * Set default values, making sure not to overwrite the ones ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298049 - head/sys/modules/cam
Author: kib Date: Fri Apr 15 12:55:40 2016 New Revision: 298049 URL: https://svnweb.freebsd.org/changeset/base/298049 Log: Sync cam.ko module source list with the static kernel file list. Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile == --- head/sys/modules/cam/Makefile Fri Apr 15 12:24:01 2016 (r298048) +++ head/sys/modules/cam/Makefile Fri Apr 15 12:55:40 2016 (r298049) @@ -21,7 +21,7 @@ SRCS+=cam_compat.c .if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c) SRCS+= cam_machdep.c .endif -SRCS+= cam_periph.c cam_queue.c cam_sim.c cam_xpt.c +SRCS+= cam_iosched.c cam_periph.c cam_queue.c cam_sim.c cam_xpt.c SRCS+= scsi_all.c scsi_cd.c scsi_ch.c SRCS+= scsi_da.c SRCS+= scsi_pass.c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298048 - head/sys/netpfil/ipfw
Author: pfg Date: Fri Apr 15 12:24:01 2016 New Revision: 298048 URL: https://svnweb.freebsd.org/changeset/base/298048 Log: netpfil: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: ae Modified: head/sys/netpfil/ipfw/ip_fw_iface.c head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_iface.c == --- head/sys/netpfil/ipfw/ip_fw_iface.c Fri Apr 15 12:17:34 2016 (r298047) +++ head/sys/netpfil/ipfw/ip_fw_iface.c Fri Apr 15 12:24:01 2016 (r298048) @@ -471,7 +471,7 @@ export_iface_internal(struct namedobj_in da = (struct dump_iface_args *)arg; i = (ipfw_iface_info *)ipfw_get_sopt_space(da->sd, sizeof(*i)); - KASSERT(i != 0, ("previously checked buffer is not enough")); + KASSERT(i != NULL, ("previously checked buffer is not enough")); iif = (struct ipfw_iface *)no; Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c == --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Fri Apr 15 12:17:34 2016 (r298047) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Fri Apr 15 12:24:01 2016 (r298048) @@ -2797,7 +2797,7 @@ dump_soptcodes(struct ip_fw_chain *chain for (n = 1; n <= count; n++) { i = (ipfw_sopt_info *)ipfw_get_sopt_space(sd, sizeof(*i)); - KASSERT(i != 0, ("previously checked buffer is not enough")); + KASSERT(i != NULL, ("previously checked buffer is not enough")); sh = _handlers[n]; i->opcode = sh->opcode; i->version = sh->version; Modified: head/sys/netpfil/ipfw/ip_fw_table.c == --- head/sys/netpfil/ipfw/ip_fw_table.c Fri Apr 15 12:17:34 2016 (r298047) +++ head/sys/netpfil/ipfw/ip_fw_table.c Fri Apr 15 12:24:01 2016 (r298048) @@ -2130,7 +2130,7 @@ export_table_internal(struct namedobj_in dta = (struct dump_table_args *)arg; i = (ipfw_xtable_info *)ipfw_get_sopt_space(dta->sd, sizeof(*i)); - KASSERT(i != 0, ("previously checked buffer is not enough")); + KASSERT(i != NULL, ("previously checked buffer is not enough")); export_table_info(dta->ch, (struct table_config *)no, i); } @@ -2746,7 +2746,7 @@ list_table_algo(struct ip_fw_chain *ch, for (n = 1; n <= count; n++) { i = (ipfw_ta_info *)ipfw_get_sopt_space(sd, sizeof(*i)); - KASSERT(i != 0, ("previously checked buffer is not enough")); + KASSERT(i != NULL, ("previously checked buffer is not enough")); ta = tcfg->algo[n]; strlcpy(i->algoname, ta->name, sizeof(i->algoname)); i->type = ta->type; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298047 - head/sys/sparc64/ebus
Author: pfg Date: Fri Apr 15 12:17:34 2016 New Revision: 298047 URL: https://svnweb.freebsd.org/changeset/base/298047 Log: sparc64: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/sparc64/ebus/ebus.c Modified: head/sys/sparc64/ebus/ebus.c == --- head/sys/sparc64/ebus/ebus.cFri Apr 15 12:16:15 2016 (r298046) +++ head/sys/sparc64/ebus/ebus.cFri Apr 15 12:17:34 2016 (r298047) @@ -370,7 +370,7 @@ ebus_pci_attach(device_t dev) eri = >sc_rinfo[i]; if (i < rnum) rman_fini(>eri_rman); - if (eri->eri_res != 0) { + if (eri->eri_res != NULL) { bus_release_resource(dev, eri->eri_rtype, PCIR_BAR(rnum), eri->eri_res); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298046 - in head/sys/ofed/drivers/infiniband: hw/mlx4 ulp/ipoib
Author: pfg Date: Fri Apr 15 12:16:15 2016 New Revision: 298046 URL: https://svnweb.freebsd.org/changeset/base/298046 Log: ofed: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: hselasky Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c == --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Fri Apr 15 11:55:29 2016(r298045) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Fri Apr 15 12:16:15 2016(r298046) @@ -1297,7 +1297,7 @@ static int del_gid_entry(struct ib_qp *i pr_warn("could not find mgid entry\n"); mutex_unlock(>mutex); - return ge != 0 ? 0 : -EINVAL; + return ge != NULL ? 0 : -EINVAL; } static int _mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid, Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c == --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Apr 15 11:55:29 2016(r298045) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Apr 15 12:16:15 2016(r298046) @@ -1485,7 +1485,7 @@ ipoib_resolvemulti(struct ifnet *ifp, st e_addr = LLADDR(sdl); if (!IPOIB_IS_MULTICAST(e_addr)) return EADDRNOTAVAIL; - *llsa = 0; + *llsa = NULL; return 0; #ifdef INET ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298045 - head/sys/kern
Author: trasz Date: Fri Apr 15 11:55:29 2016 New Revision: 298045 URL: https://svnweb.freebsd.org/changeset/base/298045 Log: Sort variable declarations. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_racct.c == --- head/sys/kern/kern_racct.c Fri Apr 15 09:21:50 2016(r298044) +++ head/sys/kern/kern_racct.c Fri Apr 15 11:55:29 2016(r298045) @@ -472,8 +472,8 @@ racct_create(struct racct **racctp) static void racct_destroy_locked(struct racct **racctp) { - int i; struct racct *racct; + int i; ASSERT_RACCT_ENABLED(); @@ -668,8 +668,7 @@ racct_add_buf(struct proc *p, const stru static int racct_set_locked(struct proc *p, int resource, uint64_t amount, int force) { - int64_t old_amount, decayed_amount; - int64_t diff_proc, diff_cred; + int64_t old_amount, decayed_amount, diff_proc, diff_cred; #ifdef RCTL int error; #endif @@ -964,10 +963,9 @@ racct_proc_fork_done(struct proc *child) void racct_proc_exit(struct proc *p) { - int i; - uint64_t runtime; struct timeval wallclock; - uint64_t pct_estimate, pct; + uint64_t pct_estimate, pct, runtime; + int i; if (!racct_enable) return; @@ -1206,8 +1204,7 @@ racctd(void) struct thread *td; struct proc *p; struct timeval wallclock; - uint64_t runtime; - uint64_t pct, pct_estimate; + uint64_t pct, pct_estimate, runtime; ASSERT_RACCT_ENABLED(); Modified: head/sys/kern/kern_rctl.c == --- head/sys/kern/kern_rctl.c Fri Apr 15 09:21:50 2016(r298044) +++ head/sys/kern/kern_rctl.c Fri Apr 15 11:55:29 2016(r298045) @@ -210,8 +210,8 @@ static struct dict actionnames[] = { static void rctl_init(void); SYSINIT(rctl, SI_SUB_RACCT, SI_ORDER_FIRST, rctl_init, NULL); -static uma_zone_t rctl_rule_link_zone; static uma_zone_t rctl_rule_zone; +static uma_zone_t rctl_rule_link_zone; static struct rwlock rctl_lock; RW_SYSINIT(rctl_lock, _lock, "RCTL lock"); @@ -229,8 +229,7 @@ static MALLOC_DEFINE(M_RCTL, "rctl", "Re static int rctl_throttle_min_sysctl(SYSCTL_HANDLER_ARGS) { - int val = rctl_throttle_min; - int error; + int error, val = rctl_throttle_min; error = sysctl_handle_int(oidp, , 0, req); if (error || !req->newptr) @@ -247,8 +246,7 @@ static int rctl_throttle_min_sysctl(SYSC static int rctl_throttle_max_sysctl(SYSCTL_HANDLER_ARGS) { - int val = rctl_throttle_max; - int error; + int error, val = rctl_throttle_max; error = sysctl_handle_int(oidp, , 0, req); if (error || !req->newptr) @@ -265,8 +263,7 @@ static int rctl_throttle_max_sysctl(SYSC static int rctl_throttle_pct_sysctl(SYSCTL_HANDLER_ARGS) { - int val = rctl_throttle_pct; - int error; + int error, val = rctl_throttle_pct; error = sysctl_handle_int(oidp, , 0, req); if (error || !req->newptr) @@ -283,8 +280,7 @@ static int rctl_throttle_pct_sysctl(SYSC static int rctl_throttle_pct2_sysctl(SYSCTL_HANDLER_ARGS) { - int val = rctl_throttle_pct2; - int error; + int error, val = rctl_throttle_pct2; error = sysctl_handle_int(oidp, , 0, req); if (error || !req->newptr) @@ -367,8 +363,8 @@ rctl_proc_rule_to_racct(const struct pro static int64_t rctl_available_resource(const struct proc *p, const struct rctl_rule *rule) { - int64_t available; const struct racct *racct; + int64_t available; ASSERT_RACCT_ENABLED(); RCTL_LOCK_ASSERT(); @@ -515,10 +511,10 @@ rctl_enforce(struct proc *p, int resourc struct rctl_rule *rule; struct rctl_rule_link *link; struct sbuf sb; + char *buf; int64_t available; uint64_t sleep_ms, sleep_ratio; int should_deny = 0; - char *buf; ASSERT_RACCT_ENABLED(); @@ -945,8 +941,8 @@ static int rctl_racct_remove_rules(struct racct *racct, const struct rctl_rule *filter) { - int removed = 0; struct rctl_rule_link *link, *linktmp; + int removed = 0; ASSERT_RACCT_ENABLED(); RCTL_WLOCK_ASSERT(); @@ -1160,11 +1156,11 @@ rctl_rule_fully_specified(const struct r static int rctl_string_to_rule(char *rulestr, struct rctl_rule **rulep) { - int error = 0; + struct rctl_rule *rule; char *subjectstr, *subject_idstr, *resourcestr, *actionstr, *amountstr, *perstr; - struct rctl_rule *rule; id_t id; + int error = 0; ASSERT_RACCT_ENABLED(); @@ -1450,8 +1446,8 @@ rctl_rule_remove_callback(struct racct * int rctl_rule_remove(struct rctl_rule *filter) { -
svn commit: r298044 - head/sys/x86/x86
Author: royger Date: Fri Apr 15 09:21:50 2016 New Revision: 298044 URL: https://svnweb.freebsd.org/changeset/base/298044 Log: busdma/bounce: revert r292255 Revert r292255 because it can create bounced regions without contiguous page offsets, which is needed for USB devices. Another solution would be to force bouncing the full buffer always (even when only one page requires bouncing), but this seems overly complicated and unnecessary, and it will probably involve using more bounce pages than the current code. Reported by: phk Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c == --- head/sys/x86/x86/busdma_bounce.cFri Apr 15 09:13:01 2016 (r298043) +++ head/sys/x86/x86/busdma_bounce.cFri Apr 15 09:21:50 2016 (r298044) @@ -476,7 +476,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); if (bus_dma_run_filter(>common, curaddr)) { - sgsize = MIN(PAGE_SIZE, sgsize); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -516,7 +517,8 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm else paddr = pmap_extract(pmap, vaddr); if (bus_dma_run_filter(>common, paddr) != 0) { - sg_len = PAGE_SIZE; + sg_len = roundup2(sg_len, + dmat->common.alignment); map->pagesneeded++; } vaddr += sg_len; @@ -552,7 +554,9 @@ _bus_dmamap_count_ma(bus_dma_tag_t dmat, max_sgsize = MIN(buflen, dmat->common.maxsegsz); sg_len = MIN(sg_len, max_sgsize); if (bus_dma_run_filter(>common, paddr) != 0) { - sg_len = MIN(PAGE_SIZE, max_sgsize); + sg_len = roundup2(sg_len, + dmat->common.alignment); + sg_len = MIN(sg_len, max_sgsize); KASSERT((sg_len & (dmat->common.alignment - 1)) == 0, ("Segment size is not aligned")); map->pagesneeded++; @@ -648,7 +652,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ int *segp) { bus_size_t sgsize; - bus_addr_t curaddr, nextaddr; + bus_addr_t curaddr; int error; if (map == NULL) @@ -672,12 +676,9 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(>common, curaddr)) { - nextaddr = 0; - sgsize = MIN(PAGE_SIZE, sgsize); - if ((curaddr & PAGE_MASK) + sgsize > PAGE_SIZE) - nextaddr = roundup2(curaddr, PAGE_SIZE); - curaddr = add_bounce_page(dmat, map, 0, curaddr, - nextaddr, sgsize); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); + curaddr = add_bounce_page(dmat, map, 0, curaddr, 0, + sgsize); } sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs, segp); @@ -743,7 +744,8 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(>common, curaddr)) { - sgsize = MIN(PAGE_SIZE, max_sgsize); + sgsize = roundup2(sgsize, dmat->common.alignment); + sgsize = MIN(sgsize, max_sgsize); curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, 0, sgsize); } else { @@ -772,6 +774,17 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t int error, page_index; bus_size_t sgsize, max_sgsize; + if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) { + /* +* If we have to keep the offset of each page this function +* is not suitable, switch back to bus_dmamap_load_ma_triv +* which is going to do the right thing in this case. +*/ + error = bus_dmamap_load_ma_triv(dmat, map, ma, buflen, ma_offs, + flags, segs, segp); + return
svn commit: r298043 - head/sys/ddb
Author: kib Date: Fri Apr 15 09:13:01 2016 New Revision: 298043 URL: https://svnweb.freebsd.org/changeset/base/298043 Log: Avoid NULL pointer dereference, for a process which is not (yet) a member of a process group, e.g. during the system bootstrap. Submitted by: Mark Cave-AylandMFC after:1 week Modified: head/sys/ddb/db_ps.c Modified: head/sys/ddb/db_ps.c == --- head/sys/ddb/db_ps.cFri Apr 15 08:17:55 2016(r298042) +++ head/sys/ddb/db_ps.cFri Apr 15 09:13:01 2016(r298043) @@ -184,7 +184,8 @@ db_ps(db_expr_t addr, bool hasaddr, db_e strlcat(state, "V", sizeof(state)); if (p->p_flag & P_SYSTEM || p->p_lock > 0) strlcat(state, "L", sizeof(state)); - if (p->p_session != NULL && SESS_LEADER(p)) + if (p->p_pgrp != NULL && p->p_session != NULL && + SESS_LEADER(p)) strlcat(state, "s", sizeof(state)); /* Cheated here and didn't compare pgid's. */ if (p->p_flag & P_CONTROLT) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298042 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Apr 15 08:17:55 2016 New Revision: 298042 URL: https://svnweb.freebsd.org/changeset/base/298042 Log: hyperv/hn: Hide ring to channel linkage message under bootverbose Suggested by: Dexuan Cui MFC after:1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Apr 15 08:08:46 2016(r298041) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Apr 15 08:17:55 2016(r298042) @@ -2808,8 +2808,10 @@ hn_channel_attach(struct hn_softc *sc, s rxr->hn_rx_flags |= HN_RX_FLAG_ATTACHED; chan->hv_chan_rxr = rxr; - if_printf(sc->hn_ifp, "link RX ring %d to channel%u\n", - idx, chan->offer_msg.child_rel_id); + if (bootverbose) { + if_printf(sc->hn_ifp, "link RX ring %d to channel%u\n", + idx, chan->offer_msg.child_rel_id); + } if (idx < sc->hn_tx_ring_inuse) { struct hn_tx_ring *txr = >hn_tx_ring[idx]; @@ -2820,8 +2822,10 @@ hn_channel_attach(struct hn_softc *sc, s chan->hv_chan_txr = txr; txr->hn_chan = chan; - if_printf(sc->hn_ifp, "link TX ring %d to channel%u\n", - idx, chan->offer_msg.child_rel_id); + if (bootverbose) { + if_printf(sc->hn_ifp, "link TX ring %d to channel%u\n", + idx, chan->offer_msg.child_rel_id); + } } /* Bind channel to a proper CPU */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r297974 - in head/sys: i386/i386 i386/ibcs2 x86/x86
On Thu, 14 Apr 2016, Peter Wemm wrote: On Thursday, April 14, 2016 12:14:13 PM Pedro Giffuni wrote: On 04/14/16 12:04, Pedro F. Giffuni wrote: Author: pfg Date: Thu Apr 14 17:04:06 2016 New Revision: 297974 URL: https://svnweb.freebsd.org/changeset/base/297974 Log: x86: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Modified: head/sys/i386/i386/db_disasm.c head/sys/i386/i386/pmap.c head/sys/i386/ibcs2/imgact_coff.c head/sys/x86/x86/nexus.c ... Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Thu Apr 14 16:32:27 2016 (r297973) +++ head/sys/i386/i386/pmap.c Thu Apr 14 17:04:06 2016(r297974) @@ -269,15 +269,15 @@ pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t ptvmmap = 0; caddr_t CADDR3; -struct msgbuf *msgbufp = 0; +struct msgbuf *msgbufp = NULL; /* * Crashdump maps. */ static caddr_t crashdumpmap; -static pt_entry_t *PMAP1 = 0, *PMAP2; -static pt_entry_t *PADDR1 = 0, *PADDR2; +static pt_entry_t *PMAP1 = NULL, *PMAP2; +static pt_entry_t *PADDR1 = NULL, *PADDR2; #ifdef SMP static int PMAP1cpu; static int PMAP1changedcpu; Hmm .. being static, there is no need to initialize these. Several eons ago, at least some of these were initialized to force them into the data section so that they had known or safe values before the bss zero pass. I don't know if that was ever an issue on freebsd, or just the upstream code. You'd have to look well back into ancient 2.0 or earlier vintage code. I have a vague memory that our early a.out kernel had to zero its own bss because the early a.out boot blocks didn't, and these variables would have been caught in the crossfire. Or something.. I fixed this in 2003. Much later than I thought or could remember without the commit logs. Someone named peter removed clearing of the bss in locore to work around bugs exposed by gcc changes. This broke booting without loader, so someone named bde put back the clearing in the right place in locore so that it didn't clobber variables like cpu_id. It was only a few variables like cpu_id which were affected, and the problem was changing them from nonzero to 0, not setting them to 0. In any case, I'd be surprised if the compiler didn't put them in the bss section these days anyway. At least without cc -ffreestanding, anyway. gcc apparently started doing this as late as 2003. -fno-initialized-in-bss can be used to restore the old behaviour, but we never used it. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298041 - in head/sys/dev/hyperv: netvsc storvsc
Author: sephe Date: Fri Apr 15 08:08:46 2016 New Revision: 298041 URL: https://svnweb.freebsd.org/changeset/base/298041 Log: hyperv: No need to zero out softc MFC after:1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Apr 15 08:01:07 2016(r298040) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Apr 15 08:08:46 2016(r298041) @@ -419,7 +419,6 @@ netvsc_attach(device_t dev) sc = device_get_softc(dev); - bzero(sc, sizeof(hn_softc_t)); sc->hn_unit = unit; sc->hn_dev = dev; Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Apr 15 08:01:07 2016(r298040) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Apr 15 08:08:46 2016(r298041) @@ -981,8 +981,6 @@ storvsc_attach(device_t dev) goto cleanup; } - bzero(sc, sizeof(struct storvsc_softc)); - /* fill in driver specific properties */ sc->hs_drv_props = _drv_props_table[stor_type]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298039 - head/sys/dev/hyperv/vmbus
Author: sephe Date: Fri Apr 15 07:48:41 2016 New Revision: 298039 URL: https://svnweb.freebsd.org/changeset/base/298039 Log: hyperv/vmbus: Put multi-channel offer logging under bootverbose Suggested by: Dexuan Cui MFC after:1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c == --- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Apr 15 07:39:43 2016 (r298038) +++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Apr 15 07:48:41 2016 (r298039) @@ -219,10 +219,14 @@ vmbus_channel_process_offer(hv_vmbus_cha sc_list_entry); mtx_unlock(>sc_lock); + if (bootverbose) { + printf("VMBUS get multi-channel offer, " + "rel=%u, sub=%u\n", + new_channel->offer_msg.child_rel_id, + new_channel->offer_msg.offer.sub_channel_index); + } + /* Insert new channel into channel_anchor. */ - printf("VMBUS get multi-channel offer, rel=%u,sub=%u\n", - new_channel->offer_msg.child_rel_id, - new_channel->offer_msg.offer.sub_channel_index); mtx_lock(_vmbus_g_connection.channel_lock); TAILQ_INSERT_TAIL(_vmbus_g_connection.channel_anchor, new_channel, list_entry); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r298038 - head/sys/dev/hyperv/storvsc
Author: sephe Date: Fri Apr 15 07:39:43 2016 New Revision: 298038 URL: https://svnweb.freebsd.org/changeset/base/298038 Log: hyperv/stor: Temporary disable the wrongly done command timeout. It will be reenabled once the request processing is corrected. MFC after:1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Apr 15 05:10:39 2016(r298037) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Apr 15 07:39:43 2016(r298038) @@ -1259,6 +1259,7 @@ storvsc_timeout_test(struct hv_storvsc_r } #endif /* HVS_TIMEOUT_TEST */ +#ifdef notyet /** * @brief timeout handler for requests * @@ -1306,6 +1307,7 @@ storvsc_timeout(void *arg) storvsc_timeout_test(reqp, MODE_SELECT_10, 1); #endif } +#endif /** * @brief StorVSC device poll function @@ -1458,6 +1460,7 @@ storvsc_action(struct cam_sim *sim, unio return; } +#ifdef notyet if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { callout_init(>callout, 1); callout_reset_sbt(>callout, @@ -1477,6 +1480,7 @@ storvsc_action(struct cam_sim *sim, unio } #endif /* HVS_TIMEOUT_TEST */ } +#endif if ((res = hv_storvsc_io_request(sc->hs_dev, reqp)) != 0) { xpt_print(ccb->ccb_h.path, @@ -2024,6 +2028,7 @@ storvsc_io_done(struct hv_storvsc_reques mtx_unlock(>hs_lock); } +#ifdef notyet /* * callout_drain() will wait for the timer handler to finish * if it is running. So we don't need any lock to synchronize @@ -2034,6 +2039,7 @@ storvsc_io_done(struct hv_storvsc_reques if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { callout_drain(>callout); } +#endif ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.status &= ~CAM_STATUS_MASK; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r297974 - in head/sys: i386/i386 i386/ibcs2 x86/x86
On Thursday, April 14, 2016 12:14:13 PM Pedro Giffuni wrote: > On 04/14/16 12:04, Pedro F. Giffuni wrote: > > Author: pfg > > Date: Thu Apr 14 17:04:06 2016 > > New Revision: 297974 > > URL: https://svnweb.freebsd.org/changeset/base/297974 > > > > Log: > >x86: for pointers replace 0 with NULL. > > > >These are mostly cosmetical, no functional change. > > > >Found with devel/coccinelle. > > > > Modified: > >head/sys/i386/i386/db_disasm.c > >head/sys/i386/i386/pmap.c > >head/sys/i386/ibcs2/imgact_coff.c > >head/sys/x86/x86/nexus.c > > ... > > > Modified: head/sys/i386/i386/pmap.c > > == > > --- head/sys/i386/i386/pmap.c Thu Apr 14 16:32:27 2016 (r297973) > > +++ head/sys/i386/i386/pmap.c Thu Apr 14 17:04:06 2016 > > (r297974) > > @@ -269,15 +269,15 @@ pt_entry_t *CMAP3; > > > > static pd_entry_t *KPTD; > > caddr_t ptvmmap = 0; > > caddr_t CADDR3; > > > > -struct msgbuf *msgbufp = 0; > > +struct msgbuf *msgbufp = NULL; > > > > /* > > > >* Crashdump maps. > >*/ > > > > static caddr_t crashdumpmap; > > > > -static pt_entry_t *PMAP1 = 0, *PMAP2; > > -static pt_entry_t *PADDR1 = 0, *PADDR2; > > +static pt_entry_t *PMAP1 = NULL, *PMAP2; > > +static pt_entry_t *PADDR1 = NULL, *PADDR2; > > > > #ifdef SMP > > static int PMAP1cpu; > > static int PMAP1changedcpu; > > Hmm .. being static, there is no need to initialize these. Several eons ago, at least some of these were initialized to force them into the data section so that they had known or safe values before the bss zero pass. I don't know if that was ever an issue on freebsd, or just the upstream code. You'd have to look well back into ancient 2.0 or earlier vintage code. I have a vague memory that our early a.out kernel had to zero its own bss because the early a.out boot blocks didn't, and these variables would have been caught in the crossfire. Or something.. In any case, I'd be surprised if the compiler didn't put them in the bss section these days anyway. At least without cc -ffreestanding, anyway. -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 signature.asc Description: This is a digitally signed message part.
Re: svn commit: r298036 - head/sys/cam
On Fri, Apr 15, 2016 at 1:10 PM Warner Loshwrote: > Author: imp > Date: Fri Apr 15 05:10:32 2016 > New Revision: 298036 > URL: https://svnweb.freebsd.org/changeset/base/298036 > > Log: > Put function only used by CAM_NETFLIX_IOSCHED under that ifdef. > > I suggest to remove NETFLIX from the name. > Modified: > head/sys/cam/cam_iosched.c > > Modified: head/sys/cam/cam_iosched.c > > == > --- head/sys/cam/cam_iosched.c Fri Apr 15 05:10:31 2016(r298035) > +++ head/sys/cam/cam_iosched.c Fri Apr 15 05:10:32 2016(r298036) > @@ -625,9 +625,11 @@ cam_iosched_cl_maybe_steer(struct contro > /* Periph drivers set these flags to indicate work > */ > #define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16) > > +#ifdef CAM_NETFLIX_IOSCHED > static void > cam_iosched_io_metric_update(struct cam_iosched_softc *isc, > sbintime_t sim_latency, int cmd, size_t size); > +#endif > > static inline int > cam_iosched_has_flagged_work(struct cam_iosched_softc *isc) > @@ -1522,6 +1524,7 @@ cam_iosched_update(struct iop_stats *iop > iop->sd = (int64_t)var < 0 ? 0 : isqrt64(var); > } > > +#ifdef CAM_NETFLIX_IOSCHED > static void > cam_iosched_io_metric_update(struct cam_iosched_softc *isc, > sbintime_t sim_latency, int cmd, size_t size) > @@ -1541,6 +1544,7 @@ cam_iosched_io_metric_update(struct cam_ > break; > } > } > +#endif > > #ifdef DDB > static int biolen(struct bio_queue_head *bq) > ___ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"