svn commit: r287394 - head/etc
Author: glebius Date: Wed Sep 2 12:46:42 2015 New Revision: 287394 URL: https://svnweb.freebsd.org/changeset/base/287394 Log: Fix dynamic attach/detach of 802.11 devices after r287197: o In pccard_ether add code to start children of a 802.11 device, that are configured in rc.conf. o In devd.conf provide a regex matching all 802.11 devices, and on match run pccard_ether to spawn children. PR: 202784 Submitted by: In collaboration with:"Oleg V. Nauman" Modified: head/etc/devd.conf head/etc/pccard_ether Modified: head/etc/devd.conf == --- head/etc/devd.conf Wed Sep 2 05:55:57 2015(r287393) +++ head/etc/devd.conf Wed Sep 2 12:46:42 2015(r287394) @@ -22,6 +22,9 @@ options { "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\ esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\ [0-9]+"; + set wifi-driver-regex + "(ath|bwi|bwn|ipw|iwi|iwn|malo|mwl|ral|rsu|rum|run|uath|upgt|\ + ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; }; # Note that the attach/detach with the highest value wins, so that one can @@ -57,17 +60,16 @@ notify 0 { }; # -# Like Ethernet devices, but separate because -# they have a different media type. We may want -# to exploit this later. +# Like Ethernet devices, but separate because 802.11 require spawning +# wlan(4) interface. # -detach 0 { - media-type "802.11"; - action "/etc/pccard_ether $device-name stop"; -}; attach 0 { - media-type "802.11"; - action "/etc/pccard_ether $device-name start"; + device-name "$wifi-driver-regex"; + action "/etc/pccard_ether $device-name startchildren"; +}; +detach 0 { + device-name "$wifi-driver-regex"; + action "/etc/pccard_ether $device-name stopchildren"; }; notify 0 { match "system" "IFNET"; Modified: head/etc/pccard_ether == --- head/etc/pccard_ether Wed Sep 2 05:55:57 2015(r287393) +++ head/etc/pccard_ether Wed Sep 2 12:46:42 2015(r287394) @@ -17,6 +17,9 @@ stop_precmd="checkauto" stop_cmd="pccard_ether_stop" restart_precmd="checkauto" restart_cmd="pccard_ether_restart" +startchildren_cmd="pccard_ether_startchildren" +stopchildren_cmd="pccard_ether_stopchildren" +extra_commands="startchildren stopchildren" setup_routes() { @@ -114,6 +117,20 @@ pccard_ether_restart() pccard_ether_start } +pccard_ether_startchildren() +{ + for child in `get_if_var $ifn wlans_IF`; do + /etc/rc.d/netif quietstart $child + done +} + +pccard_ether_stopchildren() +{ + for child in `get_if_var $ifn wlans_IF`; do + /etc/rc.d/netif quietstop $child + done +} + ifn=$1 shift if [ -z "$*" ]; then ___ 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: r287358 - head
Alexander, On Tue, Sep 01, 2015 at 10:44:38PM -0400, Alexander Kabaev wrote: A> On Tue, 1 Sep 2015 11:59:12 + (UTC) A> > Log: A> > Not only build with buildworld, but also install with installworld A> > all alternative kernels. A> > A> > Sponsored by:Netflix A> > Sponsored by:Nginx, Inc. A> > A> > Modified: A> > head/Makefile.inc1 A> > A> > Modified: head/Makefile.inc1 A> > == A> > --- head/Makefile.inc1 Tue Sep 1 11:46:13 2015 A> > (r287357) +++ head/Makefile.inc1 Tue Sep 1 11:59:12 A> > 2015 (r287358) @@ -1127,6 +1127,14 @@ reinstallkernel A> > reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ A> >${CROSSENV} PATH=${TMPPATH} \ A> >${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} A> > ${.TARGET:S/kernel//} +.for _kernel in ${BUILDKERNELS:[2..-1]} A> > + @echo A> > "--" A> > + @echo ">>> Installing kernel ${_kernel}" A> > + @echo A> > "--" A> > + cd ${KRNLOBJDIR}/${_kernel}; \ A> > + ${CROSSENV} PATH=${TMPPATH} \ A> > + ${MAKE} ${IMAKE_INSTALL} A> > KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} +.endfor A> > A> > distributekernel distributekernel.debug: A> > .if empty(INSTALLKERNEL) A> A> This is probably not doing what you think it is doing. Now, when A> installing my kernel, built from config file , I get it installed A> into /boot/kernel, which is good and normal, and I get an extra and A> highly undesired copy in boot/kernel.. That one I didn't ask for A> and would rather see it gone. Does that happen to you, or do you just suppose that this is going to happen looking at the code? -- Totus tuus, Glebius. ___ 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: r287358 - head
On Wed, 2 Sep 2015 15:50:24 +0300 Gleb Smirnoff wrote: > Alexander, > > On Tue, Sep 01, 2015 at 10:44:38PM -0400, Alexander Kabaev wrote: > A> On Tue, 1 Sep 2015 11:59:12 + (UTC) > A> > Log: > A> > Not only build with buildworld, but also install with > A> > installworld all alternative kernels. > A> > > A> > Sponsored by: Netflix > A> > Sponsored by: Nginx, Inc. > A> > > A> > Modified: > A> > head/Makefile.inc1 > A> > > A> > Modified: head/Makefile.inc1 > A> > > == > A> > --- head/Makefile.inc1 Tue Sep 1 11:46:13 2015 > A> > (r287357) +++ head/Makefile.inc1 Tue Sep 1 11:59:12 > A> > 2015 (r287358) @@ -1127,6 +1127,14 @@ reinstallkernel > A> > reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ > A> > ${CROSSENV} PATH=${TMPPATH} \ > A> > ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} > A> > ${.TARGET:S/kernel//} +.for _kernel in ${BUILDKERNELS:[2..-1]} > A> > +@echo > A> > "--" > A> > +@echo ">>> Installing kernel ${_kernel}" > A> > +@echo > A> > "--" > A> > +cd ${KRNLOBJDIR}/${_kernel}; \ > A> > +${CROSSENV} PATH=${TMPPATH} \ > A> > +${MAKE} ${IMAKE_INSTALL} > A> > KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} +.endfor > A> > > A> > distributekernel distributekernel.debug: > A> > .if empty(INSTALLKERNEL) > A> > A> This is probably not doing what you think it is doing. Now, when > A> installing my kernel, built from config file , I get it > A> installed into /boot/kernel, which is good and normal, and I get > A> an extra and highly undesired copy in boot/kernel.. That one > A> I didn't ask for and would rather see it gone. > > Does that happen to you, or do you just suppose that this is going to > happen looking at the code? > > -- > Totus tuus, Glebius. It does happen to me, I wouldn't bother you otherwise. 'make installworld KERNCONF=KANBSD' now results in kernel installed twice, once as /boot/kernel and once as /boot/kernel.KANBSD. Re-running it once more, I even get to have /boot/kernel.KANBSD.old. As a side point, 'make buildworld' does not suffer from same issue. -- Alexander Kabaev pgp2OOXjm5T36.pgp Description: OpenPGP digital signature
Re: svn commit: r287358 - head
On Wed, Sep 02, 2015 at 09:08:25AM -0400, Alexander Kabaev wrote: A> > A> > Modified: head/Makefile.inc1 A> > A> > == A> > A> > --- head/Makefile.inc1Tue Sep 1 11:46:13 2015 A> > A> > (r287357) +++ head/Makefile.inc1 Tue Sep 1 11:59:12 A> > A> > 2015 (r287358) @@ -1127,6 +1127,14 @@ reinstallkernel A> > A> > reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ A> > A> > ${CROSSENV} PATH=${TMPPATH} \ A> > A> > ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} A> > A> > ${.TARGET:S/kernel//} +.for _kernel in ${BUILDKERNELS:[2..-1]} A> > A> > + @echo A> > A> > "--" A> > A> > + @echo ">>> Installing kernel ${_kernel}" A> > A> > + @echo A> > A> > "--" A> > A> > + cd ${KRNLOBJDIR}/${_kernel}; \ A> > A> > + ${CROSSENV} PATH=${TMPPATH} \ A> > A> > + ${MAKE} ${IMAKE_INSTALL} A> > A> > KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} +.endfor A> > A> > A> > A> > distributekernel distributekernel.debug: A> > A> > .if empty(INSTALLKERNEL) A> > A> A> > A> This is probably not doing what you think it is doing. Now, when A> > A> installing my kernel, built from config file , I get it A> > A> installed into /boot/kernel, which is good and normal, and I get A> > A> an extra and highly undesired copy in boot/kernel.. That one A> > A> I didn't ask for and would rather see it gone. A> > A> > Does that happen to you, or do you just suppose that this is going to A> > happen looking at the code? A> > A> > -- A> > Totus tuus, Glebius. A> A> It does happen to me, I wouldn't bother you otherwise. A> A> 'make installworld KERNCONF=KANBSD' now results in kernel installed A> twice, once as /boot/kernel and once as /boot/kernel.KANBSD. Re-running A> it once more, I even get to have /boot/kernel.KANBSD.old. A> A> As a side point, 'make buildworld' does not suffer from same issue. installworld? Now I'm really confused. Was that typo? -- Totus tuus, Glebius. ___ 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: r287358 - head
On Wed, 2 Sep 2015 16:20:34 +0300 Gleb Smirnoff wrote: > On Wed, Sep 02, 2015 at 09:08:25AM -0400, Alexander Kabaev wrote: > A> > > A> > Does that happen to you, or do you just suppose that this is > A> > going to happen looking at the code? > A> > > A> > -- > A> > Totus tuus, Glebius. > A> > A> It does happen to me, I wouldn't bother you otherwise. > A> > A> 'make installworld KERNCONF=KANBSD' now results in kernel installed > A> twice, once as /boot/kernel and once as /boot/kernel.KANBSD. > A> Re-running it once more, I even get to > A> have /boot/kernel.KANBSD.old. > A> > A> As a side point, 'make buildworld' does not suffer from same issue. > > installworld? Now I'm really confused. Was that typo? > > -- > Totus tuus, Glebius. Just to make sure information gets through un-munged this time, the output of the sudo make installkernel KERNCONF=KANBSD 2>&1 | tee installkernel.log is available at https://people.freebsd.org/~kan/installkernel.log -- Alexander Kabaev pgpU8_6PwQLZj.pgp Description: OpenPGP digital signature
Re: svn commit: r287358 - head
On Wed, 2 Sep 2015 16:20:34 +0300 Gleb Smirnoff wrote: > On Wed, Sep 02, 2015 at 09:08:25AM -0400, Alexander Kabaev wrote: > A> > A> > Modified: head/Makefile.inc1 > A> > A> > > == > A> > A> > --- head/Makefile.inc1 Tue Sep 1 11:46:13 2015 > A> > A> > (r287357) +++ head/Makefile.inc1Tue Sep 1 11:59:12 > A> > A> > 2015(r287358) @@ -1127,6 +1127,14 @@ reinstallkernel > A> > A> > reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; > A> > A> > \ ${CROSSENV} PATH=${TMPPATH} \ > A> > A> > ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} > A> > A> > ${.TARGET:S/kernel//} +.for _kernel in > A> > A> > ${BUILDKERNELS:[2..-1]} > A> > A> > + @echo > A> > A> > "--" > A> > A> > + @echo ">>> Installing kernel ${_kernel}" > A> > A> > + @echo > A> > A> > "--" > A> > A> > + cd ${KRNLOBJDIR}/${_kernel}; \ > A> > A> > + ${CROSSENV} PATH=${TMPPATH} \ > A> > A> > + ${MAKE} ${IMAKE_INSTALL} > A> > A> > KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} > A> > A> > +.endfor > A> > A> > distributekernel distributekernel.debug: > A> > A> > .if empty(INSTALLKERNEL) > A> > A> > A> > A> This is probably not doing what you think it is doing. Now, > A> > A> when installing my kernel, built from config file , I > A> > A> get it installed into /boot/kernel, which is good and normal, > A> > A> and I get an extra and highly undesired copy in > A> > A> boot/kernel.. That one I didn't ask for and would > A> > A> rather see it gone. > A> > > A> > Does that happen to you, or do you just suppose that this is > A> > going to happen looking at the code? > A> > > A> > -- > A> > Totus tuus, Glebius. > A> > A> It does happen to me, I wouldn't bother you otherwise. > A> > A> 'make installworld KERNCONF=KANBSD' now results in kernel installed > A> twice, once as /boot/kernel and once as /boot/kernel.KANBSD. > A> Re-running it once more, I even get to > A> have /boot/kernel.KANBSD.old. > A> > A> As a side point, 'make buildworld' does not suffer from same issue. > > installworld? Now I'm really confused. Was that typo? > > -- > Totus tuus, Glebius. Sorry, read them as installkernel and buildkernel respectively. -- Alexander Kabaev pgpq2PO2g3oK_.pgp Description: OpenPGP digital signature
Re: svn commit: r287358 - head
On 02.09.2015 16:36, Alexander Kabaev wrote: > On Wed, 2 Sep 2015 16:20:34 +0300 > Gleb Smirnoff wrote: > >> On Wed, Sep 02, 2015 at 09:08:25AM -0400, Alexander Kabaev wrote: >> A> > >> A> > Does that happen to you, or do you just suppose that this is >> A> > going to happen looking at the code? >> A> > >> A> > -- >> A> > Totus tuus, Glebius. >> A> >> A> It does happen to me, I wouldn't bother you otherwise. >> A> >> A> 'make installworld KERNCONF=KANBSD' now results in kernel installed >> A> twice, once as /boot/kernel and once as /boot/kernel.KANBSD. >> A> Re-running it once more, I even get to >> A> have /boot/kernel.KANBSD.old. >> A> >> A> As a side point, 'make buildworld' does not suffer from same issue. >> >> installworld? Now I'm really confused. Was that typo? >> >> -- >> Totus tuus, Glebius. > > Just to make sure information gets through un-munged this time, the > output of the > sudo make installkernel KERNCONF=KANBSD 2>&1 | tee installkernel.log is > available at > https://people.freebsd.org/~kan/installkernel.log Sorry if it is documented somewhere, but can this be disabled somehow? On my development server installkernel for some reason already took more time then buildkernel -DKERNFAST. Now I suppose it will take twice more. I am doing it hundred times a day, and I am not happy. :-\ -- Alexander Motin ___ 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: r287395 - head/sys/compat/linux
Author: trasz Date: Wed Sep 2 14:04:13 2015 New Revision: 287395 URL: https://svnweb.freebsd.org/changeset/base/287395 Log: Fixes a panic triggered by threaded Linux applications when running with RACCT/RCTL enabled. Reviewed by: ngie@, ed@ Tested by:Larry Rosenman MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3470 Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c == --- head/sys/compat/linux/linux_fork.c Wed Sep 2 12:46:42 2015 (r287394) +++ head/sys/compat/linux/linux_fork.c Wed Sep 2 14:04:13 2015 (r287395) @@ -285,10 +285,20 @@ linux_clone_thread(struct thread *td, st p = td->td_proc; +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(p); + error = racct_add(p, RACCT_NTHR, 1); + PROC_UNLOCK(p); + if (error != 0) + return (EPROCLIM); + } +#endif + /* Initialize our td */ error = kern_thr_alloc(p, 0, &newtd); if (error) - return (error); + goto fail; cpu_set_upcall(newtd, td); @@ -369,6 +379,16 @@ linux_clone_thread(struct thread *td, st td->td_retval[0] = newtd->td_tid; return (0); + +fail: +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(p); + racct_sub(p, RACCT_NTHR, 1); + PROC_UNLOCK(p); + } +#endif + return (error); } int ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r287358 - head
On Wed, 02 Sep 2015 16:57:01 +0300 Alexander Motin wrote: > On 02.09.2015 16:36, Alexander Kabaev wrote: > > On Wed, 2 Sep 2015 16:20:34 +0300 > > Gleb Smirnoff wrote: > > > >> On Wed, Sep 02, 2015 at 09:08:25AM -0400, Alexander Kabaev wrote: > >> A> > > >> A> > Does that happen to you, or do you just suppose that this is > >> A> > going to happen looking at the code? > >> A> > > >> A> > -- > >> A> > Totus tuus, Glebius. > >> A> > >> A> It does happen to me, I wouldn't bother you otherwise. > >> A> > >> A> 'make installworld KERNCONF=KANBSD' now results in kernel > >> A> installed twice, once as /boot/kernel and once > >> A> as /boot/kernel.KANBSD. Re-running it once more, I even get to > >> A> have /boot/kernel.KANBSD.old. > >> A> > >> A> As a side point, 'make buildworld' does not suffer from same > >> A> issue. > >> > >> installworld? Now I'm really confused. Was that typo? > >> > >> -- > >> Totus tuus, Glebius. > > > > Just to make sure information gets through un-munged this time, the > > output of the > > sudo make installkernel KERNCONF=KANBSD 2>&1 | tee > > installkernel.log is available at > > https://people.freebsd.org/~kan/installkernel.log > > Sorry if it is documented somewhere, but can this be disabled somehow? > On my development server installkernel for some reason already took > more time then buildkernel -DKERNFAST. Now I suppose it will take > twice more. I am doing it hundred times a day, and I am not happy. :-\ > Well, I do not think this this was the intended behaviour, so it is pretty safe to assume it will get fixed. Makefile.inc1 uses documented '[2..-1]' subscript to prevent same kernel installed more than once but somehow that does not work. -- Alexander Kabaev pgp6R2PLhZDx1.pgp Description: OpenPGP digital signature
svn commit: r287396 - in head: sbin/bsdlabel sbin/dumpfs sbin/fdisk sbin/ffsinfo sbin/mdconfig sbin/newfs sbin/newfs_msdos sbin/newfs_nandfs sbin/reboot share/man/man4 share/man/man7 share/man/man8...
Author: trasz Date: Wed Sep 2 14:08:43 2015 New Revision: 287396 URL: https://svnweb.freebsd.org/changeset/base/287396 Log: It's 2015, and some people are still trying to use fdisk and then go asking what debug flags to set for GEOM to make it work. Advice them to use gpart(8) instead. Something similar should probably done with disklabel, but I need to rewrite the disklabel examples first. Reviewed by: wblock@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3315 Modified: head/sbin/bsdlabel/bsdlabel.8 head/sbin/dumpfs/dumpfs.8 head/sbin/fdisk/fdisk.8 head/sbin/ffsinfo/ffsinfo.8 head/sbin/mdconfig/mdconfig.8 head/sbin/newfs/newfs.8 head/sbin/newfs_msdos/newfs_msdos.8 head/sbin/newfs_nandfs/newfs_nandfs.8 head/sbin/reboot/boot_i386.8 head/share/man/man4/da.4 head/share/man/man4/md.4 head/share/man/man4/vpo.4 head/share/man/man7/tuning.7 head/share/man/man8/picobsd.8 head/usr.sbin/boot0cfg/boot0cfg.8 Modified: head/sbin/bsdlabel/bsdlabel.8 == --- head/sbin/bsdlabel/bsdlabel.8 Wed Sep 2 14:04:13 2015 (r287395) +++ head/sbin/bsdlabel/bsdlabel.8 Wed Sep 2 14:08:43 2015 (r287396) @@ -445,7 +445,10 @@ to properly recognize the disk: .Bd -literal -offset indent dd if=/dev/zero of=/dev/da0 bs=512 count=32 -fdisk -BI da0 +gpart create -s MBR da0 +gpart add -t freebsd da0 +gpart set -a active -i 1 da0 +gpart bootcode -b /boot/mbr da0 dd if=/dev/zero of=/dev/da0s1 bs=512 count=32 bsdlabel -w -B da0s1 bsdlabel -e da0s1 @@ -495,6 +498,5 @@ are not generally compatible. .Xr md 4 , .Xr disktab 5 , .Xr boot0cfg 8 , -.Xr fdisk 8 , .Xr gpart 8 , .Xr newfs 8 Modified: head/sbin/dumpfs/dumpfs.8 == --- head/sbin/dumpfs/dumpfs.8 Wed Sep 2 14:04:13 2015(r287395) +++ head/sbin/dumpfs/dumpfs.8 Wed Sep 2 14:08:43 2015(r287396) @@ -100,8 +100,8 @@ flag is needed if the filesystem uses .Sh SEE ALSO .Xr disktab 5 , .Xr fs 5 , -.Xr disklabel 8 , .Xr fsck 8 , +.Xr gpart 8 , .Xr newfs 8 , .Xr tunefs 8 .Sh HISTORY Modified: head/sbin/fdisk/fdisk.8 == --- head/sbin/fdisk/fdisk.8 Wed Sep 2 14:04:13 2015(r287395) +++ head/sbin/fdisk/fdisk.8 Wed Sep 2 14:08:43 2015(r287396) @@ -39,6 +39,13 @@ The utility can be used to divide space on the disk into slices and set one active. .Sh DESCRIPTION +.Bf -symbolic +This command is obsolete. +Users are advised to use +.Xr gpart 8 +instead. +.Ef +.Pp The .Fx utility, Modified: head/sbin/ffsinfo/ffsinfo.8 == --- head/sbin/ffsinfo/ffsinfo.8 Wed Sep 2 14:04:13 2015(r287395) +++ head/sbin/ffsinfo/ffsinfo.8 Wed Sep 2 14:08:43 2015(r287396) @@ -121,9 +121,9 @@ to .Pa /var/tmp/ffsinfo with all available information. .Sh SEE ALSO -.Xr disklabel 8 , .Xr dumpfs 8 , .Xr fsck 8 , +.Xr gpart 8 , .Xr growfs 8 , .Xr gvinum 8 , .Xr newfs 8 , Modified: head/sbin/mdconfig/mdconfig.8 == --- head/sbin/mdconfig/mdconfig.8 Wed Sep 2 14:04:13 2015 (r287395) +++ head/sbin/mdconfig/mdconfig.8 Wed Sep 2 14:08:43 2015 (r287396) @@ -300,8 +300,7 @@ mount /dev/md1.nop /mnt .Sh SEE ALSO .Xr md 4 , .Xr ffs 7 , -.Xr bsdlabel 8 , -.Xr fdisk 8 , +.Xr gpart 8 , .Xr mdmfs 8 , .Xr malloc 9 .Sh HISTORY Modified: head/sbin/newfs/newfs.8 == --- head/sbin/newfs/newfs.8 Wed Sep 2 14:04:13 2015(r287395) +++ head/sbin/newfs/newfs.8 Wed Sep 2 14:08:43 2015(r287396) @@ -303,11 +303,11 @@ on file systems that contain many small .Xr geom 4 , .Xr disktab 5 , .Xr fs 5 , -.Xr bsdlabel 8 , .Xr camcontrol 8 , .Xr dump 8 , .Xr dumpfs 8 , .Xr fsck 8 , +.Xr gpart 8 , .Xr gjournal 8 , .Xr growfs 8 , .Xr gvinum 8 , Modified: head/sbin/newfs_msdos/newfs_msdos.8 == --- head/sbin/newfs_msdos/newfs_msdos.8 Wed Sep 2 14:04:13 2015 (r287395) +++ head/sbin/newfs_msdos/newfs_msdos.8 Wed Sep 2 14:08:43 2015 (r287396) @@ -228,9 +228,7 @@ Create a 30MB image file, with the FAT p newfs_msdos -C 30M -@63s ./somefile .Ed .Sh SEE ALSO -.Xr disktab 5 , -.Xr disklabel 8 , -.Xr fdisk 8 , +.Xr gpart 8 , .Xr newfs 8 .Sh HISTORY The Modified: head/sbin/newfs_nandfs/newfs_nandfs.8 == --- head/sbin/newfs_nandfs/newfs_nandfs.8 Wed Sep 2 14:04:13 2015 (r287395) +++ head/sbin/newfs_nandfs/newfs_nandfs.8 Wed Sep 2
svn commit: r287397 - head/sbin/mount_unionfs
Author: trasz Date: Wed Sep 2 14:10:09 2015 New Revision: 287397 URL: https://svnweb.freebsd.org/changeset/base/287397 Log: Fix markup. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/mount_unionfs/mount_unionfs.8 Modified: head/sbin/mount_unionfs/mount_unionfs.8 == --- head/sbin/mount_unionfs/mount_unionfs.8 Wed Sep 2 14:08:43 2015 (r287396) +++ head/sbin/mount_unionfs/mount_unionfs.8 Wed Sep 2 14:10:09 2015 (r287397) @@ -83,7 +83,7 @@ becomes the upper layer. However, .Ar uniondir remains the mount point. -.It Sm Cm copymode No = Cm traditional | transparent | masquerade Sm +.It Cm copymode No = Cm traditional | transparent | masquerade Specifies the way to create a file or a directory in the upper layer automatically when needed. The @@ -98,7 +98,7 @@ For behavior of the mode, see .Sx MASQUERADE MODE below. -.It Sm Cm whiteout No = Cm always | whenneeded Sm +.It Cm whiteout No = Cm always | whenneeded Specifies whether whiteouts should always be made in the upper layer when removing a file or directory or only when it already exists in the lower layer. ___ 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: r287394 - head/etc
Hey Gleb, On Wed, 2015-09-02 at 12:46 +, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Sep 2 12:46:42 2015 > New Revision: 287394 > URL: https://svnweb.freebsd.org/changeset/base/287394 > > Log: > Fix dynamic attach/detach of 802.11 devices after r287197: > > o In pccard_ether add code to start children of a 802.11 > device, that are configured in rc.conf. > o In devd.conf provide a regex matching all 802.11 devices, > and on match run pccard_ether to spawn children. > > PR: 202784 > Submitted by: > In collaboration with: "Oleg V. Nauman" > > Modified: > head/etc/devd.conf > head/etc/pccard_ether > > Modified: head/etc/devd.conf > == > --- head/etc/devd.confWed Sep 2 05:55:57 2015(r287393) > +++ head/etc/devd.confWed Sep 2 12:46:42 2015(r287394) > @@ -22,6 +22,9 @@ options { > "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\ > esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\ > [0-9]+"; > + set wifi-driver-regex > + "(ath|bwi|bwn|ipw|iwi|iwn|malo|mwl|ral|rsu|rum|run|uath|upgt|\ > + ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; > }; Should the new iwm driver also be added? > > # Note that the attach/detach with the highest value wins, so that one can > @@ -57,17 +60,16 @@ notify 0 { > }; > > # > -# Like Ethernet devices, but separate because > -# they have a different media type. We may want > -# to exploit this later. > +# Like Ethernet devices, but separate because 802.11 require spawning > +# wlan(4) interface. > # > -detach 0 { > - media-type "802.11"; > - action "/etc/pccard_ether $device-name stop"; > -}; > attach 0 { > - media-type "802.11"; > - action "/etc/pccard_ether $device-name start"; > + device-name "$wifi-driver-regex"; > + action "/etc/pccard_ether $device-name startchildren"; > +}; > +detach 0 { > + device-name "$wifi-driver-regex"; > + action "/etc/pccard_ether $device-name stopchildren"; > }; > notify 0 { > match "system" "IFNET"; > > Modified: head/etc/pccard_ether > == > --- head/etc/pccard_ether Wed Sep 2 05:55:57 2015(r287393) > +++ head/etc/pccard_ether Wed Sep 2 12:46:42 2015(r287394) > @@ -17,6 +17,9 @@ stop_precmd="checkauto" > stop_cmd="pccard_ether_stop" > restart_precmd="checkauto" > restart_cmd="pccard_ether_restart" > +startchildren_cmd="pccard_ether_startchildren" > +stopchildren_cmd="pccard_ether_stopchildren" > +extra_commands="startchildren stopchildren" > > setup_routes() > { > @@ -114,6 +117,20 @@ pccard_ether_restart() > pccard_ether_start > } > > +pccard_ether_startchildren() > +{ > + for child in `get_if_var $ifn wlans_IF`; do > + /etc/rc.d/netif quietstart $child > + done > +} > + > +pccard_ether_stopchildren() > +{ > + for child in `get_if_var $ifn wlans_IF`; do > + /etc/rc.d/netif quietstop $child > + done > +} > + > ifn=$1 > shift > if [ -z "$*" ]; then > ___ > 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" -- Shawn Webb HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: This is a digitally signed message part
Re: svn commit: r287358 - head
On Wed, Sep 2, 2015 at 3:57 PM, Alexander Motin wrote: > > > Sorry if it is documented somewhere, but can this be disabled somehow? > On my development server installkernel for some reason already took more > time then buildkernel -DKERNFAST. Now I suppose it will take twice more. > I am doing it hundred times a day, and I am not happy. :-\ > > This create problem for generating nanobsd image too: It install kernel twice, then the resulting /boot is too big for being copied into the small OS partition. Regards, Olivier ___ 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: r287358 - head
On 9/2/15, Olivier Cochard-Labbé wrote: > On Wed, Sep 2, 2015 at 3:57 PM, Alexander Motin wrote: > >> >> >> Sorry if it is documented somewhere, but can this be disabled somehow? >> On my development server installkernel for some reason already took more >> time then buildkernel -DKERNFAST. Now I suppose it will take twice more. >> I am doing it hundred times a day, and I am not happy. :-\ >> >> > This create problem for generating nanobsd image too: It install kernel > twice, then the resulting /boot is too big for being copied into the small > OS partition. We have problems with this change too, because our kernel added twice to installer mediums. > > Regards, > > Olivier > ___ > 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"
Re: svn commit: r287396 - in head: sbin/bsdlabel sbin/dumpfs sbin/fdisk sbin/ffsinfo sbin/mdconfig sbin/newfs sbin/newfs_msdos sbin/newfs_nandfs sbin/reboot share/man/man4 share/man/man7 share/man/man
On Wed, Sep 02, 2015 at 02:08:43PM +, Edward Tomasz Napierala wrote: E> Author: trasz E> Date: Wed Sep 2 14:08:43 2015 E> New Revision: 287396 E> URL: https://svnweb.freebsd.org/changeset/base/287396 E> E> Log: E> It's 2015, and some people are still trying to use fdisk and then E> go asking what debug flags to set for GEOM to make it work. Advice E> them to use gpart(8) instead. E> E> Something similar should probably done with disklabel, E> but I need to rewrite the disklabel examples first. Thanks! Do we still have functionality of fdisk/bsdlabel that isn't covered by gpart? Can we simply remove the tools? -- Totus tuus, Glebius. ___ 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: r287398 - head/etc
Author: glebius Date: Wed Sep 2 14:38:16 2015 New Revision: 287398 URL: https://svnweb.freebsd.org/changeset/base/287398 Log: Add iwm(4), that was missing in r287394. Submitted by: Shawn Webb Modified: head/etc/devd.conf Modified: head/etc/devd.conf == --- head/etc/devd.conf Wed Sep 2 14:10:09 2015(r287397) +++ head/etc/devd.conf Wed Sep 2 14:38:16 2015(r287398) @@ -23,8 +23,8 @@ options { esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\ [0-9]+"; set wifi-driver-regex - "(ath|bwi|bwn|ipw|iwi|iwn|malo|mwl|ral|rsu|rum|run|uath|upgt|\ - ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; + "(ath|bwi|bwn|ipw|iwi|iwm|iwn|malo|mwl|ral|rsu|rum|run|uath|\ + upgt|ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; }; # Note that the attach/detach with the highest value wins, so that one can ___ 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: r287399 - head/sys/dev/iwn
Author: glebius Date: Wed Sep 2 15:23:51 2015 New Revision: 287399 URL: https://svnweb.freebsd.org/changeset/base/287399 Log: Remove the software queue, which is a remnant of ifnet ifqueue. Reviewed by: adrian Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Wed Sep 2 14:38:16 2015(r287398) +++ head/sys/dev/iwn/if_iwn.c Wed Sep 2 15:23:51 2015(r287399) @@ -231,7 +231,6 @@ static void iwn_xmit_task(void *arg0, in static int iwn_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static int iwn_transmit(struct ieee80211com *, struct mbuf *); -static voidiwn_start_locked(struct iwn_softc *); static voidiwn_watchdog(void *); static int iwn_ioctl(struct ieee80211com *, u_long , void *); static voidiwn_parent(struct ieee80211com *); @@ -471,7 +470,6 @@ iwn_attach(device_t dev) } IWN_LOCK_INIT(sc); - mbufq_init(&sc->sc_snd, ifqmaxlen); /* Read hardware revision and attach. */ sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT) @@ -1409,8 +1407,6 @@ iwn_detach(device_t dev) ieee80211_ifdetach(&sc->sc_ic); } - mbufq_drain(&sc->sc_snd); - /* Uninstall interrupt handler. */ if (sc->irq != NULL) { bus_teardown_intr(dev, sc->irq, sc->sc_ih); @@ -3597,14 +3593,10 @@ iwn_tx_done(struct iwn_softc *sc, struct (status & IWN_TX_FAIL) != 0); sc->sc_tx_timer = 0; - if (--ring->queued < IWN_TX_RING_LOMARK) { + if (--ring->queued < IWN_TX_RING_LOMARK) sc->qfullmsk &= ~(1 << ring->qid); - if (sc->qfullmsk == 0) - iwn_start_locked(sc); - } DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); - } /* @@ -3781,14 +3773,10 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, } sc->sc_tx_timer = 0; - if (ring->queued < IWN_TX_RING_LOMARK) { + if (ring->queued < IWN_TX_RING_LOMARK) sc->qfullmsk &= ~(1 << ring->qid); - if (sc->qfullmsk == 0) - iwn_start_locked(sc); - } DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); - } /* @@ -4948,54 +4936,30 @@ iwn_raw_xmit(struct ieee80211_node *ni, static int iwn_transmit(struct ieee80211com *ic, struct mbuf *m) { - struct iwn_softc *sc; + struct iwn_softc *sc = ic->ic_softc; + struct ieee80211_node *ni; int error; - sc = ic->ic_softc; - IWN_LOCK(sc); - if ((sc->sc_flags & IWN_FLAG_RUNNING) == 0) { + if ((sc->sc_flags & IWN_FLAG_RUNNING) == 0 || sc->sc_beacon_wait) { IWN_UNLOCK(sc); return (ENXIO); } - error = mbufq_enqueue(&sc->sc_snd, m); - if (error) { - IWN_UNLOCK(sc); - return (error); - } - iwn_start_locked(sc); - IWN_UNLOCK(sc); - return (0); -} - -static void -iwn_start_locked(struct iwn_softc *sc) -{ - struct ieee80211_node *ni; - struct mbuf *m; - IWN_LOCK_ASSERT(sc); - - /* -* If we're waiting for a beacon, we can just exit out here -* and wait for the taskqueue to be kicked. -*/ - if (sc->sc_beacon_wait) { - return; + if (sc->qfullmsk) { + IWN_UNLOCK(sc); + return (ENOBUFS); } - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: called\n", __func__); - while (sc->qfullmsk == 0 && - (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - if (iwn_tx_data(sc, m, ni) != 0) { - if_inc_counter(ni->ni_vap->iv_ifp, - IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); - } else - sc->sc_tx_timer = 5; - } - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: done\n", __func__); + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + error = iwn_tx_data(sc, m, ni); + if (error) { + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); + } else + sc->sc_tx_timer = 5; + IWN_UNLOCK(sc); + return (error); } static void @@ -8731,9 +8695,6 @@ iwn_panicked(void *arg0, int pending) "%s: could not move to run state\n", __func__); } - /* Only run start once the NIC is in a useful state, like associated */ - iwn_start_locked(sc); - IWN_UNLOCK(sc); } Modified: head/sys/dev/iwn/if_iwnvar.h
Re: svn commit: r287394 - head/etc
On Wed, Sep 2, 2015 at 6:46 AM, Gleb Smirnoff wrote: > + set wifi-driver-regex > + > "(ath|bwi|bwn|ipw|iwi|iwn|malo|mwl|ral|rsu|rum|run|uath|upgt|\ > + ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; > This moves us in the wrong direction. We've been looking at ways of getting rid of the NIC regex since it went in. Now there's another one to fight with :( 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"
svn commit: r287400 - head
Author: glebius Date: Wed Sep 2 15:42:14 2015 New Revision: 287400 URL: https://svnweb.freebsd.org/changeset/base/287400 Log: The ${BUILDKERNELS:[2..-1]} appears to produce a non zero result for a one word variable, which is quite unexpected from documentation. So, to avoid double installation of a single kernel, protect the extra kernels loop with ${BUILDKERNELS:[#]} > 1 conditional. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Sep 2 15:23:51 2015(r287399) +++ head/Makefile.inc1 Wed Sep 2 15:42:14 2015(r287400) @@ -1127,6 +1127,7 @@ reinstallkernel reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--" @echo ">>> Installing kernel ${_kernel}" @@ -1135,6 +1136,7 @@ reinstallkernel reinstallkernel.debug: _ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} .endfor +.endif distributekernel distributekernel.debug: .if empty(INSTALLKERNEL) @@ -1154,6 +1156,7 @@ distributekernel distributekernel.debug: sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.meta .endif +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta @@ -1170,27 +1173,32 @@ distributekernel distributekernel.debug: ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta .endif .endfor +.endif packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor +.endif .else cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor .endif +.endif # # doxygen ___ 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: r287402 - head/sys/net
Author: hrs Date: Wed Sep 2 16:30:45 2015 New Revision: 287402 URL: https://svnweb.freebsd.org/changeset/base/287402 Log: Fix a panic which was reproducible by an infinite loop of "ifconfig epair0 create && ifconfig epair0a destroy". This was caused by an uninitialized function pointer in softc->media. Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c == --- head/sys/net/if_epair.c Wed Sep 2 16:06:25 2015(r287401) +++ head/sys/net/if_epair.c Wed Sep 2 16:30:45 2015(r287402) @@ -809,6 +809,14 @@ epair_clone_create(struct if_clone *ifc, netisr_get_cpuid(sca->ifp->if_index % netisr_get_cpucount()); scb->cpuid = netisr_get_cpuid(scb->ifp->if_index % netisr_get_cpucount()); + + /* Initialise pseudo media types. */ + ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&sca->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&sca->media, IFM_ETHER | IFM_10G_T); + ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T); /* Finish initialization of interface a. */ ifp = sca->ifp; @@ -867,14 +875,6 @@ epair_clone_create(struct if_clone *ifc, strlcpy(name, sca->ifp->if_xname, len); DPRINTF("name='%s/%db' created sca=%p scb=%p\n", name, unit, sca, scb); - /* Initialise pseudo media types. */ - ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); - ifmedia_add(&sca->media, IFM_ETHER | IFM_10G_T, 0, NULL); - ifmedia_set(&sca->media, IFM_ETHER | IFM_10G_T); - ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status); - ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL); - ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T); - /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; ___ 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: r287403 - head/sys/dev/ioat
Author: cem Date: Wed Sep 2 16:48:03 2015 New Revision: 287403 URL: https://svnweb.freebsd.org/changeset/base/287403 Log: ioat: re-initialize interrupts after resetting hw on BDXDE Resetting some generations of the I/OAT hardware (just BDXDE for now) resets the corresponding MSI-X registers. So, teardown and re-initialize interrupts after resetting the hardware. Reviewed by: jimharris Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D3549 Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cWed Sep 2 16:30:45 2015(r287402) +++ head/sys/dev/ioat/ioat.cWed Sep 2 16:48:03 2015(r287403) @@ -53,12 +53,14 @@ __FBSDID("$FreeBSD$"); static int ioat_probe(device_t device); static int ioat_attach(device_t device); static int ioat_detach(device_t device); +static int ioat_setup_intr(struct ioat_softc *ioat); +static int ioat_teardown_intr(struct ioat_softc *ioat); static int ioat3_attach(device_t device); static int ioat_map_pci_bar(struct ioat_softc *ioat); static void ioat_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static int ioat_interrupt_setup(struct ioat_softc *ioat); static void ioat_interrupt_handler(void *arg); +static boolean_t ioat_is_bdxde(struct ioat_softc *ioat); static void ioat_process_events(struct ioat_softc *ioat); static inline uint32_t ioat_get_active(struct ioat_softc *ioat); static inline uint32_t ioat_get_ring_space(struct ioat_softc *ioat); @@ -220,13 +222,15 @@ ioat_attach(device_t device) goto err; ioat->version = ioat_read_cbver(ioat); - ioat_interrupt_setup(ioat); - if (ioat->version < IOAT_VER_3_0) { error = ENODEV; goto err; } + error = ioat_setup_intr(ioat); + if (error != 0) + return (error); + error = ioat3_attach(device); if (error != 0) goto err; @@ -273,15 +277,23 @@ ioat_detach(device_t device) bus_dma_tag_destroy(ioat->hw_desc_tag); + ioat_teardown_intr(ioat); + + return (0); +} + +static int +ioat_teardown_intr(struct ioat_softc *ioat) +{ + if (ioat->tag != NULL) - bus_teardown_intr(device, ioat->res, ioat->tag); + bus_teardown_intr(ioat->device, ioat->res, ioat->tag); if (ioat->res != NULL) - bus_release_resource(device, SYS_RES_IRQ, + bus_release_resource(ioat->device, SYS_RES_IRQ, rman_get_rid(ioat->res), ioat->res); - pci_release_msi(device); - + pci_release_msi(ioat->device); return (0); } @@ -455,7 +467,7 @@ ioat_dmamap_cb(void *arg, bus_dma_segmen * Interrupt setup and handlers */ static int -ioat_interrupt_setup(struct ioat_softc *ioat) +ioat_setup_intr(struct ioat_softc *ioat) { uint32_t num_vectors; int error; @@ -498,6 +510,23 @@ ioat_interrupt_setup(struct ioat_softc * return (0); } +static boolean_t +ioat_is_bdxde(struct ioat_softc *ioat) +{ + u_int32_t pciid; + + pciid = pci_get_devid(ioat->device); + switch (pciid) { + case 0x6f508086: + case 0x6f518086: + case 0x6f528086: + case 0x6f538086: + return (TRUE); + } + + return (FALSE); +} + static void ioat_interrupt_handler(void *arg) { @@ -918,7 +947,7 @@ ioat_reset_hw(struct ioat_softc *ioat) { uint64_t status; uint32_t chanerr; - int timeout; + int timeout, error; status = ioat_get_chansts(ioat); if (is_ioat_active(status) || is_ioat_idle(status)) @@ -953,6 +982,20 @@ ioat_reset_hw(struct ioat_softc *ioat) if (timeout == 20) return (ETIMEDOUT); + /* +* BDXDE models reset MSI-X registers on device reset. We must +* teardown and re-setup interrupts. +*/ + if (ioat_is_bdxde(ioat)) { + error = ioat_teardown_intr(ioat); + if (error) + return (error); + + error = ioat_setup_intr(ioat); + if (error) + return (error); + } + return (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: r287404 - head/lib/libc/net
Author: hrs Date: Wed Sep 2 16:50:49 2015 New Revision: 287404 URL: https://svnweb.freebsd.org/changeset/base/287404 Log: - snprintf() returns at most size-1 of the chars printed into the buffer. (n == hostlen) also means the buffer length was too short. - Use sdl->sdl_data only when (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0) to prevent redundant output. Modified: head/lib/libc/net/getnameinfo.c Modified: head/lib/libc/net/getnameinfo.c == --- head/lib/libc/net/getnameinfo.c Wed Sep 2 16:48:03 2015 (r287403) +++ head/lib/libc/net/getnameinfo.c Wed Sep 2 16:50:49 2015 (r287404) @@ -394,26 +394,22 @@ getnameinfo_link(const struct sockaddr * if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) { n = snprintf(host, hostlen, "link#%d", sdl->sdl_index); - if (n > hostlen) { + if (n >= hostlen) { *host = '\0'; return (EAI_MEMORY); } return (0); } - if (sdl->sdl_nlen > 0) { - if (sdl->sdl_nlen + 1 > hostlen) { + if (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0) { + n = sdl->sdl_nlen; + if (n >= hostlen) { *host = '\0'; return (EAI_MEMORY); } memcpy(host, sdl->sdl_data, sdl->sdl_nlen); - n = sdl->sdl_nlen; - host += n; - if (sdl->sdl_alen > 0) { - *host++ = ':'; - n++; - } - hostlen -= n; + host[n] = '\0'; + return (0); } switch (sdl->sdl_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: r287405 - head/sys/geom
Author: imp Date: Wed Sep 2 17:29:30 2015 New Revision: 287405 URL: https://svnweb.freebsd.org/changeset/base/287405 Log: After the introduction of direct dispatch, the pacing code in g_down() broke in two ways. One, the pacing variable was accessed in multiple threads in an unsafe way. Two, since large numbers of I/O could come down from the buf layer at one time, large numbers of allocation failures could happen all at once, resulting in a huge pace value that would limit I/Os to 10 IOPS for minutes (or even hours) at a time. While a real solution to these problems requires substantial work (to go to a no-allocation after the first model, or to have some way to wait for more memory with some kind of reserve for pager and swapper requests), it is relatively easy to make this simplistic pacing less pathological. Move to using a volatile variable with loads and stores. While this is a little racy, losing the race is safe: either you get memory and proceed, or you don't and queue. Second, sleep for 1ms (or one tick, whichever is larger) instead of 100ms. This removes the artificial 10 IOPS limit while still easing up on new I/Os during memory shortages. Remove tying the amount of time we do this to the number of failed requests and do it only as long as we keep failing requests. Finally, to avoid needless recursion when memory is tight (start -> g_io_deliver() -> g_io_request() -> start -> ... until we use 1/2 the stack), don't do direct dispatch while pacing. This should be a rare event (not steady state) so the performance hit here is worth the extra safety of not starving g_down() with directly dispatched I/O. Differential Review: https://reviews.freebsd.org/D3546 Modified: head/sys/geom/geom_io.c Modified: head/sys/geom/geom_io.c == --- head/sys/geom/geom_io.c Wed Sep 2 16:50:49 2015(r287404) +++ head/sys/geom/geom_io.c Wed Sep 2 17:29:30 2015(r287405) @@ -71,7 +71,17 @@ static struct g_bioq g_bio_run_down; static struct g_bioq g_bio_run_up; static struct g_bioq g_bio_run_task; -static u_int pace; +/* + * Pace is a hint that we've had some trouble recently allocating + * bios, so we should back off trying to send I/O down the stack + * a bit to let the problem resolve. When pacing, we also turn + * off direct dispatch to also reduce memory pressure from I/Os + * there, at the expxense of some added latency while the memory + * pressures exist. See g_io_schedule_down() for more details + * and limitations. + */ +static volatile u_int pace; + static uma_zone_t biozone; /* @@ -521,7 +531,8 @@ g_io_request(struct bio *bp, struct g_co (pp->flags & G_PF_DIRECT_RECEIVE) != 0 && !g_is_geom_thread(curthread) && ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0 || - (bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP()); + (bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP()) && + pace == 0; if (direct) { /* Block direct execution if less then half of stack left. */ size_t st, su; @@ -688,7 +699,7 @@ g_io_deliver(struct bio *bp, int error) bp->bio_driver2 = NULL; bp->bio_pflags = 0; g_io_request(bp, cp); - pace++; + pace = 1; return; } @@ -777,10 +788,33 @@ g_io_schedule_down(struct thread *tp __u } CTR0(KTR_GEOM, "g_down has work to do"); g_bioq_unlock(&g_bio_run_down); - if (pace > 0) { - CTR1(KTR_GEOM, "g_down pacing self (pace %d)", pace); - pause("g_down", hz/10); - pace--; + if (pace != 0) { + /* +* There has been at least one memory allocation +* failure since the last I/O completed. Pause 1ms to +* give the system a chance to free up memory. We only +* do this once because a large number of allocations +* can fail in the direct dispatch case and there's no +* relationship between the number of these failures and +* the length of the outage. If there's still an outage, +* we'll pause again and again until it's +* resolved. Older versions paused longer and once per +* allocation failure. This was OK for a single threaded +* g_down, but with direct dispatch would lead to max of +* 10 IOPs for minutes at a time when transient memory +* issues prevented allocation for a batch of requests +* from the upper layers. +* +* XXX This pacing is really lam
Re: svn commit: r287403 - head/sys/dev/ioat
On Wednesday, September 02, 2015 04:48:04 PM Conrad E. Meyer wrote: > Author: cem > Date: Wed Sep 2 16:48:03 2015 > New Revision: 287403 > URL: https://svnweb.freebsd.org/changeset/base/287403 > > Log: > ioat: re-initialize interrupts after resetting hw on BDXDE > > Resetting some generations of the I/OAT hardware (just BDXDE for now) > resets the corresponding MSI-X registers. So, teardown and > re-initialize interrupts after resetting the hardware. > > Reviewed by:jimharris > Approved by:markj (mentor) > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D3549 Alternatively you could use pci_restore_state() (before reset) and pci_save_state() (after reset) to restore standard PCI config registers (including MSI/MSI-X) after a reset. This might be more scalable if you want to ensure other PCI config registers (e.g. PCI-e capabilities) are restored after a reset. -- 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: r287406 - head/usr.bin/netstat
Author: hrs Date: Wed Sep 2 18:42:35 2015 New Revision: 287406 URL: https://svnweb.freebsd.org/changeset/base/287406 Log: Divide statistics in the number of packets with 1000 instead of 1024 in human-readable form. PR: 183598 Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c == --- head/usr.bin/netstat/if.c Wed Sep 2 17:29:30 2015(r287405) +++ head/usr.bin/netstat/if.c Wed Sep 2 18:42:35 2015(r287406) @@ -201,7 +201,7 @@ pfsync_stats(u_long off, const char *nam */ static void show_stat(const char *fmt, int width, const char *name, -u_long value, short showvalue) +u_long value, short showvalue, int div1000) { const char *lsep, *rsep; char newfmt[64]; @@ -238,7 +238,8 @@ show_stat(const char *fmt, int width, co /* Format in human readable form. */ humanize_number(buf, sizeof(buf), (int64_t)value, "", - HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL); + HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL | \ + ((div1000) ? HN_DIVISOR_1000 : 0)); maybe_pad(lsep); snprintf(newfmt, sizeof(newfmt), "{:%s/%%%ds}", name, width); xo_emit(newfmt, buf); @@ -353,7 +354,7 @@ intpr(void (*pfunc)(char *), int af) name, ifa->ifa_flags, xname); #define IFA_MTU(ifa) (((struct if_data *)(ifa)->ifa_data)->ifi_mtu) - show_stat("lu", 6, "mtu", IFA_MTU(ifa), IFA_MTU(ifa)); + show_stat("lu", 6, "mtu", IFA_MTU(ifa), IFA_MTU(ifa), 0); #undef IFA_MTU switch (ifa->ifa_addr->sa_family) { @@ -416,22 +417,25 @@ intpr(void (*pfunc)(char *), int af) #defineIFA_STAT(s) (((struct if_data *)ifa->ifa_data)->ifi_ ## s) show_stat("lu", 8, "received-packets", IFA_STAT(ipackets), - link|network); - show_stat("lu", 5, "received-errors", IFA_STAT(ierrors), link); - show_stat("lu", 5, "dropped-packets", IFA_STAT(iqdrops), link); + link|network, 1); + show_stat("lu", 5, "received-errors", IFA_STAT(ierrors), + link, 1); + show_stat("lu", 5, "dropped-packets", IFA_STAT(iqdrops), + link, 1); if (bflag) show_stat("lu", 10, "received-bytes", IFA_STAT(ibytes), - link|network); + link|network, 0); show_stat("lu", 8, "sent-packets", IFA_STAT(opackets), - link|network); - show_stat("lu", 5, "send-errors", IFA_STAT(oerrors), link); + link|network, 1); + show_stat("lu", 5, "send-errors", IFA_STAT(oerrors), link, 1); if (bflag) show_stat("lu", 10, "sent-bytes", IFA_STAT(obytes), - link|network); - show_stat("NRSlu", 5, "collisions", IFA_STAT(collisions), link); + link|network, 0); + show_stat("NRSlu", 5, "collisions", IFA_STAT(collisions), + link, 1); if (dflag) show_stat("LSlu", 5, "dropped-packets", - IFA_STAT(oqdrops), link); + IFA_STAT(oqdrops), link, 1); xo_emit("\n"); if (!aflag) { @@ -616,24 +620,24 @@ loop: xo_open_instance("stats"); show_stat("lu", 10, "received-packets", - new->ift_ip - old->ift_ip, 1); + new->ift_ip - old->ift_ip, 1, 1); show_stat("lu", 5, "received-errors", - new->ift_ie - old->ift_ie, 1); + new->ift_ie - old->ift_ie, 1, 1); show_stat("lu", 5, "dropped-packets", - new->ift_id - old->ift_id, 1); + new->ift_id - old->ift_id, 1, 1); show_stat("lu", 10, "received-bytes", - new->ift_ib - old->ift_ib, 1); + new->ift_ib - old->ift_ib, 1, 0); show_stat("lu", 10, "sent-packets", - new->ift_op - old->ift_op, 1); + new->ift_op - old->ift_op, 1, 1); show_stat("lu", 5, "send-errors", - new->ift_oe - old->ift_oe, 1); + new->ift_oe - old->ift_oe, 1, 1); show_stat("lu", 10, "sent-bytes", - new->ift_ob - old->ift_ob, 1); + new->ift_ob - old->ift_ob, 1, 0); show_stat("NRSlu", 5, "collisions", - new->ift_co - old->ift_co, 1); + new->ift_co - old->ift_co, 1, 1); if (dflag) show_stat("LSlu", 5, "dropped-packets", - new->ift_od - old->ift_od, 1); + new->ift_od - old->ift_od, 1, 1); xo_close_instance("stats"); xo_emit("\n"); xo_flush(); ___ svn-src-head@freebsd.org m
svn commit: r287407 - head/usr.bin/netstat
Author: hrs Date: Wed Sep 2 18:51:36 2015 New Revision: 287407 URL: https://svnweb.freebsd.org/changeset/base/287407 Log: Simplify kvm symbol resolution and error handling. The symbol table nl_symbols will eventually be organized into several modules depending on MK_* variables. Added: head/usr.bin/netstat/nlist_symbols (contents, props changed) Modified: head/usr.bin/netstat/Makefile head/usr.bin/netstat/main.c head/usr.bin/netstat/mroute.c head/usr.bin/netstat/netgraph.c head/usr.bin/netstat/netisr.c head/usr.bin/netstat/netstat.h head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/Makefile == --- head/usr.bin/netstat/Makefile Wed Sep 2 18:42:35 2015 (r287406) +++ head/usr.bin/netstat/Makefile Wed Sep 2 18:51:36 2015 (r287407) @@ -4,9 +4,32 @@ .include PROG= netstat -SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \ +SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \ unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \ flowtable.c +DPSRCS=nl_defs.h + +nl_symbols.c: nlist_symbols + awk '\ + BEGIN { \ + print "#include "; \ + print "#include "; \ + print "struct nlist nl[] = {"; \ + } \ + !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \ + END { print "\t{ .n_name = NULL },\n};" } \ + ' < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET} +nl_defs.h: nlist_symbols + awk '\ + BEGIN { \ + print "#include "; \ + print "extern struct nlist nl[];"; \ + i = 0; \ + } \ + !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \ + < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET} +CLEANFILES+= nl_symbols.c nl_defs.h +CFLAGS+= -I${.OBJDIR} WARNS?=3 CFLAGS+=-fno-strict-aliasing Modified: head/usr.bin/netstat/main.c == --- head/usr.bin/netstat/main.c Wed Sep 2 18:42:35 2015(r287406) +++ head/usr.bin/netstat/main.c Wed Sep 2 18:51:36 2015(r287407) @@ -28,7 +28,7 @@ */ #ifndef lint -char const copyright[] = +static char const copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -69,95 +69,10 @@ __FBSDID("$FreeBSD$"); #include #include #include "netstat.h" +#include "nl_defs.h" #include -static struct nlist nl[] = { -#defineN_RTSTAT0 - { .n_name = "_rtstat" }, -#defineN_RTREE 1 - { .n_name = "_rt_tables"}, -#defineN_MRTSTAT 2 - { .n_name = "_mrtstat" }, -#defineN_MFCHASHTBL3 - { .n_name = "_mfchashtbl" }, -#defineN_VIFTABLE 4 - { .n_name = "_viftable" }, -#defineN_NGSOCKS 5 - { .n_name = "_ngsocklist"}, -#defineN_IP6STAT 6 - { .n_name = "_ip6stat" }, -#defineN_ICMP6STAT 7 - { .n_name = "_icmp6stat" }, -#defineN_IPSECSTAT 8 - { .n_name = "_ipsec4stat" }, -#defineN_IPSEC6STAT9 - { .n_name = "_ipsec6stat" }, -#defineN_PIM6STAT 10 - { .n_name = "_pim6stat" }, -#defineN_MRT6STAT 11 - { .n_name = "_mrt6stat" }, -#defineN_MF6CTABLE 12 - { .n_name = "_mf6ctable" }, -#defineN_MIF6TABLE 13 - { .n_name = "_mif6table" }, -#defineN_PFKEYSTAT 14 - { .n_name = "_pfkeystat" }, -#defineN_RTTRASH 15 - { .n_name = "_rttrash" }, -#defineN_CARPSTAT 16 - { .n_name = "_carpstats" }, -#defineN_PFSYNCSTAT17 - { .n_name = "_pfsyncstats" }, -#defineN_AHSTAT18 - { .n_name = "_ahstat" }, -#defineN_ESPSTAT 19 - { .n_name = "_espstat" }, -#defineN_IPCOMPSTAT20 - { .n_name = "_ipcompstat" }, -#defineN_TCPSTAT 21 - { .n_name = "_tcpstat" }, -#defineN_UDPSTAT 22 - { .n_name = "_udpstat" }, -#defineN_IPSTAT23 - { .n_name = "_ipstat" }, -#defineN_ICMPSTAT 24 - { .n_name = "_icmpstat" }, -#defineN_IGMPSTAT 25 - { .n_name = "_igmpstat" }, -#defineN_PIMSTAT 26 - { .n_name = "_pimstat" }, -#defineN_TCBINFO 27 - { .n_name = "_tcbinfo" }, -#defineN_UDBINFO 28 - { .n_name = "_udbinfo" }, -#defineN_DIVCBINFO 29 - { .n_name = "_divcbinfo" }, -#defineN_RIPCBINFO 30 - { .n_name = "_ripcbinfo" }, -#defineN_UNP_COUNT 31 - { .n_name = "_unp_count" }, -#defineN_UNP_GENCNT32 - { .n_name = "_unp_gencnt" }, -#defineN_UNP_DHEAD 33
Re: svn commit: r287403 - head/sys/dev/ioat
On Wed, Sep 2, 2015 at 10:26 AM, John Baldwin wrote: > Alternatively you could use pci_restore_state() (before reset) and > pci_save_state() (after reset) to restore standard PCI config registers > (including MSI/MSI-X) after a reset. > > This might be more scalable if you want to ensure other PCI config > registers (e.g. PCI-e capabilities) are restored after a reset. Hi John, Do you mean pci_save_state() before reset and pci_restore_state() afterwards? Seems reasonable to me. Thanks, 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: r287408 - in head/bin/sh: . tests/parser
Author: jilles Date: Wed Sep 2 19:49:55 2015 New Revision: 287408 URL: https://svnweb.freebsd.org/changeset/base/287408 Log: sh: Allow empty << EOF markers. Added: head/bin/sh/tests/parser/heredoc13.0 (contents, props changed) Modified: head/bin/sh/parser.c head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/parser.c == --- head/bin/sh/parser.cWed Sep 2 18:51:36 2015(r287407) +++ head/bin/sh/parser.cWed Sep 2 19:49:55 2015(r287408) @@ -106,6 +106,8 @@ static int startlinno; /* line # where static int funclinno; /* line # where the current function started */ static struct parser_temp *parser_temp; +#define NOEOFMARK ((const char *)&heredoclist) + static union node *list(int); static union node *andor(void); @@ -972,6 +974,10 @@ checkend(int c, const char *eofmark, int pungetc(); pushstring(eofmark + 1, q - (eofmark + 1), NULL); } + } else if (c == '\n' && *eofmark == '\0') { + c = PEOF; + plinno++; + needprompt = doprompt; } return (c); } @@ -1383,7 +1389,7 @@ readtoken1(int firstc, char const *initi STARTSTACKSTR(out); loop: { /* for each line, until end of word */ - if (eofmark) + if (eofmark && eofmark != NOEOFMARK) /* set c to PEOF if at end of here document */ c = checkend(c, eofmark, striptabs); for (;;) { /* until end of line or end of word */ @@ -2046,7 +2052,7 @@ expandstr(const char *ps) parser_temp = NULL; setinputstring(ps, 1); doprompt = 0; - readtoken1(pgetc(), DQSYNTAX, "", 0); + readtoken1(pgetc(), DQSYNTAX, NOEOFMARK, 0); if (backquotelist != NULL) error("Command substitution not allowed here"); Modified: head/bin/sh/tests/parser/Makefile == --- head/bin/sh/tests/parser/Makefile Wed Sep 2 18:51:36 2015 (r287407) +++ head/bin/sh/tests/parser/Makefile Wed Sep 2 19:49:55 2015 (r287408) @@ -57,6 +57,7 @@ FILES+= heredoc9.0 FILES+=heredoc10.0 FILES+=heredoc11.0 FILES+=heredoc12.0 +FILES+=heredoc13.0 FILES+=line-cont1.0 FILES+=line-cont2.0 FILES+=line-cont3.0 Added: head/bin/sh/tests/parser/heredoc13.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/heredoc13.0Wed Sep 2 19:49:55 2015 (r287408) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(cat <<"" + +echo yes)" = "yes"' + +check '"$(cat <<"" +yes + +)" = "yes"' + +exit $((failures != 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"
Re: svn commit: r287403 - head/sys/dev/ioat
https://reviews.freebsd.org/D3552 On Wed, Sep 2, 2015 at 12:15 PM, Conrad Meyer wrote: > On Wed, Sep 2, 2015 at 10:26 AM, John Baldwin wrote: >> Alternatively you could use pci_restore_state() (before reset) and >> pci_save_state() (after reset) to restore standard PCI config registers >> (including MSI/MSI-X) after a reset. >> >> This might be more scalable if you want to ensure other PCI config >> registers (e.g. PCI-e capabilities) are restored after a reset. > > > Hi John, > > Do you mean pci_save_state() before reset and pci_restore_state() > afterwards? Seems reasonable to me. > > Thanks, > 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"
Re: svn commit: r284598 - head/share/mk
Bryan Drewery wrote: > My concern is that checked in 'local' files should not be changed by > FreeBSD. I should not have to fight conflicts of _my customizations_ > against _FreeBSD customizations (against bmake upstream)_. There is so > much logic in these local.* files, they seem more aptly named > 'freebsd.*' as they seem to be intended to be customizations for > FreeBSD, rather than optional customizations for a developer or other > downstream consumer of FreeBSD. Yes that's true though src.* is what freebsd is using afaik It will take some time - to optimize this, cleanly separating infrastructure from freebsd specifics. It is not unreasonable for some logic to exist in the checked in local.*.mk to serve as examples. FWIW in re-working our internal build to accommodate what is now in FreeBSD, we now have many of the local.*.mk's include a juniper.*.mk to hold our local customizations with minimal risk of conflicts ___ 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: r287413 - head/usr.sbin/sysrc
Author: dteske Date: Wed Sep 2 21:53:48 2015 New Revision: 287413 URL: https://svnweb.freebsd.org/changeset/base/287413 Log: Minor code cleanups (no functional changes). MFC after:3 days X-MFC-to: stable/10 Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc == --- head/usr.sbin/sysrc/sysrc Wed Sep 2 21:13:06 2015(r287412) +++ head/usr.sbin/sysrc/sysrc Wed Sep 2 21:53:48 2015(r287413) @@ -257,14 +257,14 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag F) SHOW_FILE=1 ;; h) usage ;; # NOTREACHED i) IGNORE_UNKNOWNS=1 ;; - j) [ "$OPTARG" ] || die \ - "%s: Missing or null argument to \`-j' flag" "$pgm" + j) [ "$OPTARG" ] || + die "%s: Missing or null argument to \`-j' flag" "$pgm" JAIL="$OPTARG" ;; n) SHOW_NAME= ;; N) SHOW_VALUE= ;; q) QUIET=1 VERBOSE= ;; - R) [ "$OPTARG" ] || die \ - "%s: Missing or null argument to \`-R' flag" "$pgm" + R) [ "$OPTARG" ] || + die "%s: Missing or null argument to \`-R' flag" "$pgm" ROOTDIR="$OPTARG" ;; v) VERBOSE=1 QUIET= ;; x) DELETE=${DELETE:-1} ;; @@ -384,13 +384,12 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then # jls(1) or jexec(8) utilities are missing. # if f_have jexec && f_have jls; then - jid="`jls jid path | \ - ( + jid=$( jls jid path | while read JID JROOT; do [ "$JROOT" = "$ROOTDIR" ] || continue echo $JID done - )`" + ) # # If multiple running jails match the specified root @@ -472,8 +471,8 @@ if [ "$SHOW_ALL" ]; then # If passed `-a' (rather than `-A'), re-purge the # environment, removing the rc.conf(5) defaults. # - [ "$SHOW_ALL" = "1" ] \ - && f_clean_env --except rc_conf_files $EXCEPT + [ "$SHOW_ALL" = "1" ] && + f_clean_env --except rc_conf_files $EXCEPT # # If `-f file' was passed, set $rc_conf_files to an @@ -491,8 +490,7 @@ if [ "$SHOW_ALL" ]; then # [ "$SHOW_ALL" = "1" -a \ "$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \ - ] \ - && unset rc_conf_files + ] && unset rc_conf_files fi for NAME in $( set | @@ -524,7 +522,7 @@ if [ "$SHOW_ALL" ]; then continue fi - [ "$VERBOSE" ] && \ + [ "$VERBOSE" ] && echo -n "$( f_sysrc_find "$NAME" ): " # @@ -560,7 +558,7 @@ while [ $# -gt 0 ]; do *) mode=ASSIGN esac - [ "$DESCRIBE" ] && \ + [ "$DESCRIBE" ] && echo "$NAME: $( f_sysrc_desc "$NAME" )" case "$1" in @@ -573,7 +571,7 @@ while [ $# -gt 0 ]; do # If verbose, prefix line with where the directive lives if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) - [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ + [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) if [ "$SHOW_EQUALS" ]; then echo -n ": $file; " ___ 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"
Notice to appear in Court #000560940
Notice to Appear, You have to appear in the Court on the September 10. Please, prepare all the documents relating to the case and bring them to Court on the specified date. Note: The case will be heard by the judge in your absence if you do not come. You can find the Court Notice is in the attachment. Kind regards, Leonard Lamb, District Clerk. ___ 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: r287414 - head/sys/dev/ioat
Author: cem Date: Wed Sep 2 22:48:41 2015 New Revision: 287414 URL: https://svnweb.freebsd.org/changeset/base/287414 Log: ioat(4): pci_save/restore_state to persist MSI-X registers over BDXDE reset Also for BWD devices, per jimharris@. Reviewed by: jhb Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D3552 Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cWed Sep 2 21:53:48 2015(r287413) +++ head/sys/dev/ioat/ioat.cWed Sep 2 22:48:41 2015(r287414) @@ -60,7 +60,7 @@ static int ioat_map_pci_bar(struct ioat_ static void ioat_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); static void ioat_interrupt_handler(void *arg); -static boolean_t ioat_is_bdxde(struct ioat_softc *ioat); +static boolean_t ioat_model_resets_msix(struct ioat_softc *ioat); static void ioat_process_events(struct ioat_softc *ioat); static inline uint32_t ioat_get_active(struct ioat_softc *ioat); static inline uint32_t ioat_get_ring_space(struct ioat_softc *ioat); @@ -511,12 +511,18 @@ ioat_setup_intr(struct ioat_softc *ioat) } static boolean_t -ioat_is_bdxde(struct ioat_softc *ioat) +ioat_model_resets_msix(struct ioat_softc *ioat) { u_int32_t pciid; pciid = pci_get_devid(ioat->device); switch (pciid) { + /* BWD: */ + case 0x0c508086: + case 0x0c518086: + case 0x0c528086: + case 0x0c538086: + /* BDXDE: */ case 0x6f508086: case 0x6f518086: case 0x6f528086: @@ -947,7 +953,7 @@ ioat_reset_hw(struct ioat_softc *ioat) { uint64_t status; uint32_t chanerr; - int timeout, error; + int timeout; status = ioat_get_chansts(ioat); if (is_ioat_active(status) || is_ioat_idle(status)) @@ -974,6 +980,13 @@ ioat_reset_hw(struct ioat_softc *ioat) chanerr = pci_read_config(ioat->device, IOAT_CFG_CHANERR_INT_OFFSET, 4); pci_write_config(ioat->device, IOAT_CFG_CHANERR_INT_OFFSET, chanerr, 4); + /* +* BDXDE and BWD models reset MSI-X registers on device reset. +* Save/restore their contents manually. +*/ + if (ioat_model_resets_msix(ioat)) + pci_save_state(ioat->device); + ioat_reset(ioat); /* Wait at most 20 ms */ @@ -982,19 +995,8 @@ ioat_reset_hw(struct ioat_softc *ioat) if (timeout == 20) return (ETIMEDOUT); - /* -* BDXDE models reset MSI-X registers on device reset. We must -* teardown and re-setup interrupts. -*/ - if (ioat_is_bdxde(ioat)) { - error = ioat_teardown_intr(ioat); - if (error) - return (error); - - error = ioat_setup_intr(ioat); - if (error) - return (error); - } + if (ioat_model_resets_msix(ioat)) + pci_restore_state(ioat->device); return (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: r287415 - head/sys/vm
Author: mjg Date: Wed Sep 2 23:09:01 2015 New Revision: 287415 URL: https://svnweb.freebsd.org/changeset/base/287415 Log: Don't trash memory from UMA_ZONE_NOFREE zones. Objects obtained from such zones are supposed to retain type stability, which was violated by aforementioned trashing. This is a follow-up to r284861. Discussed with: kib Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Wed Sep 2 22:48:41 2015(r287414) +++ head/sys/vm/uma_core.c Wed Sep 2 23:09:01 2015(r287415) @@ -1946,8 +1946,8 @@ uma_zcreate(const char *name, size_t siz * destructor, pass UMA constructor/destructor which checks for * memory use after free. */ - if ((!(flags & UMA_ZONE_ZINIT)) && ctor == NULL && dtor == NULL && - uminit == NULL && fini == NULL) { + if ((!(flags & (UMA_ZONE_ZINIT | UMA_ZONE_NOFREE))) && + ctor == NULL && dtor == NULL && uminit == NULL && fini == NULL) { args.ctor = trash_ctor; args.dtor = trash_dtor; args.uminit = trash_init; ___ 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: r287416 - head/sys/kern
Author: mjg Date: Wed Sep 2 23:14:39 2015 New Revision: 287416 URL: https://svnweb.freebsd.org/changeset/base/287416 Log: fd: remove UMA_ZONE_ZINIT argument from Files zone Originally it was added in order to prevent trashing of objects with INVARIANTS enabled. The same effect is now provided with mere UMA_ZONE_NOFREE. This reverts r286921. Discussed with: kib Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cWed Sep 2 23:09:01 2015 (r287415) +++ head/sys/kern/kern_descrip.cWed Sep 2 23:14:39 2015 (r287416) @@ -3833,7 +3833,7 @@ filelistinit(void *dummy) { file_zone = uma_zcreate("Files", sizeof(struct file), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_ZINIT); + NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); filedesc0_zone = uma_zcreate("filedesc0", sizeof(struct filedesc0), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); mtx_init(&sigio_lock, "sigio lock", NULL, MTX_DEF); ___ 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: r287417 - head/usr.sbin/makefs
Author: delphij Date: Thu Sep 3 01:15:23 2015 New Revision: 287417 URL: https://svnweb.freebsd.org/changeset/base/287417 Log: Don't leak 'var'. Reported by: clang static analyzer Modified: head/usr.sbin/makefs/mtree.c Modified: head/usr.sbin/makefs/mtree.c == --- head/usr.sbin/makefs/mtree.cWed Sep 2 23:14:39 2015 (r287416) +++ head/usr.sbin/makefs/mtree.cThu Sep 3 01:15:23 2015 (r287417) @@ -181,7 +181,7 @@ static char * mtree_resolve(const char *spec, int *istemp) { struct sbuf *sb; - char *res, *var; + char *res, *var = NULL; const char *base, *p, *v; size_t len; int c, error, quoted, subst; @@ -284,8 +284,10 @@ mtree_resolve(const char *spec, int *ist free(res); } free(var); + var = NULL; } + free(var); sbuf_finish(sb); res = (error == 0) ? strdup(sbuf_data(sb)) : NULL; sbuf_delete(sb); ___ 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: r287418 - in head/sys/powerpc: include powerpc
Author: jhibbits Date: Thu Sep 3 01:38:15 2015 New Revision: 287418 URL: https://svnweb.freebsd.org/changeset/base/287418 Log: pmap_mapdev_attr() also takes a vm_paddr_t. This was missed in r235936. With recent work for 36-bit paddr, this is now needed. Modified: head/sys/powerpc/include/pmap.h head/sys/powerpc/powerpc/pmap_dispatch.c Modified: head/sys/powerpc/include/pmap.h == --- head/sys/powerpc/include/pmap.h Thu Sep 3 01:15:23 2015 (r287417) +++ head/sys/powerpc/include/pmap.h Thu Sep 3 01:38:15 2015 (r287418) @@ -235,7 +235,7 @@ voidpmap_kenter(vm_offset_t va, vm_pad void pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_paddr_t, vm_size_t); -void *pmap_mapdev_attr(vm_offset_t, vm_size_t, vm_memattr_t); +void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, vm_memattr_t); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_page_set_memattr(vm_page_t, vm_memattr_t); void pmap_deactivate(struct thread *); Modified: head/sys/powerpc/powerpc/pmap_dispatch.c == --- head/sys/powerpc/powerpc/pmap_dispatch.cThu Sep 3 01:15:23 2015 (r287417) +++ head/sys/powerpc/powerpc/pmap_dispatch.cThu Sep 3 01:38:15 2015 (r287418) @@ -463,7 +463,7 @@ pmap_mapdev(vm_paddr_t pa, vm_size_t siz } void * -pmap_mapdev_attr(vm_offset_t pa, vm_size_t size, vm_memattr_t attr) +pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, vm_memattr_t attr) { CTR4(KTR_PMAP, "%s(%#x, %#x, %#x)", __func__, pa, size, attr); ___ 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: r287419 - head/sys/boot/fdt/dts/arm
Author: gonzo Date: Thu Sep 3 02:28:18 2015 New Revision: 287419 URL: https://svnweb.freebsd.org/changeset/base/287419 Log: Enable both i2c1 and i2c2. These devices are disabled in TI's DTS so they were disabled during DTS transition. Though there are no standard devices/drivers on them people might use iic(4) userland interface to access these buses. Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts == --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Sep 3 01:38:15 2015(r287418) +++ head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Sep 3 02:28:18 2015(r287419) @@ -30,6 +30,22 @@ #include "am335x-boneblack.dts" #include "beaglebone-common.dtsi" +&am33xx_pinmux { + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + 0x158 (PIN_INPUT_PULLUP | MUX_MODE2)/* spi0_d1.i2c1_sda */ + 0x15c (PIN_INPUT_PULLUP | MUX_MODE2)/* spi0_cs0.i2c1_scl */ + >; + }; + + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + 0x178 (PIN_INPUT_PULLUP | MUX_MODE3)/* uart1_ctsn.i2c2_sda */ + 0x17c (PIN_INPUT_PULLUP | MUX_MODE3)/* uart1_rtsn.i2c2_scl */ + >; + }; +}; + &i2c0 { tda998x: hdmi-encoder { compatible = "nxp,tda998x"; @@ -42,6 +58,20 @@ }; }; +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + status = "okay"; +}; + &lcdc { hdmi = <&tda998x>; }; ___ 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: r287420 - head/usr.sbin/sysrc
Author: dteske Date: Thu Sep 3 03:29:44 2015 New Revision: 287420 URL: https://svnweb.freebsd.org/changeset/base/287420 Log: Remove non-functional examples. MFC after:3 days X-MFC-to: stable/10 Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 == --- head/usr.sbin/sysrc/sysrc.8 Thu Sep 3 02:28:18 2015(r287419) +++ head/usr.sbin/sysrc/sysrc.8 Thu Sep 3 03:29:44 2015(r287420) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2015 +.Dd September 2, 2015 .Dt SYSRC 8 .Os .Sh NAME @@ -394,27 +394,6 @@ usbd_flags-"default" .Nm cloned_interfaces+"alternate" .Dl returns "alternate" if $cloned_interfaces is set . -.Pp -.Nm -\&'#kern_securelevel' -.Dl returns length in characters of $kern_securelevel . -.Pp -.Nm -\&'hostname?' -.Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . -.Pp -.Nm -\&'hostname:?' -.Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . -.Sh LIMITATIONS -The -.Nm -utility presently does not support the -.Ql rc.conf.d -collection of system configuration files -.Pq which requires a service name to be known during execution . -.Pp -This will be corrected by a future enhancement. .Sh SEE ALSO .Xr jls 1 , .Xr rc.conf 5 , ___ 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: r287421 - head/usr.sbin/sysrc
Author: dteske Date: Thu Sep 3 03:58:59 2015 New Revision: 287421 URL: https://svnweb.freebsd.org/changeset/base/287421 Log: Fix mandoc(1) "WARNING: end of line whitespace" MFC after:3 days X-MFC-to: stable/10 Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 == --- head/usr.sbin/sysrc/sysrc.8 Thu Sep 3 03:29:44 2015(r287420) +++ head/usr.sbin/sysrc/sysrc.8 Thu Sep 3 03:58:59 2015(r287421) @@ -199,8 +199,8 @@ syntax to add items to existing values, the first character of the value is taken as the delimiter separating items .Pq usually Qo \ Qc or Qo , Qc . For example, in the following statement: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces+=" gif0" .El @@ -223,25 +223,25 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces+=gif0 .El .Pp Take the following sequence for example: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces= # start with NULL -.It \ +.It .Nm cloned_interfaces+=gif0 .Dl # NULL -> `gif0' Pq NB: no preceding delimiter -.It \ +.It .Nm cloned_interfaces+=gif0 # no change -.It \ +.It .Nm cloned_interfaces+="tun0 gif0" .Dl # `gif0' -> `gif0 tun0' Pq NB: no duplication @@ -277,21 +277,21 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces-=gif0 .El .Pp Take the following sequence for example: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm foo="bar baz" # start -.It \ +.It .Nm foo-=bar # `bar baz' -> `baz' -.It \ +.It .Nm foo-=baz # `baz' -> NULL .El ___ 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: r287422 - head/sys/boot/efi/loader/arch/amd64
Author: marcel Date: Thu Sep 3 04:35:17 2015 New Revision: 287422 URL: https://svnweb.freebsd.org/changeset/base/287422 Log: For UGA, the frame buffer address obtained by scanning the PCI BARs does not necessarily correspond to the upper-left most pixel. Scan the frame buffer for which byte changed when changing the pixel at (0,0). Use the same technique to determine the stride. Except for changing the pixel at (0,0), we change the pixel at (0,1). PR: 202730 Tested by:hartzell (at) alerce.com Modified: head/sys/boot/efi/loader/arch/amd64/framebuffer.c Modified: head/sys/boot/efi/loader/arch/amd64/framebuffer.c == --- head/sys/boot/efi/loader/arch/amd64/framebuffer.c Thu Sep 3 03:58:59 2015(r287421) +++ head/sys/boot/efi/loader/arch/amd64/framebuffer.c Thu Sep 3 04:35:17 2015(r287422) @@ -43,6 +43,21 @@ static EFI_GUID gop_guid = EFI_GRAPHICS_ static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID; static EFI_GUID uga_guid = EFI_UGA_DRAW_PROTOCOL_GUID; +static u_int +efifb_color_depth(struct efi_fb *efifb) +{ + uint32_t mask; + u_int depth; + + mask = efifb->fb_mask_red | efifb->fb_mask_green | + efifb->fb_mask_blue | efifb->fb_mask_reserved; + if (mask == 0) + return (0); + for (depth = 1; mask != 1; depth++) + mask >>= 1; + return (depth); +} + static int efifb_mask_from_pixfmt(struct efi_fb *efifb, EFI_GRAPHICS_PIXEL_FORMAT pixfmt, EFI_PIXEL_BITMASK *pixinfo) @@ -92,83 +107,198 @@ efifb_from_gop(struct efi_fb *efifb, EFI return (result); } -static int -efifb_from_uga(struct efi_fb *efifb, EFI_UGA_DRAW_PROTOCOL *uga) +static ssize_t +efifb_uga_find_pixel(EFI_UGA_DRAW_PROTOCOL *uga, u_int line, +EFI_PCI_IO_PROTOCOL *pciio, uint64_t addr, uint64_t size) +{ + EFI_UGA_PIXEL pix0, pix1; + uint8_t *data1, *data2; + size_t count, maxcount = 1024; + ssize_t ofs; + EFI_STATUS status; + u_int idx; + + status = uga->Blt(uga, &pix0, EfiUgaVideoToBltBuffer, + 0, line, 0, 0, 1, 1, 0); + if (EFI_ERROR(status)) { + printf("UGA BLT operation failed (video->buffer)"); + return (-1); + } + pix1.Red = ~pix0.Red; + pix1.Green = ~pix0.Green; + pix1.Blue = ~pix0.Blue; + pix1.Reserved = 0; + + data1 = calloc(maxcount, 2); + if (data1 == NULL) { + printf("Unable to allocate memory"); + return (-1); + } + data2 = data1 + maxcount; + + ofs = 0; + while (size > 0) { + count = min(size, maxcount); + + status = pciio->Mem.Read(pciio, EfiPciIoWidthUint32, + EFI_PCI_IO_PASS_THROUGH_BAR, addr + ofs, count >> 2, + data1); + if (EFI_ERROR(status)) { + printf("Error reading frame buffer (before)"); + goto fail; + } + status = uga->Blt(uga, &pix1, EfiUgaBltBufferToVideo, + 0, 0, 0, line, 1, 1, 0); + if (EFI_ERROR(status)) { + printf("UGA BLT operation failed (modify)"); + goto fail; + } + status = pciio->Mem.Read(pciio, EfiPciIoWidthUint32, + EFI_PCI_IO_PASS_THROUGH_BAR, addr + ofs, count >> 2, + data2); + if (EFI_ERROR(status)) { + printf("Error reading frame buffer (after)"); + goto fail; + } + status = uga->Blt(uga, &pix0, EfiUgaBltBufferToVideo, + 0, 0, 0, line, 1, 1, 0); + if (EFI_ERROR(status)) { + printf("UGA BLT operation failed (restore)"); + goto fail; + } + for (idx = 0; idx < count; idx++) { + if (data1[idx] != data2[idx]) { + free(data1); + return (ofs + (idx & ~3)); + } + } + ofs += count; + size -= count; + } + printf("Couldn't find the pixel"); + + fail: + printf(" -- error %lu\n", status & ~EFI_ERROR_MASK); + free(data1); + return (-1); +} + +static EFI_STATUS +efifb_uga_detect_framebuffer(EFI_UGA_DRAW_PROTOCOL *uga, +EFI_PCI_IO_PROTOCOL **pciiop, uint64_t *addrp, uint64_t *sizep) { - uint8_t *buf; EFI_PCI_IO_PROTOCOL *pciio; - EFI_HANDLE handle; + EFI_HANDLE *buf, *hp; + uint8_t *resattr; + uint64_t a, addr, s, size; + ssize_t ofs; EFI_STATUS status; - UINTN bufofs, bufsz; - uint64_t address, length; - uint32_t horiz, vert, depth, refresh; + UINTN bufsz; u_int bar; - statu
svn commit: r287423 - head/sys/dev/virtio/network
Author: araujo Date: Thu Sep 3 06:53:17 2015 New Revision: 287423 URL: https://svnweb.freebsd.org/changeset/base/287423 Log: Lower the compiler warning: unused-but-set-variable. Approved by: bapt (mentor) Differential Revision:D3556 Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c == --- head/sys/dev/virtio/network/if_vtnet.c Thu Sep 3 04:35:17 2015 (r287422) +++ head/sys/dev/virtio/network/if_vtnet.c Thu Sep 3 06:53:17 2015 (r287423) @@ -1642,14 +1642,12 @@ static int vtnet_rxq_merged_eof(struct vtnet_rxq *rxq, struct mbuf *m_head, int nbufs) { struct vtnet_softc *sc; - struct ifnet *ifp; struct virtqueue *vq; struct mbuf *m, *m_tail; int len; sc = rxq->vtnrx_sc; vq = rxq->vtnrx_vq; - ifp = sc->vtnet_ifp; m_tail = m_head; while (--nbufs > 0) { @@ -3645,10 +3643,8 @@ vtnet_set_rx_process_limit(struct vtnet_ static void vtnet_set_tx_intr_threshold(struct vtnet_softc *sc) { - device_t dev; int size, thresh; - dev = sc->vtnet_dev; size = virtqueue_size(sc->vtnet_txqs[0].vtntx_vq); /* ___ 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"