svn commit: r233729 - head/sys/kern

2012-03-31 Thread David Xu
Author: davidxu
Date: Sat Mar 31 06:48:41 2012
New Revision: 233729
URL: http://svn.freebsd.org/changeset/base/233729

Log:
  Remove stale comments.

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==
--- head/sys/kern/kern_umtx.c   Sat Mar 31 06:44:48 2012(r233728)
+++ head/sys/kern/kern_umtx.c   Sat Mar 31 06:48:41 2012(r233729)
@@ -1216,9 +1216,6 @@ do_lock_normal(struct thread *td, struct
 }
 
 /*
- * Lock PTHREAD_PRIO_NONE protocol POSIX mutex.
- */
-/*
  * Unlock PTHREAD_PRIO_NONE protocol POSIX mutex.
  */
 static int
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233733 - head/share/man/man4

2012-03-31 Thread Joel Dahl
Author: joel (doc committer)
Date: Sat Mar 31 07:08:35 2012
New Revision: 233733
URL: http://svn.freebsd.org/changeset/base/233733

Log:
  mdoc: use It for each item in the list and separate each cell with Ta.

Modified:
  head/share/man/man4/ahc.4

Modified: head/share/man/man4/ahc.4
==
--- head/share/man/man4/ahc.4   Sat Mar 31 06:58:16 2012(r233732)
+++ head/share/man/man4/ahc.4   Sat Mar 31 07:08:35 2012(r233733)
@@ -147,21 +147,21 @@ Note that wide and twin channel features
 by a particular chip, may be disabled in a particular motherboard or card
 design.
 .Bd -ragged -offset indent
-.Bl -column aic7770  10  EISA/VL   10MHz  16bit  SCBs  Features
-.Em Chip   MIPSBus  MaxSync   MaxWidth  SCBs  Features
-aic7770 10EISA/VL10MHz 16Bit 41
-aic7850 10PCI/32 10MHz  8Bit 3
-aic7860 10PCI/32 20MHz  8Bit 3
-aic7870 10PCI/32 10MHz 16Bit16
-aic7880 10PCI/32 20MHz 16Bit16
-aic7890 20PCI/32 40MHz 16Bit163 4 5 6 7 8
-aic7891 20PCI/64 40MHz 16Bit163 4 5 6 7 8
-aic7892 20PCI/64 80MHz 16Bit163 4 5 6 7 8
-aic7895 15PCI/32 20MHz 16Bit16  2 3 4 5
-aic7895C15PCI/32 20MHz 16Bit16  2 3 4 5 8
-aic7896 20PCI/32 40MHz 16Bit16  2 3 4 5 6 7 8
-aic7897 20PCI/64 40MHz 16Bit16  2 3 4 5 6 7 8
-aic7899 20PCI/64 80MHz 16Bit16  2 3 4 5 6 7 8
+.Bl -column aic7895CX MIPSX EISA/VLX MaxSyncX MaxWidthX SCBsX 2 3 
4 5 6 7 8X
+.It Em Chip Ta MIPS Ta Bus Ta MaxSync Ta MaxWidth Ta SCBs Ta 
Features
+.It aic7770 Ta 10 Ta EISA/VL Ta 10MHz Ta 16Bit Ta 4 Ta 1
+.It aic7850 Ta 10 Ta PCI/32 Ta 10MHz Ta 8Bit Ta 3 Ta 
+.It aic7860 Ta 10 Ta PCI/32 Ta 20MHz Ta 8Bit Ta 3 Ta 
+.It aic7870 Ta 10 Ta PCI/32 Ta 10MHz Ta 16Bit Ta 16 Ta 
+.It aic7880 Ta 10 Ta PCI/32 Ta 20MHz Ta 16Bit Ta 16 Ta 
+.It aic7890 Ta 20 Ta PCI/32 Ta 40MHz Ta 16Bit Ta 16 Ta 3 4 5 6 7 
8
+.It aic7891 Ta 20 Ta PCI/64 Ta 40MHz Ta 16Bit Ta 16 Ta 3 4 5 6 7 
8
+.It aic7892 Ta 20 Ta PCI/64 Ta 80MHz Ta 16Bit Ta 16 Ta 3 4 5 6 7 
8
+.It aic7895 Ta 15 Ta PCI/32 Ta 20MHz Ta 16Bit Ta 16 Ta 2 3 4 5
+.It aic7895C Ta 15 Ta PCI/32 Ta 20MHz Ta 16Bit Ta 16 Ta 2 3 4 5 8
+.It aic7896 Ta 20 Ta PCI/32 Ta 40MHz Ta 16Bit Ta 16 Ta 2 3 4 5 6 
7 8
+.It aic7897 Ta 20 Ta PCI/64 Ta 40MHz Ta 16Bit Ta 16 Ta 2 3 4 5 6 
7 8
+.It aic7899 Ta 20 Ta PCI/64 Ta 80MHz Ta 16Bit Ta 16 Ta 2 3 4 5 6 
7 8
 .El
 .Pp
 .Bl -enum -compact
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233734 - head/share/man/man9

2012-03-31 Thread Joel Dahl
Author: joel (doc committer)
Date: Sat Mar 31 07:10:16 2012
New Revision: 233734
URL: http://svn.freebsd.org/changeset/base/233734

Log:
  Remove end of line whitespace.

Modified:
  head/share/man/man9/ieee80211_crypto.9

Modified: head/share/man/man9/ieee80211_crypto.9
==
--- head/share/man/man9/ieee80211_crypto.9  Sat Mar 31 07:08:35 2012
(r233733)
+++ head/share/man/man9/ieee80211_crypto.9  Sat Mar 31 07:10:16 2012
(r233734)
@@ -127,7 +127,7 @@ driver is unable to provide necessary ha
 cipher modules register their services using
 .Fn ieee80211_crypto_register
 and supply a template that describes their operation.
-This 
+This
 .Vt ieee80211_cipher
 structure defines protocol-related state such as the number of bytes
 of space in the 802.11 header to reserve/remove during encap/decap
@@ -153,7 +153,7 @@ hardware.
 .Sh CRYPTO KEY MANAGEMENT
 The
 .Nm net80211
-layer implements a per-vap 4-element 
+layer implements a per-vap 4-element
 .Dq global key table
 and a per-station
 .Dq unicast key
@@ -235,7 +235,7 @@ to the driver that are already prepared 
 For receive, drivers mark frames with the
 .Dv M_WEP
 mbuf flag to indicate the hardware has decrypted the payload.
-If frames have the 
+If frames have the
 .Dv IEEE80211_FC1_WEP
 bit marked in their 802.11 header and are not tagged with
 .Dv M_WEP
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233745 - head/sys/netinet/ipfw

2012-03-31 Thread Gleb Smirnoff
Author: glebius
Date: Sat Mar 31 11:20:48 2012
New Revision: 233745
URL: http://svn.freebsd.org/changeset/base/233745

Log:
  Don't check malloc(M_WAITOK) results.

Modified:
  head/sys/netinet/ipfw/ip_fw_sockopt.c

Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c
==
--- head/sys/netinet/ipfw/ip_fw_sockopt.c   Sat Mar 31 10:47:40 2012
(r233744)
+++ head/sys/netinet/ipfw/ip_fw_sockopt.c   Sat Mar 31 11:20:48 2012
(r233745)
@@ -163,8 +163,6 @@ ipfw_add_rule(struct ip_fw_chain *chain,
 
l = RULESIZE(input_rule);
rule = malloc(l, M_IPFW, M_WAITOK | M_ZERO);
-   if (rule == NULL)
-   return (ENOSPC);
/* get_map returns with IPFW_UH_WLOCK if successful */
map = get_map(chain, 1, 0 /* not locked */);
if (map == NULL) {
@@ -1010,8 +1008,6 @@ ipfw_ctl(struct sockopt *sopt)
if (size = sopt-sopt_valsize)
break;
buf = malloc(size, M_TEMP, M_WAITOK);
-   if (buf == NULL)
-   break;
IPFW_UH_RLOCK(chain);
/* check again how much space we need */
want = chain-static_len + ipfw_dyn_len();
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233746 - head/sys/cam/scsi

2012-03-31 Thread Alexander Motin
Author: mav
Date: Sat Mar 31 11:23:09 2012
New Revision: 233746
URL: http://svn.freebsd.org/changeset/base/233746

Log:
  Be more conservative in using READ CAPACITY(16) command. Previous code
  checked PROTECT bit in INQUIRY data for all SPC devices, while it is defined
  only since SPC-3. But there are some SPC-2 USB devices were reported, that
  have PROTECT bit set, return no error for READ CAPACITY(16) command, but
  return wrong sector count value in response.
  
  MFC after:3 days

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Sat Mar 31 11:20:48 2012(r233745)
+++ head/sys/cam/scsi/scsi_da.c Sat Mar 31 11:23:09 2012(r233746)
@@ -1631,9 +1631,7 @@ daregister(struct cam_periph *periph, vo
softc-minimum_cmd_size = 16;
 
/* Predict whether device may support READ CAPACITY(16). */
-   if (SID_ANSI_REV(cgd-inq_data) = SCSI_REV_SPC3 ||
-   (SID_ANSI_REV(cgd-inq_data) = SCSI_REV_SPC 
-(cgd-inq_data.spc3_flags  SPC3_SID_PROTECT))) {
+   if (SID_ANSI_REV(cgd-inq_data) = SCSI_REV_SPC3) {
softc-flags |= DA_FLAG_CAN_RC16;
softc-state = DA_STATE_PROBE2;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233747 - head/sys/sparc64/sparc64

2012-03-31 Thread Marius Strobl
Author: marius
Date: Sat Mar 31 13:56:24 2012
New Revision: 233747
URL: http://svn.freebsd.org/changeset/base/233747

Log:
  Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086.
  Repored by:   David E. Cross
  
  MFC after:3 days

Modified:
  head/sys/sparc64/sparc64/trap.c

Modified: head/sys/sparc64/sparc64/trap.c
==
--- head/sys/sparc64/sparc64/trap.c Sat Mar 31 11:23:09 2012
(r233746)
+++ head/sys/sparc64/sparc64/trap.c Sat Mar 31 13:56:24 2012
(r233747)
@@ -215,6 +215,9 @@ static const int trap_sig[] = {
-1, /* kernel stack fault */
 };
 
+CTASSERT(sizeof(trap_msg) / sizeof(*trap_msg) == T_MAX);
+CTASSERT(sizeof(trap_sig) / sizeof(*trap_sig) == T_MAX);
+
 CTASSERT(sizeof(struct trapframe) == 256);
 
 int debugger_on_signal = 0;
@@ -298,7 +301,7 @@ trap(struct trapframe *tf)
sig = trap_cecc();
break;
default:
-   if (tf-tf_type  0 || tf-tf_type = T_MAX)
+   if (tf-tf_type  0 || tf-tf_type  T_MAX)
panic(trap: bad trap type %#lx (user),
tf-tf_type);
else if (trap_sig[tf-tf_type] == -1)
@@ -402,12 +405,10 @@ trap(struct trapframe *tf)
 
if (error != 0) {
tf-tf_type = ~T_KERNEL;
-   if (tf-tf_type  0 || tf-tf_type = T_MAX)
+   if (tf-tf_type  0 || tf-tf_type  T_MAX)
panic(trap: bad trap type %#lx (kernel),
tf-tf_type);
-   else if (trap_sig[tf-tf_type] == -1)
-   panic(trap: %s (kernel),
-   trap_msg[tf-tf_type]);
+   panic(trap: %s (kernel), trap_msg[tf-tf_type]);
}
}
CTR1(KTR_TRAP, trap: td=%p return, td);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233748 - head/sys/sparc64/sparc64

2012-03-31 Thread Marius Strobl
Author: marius
Date: Sat Mar 31 14:03:16 2012
New Revision: 233748
URL: http://svn.freebsd.org/changeset/base/233748

Log:
  Remove checks that are redundant due to tf_type being unsigned.
  
  MFC after:3 days

Modified:
  head/sys/sparc64/sparc64/trap.c

Modified: head/sys/sparc64/sparc64/trap.c
==
--- head/sys/sparc64/sparc64/trap.c Sat Mar 31 13:56:24 2012
(r233747)
+++ head/sys/sparc64/sparc64/trap.c Sat Mar 31 14:03:16 2012
(r233748)
@@ -301,7 +301,7 @@ trap(struct trapframe *tf)
sig = trap_cecc();
break;
default:
-   if (tf-tf_type  0 || tf-tf_type  T_MAX)
+   if (tf-tf_type  T_MAX)
panic(trap: bad trap type %#lx (user),
tf-tf_type);
else if (trap_sig[tf-tf_type] == -1)
@@ -405,7 +405,7 @@ trap(struct trapframe *tf)
 
if (error != 0) {
tf-tf_type = ~T_KERNEL;
-   if (tf-tf_type  0 || tf-tf_type  T_MAX)
+   if (tf-tf_type  T_MAX)
panic(trap: bad trap type %#lx (kernel),
tf-tf_type);
panic(trap: %s (kernel), trap_msg[tf-tf_type]);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r233749 - in head/gnu/lib: libstdc++ libsupc++

2012-03-31 Thread David Chisnall
Author: theraven
Date: Sat Mar 31 14:25:12 2012
New Revision: 233749
URL: http://svn.freebsd.org/changeset/base/233749

Log:
  Make libsupc++ build as a shared library and make libstdc++ a filter library
  for it.
  
  This allows people to swap out libsupc++ for libcxxrt easily, so we can begin
  the libstdc++ - libc++ migration.
  
  Approved by:  dim (mentor)

Added:
  head/gnu/lib/libsupc++/Version.map
 - copied, changed from r232970, 
head/contrib/libstdc++/config/abi/pre/gnu.ver
Modified:
  head/gnu/lib/libstdc++/Makefile
  head/gnu/lib/libsupc++/Makefile

Modified: head/gnu/lib/libstdc++/Makefile
==
--- head/gnu/lib/libstdc++/Makefile Sat Mar 31 14:03:16 2012
(r233748)
+++ head/gnu/lib/libstdc++/Makefile Sat Mar 31 14:25:12 2012
(r233749)
@@ -25,7 +25,7 @@ CXXFLAGS+=-fno-implicit-templates -ffun
 PO_CXXFLAGS=   ${CXXFLAGS:N-ffunction-sections}
 
 DPADD= ${LIBM}
-LDADD= -lm
+LDADD= -lm  -Wl,-f,libsupc++.so.1
 
 # libstdc++ sources
 SRCS+= bitmap_allocator.cc pool_allocator.cc \

Modified: head/gnu/lib/libsupc++/Makefile
==
--- head/gnu/lib/libsupc++/Makefile Sat Mar 31 14:03:16 2012
(r233748)
+++ head/gnu/lib/libsupc++/Makefile Sat Mar 31 14:25:12 2012
(r233749)
@@ -7,8 +7,8 @@ SRCDIR= ${.CURDIR}/../../../contrib/libs
 
 .PATH: ${SRCDIR} ${GCCLIB}/libiberty
 
-# Static only.
 LIB=   supc++
+SHLIB_MAJOR=1
 SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
@@ -36,4 +36,9 @@ unwind.h: ${GCCDIR}/unwind-generic.h
 SRCS+= unwind.h
 CLEANFILES+=   unwind.h
 
+# Symbol versioning
+
+VERSION_MAP=   ${.CURDIR}/Version.map
+
+
 .include bsd.lib.mk

Copied and modified: head/gnu/lib/libsupc++/Version.map (from r232970, 
head/contrib/libstdc++/config/abi/pre/gnu.ver)
==
--- head/contrib/libstdc++/config/abi/pre/gnu.ver   Wed Mar 14 14:34:14 
2012(r232970, copy source)
+++ head/gnu/lib/libsupc++/Version.map  Sat Mar 31 14:25:12 2012
(r233749)
@@ -19,676 +19,7 @@
 ## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 ## USA.
 
-GLIBCXX_3.4 {
-
-  global:
-
-# Names inside the 'extern' block are demangled names.
-extern C++
-{
-  std::[A-Za]*;
-# std::ba[a-r]*;
-  std::basic_[a-e]*;
-  std::basic_f[a-r]*;
-# std::basic_fstream;
-  std::basic_f[t-z]*;
-  std::basic_[g-h]*;
-  std::basic_i[a-e]*;
-# std::basic_ifstream;
-  std::basic_i[g-r]*;
-  std::basic_istr[a-d]*;
-# std::basic_istream;
-  std::basic_istr[f-z]*;
-  std::basic_i[t-z]*;
-  std::basic_[j-n]*;
-  std::basic_o[a-e]*;
-# std::basic_ofstream;
-# std::basic_o[g-z]*;
-  std::basic_o[g-r]*;
-  std::basic_ostr[a-d]*;
-  std::basic_ostr[f-z]*;
-  std::basic_[p-r]*;
-  std::basic_streambuf*;
-# std::basic_string
-# std::basic_stringbuf
-  std::basic_stringstream*;
-  std::basic_[t-z]*;
-  std::ba[t-z]*;
-  std::b[b-z]*;
-  std::c[a-g]*;
-# std::char_traits;
-  std::c[i-z]*;
-  std::[d-h]*;
-  std::i[a-n]*;
-  std::ios_base::[A-Ha-z]*;
-  std::ios_base::_M_grow_words*;
-  std::ios_base::_M_init*;
-  std::ios_base::Init::[A-Za-z]*;
-  std::ios_base::[J-Za-z]*;
-  std::i[p-r]*;
-# std::istream
-# std::istreambuf_iterator
-  std::istringstream*;
-  std::istrstream*;
-  std::i[t-z]*;
-  std::[A-Zj-k]*;
-  std::length_error*;
-  std::logic_error*;
-  std::locale::[A-Za-e]*;
-  std::locale::facet::[A-Za-z]*;
-  std::locale::facet::_S_get_c_locale*;
-  std::locale::facet::_S_clone_c_locale*;
-  std::locale::facet::_S_create_c_locale*;
-  std::locale::facet::_S_destroy_c_locale*;
-  std::locale::[A-Zg-h]*;
-  std::locale::id::[A-Za-z]*;
-  std::locale::id::_M_id*;
-  std::locale::[A-Zj-z]*;
-  std::locale::_[A-Ha-z]*;
-  std::locale::_Impl::[A-Za-z]*;
-# std::locale::_Impl::_M_[A-Za-z]*;
-  std::locale::_[J-Ra-z]*;
-  std::locale::_S_normalize_category*;
-  std::locale::_[T-Za-z]*;
-# std::[A-Zm-r]*;
-  std::[A-Zm]*;
-  std::n[^u]*;
-  std::nu[^m]*;
-  std::num[^e]*;
-  std::[p-r]*;
-  std::ostrstream*;
-  std::out_of_range*;
-  std::overflow_error*;
-  std::set_new_handler*;
-  std::set_terminate*;
-  std::set_unexpected*;
-# std::string
-  std::strstream*;
-  std::strstreambuf*;
-  std::[A-Zt-z]*;
-  std::_List_node_base::hook*;
-  std::_List_node_base::swap*;
-