svn commit: r235646 - vendor-sys/acpica/20120518

2012-05-18 Thread Jung-uk Kim
Author: jkim
Date: Sat May 19 05:45:38 2012
New Revision: 235646
URL: http://svn.freebsd.org/changeset/base/235646

Log:
  Tag ACPICA 20120518.

Added:
  vendor-sys/acpica/20120518/
 - copied from r235645, vendor-sys/acpica/dist/
___
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: r235645 - in vendor-sys/acpica/dist: . generate/release source/common source/compiler source/components/debugger source/components/dispatcher source/components/events source/components/...

2012-05-18 Thread Jung-uk Kim
Author: jkim
Date: Sat May 19 05:44:32 2012
New Revision: 235645
URL: http://svn.freebsd.org/changeset/base/235645

Log:
  Import ACPICA 20120518.

Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/release/build.sh
  vendor-sys/acpica/dist/source/common/adfile.c
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/dmextern.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/aslcompiler.l
  vendor-sys/acpica/dist/source/compiler/aslcompiler.y
  vendor-sys/acpica/dist/source/compiler/aslerror.c
  vendor-sys/acpica/dist/source/compiler/aslfiles.c
  vendor-sys/acpica/dist/source/compiler/aslmain.c
  vendor-sys/acpica/dist/source/compiler/aslmap.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.h
  vendor-sys/acpica/dist/source/compiler/aslstartup.c
  vendor-sys/acpica/dist/source/compiler/dtio.c
  vendor-sys/acpica/dist/source/compiler/prscan.c
  vendor-sys/acpica/dist/source/compiler/prutils.c
  vendor-sys/acpica/dist/source/components/debugger/dbfileio.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c
  vendor-sys/acpica/dist/source/components/events/evxface.c
  vendor-sys/acpica/dist/source/components/tables/tbfadt.c
  vendor-sys/acpica/dist/source/components/utilities/utmisc.c
  vendor-sys/acpica/dist/source/include/acobject.h
  vendor-sys/acpica/dist/source/include/acpiosxf.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/actypes.h
  vendor-sys/acpica/dist/source/include/acutils.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c
  vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c

Modified: vendor-sys/acpica/dist/changes.txt
==
--- vendor-sys/acpica/dist/changes.txt  Sat May 19 05:14:24 2012
(r235644)
+++ vendor-sys/acpica/dist/changes.txt  Sat May 19 05:44:32 2012
(r235645)
@@ -1,8 +1,70 @@
 
+18 May 2012. Summary of changes for version 20120518:
+
+
+1) ACPICA Core Subsystem:
+
+Added a new OSL interface, AcpiOsWaitEventsComplete. This interface is defined 
+to block until asynchronous events such as notifies and GPEs have completed. 
+Within ACPICA, it is only called before a notify or GPE handler is 
+removed/uninstalled. It also may be useful for the host OS within related 
+drivers such as the Embedded Controller driver. See the ACPICA reference for 
+additional information. ACPICA BZ 868.
+
+ACPI Tables: Added a new error message for a possible overflow failure during 
+the conversion of FADT 32-bit legacy register addresses to internal common 64-
+bit GAS structure representation. The GAS has a one-byte "bit length" field, 
+thus limiting the register length to 255 bits. ACPICA BZ 953.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug 
+version of the code includes the debug output trace mechanism and has a much 
+larger code and data size.
+
+  Previous Release:
+Non-Debug Version:  92.9K Code, 25.0K Data, 117.9K Total
+Debug Version: 172.6K Code, 73.4K Data, 246.0K Total
+  Current Release:
+Non-Debug Version:  93.0K Code, 25.1K Data, 118.1K Total
+Debug Version: 172.7K Code, 73.6K Data, 246.3K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Added the ACPI 5.0 "PCC" keyword for use in the Register() ASL macro. 
+This keyword was added late in the ACPI 5.0 release cycle and was not 
+implemented until now.
+
+Disassembler: Added support for Operation Region externals. Adds missing 
+support for operation regions that are defined in another table, and 
+referenced locally via a Field or BankField ASL operator. Now generates the 
+correct External statement.
+
+Disassembler: Several additional fixes for the External() statement generation 
+related to some ASL operators. Also, order the External() statements 
+alphabetically in the disassembler output. Fixes the External() generation for 
+the Create* field, Alias, and Scope operators:
+ 1) Create* buffer field operators - fix type mismatch warning on disassembly
+ 2) Alias - implement missing External support
+ 3) Scope - fix to make sure all necessary externals are emitted.
+
+iASL: Improved pathname support. For include files, merge the prefix pathname 
+with the file pathname and eliminate unnecessary components. Convert 
+backslashes in all pathnames to forward slashes, for readability. Include file 
+pathname changes affect both #include and Include() type operators.
+
+iASL/DTC/Preprocessor: Gracefully handle early EOF. Handle an EOF at the end 
+of a valid line by inserting a newline and then returning the EOF during the 
+next

svn commit: r235644 - head/sys/netinet/libalias

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 05:14:24 2012
New Revision: 235644
URL: http://svn.freebsd.org/changeset/base/235644

Log:
  Remove unused inclusion of curses.h

Modified:
  head/sys/netinet/libalias/alias_sctp.h

Modified: head/sys/netinet/libalias/alias_sctp.h
==
--- head/sys/netinet/libalias/alias_sctp.h  Sat May 19 05:10:47 2012
(r235643)
+++ head/sys/netinet/libalias/alias_sctp.h  Sat May 19 05:14:24 2012
(r235644)
@@ -92,7 +92,6 @@
 #ifndef _KERNEL
 #include 
 #include 
-#include 
 #endif //#ifdef _KERNEL
 
 
___
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: r235643 - head/libexec/tftpd

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 05:10:47 2012
New Revision: 235643
URL: http://svn.freebsd.org/changeset/base/235643

Log:
  Properly use LDADD & DPADD to link against libwrap.

Modified:
  head/libexec/tftpd/Makefile

Modified: head/libexec/tftpd/Makefile
==
--- head/libexec/tftpd/Makefile Sat May 19 05:07:03 2012(r235642)
+++ head/libexec/tftpd/Makefile Sat May 19 05:10:47 2012(r235643)
@@ -6,6 +6,8 @@ MAN=tftpd.8
 SRCS=  tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
 SRCS+= tftpd.c
 WFORMAT=0
-LDFLAGS= -lwrap
+
+DPADD= ${LIBWRAP}
+LDADD= -lwrap
 
 .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: r235642 - in head/usr.bin: fstat procstat

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 05:07:03 2012
New Revision: 235642
URL: http://svn.freebsd.org/changeset/base/235642

Log:
  Bring DPADD in sync with LDADD.

Modified:
  head/usr.bin/fstat/Makefile
  head/usr.bin/procstat/Makefile

Modified: head/usr.bin/fstat/Makefile
==
--- head/usr.bin/fstat/Makefile Sat May 19 04:57:37 2012(r235641)
+++ head/usr.bin/fstat/Makefile Sat May 19 05:07:03 2012(r235642)
@@ -4,7 +4,7 @@
 PROG=  fstat
 SRCS=  fstat.c fuser.c main.c
 LINKS= ${BINDIR}/fstat ${BINDIR}/fuser
-DPADD= ${LIBKVM}
+DPADD= ${LIBKVM} ${LIBUTIL} ${LIBPROCSTAT}
 LDADD= -lkvm -lutil -lprocstat
 
 MAN1=  fuser.1 fstat.1

Modified: head/usr.bin/procstat/Makefile
==
--- head/usr.bin/procstat/Makefile  Sat May 19 04:57:37 2012
(r235641)
+++ head/usr.bin/procstat/Makefile  Sat May 19 05:07:03 2012
(r235642)
@@ -16,6 +16,6 @@ SRCS= procstat.c  \
procstat_vm.c
 
 LDADD+=-lutil -lprocstat -lkvm
-DPADD+=${LIBUTIL}
+DPADD+=${LIBUTIL} ${LIBPROCSTAT} ${LIBKVM}
 
 .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: r235641 - head/share/mk

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 04:57:37 2012
New Revision: 235641
URL: http://svn.freebsd.org/changeset/base/235641

Log:
  Add missing LIBPROCSTAT.

Modified:
  head/share/mk/bsd.libnames.mk

Modified: head/share/mk/bsd.libnames.mk
==
--- head/share/mk/bsd.libnames.mk   Sat May 19 02:39:43 2012
(r235640)
+++ head/share/mk/bsd.libnames.mk   Sat May 19 04:57:37 2012
(r235641)
@@ -135,6 +135,7 @@ LIBPANEL?=  ${DESTDIR}${LIBDIR}/libpanel.
 LIBPCAP?=  ${DESTDIR}${LIBDIR}/libpcap.a
 LIBPMC?=   ${DESTDIR}${LIBDIR}/libpmc.a
 LIBPROC?=  ${DESTDIR}${LIBDIR}/libproc.a
+LIBPROCSTAT?=  ${DESTDIR}${LIBDIR}/libprocstat.a
 LIBPTHREAD?=   ${DESTDIR}${LIBDIR}/libpthread.a
 LIBRADIUS?=${DESTDIR}${LIBDIR}/libradius.a
 LIBREADLINE?=  ${DESTDIR}${LIBDIR}/libreadline.a
___
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: r235640 - in head: lib/libc/net sys/net

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 02:39:43 2012
New Revision: 235640
URL: http://svn.freebsd.org/changeset/base/235640

Log:
  Use the LLINDEX macro to access the link-level I/F index.  This makes
  it possible to work with a different type for the sdl_index field --
  it only requires a recompile.
  
  Obtained from:Juniper Networks, Inc.

Modified:
  head/lib/libc/net/if_indextoname.c
  head/lib/libc/net/if_nameindex.c
  head/lib/libc/net/if_nametoindex.c
  head/lib/libc/net/sourcefilter.c
  head/sys/net/if_dl.h

Modified: head/lib/libc/net/if_indextoname.c
==
--- head/lib/libc/net/if_indextoname.c  Sat May 19 02:31:38 2012
(r235639)
+++ head/lib/libc/net/if_indextoname.c  Sat May 19 02:39:43 2012
(r235640)
@@ -70,7 +70,7 @@ if_indextoname(unsigned int ifindex, cha
for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
if (ifa->ifa_addr &&
ifa->ifa_addr->sa_family == AF_LINK &&
-   ifindex == ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index)
+   ifindex == LLINDEX((struct sockaddr_dl*)ifa->ifa_addr))
break;
}
 

Modified: head/lib/libc/net/if_nameindex.c
==
--- head/lib/libc/net/if_nameindex.cSat May 19 02:31:38 2012
(r235639)
+++ head/lib/libc/net/if_nameindex.cSat May 19 02:39:43 2012
(r235640)
@@ -123,7 +123,7 @@ if_nameindex(void)
if (ifa->ifa_addr &&
ifa->ifa_addr->sa_family == AF_LINK) {
ifni2->if_index =
-   ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index;
+   LLINDEX((struct sockaddr_dl*)ifa->ifa_addr);
ifni2->if_name = cp;
strcpy(cp, ifa->ifa_name);
ifni2++;

Modified: head/lib/libc/net/if_nametoindex.c
==
--- head/lib/libc/net/if_nametoindex.c  Sat May 19 02:31:38 2012
(r235639)
+++ head/lib/libc/net/if_nametoindex.c  Sat May 19 02:39:43 2012
(r235640)
@@ -90,7 +90,7 @@ if_nametoindex(const char *ifname)
if (ifa->ifa_addr &&
ifa->ifa_addr->sa_family == AF_LINK &&
strcmp(ifa->ifa_name, ifname) == 0) {
-   ni = ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index;
+   ni = LLINDEX((struct sockaddr_dl*)ifa->ifa_addr);
break;
}
}

Modified: head/lib/libc/net/sourcefilter.c
==
--- head/lib/libc/net/sourcefilter.cSat May 19 02:31:38 2012
(r235639)
+++ head/lib/libc/net/sourcefilter.cSat May 19 02:39:43 2012
(r235640)
@@ -120,7 +120,7 @@ __inaddr_to_index(in_addr_t ifaddr)
psu = (sockunion_t *)ifa->ifa_addr;
if (psu && psu->ss.ss_family == AF_LINK &&
strcmp(ifa->ifa_name, ifname) == 0) {
-   ifindex = psu->sdl.sdl_index;
+   ifindex = LLINDEX(&psu->sdl);
break;
}
}

Modified: head/sys/net/if_dl.h
==
--- head/sys/net/if_dl.hSat May 19 02:31:38 2012(r235639)
+++ head/sys/net/if_dl.hSat May 19 02:39:43 2012(r235640)
@@ -67,6 +67,7 @@ struct sockaddr_dl {
 };
 
 #define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
+#define LLINDEX(s) ((s)->sdl_index)
 
 #ifndef _KERNEL
 
___
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: r235639 - head/sys/i386/acpica

2012-05-18 Thread Mitsuru IWASAKI
Author: iwasaki
Date: Sat May 19 02:31:38 2012
New Revision: 235639
URL: http://svn.freebsd.org/changeset/base/235639

Log:
  Revert the previous commit on wakecode address verbose printing.
  This broke PAE kernel building.

Modified:
  head/sys/i386/acpica/acpi_wakeup.c

Modified: head/sys/i386/acpica/acpi_wakeup.c
==
--- head/sys/i386/acpica/acpi_wakeup.c  Sat May 19 02:30:10 2012
(r235638)
+++ head/sys/i386/acpica/acpi_wakeup.c  Sat May 19 02:31:38 2012
(r235639)
@@ -375,6 +375,6 @@ acpi_install_wakeup_handler(struct acpi_
WAKECODE_FIXUP(wakeup_ret, void *, resumectx);
 
if (bootverbose)
-   device_printf(sc->acpi_dev, "wakeup code va %p pa %p\n",
-   (void *)sc->acpi_wakeaddr, (void *)sc->acpi_wakephys);
+   device_printf(sc->acpi_dev, "wakeup code va %#x pa %#jx\n",
+   sc->acpi_wakeaddr, (uintmax_t)sc->acpi_wakephys);
 }
___
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: r235638 - head/lib/libmagic

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 02:30:10 2012
New Revision: 235638
URL: http://svn.freebsd.org/changeset/base/235638

Log:
  Don't depend on getline being on the build machine. That's
  not the case for FreeBSD 7.x machines.

Modified:
  head/lib/libmagic/Makefile
  head/lib/libmagic/config.h

Modified: head/lib/libmagic/Makefile
==
--- head/lib/libmagic/Makefile  Sat May 19 02:08:52 2012(r235637)
+++ head/lib/libmagic/Makefile  Sat May 19 02:30:10 2012(r235638)
@@ -39,8 +39,9 @@ magic.mgc: mkmagic magic
 
 CLEANFILES+=   mkmagic
 build-tools: mkmagic
-mkmagic: apprentice.c funcs.c magic.c print.c
-   ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
+mkmagic: apprentice.c funcs.c getline.c magic.c print.c
+   ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \
+   -o ${.TARGET} ${.ALLSRC}
 
 FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
${.CURDIR}/config.h

Modified: head/lib/libmagic/config.h
==
--- head/lib/libmagic/config.h  Sat May 19 02:08:52 2012(r235637)
+++ head/lib/libmagic/config.h  Sat May 19 02:30:10 2012(r235638)
@@ -39,7 +39,9 @@
 #define HAVE_FSEEKO 1
 
 /* Define to 1 if you have the `getline' function. */
+#ifndef HOSTPROG
 #define HAVE_GETLINE 1
+#endif
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_GETOPT_H 1
___
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: r235637 - head

2012-05-18 Thread Marcel Moolenaar
Author: marcel
Date: Sat May 19 02:08:52 2012
New Revision: 235637
URL: http://svn.freebsd.org/changeset/base/235637

Log:
  Fix bootstrapping from FreeBSD 7.x: we also need to build ar.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri May 18 23:29:30 2012(r235636)
+++ head/Makefile.inc1  Sat May 19 02:08:52 2012(r235637)
@@ -1007,6 +1007,10 @@ _gperf=  gnu/usr.bin/gperf
 _groff=gnu/usr.bin/groff
 .endif
 
+.if ${BOOTSTRAPPING} < 800022
+_ar=   usr.bin/ar
+.endif
+
 .if ${BOOTSTRAPPING} < 800013
 _mklocale= usr.bin/mklocale
 .endif
@@ -1069,6 +1073,7 @@ bootstrap-tools:
 ${_strfile} \
 ${_gperf} \
 ${_groff} \
+${_ar} \
 ${_dtc} \
 ${_awk} \
 usr.bin/lorder \
___
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: r235636 - in stable/7/sys: conf dev/mfi modules/mfi

2012-05-18 Thread Oliver Pinter
On 5/19/12, Oliver Pinter  wrote:
> cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks
> -march=core2 -
> fno-builtin-strftime -Wsystem-headers -Wall -Wno-format-y2k -W
> -Wno-unused-param
> eter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-uninitialized
>  -Wno-pointer-sign -c /usr/src/usr.sbin/mfiutil/mfi_evt.c
> /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'mfi_decode_evt':
> /usr/src/usr.sbin/mfiutil/mfi_evt.c:366: error: 'struct mfi_evt_detail' has
> no m
> ember named 'class'
> /usr/src/usr.sbin/mfiutil/mfi_evt.c:367: error: 'struct mfi_evt_detail' has
> no m
> ember named 'class'
> /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'show_events':
> /usr/src/usr.sbin/mfiutil/mfi_evt.c:562: error: 'struct ' has no
> memb
> er named 'class'
> /usr/src/usr.sbin/mfiutil/mfi_evt.c:572: error: 'struct ' has no
> memb
> er named 'class'
> cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks
> -march=core2 -
> DGTAGS -DSYSV_CURSES -I/usr/src/usr.bin/vi
> -I/usr/src/usr.bin/vi/../../contrib/n
> vi -I/usr/src/usr.bin/vi/../../contrib/nvi/include  -c
> /usr/src/usr.bin/vi/../..
> /contrib/nvi/ex/ex_put.c
> *** Error code 1
>
> ---
>
> diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c
> index a14bb19..336fbd3 100644
> --- a/usr.sbin/mfiutil/mfi_evt.c
> +++ b/usr.sbin/mfiutil/mfi_evt.c
> @@ -363,8 +363,8 @@ mfi_decode_evt(int fd, struct mfi_evt_detail
> *detail, int verbose)
>  {
>
> printf("%5d (%s/%s/%s) - ", detail->seq,
> format_timestamp(detail->time),
> -   format_locale(detail->class.members.locale),
> -   format_class(detail->class.members.class));
> +   format_locale(detail->evt_class.members.locale),
> +   format_class(detail->evt_class.members.evt_class));
> switch (detail->arg_type) {
> case MR_EVT_ARGS_NONE:
> break;
> @@ -559,7 +559,7 @@ show_events(int ac, char **av)
> num_events = 15;
> filter.members.reserved = 0;
> filter.members.locale = MFI_EVT_LOCALE_ALL;
> -   filter.members.class = MFI_EVT_CLASS_WARNING;
> +   filter.members.evt_class = MFI_EVT_CLASS_WARNING;
> start = info.boot_seq_num;
> stop = info.newest_seq_num;
> verbose = 0;
> @@ -569,7 +569,7 @@ show_events(int ac, char **av)
> while ((ch = getopt(ac, av, "c:l:n:v")) != -1) {
> switch (ch) {
> case 'c':
> -   if (parse_class(optarg, &filter.members.class) < 0)
> {
> +   if (parse_class(optarg,
> &filter.members.evt_class) < 0) {
> error = errno;
> warn("Error parsing event class");
> close(fd);
>
>
> --
>
> not tested, compiling now
>
> On 5/19/12, Sean Bruno  wrote:
>> Author: sbruno
>> Date: Fri May 18 23:29:30 2012
>> New Revision: 235636
>> URL: http://svn.freebsd.org/changeset/base/235636
>>
>> Log:
>>   MFC of head thunderbolt support for mfi(4)
>>
>>   r233711 -- IFV head_mfi into head for initial thunderbolt support
>>   r233768 -- atomic_t --> mfi_atomic
>>   r233805 -- fix tinderbuild, move megasas_sge to mfivar.h
>>   r233877 -- remove atomic.h from includes
>>   r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling
>>   r235016 -- style(9)
>>   r235040 -- fix returns from mfi_tbolt_sync_map_info()
>>   r235318 -- repair panic on PAE i386
>>   r235321 -- repair the repair of panics on PAE i386
>>
>> Added:
>>   stable/7/sys/dev/mfi/mfi_syspd.c
>>  - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c
>>   stable/7/sys/dev/mfi/mfi_tbolt.c
>>  - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c
>> Modified:
>>   stable/7/sys/conf/files
>>   stable/7/sys/dev/mfi/mfi.c
>>   stable/7/sys/dev/mfi/mfi_cam.c
>>   stable/7/sys/dev/mfi/mfi_debug.c
>>   stable/7/sys/dev/mfi/mfi_disk.c
>>   stable/7/sys/dev/mfi/mfi_ioctl.h
>>   stable/7/sys/dev/mfi/mfi_linux.c
>>   stable/7/sys/dev/mfi/mfi_pci.c
>>   stable/7/sys/dev/mfi/mfireg.h
>>   stable/7/sys/dev/mfi/mfivar.h
>>   stable/7/sys/modules/mfi/Makefile
>> Directory Properties:
>>   stable/7/sys/   (props changed)
>>
>> Modified: stable/7/sys/conf/files
>> ==
>> --- stable/7/sys/conf/files  Fri May 18 21:50:26 2012(r235635)
>> +++ stable/7/sys/conf/files  Fri May 18 23:29:30 2012(r235636)
>> @@ -948,6 +948,8 @@ dev/mfi/mfi.coptional mfi
>>  dev/mfi/mfi_debug.c optional mfi
>>  dev/mfi/mfi_pci.c   optional mfi pci
>>  dev/mfi/mfi_disk.c  optional mfi
>> +dev/mfi/mfi_syspd.c optional mfi
>> +dev/mfi/mfi_tbolt.c optional mfi
>>  dev/mfi/mfi_linux.c optional mfi compat_linux
>>  dev/mfi/mfi_cam.c   optional mfip scbus
>>  dev/mii/acphy.c optional miibus | acphy
>>
>> Modifie

Re: svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi

2012-05-18 Thread Oliver Pinter
cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks -march=core2 -
fno-builtin-strftime -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-param
eter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized
 -Wno-pointer-sign -c /usr/src/usr.sbin/mfiutil/mfi_evt.c
/usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'mfi_decode_evt':
/usr/src/usr.sbin/mfiutil/mfi_evt.c:366: error: 'struct mfi_evt_detail' has no m
ember named 'class'
/usr/src/usr.sbin/mfiutil/mfi_evt.c:367: error: 'struct mfi_evt_detail' has no m
ember named 'class'
/usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'show_events':
/usr/src/usr.sbin/mfiutil/mfi_evt.c:562: error: 'struct ' has no memb
er named 'class'
/usr/src/usr.sbin/mfiutil/mfi_evt.c:572: error: 'struct ' has no memb
er named 'class'
cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks -march=core2 -
DGTAGS -DSYSV_CURSES -I/usr/src/usr.bin/vi -I/usr/src/usr.bin/vi/../../contrib/n
vi -I/usr/src/usr.bin/vi/../../contrib/nvi/include  -c /usr/src/usr.bin/vi/../..
/contrib/nvi/ex/ex_put.c
*** Error code 1

---

diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c
index a14bb19..336fbd3 100644
--- a/usr.sbin/mfiutil/mfi_evt.c
+++ b/usr.sbin/mfiutil/mfi_evt.c
@@ -363,8 +363,8 @@ mfi_decode_evt(int fd, struct mfi_evt_detail
*detail, int verbose)
 {

printf("%5d (%s/%s/%s) - ", detail->seq, format_timestamp(detail->time),
-   format_locale(detail->class.members.locale),
-   format_class(detail->class.members.class));
+   format_locale(detail->evt_class.members.locale),
+   format_class(detail->evt_class.members.evt_class));
switch (detail->arg_type) {
case MR_EVT_ARGS_NONE:
break;
@@ -559,7 +559,7 @@ show_events(int ac, char **av)
num_events = 15;
filter.members.reserved = 0;
filter.members.locale = MFI_EVT_LOCALE_ALL;
-   filter.members.class = MFI_EVT_CLASS_WARNING;
+   filter.members.evt_class = MFI_EVT_CLASS_WARNING;
start = info.boot_seq_num;
stop = info.newest_seq_num;
verbose = 0;
@@ -569,7 +569,7 @@ show_events(int ac, char **av)
while ((ch = getopt(ac, av, "c:l:n:v")) != -1) {
switch (ch) {
case 'c':
-   if (parse_class(optarg, &filter.members.class) < 0) {
+   if (parse_class(optarg,
&filter.members.evt_class) < 0) {
error = errno;
warn("Error parsing event class");
close(fd);


--

not tested, compiling now

On 5/19/12, Sean Bruno  wrote:
> Author: sbruno
> Date: Fri May 18 23:29:30 2012
> New Revision: 235636
> URL: http://svn.freebsd.org/changeset/base/235636
>
> Log:
>   MFC of head thunderbolt support for mfi(4)
>
>   r233711 -- IFV head_mfi into head for initial thunderbolt support
>   r233768 -- atomic_t --> mfi_atomic
>   r233805 -- fix tinderbuild, move megasas_sge to mfivar.h
>   r233877 -- remove atomic.h from includes
>   r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling
>   r235016 -- style(9)
>   r235040 -- fix returns from mfi_tbolt_sync_map_info()
>   r235318 -- repair panic on PAE i386
>   r235321 -- repair the repair of panics on PAE i386
>
> Added:
>   stable/7/sys/dev/mfi/mfi_syspd.c
>  - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c
>   stable/7/sys/dev/mfi/mfi_tbolt.c
>  - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c
> Modified:
>   stable/7/sys/conf/files
>   stable/7/sys/dev/mfi/mfi.c
>   stable/7/sys/dev/mfi/mfi_cam.c
>   stable/7/sys/dev/mfi/mfi_debug.c
>   stable/7/sys/dev/mfi/mfi_disk.c
>   stable/7/sys/dev/mfi/mfi_ioctl.h
>   stable/7/sys/dev/mfi/mfi_linux.c
>   stable/7/sys/dev/mfi/mfi_pci.c
>   stable/7/sys/dev/mfi/mfireg.h
>   stable/7/sys/dev/mfi/mfivar.h
>   stable/7/sys/modules/mfi/Makefile
> Directory Properties:
>   stable/7/sys/   (props changed)
>
> Modified: stable/7/sys/conf/files
> ==
> --- stable/7/sys/conf/files   Fri May 18 21:50:26 2012(r235635)
> +++ stable/7/sys/conf/files   Fri May 18 23:29:30 2012(r235636)
> @@ -948,6 +948,8 @@ dev/mfi/mfi.c optional mfi
>  dev/mfi/mfi_debug.c  optional mfi
>  dev/mfi/mfi_pci.coptional mfi pci
>  dev/mfi/mfi_disk.c   optional mfi
> +dev/mfi/mfi_syspd.c  optional mfi
> +dev/mfi/mfi_tbolt.c  optional mfi
>  dev/mfi/mfi_linux.c  optional mfi compat_linux
>  dev/mfi/mfi_cam.coptional mfip scbus
>  dev/mii/acphy.c  optional miibus | acphy
>
> Modified: stable/7/sys/dev/mfi/mfi.c
> ==
> --- stable/7/sys/dev/mfi/mfi.cFri May 18 21:50:26 2012
> (r235635)
> +++ stable/7/sys/dev/mf

svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 23:29:30 2012
New Revision: 235636
URL: http://svn.freebsd.org/changeset/base/235636

Log:
  MFC of head thunderbolt support for mfi(4)
  
  r233711 -- IFV head_mfi into head for initial thunderbolt support
  r233768 -- atomic_t --> mfi_atomic
  r233805 -- fix tinderbuild, move megasas_sge to mfivar.h
  r233877 -- remove atomic.h from includes
  r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling
  r235016 -- style(9)
  r235040 -- fix returns from mfi_tbolt_sync_map_info()
  r235318 -- repair panic on PAE i386
  r235321 -- repair the repair of panics on PAE i386

Added:
  stable/7/sys/dev/mfi/mfi_syspd.c
 - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c
  stable/7/sys/dev/mfi/mfi_tbolt.c
 - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c
Modified:
  stable/7/sys/conf/files
  stable/7/sys/dev/mfi/mfi.c
  stable/7/sys/dev/mfi/mfi_cam.c
  stable/7/sys/dev/mfi/mfi_debug.c
  stable/7/sys/dev/mfi/mfi_disk.c
  stable/7/sys/dev/mfi/mfi_ioctl.h
  stable/7/sys/dev/mfi/mfi_linux.c
  stable/7/sys/dev/mfi/mfi_pci.c
  stable/7/sys/dev/mfi/mfireg.h
  stable/7/sys/dev/mfi/mfivar.h
  stable/7/sys/modules/mfi/Makefile
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/conf/files
==
--- stable/7/sys/conf/files Fri May 18 21:50:26 2012(r235635)
+++ stable/7/sys/conf/files Fri May 18 23:29:30 2012(r235636)
@@ -948,6 +948,8 @@ dev/mfi/mfi.c   optional mfi
 dev/mfi/mfi_debug.coptional mfi
 dev/mfi/mfi_pci.c  optional mfi pci
 dev/mfi/mfi_disk.c optional mfi
+dev/mfi/mfi_syspd.coptional mfi
+dev/mfi/mfi_tbolt.coptional mfi
 dev/mfi/mfi_linux.coptional mfi compat_linux
 dev/mfi/mfi_cam.c  optional mfip scbus
 dev/mii/acphy.coptional miibus | acphy

Modified: stable/7/sys/dev/mfi/mfi.c
==
--- stable/7/sys/dev/mfi/mfi.c  Fri May 18 21:50:26 2012(r235635)
+++ stable/7/sys/dev/mfi/mfi.c  Fri May 18 23:29:30 2012(r235636)
@@ -53,6 +53,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_compat.h"
 #include "opt_mfi.h"
 
 #include 
@@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 
 static int mfi_alloc_commands(struct mfi_softc *);
 static int mfi_comms_init(struct mfi_softc *);
-static int mfi_wait_command(struct mfi_softc *, struct mfi_command *);
 static int mfi_get_controller_info(struct mfi_softc *);
 static int mfi_get_log_state(struct mfi_softc *,
struct mfi_evt_log_state **);
 static int mfi_parse_entries(struct mfi_softc *, int, int);
-static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **,
-   uint32_t, void **, size_t);
 static voidmfi_data_cb(void *, bus_dma_segment_t *, int, int);
 static voidmfi_startup(void *arg);
 static voidmfi_intr(void *arg);
 static voidmfi_ldprobe(struct mfi_softc *sc);
+static voidmfi_syspdprobe(struct mfi_softc *sc);
+static voidmfi_handle_evt(void *context, int pending);
 static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale);
 static voidmfi_aen_complete(struct mfi_command *);
-static int mfi_aen_setup(struct mfi_softc *, uint32_t);
 static int mfi_add_ld(struct mfi_softc *sc, int);
 static voidmfi_add_ld_complete(struct mfi_command *);
+static int mfi_add_sys_pd(struct mfi_softc *sc, int);
+static voidmfi_add_sys_pd_complete(struct mfi_command *);
 static struct mfi_command * mfi_bio_command(struct mfi_softc *);
 static voidmfi_bio_complete(struct mfi_command *);
-static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *);
+static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*);
+static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*);
 static int mfi_send_frame(struct mfi_softc *, struct mfi_command *);
-static voidmfi_complete(struct mfi_softc *, struct mfi_command *);
 static int mfi_abort(struct mfi_softc *, struct mfi_command *);
-static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, 
d_thread_t *);
+static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct 
thread *);
 static voidmfi_timeout(void *);
 static int mfi_user_command(struct mfi_softc *,
struct mfi_ioc_passthru *);
-static voidmfi_enable_intr_xscale(struct mfi_softc *sc);
-static voidmfi_enable_intr_ppc(struct mfi_softc *sc);
-static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc);
-static int32_t mfi_read_fw_status_ppc(struct mfi_softc *s

svn commit: r235635 - head/usr.sbin/mfiutil

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 21:50:26 2012
New Revision: 235635
URL: http://svn.freebsd.org/changeset/base/235635

Log:
  Decode new battery status indications.
  
  Requires r235634
  
  Reviewed by:  ambrisko@
  MFC after:3 days

Modified:
  head/usr.sbin/mfiutil/mfi_show.c

Modified: head/usr.sbin/mfiutil/mfi_show.c
==
--- head/usr.sbin/mfiutil/mfi_show.cFri May 18 21:49:40 2012
(r235634)
+++ head/usr.sbin/mfiutil/mfi_show.cFri May 18 21:50:26 2012
(r235635)
@@ -224,7 +224,29 @@ show_battery(int ac, char **av)
}
if (stat.fw_status & MFI_BBU_STATE_DISCHARGE_ACTIVE) {
printf("%s DISCHARGING", comma ? "," : "");
+   comma = 1;
}
+   if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_REQ) {
+   printf("%s LEARN_CYCLE_REQUESTED", comma ? "," : "");
+   comma = 1;
+   }
+   if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_ACTIVE) {
+   printf("%s LEARN_CYCLE_ACTIVE", comma ? "," : "");
+   comma = 1;
+   }
+   if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_FAIL) {
+   printf("%s LEARN_CYCLE_FAIL", comma ? "," : "");
+   comma = 1;
+   }
+   if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_TIMEOUT) {
+   printf("%s LEARN_CYCLE_TIMEOUT", comma ? "," : "");
+   comma = 1;
+   }
+   if (stat.fw_status & MFI_BBU_STATE_I2C_ERR_DETECT) {
+   printf("%s I2C_ERROR_DETECT", comma ? "," : "");
+   comma = 1;
+   }
+
if (!comma)
printf(" normal");
printf("\n");
___
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: r235634 - head/sys/dev/mfi

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 21:49:40 2012
New Revision: 235634
URL: http://svn.freebsd.org/changeset/base/235634

Log:
  Fix and update battery status bits according to linux driver
  
  Reviewed by:  ambrisko@
  MFC after:3 days

Modified:
  head/sys/dev/mfi/mfireg.h

Modified: head/sys/dev/mfi/mfireg.h
==
--- head/sys/dev/mfi/mfireg.h   Fri May 18 21:49:11 2012(r235633)
+++ head/sys/dev/mfi/mfireg.h   Fri May 18 21:49:40 2012(r235634)
@@ -1377,8 +1377,13 @@ struct mfi_bbu_status {
 #defineMFI_BBU_STATE_PACK_MISSING  (1 << 0)
 #defineMFI_BBU_STATE_VOLTAGE_LOW   (1 << 1)
 #defineMFI_BBU_STATE_TEMPERATURE_HIGH  (1 << 2)
-#defineMFI_BBU_STATE_CHARGE_ACTIVE (1 << 0)
-#defineMFI_BBU_STATE_DISCHARGE_ACTIVE  (1 << 0)
+#defineMFI_BBU_STATE_CHARGE_ACTIVE (1 << 3)
+#defineMFI_BBU_STATE_DISCHARGE_ACTIVE  (1 << 4)
+#defineMFI_BBU_STATE_LEARN_CYC_REQ (1 << 5)
+#defineMFI_BBU_STATE_LEARN_CYC_ACTIVE  (1 << 6)
+#defineMFI_BBU_STATE_LEARN_CYC_FAIL(1 << 7)
+#defineMFI_BBU_STATE_LEARN_CYC_TIMEOUT (1 << 8)
+#defineMFI_BBU_STATE_I2C_ERR_DETECT(1 << 9)
uint8_t pad[20];
union mfi_bbu_status_detail detail;
 } __packed;
___
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: r235631 - in stable/7/sys/dev: advansys amr an arcmsr asr buslogic ciss cxgb dpt hifn hptiop hptmv ida if_ndis iir ips mfi mlx mly twe

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 21:40:17 2012
New Revision: 235631
URL: http://svn.freebsd.org/changeset/base/235631

Log:
  MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag()

Modified:
  stable/7/sys/dev/advansys/adv_pci.c
  stable/7/sys/dev/advansys/adw_pci.c
  stable/7/sys/dev/amr/amr_pci.c
  stable/7/sys/dev/an/if_an_pci.c
  stable/7/sys/dev/arcmsr/arcmsr.c
  stable/7/sys/dev/asr/asr.c
  stable/7/sys/dev/buslogic/bt_pci.c
  stable/7/sys/dev/ciss/ciss.c
  stable/7/sys/dev/cxgb/cxgb_sge.c
  stable/7/sys/dev/dpt/dpt_pci.c
  stable/7/sys/dev/hifn/hifn7751.c
  stable/7/sys/dev/hptiop/hptiop.c
  stable/7/sys/dev/hptmv/entry.c
  stable/7/sys/dev/ida/ida_pci.c
  stable/7/sys/dev/if_ndis/if_ndis_pci.c
  stable/7/sys/dev/iir/iir_pci.c
  stable/7/sys/dev/ips/ips_pci.c
  stable/7/sys/dev/mfi/mfi_pci.c
  stable/7/sys/dev/mlx/mlx_pci.c
  stable/7/sys/dev/mly/mly.c
  stable/7/sys/dev/twe/twe_freebsd.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/advansys/adv_pci.c
==
--- stable/7/sys/dev/advansys/adv_pci.c Fri May 18 20:43:48 2012
(r235630)
+++ stable/7/sys/dev/advansys/adv_pci.c Fri May 18 21:40:17 2012
(r235631)
@@ -189,7 +189,7 @@ adv_pci_attach(device_t dev)
/* Allocate a dmatag for our transfer DMA maps */
/* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADV_PCI_MAX_DMA_ADDR,

Modified: stable/7/sys/dev/advansys/adw_pci.c
==
--- stable/7/sys/dev/advansys/adw_pci.c Fri May 18 20:43:48 2012
(r235630)
+++ stable/7/sys/dev/advansys/adw_pci.c Fri May 18 21:40:17 2012
(r235631)
@@ -260,7 +260,7 @@ adw_pci_attach(device_t dev)
/* Allocate a dmatag for our transfer DMA maps */
/* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADW_PCI_MAX_DMA_ADDR,

Modified: stable/7/sys/dev/amr/amr_pci.c
==
--- stable/7/sys/dev/amr/amr_pci.c  Fri May 18 20:43:48 2012
(r235630)
+++ stable/7/sys/dev/amr/amr_pci.c  Fri May 18 21:40:17 2012
(r235631)
@@ -277,7 +277,7 @@ amr_pci_attach(device_t dev)
 /*
  * Allocate the parent bus DMA tag appropriate for PCI.
  */
-if (bus_dma_tag_create(NULL,   /* parent */
+if (bus_dma_tag_create(bus_get_dma_tag(dev),   /* PCI parent */
   1, 0,/* alignment,boundary */
   AMR_IS_SG64(sc) ?
   BUS_SPACE_MAXADDR :

Modified: stable/7/sys/dev/an/if_an_pci.c
==
--- stable/7/sys/dev/an/if_an_pci.c Fri May 18 20:43:48 2012
(r235630)
+++ stable/7/sys/dev/an/if_an_pci.c Fri May 18 21:40:17 2012
(r235631)
@@ -206,7 +206,7 @@ an_attach_pci(dev)
sc->an_mem_aux_bhandle = rman_get_bushandle(sc->mem_aux_res);
 
/* Allocate DMA region */
-   error = bus_dma_tag_create(NULL,/* parent */
+   error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */
   1, 0,/* alignment, bounds */
   BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
   BUS_SPACE_MAXADDR,   /* highaddr */

Modified: stable/7/sys/dev/arcmsr/arcmsr.c
==
--- stable/7/sys/dev/arcmsr/arcmsr.cFri May 18 20:43:48 2012
(r235630)
+++ stable/7/sys/dev/arcmsr/arcmsr.cFri May 18 21:40:17 2012
(r235631)
@@ -3396,7 +3396,7 @@ static u_int32_t arcmsr_initialize(devic
return ENOMEM;
}
}
-   if(bus_dma_tag_create(  /*parent*/  NULL,
+   if(bus_dma_tag_create(  /*PCI parent*/  bus_get_dma_tag(dev),
/*alignemnt*/   1,
/*boundary*/0,
/*lowaddr*/ 
BUS_SPACE_MAXADDR,

Modified: stable/7/sys/dev/asr/asr.c
==
--- stable/7/sys/dev/asr/as

svn commit: r235630 - stable/8/sys/i386/conf

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 20:43:48 2012
New Revision: 235630
URL: http://svn.freebsd.org/changeset/base/235630

Log:
  Purge mergeinfo from i386/conf/XENHVM.  The mergeinfo related to
  amd64/conf/XENHVM is only useful in HEAD.

Modified:
Directory Properties:
  stable/8/sys/i386/conf/XENHVM   (props changed)
___
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: r235629 - stable/9/sys/i386/conf

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 20:40:24 2012
New Revision: 235629
URL: http://svn.freebsd.org/changeset/base/235629

Log:
  Purge mergeinfo from i386/conf/XENHVM.  The mergeinfo related to
  amd64/conf/XENHVM is only useful in HEAD.

Modified:
Directory Properties:
  stable/9/sys/i386/conf/XENHVM   (props changed)
___
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: r235628 - head/share/dtrace

2012-05-18 Thread George V. Neville-Neil
Author: gnn
Date: Fri May 18 20:34:08 2012
New Revision: 235628
URL: http://svn.freebsd.org/changeset/base/235628

Log:
  Fix a case typo.
  
  Pointed out by: jlh@

Modified:
  head/share/dtrace/README

Modified: head/share/dtrace/README
==
--- head/share/dtrace/READMEFri May 18 20:24:31 2012(r235627)
+++ head/share/dtrace/READMEFri May 18 20:34:08 2012(r235628)
@@ -2,7 +2,7 @@ $FreeBSD$
 
 This directory contains scripts for use with the DTrace system.  The
 toolkit/ directory contains the latest vendor import of Brendan
-Gregg's DTRaceToolkit while all the other files and directories
+Gregg's DTraceToolkit while all the other files and directories
 contain code generated by the FreeBSD Project for use with DTrace on
 FreeBSD.
 
___
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: r235627 - in stable/9/sys: i386/conf kern

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 20:24:31 2012
New Revision: 235627
URL: http://svn.freebsd.org/changeset/base/235627

Log:
  Move mergeinfo from sys/kern/subr_witness.c up to sys/.

Modified:
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)
  stable/9/sys/modules/   (props changed)
___
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: r235626 - in stable/9/sys: fs/coda fs/ext2fs fs/msdosfs fs/nfsclient fs/nfsserver i386/conf kern nfsclient sys ufs/ffs ufs/ufs

2012-05-18 Thread Kirk McKusick
Author: mckusick
Date: Fri May 18 19:48:38 2012
New Revision: 235626
URL: http://svn.freebsd.org/changeset/base/235626

Log:
  MFC of 234386, 234400, 234441, 234443, 234482, 234483, 235052, 235241,
 235246, and 235619
  
  MFC: 234386
  
  Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL.
  The primary changes are that the user of the interface no longer
  needs to manage the mount-mutex locking and that the vnode that
  is returned has its mutex locked (thus avoiding the need to check
  to see if its is DOOMED or other possible end of life senarios).
  
  To minimize compatibility issues for third-party developers, the
  old MNT_VNODE_FOREACH interface will remain available so that this
  change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH
  will be removed in head.
  
  The reason for this update is to prepare for the addition of the
  MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the
  active vnodes associated with a mount point (typically less than
  1% of the vnodes associated with the mount point).
  
  Reviewed by: kib
  Tested by:   Peter Holm
  MFC after:   2 weeks
  
  MFC: 234400
  
  Drop export of vdestroy() function from kern/vfs_subr.c as it is
  used only as a helper function in that file. Replace sole call to
  vbusy() with inline code in vholdl(). Replace sole calls to vfree()
  and vdestroy() with inline code in vdropl().
  
  The Clang compiler already inlines these functions, so they do not
  show up in a kernel backtrace which is confusing. Also you cannot
  set their frame in kgdb which means that it is impossible to view
  their local variables. So, while the produced code is unchanged,
  the debugging should be easier.
  
  Discussed with: kib
  MFC after:  2 weeks
  
  MFC: 234441
  
  Fix a memory leak of M_VNODE_MARKER introduced in 234386.
  
  Found by:  Peter Holm
  
  MFC: 234443
  
  Delete a no longer useful VNASSERT missed during changes in 234400.
  
  Suggested by: kib
  
  MFC: 234482
  
  This change creates a new list of active vnodes associated with
  a mount point. Active vnodes are those with a non-zero use or hold
  count, e.g., those vnodes that are not on the free list. Note that
  this list is in addition to the list of all the vnodes associated
  with a mount point.
  
  To avoid adding another set of linkage pointers to the vnode
  structure, the active list uses the existing linkage pointers
  used by the free list (previously named v_freelist, now renamed
  v_actfreelist).
  
  This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops
  over just the active vnodes associated with a mount point (typically
  less than 1% of the vnodes associated with the mount point).
  
  Reviewed by: kib
  Tested by:   Peter Holm
  MFC after:   2 weeks
  
  MFC: 234483
  
  This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops
  over just the active vnodes associated with a mount point to replace
  MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync
  routines.
  
  The vfs_msync routine is run every 30 seconds for every writably
  mounted filesystem. It ensures that any files mmap'ed from the
  filesystem with modified pages have those pages queued to be
  written back to the file from which they are mapped.
  
  The ffs_lazy_sync and qsync routines are run every 30 seconds for
  every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine
  ensures that any files that have been accessed in the previous
  30 seconds have had their access times queued for updating in the
  filesystem. The qsync routine ensures that any files with modified
  quotas have those quotas queued to be written back to their
  associated quota file.
  
  In a system configured with 250,000 vnodes, less than 1000 are
  typically active at any point in time. Prior to this change all
  250,000 vnodes would be locked and inspected twice every minute
  by the syncer. For UFS/FFS filesystems they would be locked and
  inspected six times every minute (twice by each of these three
  routines since each of these routines does its own pass over the
  vnodes associated with a mount point). With this change the syncer
  now locks and inspects only the tiny set of vnodes that are active.
  
  Reviewed by: kib
  Tested by:   Peter Holm
  MFC after:   2 weeks
  
  MFC: 235052 (by pluknet)
  
  Fix mount mutex handling missed in r234386.
  
  MFC: 235241 (by pluknet)
  
  Fix mount interlock oversights from the previous change in r234386.
  
  Reported by:dougb
  Submitted by:   Mateusz Guzik 
  Reviewed by:Kirk McKusick
  Tested by:  pho
  
  MFC: 235246
  
  Fix mount mutex handling missed in r234386.
  
  MFC: 235619
  
  Update comment to document that the vnode free-list mutex needs to be
  held when updating mnt_activevnodelist and mnt_activevnodelistsize.

Modified:
  stable/9/sys/fs/coda/coda_subr.c
  stable/9/sys/fs/ext2fs/ext2_vfsops.c
  stable/9/sys/fs/msdosfs/msdosfs_vfsops.c
  stable/9/

svn commit: r235625 - in stable/8/sys: conf dev/mfi modules/mfi

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 19:48:33 2012
New Revision: 235625
URL: http://svn.freebsd.org/changeset/base/235625

Log:
  MFC of head thunderbolt support for mfi(4)
  
  r233711 -- IFV head_mfi into head for initial thunderbolt support
  r233768 -- atomic_t --> mfi_atomic
  r233805 -- fix tinderbuild, move megasas_sge to mfivar.h
  r233877 -- remove atomic.h from includes
  r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling
  r235016 -- style(9)
  r235040 -- fix returns from mfi_tbolt_sync_map_info()
  r235318 -- repair panic on PAE i386
  r235321 -- repair the repair of panics on PAE i386

Added:
  stable/8/sys/dev/mfi/mfi_syspd.c
 - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c
  stable/8/sys/dev/mfi/mfi_tbolt.c
 - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c
Modified:
  stable/8/sys/conf/files
  stable/8/sys/dev/mfi/mfi.c
  stable/8/sys/dev/mfi/mfi_cam.c
  stable/8/sys/dev/mfi/mfi_debug.c
  stable/8/sys/dev/mfi/mfi_disk.c
  stable/8/sys/dev/mfi/mfi_ioctl.h
  stable/8/sys/dev/mfi/mfi_linux.c
  stable/8/sys/dev/mfi/mfi_pci.c
  stable/8/sys/dev/mfi/mfireg.h
  stable/8/sys/dev/mfi/mfivar.h
  stable/8/sys/modules/mfi/Makefile
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/conf/files
==
--- stable/8/sys/conf/files Fri May 18 19:08:10 2012(r235624)
+++ stable/8/sys/conf/files Fri May 18 19:48:33 2012(r235625)
@@ -1277,6 +1277,8 @@ dev/mfi/mfi.c optional mfi
 dev/mfi/mfi_debug.coptional mfi
 dev/mfi/mfi_pci.c  optional mfi pci
 dev/mfi/mfi_disk.c optional mfi
+dev/mfi/mfi_syspd.coptional mfi
+dev/mfi/mfi_tbolt.coptional mfi
 dev/mfi/mfi_linux.coptional mfi compat_linux
 dev/mfi/mfi_cam.c  optional mfip scbus
 dev/mii/acphy.coptional miibus | acphy

Modified: stable/8/sys/dev/mfi/mfi.c
==
--- stable/8/sys/dev/mfi/mfi.c  Fri May 18 19:08:10 2012(r235624)
+++ stable/8/sys/dev/mfi/mfi.c  Fri May 18 19:48:33 2012(r235625)
@@ -53,6 +53,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_compat.h"
 #include "opt_mfi.h"
 
 #include 
@@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 
 static int mfi_alloc_commands(struct mfi_softc *);
 static int mfi_comms_init(struct mfi_softc *);
-static int mfi_wait_command(struct mfi_softc *, struct mfi_command *);
 static int mfi_get_controller_info(struct mfi_softc *);
 static int mfi_get_log_state(struct mfi_softc *,
struct mfi_evt_log_state **);
 static int mfi_parse_entries(struct mfi_softc *, int, int);
-static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **,
-   uint32_t, void **, size_t);
 static voidmfi_data_cb(void *, bus_dma_segment_t *, int, int);
 static voidmfi_startup(void *arg);
 static voidmfi_intr(void *arg);
 static voidmfi_ldprobe(struct mfi_softc *sc);
+static voidmfi_syspdprobe(struct mfi_softc *sc);
+static voidmfi_handle_evt(void *context, int pending);
 static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale);
 static voidmfi_aen_complete(struct mfi_command *);
-static int mfi_aen_setup(struct mfi_softc *, uint32_t);
 static int mfi_add_ld(struct mfi_softc *sc, int);
 static voidmfi_add_ld_complete(struct mfi_command *);
+static int mfi_add_sys_pd(struct mfi_softc *sc, int);
+static voidmfi_add_sys_pd_complete(struct mfi_command *);
 static struct mfi_command * mfi_bio_command(struct mfi_softc *);
 static voidmfi_bio_complete(struct mfi_command *);
-static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *);
+static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*);
+static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*);
 static int mfi_send_frame(struct mfi_softc *, struct mfi_command *);
-static voidmfi_complete(struct mfi_softc *, struct mfi_command *);
 static int mfi_abort(struct mfi_softc *, struct mfi_command *);
 static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct 
thread *);
 static voidmfi_timeout(void *);
 static int mfi_user_command(struct mfi_softc *,
struct mfi_ioc_passthru *);
-static voidmfi_enable_intr_xscale(struct mfi_softc *sc);
-static voidmfi_enable_intr_ppc(struct mfi_softc *sc);
-static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc);
-static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc);
-static int mfi_check_clear_intr_xscale(struct mfi_softc *sc);
-static int mf

svn commit: r235624 - stable/9/lib/libjail

2012-05-18 Thread Jamie Gritton
Author: jamie
Date: Fri May 18 19:08:10 2012
New Revision: 235624
URL: http://svn.freebsd.org/changeset/base/235624

Log:
  MFC r235291:
  
   The linker isn't consistent in the ordering of dynamic sysctls, so don't
   assume that the unnamed final component of "security.jail.param.foo." is
   one less than the "foo" component.  It might be one greater instead.

Modified:
  stable/9/lib/libjail/jail.c
Directory Properties:
  stable/9/lib/libjail/   (props changed)

Modified: stable/9/lib/libjail/jail.c
==
--- stable/9/lib/libjail/jail.c Fri May 18 19:02:39 2012(r235623)
+++ stable/9/lib/libjail/jail.c Fri May 18 19:08:10 2012(r235624)
@@ -855,7 +855,7 @@ jailparam_type(struct jailparam *jp)
 {
char *p, *nname;
size_t miblen, desclen;
-   int isarray;
+   int i, isarray;
struct {
int i;
char s[MAXPATHLEN];
@@ -977,21 +977,33 @@ jailparam_type(struct jailparam *jp)
}
break;
case CTLTYPE_NODE:
-   /* A node might be described by an empty-named child. */
+   /*
+* A node might be described by an empty-named child,
+* which would be immediately before or after the node itself.
+*/
mib[1] = 1;
-   mib[(miblen / sizeof(int)) + 2] =
-   mib[(miblen / sizeof(int)) + 1] - 1;
miblen += sizeof(int);
-   desclen = sizeof(desc.s);
-   if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s, &desclen,
-   NULL, 0) < 0) {
-   snprintf(jail_errmsg, JAIL_ERRMSGLEN,
-   "sysctl(0.1): %s", strerror(errno));
-   return (-1);
+   for (i = -1; i <= 1; i += 2) {
+   mib[(miblen / sizeof(int)) + 1] =
+   mib[(miblen / sizeof(int))] + i;
+   desclen = sizeof(desc.s);
+   if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s,
+   &desclen, NULL, 0) < 0) {
+   if (errno == ENOENT)
+   continue;
+   snprintf(jail_errmsg, JAIL_ERRMSGLEN,
+   "sysctl(0.1): %s", strerror(errno));
+   return (-1);
+   }
+   if (desclen ==
+   sizeof(SJPARAM) + strlen(jp->jp_name) + 2 &&
+   memcmp(SJPARAM ".", desc.s, sizeof(SJPARAM)) == 0 &&
+   memcmp(jp->jp_name, desc.s + sizeof(SJPARAM),
+   desclen - sizeof(SJPARAM) - 2) == 0 &&
+   desc.s[desclen - 2] == '.')
+   goto mib_desc;
}
-   if (desc.s[desclen - 2] != '.')
-   goto unknown_parameter;
-   goto mib_desc;
+   goto unknown_parameter;
default:
snprintf(jail_errmsg, JAIL_ERRMSGLEN,
"unknown type for %s", jp->jp_name);
___
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: r235623 - in head/contrib/gcc: . config/rs6000 config/sparc

2012-05-18 Thread Pedro F. Giffuni
Author: pfg
Date: Fri May 18 19:02:39 2012
New Revision: 235623
URL: http://svn.freebsd.org/changeset/base/235623

Log:
  Bring in a subset of gcc fixes that were back ported to
  the GCC 4.1 branch and are available under GPLv2.
  
  2007-11-07  Eric Botcazou  
  
PR rtl-optimization/33822
* rtl.h (REG_OFFSET): Fix comment.
* var-tracking.c (INT_MEM_OFFSET): New macro.
(var_mem_set): Use it.
(var_mem_delete_and_set): Likewise.
(var_mem_delete): Likewise.
(vt_get_decl_and_offset): Likewise.
(offset_valid_for_tracked_p): New predicate.
(count_uses): Do not track locations with invalid offsets.
(add_uses): Likewise.
(add_stores): Likewise.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129972
  
  2007-11-16  Richard Guenther  
PR middle-end/34030
* fold-const.c (fold_binary): Use correct types for folding
1 << X & Y to Y >> X & 1.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130242
  
  2008-01-14  Eric Botcazou  
  
PR rtl-optimization/31944
* cse.c (remove_pseudo_from_table): New function.
(merge_equiv_classes): Use above function to remove pseudo-registers.
(invalidate): Likewise
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131524
  
  2008-01-24  Kaveh R. Ghazi  
  
  Backport:
2007-11-07  Kenneth Zadeck 
  
PR middle-end/33826
* ipa-pure-const (static_execute): Added code to keep recursive
functions from being marked as pure or const.
* ipa-utils (searchc): Fixed comment.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131807
  
  2008-02-01  Kaveh R. Ghazi  
  
Backport:
2007-08-02  Nathan Froyd  
  
PR middle-end/25445
* varasm.c (default_binds_local_p_1): Consult flag_whole_program
if we are compiling with -fPIC.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132061
  
  2008-02-04  Richard Guenther  
  
PR middle-end/33631
* expr.c (count_type_elements): Give for unions instead of
guessing.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132101
  
  2008-02-14  Alan Modra  
  
PR target/34393
* config/rs6000/rs6000.md (restore_stack_block): Force operands[1]
to a reg.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132309
  
  2008-03-25  Richard Guenther  
  
Backport from mainline:
2008-02-12  Richard Guenther  
  
PR middle-end/35163
* fold-const.c (fold_widened_comparison): Use get_unwidened in
value-preserving mode.  Disallow final truncation.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133509
  
  2008-11-30  Eric Botcazou  
  
PR target/38287
* config/sparc/sparc.md (divsi3 expander): Remove constraints.
(divsi3_sp32): Add new alternative with 'K' for operand #2.
(cmp_sdiv_cc_set): Factor common string.
(udivsi3_sp32): Add new alternative with 'K' for operand #2.
Add TARGET_V9 case.
(cmp_udiv_cc_set): Factor common string.
  http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142298
  
  Reviewed by:  mm
  Approved by:  jhb (mentor)
  MFC after:1 week

Modified:
  head/contrib/gcc/config/rs6000/rs6000.md
  head/contrib/gcc/config/sparc/sparc.md
  head/contrib/gcc/cse.c
  head/contrib/gcc/expr.c
  head/contrib/gcc/fold-const.c
  head/contrib/gcc/ipa-pure-const.c
  head/contrib/gcc/ipa-utils.c
  head/contrib/gcc/rtl.h
  head/contrib/gcc/var-tracking.c
  head/contrib/gcc/varasm.c

Modified: head/contrib/gcc/config/rs6000/rs6000.md
==
--- head/contrib/gcc/config/rs6000/rs6000.mdFri May 18 18:55:58 2012
(r235622)
+++ head/contrib/gcc/config/rs6000/rs6000.mdFri May 18 19:02:39 2012
(r235623)
@@ -10075,6 +10075,7 @@
   ""
   "
 {
+  operands[1] = force_reg (Pmode, operands[1]);
   operands[2] = gen_reg_rtx (Pmode);
   operands[3] = gen_frame_mem (Pmode, operands[0]);
   operands[4] = gen_frame_mem (Pmode, operands[1]);

Modified: head/contrib/gcc/config/sparc/sparc.md
==
--- head/contrib/gcc/config/sparc/sparc.md  Fri May 18 18:55:58 2012
(r235622)
+++ head/contrib/gcc/config/sparc/sparc.md  Fri May 18 19:02:39 2012
(r235623)
@@ -5071,14 +5071,11 @@
   [(set_attr "type" "multi")
(set_attr "length" "2")])
 
-;; The V8 architecture specifies that there must be 3 instructions between
-;; a Y register write and a use of it for correct results.
-
 (define_expand "divsi3"
-  [(parallel [(set (match_operand:SI 0 "register_operand" "=r,r")
-  (div:SI (match_operand:SI 1 "register_operand" "r,r")
-  (match_operand:SI 2 "input_operand" "rI,m")))
- (clobber (match_scratch:SI 3 "=&r,&r"))])]
+  [(parallel [(set (match_operand:SI 0 "register_operand" "")

svn commit: r235622 - in head/sys: i386/acpica i386/i386 i386/include kern pc98/pc98 sys

2012-05-18 Thread Mitsuru IWASAKI
Author: iwasaki
Date: Fri May 18 18:55:58 2012
New Revision: 235622
URL: http://svn.freebsd.org/changeset/base/235622

Log:
  Add SMP/i386 suspend/resume support.
  Most part is merged from amd64.
  
  - i386/acpica/acpi_wakecode.S
  Replaced with amd64 code (from realmode to paging enabling code).
  
  - i386/acpica/acpi_wakeup.c
  Replaced with amd64 code (except for wakeup_pagetables stuff).
  
  - i386/include/pcb.h
  - i386/i386/genassym.c
  Added PCB new members (CR0, CR2, CR4, DS, ED, FS, SS, GDT, IDT, LDT
  and TR) needed for suspend/resume, not for context switch.
  
  - i386/i386/swtch.s
  Added suspendctx() and resumectx().
  Note that savectx() was not changed and used for suspending (while
  amd64 code uses it).
  BSP and AP execute the same sequence, suspendctx(), acpi_wakecode()
  and resumectx() for suspend/resume (in case of UP system also).
  
  - i386/i386/apic_vector.s
  Added cpususpend().
  
  - i386/i386/mp_machdep.c
  - i386/include/smp.h
  Added cpususpend_handler().
  
  - i386/include/apicvar.h
  - kern/subr_smp.c
  - sys/smp.h
  Added IPI_SUSPEND and suspend_cpus().
  
  - i386/i386/initcpu.c
  - i386/i386/machdep.c
  - i386/include/md_var.h
  - pc98/pc98/machdep.c
  Moved initializecpu() declarations to md_var.h.
  
  MFC after:3 days

Modified:
  head/sys/i386/acpica/acpi_wakecode.S
  head/sys/i386/acpica/acpi_wakeup.c
  head/sys/i386/i386/apic_vector.s
  head/sys/i386/i386/genassym.c
  head/sys/i386/i386/initcpu.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/i386/mp_machdep.c
  head/sys/i386/i386/swtch.s
  head/sys/i386/include/apicvar.h
  head/sys/i386/include/md_var.h
  head/sys/i386/include/pcb.h
  head/sys/i386/include/smp.h
  head/sys/kern/subr_smp.c
  head/sys/pc98/pc98/machdep.c
  head/sys/sys/smp.h

Modified: head/sys/i386/acpica/acpi_wakecode.S
==
--- head/sys/i386/acpica/acpi_wakecode.SFri May 18 18:53:28 2012
(r235621)
+++ head/sys/i386/acpica/acpi_wakecode.SFri May 18 18:55:58 2012
(r235622)
@@ -1,6 +1,8 @@
 /*-
  * Copyright (c) 2001 Takanori Watanabe 
- * Copyright (c) 2001 Mitsuru IWASAKI 
+ * Copyright (c) 2001-2012 Mitsuru IWASAKI 
+ * Copyright (c) 2003 Peter Wemm
+ * Copyright (c) 2008-2012 Jung-uk Kim 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +30,9 @@
  */
 
 #include 
+#include 
 #include 
+#include 
 
 #include "assym.s"
 
@@ -39,221 +43,163 @@
  * Depending on the previous sleep state, we may need to initialize more
  * of the system (i.e., S3 suspend-to-RAM vs. S4 suspend-to-disk).
  */
-   .align 4
-   .code16
-wakeup_16:
-   nop
-   cli
-   cld
 
+   .data   /* So we can modify it */
+
+   ALIGN_TEXT
+   .code16
+wakeup_start:
/*
 * Set up segment registers for real mode, a small stack for
 * any calls we make, and clear any flags.
 */
-   movw%cs,%ax
-   movw%ax,%ds
-   movw%ax,%ss
-   movw$PAGE_SIZE,%sp
-   pushl   $0
-   popfl
+   cli /* make sure no interrupts */
+   mov %cs, %ax/* copy %cs to %ds.  Remember these */
+   mov %ax, %ds/* are offsets rather than selectors */
+   mov %ax, %ss
+   movw$PAGE_SIZE, %sp
+   xorw%ax, %ax
+   pushw   %ax
+   popfw
 
/* To debug resume hangs, beep the speaker if the user requested. */
-   cmpl$1,resume_beep
-   jne nobeep
-   movb$0xc0,%al
-   outb%al,$0x42
-   movb$0x04,%al
-   outb%al,$0x42
-   inb $0x61,%al
-   orb $0x3,%al
-   outb%al,$0x61
-nobeep:
+   testb   $~0, resume_beep - wakeup_start
+   jz  1f
+   movb$0, resume_beep - wakeup_start
+
+   /* Set PIC timer2 to beep. */
+   movb$(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT), %al
+   outb%al, $TIMER_MODE
+
+   /* Turn on speaker. */
+   inb $IO_PPI, %al
+   orb $PIT_SPKR, %al
+   outb%al, $IO_PPI
+
+   /* Set frequency. */
+   movw$0x4c0, %ax
+   outb%al, $TIMER_CNTR2
+   shrw$8, %ax
+   outb%al, $TIMER_CNTR2
+1:
 
/* Re-initialize video BIOS if the reset_video tunable is set. */
-   cmpl$1,reset_video
-   jne nobiosreset
-   lcall   $0xc000,$3
+   testb   $~0, reset_video - wakeup_start
+   jz  1f
+   movb$0, reset_video - wakeup_start
+   lcall   $0xc000, $3
+
+   /* When we reach here, int 0x10 should be ready.  Hide cursor. */
+   movb$0x01, %ah
+   movb$0x20, %ch
+   int $0x10
+
+   /* Re-start in case the previous BIOS call clobbers them. */
+   jmp wakeup_start
+1:
 
/*
-* Set up segment registers for real mode again in case the
-* prev

svn commit: r235621 - in stable/8/sys: i386/conf kern

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 18:53:28 2012
New Revision: 235621
URL: http://svn.freebsd.org/changeset/base/235621

Log:
  MFC 234186
  If a linker file contains at least one module, but all of the modules
  fail to load (the MOD_LOAD event fails) during a kldload(2), unload the
  linker file and fail the kldload(2) with ENOEXEC.

Modified:
  stable/8/sys/kern/kern_linker.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (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/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/kern/kern_linker.c
==
--- stable/8/sys/kern/kern_linker.c Fri May 18 18:51:13 2012
(r235620)
+++ stable/8/sys/kern/kern_linker.c Fri May 18 18:53:28 2012
(r235621)
@@ -376,7 +376,7 @@ linker_load_file(const char *filename, l
 {
linker_class_t lc;
linker_file_t lf;
-   int foundfile, error;
+   int foundfile, error, modules;
 
/* Refuse to load modules if securelevel raised */
if (prison0.pr_securelevel > 0)
@@ -415,11 +415,22 @@ linker_load_file(const char *filename, l
linker_file_unload(lf, LINKER_UNLOAD_FORCE);
return (error);
}
+   modules = !TAILQ_EMPTY(&lf->modules);
KLD_UNLOCK();
linker_file_register_sysctls(lf);
linker_file_sysinit(lf);
KLD_LOCK();
lf->flags |= LINKER_FILE_LINKED;
+
+   /*
+* If all of the modules in this file failed
+* to load, unload the file and return an
+* error of ENOEXEC.
+*/
+   if (modules && TAILQ_EMPTY(&lf->modules)) {
+   linker_file_unload(lf, LINKER_UNLOAD_FORCE);
+   return (ENOEXEC);
+   }
*result = lf;
return (0);
}
@@ -623,7 +634,7 @@ linker_file_unload(linker_file_t file, i
 
/*
 * Inform any modules associated with this file that they are
-* being be unloaded.
+* being unloaded.
 */
MOD_XLOCK;
for (mod = TAILQ_FIRST(&file->modules); mod; mod = next) {
___
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: r235620 - in stable/9/sys: i386/conf kern

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 18:51:13 2012
New Revision: 235620
URL: http://svn.freebsd.org/changeset/base/235620

Log:
  MFC 234186
  If a linker file contains at least one module, but all of the modules
  fail to load (the MOD_LOAD event fails) during a kldload(2), unload the
  linker file and fail the kldload(2) with ENOEXEC.

Modified:
  stable/9/sys/kern/kern_linker.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/kern/kern_linker.c
==
--- stable/9/sys/kern/kern_linker.c Fri May 18 18:35:09 2012
(r235619)
+++ stable/9/sys/kern/kern_linker.c Fri May 18 18:51:13 2012
(r235620)
@@ -378,7 +378,7 @@ linker_load_file(const char *filename, l
 {
linker_class_t lc;
linker_file_t lf;
-   int foundfile, error;
+   int foundfile, error, modules;
 
/* Refuse to load modules if securelevel raised */
if (prison0.pr_securelevel > 0)
@@ -417,11 +417,22 @@ linker_load_file(const char *filename, l
linker_file_unload(lf, LINKER_UNLOAD_FORCE);
return (error);
}
+   modules = !TAILQ_EMPTY(&lf->modules);
KLD_UNLOCK();
linker_file_register_sysctls(lf);
linker_file_sysinit(lf);
KLD_LOCK();
lf->flags |= LINKER_FILE_LINKED;
+
+   /*
+* If all of the modules in this file failed
+* to load, unload the file and return an
+* error of ENOEXEC.
+*/
+   if (modules && TAILQ_EMPTY(&lf->modules)) {
+   linker_file_unload(lf, LINKER_UNLOAD_FORCE);
+   return (ENOEXEC);
+   }
*result = lf;
return (0);
}
@@ -625,7 +636,7 @@ linker_file_unload(linker_file_t file, i
 
/*
 * Inform any modules associated with this file that they are
-* being be unloaded.
+* being unloaded.
 */
MOD_XLOCK;
for (mod = TAILQ_FIRST(&file->modules); mod; mod = next) {
___
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: r235619 - head/sys/sys

2012-05-18 Thread Kirk McKusick
Author: mckusick
Date: Fri May 18 18:35:09 2012
New Revision: 235619
URL: http://svn.freebsd.org/changeset/base/235619

Log:
  Update comment to document that the vnode free-list mutex needs to be
  held when updating mnt_activevnodelist and mnt_activevnodelistsize.

Modified:
  head/sys/sys/mount.h

Modified: head/sys/sys/mount.h
==
--- head/sys/sys/mount.hFri May 18 18:34:29 2012(r235618)
+++ head/sys/sys/mount.hFri May 18 18:35:09 2012(r235619)
@@ -148,6 +148,7 @@ struct vfsopt {
  * Lock reference:
  * m - mountlist_mtx
  * i - interlock
+ * v - vnode freelist mutex
  *
  * Unmarked fields are considered stable as long as a ref is held.
  *
@@ -164,8 +165,8 @@ struct mount {
int mnt_ref;/* (i) Reference count */
struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
int mnt_nvnodelistsize; /* (i) # of vnodes */
-   struct vnodelst mnt_activevnodelist;/* (i) list of active vnodes */
-   int mnt_activevnodelistsize;/* (i) # of active vnodes */
+   struct vnodelst mnt_activevnodelist;/* (v) list of active vnodes */
+   int mnt_activevnodelistsize;/* (v) # of active vnodes */
int mnt_writeopcount;   /* (i) write syscalls pending */
int mnt_kern_flag;  /* (i) kernel only flags */
uint64_tmnt_flag;   /* (i) flags shared with user */
___
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: r235618 - stable/9/games/morse

2012-05-18 Thread Dimitry Andric
Author: dim
Date: Fri May 18 18:34:29 2012
New Revision: 235618
URL: http://svn.freebsd.org/changeset/base/235618

Log:
  MFC r230131:
  
  Reencode morse.c to UTF-8. This does not make it Unicode aware.
  
  No changes in resulting object file. Moved user-visible symbols into
  comment table, so you can see all chars, not just the ones matching your
  (fallback) locale.

Modified:
  stable/9/games/morse/morse.c
Directory Properties:
  stable/9/games/morse/   (props changed)

Modified: stable/9/games/morse/morse.c
==
--- stable/9/games/morse/morse.cFri May 18 18:32:44 2012
(r235617)
+++ stable/9/games/morse/morse.cFri May 18 18:34:29 2012
(r235618)
@@ -143,26 +143,31 @@ static const struct morsetab mtab[] = {
{'\0', ""}
 };
 
-
+/*
+ * Code-points for some Latin1 chars in ISO-8859-1 encoding.
+ * UTF-8 encoded chars in the comments.
+ */
 static const struct morsetab iso8859_1tab[] = {
-   {'�', ".--.-"},
-   {'�', ".--.-"},
-   {'�', ".--.-"},
-   {'�', ".-.-"},
-   {'�', "-.-.."},
-   {'�', "..-.."},
-   {'�', "..-.."},
-   {'�', "-..-."},
-   {'�', "---."},
-   {'�', "..--"},
+   {'\340', ".--.-"},  /* à */
+   {'\341', ".--.-"},  /* á */
+   {'\342', ".--.-"},  /* â */
+   {'\344', ".-.-"},   /* ä */
+   {'\347', "-.-.."},  /* ç */
+   {'\350', "..-.."},  /* è */
+   {'\351', "..-.."},  /* é */
+   {'\352', "-..-."},  /* ê */
+   {'\366', "---."},   /* ö */
+   {'\374', "..--"},   /* ü */
 
{'\0', ""}
 };
 
+/*
+ * Code-points for some Greek chars in ISO-8859-7 encoding.
+ * UTF-8 encoded chars in the comments.
+ */
 static const struct morsetab iso8859_7tab[] = {
/*
-* The Greek alphabet; you'll need an ISO8859-7 font in order
-* to see the actual characters.
 * This table does not implement:
 * - the special sequences for the seven diphthongs,
 * - the punctuation differences.
@@ -180,83 +185,83 @@ static const struct morsetab iso8859_7ta
 * ;..-.-
 * !--..--
 */
-   {'�', ".-"},/* alpha */
-   {'�', ".-"},/* alpha with acute */
-   {'�', "-..."},  /* beta */
-   {'�', "--."},   /* gamma */
-   {'�', "-.."},   /* delta */
-   {'�', "."}, /* epsilon */
-   {'�', "."}, /* epsilon with acute */
-   {'�', "--.."},  /* zeta */
-   {'�', ""},  /* eta */
-   {'�', ""},  /* eta with acute */
-   {'�', "-.-."},  /* theta */
-   {'�', ".."},/* iota */
-   {'�', ".."},/* iota with acute */
-   {'�', ".."},/* iota with diaeresis */
-   {'�', ".."},/* iota with acute and diaeresis */
-   {'�', "-.-"},   /* kappa */
-   {'�', ".-.."},  /* lambda */
-   {'�', "--"},/* mu */
-   {'�', "-."},/* nu */
-   {'�', "-..-"},  /* xi */
-   {'�', "---"},   /* omicron */
-   {'�', "---"},   /* omicron with acute */
-   {'�', ".--."},  /* pi */
-   {'�', ".-."},   /* rho */
-   {'�', "..."},   /* sigma */
-   {'�', "..."},   /* final sigma */
-   {'�', "-"}, /* tau */
-   {'�', "-.--"},  /* upsilon */
-   {'�', "-.--"},  /* upsilon with acute */
-   {'�', "-.--"},  /* upsilon and diaeresis */
-   {'�', "-.--"},  /* upsilon with acute and diaeresis */
-   {'�', "..-."},  /* phi */
-   {'�', ""},  /* chi */
-   {'�', "--.-"},  /* psi */
-   {'�', ".--"},   /* omega */
-   {'�', ".--"},   /* omega with acute */
+   {'\341', ".-"}, /* α, alpha */
+   {'\334', ".-"}, /* ά, alpha with acute */
+   {'\342', "-..."},   /* β, beta */
+   {'\343', "--."},/* γ, gamma */
+   {'\344', "-.."},/* δ, delta */
+   {'\345', "."},  /* ε, epsilon */
+   {'\335', "."},  /* έ, epsilon with acute */
+   {'\346', "--.."},   /* ζ, zeta */
+   {'\347', ""},   /* η, eta */
+   {'\336', ""},   /* ή, eta with acute */
+   {'\350', "-.-."},   /* θ, theta */
+   {'\351', ".."}, /* ι, iota */
+   {'\337', ".."}, /* ί, iota with acute */
+   {'\372', ".."}, /* ϊ, iota with diaeresis */
+   {'\300', ".."}, /* ΐ, iota with acute and diaeresis */
+   {'\352', "-.-"},/* κ, kappa */
+   {'\353', ".-.."},   /* λ, lambda */
+   {'\354', "--"}, /* μ, mu */
+   {'\355', "-."}, /* ν, nu */
+   {'\356', "-..-"},   /* ξ, xi */
+   {'\357', "---"},/* ο, omicron */
+   {'\374', "---"},/* ό, omicron with acute */
+   {'\360', ".--."},   /* π, pi */
+   {'\361', ".-."},/* ρ, rho */
+   {'\363', "..."},/* σ, sigma */
+   {'\362', "..."},/* ς, final sigma */
+   {'\364', "-"},

svn commit: r235617 - stable/8/etc

2012-05-18 Thread Eygene Ryabinkin
Author: rea (ports committer)
Date: Fri May 18 18:32:44 2012
New Revision: 235617
URL: http://svn.freebsd.org/changeset/base/235617

Log:
  /etc/netstart: remove invocation of dhclient
  
  dhclient is no longer a real service, it is a helper script
  for /etc/rc.d/netif and devd.  Its direct invocation isn't
  needed to bring the network up.
  
  Approved by: jhb, delphij

Modified:
  stable/8/etc/netstart
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/netstart
==
--- stable/8/etc/netstart   Fri May 18 18:29:44 2012(r235616)
+++ stable/8/etc/netstart   Fri May 18 18:32:44 2012(r235617)
@@ -52,7 +52,6 @@ _start=quietstart
 # . /etc/rc.d/atm3.sh ${_start}
 /etc/rc.d/netif ${_start}
 /etc/rc.d/ipsec ${_start}
-/etc/rc.d/dhclient ${_start}
 /etc/rc.d/ppp ${_start}
 /etc/rc.d/ipfw ${_start}
 /etc/rc.d/network_ipv6 ${_start}
___
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: r235616 - stable/8/sys/dev/e1000

2012-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 18:29:44 2012
New Revision: 235616
URL: http://svn.freebsd.org/changeset/base/235616

Log:
  MFC r235210
  
  Modify the binding of queues to attach to as many CPUs
  as possible when using more than one igb(4) adapter.  This
  means that queues will not be bound to the same CPUs if
  there are more CPUs availble.
  
  This is only applicable to a system that has multiple interfaces.

Modified:
  stable/8/sys/dev/e1000/if_igb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/dev/e1000/if_igb.c
==
--- stable/8/sys/dev/e1000/if_igb.c Fri May 18 18:26:03 2012
(r235615)
+++ stable/8/sys/dev/e1000/if_igb.c Fri May 18 18:29:44 2012
(r235616)
@@ -364,6 +364,13 @@ TUNABLE_INT("hw.igb.num_queues", &igb_nu
 SYSCTL_INT(_hw_igb, OID_AUTO, num_queues, CTLFLAG_RDTUN, &igb_num_queues, 0,
 "Number of queues to configure, 0 indicates autoconfigure");
 
+/*
+** Global variable to store last used CPU when binding queues
+** to CPUs in igb_allocate_msix.  Starts at CPU_FIRST and increments when a
+** queue is bound to a cpu.
+*/
+static int igb_last_bind_cpu = -1;
+
 /* How many packets rxeof tries to clean at a time */
 static int igb_rx_process_limit = 100;
 TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit);
@@ -2484,8 +2491,16 @@ igb_allocate_msix(struct adapter *adapte
** Bind the msix vector, and thus the
** rings to the corresponding cpu.
*/
-   if (adapter->num_queues > 1)
-   bus_bind_intr(dev, que->res, i);
+   if (adapter->num_queues > 1) {
+   if (igb_last_bind_cpu < 0)
+   igb_last_bind_cpu = CPU_FIRST();
+   bus_bind_intr(dev, que->res, igb_last_bind_cpu);
+   device_printf(dev,
+   "Bound queue %d to cpu %d\n",
+   i,igb_last_bind_cpu);
+   igb_last_bind_cpu = CPU_NEXT(igb_last_bind_cpu);
+   igb_last_bind_cpu = igb_last_bind_cpu % mp_ncpus;
+   }
 #if __FreeBSD_version >= 80
TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start,
que->txr);
___
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: r235615 - stable/9/etc

2012-05-18 Thread Eygene Ryabinkin
Author: rea (ports committer)
Date: Fri May 18 18:26:03 2012
New Revision: 235615
URL: http://svn.freebsd.org/changeset/base/235615

Log:
  /etc/netstart: remove invocation of dhclient
  
  dhclient is no longer a real service, it is a helper script
  for /etc/rc.d/netif and devd.  Its direct invocation isn't
  needed to bring the network up.
  
  Approved by: jhb, delphij

Modified:
  stable/9/etc/netstart
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/netstart
==
--- stable/9/etc/netstart   Fri May 18 16:47:15 2012(r235614)
+++ stable/9/etc/netstart   Fri May 18 18:26:03 2012(r235615)
@@ -52,7 +52,6 @@ _start=quietstart
 # . /etc/rc.d/atm3.sh ${_start}
 /etc/rc.d/netif ${_start}
 /etc/rc.d/ipsec ${_start}
-/etc/rc.d/dhclient ${_start}
 /etc/rc.d/ppp ${_start}
 /etc/rc.d/ipfw ${_start}
 /etc/rc.d/routing ${_start}
___
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: r235614 - head/share/dtrace

2012-05-18 Thread George V. Neville-Neil
Author: gnn
Date: Fri May 18 16:47:15 2012
New Revision: 235614
URL: http://svn.freebsd.org/changeset/base/235614

Log:
  Add a DTrace script to show the frequency and latency of NFS client calls.
  
  Submitted by: rwatson

Added:
  head/share/dtrace/nfsclienttime   (contents, props changed)

Added: head/share/dtrace/nfsclienttime
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/dtrace/nfsclienttime Fri May 18 16:47:15 2012
(r235614)
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Robert N. M. Watson
+# All rights reserved.
+#
+# This software was developed at the University of Cambridge Computer
+# Laboratory with support from a grant from Google, Inc.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+# This script measures all time spent waiting on RPC replies for each
+# system call, and then generates a histogram of those times sorted by
+# system call name.
+#
+# Currently only supports NFSv3
+#
+# Usage: nfsclienttime
+#
+# Press Ctrl-C to exit and display statistics.
+#
+
+/usr/sbin/dtrace -n '
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+   printf("Collecting data...press Ctrl-C to exit.\n");
+}
+
+syscall:::entry
+{
+
+self->count = 0;
+}
+
+nfsclient:nfs3::start
+{
+
+self->timestamp = timestamp;
+}
+
+nfsclient:nfs3::done
+{
+
+self->count += (timestamp - self->timestamp);
+}
+
+syscall:::return
+/self->count != 0/  {
+
+@syscalls[probefunc] = quantize(self->count);
+}
+'
___
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: r235613 - in head: etc/mtree share share/dtrace share/dtrace/toolkit

2012-05-18 Thread George V. Neville-Neil
Author: gnn
Date: Fri May 18 16:40:15 2012
New Revision: 235613
URL: http://svn.freebsd.org/changeset/base/235613

Log:
  Add support for our own DTrace scripts and those from the DTraceToolkit
  to the build system.  FreeBSD written scripts are stored in
  src/share and the toolkit scripts are brought from the cddl directory
  into a working tree via install.
  
  MFC after:2 weeks

Added:
  head/share/dtrace/
  head/share/dtrace/Makefile   (contents, props changed)
  head/share/dtrace/README   (contents, props changed)
  head/share/dtrace/toolkit/
  head/share/dtrace/toolkit/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.usr.dist
  head/share/Makefile

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Fri May 18 16:16:47 2012(r235612)
+++ head/etc/mtree/BSD.usr.dist Fri May 18 16:40:15 2012(r235613)
@@ -200,6 +200,10 @@
 ..
 ..
 ..
+dtrace
+toolkit
+..
+..  
 examples
 BSD_daemon
 ..

Modified: head/share/Makefile
==
--- head/share/Makefile Fri May 18 16:16:47 2012(r235612)
+++ head/share/Makefile Fri May 18 16:40:15 2012(r235613)
@@ -8,6 +8,7 @@
 SUBDIR=${_colldef} \
${_dict} \
${_doc} \
+   dtrace \
${_examples} \
${_i18n} \
${_man} \

Added: head/share/dtrace/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/dtrace/Makefile  Fri May 18 16:40:15 2012(r235613)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+#
+# Hand installing our scripts and optionally (based on MK_CDDL) installing
+# the DTraceToolkit.
+#
+
+.include 
+
+SUBDIR= ${_toolkit}
+
+.if ${MK_CDDL} != "no"
+_toolkit=  toolkit
+.endif
+
+SCRIPTS=   nfsclienttime
+
+SCRIPTSDIR= ${SHAREDIR}/dtrace/
+
+NO_OBJ=
+
+.include 

Added: head/share/dtrace/README
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/dtrace/READMEFri May 18 16:40:15 2012(r235613)
@@ -0,0 +1,11 @@
+$FreeBSD$
+
+This directory contains scripts for use with the DTrace system.  The
+toolkit/ directory contains the latest vendor import of Brendan
+Gregg's DTRaceToolkit while all the other files and directories
+contain code generated by the FreeBSD Project for use with DTrace on
+FreeBSD.
+
+NOTE: Do not add new scripts to the DTraceToolkit contained in this
+directory. New DTraceToolkit scripts should be send to the maintainer
+of the toolkit and then brought back into FreeBSD via future vendor imports.

Added: head/share/dtrace/toolkit/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/dtrace/toolkit/Makefile  Fri May 18 16:40:15 2012
(r235613)
@@ -0,0 +1,17 @@
+#$FreeBSD$
+#
+# Install scripts from the DTraceToolkit
+#
+DTRACETOOLKIT= ../../../cddl/contrib/dtracetoolkit
+
+SCRIPTS=   ${DTRACETOOLKIT}/execsnoop \
+   ${DTRACETOOLKIT}/hotuser   \
+   ${DTRACETOOLKIT}/hotkernel \
+   ${DTRACETOOLKIT}/opensnoop \
+   ${DTRACETOOLKIT}/procsystime \
+
+SCRIPTSDIR= ${SHAREDIR}/dtrace/toolkit
+
+NO_OBJ=
+
+.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: r235612 - in stable/9/sys: i386/conf kern ofed/drivers/infiniband/ulp/ipoib

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 16:16:47 2012
New Revision: 235612
URL: http://svn.freebsd.org/changeset/base/235612

Log:
  MFC 234182:
  Don't update if_obytes when transmitting packets.  That is already done
  in IFQ_HANDOFF() when the packet is passed to the start routine, so doing
  it here resulted in double counting.

Modified:
  stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
  stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==
--- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c   Fri May 18 
15:25:43 2012(r235611)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c   Fri May 18 
16:16:47 2012(r235612)
@@ -682,7 +682,6 @@ void ipoib_cm_handle_tx_wc(struct ipoib_
 
/* FIXME: is this right? Shouldn't we only increment on success? */
++dev->if_opackets;
-   dev->if_obytes += tx_req->mb->m_pkthdr.len;
 
m_freem(tx_req->mb);
 

Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
==
--- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c   Fri May 18 
15:25:43 2012(r235611)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c   Fri May 18 
16:16:47 2012(r235612)
@@ -345,7 +345,6 @@ static void ipoib_ib_handle_tx_wc(struct
ipoib_dma_unmap_tx(priv->ca, tx_req);
 
++dev->if_opackets;
-   dev->if_obytes += tx_req->mb->m_pkthdr.len;
 
m_freem(tx_req->mb);
 
___
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: r235611 - head/sys/arm/mv

2012-05-18 Thread Grzegorz Bernacki
Author: gber
Date: Fri May 18 15:25:43 2012
New Revision: 235611
URL: http://svn.freebsd.org/changeset/base/235611

Log:
  Add localbus driver for Marvell's platforms.
  
  Obtained from: Semihalf
  Supported by:  FreeBSD Foundation, Juniper Networks

Added:
  head/sys/arm/mv/mv_localbus.c   (contents, props changed)

Added: head/sys/arm/mv/mv_localbus.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/mv/mv_localbus.c   Fri May 18 15:25:43 2012
(r235611)
@@ -0,0 +1,493 @@
+/*-
+ * Copyright (c) 2012 Semihalf.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include "opt_platform.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include "dev/fdt/fdt_common.h"
+#include "ofw_bus_if.h"
+
+#include 
+
+#define DEBUG
+#undef DEBUG
+
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf("%s(): ", __func__);  \
+printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
+
+#define MV_LOCALBUS_MAX_BANKS  8
+#define MV_LOCALBUS_MAX_BANK_CELLS 4
+
+static MALLOC_DEFINE(M_LOCALBUS, "localbus", "localbus devices information");
+
+struct localbus_bank {
+   vm_offset_t va; /* VA of the bank */
+   vm_paddr_t  pa; /* physical address of the bank */
+   vm_size_t   size;   /* bank size */
+   uint8_t mapped; /* device memory has mapping */
+};
+
+struct localbus_softc {
+   device_tsc_dev;
+   bus_space_handle_t  sc_bsh;
+   bus_space_tag_t sc_bst;
+   int sc_rid;
+
+   struct localbus_bank*sc_banks;
+};
+
+struct localbus_devinfo {
+   struct ofw_bus_devinfo  di_ofw;
+   struct resource_listdi_res;
+   int di_bank;
+};
+
+struct localbus_va_entry {
+   int8_t  bank;
+   vm_offset_t va;
+   vm_size_t   size;
+};
+
+/*
+ * Prototypes.
+ */
+static int localbus_probe(device_t);
+static int localbus_attach(device_t);
+static int localbus_print_child(device_t, device_t);
+
+static struct resource *localbus_alloc_resource(device_t, device_t, int,
+int *, u_long, u_long, u_long, u_int);
+static struct resource_list *localbus_get_resource_list(device_t, device_t);
+
+static ofw_bus_get_devinfo_t localbus_get_devinfo;
+
+/*
+ * Bus interface definition.
+ */
+static device_method_t localbus_methods[] = {
+   /* Device interface */
+   DEVMETHOD(device_probe, localbus_probe),
+   DEVMETHOD(device_attach,localbus_attach),
+   DEVMETHOD(device_detach,bus_generic_detach),
+   DEVMETHOD(device_shutdown,  bus_generic_shutdown),
+   DEVMETHOD(device_suspend,   bus_generic_suspend),
+   DEVMETHOD(device_resume,bus_generic_resume),
+
+   /* Bus interface */
+   DEVMETHOD(bus_print_child,  localbus_print_child),
+   DEVMETHOD(bus_alloc_resource,   localbus_alloc_resource),
+   DEVMETHOD(bus_release_resource, bus_generic_release_resource),
+   DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
+   DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+   DEVMETHOD(bus_setup_intr,   bus_generic_setup_intr),
+   DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr),
+   DEVMETHOD(bus_get_resource_list, localbus_get_resource_list),
+
+   /* OFW bus interface */
+   DEVMETHOD(ofw_bus_get_devinfo,  localbus_get_devinfo),
+  

Re: svn commit: r235601 - head/include/protocols

2012-05-18 Thread Gleb Kurtsou
On (18/05/2012 09:41), John Baldwin wrote:
> On Friday, May 18, 2012 6:01:31 am Gleb Kurtsou wrote:
> > Author: gleb
> > Date: Fri May 18 10:01:31 2012
> > New Revision: 235601
> > URL: http://svn.freebsd.org/changeset/base/235601
> > 
> > Log:
> >   Don't use ino_t in dumprestore protocol definition.
> >   
> >   Since ino_t size is about to change to 64-bits, replace ino_t used in
> >   dump protocol definition with 32-bit dump_ino_t to preserve backward
> >   compatibility.  At some point, it may be necessary to use spare fields
> >   in struct in order to fully support 64-bit inode numbers.
> >   
> >   Sponsored by: Google Summer of Code 2011
> 
> A question about your stat changes: did you expand dev_t to 32 bits for the 
> AFS folks, or did you leave it as 16 bits?

dev_t is already 32-bit. Changing it to 64-bit was discussed at some
point and from what I recall no decision was made:

http://marc.info/?t=12911947875&r=1&w=2

I'm going to commit preparatory changes only for now. Then publish diff
for testing. We can still change dev_t to 64-bit if needed. Although I
didn't work on it.

Thanks,
Gleb.
___
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: r235610 - head/sys/ufs/ffs

2012-05-18 Thread Kirk McKusick
Author: mckusick
Date: Fri May 18 15:20:21 2012
New Revision: 235610
URL: http://svn.freebsd.org/changeset/base/235610

Log:
  Add missing `continue' statement at end of case.
  
  Found by:  Kevin Lo (kevlo@)
  MFC after: 1 week

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==
--- head/sys/ufs/ffs/ffs_softdep.c  Fri May 18 14:41:14 2012
(r235609)
+++ head/sys/ufs/ffs/ffs_softdep.c  Fri May 18 15:20:21 2012
(r235610)
@@ -10687,6 +10687,7 @@ handle_jwork(wkhd)
case D_FREEFRAG:
rele_jseg(WK_JSEG(WK_FREEFRAG(wk)->ff_jdep));
WORKITEM_FREE(wk, D_FREEFRAG);
+   continue;
case D_FREEWORK:
handle_written_freework(WK_FREEWORK(wk));
continue;
___
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: r235609 - in head/sys: arm/conf arm/include arm/mv arm/mv/discovery boot/fdt/dts boot/uboot/lib

2012-05-18 Thread Grzegorz Bernacki
Author: gber
Date: Fri May 18 14:41:14 2012
New Revision: 235609
URL: http://svn.freebsd.org/changeset/base/235609

Log:
  Add architecture dependent code to support NAND Framework on Marvell SoCs.
  
  Obtained from: Semihalf
  Supported by:  FreeBSD Foundation, Juniper Networks

Added:
  head/sys/boot/fdt/dts/bindings-localbus.txt   (contents, props changed)
Modified:
  head/sys/arm/conf/DB-78XXX
  head/sys/arm/conf/DB-88F6XXX
  head/sys/arm/conf/SHEEVAPLUG
  head/sys/arm/include/fdt.h
  head/sys/arm/mv/discovery/discovery.c
  head/sys/arm/mv/files.mv
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/mv/mvwin.h
  head/sys/boot/fdt/dts/db78100.dts
  head/sys/boot/fdt/dts/db88f6281.dts
  head/sys/boot/fdt/dts/sheevaplug.dts
  head/sys/boot/uboot/lib/api_public.h
  head/sys/boot/uboot/lib/glue.c

Modified: head/sys/arm/conf/DB-78XXX
==
--- head/sys/arm/conf/DB-78XXX  Fri May 18 14:29:54 2012(r235608)
+++ head/sys/arm/conf/DB-78XXX  Fri May 18 14:41:14 2012(r235609)
@@ -17,6 +17,7 @@ options   SCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
 optionsINET6   #IPv6 communications protocols
 optionsFFS #Berkeley Fast Filesystem
+optionsNANDFS  #NAND Filesystem
 optionsNFSCL   #New Network Filesystem Client
 optionsNFSLOCKD#Network Lock Manager
 optionsNFS_ROOT#NFS usable as /, requires NFSCL
@@ -82,6 +83,10 @@ device   ds133x
 # SATA
 device mvs
 
+# NAND
+device nand
+
 # Flattened Device Tree
 optionsFDT
+optionsFDT_DTB_STATIC
 makeoptionsFDT_DTS_FILE=db78100.dts

Modified: head/sys/arm/conf/DB-88F6XXX
==
--- head/sys/arm/conf/DB-88F6XXXFri May 18 14:29:54 2012
(r235608)
+++ head/sys/arm/conf/DB-88F6XXXFri May 18 14:41:14 2012
(r235609)
@@ -17,6 +17,7 @@ options   SCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
 optionsINET6   #IPv6 communications protocols
 optionsFFS #Berkeley Fast Filesystem
+optionsNANDFS  #NAND Filesystem
 optionsNFSCL   #New Network Filesystem Client
 optionsNFSLOCKD#Network Lock Manager
 optionsNFS_ROOT#NFS usable as /, requires NFSCL
@@ -85,6 +86,10 @@ device   iicbus
 # SATA
 device mvs
 
+# NAND
+device nand
+
 # Flattened Device Tree
 optionsFDT
+optionsFDT_DTB_STATIC
 makeoptionsFDT_DTS_FILE=db88f6281.dts

Modified: head/sys/arm/conf/SHEEVAPLUG
==
--- head/sys/arm/conf/SHEEVAPLUGFri May 18 14:29:54 2012
(r235608)
+++ head/sys/arm/conf/SHEEVAPLUGFri May 18 14:41:14 2012
(r235609)
@@ -17,6 +17,7 @@ options   SCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
 optionsINET6   #IPv6 communications protocols
 optionsFFS #Berkeley Fast Filesystem
+optionsNANDFS  #NAND Filesystem
 optionsNFSCL   #New Network Filesystem Client
 optionsNFSLOCKD#Network Lock Manager
 optionsNFS_ROOT#NFS usable as /, requires NFSCL
@@ -72,6 +73,9 @@ devicescbus
 device pass
 device da
 
+# NAND
+device nand
+
 # Flattened Device Tree
 optionsFDT
 optionsFDT_DTB_STATIC

Modified: head/sys/arm/include/fdt.h
==
--- head/sys/arm/include/fdt.h  Fri May 18 14:29:54 2012(r235608)
+++ head/sys/arm/include/fdt.h  Fri May 18 14:41:14 2012(r235609)
@@ -57,6 +57,7 @@ struct mem_region {
vm_size_t   mr_size;
 };
 
+int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *);
 int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t,
 vm_offset_t);
 

Modified: head/sys/arm/mv/discovery/discovery.c
==
--- head/sys/arm/mv/discovery/discovery.c   Fri May 18 14:29:54 2012
(r235608)
+++ head/sys/arm/mv/discovery/discovery.c   Fri May 18 14:41:14 2012
(r235609)
@@ -43,6 +43,30 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+/*
+ * Virtual address space layout:
+ * -
+ * 0x_ - 0xBFFF_   : User Process (3 GB)
+ * 0xC000_ - virtual_avail : Kernel Reserved (text, data, page tables,
+ * : st

svn commit: r235608 - in stable/8/sys: amd64/amd64 i386/conf i386/i386 pc98/pc98

2012-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 14:29:54 2012
New Revision: 235608
URL: http://svn.freebsd.org/changeset/base/235608

Log:
  MFC 217886,218389:
  Set td_kstack_pages for thread0.

Modified:
  stable/8/sys/amd64/amd64/machdep.c
  stable/8/sys/i386/i386/machdep.c
  stable/8/sys/pc98/pc98/machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (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/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/amd64/amd64/machdep.c
==
--- stable/8/sys/amd64/amd64/machdep.c  Fri May 18 14:12:17 2012
(r235607)
+++ stable/8/sys/amd64/amd64/machdep.c  Fri May 18 14:29:54 2012
(r235608)
@@ -1545,12 +1545,14 @@ hammer_time(u_int64_t modulep, u_int64_t
struct nmi_pcpu *np;
u_int64_t msr;
char *env;
+   size_t kstack0_sz;
 
thread0.td_kstack = physfree + KERNBASE;
-   bzero((void *)thread0.td_kstack, KSTACK_PAGES * PAGE_SIZE);
-   physfree += KSTACK_PAGES * PAGE_SIZE;
-   thread0.td_pcb = (struct pcb *)
-  (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+   thread0.td_kstack_pages = KSTACK_PAGES;
+   kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE;
+   bzero((void *)thread0.td_kstack, kstack0_sz);
+   physfree += kstack0_sz;
+   thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1;
 
/*
 * This may be done better later if it gets more high level
@@ -1692,8 +1694,8 @@ hammer_time(u_int64_t modulep, u_int64_t
initializecpucache();
 
/* make an initial tss so cpu can get interrupt stack on syscall! */
-   common_tss[0].tss_rsp0 = thread0.td_kstack + \
-   KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb);
+   common_tss[0].tss_rsp0 = thread0.td_kstack +
+   kstack0_sz - sizeof(struct pcb);
/* Ensure the stack is aligned to 16 bytes */
common_tss[0].tss_rsp0 &= ~0xFul;
PCPU_SET(rsp0, common_tss[0].tss_rsp0);

Modified: stable/8/sys/i386/i386/machdep.c
==
--- stable/8/sys/i386/i386/machdep.cFri May 18 14:12:17 2012
(r235607)
+++ stable/8/sys/i386/i386/machdep.cFri May 18 14:29:54 2012
(r235608)
@@ -2508,6 +2508,7 @@ init386(first)
 {
unsigned long gdtmachpfn;
int error, gsel_tss, metadata_missing, x, pa;
+   size_t kstack0_sz;
struct pcpu *pc;
struct callback_register event = {
.type = CALLBACKTYPE_event,
@@ -2519,8 +2520,9 @@ init386(first)
};
 
thread0.td_kstack = proc0kstack;
-   thread0.td_pcb = (struct pcb *)
-  (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+   thread0.td_kstack_pages = KSTACK_PAGES;
+   kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE;
+   thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1;
 
/*
 * This may be done better later if it gets more high level
@@ -2671,7 +2673,7 @@ init386(first)
/* make an initial tss so cpu can get interrupt stack on syscall! */
/* Note: -16 is so we can grow the trapframe if we came from vm86 */
PCPU_SET(common_tss.tss_esp0, thread0.td_kstack +
-   KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16);
+   kstack0_sz - sizeof(struct pcb) - 16);
PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL),
@@ -2734,11 +2736,13 @@ init386(first)
 {
struct gate_descriptor *gdp;
int gsel_tss, metadata_missing, x, pa;
+   size_t kstack0_sz;
struct pcpu *pc;
 
thread0.td_kstack = proc0kstack;
-   thread0.td_pcb = (struct pcb *)
-  (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+   thread0.td_kstack_pages = KSTACK_PAGES;
+   kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE;
+   thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1;
 
/*
 * This may be done better later if it gets more high level
@@ -2930,7 +2934,7 @@ init386(first)
/* make an initial tss so cpu can get interrupt stack on syscall! */
/* Note: -16 is so we can grow the trapframe if we came from vm86 */
PCPU_SET(common_tss.tss_esp0, thread0.td_kstack +
-   KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16);
+   kstack0_sz - sizeof(struct pcb) - 16);
PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);

Modified: stable/8/sys/pc98/pc98/machdep.c
=

Re: svn commit: r235601 - head/include/protocols

2012-05-18 Thread John Baldwin
On Friday, May 18, 2012 6:01:31 am Gleb Kurtsou wrote:
> Author: gleb
> Date: Fri May 18 10:01:31 2012
> New Revision: 235601
> URL: http://svn.freebsd.org/changeset/base/235601
> 
> Log:
>   Don't use ino_t in dumprestore protocol definition.
>   
>   Since ino_t size is about to change to 64-bits, replace ino_t used in
>   dump protocol definition with 32-bit dump_ino_t to preserve backward
>   compatibility.  At some point, it may be necessary to use spare fields
>   in struct in order to fully support 64-bit inode numbers.
>   
>   Sponsored by:   Google Summer of Code 2011

A question about your stat changes: did you expand dev_t to 32 bits for the 
AFS folks, or did you leave it as 16 bits?

-- 
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: r235607 - head/usr.sbin/nandsim

2012-05-18 Thread Grzegorz Bernacki
Author: gber
Date: Fri May 18 14:12:17 2012
New Revision: 235607
URL: http://svn.freebsd.org/changeset/base/235607

Log:
  Add missing include.

Modified:
  head/usr.sbin/nandsim/nandsim_cfgparse.c

Modified: head/usr.sbin/nandsim/nandsim_cfgparse.c
==
--- head/usr.sbin/nandsim/nandsim_cfgparse.cFri May 18 12:51:48 2012
(r235606)
+++ head/usr.sbin/nandsim/nandsim_cfgparse.cFri May 18 14:12:17 2012
(r235607)
@@ -23,6 +23,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
+#include 
 __FBSDID("$FreeBSD$");
 
 #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: r235603 - head/sys/vm

2012-05-18 Thread Konstantin Belousov
Author: kib
Date: Fri May 18 10:23:47 2012
New Revision: 235603
URL: http://svn.freebsd.org/changeset/base/235603

Log:
  Do not double-reference the found vm object in cdev_pager_lookup().
  vm_pager_object_lookup() already referenced the object.
  
  Note that there is no in-tree consumers of cdev_pager_lookup(). The
  only known user of the function is i915 gem driver, which is not yet
  imported. This should make the KPI change minor.
  
  Submitted by: avg
  MFC after:1 week

Modified:
  head/sys/vm/device_pager.c

Modified: head/sys/vm/device_pager.c
==
--- head/sys/vm/device_pager.c  Fri May 18 10:15:46 2012(r235602)
+++ head/sys/vm/device_pager.c  Fri May 18 10:23:47 2012(r235603)
@@ -111,7 +111,6 @@ cdev_pager_lookup(void *handle)
 
mtx_lock(&dev_pager_mtx);
object = vm_pager_object_lookup(&dev_pager_object_list, handle);
-   vm_object_reference(object);
mtx_unlock(&dev_pager_mtx);
return (object);
 }
___
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: r235602 - in head: lib/libprocstat usr.bin/fstat

2012-05-18 Thread Gleb Kurtsou
Author: gleb
Date: Fri May 18 10:15:46 2012
New Revision: 235602
URL: http://svn.freebsd.org/changeset/base/235602

Log:
  Don't cast inode number or file size down to long or unsigned.
  
  Since ino_t size is about to change to 64-bits, casts to long would
  truncate 64-bit numbers on 32-bit archs.
  
  Sponsored by: Google Summer of Code 2011

Modified:
  head/lib/libprocstat/cd9660.c
  head/lib/libprocstat/common_kvm.c
  head/usr.bin/fstat/fstat.c

Modified: head/lib/libprocstat/cd9660.c
==
--- head/lib/libprocstat/cd9660.c   Fri May 18 10:01:31 2012
(r235601)
+++ head/lib/libprocstat/cd9660.c   Fri May 18 10:15:46 2012
(r235602)
@@ -84,7 +84,7 @@ isofs_filestat(kvm_t *kd, struct vnode *
}
vn->vn_fsid = dev2udev(kd, mnt.im_dev);
vn->vn_mode = (mode_t)isonode.inode.iso_mode;
-   vn->vn_fileid = (long)isonode.i_number;
-   vn->vn_size = (u_long)isonode.i_size;
+   vn->vn_fileid = isonode.i_number;
+   vn->vn_size = isonode.i_size;
return (0);
 }

Modified: head/lib/libprocstat/common_kvm.c
==
--- head/lib/libprocstat/common_kvm.c   Fri May 18 10:01:31 2012
(r235601)
+++ head/lib/libprocstat/common_kvm.c   Fri May 18 10:15:46 2012
(r235602)
@@ -99,9 +99,9 @@ ufs_filestat(kvm_t *kd, struct vnode *vp
 * comparisons
 */
vn->vn_fsid = dev2udev(kd, inode.i_dev);
-   vn->vn_fileid = (long)inode.i_number;
+   vn->vn_fileid = inode.i_number;
vn->vn_mode = (mode_t)inode.i_mode;
-   vn->vn_size = (u_long)inode.i_size;
+   vn->vn_size = inode.i_size;
return (0);
 }
 

Modified: head/usr.bin/fstat/fstat.c
==
--- head/usr.bin/fstat/fstat.c  Fri May 18 10:01:31 2012(r235601)
+++ head/usr.bin/fstat/fstat.c  Fri May 18 10:15:46 2012(r235602)
@@ -244,7 +244,7 @@ print_file_info(struct procstat *procsta
for (d = devs; d != NULL; d = d->next)
if (d->fsid == vn.vn_fsid) {
fsmatch = 1;
-   if ((unsigned)d->ino == vn.vn_fileid) {
+   if (d->ino == vn.vn_fileid) {
filename = d->name;
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: svn commit: r227650 - in head: lib/libkiconv sys/conf sys/fs/msdosfs sys/fs/smbfs sys/kern sys/libkern sys/modules/libiconv sys/modules/libmchain sys/netsmb sys/sys

2012-05-18 Thread Kevin Lo
Kevin Lo wrote:
> Garrett Cooper wrote:
> > On Nov 17, 2011, at 7:05 PM, Kevin Lo wrote:
> > 
> > > Author: kevlo
> > > Date: Fri Nov 18 03:05:20 2011
> > > New Revision: 227650
> > > URL: http://svn.freebsd.org/changeset/base/227650
> > > 
> > > Log:
> > >  Add unicode support to msdosfs and smbfs; original pathes from imura,
> > >  bug fixes by Kuan-Chung Chiu .
> > > 
> > >  Tested by me in production for several days at work.
> > 
> > Some of the code in this commit breaks unloading of the libiconv module (it 
> > hard locks on unload). In particular if I do the following…
> 
> Hmm, I have a machine running FreeBSD but not included r227650. 
> Trying to unload libiconv.ko, I get the message:
> 
> kldunload: attempt to unload file that was loaded by the kernel
> kldunload: can't unload file: Device busy

Ah I spoke too soon. It seems this commit does break unloading libiconv.
I'll take a look at it, thanks.

> > 
> > Index: /root/current/sys/libkern/iconv_ucs.c
> > ===
> > --- /root/current/sys/libkern/iconv_ucs.c   (revision 235066)
> > +++ /root/current/sys/libkern/iconv_ucs.c   (working copy)
> > @@ -373,6 +373,7 @@
> >  static int
> >  iconv_ucs_init(struct iconv_converter_class *dcp)
> >  {
> > +#if 0
> > int error;
> >  
> > error = iconv_add(ENCODING_UNICODE, ENCODING_UNICODE, ENCODING_UTF8);
> > @@ -381,6 +382,7 @@
> > error = iconv_add(ENCODING_UNICODE, ENCODING_UTF8, ENCODING_UNICODE);
> > if (error)
> > return (error);
> > +#endif
> > return (0);
> >  }
> >  
> > Then unload works (maybe at the cost of leaking a converter or two). It 
> > seems that iconv_unregister_handler succeeds when it's called (I inserted 
> > some printfs just because), but it might be doing bad things because of 
> > restructuring that took place in this commit.
> > Thanks!
> > -Garrett
> > 
> > PS Committing kern/168095 beforehand may or may not help...



___
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: r235601 - head/include/protocols

2012-05-18 Thread Gleb Kurtsou
Author: gleb
Date: Fri May 18 10:01:31 2012
New Revision: 235601
URL: http://svn.freebsd.org/changeset/base/235601

Log:
  Don't use ino_t in dumprestore protocol definition.
  
  Since ino_t size is about to change to 64-bits, replace ino_t used in
  dump protocol definition with 32-bit dump_ino_t to preserve backward
  compatibility.  At some point, it may be necessary to use spare fields
  in struct in order to fully support 64-bit inode numbers.
  
  Sponsored by: Google Summer of Code 2011

Modified:
  head/include/protocols/dumprestore.h

Modified: head/include/protocols/dumprestore.h
==
--- head/include/protocols/dumprestore.hFri May 18 09:22:21 2012
(r235600)
+++ head/include/protocols/dumprestore.hFri May 18 10:01:31 2012
(r235601)
@@ -65,6 +65,15 @@
 #endif
 #define CHECKSUM   (int)84446
 
+/*
+ * Since ino_t size is changing to 64-bits, yet we desire this structure to
+ * remain compatible with exiting dump formats, we do NOT use ino_t here,
+ * but rather define a 32-bit type in its place.  At some point, it may be
+ * necessary to use some of the c_spare[] in order to fully support 64-bit
+ * inode numbers.
+ */
+typedef uint32_t dump_ino_t;
+
 union u_spcl {
char dummy[TP_BSIZE];
struct  s_spcl {
@@ -73,7 +82,7 @@ union u_spcl {
int32_t c_old_ddate;/* date of previous dump */
int32_t c_volume;   /* dump volume number */
int32_t c_old_tapea;/* logical block of this record */
-   ino_t   c_inumber;  /* number of inode */
+   dump_ino_t c_inumber;   /* number of inode */
int32_t c_magic;/* magic number (see above) */
int32_t c_checksum; /* record checksum */
/*
___
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: r227650 - in head: lib/libkiconv sys/conf sys/fs/msdosfs sys/fs/smbfs sys/kern sys/libkern sys/modules/libiconv sys/modules/libmchain sys/netsmb sys/sys

2012-05-18 Thread Kevin Lo
Garrett Cooper wrote:
> On Nov 17, 2011, at 7:05 PM, Kevin Lo wrote:
> 
> > Author: kevlo
> > Date: Fri Nov 18 03:05:20 2011
> > New Revision: 227650
> > URL: http://svn.freebsd.org/changeset/base/227650
> > 
> > Log:
> >  Add unicode support to msdosfs and smbfs; original pathes from imura,
> >  bug fixes by Kuan-Chung Chiu .
> > 
> >  Tested by me in production for several days at work.
> 
> Some of the code in this commit breaks unloading of the libiconv module (it 
> hard locks on unload). In particular if I do the following…

Hmm, I have a machine running FreeBSD but not included r227650. 
Trying to unload libiconv.ko, I get the message:

kldunload: attempt to unload file that was loaded by the kernel
kldunload: can't unload file: Device busy

> 
> Index: /root/current/sys/libkern/iconv_ucs.c
> ===
> --- /root/current/sys/libkern/iconv_ucs.c (revision 235066)
> +++ /root/current/sys/libkern/iconv_ucs.c (working copy)
> @@ -373,6 +373,7 @@
>  static int
>  iconv_ucs_init(struct iconv_converter_class *dcp)
>  {
> +#if 0
>   int error;
>  
>   error = iconv_add(ENCODING_UNICODE, ENCODING_UNICODE, ENCODING_UTF8);
> @@ -381,6 +382,7 @@
>   error = iconv_add(ENCODING_UNICODE, ENCODING_UTF8, ENCODING_UNICODE);
>   if (error)
>   return (error);
> +#endif
>   return (0);
>  }
>  
>   Then unload works (maybe at the cost of leaking a converter or two). It 
> seems that iconv_unregister_handler succeeds when it's called (I inserted 
> some printfs just because), but it might be doing bad things because of 
> restructuring that took place in this commit.
> Thanks!
> -Garrett
> 
> PS Committing kern/168095 beforehand may or may not help...

Kevin


___
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: r235600 - head/sys/geom/mirror

2012-05-18 Thread Andrey V. Elsukov
Author: ae
Date: Fri May 18 09:22:21 2012
New Revision: 235600
URL: http://svn.freebsd.org/changeset/base/235600

Log:
  Prevent removing of the last active component from a mirror.
  
  PR:   kern/154860
  Reviewed by:  pjd
  MFC after:1 week

Modified:
  head/sys/geom/mirror/g_mirror_ctl.c

Modified: head/sys/geom/mirror/g_mirror_ctl.c
==
--- head/sys/geom/mirror/g_mirror_ctl.c Fri May 18 09:19:07 2012
(r235599)
+++ head/sys/geom/mirror/g_mirror_ctl.c Fri May 18 09:22:21 2012
(r235600)
@@ -560,7 +560,7 @@ g_mirror_ctl_remove(struct gctl_req *req
const char *name;
char param[16];
int *nargs;
-   u_int i;
+   u_int i, active;
 
nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs));
if (nargs == NULL) {
@@ -587,6 +587,7 @@ g_mirror_ctl_remove(struct gctl_req *req
"first.");
return;
}
+   active = g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE);
for (i = 1; i < (u_int)*nargs; i++) {
snprintf(param, sizeof(param), "arg%u", i);
name = gctl_get_asciiparam(req, param);
@@ -599,6 +600,16 @@ g_mirror_ctl_remove(struct gctl_req *req
gctl_error(req, "No such provider: %s.", name);
continue;
}
+   if (disk->d_state == G_MIRROR_DISK_STATE_ACTIVE) {
+   if (active > 1)
+   active--;
+   else {
+   gctl_error(req, "%s: Can't remove the last "
+   "ACTIVE component %s.", sc->sc_geom->name,
+   name);
+   continue;
+   }
+   }
g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DESTROY,
G_MIRROR_EVENT_DONTWAIT);
}
___
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: r235599 - head/sys/geom/mirror

2012-05-18 Thread Andrey V. Elsukov
Author: ae
Date: Fri May 18 09:19:07 2012
New Revision: 235599
URL: http://svn.freebsd.org/changeset/base/235599

Log:
  Introduce new device flag G_MIRROR_DEVICE_FLAG_TASTING. It should
  protect geom from destroying while it is tasting.
  
  PR:   kern/154860
  Reviewed by:  pjd
  MFC after:1 week

Modified:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/mirror/g_mirror.h

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Fri May 18 05:36:04 2012
(r235598)
+++ head/sys/geom/mirror/g_mirror.c Fri May 18 09:19:07 2012
(r235599)
@@ -1693,6 +1693,8 @@ g_mirror_can_destroy(struct g_mirror_sof
gp = sc->sc_geom;
if (gp->softc == NULL)
return (1);
+   if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_TASTING) != 0)
+   return (0);
LIST_FOREACH(cp, &gp->consumer, consumer) {
if (g_mirror_is_busy(sc, cp))
return (0);
@@ -3054,6 +3056,7 @@ g_mirror_taste(struct g_class *mp, struc
G_MIRROR_DEBUG(1, "Adding disk %s to %s.", pp->name, gp->name);
g_topology_unlock();
sx_xlock(&sc->sc_lock);
+   sc->sc_flags |= G_MIRROR_DEVICE_FLAG_TASTING;
error = g_mirror_add_disk(sc, pp, &md);
if (error != 0) {
G_MIRROR_DEBUG(0, "Cannot add disk %s to %s (error=%d).",
@@ -3066,6 +3069,12 @@ g_mirror_taste(struct g_class *mp, struc
}
gp = NULL;
}
+   sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING;
+   if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) {
+   g_mirror_destroy(sc, G_MIRROR_DESTROY_HARD);
+   g_topology_lock();
+   return (NULL);
+   }
sx_xunlock(&sc->sc_lock);
g_topology_lock();
return (gp);

Modified: head/sys/geom/mirror/g_mirror.h
==
--- head/sys/geom/mirror/g_mirror.h Fri May 18 05:36:04 2012
(r235598)
+++ head/sys/geom/mirror/g_mirror.h Fri May 18 09:19:07 2012
(r235599)
@@ -157,6 +157,7 @@ struct g_mirror_event {
 #defineG_MIRROR_DEVICE_FLAG_DESTROY0x0100ULL
 #defineG_MIRROR_DEVICE_FLAG_WAIT   0x0200ULL
 #defineG_MIRROR_DEVICE_FLAG_DESTROYING 0x0400ULL
+#defineG_MIRROR_DEVICE_FLAG_TASTING0x0800ULL
 
 #defineG_MIRROR_DEVICE_STATE_STARTING  0
 #defineG_MIRROR_DEVICE_STATE_RUNNING   1
___
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"