svn commit: r221726 - head/share/mk

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 10:48:43 2011
New Revision: 221726
URL: http://svn.freebsd.org/changeset/base/221726

Log:
  Another fallout from r220359: MK_GNU_CPIO was mistakenly re-added
  after being removed in r205702.  Remove it again.

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

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkTue May 10 07:12:11 2011(r221725)
+++ head/share/mk/bsd.own.mkTue May 10 10:48:43 2011(r221726)
@@ -394,7 +394,6 @@ __DEFAULT_NO_OPTIONS = \
 BIND_LIBS \
 BIND_SIGCHASE \
 BIND_XML \
-GNU_CPIO \
 HESIOD \
 ICONV \
 IDEA \
@@ -405,7 +404,7 @@ __DEFAULT_NO_OPTIONS = \
 # this means that we have to test TARGET_ARCH (the buildworld case) as well
 # as MACHINE_ARCH (the non-buildworld case).  Normally TARGET_ARCH is not
 # used at all in bsd.*.mk, but we have to make an exception here if we want
-# to allow defaults for some things like clang and ftd to vary by target
+# to allow defaults for some things like clang and fdt to vary by target
 # architecture.
 #
 .if defined(TARGET_ARCH)
___
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: r221727 - head/usr.bin/tip/tip

2011-05-10 Thread Poul-Henning Kamp
Author: phk
Date: Tue May 10 10:58:57 2011
New Revision: 221727
URL: http://svn.freebsd.org/changeset/base/221727

Log:
  Flush the scriptfile whenever we see a non-graphical character to get
  more real-time logging, without forcing a write(2) on every single
  character.

Modified:
  head/usr.bin/tip/tip/tipout.c

Modified: head/usr.bin/tip/tip/tipout.c
==
--- head/usr.bin/tip/tip/tipout.c   Tue May 10 10:48:43 2011
(r221726)
+++ head/usr.bin/tip/tip/tipout.c   Tue May 10 10:58:57 2011
(r221727)
@@ -170,12 +170,18 @@ tipout(void)
if (boolean(value(SCRIPT)) && fscript != NULL) {
if (!boolean(value(BEAUTIFY))) {
fwrite(buf, 1, cnt, fscript);
-   continue;
+   } else {
+   for (cp = buf; cp < buf + cnt; cp++)
+   if ((*cp >= ' ' && *cp <= '~') ||
+   any(*cp, value(EXCEPTIONS)))
+   putc(*cp, fscript);
+   }
+   for (cp = buf; cp < buf + cnt; cp++) {
+   if (!isgraph(*cp)) {
+   fflush(fscript);
+   break;
+   }
}
-   for (cp = buf; cp < buf + cnt; cp++)
-   if ((*cp >= ' ' && *cp <= '~') ||
-   any(*cp, value(EXCEPTIONS)))
-   putc(*cp, fscript);
}
}
 }
___
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: r221728 - head/share/mk

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 11:00:40 2011
New Revision: 221728
URL: http://svn.freebsd.org/changeset/base/221728

Log:
  Removed unsupported options MK_BINUTILS and MK_GCC that were
  silently added in r218936.

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

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkTue May 10 10:58:57 2011(r221727)
+++ head/share/mk/bsd.own.mkTue May 10 11:00:40 2011(r221728)
@@ -297,7 +297,6 @@ __DEFAULT_YES_OPTIONS = \
 BIND_MTREE \
 BIND_NAMED \
 BIND_UTILS \
-BINUTILS \
 BLUETOOTH \
 BOOT \
 BSD_CPIO \
@@ -318,7 +317,6 @@ __DEFAULT_YES_OPTIONS = \
 FP_LIBC \
 FREEBSD_UPDATE \
 GAMES \
-GCC \
 GCOV \
 GDB \
 GNU \
___
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: r221729 - head/tools/build/options

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 11:06:14 2011
New Revision: 221729
URL: http://svn.freebsd.org/changeset/base/221729

Log:
  The Objective C support was removed in r220755.
  
  Submitted by: des

Deleted:
  head/tools/build/options/WITHOUT_OBJC
___
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: r221730 - head/tools/build/options

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 11:14:40 2011
New Revision: 221730
URL: http://svn.freebsd.org/changeset/base/221730

Log:
  - There now exist options that have different defaults depending on
the architecture, reflect this in documentation.  For such
options, both WITH_FOO and WITHOUT_FOO description files should
be provided.
  
Prodded by: des
  
  - Setting a build option may enforce other build options, try harder
to detect this case.
  
  - Setting a build option may change other option's default value,
try harder to detect this case.

Added:
  head/tools/build/options/WITH_CLANG
 - copied, changed from r221204, head/tools/build/options/WITHOUT_CLANG
  head/tools/build/options/WITH_FDT
 - copied, changed from r221539, head/tools/build/options/WITHOUT_FDT
Modified:
  head/tools/build/options/makeman

Copied and modified: head/tools/build/options/WITH_CLANG (from r221204, 
head/tools/build/options/WITHOUT_CLANG)
==
--- head/tools/build/options/WITHOUT_CLANG  Fri Apr 29 10:33:54 2011
(r221204, copy source)
+++ head/tools/build/options/WITH_CLANG Tue May 10 11:14:40 2011
(r221730)
@@ -1,2 +1,2 @@
 .\" $FreeBSD$
-Set to not build the Clang C/C++ compiler.
+Set to build the Clang C/C++ compiler.

Copied and modified: head/tools/build/options/WITH_FDT (from r221539, 
head/tools/build/options/WITHOUT_FDT)
==
--- head/tools/build/options/WITHOUT_FDTFri May  6 19:10:27 2011
(r221539, copy source)
+++ head/tools/build/options/WITH_FDT   Tue May 10 11:14:40 2011
(r221730)
@@ -1,3 +1,3 @@
 .\" $FreeBSD$
-Set to not build Flattened Device Tree support as part of the base system.
+Set to build Flattened Device Tree support as part of the base system.
 This includes the device tree compiler (dtc) and libfdt support library.

Modified: head/tools/build/options/makeman
==
--- head/tools/build/options/makemanTue May 10 11:06:14 2011
(r221729)
+++ head/tools/build/options/makemanTue May 10 11:14:40 2011
(r221730)
@@ -2,34 +2,98 @@
 #
 # This file is in the public domain.
 
+set -o errexit
+
 ident='$FreeBSD$'
 
+t=$(mktemp -d -t makeman)
+trap 'test -d $t && rm -rf $t' exit
+
 #
-# usage: show { settings | options } ...
+# usage: no_targets all_targets yes_targets
+#
+no_targets()
+{
+   for t1 in $1 ; do
+   for t2 in $2 ; do
+   if [ "${t1}" = "${t2}" ] ; then
+   continue 2
+   fi
+   done
+   echo ${t1}
+   done
+}
+
+show_options()
+{
+   ALL_TARGETS=$(echo $(make -C ../../.. targets | tail -n +2))
+   rm -f $t/settings
+   for target in ${ALL_TARGETS} ; do
+   make -C ../../.. showconfig \
+   SRCCONF=/dev/null __MAKE_CONF=/dev/null \
+   TARGET_ARCH=${target#*/} TARGET=${target%/*} |
+   while read var _ val ; do
+   opt=${var#MK_}
+   case ${val} in
+   yes)
+   echo ${opt} ${target}
+   ;;
+   no)
+   echo ${opt}
+   ;;
+   *)
+   echo 'make showconfig broken' >&2
+   exit 1
+   ;;
+   esac
+   done > $t/settings.target
+   if [ -r $t/settings ] ; then
+   join -t\  $t/settings $t/settings.target > 
$t/settings.new
+   mv $t/settings.new $t/settings
+   else
+   mv $t/settings.target $t/settings
+   fi
+   done
+
+   cat $t/settings | while read opt targets ; do
+   if [ "${targets}" = "${ALL_TARGETS}" ] ; then
+   echo "WITHOUT_${opt}"
+   elif [ -z "${targets}" ] ; then
+   echo "WITH_${opt}"
+   else
+   echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" 
"${targets}")
+   echo "WITH_${opt} ${targets}"
+   fi
+   done
+}
+
+#
+# usage: show { settings | with | without } ...
 #
 show()
 {
 
-   mode=$1; shift
+   mode=$1 ; shift
case ${mode} in
settings)
yes_prefix=WITH
no_prefix=WITHOUT
;;
-   options)
-   yes_prefix=WITHOUT
+   with)
+   yes_prefix=WITH
no_prefix=WITH
;;
+   without)
+   yes_prefix=WITHOUT
+   no_prefix=WITHOUT
+   ;;
*)
-   echo "internal error" >/de

svn commit: r221731 - head/sys/dev/puc

2011-05-10 Thread John Baldwin
Author: jhb
Date: Tue May 10 12:40:35 2011
New Revision: 221731
URL: http://svn.freebsd.org/changeset/base/221731

Log:
  Add an entry for the SIIG Quartet Serial 850 which uses an Oxford
  chip with a non-default clock.
  
  PR:   kern/147583
  MFC after:1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==
--- head/sys/dev/puc/pucdata.c  Tue May 10 11:14:40 2011(r221730)
+++ head/sys/dev/puc/pucdata.c  Tue May 10 12:40:35 2011(r221731)
@@ -638,6 +638,12 @@ const struct puc_cfg puc_pci_devices[] =
PUC_PORT_4S, 0x10, 0, 8,
},
 
+   {   0x1415, 0x9501, 0x131f, 0x2052,
+   "SIIG Quartet Serial 850",
+   DEFAULT_RCLK * 10,
+   PUC_PORT_4S, 0x10, 0, 8,
+   },
+
{   0x1415, 0x9501, 0x14db, 0x2150,
"Kuroutoshikou SERIAL4P-LPPCI2",
DEFAULT_RCLK * 10,
___
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: r221732 - head/tools/build/options

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 12:57:39 2011
New Revision: 221732
URL: http://svn.freebsd.org/changeset/base/221732

Log:
  Style.

Modified:
  head/tools/build/options/makeman

Modified: head/tools/build/options/makeman
==
--- head/tools/build/options/makemanTue May 10 12:40:35 2011
(r221731)
+++ head/tools/build/options/makemanTue May 10 12:57:39 2011
(r221732)
@@ -206,21 +206,21 @@ EOF
if [ ! -f ${opt} ] ; then
echo "no description found for ${opt}, skipping" >&2
continue
-   else
-   echo ".It Va ${opt}"
-   sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt}
-   if [ -n "${targets}" ] ; then
-   echo '.Pp'
-   echo 'It is a default setting on'
-   echo $(echo ${targets} | sed -e's/ /, /g' 
-e's/\(.*\), /\1 and /').
-   fi
fi
 
-   if [ "${opt%%_*}" = "WITHOUT" ] ; then
+   echo ".It Va ${opt}"
+   sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt}
+   if [ -n "${targets}" ] ; then
+   echo '.Pp'
+   echo 'It is a default setting on'
+   echo $(echo ${targets} | sed -e's/ /, /g' -e's/\(.*\), 
/\1 and /').
+   fi
+
+   if [ "${opt%%_*}" = 'WITHOUT' ] ; then
sed -n "/^WITH_${opt#WITHOUT_}$/!s/$/=/p" 
$t/config_WITH_ALL > $t/src.conf
show settings SRCCONF=$t/src.conf -D${opt} | sort > 
$t/config_WITH_ALL_${opt}
comm -13 $t/config_WITH_ALL $t/config_WITH_ALL_${opt} | 
sed -n "/^${opt}$/!p" > $t/deps
-   elif [ "${opt%%_*}" = "WITH" ] ; then
+   elif [ "${opt%%_*}" = 'WITH' ] ; then
sed -n "/^WITHOUT${opt#WITH}$/!s/$/=/p" 
$t/config_WITHOUT_ALL > $t/src.conf
show settings SRCCONF=$t/src.conf -D${opt} | sort > 
$t/config_WITHOUT_ALL_${opt}
comm -13 $t/config_WITHOUT_ALL 
$t/config_WITHOUT_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps
___
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: r221733 - head/tools/build/options

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 13:01:11 2011
New Revision: 221733
URL: http://svn.freebsd.org/changeset/base/221733

Log:
  Reassurance for impatient.

Modified:
  head/tools/build/options/makeman

Modified: head/tools/build/options/makeman
==
--- head/tools/build/options/makemanTue May 10 12:57:39 2011
(r221732)
+++ head/tools/build/options/makemanTue May 10 13:01:11 2011
(r221733)
@@ -260,6 +260,7 @@ EOF
done
echo '.El'
fi
+   twiddle >&2
done
cat 

svn commit: r221734 - head/share/man/man5

2011-05-10 Thread Ruslan Ermilov
Author: ru
Date: Tue May 10 13:25:42 2011
New Revision: 221734
URL: http://svn.freebsd.org/changeset/base/221734

Log:
  Regen.

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue May 10 13:01:11 2011
(r221733)
+++ head/share/man/man5/src.conf.5  Tue May 10 13:25:42 2011
(r221734)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: head/tools/build/options/makeman 221161 2011-04-28 11:21:49Z 
des
+.\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z 
ru
 .\" $FreeBSD$
-.Dd April 30, 2011
+.Dd May 10, 2011
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -78,9 +78,9 @@ The following list provides a name and s
 that can be used for source builds.
 .Bl -tag -width indent
 .It Va WITHOUT_ACCT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 183242 2008-09-21 
22:02:26Z sam
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 221540 2011-05-06 
19:13:03Z ru
 Set to not build process accounting tools such as
-.Xr ac 8 
+.Xr ac 8
 and
 .Xr accton 8 .
 .It Va WITHOUT_ACPI
@@ -132,6 +132,8 @@ When set, it also enforces the following
 .It
 .Va WITHOUT_BIND_ETC
 .It
+.Va WITHOUT_BIND_LIBS
+.It
 .Va WITHOUT_BIND_LIBS_LWRES
 .It
 .Va WITHOUT_BIND_MTREE
@@ -253,6 +255,15 @@ When set, it also enforces the following
 .It Va WITHOUT_CLANG
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 
06:20:26Z ed
 Set to not build the Clang C/C++ compiler.
+.Pp
+It is a default setting on
+arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, 
mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64, sparc64/sparc64 and 
sun4v/sparc64.
+.It Va WITH_CLANG
+.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 
11:14:40Z ru
+Set to build the Clang C/C++ compiler.
+.Pp
+It is a default setting on
+amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc.
 .It Va WITHOUT_CPP
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 
07:50:50Z ru
 Set to not build
@@ -264,10 +275,6 @@ When set, it also enforces the following
 .Pp
 .Bl -item -compact
 .It
-.Va WITHOUT_GSSAPI
-(can be overridden with
-.Va WITH_GSSAPI )
-.It
 .Va WITHOUT_KERBEROS
 .It
 .Va WITHOUT_KERBEROS_SUPPORT
@@ -276,6 +283,15 @@ When set, it also enforces the following
 .It
 .Va WITHOUT_OPENSSL
 .El
+.Pp
+When set, the following options are also in effect:
+.Pp
+.Bl -inset -compact
+.It Va WITHOUT_GSSAPI
+(unless
+.Va WITH_GSSAPI
+is set explicitly)
+.El
 .It Va WITHOUT_CTM
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 
22:02:26Z sam
 Set to not build
@@ -285,7 +301,7 @@ and related utilities.
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 
07:50:50Z ru
 Set to not build CVS.
 .It Va WITHOUT_CXX
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220401 2011-04-06 
20:08:23Z uqs
+.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 
20:19:07Z uqs
 Set to not build
 .Xr g++ 1
 and related libraries.
@@ -316,12 +332,22 @@ dynamically.
 Set to avoid installing examples to
 .Pa /usr/share/examples/ .
 .It Va WITHOUT_FDT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 218942 2011-02-22 
08:20:12Z uqs
-Set to not build Flattened Device Tree support as part of the base system. This
-includes the device tree compiler (dtc) and libfdt support library.
+.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 
19:10:27Z ru
+Set to not build Flattened Device Tree support as part of the base system.
+This includes the device tree compiler (dtc) and libfdt support library.
+.Pp
+It is a default setting on
+amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, 
mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64, sparc64/sparc64 
and sun4v/sparc64.
+.It Va WITH_FDT
+.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 
11:14:40Z ru
+Set to build Flattened Device Tree support as part of the base system.
+This includes the device tree compiler (dtc) and libfdt support library.
+.Pp
+It is a default setting on
+arm/arm, arm/armeb and powerpc/powerpc.
 .It Va WITHOUT_FLOPPY
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 183306 2008-09-23 
16:15:42Z sam
-Set to not build or install programs 
+.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 
19:13:03Z ru
+Set to not build or install programs
 for operating floppy disk driver.
 .It Va WITHOUT_FORTH
 .\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 
07:50:50Z ru
@@ -367,9 +393,11 @@ Set to build some programs without optio
 .It Va WITHOUT_GPIB
 .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 
07:50:50Z ru
 Set to not build GPIB bus support.
-.It Va WITH_GPIO
-.\" from FreeBSD: head/tools/build/options/W

svn commit: r221738 - head/sys/powerpc/powerpc

2011-05-10 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue May 10 14:03:05 2011
New Revision: 221738
URL: http://svn.freebsd.org/changeset/base/221738

Log:
  Only try to set up IPIs at boot on systems that actually have more than one
  CPU. This fixes a panic observed on Heathrow-based systems without
  SMP-capable PICs when the kernel had both options SMP and INVARIANTS.
  
  MFC after:5 days

Modified:
  head/sys/powerpc/powerpc/intr_machdep.c

Modified: head/sys/powerpc/powerpc/intr_machdep.c
==
--- head/sys/powerpc/powerpc/intr_machdep.c Tue May 10 13:59:33 2011
(r221737)
+++ head/sys/powerpc/powerpc/intr_machdep.c Tue May 10 14:03:05 2011
(r221738)
@@ -397,18 +397,22 @@ powerpc_enable_intr(void)
 
 #ifdef SMP
/* Install an IPI handler. */
-   for (n = 0; n < npics; n++) {
-   if (piclist[n].dev != root_pic)
-   continue;
-
-   KASSERT(piclist[n].ipis != 0, ("%s", __func__));
-   error = powerpc_setup_intr("IPI",
-   MAP_IRQ(piclist[n].node, piclist[n].irqs),
-   powerpc_ipi_handler, NULL, NULL,
-   INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie);
-   if (error) {
-   printf("unable to setup IPI handler\n");
-   return (error);
+   if (mp_ncpus > 1) {
+   for (n = 0; n < npics; n++) {
+   if (piclist[n].dev != root_pic)
+   continue;
+
+   KASSERT(piclist[n].ipis != 0,
+   ("%s: SMP root PIC does not supply any IPIs",
+   __func__));
+   error = powerpc_setup_intr("IPI",
+   MAP_IRQ(piclist[n].node, piclist[n].irqs),
+   powerpc_ipi_handler, NULL, NULL,
+   INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie);
+   if (error) {
+   printf("unable to setup IPI handler\n");
+   return (error);
+   }
}
}
 #endif
___
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: r221740 - in head/sys/cddl/dev/dtrace: amd64 i386

2011-05-10 Thread Andriy Gapon
Author: avg
Date: Tue May 10 15:05:27 2011
New Revision: 221740
URL: http://svn.freebsd.org/changeset/base/221740

Log:
  dtrace: remove unused code
  
  Which is also useless, IMO.
  
  MFC after:5 days

Modified:
  head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  head/sys/cddl/dev/dtrace/i386/dtrace_subr.c

Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cTue May 10 14:21:44 
2011(r221739)
+++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cTue May 10 15:05:27 
2011(r221740)
@@ -359,26 +359,6 @@ static uint64_tnsec_scale;
 #define SCALE_SHIFT28
 
 static void
-dtrace_gethrtime_init_sync(void *arg)
-{
-#ifdef CHECK_SYNC
-   /*
-* Delay this function from returning on one
-* of the CPUs to check that the synchronisation
-* works.
-*/
-   uintptr_t cpu = (uintptr_t) arg;
-
-   if (cpu == curcpu) {
-   int i;
-   for (i = 0; i < 10; i++)
-   tgt_cpu_tsc = rdtsc();
-   tgt_cpu_tsc = 0;
-   }
-#endif
-}
-
-static void
 dtrace_gethrtime_init_cpu(void *arg)
 {
uintptr_t cpu = (uintptr_t) arg;
@@ -434,7 +414,7 @@ dtrace_gethrtime_init(void *arg)
pc = pcpu_find(i);
map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
-   smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
+   smp_rendezvous_cpus(map, NULL,
dtrace_gethrtime_init_cpu,
smp_no_rendevous_barrier, (void *)(uintptr_t) i);
 

Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue May 10 14:21:44 2011
(r221739)
+++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue May 10 15:05:27 2011
(r221740)
@@ -359,26 +359,6 @@ static uint64_tnsec_scale;
 #define SCALE_SHIFT28
 
 static void
-dtrace_gethrtime_init_sync(void *arg)
-{
-#ifdef CHECK_SYNC
-   /*
-* Delay this function from returning on one
-* of the CPUs to check that the synchronisation
-* works.
-*/
-   uintptr_t cpu = (uintptr_t) arg;
-
-   if (cpu == curcpu) {
-   int i;
-   for (i = 0; i < 10; i++)
-   tgt_cpu_tsc = rdtsc();
-   tgt_cpu_tsc = 0;
-   }
-#endif
-}
-
-static void
 dtrace_gethrtime_init_cpu(void *arg)
 {
uintptr_t cpu = (uintptr_t) arg;
@@ -434,7 +414,7 @@ dtrace_gethrtime_init(void *arg)
pc = pcpu_find(i);
map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
-   smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
+   smp_rendezvous_cpus(map, NULL,
dtrace_gethrtime_init_cpu,
smp_no_rendevous_barrier, (void *)(uintptr_t) i);
 
___
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: r221741 - head/sys/sys

2011-05-10 Thread Andriy Gapon
Author: avg
Date: Tue May 10 15:08:13 2011
New Revision: 221741
URL: http://svn.freebsd.org/changeset/base/221741

Log:
  bitcount32: replace lengthy comment with a reference to SWAR
  
  MFC after:5 days

Modified:
  head/sys/sys/systm.h

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hTue May 10 15:05:27 2011(r221740)
+++ head/sys/sys/systm.hTue May 10 15:08:13 2011(r221741)
@@ -374,44 +374,8 @@ int alloc_unrl(struct unrhdr *uh);
 void free_unr(struct unrhdr *uh, u_int item);
 
 /*
- * This is about as magic as it gets.  fortune(1) has got similar code
- * for reversing bits in a word.  Who thinks up this stuff??
- *
- * Yes, it does appear to be consistently faster than:
- * while (i = ffs(m)) {
- * m >>= i;
- * bits++;
- * }
- * and
- * while (lsb = (m & -m)) {// This is magic too
- * m &= ~lsb;  // or: m ^= lsb
- * bits++;
- * }
- * Both of these latter forms do some very strange things on gcc-3.1 with
- * -mcpu=pentiumpro and/or -march=pentiumpro and/or -O or -O2.
- * There is probably an SSE or MMX popcnt instruction.
- *
- * I wonder if this should be in libkern?
- *
- * XXX Stop the presses!  Another one:
- * static __inline u_int32_t
- * popcnt1(u_int32_t v)
- * {
- * v -= ((v >> 1) & 0x);
- * v = (v & 0x) + ((v >> 2) & 0x);
- * v = (v + (v >> 4)) & 0x0F0F0F0F;
- * return (v * 0x01010101) >> 24;
- * }
- * The downside is that it has a multiply.  With a pentium3 with
- * -mcpu=pentiumpro and -march=pentiumpro then gcc-3.1 will use
- * an imull, and in that case it is faster.  In most other cases
- * it appears slightly slower.
- *
- * Another variant (also from fortune):
- * #define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
- * #define  BX_(x) ((x) - (((x)>>1)&0x)\
- *  - (((x)>>2)&0x)\
- *  - (((x)>>3)&0x))
+ * Population count algorithm using SWAR approach
+ * - "SIMD Within A Register".
  */
 static __inline uint32_t
 bitcount32(uint32_t x)
___
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: r221176 - head/sys/fs/ext2fs

2011-05-10 Thread Gleb Kurtsou
Could you also commit the patch attached. No functional changes, it
removes incorrect comment copy-pasted from UFS to ext2.
  
Thanks,
Gleb.
>From 24f4656c71d716e23e3c043ac6d0894284efa301 Mon Sep 17 00:00:00 2001
From: Gleb Kurtsou 
Date: Thu, 21 Oct 2010 01:51:59 +0300
Subject: [PATCH 02/25] ext2fs: Remove stale comment

---
 sys/fs/ext2fs/ext2_lookup.c |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c
index 56963b2..7edd54f 100644
--- a/sys/fs/ext2fs/ext2_lookup.c
+++ b/sys/fs/ext2fs/ext2_lookup.c
@@ -117,12 +117,6 @@ static int	ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de,
 
 /*
  * Vnode op for reading directories.
- *
- * The routine below assumes that the on-disk format of a directory
- * is the same as that defined by . If the on-disk
- * format changes, then it will be necessary to do a conversion
- * from the on-disk format that read returns to the format defined
- * by .
  */
 /*
  * this is exactly what we do here - the problem is that the conversion
-- 
1.7.3.5

___
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: r221743 - in head/sys: amd64/conf i386/conf

2011-05-10 Thread Jung-uk Kim
Author: jkim
Date: Tue May 10 16:44:16 2011
New Revision: 221743
URL: http://svn.freebsd.org/changeset/base/221743

Log:
  Add SC_PIXEL_MODE to GENERIC for amd64 and i386.
  
  Requested by: many

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Tue May 10 15:54:37 2011(r221742)
+++ head/sys/amd64/conf/GENERIC Tue May 10 16:44:16 2011(r221743)
@@ -165,6 +165,7 @@ device  splash  # Splash screen and scre
 
 # syscons is the default console driver, resembling an SCO console
 device sc
+optionsSC_PIXEL_MODE   # add support for the raster text mode
 
 device agp # support several AGP chipsets
 

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Tue May 10 15:54:37 2011(r221742)
+++ head/sys/i386/conf/GENERIC  Tue May 10 16:44:16 2011(r221743)
@@ -170,6 +170,7 @@ device  splash  # Splash screen and scre
 
 # syscons is the default console driver, resembling an SCO console
 device sc
+optionsSC_PIXEL_MODE   # add support for the raster text mode
 
 device agp # support several AGP chipsets
 
___
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: r221746 - head/sys/dev/mii

2011-05-10 Thread Marius Strobl
Author: marius
Date: Tue May 10 18:38:01 2011
New Revision: 221746
URL: http://svn.freebsd.org/changeset/base/221746

Log:
  Fix a bug in r221407; this driver doesn't add the media itself.
  
  PR:   156893

Modified:
  head/sys/dev/mii/ip1000phy.c

Modified: head/sys/dev/mii/ip1000phy.c
==
--- head/sys/dev/mii/ip1000phy.cTue May 10 18:19:56 2011
(r221745)
+++ head/sys/dev/mii/ip1000phy.cTue May 10 18:38:01 2011
(r221746)
@@ -111,7 +111,7 @@ ip1000phy_attach(device_t dev)
 strcmp(ma->mii_data->mii_ifp->if_dname, "stge") == 0 &&
 (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0)
flags |= MIIF_PHYPRIV0;
-   mii_phy_dev_attach(dev, flags, &ip1000phy_funcs, 0);
+   mii_phy_dev_attach(dev, flags, &ip1000phy_funcs, 1);
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r221747 - head/sys/dev/mii

2011-05-10 Thread Marius Strobl
Author: marius
Date: Tue May 10 18:41:46 2011
New Revision: 221747
URL: http://svn.freebsd.org/changeset/base/221747

Log:
  Fix whitespace.

Modified:
  head/sys/dev/mii/ip1000phy.c

Modified: head/sys/dev/mii/ip1000phy.c
==
--- head/sys/dev/mii/ip1000phy.cTue May 10 18:38:01 2011
(r221746)
+++ head/sys/dev/mii/ip1000phy.cTue May 10 18:41:46 2011
(r221747)
@@ -70,7 +70,7 @@ static devclass_t ip1000phy_devclass;
 static driver_t ip1000phy_driver = {
"ip1000phy",
ip1000phy_methods,
-   sizeof (struct mii_softc)
+   sizeof(struct mii_softc)
 };
 
 DRIVER_MODULE(ip1000phy, miibus, ip1000phy_driver, ip1000phy_devclass, 0, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r221748 - stable/8/sys/dev/mii

2011-05-10 Thread Marius Strobl
Author: marius
Date: Tue May 10 18:43:18 2011
New Revision: 221748
URL: http://svn.freebsd.org/changeset/base/221748

Log:
  Supply the correct size of the softc. This is a direct commit to stable/8
  as in head the problem is no longer present as of r221407 but that revision
  can't be MFC'ed.

Modified:
  stable/8/sys/dev/mii/ip1000phy.c

Modified: stable/8/sys/dev/mii/ip1000phy.c
==
--- stable/8/sys/dev/mii/ip1000phy.cTue May 10 18:41:46 2011
(r221747)
+++ stable/8/sys/dev/mii/ip1000phy.cTue May 10 18:43:18 2011
(r221748)
@@ -76,7 +76,7 @@ static devclass_t ip1000phy_devclass;
 static driver_t ip1000phy_driver = {
"ip1000phy",
ip1000phy_methods,
-   sizeof (struct mii_softc)
+   sizeof(struct ip1000phy_softc)
 };
 
 DRIVER_MODULE(ip1000phy, miibus, ip1000phy_driver, ip1000phy_devclass, 0, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r221749 - stable/7/sys/dev/mii

2011-05-10 Thread Marius Strobl
Author: marius
Date: Tue May 10 18:44:40 2011
New Revision: 221749
URL: http://svn.freebsd.org/changeset/base/221749

Log:
  Supply the correct size of the softc. This is a direct commit to stable/7
  as in head the problem is no longer present as of r221407 but that revision
  can't be MFC'ed.

Modified:
  stable/7/sys/dev/mii/ip1000phy.c

Modified: stable/7/sys/dev/mii/ip1000phy.c
==
--- stable/7/sys/dev/mii/ip1000phy.cTue May 10 18:43:18 2011
(r221748)
+++ stable/7/sys/dev/mii/ip1000phy.cTue May 10 18:44:40 2011
(r221749)
@@ -76,7 +76,7 @@ static devclass_t ip1000phy_devclass;
 static driver_t ip1000phy_driver = {
"ip1000phy",
ip1000phy_methods,
-   sizeof (struct mii_softc)
+   sizeof(struct ip1000phy_softc)
 };
 
 DRIVER_MODULE(ip1000phy, miibus, ip1000phy_driver, ip1000phy_devclass, 0, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r221750 - head/sys/sparc64/include

2011-05-10 Thread Marius Strobl
Author: marius
Date: Tue May 10 21:18:45 2011
New Revision: 221750
URL: http://svn.freebsd.org/changeset/base/221750

Log:
  Add an ATOMIC_CLEAR_LONG.

Modified:
  head/sys/sparc64/include/asmacros.h

Modified: head/sys/sparc64/include/asmacros.h
==
--- head/sys/sparc64/include/asmacros.h Tue May 10 18:44:40 2011
(r221749)
+++ head/sys/sparc64/include/asmacros.h Tue May 10 21:18:45 2011
(r221750)
@@ -90,6 +90,17 @@
bne,pn  %icc, 9b ; \
 movr3, r2
 
+/*
+ * Atomically clear a number of bits of an u_long in memory.
+ */
+#defineATOMIC_CLEAR_LONG(r1, r2, r3, bits) \
+   ldx [r1], r2 ; \
+9: andnr2, bits, r3 ; \
+   casxa   [r1] ASI_N, r2, r3 ; \
+   cmp r2, r3 ; \
+   bne,pn  %icc, 9b ; \
+movr3, r2
+
 #definePCPU(member)PCPU_REG + PC_ ## member
 #definePCPU_ADDR(member, reg) \
add PCPU_REG, PC_ ## member, reg
___
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: r221753 - head/sys/mips/conf

2011-05-10 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Wed May 11 00:52:41 2011
New Revision: 221753
URL: http://svn.freebsd.org/changeset/base/221753

Log:
  Use new option names for NFS client and NFS server
  
  See UPDATING entry for 20110427

Modified:
  head/sys/mips/conf/ADM5120
  head/sys/mips/conf/ALCHEMY
  head/sys/mips/conf/AR71XX
  head/sys/mips/conf/AR91XX_BASE
  head/sys/mips/conf/IDT
  head/sys/mips/conf/MALTA
  head/sys/mips/conf/MALTA64
  head/sys/mips/conf/OCTEON1
  head/sys/mips/conf/PB92
  head/sys/mips/conf/QEMU
  head/sys/mips/conf/RT305X
  head/sys/mips/conf/SENTRY5
  head/sys/mips/conf/XLR
  head/sys/mips/conf/XLR64
  head/sys/mips/conf/XLRN32
  head/sys/mips/conf/std.SWARM

Modified: head/sys/mips/conf/ADM5120
==
--- head/sys/mips/conf/ADM5120  Wed May 11 00:47:24 2011(r221752)
+++ head/sys/mips/conf/ADM5120  Wed May 11 00:52:41 2011(r221753)
@@ -33,8 +33,8 @@ options   KDB
 
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
-optionsNFSCLIENT   #Network Filesystem Client
-optionsNFS_ROOT#NFS usable as /, requires NFSCLIENT
+optionsNFSCL   #Network Filesystem Client
+optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 #options   _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 

Modified: head/sys/mips/conf/ALCHEMY
==
--- head/sys/mips/conf/ALCHEMY  Wed May 11 00:47:24 2011(r221752)
+++ head/sys/mips/conf/ALCHEMY  Wed May 11 00:52:41 2011(r221753)
@@ -33,8 +33,8 @@ options   KDB
 
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
-optionsNFSCLIENT   #Network Filesystem Client
-optionsNFS_ROOT#NFS usable as /, requires 
NFSCLIENT
+optionsNFSCL   #Network Filesystem Client
+optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 # options  _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
extensions
 

Modified: head/sys/mips/conf/AR71XX
==
--- head/sys/mips/conf/AR71XX   Wed May 11 00:47:24 2011(r221752)
+++ head/sys/mips/conf/AR71XX   Wed May 11 00:52:41 2011(r221753)
@@ -19,8 +19,8 @@ options   KDB
 
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
-optionsNFSCLIENT   #Network Filesystem Client
-optionsNFS_ROOT#NFS usable as /, requires 
NFSCLIENT
+optionsNFSCL   #Network Filesystem Client
+optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
extensions
 

Modified: head/sys/mips/conf/AR91XX_BASE
==
--- head/sys/mips/conf/AR91XX_BASE  Wed May 11 00:47:24 2011
(r221752)
+++ head/sys/mips/conf/AR91XX_BASE  Wed May 11 00:52:41 2011
(r221753)
@@ -29,7 +29,7 @@ options   KDB
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
 optionsINET6   #InterNETworking
-optionsNFSCLIENT   #Network Filesystem Client
+optionsNFSCL   #Network Filesystem Client
 optionsPSEUDOFS#Pseudo-filesystem framework
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
extensions
 

Modified: head/sys/mips/conf/IDT
==
--- head/sys/mips/conf/IDT  Wed May 11 00:47:24 2011(r221752)
+++ head/sys/mips/conf/IDT  Wed May 11 00:52:41 2011(r221753)
@@ -16,8 +16,8 @@ options   KDB
 
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
-optionsNFSCLIENT   #Network Filesystem Client
-optionsNFS_ROOT#NFS usable as /, requires NFSCLIENT
+optionsNFSCL   #Network Filesystem Client
+optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 
 options 

svn commit: r221754 - stable/8/sys/geom/cache

2011-05-10 Thread Andrey V. Elsukov
Author: ae
Date: Wed May 11 04:46:33 2011
New Revision: 221754
URL: http://svn.freebsd.org/changeset/base/221754

Log:
  MFC r221446:
Remove unneeded checks, g_new_xxx functions can not fail.

Modified:
  stable/8/sys/geom/cache/g_cache.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/geom/cache/g_cache.c
==
--- stable/8/sys/geom/cache/g_cache.c   Wed May 11 00:52:41 2011
(r221753)
+++ stable/8/sys/geom/cache/g_cache.c   Wed May 11 04:46:33 2011
(r221754)
@@ -499,12 +499,6 @@ g_cache_create(struct g_class *mp, struc
}
 
gp = g_new_geomf(mp, md->md_name);
-   if (gp == NULL) {
-   G_CACHE_DEBUG(0, "Cannot create geom %s.", md->md_name);
-   return (NULL);
-   }
-   gp->softc = NULL;   /* for a moment */
-
sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
sc->sc_type = type;
sc->sc_bshift = bshift;
@@ -525,10 +519,6 @@ g_cache_create(struct g_class *mp, struc
gp->dumpconf = g_cache_dumpconf;
 
newpp = g_new_providerf(gp, "cache/%s", gp->name);
-   if (newpp == NULL) {
-   G_CACHE_DEBUG(0, "Cannot create provider cache/%s.", gp->name);
-   goto fail;
-   }
newpp->sectorsize = pp->sectorsize;
newpp->mediasize = pp->mediasize;
if (type == G_CACHE_TYPE_AUTOMATIC)
@@ -536,35 +526,20 @@ g_cache_create(struct g_class *mp, struc
sc->sc_tail = BNO2OFF(OFF2BNO(newpp->mediasize, sc), sc);
 
cp = g_new_consumer(gp);
-   if (cp == NULL) {
-   G_CACHE_DEBUG(0, "Cannot create consumer for %s.", gp->name);
-   goto fail;
-   }
if (g_attach(cp, pp) != 0) {
G_CACHE_DEBUG(0, "Cannot attach to provider %s.", pp->name);
-   goto fail;
+   g_destroy_consumer(cp);
+   g_destroy_provider(newpp);
+   mtx_destroy(&sc->sc_mtx);
+   g_free(sc);
+   g_destroy_geom(gp);
+   return (NULL);
}
 
g_error_provider(newpp, 0);
G_CACHE_DEBUG(0, "Device %s created.", gp->name);
callout_reset(&sc->sc_callout, g_cache_timeout * hz, g_cache_go, sc);
return (gp);
-fail:
-   if (cp != NULL) {
-   if (cp->provider != NULL)
-   g_detach(cp);
-   g_destroy_consumer(cp);
-   }
-   if (newpp != NULL)
-   g_destroy_provider(newpp);
-   if (gp != NULL) {
-   if (gp->softc != NULL) {
-   mtx_destroy(&sc->sc_mtx);
-   g_free(gp->softc);
-   }
-   g_destroy_geom(gp);
-   }
-   return (NULL);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r221755 - in stable/8/sys/geom: concat eli shsec stripe

2011-05-10 Thread Andrey V. Elsukov
Author: ae
Date: Wed May 11 04:48:03 2011
New Revision: 221755
URL: http://svn.freebsd.org/changeset/base/221755

Log:
  MFC r221447:
Remove "for a moment" assignment. struct g_geom zeroed when allocated.

Modified:
  stable/8/sys/geom/concat/g_concat.c
  stable/8/sys/geom/eli/g_eli.c
  stable/8/sys/geom/shsec/g_shsec.c
  stable/8/sys/geom/stripe/g_stripe.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/geom/concat/g_concat.c
==
--- stable/8/sys/geom/concat/g_concat.c Wed May 11 04:46:33 2011
(r221754)
+++ stable/8/sys/geom/concat/g_concat.c Wed May 11 04:48:03 2011
(r221755)
@@ -546,8 +546,6 @@ g_concat_create(struct g_class *mp, cons
}
}
gp = g_new_geomf(mp, "%s", md->md_name);
-   gp->softc = NULL;   /* for a moment */
-
sc = malloc(sizeof(*sc), M_CONCAT, M_WAITOK | M_ZERO);
gp->start = g_concat_start;
gp->spoiled = g_concat_orphan;

Modified: stable/8/sys/geom/eli/g_eli.c
==
--- stable/8/sys/geom/eli/g_eli.c   Wed May 11 04:46:33 2011
(r221754)
+++ stable/8/sys/geom/eli/g_eli.c   Wed May 11 04:48:03 2011
(r221755)
@@ -709,8 +709,6 @@ g_eli_create(struct gctl_req *req, struc
G_ELI_DEBUG(1, "Creating device %s%s.", bpp->name, G_ELI_SUFFIX);
 
gp = g_new_geomf(mp, "%s%s", bpp->name, G_ELI_SUFFIX);
-   gp->softc = NULL;   /* for a moment */
-
sc = malloc(sizeof(*sc), M_ELI, M_WAITOK | M_ZERO);
gp->start = g_eli_start;
/*

Modified: stable/8/sys/geom/shsec/g_shsec.c
==
--- stable/8/sys/geom/shsec/g_shsec.c   Wed May 11 04:46:33 2011
(r221754)
+++ stable/8/sys/geom/shsec/g_shsec.c   Wed May 11 04:48:03 2011
(r221755)
@@ -545,8 +545,6 @@ g_shsec_create(struct g_class *mp, const
}
}
gp = g_new_geomf(mp, "%s", md->md_name);
-   gp->softc = NULL;   /* for a moment */
-
sc = malloc(sizeof(*sc), M_SHSEC, M_WAITOK | M_ZERO);
gp->start = g_shsec_start;
gp->spoiled = g_shsec_orphan;

Modified: stable/8/sys/geom/stripe/g_stripe.c
==
--- stable/8/sys/geom/stripe/g_stripe.c Wed May 11 04:46:33 2011
(r221754)
+++ stable/8/sys/geom/stripe/g_stripe.c Wed May 11 04:48:03 2011
(r221755)
@@ -818,8 +818,6 @@ g_stripe_create(struct g_class *mp, cons
}
}
gp = g_new_geomf(mp, "%s", md->md_name);
-   gp->softc = NULL;   /* for a moment */
-
sc = malloc(sizeof(*sc), M_STRIPE, M_WAITOK | M_ZERO);
gp->start = g_stripe_start;
gp->spoiled = g_stripe_orphan;
___
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: r221756 - in stable/8/sys/geom: multipath sched

2011-05-10 Thread Andrey V. Elsukov
Author: ae
Date: Wed May 11 04:53:56 2011
New Revision: 221756
URL: http://svn.freebsd.org/changeset/base/221756

Log:
  MFC r221452,221453:
Remove unneeded code.

Modified:
  stable/8/sys/geom/multipath/g_multipath.c
  stable/8/sys/geom/sched/g_sched.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/geom/multipath/g_multipath.c
==
--- stable/8/sys/geom/multipath/g_multipath.c   Wed May 11 04:48:03 2011
(r221755)
+++ stable/8/sys/geom/multipath/g_multipath.c   Wed May 11 04:53:56 2011
(r221756)
@@ -292,9 +292,6 @@ g_multipath_create(struct g_class *mp, s
}
 
gp = g_new_geomf(mp, md->md_name);
-   if (gp == NULL)
-   goto fail;
-
sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
gp->softc = sc;
gp->start = g_multipath_start;
@@ -304,21 +301,12 @@ g_multipath_create(struct g_class *mp, s
memcpy(sc->sc_name, md->md_name, sizeof (sc->sc_name));
 
pp = g_new_providerf(gp, "multipath/%s", md->md_name);
-   if (pp == NULL)
-   goto fail;
/* limit the provider to not have it stomp on metadata */
pp->mediasize = md->md_size - md->md_sectorsize;
pp->sectorsize = md->md_sectorsize;
sc->pp = pp;
g_error_provider(pp, 0);
return (gp);
-fail:
-   if (gp != NULL) {
-   if (gp->softc != NULL)
-   g_free(gp->softc);
-   g_destroy_geom(gp);
-   }
-   return (NULL);
 }
 
 static int
@@ -347,8 +335,6 @@ g_multipath_add_disk(struct g_geom *gp, 
}
nxtcp = LIST_FIRST(&gp->consumer);
cp = g_new_consumer(gp);
-   if (cp == NULL)
-   return (ENOMEM);
error = g_attach(cp, pp);
if (error != 0) {
printf("GEOM_MULTIPATH: cannot attach %s to %s",

Modified: stable/8/sys/geom/sched/g_sched.c
==
--- stable/8/sys/geom/sched/g_sched.c   Wed May 11 04:48:03 2011
(r221755)
+++ stable/8/sys/geom/sched/g_sched.c   Wed May 11 04:53:56 2011
(r221756)
@@ -1004,11 +1004,6 @@ g_sched_create(struct gctl_req *req, str
 
gp = g_new_geomf(mp, name);
dstgp = proxy ? pp->geom : gp; /* where do we link the provider */
-   if (gp == NULL) {
-   gctl_error(req, "Cannot create geom %s.", name);
-   error = ENOMEM;
-   goto fail;
-   }
 
sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
sc->sc_gsched = gsp;
@@ -1034,23 +1029,10 @@ g_sched_create(struct gctl_req *req, str
gp->dumpconf = g_sched_dumpconf;
 
newpp = g_new_providerf(dstgp, gp->name);
-   if (newpp == NULL) {
-   gctl_error(req, "Cannot create provider %s.", name);
-   error = ENOMEM;
-   goto fail;
-   }
-
newpp->mediasize = pp->mediasize;
newpp->sectorsize = pp->sectorsize;
 
cp = g_new_consumer(gp);
-   if (cp == NULL) {
-   gctl_error(req, "Cannot create consumer for %s.",
-   gp->name);
-   error = ENOMEM;
-   goto fail;
-   }
-
error = g_attach(cp, proxy ? newpp : pp);
if (error != 0) {
gctl_error(req, "Cannot attach to provider %s.",
@@ -1076,23 +1058,15 @@ fail:
g_detach(cp);
g_destroy_consumer(cp);
}
-
if (newpp != NULL)
g_destroy_provider(newpp);
-
-   if (sc && sc->sc_hash) {
+   if (sc->sc_hash)
g_sched_hash_fini(gp, sc->sc_hash, sc->sc_mask,
gsp, sc->sc_data);
-   }
-
-   if (sc && sc->sc_data)
+   if (sc->sc_data)
gsp->gs_fini(sc->sc_data);
-
-   if (gp != NULL) {
-   if (gp->softc != NULL)
-   g_free(gp->softc);
-   g_destroy_geom(gp);
-   }
+   g_free(gp->softc);
+   g_destroy_geom(gp);
 
return (error);
 }
___
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: r221757 - stable/8/sys/boot/common

2011-05-10 Thread Andriy Gapon
Author: avg
Date: Wed May 11 05:53:16 2011
New Revision: 221757
URL: http://svn.freebsd.org/changeset/base/221757

Log:
  MFC r221593,221601: whitespace nits

Modified:
  stable/8/sys/boot/common/interp.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/boot/common/interp.c
==
--- stable/8/sys/boot/common/interp.c   Wed May 11 04:53:56 2011
(r221756)
+++ stable/8/sys/boot/common/interp.c   Wed May 11 05:53:16 2011
(r221757)
@@ -105,7 +105,7 @@ interact(void)
 /*
  * Read our default configuration
  */
-if(include("/boot/loader.rc")!=CMD_OK)
+if (include("/boot/loader.rc") != CMD_OK)
include("/boot/boot.conf");
 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: r221758 - stable/7/sys/boot/common

2011-05-10 Thread Andriy Gapon
Author: avg
Date: Wed May 11 06:03:12 2011
New Revision: 221758
URL: http://svn.freebsd.org/changeset/base/221758

Log:
  MFC r221593,221601: whitespace nits

Modified:
  stable/7/sys/boot/common/interp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/common/interp.c
==
--- stable/7/sys/boot/common/interp.c   Wed May 11 05:53:16 2011
(r221757)
+++ stable/7/sys/boot/common/interp.c   Wed May 11 06:03:12 2011
(r221758)
@@ -105,7 +105,7 @@ interact(void)
 /*
  * Read our default configuration
  */
-if(include("/boot/loader.rc")!=CMD_OK)
+if (include("/boot/loader.rc") != CMD_OK)
include("/boot/boot.conf");
 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"