svn commit: r200210 - stable/8/share/man/man4
Author: brueffer Date: Mon Dec 7 08:36:49 2009 New Revision: 200210 URL: http://svn.freebsd.org/changeset/base/200210 Log: MFC: r197900 Improved one-line description of this module (taken from NOTES). Modified: stable/8/share/man/man4/lindev.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/lindev.4 == --- stable/8/share/man/man4/lindev.4Mon Dec 7 07:41:29 2009 (r200209) +++ stable/8/share/man/man4/lindev.4Mon Dec 7 08:36:49 2009 (r200210) @@ -30,7 +30,7 @@ .Os .Sh NAME .Nm lindev -.Nd the lindev module +.Nd Linux-specific pseudo devices support .Sh SYNOPSIS To compile this collection of linux-specific pseudo devices into the kernel, place the following line in your kernel configuration file: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200211 - stable/8/lib/libc/stdio
Author: brueffer Date: Mon Dec 7 08:38:44 2009 New Revision: 200211 URL: http://svn.freebsd.org/changeset/base/200211 Log: MFC: r200019 Fix the dprintf() prototype. Modified: stable/8/lib/libc/stdio/printf.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdio/printf.3 == --- stable/8/lib/libc/stdio/printf.3Mon Dec 7 08:36:49 2009 (r200210) +++ stable/8/lib/libc/stdio/printf.3Mon Dec 7 08:38:44 2009 (r200211) @@ -32,7 +32,7 @@ .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 3, 2009 +.Dd December 2, 2009 .Dt PRINTF 3 .Os .Sh NAME @@ -55,7 +55,7 @@ .Ft int .Fn asprintf "char **ret" "const char *format" ... .Ft int -.Fn dprintf "int" "const char * restrict format" ... +.Fn dprintf "int fd" "const char * restrict format" ... .In stdarg.h .Ft int .Fn vprintf "const char * restrict format" "va_list ap" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200157 - head/bin/date
On Mon, Dec 07, 2009 at 06:57:52AM +0100, Ed Schouten wrote: > * Hajimu UMEMOTO wrote: > > I saw following message during boot: > > > > Dec 7 13:54:12 yoshino kernel: Shared object "libulog.so.0" not found, > > required > > by "date" > > > > Now, date(1) links libulog.so.0. The date(1) is in /bin, but > > libulog.so.0 is in /usr/lib. The libulog must be installed into /lib. Any chance to put libulog and other 'extension' libraries together (I would say into libc but perhaps that's too much). There are several apps which only relied on libc that now require -lulog, -ljail, -lsbuf, -lbsdxml (libexpat) They are all minuscule, 1-2 files each, but make life harder for developers to track the dependencies. Also, things like lsbuf are really useful in general, so having that widely available would be a good incentive for people to use it instead of rolling their own 'dynamic string manipulation' code again and again http://info.iet.unipi.it/~luigi/FreeBSD/#dynstring cheers luigi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200157 - head/bin/date
Luigi Rizzo writes: > Also, things like lsbuf are really useful in general, so having > that widely available would be a good incentive for people to > use it instead of rolling their own 'dynamic string manipulation' > code again and again Userland libsbuf is an abomination. I wish I had protested more strenuously when the CAM people insisted on using the same code in userland as in the kernel; we actually lost functionality in the kernel version as a result. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
On Mon, Dec 07, 2009 at 10:41:11AM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > Also, things like lsbuf are really useful in general, so having > > that widely available would be a good incentive for people to > > use it instead of rolling their own 'dynamic string manipulation' > > code again and again > > Userland libsbuf is an abomination. I wish I had protested more > strenuously when the CAM people insisted on using the same code in > userland as in the kernel; we actually lost functionality in the kernel > version as a result. What do you mean exactly ? In any case i don't care whether we use the same or different code in userland and kernel, but i do care that we converge on one library to handle dynamic strings in a safe way, and promote the use of that library for our userland base code. One way to promote this is to put the code in libc so even lazy people won't need to remember to pass linker flags when using the library. Otherwise lots of people are going to use unsafe or non-reentrant variants based on sprintf/snprintf , even in the libraries. Just grep -r sprintf or snprintf in src/lib and you'll see how bad the situation is. libsbuf is as good as anything else with the same features. cheers luigi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
In message <20091207105343.ga62...@onelab2.iet.unipi.it>, Luigi Rizzo writes: >One way to promote this is to put the code in libc so even lazy >people won't need to remember to pass linker flags when using the library. I don't think sbuf's belong in libc, unless we can persude POSIX to adopt them. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
Luigi Rizzo writes: > What do you mean exactly ? When libsbuf was ported to userland, sbuf_printf() was pessimized due to the limitations of libc's printf(). This makes certain parts of pseudofs extremely inefficient: for instance, if you read from a /proc/whatever that's backed by an sbuf, it has to generate the entire file even if you only asked for a small chunk at a large offset. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200157 - head/bin/date
Hello Luigi, * Luigi Rizzo wrote: > Any chance to put libulog and other 'extension' libraries together > (I would say into libc but perhaps that's too much). Even though I agree having all these small libraries is not the way to go, I really want to have the ulog functions in a separate library. libulog is meant to be a migration tool towards a real utmpx implementation. It basically implements the subset of utmpx we can support, but with a ulog_-prefix. I don't want to advertise it as being utmpx itself, this would only cause autofoo-based ports to break. By the time we gain proper utmpx support, I want to be able to phase out libulog, or at least move its non-redundant functionality into libutil. I guess libulog will be history by the time we release FreeBSD 10.0. -- Ed Schouten WWW: http://80386.nl/ pgp2mG3iommMr.pgp Description: PGP signature
Re: svn commit: r200183 - head/sbin/ipfw
On Mon, Dec 7, 2009 at 5:31 AM, Max Laier wrote: > On Sunday 06 December 2009 19:04:27 Luigi Rizzo wrote: > > Author: luigi > > Date: Sun Dec 6 18:04:26 2009 > > New Revision: 200183 > > URL: http://svn.freebsd.org/changeset/base/200183 > > > > Log: > > restore setting of sin_len (was removed in 1.146 last february) as > > it seems that now it is necessary for 'forward' to work outside lo0. > > The bug (and fix) was reported on 8.0. This patch probably applies > > to RELENG_7 as well. > > It seems that 'pf' has a similar bug. > > > > Submitted by: Lytochkin Boris > > Do you have a reference for me? > I followed the thread but route-to sets the sin_len see this: http://fxr.watson.org/fxr/source/contrib/pf/net/pf.c?v=FREEBSD8#L6179 > > > MFC after: 3 days > > > > Modified: > > head/sbin/ipfw/ipfw2.c > > > > Modified: head/sbin/ipfw/ipfw2.c > > > === > > === --- head/sbin/ipfw/ipfw2.cSun Dec 6 17:26:43 2009 > (r200182) > > +++ head/sbin/ipfw/ipfw2.cSun Dec 6 18:04:26 2009(r200183) > > @@ -2740,9 +2740,11 @@ chkarg: > > > > /* > >* In the kernel we assume AF_INET and use only > > - * sin_port and sin_addr. > > + * sin_port and sin_addr. Remember to set sin_len as > > + * the routing code seems to use it too. > >*/ > > p->sa.sin_family = AF_INET; > > + p->sa.sin_len = sizeof(struct sockaddr_in); > > p->sa.sin_port = 0; > > /* > >* locate the address-port separator (':' or ',') > > > > > > !DSPAM:4b1bf5b9894172410716004! > > > -- Ermal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200038 - in head: contrib/gcc/config lib/csu/amd64 lib/csu/arm lib/csu/i386-elf lib/csu/ia64 lib/csu/mips lib/csu/powerpc lib/csu/sparc64
On Wed, Dec 2, 2009 at 2:34 PM, Konstantin Belousov wrote: > Author: kib > Date: Wed Dec 2 16:34:20 2009 > New Revision: 200038 > URL: http://svn.freebsd.org/changeset/base/200038 > > Log: > Properly support -fPIE by linking PIE binaries with specially-built > Scrt1.o instead of crt1.o, since the later is built as non-PIC. > > Separate i386-elf crt1.c into the pure assembler part and C code, > supplying all data extracted by assembler stub as explicit parameters [1]. > Hide and localize _start1 symbol used as an interface between asm and > C code. I've got this: r...@botelhor:/usr/src/lib/csu/i386-elf# make cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S ld -o gcrt1.o -r crt1_s.o gcrt1_c.o cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_c.c make: don't know how to make /usr/src/lib/csu/i386-elf/crt1.c. Stop [1]36086 exit 2 make -- Renato Botelho ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
On Mon, Dec 07, 2009 at 10:55:38AM +, Poul-Henning Kamp wrote: > In message <20091207105343.ga62...@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > >One way to promote this is to put the code in libc so even lazy > >people won't need to remember to pass linker flags when using the library. > > I don't think sbuf's belong in libc, unless we can persude POSIX to > adopt them. right, then some other commonly used but not locked-by-standards place. libutil? libbsdstuffnotstandardizedbyposix ? Again my point (perhaps lost in the initial thread) was that the number of one-file libraries used in our base code is increasing: libsbuf, libjail, libbsdxml... to me, individual files are library members, there is no need to dedicate an entire library to a library member cheers luigi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200038 - in head: contrib/gcc/config lib/csu/amd64 lib/csu/arm lib/csu/i386-elf lib/csu/ia64 lib/csu/mips lib/csu/powerpc lib/csu/sparc64
On Mon, Dec 7, 2009 at 10:09 AM, Renato Botelho wrote: > On Wed, Dec 2, 2009 at 2:34 PM, Konstantin Belousov wrote: >> Author: kib >> Date: Wed Dec 2 16:34:20 2009 >> New Revision: 200038 >> URL: http://svn.freebsd.org/changeset/base/200038 >> >> Log: >> Properly support -fPIE by linking PIE binaries with specially-built >> Scrt1.o instead of crt1.o, since the later is built as non-PIC. >> >> Separate i386-elf crt1.c into the pure assembler part and C code, >> supplying all data extracted by assembler stub as explicit parameters [1]. >> Hide and localize _start1 symbol used as an interface between asm and >> C code. > > I've got this: > > r...@botelhor:/usr/src/lib/csu/i386-elf# make > cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common > -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 > -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c > /usr/src/lib/csu/i386-elf/crti.S > cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common > -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 > -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c > /usr/src/lib/csu/i386-elf/crtn.S > cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common > -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 > -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o > gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c > cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common > -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 > -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c > /usr/src/lib/csu/i386-elf/crt1_s.S > ld -o gcrt1.o -r crt1_s.o gcrt1_c.o > cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common > -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 > -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 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c > /usr/src/lib/csu/i386-elf/crt1_c.c > make: don't know how to make /usr/src/lib/csu/i386-elf/crt1.c. Stop > [1] 36086 exit 2 make nevermind, rm -rf /usr/obj/usr/src/lib/csu fixed the problem. -- Renato Botelho ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
"Poul-Henning Kamp" writes: > Luigi Rizzo writes: > > One way to promote this is to put the code in libc so even lazy > > people won't need to remember to pass linker flags when using the library. > I don't think sbuf's belong in libc, unless we can persude POSIX to > adopt them. While I agree with you that we shouldn't merge libsbuf into libc, I should point out that we have tons of stuff in libc (e.g. err() and friends) that isn't in POSIX and probably never will be. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
In message <861vj7t1d7@ds4.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= writes: >"Poul-Henning Kamp" writes: >While I agree with you that we shouldn't merge libsbuf into libc, I >should point out that we have tons of stuff in libc (e.g. err() and >friends) that isn't in POSIX and probably never will be. I know. For a lot of the stuff, it reflects badly on POSIX (and/or ISO-C) that it isn't. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
In message <20091207122256.gc64...@onelab2.iet.unipi.it>, Luigi Rizzo writes: >right, then some other commonly used but not locked-by-standards place. >libutil? libbsdstuffnotstandardizedbyposix ? I would be very happy to see a libposux, even more so, if the content were standardized across Linux and FreeBSD. >Again my point (perhaps lost in the initial thread) was that the number >of one-file libraries used in our base code is increasing: > libsbuf, libjail, libbsdxml... >to me, individual files are library members, there is no need to >dedicate an entire library to a library member Remember that shared libraries, you load all or nothing. With old fashioned .a libs, you cherrypicked the bits you needed. It can be argued that we should just dump everything in libc, but first, that would impair portability from FreeBSD, and second, it would be just plain sloppy... Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
* Poul-Henning Kamp wrote: > It can be argued that we should just dump everything in libc, but > first, that would impair portability from FreeBSD, and second, it > would be just plain sloppy... And would more likely cause namespace issues. Functions like login(3) and logout(3) really fill up the namespace. -- Ed Schouten WWW: http://80386.nl/ pgpq8dSvUpsjV.pgp Description: PGP signature
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
On Mon, Dec 07, 2009 at 12:40:23PM +, Poul-Henning Kamp wrote: > In message <20091207122256.gc64...@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > >right, then some other commonly used but not locked-by-standards place. > >libutil? libbsdstuffnotstandardizedbyposix ? > > I would be very happy to see a libposux, even more so, if the content > were standardized across Linux and FreeBSD. :) if we call it libyousux each party (posix, linux, bsd, ...) could pretend that the blame is on the others! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries (was Re: svn commit: r200157 - head/bin/date)
In message <20091207125436.ga71...@onelab2.iet.unipi.it>, Luigi Rizzo writes: >On Mon, Dec 07, 2009 at 12:40:23PM +, Poul-Henning Kamp wrote: >> I would be very happy to see a libposux, even more so, if the content >> were standardized across Linux and FreeBSD. >:) >if we call it libyousux each party (posix, linux, bsd, ...) >could pretend that the blame is on the others! The suckage is rightly POSIX', so libposux conveys the correct meaning. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
On Mon, Dec 07, 2009 at 11:56:18AM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > What do you mean exactly ? > > When libsbuf was ported to userland, sbuf_printf() was pessimized due to > the limitations of libc's printf(). This makes certain parts of but, isn't this an implementation detail ? What prevents the same API to have two different implementation, one for kernel, one for userland ? cheers luigi > pseudofs extremely inefficient: for instance, if you read from a > /proc/whatever that's backed by an sbuf, it has to generate the entire > file even if you only asked for a small chunk at a large offset. > > DES > -- > Dag-Erling Sm??rgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
Luigi Rizzo writes: > "Dag-Erling Smørgrav" writes: > > When libsbuf was ported to userland, sbuf_printf() was pessimized > > due to the limitations of libc's printf(). > but, isn't this an implementation detail ? What prevents the same > API to have two different implementation, one for kernel, one for userland ? Maybe I wasn't entirely clear: functionality was removed from libsbuf because it could not be implemented in userland, because our printf(3) is badly implemented. To restore that functionality, we would have to either fork libsbuf or fix printf(3). DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
On Mon, Dec 07, 2009 at 02:11:44PM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > "Dag-Erling Sm??rgrav" writes: > > > When libsbuf was ported to userland, sbuf_printf() was pessimized > > > due to the limitations of libc's printf(). > > but, isn't this an implementation detail ? What prevents the same > > API to have two different implementation, one for kernel, one for userland ? > > Maybe I wasn't entirely clear: functionality was removed from libsbuf > because it could not be implemented in userland, because our printf(3) > is badly implemented. To restore that functionality, we would have to > either fork libsbuf or fix printf(3). i think i understood correctly. But my point is-- does the functionality that was removed rely on a different API, or we can keep the same API and have two different implementation of the hopefully few things that change between kernel and userland int sbuf_printf(struct sbuf *s, const char *fmt, ...) { // common code #ifdef _KERNEL ... the wonderful bits #else // crippled due to printf limitations #endif // more common code This does not seem too problematic... ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200212 - stable/7/sys/nfsserver
Author: jh Date: Mon Dec 7 13:38:10 2009 New Revision: 200212 URL: http://svn.freebsd.org/changeset/base/200212 Log: MFC r197525: Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object. This completes the fix from r185586. Approved by: trasz (mentor) Modified: stable/7/sys/nfsserver/nfs_serv.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/nfsserver/nfs_serv.c == --- stable/7/sys/nfsserver/nfs_serv.c Mon Dec 7 08:38:44 2009 (r200211) +++ stable/7/sys/nfsserver/nfs_serv.c Mon Dec 7 13:38:10 2009 (r200212) @@ -1743,7 +1743,7 @@ nfsrv_create(struct nfsrv_descript *nfsd tl = nfsm_dissect_nonblock(u_int32_t *, NFSX_V3CREATEVERF); /* Unique bytes, endianness is not important. */ - cverf.tv_sec = tl[0]; + cverf.tv_sec = (int32_t)tl[0]; cverf.tv_nsec = tl[1]; exclusive_flag = 1; break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
Luigi Rizzo writes: > But my point is-- does the functionality that was removed rely > on a different API, or we can keep the same API and have two > different implementation of the hopefully few things that change > between kernel and userland Restoring sbuf_printf() to what it was would not change the API, but the semantics would be different in certain cases. The API would need to be extended to allow pseudofs to take full advantage of the changed semantics. (it is possible that the same functionality could be implemented in userland using funopen(3); such a solution would have all of the disadvantages of the current code except for the performance penalty, but none of its advantages) DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
On Mon, Dec 07, 2009 at 03:33:37PM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > But my point is-- does the functionality that was removed rely > > on a different API, or we can keep the same API and have two > > different implementation of the hopefully few things that change > > between kernel and userland > > Restoring sbuf_printf() to what it was would not change the API, but the > semantics would be different in certain cases. doesn't seem a big deal, we already have diffent behaviour in kernel vs userland for certain functions (e.g. printf() itself, if nothing else the format specifiers are different in some cases). ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200213 - svnadmin/conf
Author: ed Date: Mon Dec 7 14:47:45 2009 New Revision: 200213 URL: http://svn.freebsd.org/changeset/base/200213 Log: Gavin can has SVN access. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessMon Dec 7 13:38:10 2009(r200212) +++ svnadmin/conf/accessMon Dec 7 14:47:45 2009(r200213) @@ -77,6 +77,7 @@ fjoe flz gad gallatin +gavin ghelmer gibbs glebius Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Mon Dec 7 13:38:10 2009(r200212) +++ svnadmin/conf/mentors Mon Dec 7 14:47:45 2009(r200213) @@ -13,6 +13,7 @@ cbzimmer sam dchaginkib erimlaier Co-mentor: thompsa +gavin ed ivoras gnn jh trasz Co-mentor: rwatson jinmei gnn ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: the need for safe dynamic string libraries
Luigi Rizzo writes: > "Dag-Erling Smørgrav" writes: > > Restoring sbuf_printf() to what it was would not change the API, but > > the semantics would be different in certain cases. > doesn't seem a big deal, we already have diffent behaviour in > kernel vs userland for certain functions (e.g. printf() itself, > if nothing else the format specifiers are different in some cases). There are parts of CAM that are shared between the kernel and userland (which is why libsbuf was created in the first place)... OTOH, I don't think they use the sbuf API in such a way that they would be affected. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200214 - head/sys/fs/ntfs
Author: guido Date: Mon Dec 7 15:15:08 2009 New Revision: 200214 URL: http://svn.freebsd.org/changeset/base/200214 Log: Fix ntfs such that it understand media with a non-512-bytes sector size: 1. Fixups are always done on 512 byte chunks (in stead of sectors). This is kind of stupid. 2. Conevrt between NTFS blocknumbers (the blocksize equals the media sector size) and the bread() and getblk() blocknr (which are 512-byte sized) NB: this change should not affect ntfs for 512-byte sector sizes. Modified: head/sys/fs/ntfs/ntfs.h head/sys/fs/ntfs/ntfs_subr.c head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs.h == --- head/sys/fs/ntfs/ntfs.h Mon Dec 7 14:47:45 2009(r200213) +++ head/sys/fs/ntfs/ntfs.h Mon Dec 7 15:15:08 2009(r200214) @@ -183,6 +183,7 @@ struct attr_indexentry { }; #defineNTFS_FILEMAGIC (u_int32_t)(0x454C4946) +#defineNTFS_BLOCK_SIZE 512 #defineNTFS_FRFLAG_DIR 0x0002 struct filerec { struct fixuphdr fr_fixup; @@ -257,6 +258,7 @@ struct ntfsmount { char ** ntm_u28;/* Unicode to 8 bit */ void * ntm_ic_l2u; /* Local to Unicode (iconv) */ void * ntm_ic_u2l; /* Unicode to Local (iconv) */ + u_int8_tntm_multiplier; /* NTFS blockno to DEV_BSIZE sectorno */ }; #define ntm_mftcn ntm_bootfile.bf_mftcn Modified: head/sys/fs/ntfs/ntfs_subr.c == --- head/sys/fs/ntfs/ntfs_subr.cMon Dec 7 14:47:45 2009 (r200213) +++ head/sys/fs/ntfs/ntfs_subr.cMon Dec 7 15:15:08 2009 (r200214) @@ -278,6 +278,7 @@ ntfs_loadntnode( bn = ntfs_cntobn(ntmp->ntm_mftcn) + ntmp->ntm_bpmftrec * ip->i_number; + bn *= ntmp->ntm_multiplier; error = bread(ntmp->ntm_devvp, bn, ntfs_bntob(ntmp->ntm_bpmftrec), @@ -581,7 +582,7 @@ ntfs_attrtontvattr( memcpy(vap->va_datap, (caddr_t) rap + rap->a_r.a_dataoff, rap->a_r.a_datalen); } - ddprintf((", len: %d", vap->va_datalen)); + ddprintf((", len: %lld", vap->va_datalen)); if (error) free(vap, M_NTFSNTVATTR); @@ -1491,11 +1492,13 @@ ntfs_writentvattr_plain( (u_int32_t) left)); if ((off == 0) && (tocopy == ntfs_cntob(cl))) { - bp = getblk(ntmp->ntm_devvp, ntfs_cntobn(cn), + bp = getblk(ntmp->ntm_devvp, ntfs_cntobn(cn) + * ntmp->ntm_multiplier, ntfs_cntob(cl), 0, 0, 0); clrbuf(bp); } else { - error = bread(ntmp->ntm_devvp, ntfs_cntobn(cn), + error = bread(ntmp->ntm_devvp, ntfs_cntobn(cn) + * ntmp->ntm_multiplier, ntfs_cntob(cl), NOCRED, &bp); if (error) { brelse(bp); @@ -1602,7 +1605,8 @@ ntfs_readntvattr_plain( (u_int32_t) tocopy, (u_int32_t) left)); error = bread(ntmp->ntm_devvp, - ntfs_cntobn(cn), + ntfs_cntobn(cn) + * ntmp->ntm_multiplier, ntfs_cntob(cl), NOCRED, &bp); if (error) { @@ -1878,7 +1882,7 @@ ntfs_procfixups( fhp->fh_magic, magic); return (EINVAL); } - if ((fhp->fh_fnum - 1) * ntmp->ntm_bps != len) { + if ((fhp->fh_fnum - 1) * NTFS_BLOCK_SIZE != len) { printf("ntfs_procfixups: " \ "bad fixups number: %d for %ld bytes block\n", fhp->fh_fnum, (long)len);/* XXX printf kludge */ @@ -1889,7 +1893,7 @@ ntfs_procfixups( return (EINVAL); } fxp = (u_int16_t *) (buf + fhp->fh_foff); - cfxp = (u_int16_t *) (buf + ntmp->ntm_bps - 2); + cfxp = (u_int16_t *) (buf + NTFS_BLOCK_SIZE - 2); fixup = *fxp++; for (i = 1; i < fhp->fh_fnum; i++, fxp++) { if (*cfxp != fixup) { @@ -1897,7 +1901,7 @@ ntfs_procfixups( return (EINVAL); } *cfxp = *fxp; - cfxp
svn commit: r200215 - head/sys/sparc64/sparc64
Author: marius Date: Mon Dec 7 15:29:07 2009 New Revision: 200215 URL: http://svn.freebsd.org/changeset/base/200215 Log: Add missed in r199135. Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c == --- head/sys/sparc64/sparc64/trap.c Mon Dec 7 15:15:08 2009 (r200214) +++ head/sys/sparc64/sparc64/trap.c Mon Dec 7 15:29:07 2009 (r200215) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200216 - in head/sys/boot/i386: libi386 loader
Author: jhb Date: Mon Dec 7 16:00:59 2009 New Revision: 200216 URL: http://svn.freebsd.org/changeset/base/200216 Log: Various small whitespace and style fixes. Modified: head/sys/boot/i386/libi386/biosmem.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/libi386/biosmem.c == --- head/sys/boot/i386/libi386/biosmem.cMon Dec 7 15:29:07 2009 (r200215) +++ head/sys/boot/i386/libi386/biosmem.cMon Dec 7 16:00:59 2009 (r200216) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include "btxv86.h" vm_offset_tmemtop, memtop_copyin; -u_int32_t bios_basemem, bios_extmem; +uint32_t bios_basemem, bios_extmem; static struct bios_smap smap; @@ -98,4 +98,3 @@ bios_getmem(void) memtop = memtop_copyin = 0x10 + bios_extmem; } - Modified: head/sys/boot/i386/libi386/libi386.h == --- head/sys/boot/i386/libi386/libi386.hMon Dec 7 15:29:07 2009 (r200215) +++ head/sys/boot/i386/libi386/libi386.hMon Dec 7 16:00:59 2009 (r200216) @@ -78,9 +78,9 @@ int bc_add(int biosdev);/* Register CD intbc_getdev(struct i386_devdesc *dev);/* return dev_t for (dev) */ intbc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */ intbc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */ -u_int32_t bd_getbigeom(int bunit);/* return geometry in bootinfo format */ -intbd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ -intbd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ +uint32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */ +intbd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ +intbd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ intbd_getdev(struct i386_devdesc *dev);/* return dev_t for (dev) */ ssize_ti386_copyin(const void *src, vm_offset_t dest, const size_t len); @@ -92,12 +92,13 @@ voidbios_addsmapdata(struct preloaded_f void bios_getsmap(void); void bios_getmem(void); -extern u_int32_t bios_basemem; /* base memory in bytes */ -extern u_int32_t bios_extmem;/* extended memory in bytes */ +extern uint32_tbios_basemem; /* base memory in bytes */ +extern uint32_tbios_extmem;/* extended memory in bytes */ extern vm_offset_t memtop; /* last address of physical memory + 1 */ extern vm_offset_t memtop_copyin; /* memtop less heap size for the cases */ - /* when heap is at the top of extended memory */ - /* for other cases - just the same as memtop */ + /* when heap is at the top of */ + /* extended memory; for other cases */ + /* just the same as memtop */ int biospci_find_devclass(uint32_t class, int index, uint32_t *locator); int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val); Modified: head/sys/boot/i386/loader/main.c == --- head/sys/boot/i386/loader/main.cMon Dec 7 15:29:07 2009 (r200215) +++ head/sys/boot/i386/loader/main.cMon Dec 7 16:00:59 2009 (r200216) @@ -102,7 +102,8 @@ main(void) */ bios_getmem(); -#if defined(LOADER_BZIP2_SUPPORT) || defined(LOADER_FIREWIRE_SUPPORT) || defined(LOADER_GPT_SUPPORT) || defined(LOADER_ZFS_SUPPORT) +#if defined(LOADER_BZIP2_SUPPORT) || defined(LOADER_FIREWIRE_SUPPORT) || \ +defined(LOADER_GPT_SUPPORT) || defined(LOADER_ZFS_SUPPORT) heap_top = PTOV(memtop_copyin); memtop_copyin -= 0x30; heap_bottom = PTOV(memtop_copyin); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200217 - head/sys/dev/siis
Author: mav Date: Mon Dec 7 16:10:48 2009 New Revision: 200217 URL: http://svn.freebsd.org/changeset/base/200217 Log: SiI3124 has no SNotification register. Handle Asynchronous Notifications there without it as good as possible. Modified: head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sys/dev/siis/siis.c == --- head/sys/dev/siis/siis.cMon Dec 7 16:00:59 2009(r200216) +++ head/sys/dev/siis/siis.cMon Dec 7 16:10:48 2009(r200217) @@ -93,15 +93,17 @@ static struct { uint32_tid; const char *name; int ports; + int quirks; +#define SIIS_Q_SNTF1 } siis_ids[] = { - {0x31241095,"SiI3124", 4}, - {0x31248086,"SiI3124", 4}, - {0x31321095,"SiI3132", 2}, - {0x02421095,"SiI3132", 2}, - {0x02441095,"SiI3132", 2}, - {0x31311095,"SiI3131", 1}, - {0x35311095,"SiI3531", 1}, - {0, NULL, 0} + {0x31241095,"SiI3124", 4, 0}, + {0x31248086,"SiI3124", 4, 0}, + {0x31321095,"SiI3132", 2, SIIS_Q_SNTF}, + {0x02421095,"SiI3132", 2, SIIS_Q_SNTF}, + {0x02441095,"SiI3132", 2, SIIS_Q_SNTF}, + {0x31311095,"SiI3131", 1, SIIS_Q_SNTF}, + {0x35311095,"SiI3531", 1, SIIS_Q_SNTF}, + {0, NULL, 0, 0} }; static int @@ -113,7 +115,7 @@ siis_probe(device_t dev) for (i = 0; siis_ids[i].id != 0; i++) { if (siis_ids[i].id == devid) { - snprintf(buf, sizeof(buf), "%s SATA2 controller", + snprintf(buf, sizeof(buf), "%s SATA controller", siis_ids[i].name); device_set_desc_copy(dev, buf); return (BUS_PROBE_VENDOR); @@ -130,11 +132,12 @@ siis_attach(device_t dev) device_t child; int error, i, unit; + ctlr->dev = dev; for (i = 0; siis_ids[i].id != 0; i++) { if (siis_ids[i].id == devid) break; } - ctlr->dev = dev; + ctlr->quirks = siis_ids[i].quirks; /* Global memory */ ctlr->r_grid = PCIR_BAR(0); if (!(ctlr->r_gmem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -413,12 +416,14 @@ siis_ch_probe(device_t dev) static int siis_ch_attach(device_t dev) { + struct siis_controller *ctlr = device_get_softc(device_get_parent(dev)); struct siis_channel *ch = device_get_softc(dev); struct cam_devq *devq; int rid, error, i, sata_rev = 0; ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); + ch->quirks = ctlr->quirks; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); resource_int_value(device_get_name(dev), @@ -680,8 +685,16 @@ siis_notify_events(device_t dev) u_int32_t status; int i; - status = ATA_INL(ch->r_mem, SIIS_P_SNTF); - ATA_OUTL(ch->r_mem, SIIS_P_SNTF, status); + if (ch->quirks & SIIS_Q_SNTF) { + status = ATA_INL(ch->r_mem, SIIS_P_SNTF); + ATA_OUTL(ch->r_mem, SIIS_P_SNTF, status); + } else { + /* +* Without SNTF we have no idea which device sent notification. +* If PMP is connected, assume it, else - device. +*/ + status = (ch->pm_present) ? 0x8000 : 0x0001; + } if (bootverbose) device_printf(dev, "SNTF 0x%04x\n", status); for (i = 0; i < 16; i++) { Modified: head/sys/dev/siis/siis.h == --- head/sys/dev/siis/siis.hMon Dec 7 16:00:59 2009(r200216) +++ head/sys/dev/siis/siis.hMon Dec 7 16:10:48 2009(r200217) @@ -363,6 +363,7 @@ struct siis_channel { struct ata_dma dma;/* DMA data */ struct cam_sim *sim; struct cam_path *path; + int quirks; int pm_level; /* power management level */ struct siis_slotslot[SIIS_MAX_SLOTS]; @@ -400,6 +401,7 @@ struct siis_controller { void*handle; int r_irq_rid; } irq; + int quirks; int channels; struct { void(*function)(void *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200218 - head/sys/cam/ata
Author: mav Date: Mon Dec 7 16:23:25 2009 New Revision: 200218 URL: http://svn.freebsd.org/changeset/base/200218 Log: MFp4; - Cleanup kernel messages, mostly PMP. - Took references on devices, while PMP reinitializes them, to not let them go and distort freeze reference counting. Modified: head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_pmp.c head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_all.c == --- head/sys/cam/ata/ata_all.c Mon Dec 7 16:10:48 2009(r200217) +++ head/sys/cam/ata/ata_all.c Mon Dec 7 16:23:25 2009(r200218) @@ -256,8 +256,10 @@ ata_print_ident(struct ata_params *ident sizeof(product)); cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision), sizeof(revision)); - printf("<%s %s> ATA/ATAPI-%d", - product, revision, ata_version(ident_data->version_major)); + printf("<%s %s> %s-%d", + product, revision, + (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA", + ata_version(ident_data->version_major)); if (ident_data->satacapabilities && ident_data->satacapabilities != 0x) { if (ident_data->satacapabilities & ATA_SATA_GEN3) printf(" SATA 3.x"); Modified: head/sys/cam/ata/ata_pmp.c == --- head/sys/cam/ata/ata_pmp.c Mon Dec 7 16:10:48 2009(r200217) +++ head/sys/cam/ata/ata_pmp.c Mon Dec 7 16:23:25 2009(r200218) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -176,8 +177,8 @@ pmpfreeze(struct cam_periph *periph, int if (xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { -printf("PMP freeze: %d\n", i); softc->frozen |= (1 << i); + xpt_acquire_device(dpath->device); cam_freeze_devq(dpath); xpt_free_path(dpath); } @@ -198,9 +199,9 @@ pmprelease(struct cam_periph *periph, in if (xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { -printf("PMP release: %d\n", i); softc->frozen &= ~(1 << i); cam_release_devq(dpath, 0, 0, 0, FALSE); + xpt_release_device(dpath->device); xpt_free_path(dpath); } } @@ -228,6 +229,7 @@ pmponinvalidate(struct cam_periph *perip xpt_free_path(dpath); } } + pmprelease(periph, -1); xpt_print(periph->path, "lost device\n"); } @@ -459,8 +461,6 @@ pmpstart(struct cam_periph *periph, unio pmp_default_timeout * 1000); ata_pm_write_cmd(ataio, 2, softc->pm_step, (softc->found & (1 << softc->pm_step)) ? 0 : 1); -printf("PM RESET %d%s\n", softc->pm_step, -(softc->found & (1 << softc->pm_step)) ? " skipping" : ""); break; case PMP_STATE_CONNECT: cam_fill_ataio(ataio, @@ -584,7 +584,9 @@ pmpdone(struct cam_periph *periph, union if (softc->pm_pid == 0x57231095 || softc->pm_pid == 0x57331095 || softc->pm_pid == 0x57341095 || softc->pm_pid == 0x57441095) softc->pm_ports--; - printf("PM ports: %d\n", softc->pm_ports); + printf("%s%d: %d fan-out ports\n", + periph->periph_name, periph->unit_number, + softc->pm_ports); softc->state = PMP_STATE_PRECONFIG; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); @@ -606,7 +608,6 @@ pmpdone(struct cam_periph *periph, union /*reduction*/0, /*timeout*/5, /*getcount_only*/0); - printf("PM reset done\n"); softc->state = PMP_STATE_CONNECT; } xpt_release_ccb(done_ccb); @@ -623,7 +624,6 @@ pmpdone(struct cam_periph *periph, union /*reduction*/0, /*timeout*/10, /*getcount_only*/0); - printf("PM connect done\n"); softc->state = PMP_STATE_CHECK; } xpt_release_ccb(done_ccb); @@ -635,7 +635,11 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) { - printf("PM status: %d
svn commit: r200219 - in head/sys/boot/i386: libi386 loader
Author: jhb Date: Mon Dec 7 16:29:43 2009 New Revision: 200219 URL: http://svn.freebsd.org/changeset/base/200219 Log: Improve the algorithm the loader uses to choose a memory range for its heap when using a range above 1MB. Previously the loader would always use the last 3MB in the first memory range above 1MB for the heap. However, this memory range is also where the kernel and any modules are loaded. If this memory range is "small", then using the high 3MB for the heap may not leave enough room for the kernel and modules. Now the loader will use any range below 4GB for the heap, and the logic to choose the "high" heap region has moved into biosmem.c. It sets two variables that the loader can use for a high heap if it desires. When a high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following memory ranges are preferred for the heap in order from best to worst: - The largest memory region in the SMAP with a start address greater than 1MB. The memory region must be at least 3MB in length. This leaves the region starting at 1MB purely for use by the kernel and modules. - The last 3MB of the memory region starting at 1MB if it is at least 3MB in size. This matches the current behavior except that the current loader would break horribly if the first region was not at least 3MB in size. - The memory range from the end of the loader up to the 640k window. This is the range the loader uses when none of the high-heap-requesting options are enabled. Tested by:hrs MFC after:1 week Modified: head/sys/boot/i386/libi386/biosmem.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/libi386/biosmem.c == --- head/sys/boot/i386/libi386/biosmem.cMon Dec 7 16:23:25 2009 (r200218) +++ head/sys/boot/i386/libi386/biosmem.cMon Dec 7 16:29:43 2009 (r200219) @@ -35,14 +35,20 @@ __FBSDID("$FreeBSD$"); #include "libi386.h" #include "btxv86.h" -vm_offset_tmemtop, memtop_copyin; -uint32_t bios_basemem, bios_extmem; +vm_offset_tmemtop, memtop_copyin, high_heap_base; +uint32_t bios_basemem, bios_extmem, high_heap_size; static struct bios_smap smap; +/* + * The minimum amount of memory to reserve in bios_extmem for the heap. + */ +#defineHEAP_MIN(3 * 1024 * 1024) + void bios_getmem(void) { +uint64_t size; /* Parse system memory map */ v86.ebx = 0; @@ -65,6 +71,26 @@ bios_getmem(void) if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0x10)) { bios_extmem = smap.length; } + + /* +* Look for the largest segment in 'extended' memory beyond +* 1MB but below 4GB. +*/ + if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base > 0x10) && + (smap.base < 0x1ull)) { + size = smap.length; + + /* +* If this segment crosses the 4GB boundary, truncate it. +*/ + if (smap.base + size > 0x1ull) + size = 0x1ull - smap.base; + + if (size > high_heap_size) { + high_heap_size = size; + high_heap_base = smap.base; + } + } } while (v86.ebx != 0); /* Fall back to the old compatibility function for base memory */ @@ -97,4 +123,13 @@ bios_getmem(void) /* Set memtop to actual top of memory */ memtop = memtop_copyin = 0x10 + bios_extmem; +/* + * If we have extended memory and did not find a suitable heap + * region in the SMAP, use the last 3MB of 'extended' memory as a + * high heap candidate. + */ +if (bios_extmem >= HEAP_MIN && high_heap_size < HEAP_MIN) { + high_heap_size = HEAP_MIN; + high_heap_base = memtop - HEAP_MIN; +} } Modified: head/sys/boot/i386/libi386/libi386.h == --- head/sys/boot/i386/libi386/libi386.hMon Dec 7 16:23:25 2009 (r200218) +++ head/sys/boot/i386/libi386/libi386.hMon Dec 7 16:29:43 2009 (r200219) @@ -99,6 +99,8 @@ extern vm_offset_tmemtop_copyin; /* mem /* when heap is at the top of */ /* extended memory; for other cases */ /* just the same as memtop */ +extern uint32_thigh_heap_size; /* extended memory region available */ +extern vm_offset_t high_heap_base; /* for use as the heap */ int biospci_find_devclass(uint32_t class, int index, uint32_t *locator); int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val); Modified: head/sys/boot/i386/loader/main.c ==
svn commit: r200220 - in stable/8/sys/boot: . i386 i386/loader i386/zfsboot i386/zfsloader
Author: rnoland Date: Mon Dec 7 16:37:02 2009 New Revision: 200220 URL: http://svn.freebsd.org/changeset/base/200220 Log: MFC 199714 Create a seperate ZFS enabled loader. This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader. Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader. New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader. Added: stable/8/sys/boot/i386/zfsloader/ - copied from r199714, head/sys/boot/i386/zfsloader/ Modified: stable/8/sys/boot/Makefile stable/8/sys/boot/i386/Makefile stable/8/sys/boot/i386/loader/Makefile stable/8/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/Makefile == --- stable/8/sys/boot/Makefile Mon Dec 7 16:29:43 2009(r200219) +++ stable/8/sys/boot/Makefile Mon Dec 7 16:37:02 2009(r200220) @@ -22,7 +22,7 @@ SUBDIR+= ofw SUBDIR+= uboot .endif -.if defined(LOADER_ZFS_SUPPORT) +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" SUBDIR+= zfs .endif Modified: stable/8/sys/boot/i386/Makefile == --- stable/8/sys/boot/i386/Makefile Mon Dec 7 16:29:43 2009 (r200219) +++ stable/8/sys/boot/i386/Makefile Mon Dec 7 16:37:02 2009 (r200220) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \ - gptzfsboot kgzldr libi386 libfirewire loader + gptzfsboot kgzldr libi386 libfirewire loader zfsloader # special boot programs, 'self-extracting boot2+loader' SUBDIR+= pxeldr Modified: stable/8/sys/boot/i386/loader/Makefile == --- stable/8/sys/boot/i386/loader/Makefile Mon Dec 7 16:29:43 2009 (r200219) +++ stable/8/sys/boot/i386/loader/Makefile Mon Dec 7 16:37:02 2009 (r200220) @@ -3,9 +3,10 @@ .include MK_SSP=no -PROG= loader.sym +LOADER?= loader +PROG= ${LOADER}.sym INTERNALPROG= -NEWVERSWHAT= "bootstrap loader" i386 +NEWVERSWHAT?= "bootstrap loader" i386 # architecture-specific loader code SRCS= main.c conf.c vers.c @@ -16,7 +17,7 @@ CFLAGS+= -DLOADER_FIREWIRE_SUPPORT LIBFIREWIRE= ${.OBJDIR}/../libfirewire/libfirewire.a .endif -# Put LOADER_ZFS_SUPPORT=yes in /etc/make.conf for ZFS support +# Set by zfsloader Makefile .if defined(LOADER_ZFS_SUPPORT) CFLAGS+= -DLOADER_ZFS_SUPPORT LIBZFS=${.OBJDIR}/../../zfs/libzfsboot.a @@ -61,7 +62,7 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -CLEANFILES=vers.c loader loader.bin loader.help +CLEANFILES=vers.c ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 @@ -80,30 +81,35 @@ CFLAGS+=-I${.CURDIR}/../btx/lib # Pick up ../Makefile.inc early. .include -vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version - sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} +vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version + sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \ + ${NEWVERSWHAT} -loader: loader.bin ${BTXLDR} ${BTXKERN} +${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ - -b ${BTXKERN} loader.bin + -b ${BTXKERN} ${LOADER}.bin -loader.bin: loader.sym +${LOADER}.bin: ${LOADER}.sym cp ${.ALLSRC} ${.TARGET} strip -R .comment -R .note ${.TARGET} loader.help: help.common help.i386 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +FILES= ${LOADER} +# XXX INSTALLFLAGS_loader= -b +FILESMODE_${LOADER}= ${BINMODE} -b + +.if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth -FILES= loader loader.help loader.4th support.4th loader.conf +FILES+=loader.help loader.4th support.4th loader.conf FILES+= screen.4th frames.4th beastie.4th -# XXX INSTALLFLAGS_loader= -b -FILESMODE_loader=
svn commit: r200221 - in stable/7/sys/boot: . i386 i386/loader i386/zfsboot i386/zfsloader
Author: rnoland Date: Mon Dec 7 17:15:36 2009 New Revision: 200221 URL: http://svn.freebsd.org/changeset/base/200221 Log: MFC 199714 Create a seperate ZFS enabled loader. This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader. Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader. New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader. Added: stable/7/sys/boot/i386/zfsloader/ - copied from r199714, head/sys/boot/i386/zfsloader/ Modified: stable/7/sys/boot/Makefile stable/7/sys/boot/i386/Makefile stable/7/sys/boot/i386/loader/Makefile stable/7/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/Makefile == --- stable/7/sys/boot/Makefile Mon Dec 7 16:37:02 2009(r200220) +++ stable/7/sys/boot/Makefile Mon Dec 7 17:15:36 2009(r200221) @@ -17,7 +17,7 @@ SUBDIR+= efi SUBDIR+= ofw .endif -.if ${MK_ZFS} != "no" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" SUBDIR+= zfs .endif Modified: stable/7/sys/boot/i386/Makefile == --- stable/7/sys/boot/i386/Makefile Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/i386/Makefile Mon Dec 7 17:15:36 2009 (r200221) @@ -1,8 +1,8 @@ # $FreeBSD$ .include -SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ - zfsboot gptzfsboot kgzldr libi386 libfirewire loader +SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \ + gptzfsboot kgzldr libi386 libfirewire loader zfsloader # special boot programs, 'self-extracting boot2+loader' SUBDIR+= pxeldr Modified: stable/7/sys/boot/i386/loader/Makefile == --- stable/7/sys/boot/i386/loader/Makefile Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/i386/loader/Makefile Mon Dec 7 17:15:36 2009 (r200221) @@ -2,9 +2,10 @@ .include -PROG= loader.sym +LOADER?= loader +PROG= ${LOADER}.sym INTERNALPROG= -NEWVERSWHAT= "bootstrap loader" i386 +NEWVERSWHAT?= "bootstrap loader" i386 # architecture-specific loader code SRCS= main.c conf.c vers.c @@ -15,7 +16,7 @@ CFLAGS+= -DLOADER_FIREWIRE_SUPPORT LIBFIREWIRE= ${.OBJDIR}/../libfirewire/libfirewire.a .endif -# Put LOADER_ZFS_SUPPORT=yes in /etc/make.conf for ZFS support +# Set by zfsloader Makefile #.if ${MK_ZFS} != "no" #CFLAGS+= -DLOADER_ZFS_SUPPORT #LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a @@ -60,7 +61,7 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -CLEANFILES=vers.c loader loader.bin loader.help +CLEANFILES=vers.c ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 @@ -79,30 +80,35 @@ CFLAGS+=-I${.CURDIR}/../btx/lib # Pick up ../Makefile.inc early. .include -vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version - sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} +vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version + sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \ + ${NEWVERSWHAT} -loader: loader.bin ${BTXLDR} ${BTXKERN} +${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ - -b ${BTXKERN} loader.bin + -b ${BTXKERN} ${LOADER}.bin -loader.bin: loader.sym +${LOADER}.bin: ${LOADER}.sym cp ${.ALLSRC} ${.TARGET} strip -R .comment -R .note ${.TARGET} loader.help: help.common help.i386 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +FILES= ${LOADER} +# XXX INSTALLFLAGS_loader= -b +FILESMODE_${LOADER}= ${BINMODE} -b + +.if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth -FILES= loader loader.help loader.4th support.4th loader.conf +FILES+=loader.help loader.4th support.4th loader.conf FILES+= screen.4th frames.4th beastie.4th -# XXX INSTALLFLAGS_loader= -b -FILESMODE_loader= ${BINMODE} -b FILESDIR_loader.conf= /boot/defaults .if !exists(${DESTDIR}/boot/loader.rc) FILES+=loader.rc .endif +.endif # XXX crt0.o needs to be
svn commit: r200222 - stable/8/sys/conf
Author: jhb Date: Mon Dec 7 17:18:52 2009 New Revision: 200222 URL: http://svn.freebsd.org/changeset/base/200222 Log: MFC 199974: Remove extra parantheses from usb_ethernet.c and usb_serial.c lines. config(8) doesn't parse parantheses and instead treated them as being part of the device driver name (e.g. '(u3g' vs 'u3g'). While here, fix the style of these long lines to match the wrapping used for other long lines in this file. Modified: stable/8/sys/conf/files Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files == --- stable/8/sys/conf/files Mon Dec 7 17:15:36 2009(r200221) +++ stable/8/sys/conf/files Mon Dec 7 17:18:52 2009(r200222) @@ -1624,8 +1624,8 @@ dev/usb/net/if_cue.c optional cue dev/usb/net/if_kue.c optional kue dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav -dev/usb/net/usb_ethernet.c \ - optional (aue | axe | cdce | cue | kue | rue | udav) +dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | rue | \ +udav # # USB WLAN drivers # @@ -1656,8 +1656,11 @@ dev/usb/serial/uplcom.c optional uplcom dev/usb/serial/uslcom.coptional uslcom dev/usb/serial/uvisor.coptional uvisor dev/usb/serial/uvscom.coptional uvscom -dev/usb/serial/usb_serial.coptional ucom | \ - (u3g | uark | ubsa | ubser | uchcom | ucycom | ufoma | uftdi | ugensa | uipaq | ulpt | umct | umodem | umoscom | uplcom | uslcom | uvisor | uvscom) +dev/usb/serial/usb_serial.coptional ucom | u3g | uark | ubsa | ubser | \ +uchcom | ucycom | ufoma | uftdi | \ +ugensa | uipaq | ulpt | umct | \ +umodem | umoscom | uplcom | uslcom | \ +uvisor | uvscom # # USB misc drivers # ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200121 - head/sys/dev/ata
On Sat, Dec 05, 2009 at 01:40:51PM +, Alexander Motin wrote: > Author: mav > Date: Sat Dec 5 13:40:51 2009 > New Revision: 200121 > URL: http://svn.freebsd.org/changeset/base/200121 > > Log: > Do not ignore device interrupt if bus mastering is still active. It is > normal in case of media read error and some ATAPI cases, when transfer size > is unknown beforehand. PCI ATA BM specification tells that in case of such > underrun driver should just manually stop DMA engine. DMA engine should > same time guarantie that all bus mastering transfers completed at the moment > of driver reads interrupt flag asserted. > This change should fix interrupt storms and command timeouts in many cases. > > PR: kern/103602, sparc64/121539, kern/133122, kern/139654 I've a box where I see interrupt storm on. This is 8-STABLE with this patch applied. whiplash# vmstat -i | grep atapci1 irq20: atapci1 17935084 163046 whiplash# top -SH | grep atapci1 12 root -64- 0K 224K WAIT0 1:07 71.19% {irq20: atapci1} The box is totally idle. gstat(8) reports no disk activity whatsoever. whiplash# grep ^ata /var/run/dmesg.boot atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] atapci1: port 0xbc98-0xbc9f,0xbc90-0xbc93,0xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb0-0xfeb003ff irq 20 at device 31.2 on pci0 atapci1: [ITHREAD] ata2: on atapci1 ata2: [ITHREAD] ata3: on atapci1 ata3: [ITHREAD] whiplash# grep 'irq 20' /var/run/dmesg.boot atapci1: port 0xbc98-0xbc9f,0xbc90-0xbc93,0xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb0-0xfeb003ff irq 20 at device 31.2 on pci0 I'm not sure if this is relevant, but I load entire ATA from modules: whiplash# grep ^ata /boot/loader.conf ata_load="YES" atapci_load="YES" atadisk_load="YES" atapicd_load="YES" ataintel_load="YES" Do you have any ideas? > Modified: > head/sys/dev/ata/ata-pci.c > > Modified: head/sys/dev/ata/ata-pci.c > == > --- head/sys/dev/ata/ata-pci.cSat Dec 5 13:12:04 2009 > (r200120) > +++ head/sys/dev/ata/ata-pci.cSat Dec 5 13:40:51 2009 > (r200121) > @@ -462,8 +462,7 @@ ata_pci_status(device_t dev) >(ch->dma.flags & ATA_DMA_ACTIVE))) { > int bmstat = ATA_IDX_INB(ch, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK; > > - if ((bmstat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != > - ATA_BMSTAT_INTERRUPT) > + if ((bmstat & ATA_BMSTAT_INTERRUPT) == 0) > return 0; > ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, bmstat & ~ATA_BMSTAT_ERROR); > DELAY(1); -- Pawel Jakub Dawidek http://www.wheel.pl p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgpBNch0xyB5L.pgp Description: PGP signature
Re: svn commit: r200183 - head/sbin/ipfw
Ermal Luçi wrote: On Mon, Dec 7, 2009 at 5:31 AM, Max Laier [...] > > Do you have a reference for me? I followed the thread but route-to sets the sin_len see this: http://fxr.watson.org/fxr/source/contrib/pf/net/pf.c?v=FREEBSD8#L6179 So if it really is broken, then there must be something else wrong with it. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200183 - head/sbin/ipfw
Julian Elischer wrote: Ermal Luçi wrote: On Mon, Dec 7, 2009 at 5:31 AM, Max Laier [...] > > Do you have a reference for me? I followed the thread but route-to sets the sin_len see this: http://fxr.watson.org/fxr/source/contrib/pf/net/pf.c?v=FREEBSD8#L6179 So if it really is broken, then there must be something else wrong with it. by which I mean, someone who used pf should check if it really is broken. We only have the word of the guy who reported the problem with ipfw that pf "had the same problem". ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200223 - head/sys/dev/siis
Author: mav Date: Mon Dec 7 18:37:50 2009 New Revision: 200223 URL: http://svn.freebsd.org/changeset/base/200223 Log: Explicitly acknowledge MSI completion, as required by SiI3124 datasheet. It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531) still randomly crashing system in few seconds of high MSI rates, generating something inaporopriate, like NMI or "Fatal trap 30". Modified: head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sys/dev/siis/siis.c == --- head/sys/dev/siis/siis.cMon Dec 7 17:18:52 2009(r200222) +++ head/sys/dev/siis/siis.cMon Dec 7 18:37:50 2009(r200223) @@ -143,6 +143,7 @@ siis_attach(device_t dev) if (!(ctlr->r_gmem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_grid, RF_ACTIVE))) return (ENXIO); + ctlr->gctl = ATA_INL(ctlr->r_gmem, SIIS_GCTL); /* Channels memory */ ctlr->r_rid = PCIR_BAR(2); if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -221,7 +222,8 @@ siis_suspend(device_t dev) bus_generic_suspend(dev); /* Put controller into reset state. */ - ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, SIIS_GCTL_GRESET); + ctlr->gctl |= SIIS_GCTL_GRESET; + ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, ctlr->gctl); return 0; } @@ -231,10 +233,13 @@ siis_resume(device_t dev) struct siis_controller *ctlr = device_get_softc(dev); /* Put controller into reset state. */ - ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, SIIS_GCTL_GRESET); + ctlr->gctl |= SIIS_GCTL_GRESET; + ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, ctlr->gctl); DELAY(1); /* Get controller out of reset state and enable port interrupts. */ - ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, 0x000f); + ctlr->gctl &= ~(SIIS_GCTL_GRESET | SIIS_GCTL_I2C_IE); + ctlr->gctl |= 0x000f; + ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, ctlr->gctl); return (bus_generic_resume(dev)); } @@ -288,6 +293,11 @@ siis_intr(void *data) ctlr->interrupt[unit].function(arg); } } + /* Acknowledge interrupt, if MSI enabled. */ + if (ctlr->irq.r_irq_rid) { + ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, + ctlr->gctl | SIIS_GCTL_MSIACK); + } } static struct resource * Modified: head/sys/dev/siis/siis.h == --- head/sys/dev/siis/siis.hMon Dec 7 17:18:52 2009(r200222) +++ head/sys/dev/siis/siis.hMon Dec 7 18:37:50 2009(r200223) @@ -403,6 +403,7 @@ struct siis_controller { } irq; int quirks; int channels; + uint32_tgctl; struct { void(*function)(void *); void*argument; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200224 - stable/8/lib/libc/rpc
Author: jhb Date: Mon Dec 7 19:07:45 2009 New Revision: 200224 URL: http://svn.freebsd.org/changeset/base/200224 Log: MFC 200061: The fd_mask type is an unsigned long, not an int, so treat the mask as a long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. Modified: stable/8/lib/libc/rpc/svc.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/rpc/svc.c == --- stable/8/lib/libc/rpc/svc.c Mon Dec 7 18:37:50 2009(r200223) +++ stable/8/lib/libc/rpc/svc.c Mon Dec 7 19:07:45 2009(r200224) @@ -627,8 +627,8 @@ svc_getreqset(readfds) maskp = readfds->fds_bits; for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) { - for (mask = *maskp++; (bit = ffs(mask)) != 0; - mask ^= (1 << (bit - 1))) { + for (mask = *maskp++; (bit = ffsl(mask)) != 0; + mask ^= (1ul << (bit - 1))) { /* sock has input waiting */ fd = sock + bit - 1; svc_getreq_common(fd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200225 - stable/7/lib/libc/rpc
Author: jhb Date: Mon Dec 7 19:07:58 2009 New Revision: 200225 URL: http://svn.freebsd.org/changeset/base/200225 Log: MFC 200061: The fd_mask type is an unsigned long, not an int, so treat the mask as a long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. Modified: stable/7/lib/libc/rpc/svc.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/rpc/svc.c == --- stable/7/lib/libc/rpc/svc.c Mon Dec 7 19:07:45 2009(r200224) +++ stable/7/lib/libc/rpc/svc.c Mon Dec 7 19:07:58 2009(r200225) @@ -596,8 +596,8 @@ svc_getreqset(readfds) maskp = readfds->fds_bits; for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) { - for (mask = *maskp++; (bit = ffs(mask)) != 0; - mask ^= (1 << (bit - 1))) { + for (mask = *maskp++; (bit = ffsl(mask)) != 0; + mask ^= (1ul << (bit - 1))) { /* sock has input waiting */ fd = sock + bit - 1; svc_getreq_common(fd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200226 - stable/6/lib/libc/rpc
Author: jhb Date: Mon Dec 7 19:08:10 2009 New Revision: 200226 URL: http://svn.freebsd.org/changeset/base/200226 Log: MFC 200061: The fd_mask type is an unsigned long, not an int, so treat the mask as a long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. Modified: stable/6/lib/libc/rpc/svc.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/rpc/svc.c == --- stable/6/lib/libc/rpc/svc.c Mon Dec 7 19:07:58 2009(r200225) +++ stable/6/lib/libc/rpc/svc.c Mon Dec 7 19:08:10 2009(r200226) @@ -598,8 +598,8 @@ svc_getreqset(readfds) maskp = readfds->fds_bits; for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) { - for (mask = *maskp++; (bit = ffs(mask)) != 0; - mask ^= (1 << (bit - 1))) { + for (mask = *maskp++; (bit = ffsl(mask)) != 0; + mask ^= (1ul << (bit - 1))) { /* sock has input waiting */ fd = sock + bit - 1; svc_getreq_common(fd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200227 - head/sys/dev/bge
Author: yongari Date: Mon Dec 7 19:18:23 2009 New Revision: 200227 URL: http://svn.freebsd.org/changeset/base/200227 Log: Remove PHY isolate/power down code in bge_stop(). The isolation handler in brgphy(4) does not exist and brgphy(4) just resets the PHY and returns EINVAL as it has no isolation handler. I also agree on Marius's opinion that stop handler of every NIC driver seems to be the wrong place for implementing PHY isolate/power down. If we need PHY isolate/power down it should be implemented in brgphy(4) and users should administratively down the PHY. Reviewed by: marius Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Mon Dec 7 19:08:10 2009(r200226) +++ head/sys/dev/bge/if_bge.c Mon Dec 7 19:18:23 2009(r200227) @@ -4588,17 +4588,11 @@ static void bge_stop(struct bge_softc *sc) { struct ifnet *ifp; - struct ifmedia_entry *ifm; - struct mii_data *mii = NULL; - int mtmp, itmp; BGE_LOCK_ASSERT(sc); ifp = sc->bge_ifp; - if ((sc->bge_flags & BGE_FLAG_TBI) == 0) - mii = device_get_softc(sc->bge_miibus); - callout_stop(&sc->bge_stat_ch); /* Disable host interrupts. */ @@ -4672,27 +4666,6 @@ bge_stop(struct bge_softc *sc) /* Free TX buffers. */ bge_free_tx_ring(sc); - /* -* Isolate/power down the PHY, but leave the media selection -* unchanged so that things will be put back to normal when -* we bring the interface back up. -*/ - if ((sc->bge_flags & BGE_FLAG_TBI) == 0) { - itmp = ifp->if_flags; - ifp->if_flags |= IFF_UP; - /* -* If we are called from bge_detach(), mii is already NULL. -*/ - if (mii != NULL) { - ifm = mii->mii_media.ifm_cur; - mtmp = ifm->ifm_media; - ifm->ifm_media = IFM_ETHER | IFM_NONE; - mii_mediachg(mii); - ifm->ifm_media = mtmp; - } - ifp->if_flags = itmp; - } - sc->bge_tx_saved_considx = BGE_TXCONS_UNSET; /* Clear MAC's link state (PHY may still have link UP). */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200228 - head/sys/dev/bge
Author: yongari Date: Mon Dec 7 19:26:54 2009 New Revision: 200228 URL: http://svn.freebsd.org/changeset/base/200228 Log: Don't access jumbo frame related registers if controller lacks the feature. These registers are reserved on controllers that have no support for jumbo frame. Only BCM5700 has mini ring so do not poke mini ring related registers if controller is not BCM5700. Reviewed by: marius Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Mon Dec 7 19:18:23 2009(r200227) +++ head/sys/dev/bge/if_bge.c Mon Dec 7 19:26:54 2009(r200228) @@ -1618,11 +1618,13 @@ bge_blockinit(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_RX_JUMBO_RCB_NICADDR, rcb->bge_nicaddr); /* Set up dummy disabled mini ring RCB */ - rcb = &sc->bge_ldata.bge_info.bge_mini_rx_rcb; - rcb->bge_maxlen_flags = - BGE_RCB_MAXLEN_FLAGS(0, BGE_RCB_FLAG_RING_DISABLED); - CSR_WRITE_4(sc, BGE_RX_MINI_RCB_MAXLEN_FLAGS, - rcb->bge_maxlen_flags); + if (sc->bge_asicrev == BGE_ASICREV_BCM5700) { + rcb = &sc->bge_ldata.bge_info.bge_mini_rx_rcb; + rcb->bge_maxlen_flags = + BGE_RCB_MAXLEN_FLAGS(0, BGE_RCB_FLAG_RING_DISABLED); + CSR_WRITE_4(sc, BGE_RX_MINI_RCB_MAXLEN_FLAGS, + rcb->bge_maxlen_flags); + } } /* @@ -1642,7 +1644,9 @@ bge_blockinit(struct bge_softc *sc) else val = BGE_STD_RX_RING_CNT / 8; CSR_WRITE_4(sc, BGE_RBDI_STD_REPL_THRESH, val); - CSR_WRITE_4(sc, BGE_RBDI_JUMBO_REPL_THRESH, BGE_JUMBO_RX_RING_CNT/8); + if (BGE_IS_JUMBO_CAPABLE(sc)) + CSR_WRITE_4(sc, BGE_RBDI_JUMBO_REPL_THRESH, + BGE_JUMBO_RX_RING_CNT/8); /* * Disable all unused send rings by setting the 'ring disabled' @@ -1684,8 +1688,10 @@ bge_blockinit(struct bge_softc *sc) /* Initialize RX ring indexes */ bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, 0); - bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, 0); - bge_writembx(sc, BGE_MBX_RX_MINI_PROD_LO, 0); + if (BGE_IS_JUMBO_CAPABLE(sc)) + bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, 0); + if (sc->bge_asicrev == BGE_ASICREV_BCM5700) + bge_writembx(sc, BGE_MBX_RX_MINI_PROD_LO, 0); /* * Set up RX return ring 0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200183 - head/sbin/ipfw
On Monday 07 December 2009 19:19:15 Julian Elischer wrote: > Julian Elischer wrote: > > Ermal Luçi wrote: > >> On Mon, Dec 7, 2009 at 5:31 AM, Max Laier > > > [...] > > > >> > Do you have a reference for me? > >> > >> I followed the thread but route-to sets the sin_len see this: > >> http://fxr.watson.org/fxr/source/contrib/pf/net/pf.c?v=FREEBSD8#L6179 > > > > So if it really is broken, then there must be something else wrong with > > it. > > by which I mean, someone who used pf should check if it really is > broken. We only have the word of the guy who reported the problem with > ipfw that pf "had the same problem". I just tested an install of r197983 (9.0-CURRENT) that I had on a test-box and route-to works as it is supposed to - AFAICT. FWIW, pf sets sin_len for every use. Might be a problem/mis-understanding in the OPs configuration that is the issue here? I'll follow up to the thread on -net@ is a second. -- Max ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200229 - in stable/8: lib/libc/sys sys/kern sys/sys
Author: delphij Date: Mon Dec 7 19:59:28 2009 New Revision: 200229 URL: http://svn.freebsd.org/changeset/base/200229 Log: MFC revision 197579 and 199617: Add two new fcntls to enable/disable read-ahead: - F_READAHEAD: specify the amount for sequential access. The amount is specified in bytes and is rounded up to nearest block size. - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential access size. A third argument of zero disables the read-ahead behavior. Please note that the read-ahead amount is also constrainted by sysctl variable, vfs.read_max, which may need to be raised in order to better utilize this feature. Thanks Igor Sysoev for proposing the feature and submitting the original version, and kib@ for his valuable comments. Modified: stable/8/lib/libc/sys/fcntl.2 stable/8/sys/kern/kern_descrip.c stable/8/sys/kern/vfs_vnops.c stable/8/sys/sys/fcntl.h Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/lib/libc/sys/fcntl.2 == --- stable/8/lib/libc/sys/fcntl.2 Mon Dec 7 19:26:54 2009 (r200228) +++ stable/8/lib/libc/sys/fcntl.2 Mon Dec 7 19:59:28 2009 (r200229) @@ -28,7 +28,7 @@ .\" @(#)fcntl.28.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd March 8, 2008 +.Dd September 28, 2009 .Dt FCNTL 2 .Os .Sh NAME @@ -241,6 +241,22 @@ will be interrupted if the signal handle .Dv SA_RESTART (see .Xr sigaction 2 ) . +.It Dv F_READAHEAD +Set or clear the read ahead amount for sequential access to the third +argument, +.Fa arg , +which is rounded up to the nearest block size. +A zero value in +.Fa arg +turns off read ahead. +.It Dv F_RDAHEAD +Equivalent to Darwin counterpart which sets read ahead amount of 128KB +when the third argument, +.Fa arg +is non-zero. +A zero value in +.Fa arg +turns off read ahead. .El .Pp When a shared lock has been set on a segment of a file, Modified: stable/8/sys/kern/kern_descrip.c == --- stable/8/sys/kern/kern_descrip.cMon Dec 7 19:26:54 2009 (r200228) +++ stable/8/sys/kern/kern_descrip.cMon Dec 7 19:59:28 2009 (r200229) @@ -421,6 +421,8 @@ kern_fcntl(struct thread *td, int fd, in struct vnode *vp; int error, flg, tmp; int vfslocked; + u_int old, new; + uint64_t bsize; vfslocked = 0; error = 0; @@ -686,6 +688,49 @@ kern_fcntl(struct thread *td, int fd, in vfslocked = 0; fdrop(fp, td); break; + + case F_RDAHEAD: + arg = arg ? 128 * 1024: 0; + /* FALLTHROUGH */ + case F_READAHEAD: + FILEDESC_SLOCK(fdp); + if ((fp = fdtofp(fd, fdp)) == NULL) { + FILEDESC_SUNLOCK(fdp); + error = EBADF; + break; + } + if (fp->f_type != DTYPE_VNODE) { + FILEDESC_SUNLOCK(fdp); + error = EBADF; + break; + } + fhold(fp); + FILEDESC_SUNLOCK(fdp); + if (arg != 0) { + vp = fp->f_vnode; + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + error = vn_lock(vp, LK_SHARED); + if (error != 0) + goto readahead_vnlock_fail; + bsize = fp->f_vnode->v_mount->mnt_stat.f_iosize; + VOP_UNLOCK(vp, 0); + fp->f_seqcount = (arg + bsize - 1) / bsize; + do { + new = old = fp->f_flag; + new |= FRDAHEAD; + } while (!atomic_cmpset_rel_int(&fp->f_flag, old, new)); +readahead_vnlock_fail: + VFS_UNLOCK_GIANT(vfslocked); + vfslocked = 0; + } else { + do { + new = old = fp->f_flag; + new &= ~FRDAHEAD; + } while (!atomic_cmpset_rel_int(&fp->f_flag, old, new)); + } + fdrop(fp, td); + break; + default: error = EINVAL; break; Modified: stable/8/sys/kern/vfs_vnops.c == --- stable/8/sys/kern/vfs_vnops.c Mon Dec 7 1
svn commit: r200230 - in head/sys/dev: puc uart
Author: marcel Date: Mon Dec 7 20:05:02 2009 New Revision: 200230 URL: http://svn.freebsd.org/changeset/base/200230 Log: Add support for the NetMos NM9865 family of Serial/Parallel ports. Obtained from:NetMos MCS9865 v1.0.0.1 driver MFC after:3 days Modified: head/sys/dev/puc/pucdata.c head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/puc/pucdata.c == --- head/sys/dev/puc/pucdata.c Mon Dec 7 19:59:28 2009(r200229) +++ head/sys/dev/puc/pucdata.c Mon Dec 7 20:05:02 2009(r200230) @@ -168,10 +168,10 @@ const struct puc_cfg puc_pci_devices[] = { 0x10e8, 0x818e, 0x, 0, "Applied Micro Circuits 8 Port UART", -DEFAULT_RCLK, -PUC_PORT_8S, 0x14, -1, -1, + DEFAULT_RCLK, + PUC_PORT_8S, 0x14, -1, -1, .config_function = puc_config_amc -}, + }, { 0x11fe, 0x8010, 0x, 0, "Comtrol RocketPort 550/8 RJ11 part A", @@ -808,6 +808,42 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_4S1P, 0x10, 4, 0, }, + { 0x9710, 0x9865, 0xa000, 0x3002, + "NetMos NM9865 Dual UART", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3003, + "NetMos NM9865 Triple UART", + DEFAULT_RCLK, + PUC_PORT_3S, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3004, + "NetMos NM9865 Quad UART", + DEFAULT_RCLK, + PUC_PORT_4S, 0x10, 4, 0,0 + }, + + { 0x9710, 0x9865, 0xa000, 0x3011, + "NetMos NM9865 Single UART and 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_1S1P, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3012, + "NetMos NM9865 Dual UART and 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_2S1P, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3020, + "NetMos NM9865 Dual 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_2P, 0x10, 4, 0, + }, + { 0xb00c, 0x021c, 0x, 0, "IC Book Labs Gunboat x4 Lite", DEFAULT_RCLK, Modified: head/sys/dev/uart/uart_bus_pci.c == --- head/sys/dev/uart/uart_bus_pci.cMon Dec 7 19:59:28 2009 (r200229) +++ head/sys/dev/uart/uart_bus_pci.cMon Dec 7 20:05:02 2009 (r200230) @@ -111,6 +111,7 @@ static struct pci_id pci_ns8250_ids[] = 0x10, 16384000 }, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, +{ 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, { 0xdeaf, 0x9051, 0x, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0x, 0, 0x, 0, NULL, 0, 0} }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200183 - head/sbin/ipfw
Hi! On Mon, Dec 7, 2009 at 10:29 PM, Max Laier wrote: [cut] > I just tested an install of r197983 (9.0-CURRENT) that I had on a test-box and > route-to works as it is supposed to - AFAICT. FWIW, pf sets sin_len for every > use. > > Might be a problem/mis-understanding in the OPs configuration that is the > issue here? > > I'll follow up to the thread on -net@ is a second. I posted my pf config in original message to -net@: = scrub in all fragment reassemble pass in all flags S/SA keep state pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 to any flags S/SA keep state = Pretty simple. Even when forward is disabled packets that are matched by route-to rule are forwarded to default gateway instead of specified in route-to. And I checked rtalloc_ign_fib() arguments when using pf - seems that pf does not use this function to lookup route-to route. +sem@ -- Regards, Boris Lytochkin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200231 - head/sys/dev/mfi
Author: jkim Date: Mon Dec 7 20:17:33 2009 New Revision: 200231 URL: http://svn.freebsd.org/changeset/base/200231 Log: Make mfi(4) little bit less chatty. Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Mon Dec 7 20:05:02 2009(r200230) +++ head/sys/dev/mfi/mfi.c Mon Dec 7 20:17:33 2009(r200231) @@ -1081,9 +1081,22 @@ static void mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) { - device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, - format_timestamp(detail->time), detail->class.members.locale, - format_class(detail->class.members.class), detail->description); + switch (detail->class.members.class) { + case MFI_EVT_CLASS_DEBUG: + case MFI_EVT_CLASS_PROGRESS: + case MFI_EVT_CLASS_INFO: +#ifndef MFI_DEBUG + if (!bootverbose) + return; + /* FALLTHROUGH */ +#endif + default: + device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", + detail->seq, format_timestamp(detail->time), + detail->class.members.locale, + format_class(detail->class.members.class), + detail->description); + } } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200184 - stable/8/sbin/ipfw
On Sun, Dec 06, 2009 at 07:01:33PM +, Luigi Rizzo wrote: > Author: luigi > Date: Sun Dec 6 19:01:33 2009 > New Revision: 200184 > URL: http://svn.freebsd.org/changeset/base/200184 > > Log: > mfc r200056 > use qsort_r instead of heapsort; This seems like a move in the wrong direction. The use of a recursive algorithm in the kernel seems generally ill-advised and I was rather disturbed when I found we had a quick sort implementation in libkern. Unless you know the number of items is small, quick sort isn't safe and if the number is small, heap sort is plenty efficient. -- Brooks pgpcP8yaWCIxD.pgp Description: PGP signature
Re: svn commit: r200183 - head/sbin/ipfw
On Mon, Dec 7, 2009 at 8:45 PM, Lytochkin Boris wrote: > Hi! > > On Mon, Dec 7, 2009 at 10:29 PM, Max Laier wrote: > [cut] > > I just tested an install of r197983 (9.0-CURRENT) that I had on a > test-box and > > route-to works as it is supposed to - AFAICT. FWIW, pf sets sin_len for > every > > use. > > > > Might be a problem/mis-understanding in the OPs configuration that is the > > issue here? > > > > I'll follow up to the thread on -net@ is a second. > > I posted my pf config in original message to -net@: > = > scrub in all fragment reassemble > pass in all flags S/SA keep state > pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 > to any flags S/SA keep state > = > > Pretty simple. Even when forward is disabled packets that are matched > by route-to rule are forwarded to default gateway instead of specified > in route-to. And I checked rtalloc_ign_fib() arguments when using pf - > seems that pf does not use this function to lookup route-to route. > > +sem@ > > My crystal ball is broken. Explain your freebsd config, your network topology, some debug output and then it can be considered useful. There are many people using route-to on FreeBSD 8 so it would have come up before. > -- > Regards, > Boris Lytochkin > -- Ermal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200183 - head/sbin/ipfw
there are multiple addresses on em0 (for example): 95.108.197.225/27 10.60.128.225/24 10.61.128.225/24 ... 10.70.128.225/24 default router is in 95.108.197.225/27 network. 10.X addresses are used for SLB - SLB router does DNAT and forward client's connection to this node, so node should forward all packets from 10.X addresses to .254 - SLB router IPs. ipfw config would be something like ipfw add 60 fwd 10.60.128.254 ip from 10.60.128.0/24 to any out ipfw add 61 fwd 10.61.128.254 ip from 10.61.128.0/24 to any out ... ipfw add 70 fwd 10.70.128.254 ip from 10.70.128.0/24 to any out allow 65534 ip from any to any pf variant will be accordingly scrub in all fragment reassemble pass in all flags S/SA keep state pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 to any flags S/SA keep state ... pass out quick route-to (em0 10.60.128.254) inet from 10.70.128.0/24 to any flags S/SA keep state My box is a cluster node, not router, just simple policy-based routing required On Mon, Dec 7, 2009 at 11:21 PM, Ermal Luçi wrote: > > > On Mon, Dec 7, 2009 at 8:45 PM, Lytochkin Boris wrote: >> >> Hi! >> >> On Mon, Dec 7, 2009 at 10:29 PM, Max Laier wrote: >> [cut] >> > I just tested an install of r197983 (9.0-CURRENT) that I had on a >> > test-box and >> > route-to works as it is supposed to - AFAICT. FWIW, pf sets sin_len for >> > every >> > use. >> > >> > Might be a problem/mis-understanding in the OPs configuration that is >> > the >> > issue here? >> > >> > I'll follow up to the thread on -net@ is a second. >> >> I posted my pf config in original message to -net@: >> = >> scrub in all fragment reassemble >> pass in all flags S/SA keep state >> pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 >> to any flags S/SA keep state >> = >> >> Pretty simple. Even when forward is disabled packets that are matched >> by route-to rule are forwarded to default gateway instead of specified >> in route-to. And I checked rtalloc_ign_fib() arguments when using pf - >> seems that pf does not use this function to lookup route-to route. >> >> +sem@ >> > > My crystal ball is broken. > Explain your freebsd config, your network topology, some debug output and > then it can be considered useful. > > There are many people using route-to on FreeBSD 8 so it would have come up > before. > >> >> -- >> Regards, >> Boris Lytochkin > > > > -- > Ermal > ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200232 - stable/8/sys/dev/hwpmc
Author: fabient Date: Mon Dec 7 20:40:48 2009 New Revision: 200232 URL: http://svn.freebsd.org/changeset/base/200232 Log: MFC 198432: Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if there are PMCs on the CPU that belong to the class. Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c == --- stable/8/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:17:33 2009 (r200231) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:40:48 2009 (r200232) @@ -1954,11 +1954,21 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); - - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - + if (core_iaf_npmc > 0) { + iaf_initialize(md, maxcpu, core_iaf_npmc, + core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << + IAF_OFFSET; + } else { + /* +* Adjust the number of classes exported to +* user space. +*/ + md->pmd_nclass--; + KASSERT(md->pmd_nclass == 2, + ("[core,%d] unexpected nclass %d", __LINE__, + md->pmd_nclass)); + } } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200233 - stable/8/lib/libpmc
Author: fabient Date: Mon Dec 7 20:44:43 2009 New Revision: 200233 URL: http://svn.freebsd.org/changeset/base/200233 Log: MFC 198433: Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function counters. For such CPUs, use an alternate mapping of convenience names to events supported by PMC_CLASS_IAP programmable counters. Modified: stable/8/lib/libpmc/libpmc.c Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/libpmc.c == --- stable/8/lib/libpmc/libpmc.cMon Dec 7 20:40:48 2009 (r200232) +++ stable/8/lib/libpmc/libpmc.cMon Dec 7 20:44:43 2009 (r200233) @@ -442,6 +442,10 @@ static struct pmc_event_alias core_alias /* * Intel Core2 (Family 6, Model F), Core2Extreme (Family 6, Model 17H) * and Atom (Family 6, model 1CH) PMCs. + * + * We map aliases to events on the fixed-function counters if these + * are present. Note that not all CPUs in this family contain fixed-function + * counters. */ static struct pmc_event_alias core2_aliases[] = { @@ -454,8 +458,22 @@ static struct pmc_event_alias core2_alia EV_ALIAS("unhalted-cycles", "iaf-cpu-clk-unhalted.core"), EV_ALIAS(NULL, NULL) }; -#defineatom_aliasescore2_aliases -#define corei7_aliases core2_aliases + +static struct pmc_event_alias core2_aliases_without_iaf[] = { + EV_ALIAS("branches","iap-br-inst-retired.any"), + EV_ALIAS("branch-mispredicts", "iap-br-inst-retired.mispred"), + EV_ALIAS("cycles", "tsc-tsc"), + EV_ALIAS("ic-misses", "iap-l1i-misses"), + EV_ALIAS("instructions","iap-inst-retired.any_p"), + EV_ALIAS("interrupts", "iap-hw-int-rcv"), + EV_ALIAS("unhalted-cycles", "iap-cpu-clk-unhalted.core_p"), + EV_ALIAS(NULL, NULL) +}; + +#defineatom_aliasescore2_aliases +#defineatom_aliases_without_iafcore2_aliases_without_iaf +#define corei7_aliases core2_aliases +#define corei7_aliases_without_iaf core2_aliases_without_iaf #defineIAF_KW_OS "os" #defineIAF_KW_USR "usr" @@ -2379,6 +2397,10 @@ pmc_init(void) uint32_t abi_version; struct module_stat pmc_modstat; struct pmc_op_getcpuinfo op_cpu_info; +#if defined(__amd64__) || defined(__i386__) + int cpu_has_iaf_counters; + unsigned int t; +#endif if (pmc_syscall != -1) /* already inited */ return (0); @@ -2420,6 +2442,8 @@ pmc_init(void) if (pmc_class_table == NULL) return (-1); + for (n = 0; n < PMC_CLASS_TABLE_SIZE; n++) + pmc_class_table[n] = NULL; /* * Fill in the class table. @@ -2427,6 +2451,14 @@ pmc_init(void) n = 0; #if defined(__amd64__) || defined(__i386__) pmc_class_table[n++] = &tsc_class_table_descr; + + /* +* Check if this CPU has fixed function counters. +*/ + cpu_has_iaf_counters = 0; + for (t = 0; t < cpu_info.pm_nclass; t++) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + cpu_has_iaf_counters = 1; #endif #definePMC_MDEP_INIT(C) do { \ @@ -2436,6 +2468,16 @@ pmc_init(void) PMC_TABLE_SIZE(C##_pmc_classes);\ } while (0) +#definePMC_MDEP_INIT_INTEL_V2(C) do { \ + PMC_MDEP_INIT(C); \ + if (cpu_has_iaf_counters) \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + else\ + pmc_mdep_event_aliases =\ + C##_aliases_without_iaf;\ + pmc_class_table[n] = &C##_class_table_descr;\ + } while (0) + /* Configure the event name parser. */ switch (cpu_info.pm_cputype) { #if defined(__i386__) @@ -2461,24 +2503,17 @@ pmc_init(void) pmc_class_table[n] = &k8_class_table_descr; break; case PMC_CPU_INTEL_ATOM: - PMC_MDEP_INIT(atom); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_class_table[n] = &atom_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(atom); break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); - pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: - PMC_MDEP_INIT(core2); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_
svn commit: r200234 - stable/7/sys/dev/hwpmc
Author: fabient Date: Mon Dec 7 20:46:22 2009 New Revision: 200234 URL: http://svn.freebsd.org/changeset/base/200234 Log: MFC 198432: Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if there are PMCs on the CPU that belong to the class. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c == --- stable/7/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:44:43 2009 (r200233) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:46:22 2009 (r200234) @@ -1954,11 +1954,21 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); - - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - + if (core_iaf_npmc > 0) { + iaf_initialize(md, maxcpu, core_iaf_npmc, + core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << + IAF_OFFSET; + } else { + /* +* Adjust the number of classes exported to +* user space. +*/ + md->pmd_nclass--; + KASSERT(md->pmd_nclass == 2, + ("[core,%d] unexpected nclass %d", __LINE__, + md->pmd_nclass)); + } } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200235 - stable/7/lib/libpmc
Author: fabient Date: Mon Dec 7 20:47:33 2009 New Revision: 200235 URL: http://svn.freebsd.org/changeset/base/200235 Log: MFC 198433: Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function counters. For such CPUs, use an alternate mapping of convenience names to events supported by PMC_CLASS_IAP programmable counters. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c == --- stable/7/lib/libpmc/libpmc.cMon Dec 7 20:46:22 2009 (r200234) +++ stable/7/lib/libpmc/libpmc.cMon Dec 7 20:47:33 2009 (r200235) @@ -442,6 +442,10 @@ static struct pmc_event_alias core_alias /* * Intel Core2 (Family 6, Model F), Core2Extreme (Family 6, Model 17H) * and Atom (Family 6, model 1CH) PMCs. + * + * We map aliases to events on the fixed-function counters if these + * are present. Note that not all CPUs in this family contain fixed-function + * counters. */ static struct pmc_event_alias core2_aliases[] = { @@ -454,8 +458,22 @@ static struct pmc_event_alias core2_alia EV_ALIAS("unhalted-cycles", "iaf-cpu-clk-unhalted.core"), EV_ALIAS(NULL, NULL) }; -#defineatom_aliasescore2_aliases -#define corei7_aliases core2_aliases + +static struct pmc_event_alias core2_aliases_without_iaf[] = { + EV_ALIAS("branches","iap-br-inst-retired.any"), + EV_ALIAS("branch-mispredicts", "iap-br-inst-retired.mispred"), + EV_ALIAS("cycles", "tsc-tsc"), + EV_ALIAS("ic-misses", "iap-l1i-misses"), + EV_ALIAS("instructions","iap-inst-retired.any_p"), + EV_ALIAS("interrupts", "iap-hw-int-rcv"), + EV_ALIAS("unhalted-cycles", "iap-cpu-clk-unhalted.core_p"), + EV_ALIAS(NULL, NULL) +}; + +#defineatom_aliasescore2_aliases +#defineatom_aliases_without_iafcore2_aliases_without_iaf +#define corei7_aliases core2_aliases +#define corei7_aliases_without_iaf core2_aliases_without_iaf #defineIAF_KW_OS "os" #defineIAF_KW_USR "usr" @@ -2379,6 +2397,10 @@ pmc_init(void) uint32_t abi_version; struct module_stat pmc_modstat; struct pmc_op_getcpuinfo op_cpu_info; +#if defined(__amd64__) || defined(__i386__) + int cpu_has_iaf_counters; + unsigned int t; +#endif if (pmc_syscall != -1) /* already inited */ return (0); @@ -2420,6 +2442,8 @@ pmc_init(void) if (pmc_class_table == NULL) return (-1); + for (n = 0; n < PMC_CLASS_TABLE_SIZE; n++) + pmc_class_table[n] = NULL; /* * Fill in the class table. @@ -2427,6 +2451,14 @@ pmc_init(void) n = 0; #if defined(__amd64__) || defined(__i386__) pmc_class_table[n++] = &tsc_class_table_descr; + + /* +* Check if this CPU has fixed function counters. +*/ + cpu_has_iaf_counters = 0; + for (t = 0; t < cpu_info.pm_nclass; t++) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + cpu_has_iaf_counters = 1; #endif #definePMC_MDEP_INIT(C) do { \ @@ -2436,6 +2468,16 @@ pmc_init(void) PMC_TABLE_SIZE(C##_pmc_classes);\ } while (0) +#definePMC_MDEP_INIT_INTEL_V2(C) do { \ + PMC_MDEP_INIT(C); \ + if (cpu_has_iaf_counters) \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + else\ + pmc_mdep_event_aliases =\ + C##_aliases_without_iaf;\ + pmc_class_table[n] = &C##_class_table_descr;\ + } while (0) + /* Configure the event name parser. */ switch (cpu_info.pm_cputype) { #if defined(__i386__) @@ -2461,24 +2503,17 @@ pmc_init(void) pmc_class_table[n] = &k8_class_table_descr; break; case PMC_CPU_INTEL_ATOM: - PMC_MDEP_INIT(atom); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_class_table[n] = &atom_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(atom); break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); - pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: - PMC_MDEP_INIT(core2); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_
svn commit: r200236 - stable/8/sys/dev/hwpmc
Author: fabient Date: Mon Dec 7 20:49:49 2009 New Revision: 200236 URL: http://svn.freebsd.org/changeset/base/200236 Log: MFC 200060: Use a better check for a valid kernel stack address when capturing kernel call chains. Modified: stable/8/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_x86.c == --- stable/8/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:47:33 2009 (r200235) +++ stable/8/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:49:49 2009 (r200236) @@ -176,7 +176,8 @@ pmc_save_kernel_callchain(uintptr_t *cc, stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; if (PMC_IN_TRAP_HANDLER(pc) || - !PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL(r) || + !PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(r, stackstart, stackend) || !PMC_IN_KERNEL_STACK(sp, stackstart, stackend) || !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) return (1); @@ -221,7 +222,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, r = fp + sizeof(uintptr_t); if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend) || - !PMC_IN_KERNEL(r)) + !PMC_IN_KERNEL_STACK(r, stackstart, stackend)) break; pc = *(uintptr_t *) r; fp = *(uintptr_t *) fp; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200237 - stable/7/sys/dev/hwpmc
Author: fabient Date: Mon Dec 7 20:51:19 2009 New Revision: 200237 URL: http://svn.freebsd.org/changeset/base/200237 Log: MFC 200060: Use a better check for a valid kernel stack address when capturing kernel call chains. Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c == --- stable/7/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:49:49 2009 (r200236) +++ stable/7/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:51:19 2009 (r200237) @@ -176,7 +176,8 @@ pmc_save_kernel_callchain(uintptr_t *cc, stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; if (PMC_IN_TRAP_HANDLER(pc) || - !PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL(r) || + !PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(r, stackstart, stackend) || !PMC_IN_KERNEL_STACK(sp, stackstart, stackend) || !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) return (1); @@ -221,7 +222,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, r = fp + sizeof(uintptr_t); if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend) || - !PMC_IN_KERNEL(r)) + !PMC_IN_KERNEL_STACK(r, stackstart, stackend)) break; pc = *(uintptr_t *) r; fp = *(uintptr_t *) fp; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200231 - head/sys/dev/mfi
On Monday 07 December 2009 3:17:33 pm Jung-uk Kim wrote: > Author: jkim > Date: Mon Dec 7 20:17:33 2009 > New Revision: 200231 > URL: http://svn.freebsd.org/changeset/base/200231 > > Log: > Make mfi(4) little bit less chatty. This is the wrong way to fix this, please revert. If you want to change the default, then change it here instead (from mfi.c): static int mfi_event_class = MFI_EVT_CLASS_INFO; TUNABLE_INT("hw.mfi.event_class", &mfi_event_class); SYSCTL_INT(_hw_mfi, OID_AUTO, event_class, CTLFLAG_RW, &mfi_event_class, 0, "event message class"); Note that you can also just adjust it locally by setting the loader tunable or sysctl. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200183 - head/sbin/ipfw
Oups, everything is OK with route-to and reply-to in pf, my bad. config for my situation must be like this scrub in all fragment reassemble pass in quick reply-to (em0 10.60.128.254) inet from any to 10.60.128.0/24 flags S/SA keep state pass in quick reply-to (em0 10.70.128.254) inet from any to 10.70.128.0/24 flags S/SA keep state pass in quick reply-to (em0 10.71.128.254) inet from any to 10.71.128.0/24 flags S/SA keep state pass in quick reply-to (em0 10.72.128.254) inet from any to 10.72.128.0/24 flags S/SA keep state pass in quick all flags S/SA keep state or incoming traffic whould create keep-state wit pass in and would not go down to route-to rules. or use per-interface keep states. On Mon, Dec 7, 2009 at 11:30 PM, Lytochkin Boris wrote: > there are multiple addresses on em0 (for example): > > 95.108.197.225/27 > 10.60.128.225/24 > 10.61.128.225/24 > ... > 10.70.128.225/24 > > default router is in 95.108.197.225/27 network. > > 10.X addresses are used for SLB - SLB router does DNAT and forward > client's connection to this node, so node should forward all packets > from 10.X addresses to .254 - SLB router IPs. > > ipfw config would be something like > > ipfw add 60 fwd 10.60.128.254 ip from 10.60.128.0/24 to any out > ipfw add 61 fwd 10.61.128.254 ip from 10.61.128.0/24 to any out > ... > ipfw add 70 fwd 10.70.128.254 ip from 10.70.128.0/24 to any out > allow 65534 ip from any to any > > > pf variant will be accordingly > > scrub in all fragment reassemble > pass in all flags S/SA keep state > pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 > to any flags S/SA keep state > ... > pass out quick route-to (em0 10.60.128.254) inet from 10.70.128.0/24 > to any flags S/SA keep state > > > My box is a cluster node, not router, just simple policy-based routing > required > > > > On Mon, Dec 7, 2009 at 11:21 PM, Ermal Luçi wrote: >> >> >> On Mon, Dec 7, 2009 at 8:45 PM, Lytochkin Boris wrote: >>> >>> Hi! >>> >>> On Mon, Dec 7, 2009 at 10:29 PM, Max Laier wrote: >>> [cut] >>> > I just tested an install of r197983 (9.0-CURRENT) that I had on a >>> > test-box and >>> > route-to works as it is supposed to - AFAICT. FWIW, pf sets sin_len for >>> > every >>> > use. >>> > >>> > Might be a problem/mis-understanding in the OPs configuration that is >>> > the >>> > issue here? >>> > >>> > I'll follow up to the thread on -net@ is a second. >>> >>> I posted my pf config in original message to -net@: >>> = >>> scrub in all fragment reassemble >>> pass in all flags S/SA keep state >>> pass out quick route-to (em0 10.60.128.254) inet from 10.60.128.0/24 >>> to any flags S/SA keep state >>> = >>> >>> Pretty simple. Even when forward is disabled packets that are matched >>> by route-to rule are forwarded to default gateway instead of specified >>> in route-to. And I checked rtalloc_ign_fib() arguments when using pf - >>> seems that pf does not use this function to lookup route-to route. >>> >>> +sem@ >>> >> >> My crystal ball is broken. >> Explain your freebsd config, your network topology, some debug output and >> then it can be considered useful. >> >> There are many people using route-to on FreeBSD 8 so it would have come up >> before. >> >>> >>> -- >>> Regards, >>> Boris Lytochkin >> >> >> >> -- >> Ermal >> > ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200184 - stable/8/sbin/ipfw
On Mon, Dec 07, 2009 at 02:17:44PM -0600, Brooks Davis wrote: > On Sun, Dec 06, 2009 at 07:01:33PM +, Luigi Rizzo wrote: > > Author: luigi > > Date: Sun Dec 6 19:01:33 2009 > > New Revision: 200184 > > URL: http://svn.freebsd.org/changeset/base/200184 > > > > Log: > > mfc r200056 > > use qsort_r instead of heapsort; > > This seems like a move in the wrong direction. The use of a recursive > algorithm in the kernel seems generally ill-advised and I was rather > disturbed when I found we had a quick sort implementation in libkern. > > Unless you know the number of items is small, quick sort isn't safe and > if the number is small, heap sort is plenty efficient. Woops, it was pointed out to me that this was the userspace part where qsort is just fine. :) -- Brooks pgpe18wSXCQjR.pgp Description: PGP signature
Re: svn commit: r200231 - head/sys/dev/mfi
On Monday 07 December 2009 03:34 pm, John Baldwin wrote: > On Monday 07 December 2009 3:17:33 pm Jung-uk Kim wrote: > > Author: jkim > > Date: Mon Dec 7 20:17:33 2009 > > New Revision: 200231 > > URL: http://svn.freebsd.org/changeset/base/200231 > > > > Log: > > Make mfi(4) little bit less chatty. > > This is the wrong way to fix this, please revert. If you want to > change the default, then change it here instead (from mfi.c): > > static intmfi_event_class = MFI_EVT_CLASS_INFO; > TUNABLE_INT("hw.mfi.event_class", &mfi_event_class); > SYSCTL_INT(_hw_mfi, OID_AUTO, event_class, CTLFLAG_RW, > &mfi_event_class, 0, "event message class"); > > Note that you can also just adjust it locally by setting the loader > tunable or sysctl. Hmm... I was reading a wrong tree before your change, sorry. Jung-uk Kim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200238 - head/sys/dev/mfi
Author: jkim Date: Mon Dec 7 21:24:07 2009 New Revision: 200238 URL: http://svn.freebsd.org/changeset/base/200238 Log: Revert r200231. It was already taken cared by jhb long ago. Pointed out by: jhb Pointy hat: jkim Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Mon Dec 7 20:51:19 2009(r200237) +++ head/sys/dev/mfi/mfi.c Mon Dec 7 21:24:07 2009(r200238) @@ -1081,22 +1081,9 @@ static void mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) { - switch (detail->class.members.class) { - case MFI_EVT_CLASS_DEBUG: - case MFI_EVT_CLASS_PROGRESS: - case MFI_EVT_CLASS_INFO: -#ifndef MFI_DEBUG - if (!bootverbose) - return; - /* FALLTHROUGH */ -#endif - default: - device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", - detail->seq, format_timestamp(detail->time), - detail->class.members.locale, - format_class(detail->class.members.class), - detail->description); - } + device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, + format_timestamp(detail->time), detail->class.members.locale, + format_class(detail->class.members.class), detail->description); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200239 - head/sys/dev/ixgbe
Author: jfv Date: Mon Dec 7 21:30:54 2009 New Revision: 200239 URL: http://svn.freebsd.org/changeset/base/200239 Log: Update driver to Intel version 2.0.7: This adds new feature support for the 82599, a hardware assist to LRO, doing this required a large revamp to the RX cleanup code because the descriptor ring may not be processed out of order, this necessitated the elimination of global pointers. Additionally, the RX routine now does not refresh mbufs on every descriptor, rather it will do a range, and then update the hardware pointer at that time. These are performance oriented changes. The TX side now has a cleaner simpler watchdog algorithm as well, in TX cleanup a read of ticks is stored, that can then be compared in local_timer to determine if there is a hang. Various other cleanups along the way, thanks to all who have provided input and testing. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Dec 7 21:24:07 2009(r200238) +++ head/sys/dev/ixgbe/ixgbe.c Mon Dec 7 21:30:54 2009(r200239) @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "1.8.9"; +char ixgbe_driver_version[] = "2.0.7"; /* * PCI Device ID Table @@ -64,16 +64,19 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, 0, 0, 0}, - {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} }; @@ -102,7 +105,6 @@ static int ixgbe_mq_start_locked(struct static voidixgbe_qflush(struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); -static void ixgbe_watchdog(struct adapter *); static void ixgbe_init(void *); static void ixgbe_init_locked(struct adapter *); static void ixgbe_stop(void *); @@ -116,8 +118,8 @@ static int ixgbe_allocate_queues(struct static int ixgbe_setup_msix(struct adapter *); static voidixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); -static int ixgbe_hardware_init(struct adapter *); static void ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_link(struct adapter *); static int ixgbe_allocate_transmit_buffers(struct tx_ring *); static int ixgbe_setup_transmit_structures(struct adapter *); @@ -132,6 +134,7 @@ static int ixgbe_setup_receive_ring(stru static void ixgbe_initialize_receive_units(struct adapter *); static void ixgbe_free_receive_structures(struct adapter *); static void ixgbe_free_receive_buffers(struct rx_ring *); +static voidixgbe_setup_hw_rsc(struct rx_ring *); static voidixgbe_init_moderation(struct adapter *); static void ixgbe_enable_intr(struct adapter *); @@ -146,7 +149,7 @@ static void ixgbe_set_multi(struct a static void ixgbe_print_hw_stats(struct adapter *); static voidixgbe_print_debug_info(struct adapter *); static void ixgbe_update_link_status(struct adapter *); -static int ixgbe_get_buf(struct rx_ring *, int, u8); +static int ixgbe_get_buf(struct rx_ring *, int, int); static int ixgbe_xm
Re: svn commit: r200238 - head/sys/dev/mfi
On Monday 07 December 2009 04:24 pm, Jung-uk Kim wrote: > Author: jkim > Date: Mon Dec 7 21:24:07 2009 > New Revision: 200238 > URL: http://svn.freebsd.org/changeset/base/200238 > > Log: > Revert r200231. It was already taken cared by jhb long ago. ^ and ambrisko. Jung-uk Kim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r200238 - head/sys/dev/mfi
On Monday 07 December 2009 4:24:07 pm Jung-uk Kim wrote: > Author: jkim > Date: Mon Dec 7 21:24:07 2009 > New Revision: 200238 > URL: http://svn.freebsd.org/changeset/base/200238 > > Log: > Revert r200231. It was already taken cared by jhb long ago. > > Pointed out by: jhb > Pointy hat: jkim Thanks. No pointy hat needed though. :) -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200240 - head/sys/ia64/ia64
Author: marcel Date: Tue Dec 8 00:44:23 2009 New Revision: 200240 URL: http://svn.freebsd.org/changeset/base/200240 Log: In exception_save, write-back ar.rnat after switching the backing- store. Writing to ar.bspstore is defined to leave ar.rnat undefined. PR: ia64/120315 MFC after:3 days Modified: head/sys/ia64/ia64/exception.S Modified: head/sys/ia64/ia64/exception.S == --- head/sys/ia64/ia64/exception.S Mon Dec 7 21:30:54 2009 (r200239) +++ head/sys/ia64/ia64/exception.S Tue Dec 8 00:44:23 2009 (r200240) @@ -228,43 +228,42 @@ exception_save_restart: (p13) dep r20=r20,r21,0,9 // align dirty registers ;; } - // r20=bspstore, r22=iip, r23=ipsr + // r19=rnat, r20=bspstore, r22=iip, r23=ipsr { .mmi st8 [r31]=r23,16// psr (p13) mov ar.bspstore=r20 nop 0 ;; } -{ .mmi +{ .mmb +(p13) mov ar.rnat=r19 mov r18=ar.bsp - ;; - mov r19=cr.ifs - sub r18=r18,r20 + nop 0 ;; } { .mmi + mov r19=cr.ifs st8.spill [r30]=gp,16 // gp - st8 [r31]=r18,16// ndirty - nop 0 + sub r18=r18,r20 ;; } // r19=ifs, r22=iip -{ .mmi +{ .mmb + st8 [r31]=r18,16// ndirty st8 [r30]=r19,16// cfm - st8 [r31]=r22,16// iip nop 0 ;; } { .mmi - st8 [r30]=r17 // ifa mov r18=cr.isr + st8 [r31]=r22,16// iip add r29=16,r30 ;; } -{ .mmi - st8 [r31]=r18 // isr - add r30=8,r29 - add r31=16,r29 +{ .mmb + st8 [r30]=r17,24// ifa + st8 [r31]=r18,24// isr + nop 0 ;; } { .mmi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200241 - head/sys/dev/usb/input
Author: rpaulo Date: Tue Dec 8 00:52:59 2009 New Revision: 200241 URL: http://svn.freebsd.org/changeset/base/200241 Log: Improve response to multi-touch taps. Submitted by: Rohit Grover Modified: head/sys/dev/usb/input/atp.c Modified: head/sys/dev/usb/input/atp.c == --- head/sys/dev/usb/input/atp.cTue Dec 8 00:44:23 2009 (r200240) +++ head/sys/dev/usb/input/atp.cTue Dec 8 00:52:59 2009 (r200241) @@ -437,7 +437,7 @@ static void atp_detect_pspans(i /* movement detection */ static boolean_t atp_match_stroke_component(atp_stroke_component *, -const atp_pspan *); + const atp_pspan *, atp_stroke_type); static void atp_match_strokes_against_pspans(struct atp_softc *, atp_axis, atp_pspan *, u_int, u_int); static boolean_t atp_update_strokes(struct atp_softc *, @@ -458,6 +458,7 @@ static boolean_t atp_compute_stroke_ /* tap detection */ static __inline void atp_setup_reap_time(struct atp_softc *, struct timeval *); static void atp_reap_zombies(struct atp_softc *, u_int *, u_int *); +static void atp_convert_to_slide(struct atp_softc *, atp_stroke *); /* updating fifo */ static void atp_reset_buf(struct atp_softc *sc); @@ -725,7 +726,7 @@ atp_interpret_sensor_data(const int8_t * for (i = 0, di = (axis == Y) ? 1 : 2; i < 8; di += 5, i++) { arr[i] = sensor_data[di]; arr[i+8] = sensor_data[di+2]; - if (axis == X && num > 16) + if (axis == X && num > 16) arr[i+16] = sensor_data[di+40]; } @@ -879,23 +880,43 @@ atp_detect_pspans(int *p, u_int num_sens */ static boolean_t atp_match_stroke_component(atp_stroke_component *component, -const atp_pspan *pspan) +const atp_pspan *pspan, atp_stroke_type stroke_type) { - int delta_mickeys = pspan->loc - component->loc; + int delta_mickeys; + u_int min_pressure; + + delta_mickeys = pspan->loc - component->loc; if (abs(delta_mickeys) > atp_max_delta_mickeys) return (FALSE); /* the finger span is too far out; no match */ component->loc = pspan->loc; + + /* +* A sudden and significant increase in a pspan's cumulative +* pressure indicates the incidence of a new finger +* contact. This usually revises the pspan's +* centre-of-gravity, and hence the location of any/all +* matching stroke component(s). But such a change should +* *not* be interpreted as a movement. +*/ +if (pspan->cum > ((3 * component->cum_pressure) >> 1)) + delta_mickeys = 0; + component->cum_pressure = pspan->cum; if (pspan->cum > component->max_cum_pressure) component->max_cum_pressure = pspan->cum; /* -* If the cumulative pressure drops below a quarter of the max, -* then disregard the component's movement. +* Disregard the component's movement if its cumulative +* pressure drops below a fraction of the maximum; this +* fraction is determined based on the stroke's type. */ - if (component->cum_pressure < (component->max_cum_pressure >> 2)) + if (stroke_type == ATP_STROKE_TOUCH) + min_pressure = (3 * component->max_cum_pressure) >> 2; + else + min_pressure = component->max_cum_pressure >> 2; + if (component->cum_pressure < min_pressure) delta_mickeys = 0; component->delta_mickeys = delta_mickeys; @@ -930,7 +951,8 @@ atp_match_strokes_against_pspans(struct continue; /* skip matched pspans */ if (atp_match_stroke_component( - &stroke->components[axis], &pspans[j])) { + &stroke->components[axis], &pspans[j], + stroke->type)) { /* There is a match. */ stroke->components[axis].matched = TRUE; @@ -1065,19 +1087,23 @@ atp_update_strokes(struct atp_softc *sc, for (i = 0; i < sc->sc_n_strokes; i++) { atp_stroke *stroke = &sc->sc_strokes[i]; - printf(" %s%clc:%u,dm:%d,pnd:%d,mv:%d%c" - ",%clc:%u,dm:%d,pnd:%d,mv:%d%c", + printf(" %s%clc:%u,dm:%d,pnd:%d,cum:%d,max:%d,mv:%d%c" + ",%clc:%u,dm:%d,pnd:%d,cum:%d,max:%d,mv:%d%c", (stroke->flags & ATSF_ZOMBIE) ? "zomb:" : "", (stroke->type == ATP_STROKE_TOUCH) ? '[' : '<', stroke->components[X].loc,
svn commit: r200242 - head/sys/net80211
Author: rpaulo Date: Tue Dec 8 00:54:08 2009 New Revision: 200242 URL: http://svn.freebsd.org/changeset/base/200242 Log: Fix typo in comment Submitted by: Paul B Mahol Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c == --- head/sys/net80211/ieee80211_hostap.cTue Dec 8 00:52:59 2009 (r200241) +++ head/sys/net80211/ieee80211_hostap.cTue Dec 8 00:54:08 2009 (r200242) @@ -1252,7 +1252,7 @@ ieee80211_parse_wpa(struct ieee80211vap return IEEE80211_REASON_IE_INVALID; } frm += 6, len -= 4; /* NB: len is payload only */ - /* NB: iswapoui already validated the OUI and type */ + /* NB: iswpaoui already validated the OUI and type */ w = LE_READ_2(frm); if (w != WPA_VERSION) { IEEE80211_DISCARD_IE(vap, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200243 - head/sys/dev/e1000
Author: jfv Date: Tue Dec 8 01:07:44 2009 New Revision: 200243 URL: http://svn.freebsd.org/changeset/base/200243 Log: Resync with Intel versions of both the em and igb drivers. These add new hardware support, most importantly the pch (i5 chipset) in the em driver. Also, both drivers now have the simplified (and I hope improved) watchdog code. The igb driver uses the new RX cleanup that I first implemented in ixgbe. em - version 6.9.24 igb - version 1.8.4 Modified: head/sys/dev/e1000/LICENSE head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_80003es2lan.h head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_phy.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/LICENSE == --- head/sys/dev/e1000/LICENSE Tue Dec 8 00:54:08 2009(r200242) +++ head/sys/dev/e1000/LICENSE Tue Dec 8 01:07:44 2009(r200243) @@ -1,6 +1,6 @@ $FreeBSD$ - Copyright (c) 2001-2008, Intel Corporation + Copyright (c) 2001-2009, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/e1000/e1000_80003es2lan.c == --- head/sys/dev/e1000/e1000_80003es2lan.c Tue Dec 8 00:54:08 2009 (r200242) +++ head/sys/dev/e1000/e1000_80003es2lan.c Tue Dec 8 01:07:44 2009 (r200243) @@ -171,7 +171,7 @@ static s32 e1000_init_nvm_params_80003es break; } - nvm->type = e1000_nvm_eeprom_spi; + nvm->type = e1000_nvm_eeprom_spi; size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); @@ -206,17 +206,22 @@ static s32 e1000_init_nvm_params_80003es static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_init_mac_params_80003es2lan"); - /* Set media type */ + /* Set media type and media-dependent function pointers */ switch (hw->device_id) { case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: hw->phy.media_type = e1000_media_type_internal_serdes; + mac->ops.check_for_link = e1000_check_for_serdes_link_generic; + mac->ops.setup_physical_interface = + e1000_setup_fiber_serdes_link_generic; break; default: hw->phy.media_type = e1000_media_type_copper; + mac->ops.check_for_link = e1000_check_for_copper_link_generic; + mac->ops.setup_physical_interface = + e1000_setup_copper_link_80003es2lan; break; } @@ -230,6 +235,8 @@ static s32 e1000_init_mac_params_80003es mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) ? TRUE : FALSE; + /* Adaptive IFS not supported */ + mac->adaptive_ifs = FALSE; /* Function pointers */ @@ -241,27 +248,6 @@ static s32 e1000_init_mac_params_80003es mac->ops.init_hw = e1000_init_hw_80003es2lan; /* link setup */ mac->ops.setup_link = e1000_setup_link_generic; - /* physical interface link setup */ - mac->ops.setup_physical_interface = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_setup_copper_link_80003es2lan - : e1000_setup_fiber_serdes_link_generic; - /* check for link */ - switch (hw->phy.media_type) { - case e1000_media_type_copper: - mac->ops.check_for_link = e1000_check_for_copper_link_generic; - break; - case e1000_media_type_fiber: - mac->ops.check_for_link = e1000_check_for_fiber_link_generic; - break; - case e1000_media_type_internal_serdes: - mac->ops.check_for_link = e1000_check_for_serdes_link_generic; - break; - default: - ret_val = -E1000_ERR_CONFIG; - goto out; - break; - } /* check management mode */ mac->ops.check_mng_mode = e1000_check_mng_mode_generic; /* multicast address update */ @@ -290,8 +276,10 @@ static s32 e1000_init_mac_params_
svn commit: r200246 - head/sys/dev/bge
Author: yongari Date: Tue Dec 8 03:24:29 2009 New Revision: 200246 URL: http://svn.freebsd.org/changeset/base/200246 Log: Partially revert r200228. For mini RCB case, bge(4) still have to disable mini ring withtout regard to mini ring support. Reported by: marcel Tested by:marcel Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Tue Dec 8 01:56:59 2009(r200245) +++ head/sys/dev/bge/if_bge.c Tue Dec 8 03:24:29 2009(r200246) @@ -1618,13 +1618,11 @@ bge_blockinit(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_RX_JUMBO_RCB_NICADDR, rcb->bge_nicaddr); /* Set up dummy disabled mini ring RCB */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5700) { - rcb = &sc->bge_ldata.bge_info.bge_mini_rx_rcb; - rcb->bge_maxlen_flags = - BGE_RCB_MAXLEN_FLAGS(0, BGE_RCB_FLAG_RING_DISABLED); - CSR_WRITE_4(sc, BGE_RX_MINI_RCB_MAXLEN_FLAGS, - rcb->bge_maxlen_flags); - } + rcb = &sc->bge_ldata.bge_info.bge_mini_rx_rcb; + rcb->bge_maxlen_flags = + BGE_RCB_MAXLEN_FLAGS(0, BGE_RCB_FLAG_RING_DISABLED); + CSR_WRITE_4(sc, BGE_RX_MINI_RCB_MAXLEN_FLAGS, + rcb->bge_maxlen_flags); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200247 - stable/8/share/man/man4/man4.powerpc
Author: nwhitehorn Date: Tue Dec 8 05:18:59 2009 New Revision: 200247 URL: http://svn.freebsd.org/changeset/base/200247 Log: MFC r200070: Add manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe various drivers for Apple Desktop Bus controllers and peripherals. Added: stable/8/share/man/man4/man4.powerpc/adb.4 - copied unchanged from r200070, head/share/man/man4/man4.powerpc/adb.4 stable/8/share/man/man4/man4.powerpc/akbd.4 - copied unchanged from r200070, head/share/man/man4/man4.powerpc/akbd.4 stable/8/share/man/man4/man4.powerpc/ams.4 - copied unchanged from r200070, head/share/man/man4/man4.powerpc/ams.4 stable/8/share/man/man4/man4.powerpc/cuda.4 - copied unchanged from r200070, head/share/man/man4/man4.powerpc/cuda.4 Modified: stable/8/share/man/man4/man4.powerpc/Makefile stable/8/share/man/man4/man4.powerpc/pmu.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/man4.powerpc/Makefile == --- stable/8/share/man/man4/man4.powerpc/Makefile Tue Dec 8 03:24:29 2009(r200246) +++ stable/8/share/man/man4/man4.powerpc/Makefile Tue Dec 8 05:18:59 2009(r200247) @@ -1,6 +1,10 @@ # $FreeBSD$ -MAN= bm.4 \ +MAN= adb.4 \ + akbd.4 \ + ams.4 \ + bm.4 \ + cuda.4 \ pmu.4 \ powermac_nvram.4 \ snd_ai2s.4 \ Copied: stable/8/share/man/man4/man4.powerpc/adb.4 (from r200070, head/share/man/man4/man4.powerpc/adb.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/man4.powerpc/adb.4 Tue Dec 8 05:18:59 2009 (r200247, copy of r200070, head/share/man/man4/man4.powerpc/adb.4) @@ -0,0 +1,70 @@ +.\"- +.\" Copyright (c) 2009 Nathan Whitehorn +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 3, 2009 +.Dt ADB 4 +.Os +.Sh NAME +.Nm adb +.Nd Apple Desktop Bus +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device adb" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Desktop Bus, which is a simple +multi-drop bus used in general for input peripherals in older Apple +Macintosh hardware. +.Pp +The Apple Desktop Bus provides attachment for up to 16 devices, +including multiple devices of a single type, but not does support +hot-plugging. +.Sh SEE ALSO +Apple Tech Note HW01: ADB - The Untold Story: Space Aliens Ate My Mouse: +.Pa http://developer.apple.com/legacy/mac/library/technotes/hw/hw_01.html +.Pp +.Xr akbd 4 , +.Xr ams 4 , +.Xr cuda 4 , +.Xr pmu 4 +.Sh HISTORY +The +.Nm +device driver appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Nathan Whitehorn +.Aq nwhiteh...@freebsd.org . Copied: stable/8/share/man/man4/man4.powerpc/akbd.4 (from r200070, head/share/man/man4/man4.powerpc/akbd.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/man4.powerpc/akbd.4 Tue Dec 8 05:18:59 2009 (r200247, copy of r200070, head/share/man/man4/man4.powerpc/akbd.4) @@ -0,0 +1,76 @@ +.\"- +.\" Copyright (c) 2009 Nathan Whitehorn +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the abov
svn commit: r200248 - stable/8/sys/powerpc/powermac
Author: nwhitehorn Date: Tue Dec 8 05:23:07 2009 New Revision: 200248 URL: http://svn.freebsd.org/changeset/base/200248 Log: MFC r198444: Allow Heathrow-based machines to boot a kernel containing option SMP without panicing. Modified: stable/8/sys/powerpc/powermac/hrowpic.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/powermac/hrowpic.c == --- stable/8/sys/powerpc/powermac/hrowpic.c Tue Dec 8 05:18:59 2009 (r200247) +++ stable/8/sys/powerpc/powermac/hrowpic.c Tue Dec 8 05:23:07 2009 (r200248) @@ -182,7 +182,13 @@ hrowpic_toggle_irq(struct hrowpic_softc u_int roffset; u_int rbit; - KASSERT((irq > 0) && (irq < HROWPIC_IRQMAX), ("en irq out of range")); + KASSERT((irq > 0) && (irq <= HROWPIC_IRQMAX), ("en irq out of range")); + + /* +* Humor the SMP layer if it wants to set up an IPI handler. +*/ + if (irq == HROWPIC_IRQMAX) + return; /* * Calculate prim/sec register bank for the IRQ, update soft copy, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200249 - in stable/8/sys/powerpc: include powerpc
Author: nwhitehorn Date: Tue Dec 8 05:27:06 2009 New Revision: 200249 URL: http://svn.freebsd.org/changeset/base/200249 Log: MFC r198445: Turn on NAP mode on G5 systems, and refactor the HID0 setup code a little. This makes my G5 Xserve sound slightly less like it is filled with howling banshees. MFC r198968: Unbreak E500 builds. The inline assembly for the 970 CPUs is invalid when compiling for BookE. MFC r199533: Fix cpuid output on E500 core. Modified: stable/8/sys/powerpc/include/hid.h stable/8/sys/powerpc/powerpc/cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/include/hid.h == --- stable/8/sys/powerpc/include/hid.h Tue Dec 8 05:23:07 2009 (r200248) +++ stable/8/sys/powerpc/include/hid.h Tue Dec 8 05:27:06 2009 (r200249) @@ -41,6 +41,7 @@ #define HID0_ECLK 0x0200 /* CLK_OUT clock type selection */ #define HID0_PAR 0x0100 /* Disable precharge of ARTRY */ #define HID0_STEN 0x0100 /* Software table search enable (7450) */ +#define HID0_DEEPNAP 0x0100 /* Enable deep nap mode (970) */ #define HID0_HBATEN0x0080 /* High BAT enable (74[45][578]) */ #define HID0_DOZE 0x0080 /* Enable doze mode */ #define HID0_NAP 0x0040 /* Enable nap mode */ @@ -98,6 +99,12 @@ "\020b16\017TBEN\016SEL_TBCLK\015b19\014b20\013b21\012b22\011b23" \ "\010EN_MAS7_UPDATE\007DCFA\006b26\005b27\004b28\003b29\002b30\001NOPTI" +#define HID0_970_BITMASK \ +"\20" \ +"\040ONEPPC\037SINGLE\036ISYNCSC\035SERGP\031DEEPNAP\030DOZE" \ +"\027NAP\025DPM\023TG\022HANGDETECT\021NHR\020INORDER" \ +"\016TBCTRL\015TBEN\012CIABREN\011HDICEEN\001ENATTN" + /* * HID0 bit definitions per cpu model * Modified: stable/8/sys/powerpc/powerpc/cpu.c == --- stable/8/sys/powerpc/powerpc/cpu.c Tue Dec 8 05:23:07 2009 (r200248) +++ stable/8/sys/powerpc/powerpc/cpu.c Tue Dec 8 05:27:06 2009 (r200249) @@ -114,16 +114,21 @@ static char model[64]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); static voidcpu_print_speed(void); -static voidcpu_print_cacheinfo(u_int, uint16_t); + +static voidcpu_6xx_setup(int cpuid, uint16_t vers); +static voidcpu_6xx_print_cacheinfo(u_int, uint16_t); +static voidcpu_e500_setup(int cpuid, uint16_t vers); +#ifndef E500 +static voidcpu_970_setup(int cpuid, uint16_t vers); +#endif void cpu_setup(u_int cpuid) { - u_int pvr, maj, min, hid0; + u_int pvr, maj, min; uint16_tvers, rev, revfmt; const structcputab *cp; const char *name; - char*bitmask; pvr = mfpvr(); vers = pvr >> 16; @@ -170,10 +175,8 @@ cpu_setup(u_int cpuid) break; } - hid0 = mfspr(SPR_HID0); - /* -* Configure power-saving mode. +* Configure CPU */ switch (vers) { case MPC603: @@ -184,102 +187,36 @@ cpu_setup(u_int cpuid) case IBM750FX: case MPC7400: case MPC7410: - case MPC8240: - case MPC8245: - /* Select DOZE mode. */ - hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); - hid0 |= HID0_DOZE | HID0_DPM; - powerpc_pow_enabled = 1; - break; - - case MPC7448: - case MPC7447A: - case MPC7457: - case MPC7455: - case MPC7450: - /* Enable the 7450 branch caches */ - hid0 |= HID0_SGE | HID0_BTIC; - hid0 |= HID0_LRSTK | HID0_FOLD | HID0_BHT; - /* Disable BTIC on 7450 Rev 2.0 or earlier and on 7457 */ - if (((pvr >> 16) == MPC7450 && (pvr & 0x) <= 0x0200) - || (pvr >> 16) == MPC7457) - hid0 &= ~HID0_BTIC; - /* Select NAP mode. */ - hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); - hid0 |= HID0_NAP | HID0_DPM; - powerpc_pow_enabled = 1; - break; - - default: - /* No power-saving mode is available. */ ; -
svn commit: r200250 - stable/8/sys/powerpc/powerpc
Author: nwhitehorn Date: Tue Dec 8 05:32:44 2009 New Revision: 200250 URL: http://svn.freebsd.org/changeset/base/200250 Log: MFC r198678: ake procstat -k work on PowerPC by avoiding mistakenly using signed compares with a low address (0x1000) and a high address (the KVA kernel stack). Modified: stable/8/sys/powerpc/powerpc/stack_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/powerpc/stack_machdep.c == --- stable/8/sys/powerpc/powerpc/stack_machdep.cTue Dec 8 05:27:06 2009(r200249) +++ stable/8/sys/powerpc/powerpc/stack_machdep.cTue Dec 8 05:32:44 2009(r200250) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include static void -stack_capture(struct stack *st, register_t frame) +stack_capture(struct stack *st, vm_offset_t frame) { vm_offset_t callpc; @@ -76,7 +76,7 @@ stack_capture(struct stack *st, register void stack_save_td(struct stack *st, struct thread *td) { - register_t frame; + vm_offset_t frame; if (TD_IS_SWAPPED(td)) panic("stack_save_td: swapped"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200251 - head/sys/dev/aac
Author: jkim Date: Tue Dec 8 05:35:51 2009 New Revision: 200251 URL: http://svn.freebsd.org/changeset/base/200251 Log: - Try pre-allocating all FIBs upfront. Previously we tried pre-allocating 128 FIBs first and allocated more later if necessary. Remove now unused definitions from the header file[1]. - Force sequential bus scanning. It seems parallel scanning is in fact slower and causes more harm than good[1]. Adjust a comment to reflect that. PR: kern/141269 Submitted by: Alexander Sack (asack at niksun dot com)[1] Reviewed by: scottl Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aac_cam.c head/sys/dev/aac/aacvar.h Modified: head/sys/dev/aac/aac.c == --- head/sys/dev/aac/aac.c Tue Dec 8 05:32:44 2009(r200250) +++ head/sys/dev/aac/aac.c Tue Dec 8 05:35:51 2009(r200251) @@ -604,7 +604,7 @@ aac_alloc(struct aac_softc *sc) TAILQ_INIT(&sc->aac_fibmap_tqh); sc->aac_commands = malloc(sc->aac_max_fibs * sizeof(struct aac_command), M_AACBUF, M_WAITOK|M_ZERO); - while (sc->total_fibs < AAC_PREALLOCATE_FIBS) { + while (sc->total_fibs < sc->aac_max_fibs) { if (aac_alloc_commands(sc) != 0) break; } Modified: head/sys/dev/aac/aac_cam.c == --- head/sys/dev/aac/aac_cam.c Tue Dec 8 05:32:44 2009(r200250) +++ head/sys/dev/aac/aac_cam.c Tue Dec 8 05:35:51 2009(r200251) @@ -260,8 +260,11 @@ aac_cam_action(struct cam_sim *sim, unio cpi->hba_inquiry = PI_WIDE_16; cpi->target_sprt = 0; - /* Resetting via the passthrough causes problems. */ - cpi->hba_misc = PIM_NOBUSRESET; + /* +* Resetting via the passthrough or parallel bus scan +* causes problems. +*/ + cpi->hba_misc = PIM_NOBUSRESET | PIM_SEQSCAN; cpi->hba_eng_cnt = 0; cpi->max_target = camsc->inf->TargetsPerBus; cpi->max_lun = 8; /* Per the controller spec */ Modified: head/sys/dev/aac/aacvar.h == --- head/sys/dev/aac/aacvar.h Tue Dec 8 05:32:44 2009(r200250) +++ head/sys/dev/aac/aacvar.h Tue Dec 8 05:35:51 2009(r200251) @@ -57,13 +57,6 @@ #define AAC_ADAPTER_FIBS 8 /* - * FIBs are allocated in page-size chunks and can grow up to the 512 - * limit imposed by the hardware. - */ -#define AAC_PREALLOCATE_FIBS 128 -#define AAC_NUM_MGT_FIB8 - -/* * The controller reports status events in AIFs. We hang on to a number of * these in order to pass them out to user-space management tools. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r200252 - in stable/8/sys/powerpc: aim booke include powerpc
Author: nwhitehorn Date: Tue Dec 8 05:37:08 2009 New Revision: 200252 URL: http://svn.freebsd.org/changeset/base/200252 Log: MFC r199886: Add a CPU features framework on PowerPC and simplify CPU setup a little more. This provides three new sysctls to user space: hw.cpu_features - A bitmask of available CPU features hw.floatingpoint - Whether or not there is hardware FP support hw.altivec - Whether or not Altivec is available PR: powerpc/139154 Modified: stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/aim/ofw_machdep.c stable/8/sys/powerpc/booke/machdep.c stable/8/sys/powerpc/include/cpu.h stable/8/sys/powerpc/include/md_var.h stable/8/sys/powerpc/powerpc/cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/machdep.c == --- stable/8/sys/powerpc/aim/machdep.c Tue Dec 8 05:35:51 2009 (r200251) +++ stable/8/sys/powerpc/aim/machdep.c Tue Dec 8 05:37:08 2009 (r200252) @@ -130,7 +130,6 @@ extern vm_offset_t ksym_start, ksym_end; int cold = 1; int cacheline_size = 32; -int ppc64 = 0; int hw_direct_map = 1; struct pcpu __pcpu[MAXCPU]; @@ -256,6 +255,7 @@ powerpc_init(u_int startkernel, u_int en char *env; uint32_tmsr, scratch; uint8_t *cache_check; + int ppc64; end = 0; kmdp = NULL; @@ -405,12 +405,15 @@ powerpc_init(u_int startkernel, u_int en mfsprg2 %1;" : "=r"(scratch), "=r"(ppc64)); + if (ppc64) + cpu_features |= PPC_FEATURE_64; + /* * Now copy restorebridge into all the handlers, if necessary, * and set up the trap tables. */ - if (ppc64) { + if (cpu_features & PPC_FEATURE_64) { /* Patch the two instances of rfi -> rfid */ bcopy(&rfid_patch,&rfi_patch1,4); #ifdef KDB @@ -489,7 +492,7 @@ powerpc_init(u_int startkernel, u_int en * in case the platform module had a better idea of what we * should do. */ - if (ppc64) + if (cpu_features & PPC_FEATURE_64) pmap_mmu_install(MMU_TYPE_G5, BUS_PROBE_GENERIC); else pmap_mmu_install(MMU_TYPE_OEA, BUS_PROBE_GENERIC); Modified: stable/8/sys/powerpc/aim/ofw_machdep.c == --- stable/8/sys/powerpc/aim/ofw_machdep.c Tue Dec 8 05:35:51 2009 (r200251) +++ stable/8/sys/powerpc/aim/ofw_machdep.c Tue Dec 8 05:37:08 2009 (r200252) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -336,7 +337,7 @@ openfirmware(void *args) /* * Clear battable[] translations */ - if (!ppc64) { + if (!(cpu_features & PPC_FEATURE_64)) { __asm __volatile("mtdbatu 2, %0\n" "mtdbatu 3, %0" : : "r" (0)); } Modified: stable/8/sys/powerpc/booke/machdep.c == --- stable/8/sys/powerpc/booke/machdep.cTue Dec 8 05:35:51 2009 (r200251) +++ stable/8/sys/powerpc/booke/machdep.cTue Dec 8 05:37:08 2009 (r200252) @@ -179,7 +179,6 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach CTLFLAG_RD, &cacheline_size, 0, ""); int hw_direct_map = 0; -int ppc64 = 0; static void cpu_e500_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); Modified: stable/8/sys/powerpc/include/cpu.h == --- stable/8/sys/powerpc/include/cpu.h Tue Dec 8 05:35:51 2009 (r200251) +++ stable/8/sys/powerpc/include/cpu.h Tue Dec 8 05:37:08 2009 (r200252) @@ -39,6 +39,27 @@ #include #include +/* + * CPU Feature Attributes + * + * These are defined in the PowerPC ELF ABI for the AT_HWCAP vector, + * and are exported to userland via the machdep.cpu_features + * sysctl. + */ + +extern int cpu_features; + +#definePPC_FEATURE_32 0x8000 /* Always true */ +#definePPC_FEATURE_64 0x4000 /* Defined on a 64-bit CPU */ +#definePPC_FEATURE_HAS_ALTIVEC 0x1000 +#definePPC_FEATURE_HAS_FPU 0x0800 +#definePPC_FEATURE_HAS_MMU 0x0400 +#define PPC_FEATURE_UNIFIED_CACHE 0x0100 + +#definePPC_FEATURE_BITMASK