svn commit: r269942 - head/lib/libc/gen

2014-08-13 Thread Sergey Kandaurov
Author: pluknet
Date: Wed Aug 13 14:49:51 2014
New Revision: 269942
URL: http://svnweb.freebsd.org/changeset/base/269942

Log:
  Fixed ENOMEM description.
  
  MFC after:1 week
  Sponsored by: Nginx, Inc.

Modified:
  head/lib/libc/gen/posix_spawnattr_init.3

Modified: head/lib/libc/gen/posix_spawnattr_init.3
==
--- head/lib/libc/gen/posix_spawnattr_init.3Wed Aug 13 12:58:15 2014
(r269941)
+++ head/lib/libc/gen/posix_spawnattr_init.3Wed Aug 13 14:49:51 2014
(r269942)
@@ -100,7 +100,7 @@ The
 function will fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insufficient memory exists to initialize the spawn file actions object.
+Insufficient memory exists to initialize the spawn attributes object.
 .El
 .Sh SEE ALSO
 .Xr posix_spawn 3 ,
___
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: r269945 - in head: lib/libc/net sys/conf sys/netinet

2014-08-13 Thread Michael Tuexen
Author: tuexen
Date: Wed Aug 13 15:50:16 2014
New Revision: 269945
URL: http://svnweb.freebsd.org/changeset/base/269945

Log:
  Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
  socket options. This includes managing the correspoing stat counters.
  Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
  counters on every stream. The default is off and only an aggregated
  counter is available. This is sufficient for the RTCWeb usecase.
  
  MFC after: 1 week

Modified:
  head/lib/libc/net/sctp_sys_calls.c
  head/sys/conf/options
  head/sys/netinet/sctp.h
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_structs.h
  head/sys/netinet/sctp_uio.h
  head/sys/netinet/sctp_usrreq.c
  head/sys/netinet/sctputil.c

Modified: head/lib/libc/net/sctp_sys_calls.c
==
--- head/lib/libc/net/sctp_sys_calls.c  Wed Aug 13 15:48:10 2014
(r269944)
+++ head/lib/libc/net/sctp_sys_calls.c  Wed Aug 13 15:50:16 2014
(r269945)
@@ -377,6 +377,12 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
case SCTP_ENABLE_STREAM_RESET:
((struct sctp_assoc_value *)arg)->assoc_id = id;
break;
+   case SCTP_PR_STREAM_STATUS:
+   ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id;
+   break;
+   case SCTP_PR_ASSOC_STATUS:
+   ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id;
+   break;
default:
break;
}

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Aug 13 15:48:10 2014(r269944)
+++ head/sys/conf/options   Wed Aug 13 15:50:16 2014(r269945)
@@ -457,6 +457,7 @@ SCTP_LTRACE_ERRORS  opt_sctp.h # Log to K
 SCTP_USE_PERCPU_STAT   opt_sctp.h # Use per cpu stats.
 SCTP_MCORE_INPUT   opt_sctp.h # Have multiple input threads for input mbufs
 SCTP_LOCAL_TRACE_BUF   opt_sctp.h # Use tracebuffer exported via sysctl
+SCTP_DETAILED_STR_STATSopt_sctp.h # Use per PR-SCTP policy stream stats
 #
 #
 #

Modified: head/sys/netinet/sctp.h
==
--- head/sys/netinet/sctp.h Wed Aug 13 15:48:10 2014(r269944)
+++ head/sys/netinet/sctp.h Wed Aug 13 15:50:16 2014(r269945)
@@ -140,6 +140,8 @@ struct sctp_paramhdr {
 #define SCTP_GET_ASSOC_NUMBER   0x0104 /* ro */
 #define SCTP_GET_ASSOC_ID_LIST  0x0105 /* ro */
 #define SCTP_TIMEOUTS   0x0106
+#define SCTP_PR_STREAM_STATUS   0x0107
+#define SCTP_PR_ASSOC_STATUS0x0108
 
 /*
  * user socket options: BSD implementation specific

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Wed Aug 13 15:48:10 2014
(r269944)
+++ head/sys/netinet/sctp_input.c   Wed Aug 13 15:50:16 2014
(r269945)
@@ -1469,6 +1469,11 @@ sctp_process_cookie_existing(struct mbuf
int spec_flag = 0;
uint32_t how_indx;
 
+#if defined(SCTP_DETAILED_STR_STATS)
+   int j;
+
+#endif
+
net = *netp;
/* I know that the TCB is non-NULL from the caller */
asoc = &stcb->asoc;
@@ -1931,6 +1936,15 @@ sctp_process_cookie_existing(struct mbuf
sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_LOCKED);
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
stcb->asoc.strmout[i].chunks_on_queues = 0;
+#if defined(SCTP_DETAILED_STR_STATS)
+   for (j = 0; j < SCTP_PR_SCTP_MAX + 1; j++) {
+   asoc->strmout[i].abandoned_sent[j] = 0;
+   asoc->strmout[i].abandoned_unsent[j] = 0;
+   }
+#else
+   asoc->strmout[i].abandoned_sent[0] = 0;
+   asoc->strmout[i].abandoned_unsent[0] = 0;
+#endif
stcb->asoc.strmout[i].stream_no = i;
stcb->asoc.strmout[i].next_sequence_send = 0;
stcb->asoc.strmout[i].last_msg_incomplete = 0;

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Wed Aug 13 15:48:10 2014
(r269944)
+++ head/sys/netinet/sctp_output.c  Wed Aug 13 15:50:16 2014
(r269945)
@@ -3618,6 +3618,11 @@ sctp_process_cmsgs_for_init(struct sctp_
struct sctp_stream_out *tmp_str;
unsigned int i;
 
+#if defined(SCTP_DETAILED_STR_STATS)
+   int j;
+
+#endif
+
/* Default is NOT correct */
   

svn commit: r269948 - head/contrib/gcc/config/i386

2014-08-13 Thread Dimitry Andric
Author: dim
Date: Wed Aug 13 16:42:44 2014
New Revision: 269948
URL: http://svnweb.freebsd.org/changeset/base/269948

Log:
  Supplement r259111 by also using correct casts in gcc's emmintrin.h for
  the first argument of the following builtin function:
  
  * __builtin_ia32_psrlqi128() takes __v2di instead of __v4si
  
  This should fix the following errors when building the graphics/webp
  port with base gcc:
  
  lossless_sse2.c:403: error: incompatible type for argument 1 of 
'__builtin_ia32_psrlqi128'
  lossless_sse2.c:404: error: incompatible type for argument 1 of 
'__builtin_ia32_psrlqi128'
  
  Reported by:  Jos Chrispijn 
  MFC after:3 days

Modified:
  head/contrib/gcc/config/i386/emmintrin.h

Modified: head/contrib/gcc/config/i386/emmintrin.h
==
--- head/contrib/gcc/config/i386/emmintrin.hWed Aug 13 16:20:41 2014
(r269947)
+++ head/contrib/gcc/config/i386/emmintrin.hWed Aug 13 16:42:44 2014
(r269948)
@@ -1193,7 +1193,7 @@ _mm_srli_epi64 (__m128i __A, int __B)
 #define _mm_srli_epi32(__A, __B) \
   ((__m128i)__builtin_ia32_psrldi128 ((__v4si)(__A), __B))
 #define _mm_srli_epi64(__A, __B) \
-  ((__m128i)__builtin_ia32_psrlqi128 ((__v4si)(__A), __B))
+  ((__m128i)__builtin_ia32_psrlqi128 ((__v2di)(__A), __B))
 #endif
 
 static __inline __m128i __attribute__((__always_inline__))
___
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: r269950 - head/share/vt/keymaps

2014-08-13 Thread Ed Maste
Author: emaste
Date: Wed Aug 13 19:06:29 2014
New Revision: 269950
URL: http://svnweb.freebsd.org/changeset/base/269950

Log:
  Copy country-code .iso syscons keymaps for vt(4)
  
  Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without
  change as Unicode keymaps for vt(4).
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/share/vt/keymaps/be.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/be.iso.kbd
  head/share/vt/keymaps/fr.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/fr.iso.kbd
  head/share/vt/keymaps/hr.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/hr.iso.kbd
  head/share/vt/keymaps/it.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/it.iso.kbd
  head/share/vt/keymaps/pt.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/pt.iso.kbd
  head/share/vt/keymaps/si.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/si.iso.kbd
  head/share/vt/keymaps/uk.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/uk.iso.kbd
  head/share/vt/keymaps/us.kbd
 - copied unchanged from r269585, head/share/syscons/keymaps/us.iso.kbd
Modified:
  head/share/vt/keymaps/Makefile

Modified: head/share/vt/keymaps/Makefile
==
--- head/share/vt/keymaps/Makefile  Wed Aug 13 16:53:12 2014
(r269949)
+++ head/share/vt/keymaps/Makefile  Wed Aug 13 19:06:29 2014
(r269950)
@@ -1,6 +1,16 @@
 # $FreeBSD$
 
-FILES= pl.kbd ua.kbd ua.shift.alt.kbd
+FILES= be.kbd \
+   fr.kbd \
+   hr.kbd \
+   it.kbd \
+   pl.kbd \
+   pt.kbd \
+   si.kbd \
+   ua.kbd \
+   ua.shift.alt.kbd \
+   uk.kbd \
+   us.kbd
 
 FILESDIR= ${SHAREDIR}/vt/keymaps
 

Copied: head/share/vt/keymaps/be.kbd (from r269585, 
head/share/syscons/keymaps/be.iso.kbd)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/vt/keymaps/be.kbdWed Aug 13 19:06:29 2014
(r269950, copy of r269585, head/share/syscons/keymaps/be.iso.kbd)
@@ -0,0 +1,114 @@
+# $FreeBSD$
+# alt
+# scan   cntrl  altalt   cntrl lock
+# code  base   shift  cntrl  shift  altshift  cntrl  shift state
+# --
+  000   nopnopnopnopnopnopnopnop O
+  001   escescescescescescdebug  esc O
+  002   '&''1'nopnop'|''|'nopnop O
+  003   233'2'nulnul'@''@'nulnul O
+  004   '"''3'nopnop'#''#'nopnop O
+  005   ''''4'nopnop''''4'nopnop O
+  006   '(''5'nopnop'(''5'nopnop O
+  007   167'6'rs rs '^''^'rs rs  O
+  008   232'7'nopnop232'7'nopnop O
+  009   '!''8'nopnop'!''8'nopnop O
+  010   231'9'nopnop'{''{'nopnop O
+  011   224'0'nopnop'}''}'nopnop O
+  012   ')'176nopnop')'176nopnop O
+  013   '-''_'us us '-''_'us us  O
+  014   bs bs deldelbs bs deldel O
+  015   ht btab   nopnopht btab   nopnop O
+  016   'a''A'sohsoh'a''A'sohsoh C
+  017   'z''Z'subsub'z''Z'subsub C
+  018   'e''E'enqenq164'E'enqenq C
+  019   'r''R'dc2dc2'r''R'dc2dc2 C
+  020   't''T'dc4dc4't''T'dc4dc4 C
+  021   'y''Y'em em 'y''Y'em em  C
+  022   'u''U'naknak'u''U'naknak C
+  023   'i''I'ht ht 'i''I'ht ht  C
+  024   'o''O'si si 'o''O'si si  C
+  025   'p''P'dledle'p''P'dledle C
+  026   '^'168escesc'[''['escesc O
+  027   '$''*'gs gs ']'']'gs gs  O
+  028   cr cr nl nl cr cr nl nl  O
+  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
+  030   'q''Q'dc1dc1'q''Q'dc1dc1 C
+  031   's''S'dc3dc3's''S'dc3dc3 C
+  032   'd''D'eoteot'd''D'eoteot C
+  033   'f''F'ackack'f''F'ackack C
+  034   'g''G'belbel'g''G'belbel C
+  035   'h''H'bs bs 'h''H'bs bs  C
+  036   'j''J'nl nl 'j

svn commit: r269951 - in head: share/mk tools/tools/ath/athaggrstats tools/tools/ath/athstats

2014-08-13 Thread Adrian Chadd
Author: adrian
Date: Wed Aug 13 19:43:22 2014
New Revision: 269951
URL: http://svnweb.freebsd.org/changeset/base/269951

Log:
  Make the libbsdstat useful again.

Modified:
  head/share/mk/src.libnames.mk
  head/tools/tools/ath/athaggrstats/Makefile
  head/tools/tools/ath/athstats/Makefile

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Wed Aug 13 19:06:29 2014
(r269950)
+++ head/share/mk/src.libnames.mk   Wed Aug 13 19:43:22 2014
(r269951)
@@ -17,6 +17,10 @@ LIBATF_CXXDIR=   ${ROOTOBJDIR}/lib/atf/lib
 LDATF_CXX?=${LIBATF_CXXDIR}/libatf-c++.so
 LIBATF_CXX?=   ${LIBATF_CXXDIR}/libatf-c++.a
 
+LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat
+LDBSDSTAT?=${LIBBSDSTATDIR}/libbsdstat.so
+LIBBSDSTAT?=   ${LIBBSDSTATDIR}/libbsdstat.a
+
 LIBHEIMIPCCDIR=${ROOTOBJDIR}/kerberos5/lib/libheimipcc
 LDHEIMIPCC?=   ${LIBHEIMIPCCDIR}/libheimipcc.so
 LIBHEIMIPCC?=  ${LIBHEIMIPCCDIR}/libheimipcc.a

Modified: head/tools/tools/ath/athaggrstats/Makefile
==
--- head/tools/tools/ath/athaggrstats/Makefile  Wed Aug 13 19:06:29 2014
(r269950)
+++ head/tools/tools/ath/athaggrstats/Makefile  Wed Aug 13 19:43:22 2014
(r269951)
@@ -12,8 +12,8 @@ CLEANFILES+=  opt_ah.h
 
 CFLAGS+=-DATH_SUPPORT_ANI
 CFLAGS+=-DATH_SUPPORT_TDMA
-USEPRIVATELIB=
-LDADD=-lbsdstat
+USEPRIVATELIB=bsdstat
+LDADD= ${LDBSDSTAT}
 
 opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h

Modified: head/tools/tools/ath/athstats/Makefile
==
--- head/tools/tools/ath/athstats/Makefile  Wed Aug 13 19:06:29 2014
(r269950)
+++ head/tools/tools/ath/athstats/Makefile  Wed Aug 13 19:43:22 2014
(r269951)
@@ -23,8 +23,9 @@ CFLAGS+=-DATH_SUPPORT_TDMA
 
 CFLAGS.clang+= -fbracket-depth=512
 
-USEPRIVATELIB=
-LDADD= -lbsdstat
+USEPRIVATELIB= bsdstat
+
+LDADD= ${LDBSDSTAT}
 
 opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h
___
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: r269952 - head/share/vt/keymaps

2014-08-13 Thread Ed Maste
Author: emaste
Date: Wed Aug 13 19:55:14 2014
New Revision: 269952
URL: http://svnweb.freebsd.org/changeset/base/269952

Log:
  Remove trailing whitespace

Modified:
  head/share/vt/keymaps/it.kbd

Modified: head/share/vt/keymaps/it.kbd
==
--- head/share/vt/keymaps/it.kbdWed Aug 13 19:43:22 2014
(r269951)
+++ head/share/vt/keymaps/it.kbdWed Aug 13 19:55:14 2014
(r269952)
@@ -4,12 +4,12 @@
 #
 # -- ~: SHIFT + ALT + a accentata
 # -- {: SHIFT + [
-# : ALT + 7  
+# : ALT + 7
 # -- }: SHIFT + ]
 # : ALT + 0
-# -- [: definita anche come ALT + 8 
-# -- ]: definita anche come ALT + 9 
-# -- `: ALT +  ' 
+# -- [: definita anche come ALT + 8
+# -- ]: definita anche come ALT + 9
+# -- `: ALT +  '
 # : CTRL + '
 #
 # Per usare la mappatura dare i seguenti comandi:
@@ -20,8 +20,8 @@
 #  setenv MM_CHARSET iso-8859-15
 #  setenv TERM cons25l1
 #
-# Per l'utilizzo della stessa in modo permanente e/o  
-# per eventuali note su specifiche applicazioni: 
+# Per l'utilizzo della stessa in modo permanente e/o
+# per eventuali note su specifiche applicazioni:
 # Gruppo utenti FreeBSD Italia - http://www.gufi.org
 # Gianmarco Home Page - http://www.gufi.org/~gmarco
 #
@@ -32,7 +32,7 @@
 #   Nicola Vitale 
 #   Marco Trentini 
 #
- 
+
 # alt
 # scan   cntrl  altalt   cntrl lock
 # code  base   shift  cntrl  shift  altshift  cntrl  shift state
@@ -77,7 +77,7 @@
   037   'k''K'vt vt 'k''&'vt vt  C
   038   'l''L'ff ff 'l''L'ff ff  C
   039   242231nopnop'@'ddac   nopnop O
-  040   224176nopdrin   '#''~'nopdtilO  
+  040   224176nopdrin   '#''~'nopdtilO
   041   '\''|'fs nop172nopnopnop O
   042   lshift lshift lshift lshift lshift lshift lshift lshift  O
   043   249167fs dgra   fs fs fs dbreO
@@ -146,22 +146,22 @@
   106   fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63  O
   107   fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64  O
 
-  dgra  '`'  ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) 
- ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) 
+  dgra  '`'  ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 )
+ ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 )
  ( 'u' 249 ) ( 'U' 217 )
-  dacu  '''  ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) 
- ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) 
- ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) 
-  dcir  '^'  ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) 
- ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) 
+  dacu  '''  ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 )
+ ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 )
+ ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 )
+  dcir  '^'  ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 )
+ ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 )
  ( 'u' 251 ) ( 'U' 219 )
-  dtil  '~'  ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) 
+  dtil  '~'  ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 )
  ( 'o' 245 ) ( 'O' 213 )
   dmac  175
   dbre  000
   ddot  000
-  duml  168  ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) 
- ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) 
+  duml  168  ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 )
+ ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 )
  ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 )
   dsla  000
   drin  176  ( 'a' 229 ) ( 'A' 197 )
___
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: r269953 - head/sbin/newfs_msdos

2014-08-13 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Aug 13 21:18:31 2014
New Revision: 269953
URL: http://svnweb.freebsd.org/changeset/base/269953

Log:
  Use "NO NAME" as the default unnamed label.
  
  Microsoft recommends avoiding the use of spaces in the
  string structures for FAT. Unfortunately they do just
  that by default in the case of unlabeled filesystems.
  
  Follow the default MS behavior to avoid confusion in
  common tools like file(1). This was actually the
  default behavior before r203868.
  
  Obtained from:NetBSD (CVS rev. 1.39)
  MFC after:3 days

Modified:
  head/sbin/newfs_msdos/newfs_msdos.c

Modified: head/sbin/newfs_msdos/newfs_msdos.c
==
--- head/sbin/newfs_msdos/newfs_msdos.c Wed Aug 13 19:55:14 2014
(r269952)
+++ head/sbin/newfs_msdos/newfs_msdos.c Wed Aug 13 21:18:31 2014
(r269953)
@@ -689,7 +689,7 @@ main(int argc, char *argv[])
 ((u_int)tm->tm_hour << 8 |
  (u_int)tm->tm_min));
mk4(bsx->exVolumeID, x);
-   mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO_NAME");
+   mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO NAME");
sprintf(buf, "FAT%u", fat);
setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType));
if (!opt_B) {
___
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: r269954 - in head/lib/clang/include: clang/Config llvm/Config

2014-08-13 Thread Dimitry Andric
Author: dim
Date: Wed Aug 13 21:38:29 2014
New Revision: 269954
URL: http://svnweb.freebsd.org/changeset/base/269954

Log:
  Stop telling people to directly report llvm or clang bugs upstream,
  point them to the FreeBSD bug tracker instead, since we use our own
  patches.
  
  MFC after:3 days

Modified:
  head/lib/clang/include/clang/Config/config.h
  head/lib/clang/include/llvm/Config/config.h

Modified: head/lib/clang/include/clang/Config/config.h
==
--- head/lib/clang/include/clang/Config/config.hWed Aug 13 21:18:31 
2014(r269953)
+++ head/lib/clang/include/clang/Config/config.hWed Aug 13 21:38:29 
2014(r269954)
@@ -6,7 +6,7 @@
 #define CONFIG_H
 
 /* Bug report URL. */
-#define BUG_REPORT_URL "http://llvm.org/bugs/";
+#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/";
 
 /* Relative directory for resource files */
 #define CLANG_RESOURCE_DIR ""

Modified: head/lib/clang/include/llvm/Config/config.h
==
--- head/lib/clang/include/llvm/Config/config.h Wed Aug 13 21:18:31 2014
(r269953)
+++ head/lib/clang/include/llvm/Config/config.h Wed Aug 13 21:38:29 2014
(r269954)
@@ -9,7 +9,7 @@
 #include 
 
 /* Bug report URL. */
-#define BUG_REPORT_URL "http://llvm.org/bugs/";
+#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/";
 
 /* Define if we have libxml2 */
 /* #undef CLANG_HAVE_LIBXML */
___
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: r269956 - in head: lib/libc/arm/aeabi lib/msun/arm sys/arm/arm sys/arm/include

2014-08-13 Thread Warner Losh
Author: imp
Date: Thu Aug 14 04:20:13 2014
New Revision: 269956
URL: http://svnweb.freebsd.org/changeset/base/269956

Log:
  From https://sourceware.org/ml/newlib/2014/msg00113.html
  By Richard Earnshaw at ARM
  >
  >GCC has for a number of years provides a set of pre-defined macros for
  >use with determining the ISA and features of the target during
  >pre-processing.  However, the design was always somewhat cumbersome in
  >that each new architecture revision created a new define and then
  >removed the previous one.  This meant that it was necessary to keep
  >updating the support code simply to recognise a new architecture being
  >added.
  >
  >The ACLE specification (ARM C Language Extentions)
  
>(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)
  >provides a much more suitable interface and GCC has supported this
  >since gcc-4.8.
  >
  >This patch makes use of the ACLE pre-defines to map to the internal
  >feature definitions.  To support older versions of GCC a compatibility
  >header is provided that maps the traditional pre-defines onto the new
  >ACLE ones.
  
  Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the
  couple of places in tree. clang already implements ACLE. Add a define
  that says we implement version 1.1, even though the implementation
  isn't quite complete.

Added:
  head/sys/arm/include/acle-compat.h   (contents, props changed)
Modified:
  head/lib/libc/arm/aeabi/aeabi_vfp.h
  head/lib/msun/arm/fenv.c
  head/sys/arm/arm/disassem.c
  head/sys/arm/include/param.h

Modified: head/lib/libc/arm/aeabi/aeabi_vfp.h
==
--- head/lib/libc/arm/aeabi/aeabi_vfp.h Wed Aug 13 22:34:14 2014
(r269955)
+++ head/lib/libc/arm/aeabi/aeabi_vfp.h Thu Aug 14 04:20:13 2014
(r269956)
@@ -30,6 +30,8 @@
 #ifndef AEABI_VFP_H
 #defineAEABI_VFP_H
 
+#include 
+
 /*
  * ASM helper macros. These allow the functions to be changed depending on
  * the endian-ness we are building for.
@@ -49,7 +51,7 @@
  * point falue. They will load the data from an ARM to a VFP register(s),
  * or from a VFP to an ARM register
  */
-#ifdef __ARMEB__
+#ifdef __ARM_BIG_ENDIAN
 #defineLOAD_DREG(vreg, reg0, reg1)   vmov vreg, reg1, reg0
 #defineUNLOAD_DREG(reg0, reg1, vreg) vmov reg1, reg0, vreg
 #else
@@ -65,7 +67,7 @@
  * C Helper macros
  */
 
-#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6)
+#if __ARM_ARCH >= 6
 /*
  * Generate a function that will either call into the VFP implementation,
  * or the soft float version for a given __aeabi_* helper. The function

Modified: head/lib/msun/arm/fenv.c
==
--- head/lib/msun/arm/fenv.cWed Aug 13 22:34:14 2014(r269955)
+++ head/lib/msun/arm/fenv.cThu Aug 14 04:20:13 2014(r269956)
@@ -30,7 +30,9 @@
 #define__fenv_static
 #include "fenv.h"
 
-#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6)
+#include 
+
+#if __ARM_ARCH >= 6
 #define FENV_ARMv6
 #endif
 

Modified: head/sys/arm/arm/disassem.c
==
--- head/sys/arm/arm/disassem.c Wed Aug 13 22:34:14 2014(r269955)
+++ head/sys/arm/arm/disassem.c Thu Aug 14 04:20:13 2014(r269956)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /*
@@ -130,7 +131,7 @@ static const struct arm32_insn arm32_i[]
 { 0x0c50, 0x0410, "ldr",   "daW" },
 { 0x0c50, 0x0440, "strb",  "daW" },
 { 0x0c50, 0x0450, "ldrb",  "daW" },
-#if defined(__FreeBSD_ARCH_armv6__)  || (defined(__ARM_ARCH) && __ARM_ARCH >= 
6)
+#if __ARM_ARCH >= 6
 { 0x, 0xf57ff01f, "clrex", "c" },
 { 0x0ff00ff0, 0x01800f90, "strex", "dmo" },
 { 0x0ff00fff, 0x01900f9f, "ldrex", "do" },

Added: head/sys/arm/include/acle-compat.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/include/acle-compat.h  Thu Aug 14 04:20:13 2014
(r269956)
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2014 ARM Ltd
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *products derived from this software without specific prior wr

svn commit: r269960 - head/sys/arm/at91

2014-08-13 Thread Warner Losh
Author: imp
Date: Thu Aug 14 04:21:31 2014
New Revision: 269960
URL: http://svnweb.freebsd.org/changeset/base/269960

Log:
  Add AIC to at91sam9260 support, now that it is needed for multipass to
  work. This gets my AT91SAM9260-based boards almost booting with
  current in multi pass. The MCI driver is broken, but it is equally
  broken before multi-pass.

Modified:
  head/sys/arm/at91/at91.c
  head/sys/arm/at91/at91sam9260.c
  head/sys/arm/at91/at91sam9260reg.h

Modified: head/sys/arm/at91/at91.c
==
--- head/sys/arm/at91/at91.cThu Aug 14 04:21:25 2014(r269959)
+++ head/sys/arm/at91/at91.cThu Aug 14 04:21:31 2014(r269960)
@@ -255,7 +255,7 @@ at91_cpu_add_builtin_children(device_t d
 {
int i;
 
-   for (i = 1; walker->name; i++, walker++) {
+   for (i = 0; walker->name; i++, walker++) {
at91_add_child(dev, i, walker->name, walker->unit,
walker->mem_base, walker->mem_len, walker->irq0,
walker->irq1, walker->irq2);

Modified: head/sys/arm/at91/at91sam9260.c
==
--- head/sys/arm/at91/at91sam9260.c Thu Aug 14 04:21:25 2014
(r269959)
+++ head/sys/arm/at91/at91sam9260.c Thu Aug 14 04:21:31 2014
(r269960)
@@ -103,6 +103,7 @@ static const uint32_t at91_pio_base[] = 
 
 static const struct cpu_devs at91_devs[] =
 {
+   DEVICE("at91_aic", AIC,  0),
DEVICE("at91_pmc", PMC,  0),
DEVICE("at91_wdt", WDT,  0),
DEVICE("at91_rst", RSTC, 0),

Modified: head/sys/arm/at91/at91sam9260reg.h
==
--- head/sys/arm/at91/at91sam9260reg.h  Thu Aug 14 04:21:25 2014
(r269959)
+++ head/sys/arm/at91/at91sam9260reg.h  Thu Aug 14 04:21:31 2014
(r269960)
@@ -220,6 +220,7 @@
 #define AT91SAM9260_IRQ_RSTC   AT91SAM9260_IRQ_SYSTEM
 #define AT91SAM9260_IRQ_OHCI   AT91SAM9260_IRQ_UHP
 #define AT91SAM9260_IRQ_NAND   (-1)
+#define AT91SAM9260_IRQ_AIC(-1)
 
 #define AT91SAM9260_AIC_BASE   0x000
 #define AT91SAM9260_AIC_SIZE   0x200
___
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: r269957 - in head/sys: arm/at91 conf

2014-08-13 Thread Warner Losh
Author: imp
Date: Thu Aug 14 04:21:14 2014
New Revision: 269957
URL: http://svnweb.freebsd.org/changeset/base/269957

Log:
  Add support for FDT and !FDT configs on Atmel, though FDT isn't
  working yet.
  Bump rev on arm Makefile since files.at91 uses new '!' operator.

Modified:
  head/sys/arm/at91/files.at91
  head/sys/conf/Makefile.arm

Modified: head/sys/arm/at91/files.at91
==
--- head/sys/arm/at91/files.at91Thu Aug 14 04:20:13 2014
(r269956)
+++ head/sys/arm/at91/files.at91Thu Aug 14 04:21:14 2014
(r269957)
@@ -3,28 +3,34 @@ arm/arm/cpufunc_asm_arm9.Sstandard
 arm/at91/at91_machdep.cstandard
 arm/at91/at91_aic.cstandard
 arm/at91/at91.cstandard
-arm/at91/at91_cfata.c  optionalat91_cfata
-arm/at91/at91_mci.coptionalat91_mci
-dev/nand/nfc_at91.coptionalnand
+arm/at91/at91_aic.cstandard
 arm/at91/at91_pio.cstandard
 arm/at91/at91_pmc.cstandard
+arm/at91/at91_smc.cstandard
+arm/at91/at91_cfata.c  optionalat91_cfata
+arm/at91/at91_common.c optionalfdt
+arm/at91/at91_mci.coptionalat91_mci
+arm/at91/at91_pinctrl.coptionalfdt
 arm/at91/at91_pit.coptionalat91sam9
 arm/at91/at91_reset.S  optionalat91sam9
 arm/at91/at91_rst.coptionalat91sam9
 arm/at91/at91_rtc.coptionalat91_rtc
-arm/at91/at91_smc.cstandard
+arm/at91/at91_sdramc.c optionalfdt
+arm/at91/at91_shdwc.c  optionalfdt
 arm/at91/at91_spi.coptionalat91_spi\
dependency  "spibus_if.h"
 arm/at91/at91_ssc.coptionalat91_ssc
 arm/at91/at91_st.c optionalat91rm9200
-arm/at91/at91_tc.c optionalat91_tc
+arm/at91/at91_tcb.coptionalfdt
 arm/at91/at91_twi.coptionalat91_twi
 arm/at91/at91_wdt.coptionalat91_wdt
 arm/at91/if_ate.c  optionalate
 arm/at91/if_macb.c optionalmacb
-arm/at91/uart_bus_at91usart.c  optionaluart
-arm/at91/uart_cpu_at91usart.c  optionaluart
+arm/at91/uart_bus_at91usart.c  optionaluart ! fdt
+arm/at91/uart_cpu_at91usart.c  optionaluart ! fdt
 arm/at91/uart_dev_at91usart.c  optionaluart
+dev/uart/uart_cpu_fdt.coptionaluart fdt
+dev/nand/nfc_at91.coptionalnand
 #
 # All the "systems on a chip" we support
 #
@@ -54,5 +60,7 @@ arm/at91/board_tsc4370.c  optionalat91_b
 # usb
 #
 dev/usb/controller/at91dci.c   optionalat91_dci
-dev/usb/controller/at91dci_atmelarm.c  optionalat91_dci
-dev/usb/controller/ohci_atmelarm.c optionalohci
+dev/usb/controller/at91dci_atmelarm.c  optionalat91_dci !fdt
+dev/usb/controller/ohci_atmelarm.c optionalohci !fdt
+dev/usb/controller/at91dci_fdt.c   optionalat91_dci fdt
+dev/usb/controller/ohci_fdt.c  optionalohci fdt

Modified: head/sys/conf/Makefile.arm
==
--- head/sys/conf/Makefile.arm  Thu Aug 14 04:20:13 2014(r269956)
+++ head/sys/conf/Makefile.arm  Thu Aug 14 04:21:14 2014(r269957)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  600013
 
 STD8X16FONT?=  iso
 
___
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: r269958 - head/sys/arm/at91

2014-08-13 Thread Warner Losh
Author: imp
Date: Thu Aug 14 04:21:20 2014
New Revision: 269958
URL: http://svnweb.freebsd.org/changeset/base/269958

Log:
  Start to add FDT support.

Added:
  head/sys/arm/at91/at91_common.c   (contents, props changed)
Modified:
  head/sys/arm/at91/at91_machdep.c

Added: head/sys/arm/at91/at91_common.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/at91/at91_common.c Thu Aug 14 04:21:20 2014
(r269958)
@@ -0,0 +1,90 @@
+#include 
+__FBSDID("$FreeBSD$");
+
+#define _ARM32_BUS_DMA_PRIVATE
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+extern const struct arm_devmap_entry at91_devmap[];
+extern struct bus_space at91_bs_tag;
+bus_space_tag_t fdtbus_bs_tag = &at91_bs_tag;
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+   { NULL, NULL }
+};
+
+static int
+fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
+int *pol)
+{
+   int offset;
+
+   if (fdt_is_compatible(node, "atmel,at91rm9200-aic"))
+   offset = 0;
+   else
+   return (ENXIO);
+
+   *interrupt = fdt32_to_cpu(intr[0]) + offset;
+   *trig = INTR_TRIGGER_CONFORM;
+   *pol = INTR_POLARITY_CONFORM;
+
+   return (0);
+}
+
+fdt_pic_decode_t fdt_pic_table[] = {
+   &fdt_aic_decode_ic,
+   NULL
+};
+
+static void
+at91_eoi(void *unused)
+{
+   uint32_t *eoicr = (uint32_t *)(0xd000 + IC_EOICR);
+
+   *eoicr = 0;
+}
+
+
+vm_offset_t
+initarm_lastaddr(void)
+{
+
+   return (arm_devmap_lastaddr());
+}
+
+void
+initarm_early_init(void)
+{
+
+   arm_post_filter = at91_eoi;
+   at91_soc_id();
+   arm_devmap_register_table(at91_devmap);
+}
+
+int
+initarm_devmap_init(void)
+{
+
+// arm_devmap_add_entry(0xfff0, 0x0010); /* 1MB - uart, aic and 
timers*/
+
+   return (0);
+}
+
+void
+initarm_gpio_init(void)
+{
+}
+
+void
+initarm_late_init(void)
+{
+}

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cThu Aug 14 04:21:14 2014
(r269957)
+++ head/sys/arm/at91/at91_machdep.cThu Aug 14 04:21:20 2014
(r269958)
@@ -43,6 +43,8 @@
  * Created  : 17/09/94
  */
 
+#include "opt_platform.h"
+
 #include 
 __FBSDID("$FreeBSD$");
 
@@ -111,8 +113,12 @@ __FBSDID("$FreeBSD$");
 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
 #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
 
+extern struct bus_space at91_bs_tag;
+
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
+uint32_t at91_master_clock;
+
 /* Static device mappings. */
 const struct arm_devmap_entry at91_devmap[] = {
/*
@@ -194,15 +200,6 @@ const struct arm_devmap_entry at91_devma
{ 0, 0, 0, 0, 0, }
 };
 
-/* Physical and virtual addresses for some global pages */
-
-struct pv_addr systempage;
-struct pv_addr msgbufpv;
-struct pv_addr irqstack;
-struct pv_addr undstack;
-struct pv_addr abtstack;
-struct pv_addr kernelstack;
-
 #ifdef LINUX_BOOT_ABI
 extern int membanks;
 extern int memstart[];
@@ -444,6 +441,16 @@ board_init(void)
 }
 #endif
 
+#ifndef FDT
+/* Physical and virtual addresses for some global pages */
+
+struct pv_addr msgbufpv;
+struct pv_addr kernelstack;
+struct pv_addr systempage;
+struct pv_addr irqstack;
+struct pv_addr abtstack;
+struct pv_addr undstack;
+
 void *
 initarm(struct arm_boot_params *abp)
 {
@@ -651,6 +658,7 @@ initarm(struct arm_boot_params *abp)
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
sizeof(struct pcb)));
 }
+#endif
 
 /*
  * These functions are handled elsewhere, so make them nops here.
___
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: r269959 - in head/sys/arm: arm at91

2014-08-13 Thread Warner Losh
Author: imp
Date: Thu Aug 14 04:21:25 2014
New Revision: 269959
URL: http://svnweb.freebsd.org/changeset/base/269959

Log:
  Add support for multipass to Atmel, for both FDT and !FDT cases.

Modified:
  head/sys/arm/arm/nexus.c
  head/sys/arm/at91/at91_aic.c
  head/sys/arm/at91/at91_pit.c
  head/sys/arm/at91/at91_pmc.c
  head/sys/arm/at91/std.atmel

Modified: head/sys/arm/arm/nexus.c
==
--- head/sys/arm/arm/nexus.cThu Aug 14 04:21:20 2014(r269958)
+++ head/sys/arm/arm/nexus.cThu Aug 14 04:21:25 2014(r269959)
@@ -362,4 +362,3 @@ nexus_ofw_map_intr(device_t dev, device_
return (interrupt);
 }
 #endif
- 

Modified: head/sys/arm/at91/at91_aic.c
==
--- head/sys/arm/at91/at91_aic.cThu Aug 14 04:21:20 2014
(r269958)
+++ head/sys/arm/at91/at91_aic.cThu Aug 14 04:21:25 2014
(r269959)
@@ -176,13 +176,9 @@ static driver_t at91_aic_driver = {
 static devclass_t at91_aic_devclass;
 
 #ifdef FDT
-DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass, NULL,
-NULL);
-#else
-DRIVER_MODULE(at91_aic, atmelarm, at91_aic_driver, at91_aic_devclass, NULL,
-NULL);
-#endif
-/* not yet
 EARLY_DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass,
 NULL, NULL, BUS_PASS_INTERRUPT);
-*/
+#else
+EARLY_DRIVER_MODULE(at91_aic, atmelarm, at91_aic_driver, at91_aic_devclass,
+NULL, NULL, BUS_PASS_INTERRUPT);
+#endif

Modified: head/sys/arm/at91/at91_pit.c
==
--- head/sys/arm/at91/at91_pit.cThu Aug 14 04:21:20 2014
(r269958)
+++ head/sys/arm/at91/at91_pit.cThu Aug 14 04:21:25 2014
(r269959)
@@ -214,9 +214,9 @@ static driver_t at91_pit_driver = {
 static devclass_t at91_pit_devclass;
 
 #ifdef FDT
-DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, NULL,
-NULL);
+EARLY_DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass,
+NULL, NULL, BUS_PASS_TIMER);
 #else
-DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL,
-NULL);
+EARLY_DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass,
+NULL, NULL, BUS_PASS_TIMER);
 #endif

Modified: head/sys/arm/at91/at91_pmc.c
==
--- head/sys/arm/at91/at91_pmc.cThu Aug 14 04:21:20 2014
(r269958)
+++ head/sys/arm/at91/at91_pmc.cThu Aug 14 04:21:25 2014
(r269959)
@@ -709,9 +709,9 @@ static driver_t at91_pmc_driver = {
 static devclass_t at91_pmc_devclass;
 
 #ifdef FDT
-DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, NULL,
-NULL);
+EARLY_DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass,
+NULL, NULL, BUS_PASS_CPU);
 #else
-DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, NULL,
-NULL);
+EARLY_DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass,
+NULL, NULL, BUS_PASS_CPU);
 #endif

Modified: head/sys/arm/at91/std.atmel
==
--- head/sys/arm/at91/std.atmel Thu Aug 14 04:21:20 2014(r269958)
+++ head/sys/arm/at91/std.atmel Thu Aug 14 04:21:25 2014(r269959)
@@ -11,3 +11,5 @@ deviceat91sam9x5
 
 # bring in the sam specific timers and such
 device at91sam9
+
+optionsARM_DEVICE_MULTIPASS
___
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: r269961 - in head: . lib/libopie

2014-08-13 Thread Andrey A. Chernov
Author: ache
Date: Thu Aug 14 04:42:09 2014
New Revision: 269961
URL: http://svnweb.freebsd.org/changeset/base/269961

Log:
  Bump version because challenge buffer size changed
  
  MFC after:  1 week

Modified:
  head/ObsoleteFiles.inc
  head/lib/libopie/Makefile

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Aug 14 04:21:31 2014(r269960)
+++ head/ObsoleteFiles.inc  Thu Aug 14 04:42:09 2014(r269961)
@@ -38,6 +38,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140814: libopie version bump
+OLD_LIBS+=usr/lib/libopie.so.7
+OLD_LIBS+=usr/lib32/libopie.so.7
 # 20140811: otp-sha renamed to otp-sha1
 OLD_FILES+=usr/bin/otp-sha
 OLD_FILES+=usr/share/man/man1/otp-sha.1.gz

Modified: head/lib/libopie/Makefile
==
--- head/lib/libopie/Makefile   Thu Aug 14 04:21:31 2014(r269960)
+++ head/lib/libopie/Makefile   Thu Aug 14 04:42:09 2014(r269961)
@@ -4,7 +4,7 @@
 #
 OPIE_DIST?=${.CURDIR}/../../contrib/opie
 DIST_DIR=  ${OPIE_DIST}/${.CURDIR:T}
-SHLIB_MAJOR=7
+SHLIB_MAJOR=8
 
 KEYFILE?=  \"/etc/opiekeys\"
 
___
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: r269962 - in head/sys/amd64/vmm: . intel

2014-08-13 Thread Neel Natu
Author: neel
Date: Thu Aug 14 05:00:45 2014
New Revision: 269962
URL: http://svnweb.freebsd.org/changeset/base/269962

Log:
  Use the max guest memory address when creating its iommu domain.
  
  Also, assert that the GPA being mapped in the domain is less than its maxaddr.
  
  Reviewed by:  grehan
  Pointed out by:   Anish Gupta (akgu...@gmail.com)

Modified:
  head/sys/amd64/vmm/intel/vtd.c
  head/sys/amd64/vmm/vmm.c

Modified: head/sys/amd64/vmm/intel/vtd.c
==
--- head/sys/amd64/vmm/intel/vtd.c  Thu Aug 14 04:42:09 2014
(r269961)
+++ head/sys/amd64/vmm/intel/vtd.c  Thu Aug 14 05:00:45 2014
(r269962)
@@ -448,6 +448,11 @@ vtd_update_mapping(void *arg, vm_paddr_t
ptpindex = 0;
ptpshift = 0;
 
+   KASSERT(gpa + len > gpa, ("%s: invalid gpa range %#lx/%#lx", __func__,
+   gpa, len));
+   KASSERT(gpa + len <= dom->maxaddr, ("%s: gpa range %#lx/%#lx beyond "
+   "domain maxaddr %#lx", __func__, gpa, len, dom->maxaddr));
+
if (gpa & PAGE_MASK)
panic("vtd_create_mapping: unaligned gpa 0x%0lx", gpa);
 

Modified: head/sys/amd64/vmm/vmm.c
==
--- head/sys/amd64/vmm/vmm.cThu Aug 14 04:42:09 2014(r269961)
+++ head/sys/amd64/vmm/vmm.cThu Aug 14 05:00:45 2014(r269962)
@@ -572,6 +572,21 @@ vm_malloc(struct vm *vm, vm_paddr_t gpa,
return (0);
 }
 
+static vm_paddr_t
+vm_maxmem(struct vm *vm)
+{
+   int i;
+   vm_paddr_t gpa, maxmem;
+
+   maxmem = 0;
+   for (i = 0; i < vm->num_mem_segs; i++) {
+   gpa = vm->mem_segs[i].gpa + vm->mem_segs[i].len;
+   if (gpa > maxmem)
+   maxmem = gpa;
+   }
+   return (maxmem);
+}
+
 static void
 vm_gpa_unwire(struct vm *vm)
 {
@@ -709,7 +724,7 @@ vm_assign_pptdev(struct vm *vm, int bus,
if (ppt_assigned_devices(vm) == 0) {
KASSERT(vm->iommu == NULL,
("vm_assign_pptdev: iommu must be NULL"));
-   maxaddr = vmm_mem_maxaddr();
+   maxaddr = vm_maxmem(vm);
vm->iommu = iommu_create_domain(maxaddr);
 
error = vm_gpa_wire(vm);
___
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: r269963 - head/sys/kern

2014-08-13 Thread Xin LI
Author: delphij
Date: Thu Aug 14 05:13:24 2014
New Revision: 269963
URL: http://svnweb.freebsd.org/changeset/base/269963

Log:
  Re-instate UMA cached backend for 4K - 64K allocations.  New consumers
  like geli(4) uses malloc(9) to allocate temporary buffers that gets
  free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
  supported flame graph.
  
  Discussed with:   jeff, alfred
  MFC after:1 week

Modified:
  head/sys/kern/kern_malloc.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Thu Aug 14 05:00:45 2014(r269962)
+++ head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014(r269963)
@@ -120,7 +120,7 @@ static int kmemcount;
 #define KMEM_ZBASE 16
 #define KMEM_ZMASK (KMEM_ZBASE - 1)
 
-#define KMEM_ZMAX  PAGE_SIZE
+#define KMEM_ZMAX  65536
 #define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT)
 static uint8_t kmemsize[KMEM_ZSIZE + 1];
 
@@ -151,21 +151,10 @@ struct {
{1024, "1024", },
{2048, "2048", },
{4096, "4096", },
-#if PAGE_SIZE > 4096
{8192, "8192", },
-#if PAGE_SIZE > 8192
{16384, "16384", },
-#if PAGE_SIZE > 16384
{32768, "32768", },
-#if PAGE_SIZE > 32768
{65536, "65536", },
-#if PAGE_SIZE > 65536
-#error "Unsupported PAGE_SIZE"
-#endif /* 65536 */
-#endif /* 32768 */
-#endif /* 16384 */
-#endif /* 8192 */
-#endif /* 4096 */
{0, NULL},
 };
 
___
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: r269964 - head/sys/kern

2014-08-13 Thread Xin LI
Author: delphij
Date: Thu Aug 14 05:31:39 2014
New Revision: 269964
URL: http://svnweb.freebsd.org/changeset/base/269964

Log:
  Add a new loader tunable, vm.kmem_zmax which allows a system administrator
  to limit the maximum allocation size that malloc(9) would consider using
  the UMA cache allocator as backend.
  
  Suggested by: alfred
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_malloc.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014(r269963)
+++ head/sys/kern/kern_malloc.c Thu Aug 14 05:31:39 2014(r269964)
@@ -172,6 +172,10 @@ u_long vm_kmem_size;
 SYSCTL_ULONG(_vm, OID_AUTO, kmem_size, CTLFLAG_RDTUN, &vm_kmem_size, 0,
 "Size of kernel memory");
 
+static u_long kmem_zmax = KMEM_ZMAX;
+SYSCTL_ULONG(_vm, OID_AUTO, kmem_zmax, CTLFLAG_RDTUN, &kmem_zmax, 0,
+"Maximum allocation size that malloc(9) would use UMA as backend");
+
 static u_long vm_kmem_size_min;
 SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RDTUN, &vm_kmem_size_min, 0,
 "Minimum size of kernel memory");
@@ -485,7 +489,7 @@ malloc(unsigned long size, struct malloc
size = redzone_size_ntor(size);
 #endif
 
-   if (size <= KMEM_ZMAX) {
+   if (size <= kmem_zmax) {
mtip = mtp->ks_handle;
if (size & KMEM_ZMASK)
size = (size & ~KMEM_ZMASK) + KMEM_ZBASE;
@@ -776,6 +780,9 @@ mallocinit(void *dummy)
 
uma_startup2();
 
+   if (kmem_zmax < PAGE_SIZE || kmem_zmax > KMEM_ZMAX)
+   kmem_zmax = KMEM_ZMAX;
+
mt_zone = uma_zcreate("mt_zone", sizeof(struct malloc_type_internal),
 #ifdef INVARIANTS
mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini,
@@ -800,7 +807,7 @@ mallocinit(void *dummy)
}   
for (;i <= size; i+= KMEM_ZBASE)
kmemsize[i >> KMEM_ZSHIFT] = indx;
-   
+
}
 }
 SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_SECOND, mallocinit, NULL);
___
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"


Re: svn commit: r269963 - head/sys/kern

2014-08-13 Thread John-Mark Gurney
Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +:
> Author: delphij
> Date: Thu Aug 14 05:13:24 2014
> New Revision: 269963
> URL: http://svnweb.freebsd.org/changeset/base/269963
> 
> Log:
>   Re-instate UMA cached backend for 4K - 64K allocations.  New consumers
>   like geli(4) uses malloc(9) to allocate temporary buffers that gets
>   free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
>   supported flame graph.

Can we do even larger, like 128k for phys io sized blocks?

geli can do allocations >128k, which could be broken into two parts,
one in the <8k sized range and the other in 128k...

Thanks for adding this...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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"


Re: svn commit: r269963 - head/sys/kern

2014-08-13 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 8/13/14 10:35 PM, John-Mark Gurney wrote:
> Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +:
>> Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision:
>> 269963 URL: http://svnweb.freebsd.org/changeset/base/269963
>> 
>> Log: Re-instate UMA cached backend for 4K - 64K allocations.  New
>> consumers like geli(4) uses malloc(9) to allocate temporary
>> buffers that gets free'ed shortly, causing frequent TLB shootdown
>> as observed in hwpmc supported flame graph.
> 
> Can we do even larger, like 128k for phys io sized blocks?

Sure (Actually I'm running with 128k and 256k buckets enabled on my
own storage box; with r269964 we can easily add new buckets without
actually activating them by default).

However, I'm relented to add them right now because the current
malloc(9) implementation would use the next bucket size, which is 2x
of the previous one, when the requested size is only a little bit
larger than the smaller chunk's size.  In real world the larger bucket
could eat more memory than all smaller but greater than page-sized
bucket combined (the actual consumption is still small, though).

I think eventually the right way to go is to adopt more sophisticated
allocation strategy like the one used in jemalloc(3) and this
changeset is more-or-less temporary for now: I committed it mainly
because it eliminated a large portion of unwanted TLB shootdowns I
have observed with very reasonable overhead (a few megabytes of RAM).

> geli can do allocations >128k, which could be broken into two
> parts, one in the <8k sized range and the other in 128k...

Yes, this is another issue that I'd like to solve.
-BEGIN PGP SIGNATURE-

iQIcBAEBCgAGBQJT7FYKAAoJEJW2GBstM+nsfIwP+gI+gPP2msCOIOpYSYK0hP50
xi5Bk4MDOpEZ7J4z4zWwqGXygDdgBUGXTGoAB1+3LwRD4/F+kEVlFFoRuUZTxsBC
dstHq9X29omZ8xnLnQ7GTRPWaULHP7gX8RmJvJ8IH2ElYwUwe0whDNIaK4esqKOb
Td1Lgse+FcozpMBaP4cIOtTXMBU1xY27n6i9EqXYQL2iuRFrehyD+DHyQ5M6cU5L
FdOrX0+SsJ8ybG0KAPRl0VgjZSzBv74AeOz+DOF4EX2YkajcrvTG8JIShyY401Ou
WiaE3dMaQvG1InpRH3Yu0twqTsinmu5xvunNJ3/8pE0C+OGSdcvd7Lvt6L4J5Isl
f4tcfUbpvV2ja9tIHw//s8YYD6eRdd+AioeOwsOYwEWB9IbG/fE3BZUPKk3Xgtvz
/m9SWKzFq8JMYrBOLpGeFSVQvpOHoH3ceiauzL0UqgTbyFX6zQibmpVxhTQLNUYF
Fg16hk6HfRmxCQP22OB760pEjIGyQJzDDAjme7XYtkthsqbapU+tJQNb5+MY2T0p
nI55dFHxKISBA5dhTNNt22vUN0A7VjKp0kYt9JhtlTJC/SX1BU2O5T1nYa2nsgrK
3xAgmLYBMj9LWl1ncp+/+Yv+FZZ25xgTae2sAGrX2cFHRy6/ifevVpP8BVupw5z0
BPpAtyp11WVwOPB1N4UB
=6OMC
-END PGP SIGNATURE-
___
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"