Re: svn commit: r228698 - head/usr.bin/m4
On 12/18/2011 15:54, Dimitry Andric wrote: Author: dim Date: Sun Dec 18 23:54:32 2011 New Revision: 228698 URL: http://svn.freebsd.org/changeset/base/228698 Log: Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. Pointy hat to: bapt Still seems broken to me: # make cleandir make obj make depend make all /usr/obj/frontier/svn/head/usr.bin/m4 created for /frontier/svn/head/usr.bin/m4 yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l tokenizer.c rm -f .depend mkdep -f .depend -a-DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 /frontier/svn/head/usr.bin/m4/eval.c /frontier/svn/head/usr.bin/m4/expr.c /frontier/svn/head/usr.bin/m4/look.c /frontier/svn/head/usr.bin/m4/main.c /frontier/svn/head/usr.bin/m4/misc.c /frontier/svn/head/usr.bin/m4/gnum4.c /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c /frontier/svn/head/usr.bin/m4/lib/ohash_do.c /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c /frontier/svn/head/usr.bin/m4/lib/ohash_init.c /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c echo m4: /usr/lib/libc.a .depend cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c cc1: warnings being treated as errors /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit braces to avoid ambiguous 'else' *** Error code 1 Stop in /frontier/svn/head/usr.bin/m4. Reverting to r228696 lets it build again. BTW, there seems to be an issue with the svn change: svn up -r228696 Updating '.': Dparser.y Aparser.y Dtokenizer.l Atokenizer.l Ueval.c UMakefile Updated to revision 228696. r228697 seems to have included replacing those 2 files, which seems sub-optimal, and may cause problems for the svn2cvs exporter. bapt, what did you do here? Doug Modified: head/usr.bin/m4/Makefile Modified: head/usr.bin/m4/Makefile == --- head/usr.bin/m4/Makefile Sun Dec 18 22:04:55 2011(r228697) +++ head/usr.bin/m4/Makefile Sun Dec 18 23:54:32 2011(r228698) @@ -6,7 +6,7 @@ PROG=m4 CFLAGS+=-DEXTENDED -I${.CURDIR}/lib -LDADD= -ly -ll +LDADD= -ly -ll -lm # clang needs 1 while with gcc we can use 2 #WARNS= 1 -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228701 - head/usr.bin/m4
Author: bz Date: Mon Dec 19 08:50:17 2011 New Revision: 228701 URL: http://svn.freebsd.org/changeset/base/228701 Log: Unbreak the build after r228697 adding the { } block to make clear which if the else belongs to. Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c == --- head/usr.bin/m4/eval.c Mon Dec 19 05:50:34 2011(r228700) +++ head/usr.bin/m4/eval.c Mon Dec 19 08:50:17 2011(r228701) @@ -268,13 +268,14 @@ expand_builtin(const char *argv[], int a break; case INCLTYPE: if (argc 2) - if (!doincl(argv[2])) + if (!doincl(argv[2])) { if (mimic_gnu) warn(%s at line %lu: include(%s), CURRENT_NAME, CURRENT_LINE, argv[2]); else err(1, %s at line %lu: include(%s), CURRENT_NAME, CURRENT_LINE, argv[2]); + } break; case SINCTYPE: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228698 - head/usr.bin/m4
On 19. Dec 2011, at 08:46 , Doug Barton wrote: On 12/18/2011 15:54, Dimitry Andric wrote: Author: dim Date: Sun Dec 18 23:54:32 2011 New Revision: 228698 URL: http://svn.freebsd.org/changeset/base/228698 Log: Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. Pointy hat to: bapt Still seems broken to me: # make cleandir make obj make depend make all /usr/obj/frontier/svn/head/usr.bin/m4 created for /frontier/svn/head/usr.bin/m4 yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l tokenizer.c rm -f .depend mkdep -f .depend -a-DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 /frontier/svn/head/usr.bin/m4/eval.c /frontier/svn/head/usr.bin/m4/expr.c /frontier/svn/head/usr.bin/m4/look.c /frontier/svn/head/usr.bin/m4/main.c /frontier/svn/head/usr.bin/m4/misc.c /frontier/svn/head/usr.bin/m4/gnum4.c /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c /frontier/svn/head/usr.bin/m4/lib/ohash_do.c /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c /frontier/svn/head/usr.bin/m4/lib/ohash_init.c /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c echo m4: /usr/lib/libc.a .depend cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c cc1: warnings being treated as errors /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit braces to avoid ambiguous 'else' *** Error code 1 Stop in /frontier/svn/head/usr.bin/m4. Reverting to r228696 lets it build again. Or running svn up now. -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228698 - head/usr.bin/m4
On Mon, Dec 19, 2011 at 08:50:54AM +, Bjoern A. Zeeb wrote: On 19. Dec 2011, at 08:46 , Doug Barton wrote: On 12/18/2011 15:54, Dimitry Andric wrote: Author: dim Date: Sun Dec 18 23:54:32 2011 New Revision: 228698 URL: http://svn.freebsd.org/changeset/base/228698 Log: Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. Pointy hat to:bapt Still seems broken to me: # make cleandir make obj make depend make all /usr/obj/frontier/svn/head/usr.bin/m4 created for /frontier/svn/head/usr.bin/m4 yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l tokenizer.c rm -f .depend mkdep -f .depend -a-DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 /frontier/svn/head/usr.bin/m4/eval.c /frontier/svn/head/usr.bin/m4/expr.c /frontier/svn/head/usr.bin/m4/look.c /frontier/svn/head/usr.bin/m4/main.c /frontier/svn/head/usr.bin/m4/misc.c /frontier/svn/head/usr.bin/m4/gnum4.c /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c /frontier/svn/head/usr.bin/m4/lib/ohash_do.c /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c /frontier/svn/head/usr.bin/m4/lib/ohash_init.c /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c echo m4: /usr/lib/libc.a .depend cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c cc1: warnings being treated as errors /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit braces to avoid ambiguous 'else' *** Error code 1 Stop in /frontier/svn/head/usr.bin/m4. Reverting to r228696 lets it build again. Or running svn up now. Sorry about that. regards, Bapt pgpxVoO89XQ4h.pgp Description: PGP signature
Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant
On Mon, Mar 02, 2009 at 02:28:22AM +, Sam Leffler wrote: Author: sam Date: Mon Mar 2 02:28:22 2009 New Revision: 189263 URL: http://svn.freebsd.org/changeset/base/189263 Log: update to 0.6.8 Reviewed by:thompsa Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd/driver_freebsd.c head/usr.sbin/wpa/hostapd_cli/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c head/usr.sbin/wpa/wpa_supplicant/driver_wired.c Modified: head/usr.sbin/wpa/hostapd/Makefile == --- head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:26:53 2009 (r189262) +++ head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:28:22 2009 (r189263) .if !empty(CFLAGS:M*-DEAP_SERVER) -SRCS+= eap.c eap_methods.c eap_identity.c +#SRCS+= eap.c eap_methods.c eap_identity.c EAP_SERVER functionality removed. Why? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228703 - head
Author: glebius Date: Mon Dec 19 12:50:12 2011 New Revision: 228703 URL: http://svn.freebsd.org/changeset/base/228703 Log: Remove if_carp.ko. /boot/kernel should be upgraded atomically. Requested by: netchild, bz Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Dec 19 12:11:07 2011(r228702) +++ head/ObsoleteFiles.inc Mon Dec 19 12:50:12 2011(r228703) @@ -38,8 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20111216: carp(4) module renamed -OLD_FILES+=boot/kernel/if_carp.ko # 20111214: eventtimers(7) moved to eventtimers(4) OLD_FILES+=usr/share/man/man7/eventtimers.7.gz # 2025: amd(4) removed ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228707 - head/usr.sbin/sendmail
Author: dim Date: Mon Dec 19 13:35:44 2011 New Revision: 228707 URL: http://svn.freebsd.org/changeset/base/228707 Log: Unfortunately, clang gives warnings about sendmail code that cannot be turned off yet. Since this is contrib code, and we don't really care about the warnings, just turn make them non-fatal for now. MFC after:1 week Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile == --- head/usr.sbin/sendmail/Makefile Mon Dec 19 13:14:57 2011 (r228706) +++ head/usr.sbin/sendmail/Makefile Mon Dec 19 13:35:44 2011 (r228707) @@ -45,6 +45,13 @@ CFLAGS+= -DNETINET6 WARNS?=1 +.if ${CC:T:Mclang} == clang +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228708 - head/usr.bin/vacation
Author: dim Date: Mon Dec 19 13:38:28 2011 New Revision: 228708 URL: http://svn.freebsd.org/changeset/base/228708 Log: In usr.bin/vacation/Makefile, fix a typo in the comment about clang warnings. Spotted by: arundel MFC after:1 week Modified: head/usr.bin/vacation/Makefile Modified: head/usr.bin/vacation/Makefile == --- head/usr.bin/vacation/Makefile Mon Dec 19 13:35:44 2011 (r228707) +++ head/usr.bin/vacation/Makefile Mon Dec 19 13:38:28 2011 (r228708) @@ -14,7 +14,7 @@ WARNS?= 2 .if ${CC:T:Mclang} == clang # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just turn make them non-fatal for now. +# care about the warnings, just make them non-fatal for now. NO_WERROR= .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228709 - head/sys/dev/usb/controller
Author: hselasky Date: Mon Dec 19 14:53:42 2011 New Revision: 228709 URL: http://svn.freebsd.org/changeset/base/228709 Log: Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. Suggested by: avg @ MFC after:3 days Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c == --- head/sys/dev/usb/controller/usb_controller.cMon Dec 19 13:38:28 2011(r228708) +++ head/sys/dev/usb/controller/usb_controller.cMon Dec 19 14:53:42 2011(r228709) @@ -390,6 +390,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) if (udev == NULL || bus-bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus-bdev); usbd_enum_lock(udev); @@ -410,6 +412,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) (bus-methods-set_hw_power_sleep) (bus, USB_HW_POWER_SUSPEND); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /** @@ -430,6 +434,8 @@ usb_bus_resume(struct usb_proc_msg *pm) if (udev == NULL || bus-bdev == NULL) return; + USB_BUS_UNLOCK(bus); + usbd_enum_lock(udev); #if 0 DEVMETHOD(usb_take_controller, NULL); /* dummy */ @@ -457,6 +463,8 @@ usb_bus_resume(struct usb_proc_msg *pm) device_printf(bus-bdev, Could not configure root HUB\n); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /** @@ -477,6 +485,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm if (udev == NULL || bus-bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus-bdev); usbd_enum_lock(udev); @@ -497,6 +507,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm (bus-methods-set_hw_power_sleep) (bus, USB_HW_POWER_SHUTDOWN); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228710 - head/sys/cddl/compat/opensolaris/kern
Author: avg Date: Mon Dec 19 14:55:14 2011 New Revision: 228710 URL: http://svn.freebsd.org/changeset/base/228710 Log: opensolaris compat: fix vcmn_err so that panic(9) produces a proper message ... instead of just a verbatim format string. Reviewed by: pjd MFC after:1 week Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c == --- head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Dec 19 14:53:42 2011(r228709) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Dec 19 14:55:14 2011(r228710) @@ -28,29 +28,35 @@ void vcmn_err(int ce, const char *fmt, va_list adx) { char buf[256]; + const char *prefix; + prefix = NULL; /* silence unwitty compilers */ switch (ce) { case CE_CONT: - snprintf(buf, sizeof(buf), Solaris(cont): %s\n, fmt); + prefix = Solaris(cont): ; break; case CE_NOTE: - snprintf(buf, sizeof(buf), Solaris: NOTICE: %s\n, fmt); + prefix = Solaris: NOTICE: ; break; case CE_WARN: - snprintf(buf, sizeof(buf), Solaris: WARNING: %s\n, fmt); + prefix = Solaris: WARNING: ; break; case CE_PANIC: - snprintf(buf, sizeof(buf), Solaris(panic): %s\n, fmt); + prefix = Solaris(panic): ; break; case CE_IGNORE: break; default: panic(Solaris: unknown severity level); } - if (ce == CE_PANIC) - panic(%s, buf); - if (ce != CE_IGNORE) - vprintf(buf, adx); + if (ce == CE_PANIC) { + vsnprintf(buf, sizeof(buf), fmt, adx); + panic(%s%s, prefix, buf); + } + if (ce != CE_IGNORE) { + printf(%s, prefix); + vprintf(fmt, adx); + } } void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228712 - in head/sbin: hastctl hastd
Author: dim Date: Mon Dec 19 15:46:15 2011 New Revision: 228712 URL: http://svn.freebsd.org/changeset/base/228712 Log: Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and there they can be safely ignored. MFC after:1 week Modified: head/sbin/hastctl/Makefile head/sbin/hastd/Makefile Modified: head/sbin/hastctl/Makefile == --- head/sbin/hastctl/Makefile Mon Dec 19 15:35:05 2011(r228711) +++ head/sbin/hastctl/Makefile Mon Dec 19 15:46:15 2011(r228712) @@ -20,6 +20,7 @@ SRCS+=y.tab.h MAN= hastctl.8 NO_WFORMAT= +NO_WCAST_ALIGN= CFLAGS+=-I${.CURDIR}/../hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET Modified: head/sbin/hastd/Makefile == --- head/sbin/hastd/MakefileMon Dec 19 15:35:05 2011(r228711) +++ head/sbin/hastd/MakefileMon Dec 19 15:46:15 2011(r228712) @@ -20,6 +20,7 @@ SRCS+=y.tab.h MAN= hastd.8 hast.conf.5 NO_WFORMAT= +NO_WCAST_ALIGN= CFLAGS+=-I${.CURDIR} CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228713 - head/contrib/tcpdump
Author: dim Date: Mon Dec 19 17:32:54 2011 New Revision: 228713 URL: http://svn.freebsd.org/changeset/base/228713 Log: In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison against icmp6_hdr::icmp6_type is done incorrectly. (This fix has already been applied upstream, but we do not have the latest version of tcpdump.) MFC after:1 week Modified: head/contrib/tcpdump/print-icmp6.c Modified: head/contrib/tcpdump/print-icmp6.c == --- head/contrib/tcpdump/print-icmp6.c Mon Dec 19 15:46:15 2011 (r228712) +++ head/contrib/tcpdump/print-icmp6.c Mon Dec 19 17:32:54 2011 (r228713) @@ -350,14 +350,13 @@ icmp6_print(netdissect_options *ndo, printf(ICMP6, %s, tok2str(icmp6_type_values,unknown icmp6 type (%u),dp-icmp6_type)); /* display cosmetics: print the packet length for printer that use the vflag now */ -if (vflag (dp-icmp6_type == - ND_ROUTER_SOLICIT || - ND_ROUTER_ADVERT || - ND_NEIGHBOR_ADVERT || - ND_NEIGHBOR_SOLICIT || - ND_REDIRECT || - ICMP6_HADISCOV_REPLY || - ICMP6_MOBILEPREFIX_ADVERT )) +if (vflag (dp-icmp6_type == ND_ROUTER_SOLICIT || + dp-icmp6_type == ND_ROUTER_ADVERT || + dp-icmp6_type == ND_NEIGHBOR_ADVERT || + dp-icmp6_type == ND_NEIGHBOR_SOLICIT || + dp-icmp6_type == ND_REDIRECT || + dp-icmp6_type == ICMP6_HADISCOV_REPLY || + dp-icmp6_type == ICMP6_MOBILEPREFIX_ADVERT )) printf(, length %u, length); switch (dp-icmp6_type) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228711 - head/sys/dev/usb/controller
on 19/12/2011 17:35 Hans Petter Selasky said the following: Author: hselasky Date: Mon Dec 19 15:35:05 2011 New Revision: 228711 URL: http://svn.freebsd.org/changeset/base/228711 Log: Add code to wait for USB shutdown to be executed at system shutdown. Add sysctl which can be used to skip this waiting. MFC after: 3 days Thank you! One comment below. Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c == --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:55:14 2011(r228710) +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 15:35:05 2011(r228711) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT(hw.usb.no_boot_wait, usb_no_boot_wait); SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, usb_no_boot_wait, 0, -No device enumerate waiting at boot.); +No USB device enumerate waiting at boot.); + +static int usb_no_shutdown_wait = 0; +TUNABLE_INT(hw.usb.no_shutdown_wait, usb_no_shutdown_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, usb_no_shutdown_wait, 0, Does this knob (as well as the one before it) have to be CTLFLAG_RDTUN? I think that it should pretty safe to make it CTLFLAG_RW | CTLFLAG_TUN. +No USB device waiting at system shutdown.); static devclass_t usb_devclass; @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) return (0); } + device_printf(bus-bdev, Controller shutdown\n); + USB_BUS_LOCK(bus); usb_proc_msignal(bus-explore_proc, bus-shutdown_msg[0], bus-shutdown_msg[1]); + if (usb_no_shutdown_wait == 0) { + /* wait for shutdown callback to be executed */ + usb_proc_mwait(bus-explore_proc, + bus-shutdown_msg[0], bus-shutdown_msg[1]); + } USB_BUS_UNLOCK(bus); + device_printf(bus-bdev, Controller shutdown complete\n); + return (0); } -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant
On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov s...@zxy.spb.ru wrote: On Mon, Mar 02, 2009 at 02:28:22AM +, Sam Leffler wrote: Author: sam Date: Mon Mar 2 02:28:22 2009 New Revision: 189263 URL: http://svn.freebsd.org/changeset/base/189263 Log: update to 0.6.8 Reviewed by: thompsa Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd/driver_freebsd.c head/usr.sbin/wpa/hostapd_cli/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c head/usr.sbin/wpa/wpa_supplicant/driver_wired.c Modified: head/usr.sbin/wpa/hostapd/Makefile == --- head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:26:53 2009 (r189262) +++ head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:28:22 2009 (r189263) .if !empty(CFLAGS:M*-DEAP_SERVER) -SRCS+= eap.c eap_methods.c eap_identity.c +#SRCS+= eap.c eap_methods.c eap_identity.c EAP_SERVER functionality removed. Why? EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which seems like a bad idea because it should really be a bsd.own.mk knob). Thanks, -Garrett ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228714 - in head/usr.sbin/timed: timed timedc
Author: dim Date: Mon Dec 19 18:08:31 2011 New Revision: 228714 URL: http://svn.freebsd.org/changeset/base/228714 Log: In usr.sbin/timed, fix several issues with printf formats: - Cast time_t's to long, and print them with %ld. - Print ptrdiff_t's with %td. - Print ssize_t's and size_t's with %zd and %zu. - Print int32_t's with %d. Also, replace some int variables with the more appropriate size_t. MFC after:1 week Modified: head/usr.sbin/timed/timed/correct.c head/usr.sbin/timed/timed/networkdelta.c head/usr.sbin/timed/timed/readmsg.c head/usr.sbin/timed/timedc/cmds.c Modified: head/usr.sbin/timed/timed/correct.c == --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 18:08:31 2011 (r228714) @@ -163,7 +163,7 @@ adjclock(corr) } else { syslog(LOG_WARNING, clock correction %ld sec too large to adjust, - adj.tv_sec); + (long)adj.tv_sec); (void) gettimeofday(now, 0); timevaladd(now, corr); if (settimeofday(now, 0) 0) Modified: head/usr.sbin/timed/timed/networkdelta.c == --- head/usr.sbin/timed/timed/networkdelta.cMon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/networkdelta.cMon Dec 19 18:08:31 2011 (r228714) @@ -137,7 +137,7 @@ networkdelta() } if (trace) - fprintf(fd, median of %d values starting at %ld is , + fprintf(fd, median of %td values starting at %ld is , xp-x[0], med); return median(med, eps, x[0], xp, 1); } Modified: head/usr.sbin/timed/timed/readmsg.c == --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 18:08:31 2011 (r228714) @@ -182,7 +182,7 @@ again: if (trace) { fprintf(fd, readmsg: wait %ld.%6ld at %s\n, - rwait.tv_sec, rwait.tv_usec, date()); + (long)rwait.tv_sec, rwait.tv_usec, date()); /* Notice a full disk, as we flush trace info. * It is better to flush periodically than at * every line because the tracing consists of bursts @@ -214,7 +214,7 @@ again: */ if (n (ssize_t)(sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { syslog(LOG_NOTICE, - short packet (%u/%u bytes) from %s, + short packet (%zd/%zu bytes) from %s, n, sizeof(struct tsp) - MAXHOSTNAMELEN + 32, inet_ntoa(from.sin_addr)); continue; @@ -486,7 +486,7 @@ print(msg, addr) break; case TSP_ADJTIME: - fprintf(fd, %s %d %-6u (%ld,%ld) %-15s %s\n, + fprintf(fd, %s %d %-6u (%d,%d) %-15s %s\n, tsptype[msg-tsp_type], msg-tsp_vers, msg-tsp_seq, Modified: head/usr.sbin/timed/timedc/cmds.c == --- head/usr.sbin/timed/timedc/cmds.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timedc/cmds.c Mon Dec 19 18:08:31 2011 (r228714) @@ -267,7 +267,7 @@ msite(argc, argv) int argc; char *argv[]; { - int cc; + ssize_t cc; fd_set ready; struct sockaddr_in dest; int i, length; @@ -333,7 +333,7 @@ msite(argc, argv) */ if (cc (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { fprintf(stderr, - short packet (%u/%u bytes) from %s\n, + short packet (%zd/%zu bytes) from %s\n, cc, sizeof(struct tsp) - MAXHOSTNAMELEN + 32, inet_ntoa(from.sin_addr)); continue; @@ -428,7 +428,7 @@ tracing(argc, argv) { int onflag; int length; - int cc; + ssize_t cc; fd_set ready; struct sockaddr_in dest; struct sockaddr_in from; @@ -489,7 +489,7 @@ tracing(argc, argv) * least long enough to hold a 4.3BSD packet. */ if (cc (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { - fprintf(stderr, short packet (%u/%u bytes) from %s\n, + fprintf(stderr, short packet (%zd/%zu
svn commit: r228715 - in head: share/man/man9 sys/sys
Author: jhb Date: Mon Dec 19 18:55:13 2011 New Revision: 228715 URL: http://svn.freebsd.org/changeset/base/228715 Log: Add a TASK_INITIALIZER() macro that can be used to statically initialize a task structure. Reviewed by: gj MFC after:2 weeks Modified: head/share/man/man9/Makefile head/share/man/man9/taskqueue.9 head/sys/sys/taskqueue.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileMon Dec 19 18:08:31 2011 (r228714) +++ head/share/man/man9/MakefileMon Dec 19 18:55:13 2011 (r228715) @@ -1250,6 +1250,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_ent sysctl_ctx_init.9 sysctl_ctx_free.9 MLINKS+=SYSINIT.9 SYSUNINIT.9 MLINKS+=taskqueue.9 TASK_INIT.9 \ + taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_cancel.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ Modified: head/share/man/man9/taskqueue.9 == --- head/share/man/man9/taskqueue.9 Mon Dec 19 18:08:31 2011 (r228714) +++ head/share/man/man9/taskqueue.9 Mon Dec 19 18:55:13 2011 (r228715) @@ -80,6 +80,7 @@ struct timeout_task; .Ft void .Fn taskqueue_run struct taskqueue *queue .Fn TASK_INIT struct task *task int priority task_fn_t func void *context +.Fn TASK_INITIALIZER int priority task_fn_t func void *context .Fn TASKQUEUE_DECLARE name .Fn TASKQUEUE_DEFINE name taskqueue_enqueue_fn enqueue void *context init .Fn TASKQUEUE_FAST_DEFINE name taskqueue_enqueue_fn enqueue void *context init @@ -243,9 +244,14 @@ A convenience macro, is provided to initialise a .Va task structure. +The +.Fn TASK_INITIALIZER +macro generates an initializer for a task structure. A macro .Fn TIMEOUT_TASK_INIT queue timeout_task priority func context -initializes the timeout_task structure. +initializes the +.Va timeout_task +structure. The values of .Va priority , .Va func , Modified: head/sys/sys/taskqueue.h == --- head/sys/sys/taskqueue.hMon Dec 19 18:08:31 2011(r228714) +++ head/sys/sys/taskqueue.hMon Dec 19 18:55:13 2011(r228715) @@ -77,6 +77,12 @@ void taskqueue_block(struct taskqueue *q void taskqueue_unblock(struct taskqueue *queue); inttaskqueue_member(struct taskqueue *queue, struct thread *td); +#define TASK_INITIALIZER(priority, func, context) \ + { .ta_pending = 0, \ + .ta_priority = (priority),\ + .ta_func = (func),\ + .ta_context = (context) } + /* * Functions for dedicated thread taskqueues */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228716 - head/sys/dev/fxp
Author: yongari Date: Mon Dec 19 19:00:34 2011 New Revision: 228716 URL: http://svn.freebsd.org/changeset/base/228716 Log: TCP header size is represented by number of 32bits words. Fix the TCP header size calculation such that makes TSO engine cache all header(ethernet/IP/TCP) bytes to its internal buffer. While here, remove extra pull up for TCP payload. Unlike some em(4) controllers, fxp(4) does not require such work around for TSO. The two limitations are ethernet/IP/TCP header size should be less than or equal to the size of controller's internal buffer(80 bytes) and these header information should be found in the first fragment of a TSO frame. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Mon Dec 19 18:55:13 2011(r228715) +++ head/sys/dev/fxp/if_fxp.c Mon Dec 19 19:00:34 2011(r228716) @@ -1454,7 +1454,7 @@ fxp_encap(struct fxp_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); - m = m_pullup(m, poff + sizeof(struct tcphdr) + tcp-th_off); + m = m_pullup(m, poff + (tcp-th_off 2)); if (m == NULL) { *m_head = NULL; return (ENOBUFS); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228717 - head/sys/dev/msk
Author: yongari Date: Mon Dec 19 19:02:36 2011 New Revision: 228717 URL: http://svn.freebsd.org/changeset/base/228717 Log: Increase wait time for OP_TCPSTART command processing. It seems 100us is not enough to ensure prefetch unit work. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c == --- head/sys/dev/msk/if_msk.c Mon Dec 19 19:00:34 2011(r228716) +++ head/sys/dev/msk/if_msk.c Mon Dec 19 19:02:36 2011(r228717) @@ -648,8 +648,8 @@ msk_rx_fill(struct msk_if_softc *sc_if, if ((sc_if-msk_flags MSK_FLAG_DESCV2) == 0 (sc_if-msk_ifp-if_capenable IFCAP_RXCSUM) != 0) { /* Wait until controller executes OP_TCPSTART command. */ - for (i = 10; i 0; i--) { - DELAY(10); + for (i = 100; i 0; i--) { + DELAY(100); idx = CSR_READ_2(sc_if-msk_softc, Y2_PREF_Q_ADDR(sc_if-msk_rxq, PREF_UNIT_GET_IDX_REG)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r221173 - in head/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 kern mips/mips powerpc/powerpc x86/x86
on 28/04/2011 19:02 Attilio Rao said the following: Author: attilio Date: Thu Apr 28 16:02:05 2011 New Revision: 221173 URL: http://svn.freebsd.org/changeset/base/221173 Log: Add the watchdogs patting during the (shutdown time) disk syncing and disk dumping. With the option SW_WATCHDOG on, these operations are doomed to let watchdog fire, fi they take too long. I implemented the stubs this way because I really want wdog_kern_* KPI to not be dependant by SW_WATCHDOG being on (and really, the option only enables watchdog activation in hardclock) and also avoid to call them when not necessary (avoiding not-volountary watchdog activations). Sponsored by: Sandvine Incorporated Discussed with: emaste, des MFC after: 2 weeks Attilio, I wonder what was the reason to put all this patting under SW_WATCHDOG. I think that the code that you added can also be useful without SW_WATCHDOG with hardware watchdog drivers. SW_WATCHDOG is good for debugging, but is not as reliable as hardware watchdogs. Thank you. Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/minidump_machdep.c head/sys/i386/i386/minidump_machdep.c head/sys/ia64/ia64/dump_machdep.c head/sys/kern/kern_shutdown.c head/sys/kern/vfs_subr.c head/sys/mips/mips/dump_machdep.c head/sys/powerpc/powerpc/dump_machdep.c head/sys/x86/x86/dump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c == --- head/sys/amd64/amd64/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) +++ head/sys/amd64/amd64/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) @@ -27,6 +27,8 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); +#include opt_watchdog.h + #include sys/param.h #include sys/systm.h #include sys/conf.h @@ -34,6 +36,9 @@ __FBSDID($FreeBSD$); #include sys/kernel.h #include sys/kerneldump.h #include sys/msgbuf.h +#ifdef SW_WATCHDOG +#include sys/watchdog.h +#endif #include vm/vm.h #include vm/pmap.h #include machine/atomic.h @@ -167,6 +172,9 @@ blk_write(struct dumperinfo *di, char *p report_progress(progress, dumpsize); counter = (124) - 1; } +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif if (ptr) { error = dump_write(di, ptr, 0, dumplo, len); if (error) Modified: head/sys/arm/arm/dump_machdep.c == --- head/sys/arm/arm/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) +++ head/sys/arm/arm/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) @@ -27,6 +27,8 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); +#include opt_watchdog.h + #include sys/param.h #include sys/systm.h #include sys/conf.h @@ -35,6 +37,9 @@ __FBSDID($FreeBSD$); #include sys/kernel.h #include sys/proc.h #include sys/kerneldump.h +#ifdef SW_WATCHDOG +#include sys/watchdog.h +#endif #include vm/vm.h #include vm/pmap.h #include machine/elf.h @@ -189,6 +194,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr cpu_tlb_flushID_SE(0); cpu_cpwait(); } +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif error = dump_write(di, (void *)(pa - (pa L1_ADDR_BITS)),0, dumplo, sz); if (error) Modified: head/sys/arm/arm/minidump_machdep.c == --- head/sys/arm/arm/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) +++ head/sys/arm/arm/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) @@ -29,6 +29,8 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); +#include opt_watchdog.h + #include sys/param.h #include sys/systm.h #include sys/conf.h @@ -36,6 +38,9 @@ __FBSDID($FreeBSD$); #include sys/kernel.h #include sys/kerneldump.h #include sys/msgbuf.h +#ifdef SW_WATCHDOG +#include sys/watchdog.h +#endif #include vm/vm.h #include vm/pmap.h #include machine/pmap.h @@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p counter = (122) - 1; } +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif if (ptr) { error = dump_write(di, ptr, 0, dumplo, len); if (error) Modified: head/sys/i386/i386/minidump_machdep.c == --- head/sys/i386/i386/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) +++ head/sys/i386/i386/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) @@ -27,6 +27,8 @@
Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant
On Dec 19, 2011, at 11:14 AM, Slawa Olhovchenkov wrote: On Mon, Dec 19, 2011 at 09:57:45AM -0800, Garrett Cooper wrote: On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov s...@zxy.spb.ru wrote: On Mon, Mar 02, 2009 at 02:28:22AM +, Sam Leffler wrote: Author: sam Date: Mon Mar 2 02:28:22 2009 New Revision: 189263 URL: http://svn.freebsd.org/changeset/base/189263 Log: update to 0.6.8 Reviewed by:thompsa Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd/driver_freebsd.c head/usr.sbin/wpa/hostapd_cli/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c head/usr.sbin/wpa/wpa_supplicant/driver_wired.c Modified: head/usr.sbin/wpa/hostapd/Makefile == --- head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:26:53 2009 (r189262) +++ head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:28:22 2009 (r189263) .if !empty(CFLAGS:M*-DEAP_SERVER) -SRCS+= eap.c eap_methods.c eap_identity.c +#SRCS+= eap.c eap_methods.c eap_identity.c EAP_SERVER functionality removed. Why? EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which seems like a bad idea because it should really be a bsd.own.mk knob). Sorry, I don't understand. Some time ago I have in src.conf HOSTAPD_CFLAGS=-DEAP_TLS -DEAP_SERVER and got hostapd witch support EAP metods. Now this is don't work: === hostapd (all) make: don't know how to make eap_tls.c. Stop How I can build hostapd witch support EAP metods? Missed the commenting out part of the commit. Yeah, that might not work. Thanks, -Garrett___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228143 - in head: . share/mk tools/build/options
[[ I know it is a bit late here ]] On Nov 29, 2011, at 1:50 PM, Doug Barton wrote: On 11/29/2011 12:47, Gábor Kövesdán wrote: On 2011.11.29. 20:46, Max Khon wrote: Log: Turn off profiled libs build by default. Can be enabled back using WITH_PROFILE=yes in /etc/src.conf I think it was useful. Profiling is useful for developing any piece of software that builds on libc or other common libs, even for software that is not directly related to FreeBSD. I think it should be reverted. Since we ask users to read -current, it would be useful if our developers did too. :) But that's not the place to discuss this... It should have gone through arch@ not current@ As Max pointed out in his message about this, the profiled libs are only really useful to a tiny percentage of developers. If you need them, twist the knob. Building them should be off by default. I can't profile my programs effectively without them. Am I now forced to build profile libs with a full FreeBSD to get them? Seems like a big step backwards. Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228143 - in head: . share/mk tools/build/options
On Nov 29, 2011, at 1:53 PM, Garrett Cooper wrote: 2011/11/29 Doug Barton do...@freebsd.org: On 11/29/2011 12:47, Gábor Kövesdán wrote: On 2011.11.29. 20:46, Max Khon wrote: Log: Turn off profiled libs build by default. Can be enabled back using WITH_PROFILE=yes in /etc/src.conf I think it was useful. Profiling is useful for developing any piece of software that builds on libc or other common libs, even for software that is not directly related to FreeBSD. I think it should be reverted. Since we ask users to read -current, it would be useful if our developers did too. :) As Max pointed out in his message about this, the profiled libs are only really useful to a tiny percentage of developers. If you need them, twist the knob. Building them should be off by default. +1. The needs of the many outweigh the needs of the few. As suggested elsewhere, I think it would also be a good idea to enable it in tinderbox builds. -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. Enabling it only on tinderbox builds will ensure more accidental breakage. Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228718 - head/sys/kern
Author: avg Date: Mon Dec 19 20:01:21 2011 New Revision: 228718 URL: http://svn.freebsd.org/changeset/base/228718 Log: ule: ensure that batch timeshare threads are scheduled fairly With the previous code, if the range of priorities for timeshare batch threads was greater than RQ_NQS, then the threads with low priorities in the part of the range above RQ_NQS would be scheduled to the run-queues as if they had high priorities at the beginning of the range. In other words, threads with a nice level of +N could be scheduled as if they had a nice level of -M. Reported by: George Mitchell geo...@m5p.com Reviewed by: jhb Tested by:George Mitchell geo...@m5p.com (earlier version) MFC after:1 week Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Mon Dec 19 19:02:36 2011(r228717) +++ head/sys/kern/sched_ule.c Mon Dec 19 20:01:21 2011(r228718) @@ -125,6 +125,7 @@ static struct td_sched td_sched0; */ #definePRI_TIMESHARE_RANGE (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE + 1) #definePRI_INTERACT_RANGE ((PRI_TIMESHARE_RANGE - SCHED_PRI_NRESV) / 2) +#definePRI_BATCH_RANGE (PRI_TIMESHARE_RANGE - PRI_INTERACT_RANGE) #definePRI_MIN_INTERACTPRI_MIN_TIMESHARE #definePRI_MAX_INTERACT(PRI_MIN_TIMESHARE + PRI_INTERACT_RANGE - 1) @@ -416,7 +417,6 @@ sched_shouldpreempt(int pri, int cpri, i return (0); } -#defineTS_RQ_PPQ (((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS) /* * Add a thread to the actual run-queue. Keeps transferable counts up to * date with what is actually on the run-queue. Selects the correct @@ -449,7 +449,7 @@ tdq_runq_add(struct tdq *tdq, struct thr * realtime. Use the whole queue to represent these values. */ if ((flags (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) { - pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ; + pri = RQ_NQS * (pri - PRI_MIN_BATCH) / PRI_BATCH_RANGE; pri = (pri + tdq-tdq_idx) % RQ_NQS; /* * This effectively shortens the queue by one so we ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228143 - in head: . share/mk tools/build/options
On 19 Dec 2011, at 19:52, Warner Losh wrote: -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. How useful is gprof-based profiling these days? Now that we have the DTrace pid provider, don't we have access to much more fine-grained profiling information without the need for shipping two versions of every library? David___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228719 - head/usr.sbin/timed/timed
Author: dim Date: Mon Dec 19 20:29:50 2011 New Revision: 228719 URL: http://svn.freebsd.org/changeset/base/228719 Log: Some people pointed out long is 32-bit on some arches, while time_t is 64-bit, so better cast time_t to intmax_t, and use the appropriate printf format strings. MFC after:1 week Modified: head/usr.sbin/timed/timed/correct.c head/usr.sbin/timed/timed/readmsg.c Modified: head/usr.sbin/timed/timed/correct.c == --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:29:50 2011 (r228719) @@ -162,8 +162,8 @@ adjclock(corr) } } else { syslog(LOG_WARNING, - clock correction %ld sec too large to adjust, - (long)adj.tv_sec); + clock correction %jd sec too large to adjust, + (intmax_t)adj.tv_sec); (void) gettimeofday(now, 0); timevaladd(now, corr); if (settimeofday(now, 0) 0) Modified: head/usr.sbin/timed/timed/readmsg.c == --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:29:50 2011 (r228719) @@ -181,8 +181,8 @@ again: rwait.tv_usec = 100/CLK_TCK; if (trace) { - fprintf(fd, readmsg: wait %ld.%6ld at %s\n, - (long)rwait.tv_sec, rwait.tv_usec, date()); + fprintf(fd, readmsg: wait %jd.%6ld at %s\n, + (intmax_t)rwait.tv_sec, rwait.tv_usec, date()); /* Notice a full disk, as we flush trace info. * It is better to flush periodically than at * every line because the tracing consists of bursts ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228720 - head/usr.sbin/timed/timed
Author: dim Date: Mon Dec 19 20:33:53 2011 New Revision: 228720 URL: http://svn.freebsd.org/changeset/base/228720 Log: Fix r228719; when you use intmax_t, you need stdint.h. Pointy hat to:dim MFC after:1 week Modified: head/usr.sbin/timed/timed/globals.h Modified: head/usr.sbin/timed/timed/globals.h == --- head/usr.sbin/timed/timed/globals.h Mon Dec 19 20:29:50 2011 (r228719) +++ head/usr.sbin/timed/timed/globals.h Mon Dec 19 20:33:53 2011 (r228720) @@ -41,6 +41,7 @@ #include errno.h #include limits.h #include netdb.h +#include stdint.h #include stdio.h #include stdlib.h #include string.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228721 - head/usr.sbin/uhsoctl
Author: dim Date: Mon Dec 19 20:38:26 2011 New Revision: 228721 URL: http://svn.freebsd.org/changeset/base/228721 Log: In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings not being literals. MFC after:1 week Modified: head/usr.sbin/uhsoctl/uhsoctl.c Modified: head/usr.sbin/uhsoctl/uhsoctl.c == --- head/usr.sbin/uhsoctl/uhsoctl.c Mon Dec 19 20:33:53 2011 (r228720) +++ head/usr.sbin/uhsoctl/uhsoctl.c Mon Dec 19 20:38:26 2011 (r228721) @@ -340,7 +340,7 @@ logger(int pri, const char *fmt, ...) va_start(ap, fmt); vasprintf(buf, fmt, ap); if (syslog_open) - syslog(pri, buf); + syslog(pri, %s, buf); else { switch (pri) { case LOG_INFO: @@ -1174,7 +1174,7 @@ do_connect(struct ctx *ctx, const char * buf = ra.val[0].ptr; if (strstr(buf[0], +CME ERROR:) != NULL) { buf[0] += 12; - errx(1, buf[0]); + errx(1, %s, buf[0]); } freeresp(ra); } else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228143 - in head: . share/mk tools/build/options
On Mon, Dec 19, 2011 at 08:09:32PM +, David Chisnall wrote: On 19 Dec 2011, at 19:52, Warner Losh wrote: -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. How useful is gprof-based profiling these days? Now that we have the DTrace pid provider, don't we have access to much more fine-grained profiling information without the need for shipping two versions of every library? It is quite uesful given that for the last 20 or so years, I can do cc -o z -pg a.c -lm_p ./z gprof -b -l ./z z.gmon | more % cumulative self self total time seconds secondscalls ms/call ms/call name 72.1 0.91 0.910 100.00% _mcount [1] 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] 4.6 1.21 0.060 100.00% .mcount (9) to ge the information I want. dtrace(1M) does not seem to contain an example that gives the equivalent information. In fact, the manpage contains no examples, only the statement: See the Solaris Dynamic Tracing Guide for detailed examples of how to use the dtrace utility to perform these tasks. which, of course, is not very useful given that I do not have a Solaris Dynamic Tracing Guide. -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228722 - head/usr.sbin/yp_mkdb
Author: dim Date: Mon Dec 19 20:44:44 2011 New Revision: 228722 URL: http://svn.freebsd.org/changeset/base/228722 Log: In usr.sbin/yp_mkdb/yp_mkdb.c, cast some printf field width parameters to int, cast time_t to intmax_t, and use the corresponding printf length modifier. MFC after:1 week Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c == --- head/usr.sbin/yp_mkdb/yp_mkdb.c Mon Dec 19 20:38:26 2011 (r228721) +++ head/usr.sbin/yp_mkdb/yp_mkdb.c Mon Dec 19 20:44:44 2011 (r228722) @@ -36,6 +36,7 @@ __FBSDID($FreeBSD$); #include err.h #include fcntl.h #include limits.h +#include stdint.h #include stdio.h #include stdlib.h #include string.h @@ -87,7 +88,8 @@ unwind(char *map) key.data = NULL; while (yp_next_record(dbp, key, data, 1, 1) == YP_TRUE) - printf(%.*s %.*s\n, key.size,key.data,data.size,data.data); + printf(%.*s %.*s\n, (int)key.size, key.data, (int)data.size, + data.data); (void)(dbp-close)(dbp); return; @@ -218,7 +220,7 @@ main(int argc, char *argv[]) key.data = YP_LAST_MODIFIED; key.size = sizeof(YP_LAST_MODIFIED) - 1; - snprintf(buf, sizeof(buf), %lu, time(NULL)); + snprintf(buf, sizeof(buf), %jd, (intmax_t)time(NULL)); data.data = (char *)buf; data.size = strlen(buf); yp_put_record(dbp, key, data, 0); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant
On Mon, Dec 19, 2011 at 11:45:06PM +0400, Slawa Olhovchenkov wrote: Author: sam Date: Mon Mar 2 02:28:22 2009 New Revision: 189263 URL: http://svn.freebsd.org/changeset/base/189263 Log: update to 0.6.8 Reviewed by:thompsa Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd/driver_freebsd.c head/usr.sbin/wpa/hostapd_cli/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c head/usr.sbin/wpa/wpa_supplicant/driver_wired.c Modified: head/usr.sbin/wpa/hostapd/Makefile == --- head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:26:53 2009 (r189262) +++ head/usr.sbin/wpa/hostapd/MakefileMon Mar 2 02:28:22 2009 (r189263) .if !empty(CFLAGS:M*-DEAP_SERVER) -SRCS+= eap.c eap_methods.c eap_identity.c +#SRCS+= eap.c eap_methods.c eap_identity.c EAP_SERVER functionality removed. Why? EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which seems like a bad idea because it should really be a bsd.own.mk knob). Sorry, I don't understand. Some time ago I have in src.conf HOSTAPD_CFLAGS=-DEAP_TLS -DEAP_SERVER and got hostapd witch support EAP metods. Now this is don't work: === hostapd (all) make: don't know how to make eap_tls.c. Stop How I can build hostapd witch support EAP metods? Missed the commenting out part of the commit. Yeah, that might not work. Some time ago exist two eap_tls.c: /usr/src/contrib/wpa/src/eap_peer/eap_tls.c /usr/src/contrib/wpa/src/eap_server/eap_tls.c Now exist only /usr/src/contrib/wpa/src/eap_peer/eap_tls.c. But /usr/src/contrib/wpa/src/eap_peer/ don't included in SRC path search list and eap_tls.c from eap_peer have extra depends. This file (and some other files) renamed in commit r214734. And some other files added/splited. Can someone commit next diff: === --- hostapd/Makefile2011-12-20 00:45:13.0 +0400 +++ Makefile.new2011-12-20 00:28:29.0 +0400 @@ -62,13 +62,10 @@ CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= crypto_openssl.c -SRCS+= eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ - eap_psk.c eap_psk_common.c \ - eap_tls_common.c tls_openssl.c ms_funcs.c chap.c +SRCS+= eap_server_psk.c eap_psk_common.c \ + tls_openssl.c aes-encblock.c aes-omac1.c aes-eax.c aes-ctr.c CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c .if !empty(CFLAGS:M*-DEAP_GTC) SRCS+= eap_gtc.c ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228143 - in head: . share/mk tools/build/options
On Mon, Dec 19, 2011 at 12:41:29PM -0800, Steve Kargl wrote: On Mon, Dec 19, 2011 at 08:09:32PM +, David Chisnall wrote: On 19 Dec 2011, at 19:52, Warner Losh wrote: -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. How useful is gprof-based profiling these days? Now that we have the DTrace pid provider, don't we have access to much more fine-grained profiling information without the need for shipping two versions of every library? It is quite uesful given that for the last 20 or so years, I can do cc -o z -pg a.c -lm_p ./z gprof -b -l ./z z.gmon | more % cumulative self self total time seconds secondscalls ms/call ms/call name 72.1 0.91 0.910 100.00% _mcount [1] 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] 4.6 1.21 0.060 100.00% .mcount (9) to ge the information I want. I'd tend to agree that we should leave it on at least in HEAD. dtrace(1M) does not seem to contain an example that gives the equivalent information. In fact, the manpage contains no examples, only the statement: See the Solaris Dynamic Tracing Guide for detailed examples of how to use the dtrace utility to perform these tasks. which, of course, is not very useful given that I do not have a Solaris Dynamic Tracing Guide. http://docs.oracle.com/cd/E19253-01/817-6223/ is it and the first hit in google... -- Brooks pgp4rwgbPgBdL.pgp Description: PGP signature
svn commit: r228723 - head/sys/dev/usb/controller
Author: hselasky Date: Mon Dec 19 23:39:08 2011 New Revision: 228723 URL: http://svn.freebsd.org/changeset/base/228723 Log: Make the recently added no_shutdown_wait sysctl writeable. Suggested by: avg @ MFC after:3 days Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c == --- head/sys/dev/usb/controller/usb_controller.cMon Dec 19 20:44:44 2011(r228722) +++ head/sys/dev/usb/controller/usb_controller.cMon Dec 19 23:39:08 2011(r228723) @@ -91,7 +91,7 @@ SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wa static int usb_no_shutdown_wait = 0; TUNABLE_INT(hw.usb.no_shutdown_wait, usb_no_shutdown_wait); -SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, usb_no_shutdown_wait, 0, +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, usb_no_shutdown_wait, 0, No USB device waiting at system shutdown.); static devclass_t usb_devclass; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228711 - head/sys/dev/usb/controller
On Monday 19 December 2011 18:33:29 Andriy Gapon wrote: on 19/12/2011 17:35 Hans Petter Selasky said the following: Author: hselasky Date: Mon Dec 19 15:35:05 2011 New Revision: 228711 URL: http://svn.freebsd.org/changeset/base/228711 Log: Add code to wait for USB shutdown to be executed at system shutdown. Add sysctl which can be used to skip this waiting. MFC after:3 days Thank you! One comment below. Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c = = --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:55:14 2011 (r228710) +++ head/sys/dev/usb/controller/usb_controller.cMon Dec 19 15:35:05 2011(r228711) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT(hw.usb.no_boot_wait, usb_no_boot_wait); SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, usb_no_boot_wait, 0, -No device enumerate waiting at boot.); +No USB device enumerate waiting at boot.); + +static int usb_no_shutdown_wait = 0; +TUNABLE_INT(hw.usb.no_shutdown_wait, usb_no_shutdown_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, usb_no_shutdown_wait, 0, Does this knob (as well as the one before it) have to be CTLFLAG_RDTUN? I think that it should pretty safe to make it CTLFLAG_RW | CTLFLAG_TUN. No, it does not need to be read only. --HPS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228724 - in head/sys: amd64/conf i386/conf
Author: delphij Date: Tue Dec 20 00:16:52 2011 New Revision: 228724 URL: http://svn.freebsd.org/changeset/base/228724 Log: Add comments in NOTES to say what viawd is. Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Mon Dec 19 23:39:08 2011(r228723) +++ head/sys/amd64/conf/NOTES Tue Dec 20 00:16:52 2011(r228724) @@ -455,6 +455,7 @@ device tpm # # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer +# viawd: VIA south bridge watchdog timer # device ichwd device amdsbwd Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESMon Dec 19 23:39:08 2011(r228723) +++ head/sys/i386/conf/NOTESTue Dec 20 00:16:52 2011(r228724) @@ -828,6 +828,7 @@ hint.pcf.0.irq=5 # # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer +# viawd: VIA south bridge watchdog timer # device ichwd device amdsbwd ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228725 - in head/sys: dev/gpio mips/atheros
Author: adrian Date: Tue Dec 20 00:33:56 2011 New Revision: 228725 URL: http://svn.freebsd.org/changeset/base/228725 Log: Remove these locks - they aren't strictly needed and cause measurable performance issues. * Access to the GPIO bus is already locked by requesting and releasing the bus - thus the lock isn't really needed for each GPIO pin change. * Don't lock and unlock the GPIO bus for -each- i2c access - the i2c bus code is already doing this by calling the upper layer callback to request/release the bus. This thus locks the bus for the entirety of the transaction. TODO: * Further verify that everything is correctly requesting/ releasing the GPIO bus. * Look at how to lock the GPIO pin configuration stuff, potentially by locking/unlocking the bus at the gpiobus layer. Modified: head/sys/dev/gpio/gpioiic.c head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/dev/gpio/gpioiic.c == --- head/sys/dev/gpio/gpioiic.c Tue Dec 20 00:16:52 2011(r228724) +++ head/sys/dev/gpio/gpioiic.c Tue Dec 20 00:33:56 2011(r228725) @@ -55,7 +55,6 @@ struct gpioiic_softc { device_tsc_dev; device_tsc_busdev; - struct mtx sc_mtx; struct cdev *sc_leddev; int scl_pin; int sda_pin; @@ -148,7 +147,6 @@ gpioiic_setsda(device_t dev, int val) { struct gpioiic_softc*sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc-sc_busdev); if (val == 0) { GPIOBUS_PIN_SET(sc-sc_busdev, sc-sc_dev, sc-sda_pin, 0); GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-sda_pin, @@ -157,7 +155,6 @@ gpioiic_setsda(device_t dev, int val) GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-sda_pin, GPIO_PIN_INPUT); } - GPIOBUS_UNLOCK_BUS(sc-sc_busdev); } static void @@ -165,7 +162,6 @@ gpioiic_setscl(device_t dev, int val) { struct gpioiic_softc*sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc-sc_busdev); if (val == 0) { GPIOBUS_PIN_SET(sc-sc_busdev, sc-sc_dev, sc-scl_pin, 0); GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-scl_pin, @@ -174,7 +170,6 @@ gpioiic_setscl(device_t dev, int val) GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-scl_pin, GPIO_PIN_INPUT); } - GPIOBUS_UNLOCK_BUS(sc-sc_busdev); } static int @@ -183,11 +178,9 @@ gpioiic_getscl(device_t dev) struct gpioiic_softc*sc = device_get_softc(dev); unsigned intval; - GPIOBUS_LOCK_BUS(sc-sc_busdev); GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-scl_pin, GPIO_PIN_INPUT); GPIOBUS_PIN_GET(sc-sc_busdev, sc-sc_dev, sc-scl_pin, val); - GPIOBUS_UNLOCK_BUS(sc-sc_busdev); return ((int)val); } @@ -198,11 +191,9 @@ gpioiic_getsda(device_t dev) struct gpioiic_softc*sc = device_get_softc(dev); unsigned intval; - GPIOBUS_LOCK_BUS(sc-sc_busdev); GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, sc-sda_pin, GPIO_PIN_INPUT); GPIOBUS_PIN_GET(sc-sc_busdev, sc-sc_dev, sc-sda_pin, val); - GPIOBUS_UNLOCK_BUS(sc-sc_busdev); return ((int)val); } @@ -212,13 +203,11 @@ gpioiic_reset(device_t dev, u_char speed { struct gpioiic_softc*sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc-sc_busdev); GPIOBUS_ACQUIRE_BUS(sc-sc_busdev, sc-sc_dev); gpioiic_reset_bus(sc-sc_dev); GPIOBUS_RELEASE_BUS(sc-sc_busdev, sc-sc_dev); - GPIOBUS_UNLOCK_BUS(sc-sc_busdev); return (IIC_ENOADDR); } Modified: head/sys/mips/atheros/ar71xx_gpio.c == --- head/sys/mips/atheros/ar71xx_gpio.c Tue Dec 20 00:16:52 2011 (r228724) +++ head/sys/mips/atheros/ar71xx_gpio.c Tue Dec 20 00:33:56 2011 (r228725) @@ -89,17 +89,13 @@ static int ar71xx_gpio_pin_toggle(device static void ar71xx_gpio_function_enable(struct ar71xx_gpio_softc *sc, uint32_t mask) { - GPIO_LOCK(sc); GPIO_SET_BITS(sc, AR71XX_GPIO_FUNCTION, mask); - GPIO_UNLOCK(sc); } static void ar71xx_gpio_function_disable(struct ar71xx_gpio_softc *sc, uint32_t mask) { - GPIO_LOCK(sc); GPIO_CLEAR_BITS(sc, AR71XX_GPIO_FUNCTION, mask); - GPIO_UNLOCK(sc); } static void @@ -109,7 +105,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_ uint32_t mask; mask = 1 pin-gp_pin; - GPIO_LOCK(sc); /* * Manage input/output @@ -125,8 +120,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_ GPIO_CLEAR_BITS(sc, AR71XX_GPIO_OE, mask); } } - -
Re: svn commit: r228143 - in head: . share/mk tools/build/options
On Mon, Dec 19, 2011 at 05:04:43PM -0600, Brooks Davis wrote: On Mon, Dec 19, 2011 at 12:41:29PM -0800, Steve Kargl wrote: On Mon, Dec 19, 2011 at 08:09:32PM +, David Chisnall wrote: On 19 Dec 2011, at 19:52, Warner Losh wrote: -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. How useful is gprof-based profiling these days? Now that we have the DTrace pid provider, don't we have access to much more fine-grained profiling information without the need for shipping two versions of every library? It is quite uesful given that for the last 20 or so years, I can do cc -o z -pg a.c -lm_p ./z gprof -b -l ./z z.gmon | more % cumulative self self total time seconds secondscalls ms/call ms/call name 72.1 0.91 0.910 100.00% _mcount [1] 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] 4.6 1.21 0.060 100.00% .mcount (9) to ge the information I want. I'd tend to agree that we should leave it on at least in HEAD. I think it should be the default on all branches. It adds about 28 MB to /usr/lib and 10 minutes to buildworld on my x86_64 systems, ie., it is in the noise. dtrace(1M) does not seem to contain an example that gives the equivalent information. In fact, the manpage contains no examples, only the statement: See the Solaris Dynamic Tracing Guide for detailed examples of how to use the dtrace utility to perform these tasks. which, of course, is not very useful given that I do not have a Solaris Dynamic Tracing Guide. http://docs.oracle.com/cd/E19253-01/817-6223/ is it and the first hit in google... Which isn't very useful if the system that I'm working on has no or very limit internet access. A quick scan of Ch. 19, 'profile Provider' does not give anything that looks remotely similar to the above 3 command lines. Ch. 33 'User Process Tracing' isn't any better. Telling a users that getting an execution profile for her code can be done by first learning the D programming language and then reading a 41 Chapter document available on the web isn't too user friendly. And, if I read Chapter 26 of the FreeBSD Handbook correctly: 1) dtrace is experimental 2) one needs to build a kernel with the KDTRACE_HOOKS, DDB_CTF, and possibly KDTRACE_FRAME. 3) one needs to 'kldload dtraceall' module, which is a showstopper for anyone who builds his kernel with 'makeoptions NO_MODULES' -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228727 - head/sys/dev/sound/pci/hda
Author: mav Date: Tue Dec 20 02:42:53 2011 New Revision: 228727 URL: http://svn.freebsd.org/changeset/base/228727 Log: Oops, list of IDs is not sequential. Have to list all of them expoicitly. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 02:00:27 2011 (r228726) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 02:42:53 2011 (r228727) @@ -6491,15 +6491,23 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc-pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo-nid, 0x7e7, 0), cad); - /* Cast some spells for VIA VT1708S. */ id = hdac_codec_id(devinfo-codec); - if (id = HDA_CODEC_VT1708S_0 id = HDA_CODEC_VT1708S_7) { + switch (id) { + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: /* Enable Mic Boost Volume controls. */ hdac_command(sc, HDA_CMD_12BIT(cad, devinfo-nid, 0xf98, 0x01), cad); /* Don't bypass mixer. */ hdac_command(sc, HDA_CMD_12BIT(cad, devinfo-nid, 0xf88, 0xc0), cad); + break; } /* Commit controls. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228728 - head/sys/dev/iicbus
Author: adrian Date: Tue Dec 20 02:49:01 2011 New Revision: 228728 URL: http://svn.freebsd.org/changeset/base/228728 Log: IIC bitbang changes - prepare to make the bit delay configurable; debug print changes. * Right now the delay is hard coded at 10uS. This is a bit long when doing lots of periodic i2c transactions. So create a 'udelay' parameter and initialise it to 10. This can be tuned later. * Add a newline after a transaction finishes, so the debugging output isn't so horrible. Modified: head/sys/dev/iicbus/iicbb.c Modified: head/sys/dev/iicbus/iicbb.c == --- head/sys/dev/iicbus/iicbb.c Tue Dec 20 02:42:53 2011(r228727) +++ head/sys/dev/iicbus/iicbb.c Tue Dec 20 02:49:01 2011(r228728) @@ -61,6 +61,7 @@ __FBSDID($FreeBSD$); struct iicbb_softc { device_t iicbus; + int udelay; /* signal toggle delay in usec */ }; static int iicbb_attach(device_t); @@ -123,6 +124,7 @@ iicbb_attach(device_t dev) sc-iicbus = device_add_child(dev, iicbus, -1); if (!sc-iicbus) return (ENXIO); + sc-udelay = 10;/* 10 uS default */ bus_generic_attach(dev); return (0); @@ -184,20 +186,18 @@ iicbb_print_child(device_t bus, device_t return (retval); } -#define IIC_DELAY 10 - -#define I2C_SETSDA(dev,val) do { \ +#define I2C_SETSDA(sc,dev,val) do {\ IICBB_SETSDA(device_get_parent(dev), val); \ - DELAY(IIC_DELAY); \ + DELAY(sc-udelay); \ } while (0) #define I2C_SETSCL(dev,val) do { \ iicbb_setscl(dev, val, 100);\ } while (0) -#define I2C_SET(dev,ctrl,data) do {\ +#define I2C_SET(sc,dev,ctrl,data) do { \ I2C_SETSCL(dev, ctrl); \ - I2C_SETSDA(dev, data); \ + I2C_SETSDA(sc, dev, data); \ } while (0) #define I2C_GETSDA(dev) (IICBB_GETSDA(device_get_parent(dev))) @@ -216,34 +216,39 @@ static int i2c_debug = 0; static void iicbb_setscl(device_t dev, int val, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int k = 0; IICBB_SETSCL(device_get_parent(dev), val); - DELAY(IIC_DELAY); + DELAY(sc-udelay); while (val !I2C_GETSCL(dev) k++ timeout) { IICBB_SETSCL(device_get_parent(dev), val); - DELAY(IIC_DELAY); + DELAY(sc-udelay); } - + return; } static void iicbb_one(device_t dev, int timeout) { - I2C_SET(dev,0,1); - I2C_SET(dev,1,1); - I2C_SET(dev,0,1); + struct iicbb_softc *sc = device_get_softc(dev); + + I2C_SET(sc,dev,0,1); + I2C_SET(sc,dev,1,1); + I2C_SET(sc,dev,0,1); return; } static void iicbb_zero(device_t dev, int timeout) { - I2C_SET(dev,0,0); - I2C_SET(dev,1,0); - I2C_SET(dev,0,0); + struct iicbb_softc *sc = device_get_softc(dev); + + I2C_SET(sc,dev,0,0); + I2C_SET(sc,dev,1,0); + I2C_SET(sc,dev,0,0); return; } @@ -264,20 +269,21 @@ iicbb_zero(device_t dev, int timeout) static int iicbb_ack(device_t dev, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int noack; int k = 0; - - I2C_SET(dev,0,1); - I2C_SET(dev,1,1); + + I2C_SET(sc,dev,0,1); + I2C_SET(sc,dev,1,1); do { noack = I2C_GETSDA(dev); if (!noack) break; - DELAY(10); - k += 10; + DELAY(1); + k++; } while (k timeout); - I2C_SET(dev,0,1); + I2C_SET(sc,dev,0,1); I2C_DEBUG(printf(%c ,noack?'-':'+')); return (noack); @@ -302,16 +308,17 @@ iicbb_sendbyte(device_t dev, u_char data static u_char iicbb_readbyte(device_t dev, int last, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int i; unsigned char data=0; - - I2C_SET(dev,0,1); + + I2C_SET(sc,dev,0,1); for (i=7; i=0; i--) { - I2C_SET(dev,1,1); + I2C_SET(sc,dev,1,1); if (I2C_GETSDA(dev)) data |= (1i); - I2C_SET(dev,0,1); + I2C_SET(sc,dev,0,1); } if (last) { iicbb_one(dev, timeout); @@ -337,13 +344,14 @@ iicbb_reset(device_t dev, u_char speed, static int iicbb_start(device_t dev, u_char slave, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int error; I2C_DEBUG(printf()); - I2C_SET(dev,1,1); - I2C_SET(dev,1,0); -
svn commit: r228729 - head/sys/dev/gpio
Author: adrian Date: Tue Dec 20 03:25:11 2011 New Revision: 228729 URL: http://svn.freebsd.org/changeset/base/228729 Log: Fix broken locking that I introduced in the previous commit. Modified: head/sys/dev/gpio/gpioiic.c Modified: head/sys/dev/gpio/gpioiic.c == --- head/sys/dev/gpio/gpioiic.c Tue Dec 20 02:49:01 2011(r228728) +++ head/sys/dev/gpio/gpioiic.c Tue Dec 20 03:25:11 2011(r228729) @@ -203,11 +203,13 @@ gpioiic_reset(device_t dev, u_char speed { struct gpioiic_softc*sc = device_get_softc(dev); + GPIOBUS_LOCK_BUS(sc-sc_busdev); GPIOBUS_ACQUIRE_BUS(sc-sc_busdev, sc-sc_dev); gpioiic_reset_bus(sc-sc_dev); GPIOBUS_RELEASE_BUS(sc-sc_busdev, sc-sc_dev); + GPIOBUS_UNLOCK_BUS(sc-sc_busdev); return (IIC_ENOADDR); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228713 - head/contrib/tcpdump
On Mon, Dec 19, 2011 at 05:32:55PM +, Dimitry Andric wrote: Author: dim Date: Mon Dec 19 17:32:54 2011 New Revision: 228713 URL: http://svn.freebsd.org/changeset/base/228713 Log: In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison against icmp6_hdr::icmp6_type is done incorrectly. (This fix has already been applied upstream, but we do not have the latest version of tcpdump.) Yet. I have an import of libpcap in the works but became very sidetracked with work the past couple of weeks. I will be focusing on bringing in the new libpcap and tcpdump after the new year. -- WXS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228719 - head/usr.sbin/timed/timed
On Mon, 19 Dec 2011, Dimitry Andric wrote: Log: Some people pointed out long is 32-bit on some arches, while time_t is 64-bit, so better cast time_t to intmax_t, and use the appropriate printf format strings. Some pointed out that long is adequate. It works on all arches until 2038. It works on all arches with 64-bit longs for a measly 292 billion years. timed deals with current times, so times after 2038 can't happen for it yet. So long only fails for arches still using 32-bit longs in 2038. It's not as if casting to intmax_t is correct in all cases. time_t might be unsigned, or floating point. Modified: head/usr.sbin/timed/timed/correct.c == --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:29:50 2011 (r228719) @@ -162,8 +162,8 @@ adjclock(corr) } } else { syslog(LOG_WARNING, - clock correction %ld sec too large to adjust, - (long)adj.tv_sec); + clock correction %jd sec too large to adjust, + (intmax_t)adj.tv_sec); This is a for time delta, so it doesn't even run out with 32-bit longs in 2038. It runs out when the time difference between systems exceeds 68+ years. If you have such a difference, then you have more problems than misprinting it by truncating it to long. (void) gettimeofday(now, 0); timevaladd(now, corr); if (settimeofday(now, 0) 0) Modified: head/usr.sbin/timed/timed/readmsg.c == --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:29:50 2011 (r228719) @@ -181,8 +181,8 @@ again: rwait.tv_usec = 100/CLK_TCK; if (trace) { - fprintf(fd, readmsg: wait %ld.%6ld at %s\n, - (long)rwait.tv_sec, rwait.tv_usec, date()); + fprintf(fd, readmsg: wait %jd.%6ld at %s\n, + (intmax_t)rwait.tv_sec, rwait.tv_usec, date()); This is also for a time difference. It will soon be passed to select() as a timeout. If we are asking for a select timeout of 68+ years, then we have worse problems than misprinting it in debugging code. /* Notice a full disk, as we flush trace info. * It is better to flush periodically than at * every line because the tracing consists of bursts Supporting time differences of 292 billion years is silly. If you do that, then you should worry about time_t being 128-bit long double, while intmax_t is a mere 64 bits. 128-bit long double can only go up to 3*10**17 billion years before losing precision. But when it does, you should be more careful not to blindly truncate it to intmax_t. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org