svn commit: r327236 - in head: etc/mail libexec/dma/dmagent share/man/man5 usr.bin/mail

2017-12-26 Thread Xin LI
Author: delphij
Date: Wed Dec 27 06:23:50 2017
New Revision: 327236
URL: https://svnweb.freebsd.org/changeset/base/327236

Log:
  Replace send-mail with the more standarized sendmail, we do not create
  links for send-mail in mailwrapper so it did not work anyway.
  
  MFC after:2 weeks

Modified:
  head/etc/mail/mailer.conf
  head/libexec/dma/dmagent/mailer.conf
  head/share/man/man5/mailer.conf.5
  head/usr.bin/mail/names.c

Modified: head/etc/mail/mailer.conf
==
--- head/etc/mail/mailer.conf   Wed Dec 27 05:59:47 2017(r327235)
+++ head/etc/mail/mailer.conf   Wed Dec 27 06:23:50 2017(r327236)
@@ -3,7 +3,6 @@
 # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
 #
 sendmail   /usr/libexec/sendmail/sendmail
-send-mail  /usr/libexec/sendmail/sendmail
 mailq  /usr/libexec/sendmail/sendmail
 newaliases /usr/libexec/sendmail/sendmail
 hoststat   /usr/libexec/sendmail/sendmail

Modified: head/libexec/dma/dmagent/mailer.conf
==
--- head/libexec/dma/dmagent/mailer.confWed Dec 27 05:59:47 2017
(r327235)
+++ head/libexec/dma/dmagent/mailer.confWed Dec 27 06:23:50 2017
(r327236)
@@ -1,5 +1,4 @@
 # $FreeBSD$
 
 sendmail  /usr/libexec/dma
-send-mail /usr/libexec/dma
 mailq /usr/libexec/dma

Modified: head/share/man/man5/mailer.conf.5
==
--- head/share/man/man5/mailer.conf.5   Wed Dec 27 05:59:47 2017
(r327235)
+++ head/share/man/man5/mailer.conf.5   Wed Dec 27 06:23:50 2017
(r327236)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 18, 2016
+.Dd December 26, 2017
 .Dt MAILER.CONF 5
 .Os
 .Sh NAME
@@ -96,7 +96,6 @@ program:
 # Execute the "real" sendmail program located in
 # /usr/libexec/sendmail/sendmail
 sendmail   /usr/libexec/sendmail/sendmail
-send-mail  /usr/libexec/sendmail/sendmail
 mailq  /usr/libexec/sendmail/sendmail
 newaliases /usr/libexec/sendmail/sendmail
 .Ed
@@ -109,7 +108,6 @@ to replace
 .Bd -literal -offset indent
 # Emulate sendmail using postfix
 sendmail   /usr/local/sbin/sendmail
-send-mail  /usr/local/sbin/sendmail
 mailq  /usr/local/sbin/sendmail
 newaliases /usr/local/sbin/sendmail
 .Ed
@@ -122,7 +120,6 @@ to replace
 .Bd -literal -offset indent
 # Emulate sendmail using exim
 sendmail   /usr/local/sbin/exim
-send-mail  /usr/local/sbin/exim
 mailq  /usr/local/sbin/exim -bp
 newaliases /usr/bin/true
 rmail  /usr/local/sbin/exim -i -oee
@@ -136,7 +133,6 @@ to replace
 .Bd -literal -offset indent
 # Send outgoing mail to a smart relay using mini_sendmail
 sendmail   /usr/local/bin/mini_sendmail -srelayhost
-send-mail  /usr/local/bin/mini_sendmail -srelayhost
 .Ed
 .Pp
 Using
@@ -146,7 +142,6 @@ to replace
 .Bd -literal -offset indent
 # Execute dma instead of sendmail
 sendmail   /usr/libexec/dma
-send-mail  /usr/libexec/dma
 mailq  /usr/libexec/dma
 newaliases /usr/libexec/dma
 rmail  /usr/libexec/dma

Modified: head/usr.bin/mail/names.c
==
--- head/usr.bin/mail/names.c   Wed Dec 27 05:59:47 2017(r327235)
+++ head/usr.bin/mail/names.c   Wed Dec 27 06:23:50 2017(r327236)
@@ -575,7 +575,7 @@ unpack(struct name *np)
extra++;
top = (char **)salloc((t + extra) * sizeof(*top));
ap = top;
-   *ap++ = "send-mail";
+   *ap++ = "sendmail";
*ap++ = "-i";
if (metoo)
*ap++ = "-m";
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327235 - head/usr.bin/mail

2017-12-26 Thread Xin LI
Author: delphij
Date: Wed Dec 27 05:59:47 2017
New Revision: 327235
URL: https://svnweb.freebsd.org/changeset/base/327235

Log:
  Don't initialize lastlong before assigning it.
  
  MFC after:2 weeks

Modified:
  head/usr.bin/mail/collect.c

Modified: head/usr.bin/mail/collect.c
==
--- head/usr.bin/mail/collect.c Wed Dec 27 03:24:24 2017(r327234)
+++ head/usr.bin/mail/collect.c Wed Dec 27 05:59:47 2017(r327235)
@@ -133,7 +133,6 @@ collect(struct header *hp, int printheaders)
escape = ESCAPE;
eofcount = 0;
hadintr = 0;
-   lastlong = 0;
longline = 0;
 
if (!setjmp(colljmp)) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327232 - in head/lib: libc/include libc/sparc64/fpu libedit libefivar msun/src

2017-12-26 Thread Eitan Adler
Author: eadler
Date: Wed Dec 27 03:23:41 2017
New Revision: 327232
URL: https://svnweb.freebsd.org/changeset/base/327232

Log:
  lib: Fix several typos and minor errors
  
  - duplicate words
  - typos
  - references to old versions of FreeBSD
  
  Reviewed by:  imp, benno

Modified:
  head/lib/libc/include/reentrant.h
  head/lib/libc/sparc64/fpu/fpu_reg.h
  head/lib/libedit/map.c
  head/lib/libedit/refresh.c
  head/lib/libefivar/uefi-dputil.c
  head/lib/msun/src/catrig.c

Modified: head/lib/libc/include/reentrant.h
==
--- head/lib/libc/include/reentrant.h   Wed Dec 27 03:23:21 2017
(r327231)
+++ head/lib/libc/include/reentrant.h   Wed Dec 27 03:23:41 2017
(r327232)
@@ -67,7 +67,7 @@
  * Implementation Details:
  * 
  * The mutex primitives used by the library (mutex_t, mutex_lock, etc.)
- * are macros which expand to the cooresponding primitives provided by
+ * are macros which expand to the corresponding primitives provided by
  * the thread engine or to nothing.  The latter is used so that code is
  * not unreasonably cluttered with #ifdefs when all thread safe support
  * is removed.

Modified: head/lib/libc/sparc64/fpu/fpu_reg.h
==
--- head/lib/libc/sparc64/fpu/fpu_reg.h Wed Dec 27 03:23:21 2017
(r327231)
+++ head/lib/libc/sparc64/fpu/fpu_reg.h Wed Dec 27 03:23:41 2017
(r327232)
@@ -31,7 +31,7 @@
 #define _LIBC_SPARC64_FPU_FPU_REG_H_
 
 /*
- * These are not really of type char[]. They are are arrays of functions 
defined
+ * These are not really of type char[]. They are arrays of functions defined
  * in fpu_reg.S; each array member loads/stores a certain fpu register of the
  * given size.
  */

Modified: head/lib/libedit/map.c
==
--- head/lib/libedit/map.c  Wed Dec 27 03:23:21 2017(r327231)
+++ head/lib/libedit/map.c  Wed Dec 27 03:23:41 2017(r327232)
@@ -370,7 +370,7 @@ private const el_action_t  el_map_vi_insert[] = {
 * NOTE: These mappings do NOT Correspond well
 * to the KSH VI editing assignments.
 * On the other and they are convenient and
-* many people have have gotten used to them.
+* many people have gotten used to them.
 */
/*   0 */   ED_UNASSIGNED,  /* ^@ */
/*   1 */   ED_MOVE_TO_BEG, /* ^A */

Modified: head/lib/libedit/refresh.c
==
--- head/lib/libedit/refresh.c  Wed Dec 27 03:23:21 2017(r327231)
+++ head/lib/libedit/refresh.c  Wed Dec 27 03:23:41 2017(r327232)
@@ -1148,7 +1148,7 @@ re_fastaddc(EditLine *el)
 
 
 /* re_clear_display():
- * clear the screen buffers so that new new prompt starts fresh.
+ * clear the screen buffers so that new prompt starts fresh.
  */
 protected void
 re_clear_display(EditLine *el)

Modified: head/lib/libefivar/uefi-dputil.c
==
--- head/lib/libefivar/uefi-dputil.cWed Dec 27 03:23:21 2017
(r327231)
+++ head/lib/libefivar/uefi-dputil.cWed Dec 27 03:23:41 2017
(r327232)
@@ -134,7 +134,7 @@ GetDevicePathSize (
   @param  MaxSize The maximum size of the device path data structure.
 
   @retval TRUEDevicePath is valid.
-  @retval FALSE   The length of any node node in the DevicePath is less
+  @retval FALSE   The length of any node in the DevicePath is less
   than sizeof (EFI_DEVICE_PATH_PROTOCOL).
   @retval FALSE   If MaxSize is not zero, the size of the DevicePath
   exceeds MaxSize.

Modified: head/lib/msun/src/catrig.c
==
--- head/lib/msun/src/catrig.c  Wed Dec 27 03:23:21 2017(r327231)
+++ head/lib/msun/src/catrig.c  Wed Dec 27 03:23:41 2017(r327232)
@@ -611,7 +611,7 @@ catanh(double complex z)
if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) {
/*
 * z = 0 was filtered out above.  All other cases must raise
-* inexact, but this is the only only that needs to do it
+* inexact, but this is the only case that needs to do it
 * explicitly.
 */
raise_inexact();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327230 - in head: bin/pax etc etc/devd usr.bin/localedef usr.bin/mail usr.bin/xargs usr.sbin/ctld usr.sbin/makefs usr.sbin/nfsd usr.sbin/rpc.lockd

2017-12-26 Thread Eitan Adler
Author: eadler
Date: Wed Dec 27 03:23:01 2017
New Revision: 327230
URL: https://svnweb.freebsd.org/changeset/base/327230

Log:
  userland: Fix several typos and minor errors
  
  - duplicate words
  - typos
  - references to old versions of FreeBSD
  
  Reviewed by:  imp, benno

Modified:
  head/bin/pax/buf_subs.c
  head/etc/devd/hyperv.conf
  head/etc/portsnap.conf
  head/etc/rc.initdiskless
  head/etc/rc.subr
  head/usr.bin/localedef/ctype.c
  head/usr.bin/mail/cmd3.c
  head/usr.bin/xargs/strnsubst.c
  head/usr.sbin/ctld/login.c
  head/usr.sbin/makefs/cd9660.c
  head/usr.sbin/nfsd/nfsd.c
  head/usr.sbin/rpc.lockd/lockd_lock.c

Modified: head/bin/pax/buf_subs.c
==
--- head/bin/pax/buf_subs.c Wed Dec 27 03:18:13 2017(r327229)
+++ head/bin/pax/buf_subs.c Wed Dec 27 03:23:01 2017(r327230)
@@ -485,7 +485,7 @@ wr_rdbuf(char *out, int outcnt)
int cnt;
 
/*
-* while there is data to copy copy into the write buffer. when the
+* while there is data to copy into the write buffer. when the
 * write buffer fills, flush it to the archive and continue
 */
while (outcnt > 0) {

Modified: head/etc/devd/hyperv.conf
==
--- head/etc/devd/hyperv.conf   Wed Dec 27 03:18:13 2017(r327229)
+++ head/etc/devd/hyperv.conf   Wed Dec 27 03:23:01 2017(r327230)
@@ -39,39 +39,39 @@ notify 11 {
 #
 # How network VF works with hn(4) on Hyper-V in non-transparent mode:
 #
-# - Each network VF has a cooresponding hn(4).
-# - The network VF and the it's cooresponding hn(4) have the same hardware
+# - Each network VF has a corresponding hn(4).
+# - The network VF and the it's corresponding hn(4) have the same hardware
 #   address.
 # - Once the network VF is up, e.g. ifconfig VF up:
 #   o  All of the transmission should go through the network VF.
 #   o  Most of the reception goes through the network VF.
-#   o  Small amount of reception may go through the cooresponding hn(4).
-#  This reception will happen, even if the the cooresponding hn(4) is
-#  down.  The cooresponding hn(4) will change the reception interface
+#   o  Small amount of reception may go through the corresponding hn(4).
+#  This reception will happen, even if the corresponding hn(4) is
+#  down.  The corresponding hn(4) will change the reception interface
 #  to the network VF, so that network layer and application layer will
 #  be tricked into thinking that these packets were received by the
 #  network VF.
-#   o  The cooresponding hn(4) pretends the physical link is down.
+#   o  The corresponding hn(4) pretends the physical link is down.
 # - Once the network VF is down or detached:
-#   o  All of the transmission should go through the cooresponding hn(4).
-#   o  All of the reception goes through the cooresponding hn(4).
-#   o  The cooresponding hn(4) fallbacks to the original physical link
+#   o  All of the transmission should go through the corresponding hn(4).
+#   o  All of the reception goes through the corresponding hn(4).
+#   o  The corresponding hn(4) fallbacks to the original physical link
 #  detection logic.
 #
 # All these features are mainly used to help live migration, during which
 # the network VF will be detached, while the network communication to the
 # VM must not be cut off.  In order to reach this level of live migration
 # transparency, we use failover mode lagg(4) with the network VF and the
-# cooresponding hn(4) attached to it.
+# corresponding hn(4) attached to it.
 #
 # To ease user configuration for both network VF and non-network VF, the
 # lagg(4) will be created by the following rules, and the configuration
-# of the cooresponding hn(4) will be applied to the lagg(4) automatically.
+# of the corresponding hn(4) will be applied to the lagg(4) automatically.
 #
 # NOTE:
 # If live migration is not needed at all, the following rules could be
 # commented out, and the network VF interface could be used exclusively.
-# Most often the cooresponding hn(4) could be completely ignored.
+# Most often the corresponding hn(4) could be completely ignored.
 #
 #
 # Default workflow for the network VF bringup:

Modified: head/etc/portsnap.conf
==
--- head/etc/portsnap.conf  Wed Dec 27 03:18:13 2017(r327229)
+++ head/etc/portsnap.conf  Wed Dec 27 03:23:01 2017(r327230)
@@ -30,7 +30,6 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3
 # REFUSE korean polish portuguese russian ukrainian vietnamese
 
 # List of INDEX files to build and the DESCRIBE file to use for each
-#INDEX INDEX-9 DESCRIBE.9
 #INDEX INDEX-10 DESCRIBE.10
 #INDEX INDEX-11 DESCRIBE.11
 INDEX INDEX-12 DESCRIBE.12

Modified: head/etc/rc.initdiskless

svn commit: r327231 - in head/sys: amd64/amd64 dev/ath dev/bhnd/nvram dev/cadence dev/de dev/drm dev/e1000 dev/isci/scil dev/iwm dev/mvs dev/mwl dev/sfxge/common dev/sio dev/sound/isa dev/syscons f...

2017-12-26 Thread Eitan Adler
Author: eadler
Date: Wed Dec 27 03:23:21 2017
New Revision: 327231
URL: https://svnweb.freebsd.org/changeset/base/327231

Log:
  kernel: Fix several typos and minor errors
  
  - duplicate words
  - typos
  - references to old versions of FreeBSD
  
  Reviewed by:  imp, benno

Modified:
  head/sys/amd64/amd64/support.S
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bhnd/nvram/bhnd_nvram_store_subr.c
  head/sys/dev/cadence/if_cgem.c
  head/sys/dev/de/if_de.c
  head/sys/dev/drm/mga_state.c
  head/sys/dev/e1000/e1000_82543.c
  head/sys/dev/isci/scil/scic_sds_remote_node_context.c
  head/sys/dev/isci/scil/scif_sas_controller.c
  head/sys/dev/iwm/if_iwmreg.h
  head/sys/dev/mvs/mvs_pci.c
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/sfxge/common/siena_nvram.c
  head/sys/dev/sio/sio.c
  head/sys/dev/sound/isa/mss.h
  head/sys/dev/syscons/scvgarndr.c
  head/sys/fs/nfsclient/nfs_clrpcops.c
  head/sys/i386/i386/support.s
  head/sys/kern/vfs_subr.c
  head/sys/mips/conf/BERI_SOCKIT
  head/sys/net/altq/altq_hfsc.h
  head/sys/net/bpf.c
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_scan_sta.c
  head/sys/powerpc/booke/locore.S
  head/sys/sparc64/pci/sbbc.c
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/amd64/amd64/support.S
==
--- head/sys/amd64/amd64/support.S  Wed Dec 27 03:23:01 2017
(r327230)
+++ head/sys/amd64/amd64/support.S  Wed Dec 27 03:23:21 2017
(r327231)
@@ -596,7 +596,7 @@ END(subyte)
  * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE
  *   %rdi, %rsi, %rdx, %rcx
  *
- * copy a string from from to to, stop when a 0 character is reached.
+ * copy a string from 'from' to 'to', stop when a 0 character is reached.
  * return ENAMETOOLONG if string is longer than maxlen, and
  * EFAULT on protection violations. If lencopied is non-zero,
  * return the actual length in *lencopied.

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Wed Dec 27 03:23:01 2017(r327230)
+++ head/sys/dev/ath/if_ath.c   Wed Dec 27 03:23:21 2017(r327231)
@@ -1081,7 +1081,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
sc->sc_txq_node_psq_maxdepth = 16;
 
/*
-* Default the maximum queue to to 1/4'th the TX buffers, or
+* Default the maximum queue to 1/4'th the TX buffers, or
 * 64, whichever is smaller.
 */
sc->sc_txq_node_maxdepth = MIN(64, ath_txbuf / 4);

Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_store_subr.c
==
--- head/sys/dev/bhnd/nvram/bhnd_nvram_store_subr.c Wed Dec 27 03:23:01 
2017(r327230)
+++ head/sys/dev/bhnd/nvram/bhnd_nvram_store_subr.c Wed Dec 27 03:23:21 
2017(r327231)
@@ -748,7 +748,7 @@ bhnd_nvstore_var_register_path(struct bhnd_nvram_store
 }
 
 /**
- * Resolve the device path entry referenced referenced by @p info.
+ * Resolve the device path entry referenced by @p info.
  *
  * @param  sc  The NVRAM store to be updated.
  * @param  infoVariable name information descriptor containing

Modified: head/sys/dev/cadence/if_cgem.c
==
--- head/sys/dev/cadence/if_cgem.c  Wed Dec 27 03:23:01 2017
(r327230)
+++ head/sys/dev/cadence/if_cgem.c  Wed Dec 27 03:23:21 2017
(r327231)
@@ -811,7 +811,7 @@ cgem_start_locked(if_t ifp)
WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow |
CGEM_NET_CTRL_START_TX);
 
-   /* If there is a BPF listener, bounce a copy to to him. */
+   /* If there is a BPF listener, bounce a copy to him. */
ETHER_BPF_MTAP(ifp, m);
}
 }

Modified: head/sys/dev/de/if_de.c
==
--- head/sys/dev/de/if_de.c Wed Dec 27 03:23:01 2017(r327230)
+++ head/sys/dev/de/if_de.c Wed Dec 27 03:23:21 2017(r327231)
@@ -3920,7 +3920,7 @@ tulip_txput(tulip_softc_t * const sc, struct mbuf *m)
  * a bit reminiscent of going on the Ark two by two
  * since each descriptor for the TULIP can describe
  * two buffers.  So we advance through packet filling
- * each of the two entries at a time to to fill each
+ * each of the two entries at a time to fill each
  * descriptor.  Clear the first and last segment bits
  * in each descriptor (actually just clear everything
  * but the end-of-ring or chain bits) to make sure

Modified: head/sys/dev/drm/mga_state.c
==
--- head/sys/dev/drm/mga_state.cWed Dec 27 03:23:01 2017
(r327230)
+++ head/sys/dev/drm/mga_state.cWed Dec 27 03:23:21 2017

svn commit: r327227 - head/lib/libufs

2017-12-26 Thread Kirk McKusick
Author: mckusick
Date: Tue Dec 26 23:16:11 2017
New Revision: 327227
URL: https://svnweb.freebsd.org/changeset/base/327227

Log:
  Missing disk close in libufs.

Modified:
  head/lib/libufs/type.c

Modified: head/lib/libufs/type.c
==
--- head/lib/libufs/type.c  Tue Dec 26 22:05:55 2017(r327226)
+++ head/lib/libufs/type.c  Tue Dec 26 23:16:11 2017(r327227)
@@ -83,6 +83,7 @@ ufs_disk_fillout(struct uufsd *disk, const char *name)
}
if (sbread(disk) == -1) {
ERROR(disk, "could not read superblock to fill out disk");
+   ufs_disk_close(disk);
return (-1);
}
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Ian Lepore
Author: ian
Date: Tue Dec 26 22:05:55 2017
New Revision: 327226
URL: https://svnweb.freebsd.org/changeset/base/327226

Log:
  Add a section describing how to tune ARM kernel options to use an MD_ROOT
  filesystem larger than about 50-55 MiB.
  
  The description of VM_KMEM_SIZE_SCALE is roughly as hand-wavy as my
  understanding of the option, but at least mentioning that it's a factor
  and giving an empirical datapoint that works will give folks some idea
  of what to tweak if they have problems.

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

Modified: head/share/man/man4/md.4
==
--- head/share/man/man4/md.4Tue Dec 26 20:56:55 2017(r327225)
+++ head/share/man/man4/md.4Tue Dec 26 22:05:55 2017(r327226)
@@ -7,7 +7,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2017
+.Dd December 26, 2017
 .Dt MD 4
 .Os
 .Sh NAME
@@ -93,6 +93,47 @@ disk found in the
 .Xr mdconfig 8
 man page.
 Other tools will also create these images, such as NanoBSD.
+.Sh ARM KERNEL OPTIONS
+On armv6 and armv7 architectures, an MD_ROOT image larger than
+approximately 55 MiB may require building a custom kernel using
+several tuning options related to kernel memory usage.
+.Bl -tag -width indent
+.It Cd options LOCORE_MAP_MB=
+This configures how much memory is mapped for the kernel during
+the early initialization stages.
+The value must be at least as large as the kernel plus all preloaded
+modules, including the root image.
+There is no downside to setting this value too large, as long
+as it does not exceed the amount of physical memory.
+The default is 64 MiB.
+.It Cd options NKPT2PG=
+This configures the number of kernel L2 page table pages to
+preallocate during kernel initialization.
+Each L2 page can map 4 MiB of kernel space.
+The value must be large enough to map the kernel plus all preloaded
+modules, including the root image.
+The default value is 32, which is sufficient to map 128 MiB.
+.It Cd options VM_KMEM_SIZE_SCALE=
+This configures the amount of kernel virtual address (KVA) space to
+dedicate to the kmem_arena map.
+The value is the ratio of physical to virtual pages.
+The default value of 3 allocates a page of KVA for each 3 pages
+of physical ram in the system.
+
+The kernel and modules, including the root image, also consume KVA.
+The combination of a large root image and the default scaling
+may preallocate so much KVA to kmem_arena that there is not enough
+remaining address space to allocate kernel stacks, IO buffers,
+and other resources that are not part of kmem_arena.
+Overallocating kmem_arena space is likely to manifest as failure to
+launch userland processes with "cannot allocate kernel stack" messages.
+
+Setting the value too high may result in kernel failure to allocate
+memory because kmem_arena is too small, and the failure may require
+significant runtime to manifest.
+Empirically, a value of 5 works well for a 200 MiB root image on
+a system with 2 GiB of physical ram.
+.El
 .Sh SEE ALSO
 .Xr gpart 8 ,
 .Xr loader 8 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327223 - head/sys/mips/conf

2017-12-26 Thread Michael Zhilin
Author: mizhka
Date: Tue Dec 26 19:50:23 2017
New Revision: 327223
URL: https://svnweb.freebsd.org/changeset/base/327223

Log:
  [mips] fix compilation of TP-WN1043ND kernel configuration
  
  This compilation issue has been found thanks to freebsd-wifi-build:
   - gpioiic requires "gpio_if.h", so "device gpio" is mandatory
   - rtl8366rb works over MDIO interface, so "device mdio" is mandatory
  
  Compilation is checked on FreeBSD 12-CURRENT machine.

Modified:
  head/sys/mips/conf/TP-WN1043ND

Modified: head/sys/mips/conf/TP-WN1043ND
==
--- head/sys/mips/conf/TP-WN1043ND  Tue Dec 26 19:02:56 2017
(r327222)
+++ head/sys/mips/conf/TP-WN1043ND  Tue Dec 26 19:50:23 2017
(r327223)
@@ -18,6 +18,7 @@ hints   "TP-WN1043ND.hints"
 options AR71XX_REALMEM=32*1024*1024
 
 # i2c GPIO bus
+device gpio
 device gpioiic
 device iicbb
 device iicbus
@@ -27,6 +28,7 @@ deviceiic
 device etherswitch
 
 # RTL8366RB support
+device mdio
 device rtl8366rb
 
 # read MSDOS formatted disks - USB
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327222 - in head/sys: arm/arm conf

2017-12-26 Thread Ian Lepore
Author: ian
Date: Tue Dec 26 19:02:56 2017
New Revision: 327222
URL: https://svnweb.freebsd.org/changeset/base/327222

Log:
  Add a new ARM kernel option, LOCORE_MAP_MB, to control the size of the
  kernel VA mapping in the temporary page tables set up by locore-v6.S.
  
  The number used to be hard-coded to 64MB, which is still the default if
  the kernel option is not specified.  However, 64MB is insufficient for
  using a large mdroot filesystem.  The hard-coded number can't be safely
  increased because too large a number may run into memory-mapped IO space
  on some SoCs that must not be mapped as ordinary memory.

Modified:
  head/sys/arm/arm/genassym.c
  head/sys/arm/arm/locore-v6.S
  head/sys/conf/options.arm

Modified: head/sys/arm/arm/genassym.c
==
--- head/sys/arm/arm/genassym.c Tue Dec 26 18:42:29 2017(r327221)
+++ head/sys/arm/arm/genassym.c Tue Dec 26 19:02:56 2017(r327222)
@@ -161,3 +161,12 @@ ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcach
 ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask));
 ASSYM(ICACHE_LINE_SIZE, offsetof(struct cpuinfo, icache_line_size));
 ASSYM(ICACHE_LINE_MASK, offsetof(struct cpuinfo, icache_line_mask));
+
+/*
+ * Emit the LOCORE_MAP_MB option as a #define only if the option was set.
+ */
+#include "opt_locore.h"
+
+#ifdef LOCORE_MAP_MB
+ASSYM(LOCORE_MAP_MB, LOCORE_MAP_MB);
+#endif

Modified: head/sys/arm/arm/locore-v6.S
==
--- head/sys/arm/arm/locore-v6.STue Dec 26 18:42:29 2017
(r327221)
+++ head/sys/arm/arm/locore-v6.STue Dec 26 19:02:56 2017
(r327222)
@@ -38,6 +38,11 @@
 
 __FBSDID("$FreeBSD$");
 
+/* We map 64MB of kernel unless overridden in assym.s by the kernel option. */
+#ifndef LOCORE_MAP_MB
+#defineLOCORE_MAP_MB   64
+#endif
+
 #if __ARM_ARCH >= 7
 #if defined(__ARM_ARCH_7VE__) || defined(__clang__)
 /*
@@ -176,12 +181,13 @@ ASENTRY_NP(_start)
bl  build_pagetables
 
/* 
-* Next we do 64MiB starting at the physical load address, mapped to
-* the VA the kernel is linked for.
+* Next we map the kernel starting at the physical load address, mapped
+* to the VA the kernel is linked for.  The default size we map is 64MiB
+* but it can be overridden with a kernel option.
 */
mov r1, r5
ldr r2, =(KERNVIRTADDR)
-   mov r3, #64
+   ldr r3, =(LOCORE_MAP_MB)
bl  build_pagetables
 
/* Create a device mapping for early_printf if specified. */

Modified: head/sys/conf/options.arm
==
--- head/sys/conf/options.arm   Tue Dec 26 18:42:29 2017(r327221)
+++ head/sys/conf/options.arm   Tue Dec 26 19:02:56 2017(r327222)
@@ -35,6 +35,7 @@ KERNBASE  opt_global.h
 KERNVIRTADDR   opt_global.h
 LINUX_BOOT_ABI opt_global.h
 LOADERRAMADDR  opt_global.h
+LOCORE_MAP_MB  opt_locore.h
 NKPT2PGopt_pmap.h
 PHYSADDR   opt_global.h
 PLATFORM   opt_global.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Ian Lepore
Author: ian
Date: Tue Dec 26 18:42:29 2017
New Revision: 327221
URL: https://svnweb.freebsd.org/changeset/base/327221

Log:
  Complete the changing of the old "i2c-address" property to the modern "reg"
  property by updating the description text to match the updated example.
  
  This should have been part of r327220

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

Modified: head/share/man/man4/lm75.4
==
--- head/share/man/man4/lm75.4  Tue Dec 26 18:34:07 2017(r327220)
+++ head/share/man/man4/lm75.4  Tue Dec 26 18:42:29 2017(r327221)
@@ -157,13 +157,11 @@ i2c {
 .Ed
 .Pp
 Where:
-.Bl -tag -width ".Va i2c-address"
+.Bl -tag -width ".Va compatible"
 .It Va compatible
 Should always be set to "national,lm75".
-.It Va i2c-address
-The
-.Va i2c-address
-property indicates which i2c address the
+.It Va reg
+Indicates which 7-bit i2c address the
 .Nm
 is wired at.
 .Nm
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Ian Lepore
Author: ian
Date: Tue Dec 26 18:34:07 2017
New Revision: 327220
URL: https://svnweb.freebsd.org/changeset/base/327220

Log:
  Update the FDT example for the lm75 sensor to match current devicetree
  standards and what the existing driver expects.
  
  Also change 'like' to 'such as' where the text is providing an example
  rather than a simile.

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

Modified: head/share/man/man4/lm75.4
==
--- head/share/man/man4/lm75.4  Tue Dec 26 18:10:34 2017(r327219)
+++ head/share/man/man4/lm75.4  Tue Dec 26 18:34:07 2017(r327220)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 11, 2014
+.Dd December 26, 2017
 .Dt LM75 4
 .Os
 .Sh NAME
@@ -122,7 +122,7 @@ clones may not work reliably.
 .Pp
 On a
 .Xr device.hints 5
-based system, like
+based system, such as
 .Li MIPS ,
 these values are configurable for
 .Nm :
@@ -140,19 +140,18 @@ i2c address on the
 .Pp
 On a
 .Xr FDT 4
-based system, like
+based system, such as
 .Li ARM ,
 the DTS part for a
 .Nm
 device usually looks like:
 .Bd -literal
 i2c {
-
+   /* Properties describing the controller appear here. */
...
-
-   lm750 {
+   lm750@49 {
compatible = "national,lm75";
-   i2c-address = <0x49>;
+   reg = <0x49>;
};
 };
 .Ed
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327218 - head/sys/vm

2017-12-26 Thread Alan Cox
Author: alc
Date: Tue Dec 26 17:59:37 2017
New Revision: 327218
URL: https://svnweb.freebsd.org/changeset/base/327218

Log:
  Refactor vm_map_find(), creating a separate function, vm_map_alignspace(),
  for finding aligned free space in the given map.  With this change, we
  always return KERN_NO_SPACE when we fail to find free space.  Whereas,
  previously, we might return KERN_INVALID_ADDRESS.  Also, with this change,
  we explicitly check for address wrap, rather than relying upon the map's
  min and max addresses to establish sentinel-like regions.
  
  This refactoring was inspired by the problem that we addressed in r326098.
  
  Reviewed by:  kib
  Tested by:pho
  Discussed with:   markj
  MFC after:3 weeks
  Differential Revision:https://reviews.freebsd.org/D13346

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cTue Dec 26 17:12:16 2017(r327217)
+++ head/sys/vm/vm_map.cTue Dec 26 17:59:37 2017(r327218)
@@ -132,6 +132,9 @@ static int vmspace_zinit(void *mem, int size, int flag
 static int vm_map_zinit(void *mem, int ize, int flags);
 static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min,
 vm_offset_t max);
+static int vm_map_alignspace(vm_map_t map, vm_object_t object,
+vm_ooffset_t offset, vm_offset_t *addr, vm_size_t length,
+vm_offset_t max_addr, vm_offset_t alignment);
 static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t 
system_map);
 static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry);
 static void vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry);
@@ -1484,6 +1487,70 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooff
 }
 
 /*
+ * Searches for the specified amount of free space in the given map with the
+ * specified alignment.  Performs an address-ordered, first-fit search from
+ * the given address "*addr", with an optional upper bound "max_addr".  If the
+ * parameter "alignment" is zero, then the alignment is computed from the
+ * given (object, offset) pair so as to enable the greatest possible use of
+ * superpage mappings.  Returns KERN_SUCCESS and the address of the free space
+ * in "*addr" if successful.  Otherwise, returns KERN_NO_SPACE.
+ *
+ * The map must be locked.  Initially, there must be at least "length" bytes
+ * of free space at the given address.
+ */
+static int
+vm_map_alignspace(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
+vm_offset_t *addr, vm_size_t length, vm_offset_t max_addr,
+vm_offset_t alignment)
+{
+   vm_offset_t aligned_addr, free_addr;
+
+   VM_MAP_ASSERT_LOCKED(map);
+   free_addr = *addr;
+   KASSERT(!vm_map_findspace(map, free_addr, length, addr) &&
+   free_addr == *addr, ("caller provided insufficient free space"));
+   for (;;) {
+   /*
+* At the start of every iteration, the free space at address
+* "*addr" is at least "length" bytes.
+*/
+   if (alignment == 0)
+   pmap_align_superpage(object, offset, addr, length);
+   else if ((*addr & (alignment - 1)) != 0) {
+   *addr &= ~(alignment - 1);
+   *addr += alignment;
+   }
+   aligned_addr = *addr;
+   if (aligned_addr == free_addr) {
+   /*
+* Alignment did not change "*addr", so "*addr" must
+* still provide sufficient free space.
+*/
+   return (KERN_SUCCESS);
+   }
+
+   /*
+* Test for address wrap on "*addr".  A wrapped "*addr" could
+* be a valid address, in which case vm_map_findspace() cannot
+* be relied upon to fail.
+*/
+   if (aligned_addr < free_addr ||
+   vm_map_findspace(map, aligned_addr, length, addr) ||
+   (max_addr != 0 && *addr + length > max_addr))
+   return (KERN_NO_SPACE);
+   free_addr = *addr;
+   if (free_addr == aligned_addr) {
+   /*
+* If a successful call to vm_map_findspace() did not
+* change "*addr", then "*addr" must still be aligned
+* and provide sufficient free space.
+*/
+   return (KERN_SUCCESS);
+   }
+   }
+}
+
+/*
  * vm_map_find finds an unallocated region in the target address
  * map with the given length.  The search is defined to be
  * first-fit from the specified address; the region found is
@@ -1498,8 +1565,8 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffs
vm_size_t length, vm_offset_t max_addr, int find_space,
  

Re: svn commit: r327209 - head/sys/netinet/libalias

2017-12-26 Thread Michael Tuexen
> On 26. Dec 2017, at 17:14, Alexey Dokuchaev  wrote:
> 
> On Tue, Dec 26, 2017 at 04:12:04PM +, Michael Tuexen wrote:
>> New Revision: 327209
>> URL: https://svnweb.freebsd.org/changeset/base/327209
>> 
>> Log:
>>  Clearify CID 1008197.
> 
> Again, this "clarifies" nothing.  I see a bunch of style(9) bugs fixed,
> and fail to see how/why those had upset Coverity.
I added a
/* FALLTHROUGH */

Coverity was complaining that a break was possibly missing. Should not
have also fixed some style(9) issues and indentation issues in the same
function.

Best regards
Michael 
> 
> ./danfe

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r327205 - head/sys/netinet/libalias

2017-12-26 Thread Michael Tuexen
> On 26. Dec 2017, at 17:00, Alexey Dokuchaev  wrote:
> 
> On Tue, Dec 26, 2017 at 03:24:42PM +, Michael Tuexen wrote:
>> New Revision: 327205
>> URL: https://svnweb.freebsd.org/changeset/base/327205
>> 
>> Log:
>>  Fix CID 1008936.
> 
> I'm afraid this is a rather bad commit message.  It should have described
> what was the problem and how it was approached (fixed).  Listing CID is
> part of the metadata; it cannot replace proper commit log.
It replaced a comparison left side == right side with identical left
and right sides with the correct condition. I guess that was a copy and paste 
error.
> 
> Also, please do not mix functional and substantial amount of style changes
> in a single commit.
Yepp. You are right. Will do in the future...

Best regards
Michael
> 
> ./danfe

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327216 - in head/share/man/man4: . man4.arm

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 16:50:49 2017
New Revision: 327216
URL: https://svnweb.freebsd.org/changeset/base/327216

Log:
  man4: Move back allwinner man page to share/man/man4
  
  But only install them for arm or aarch64 since they are used on both arch.

Added:
  head/share/man/man4/aw_gpio.4
 - copied unchanged from r327215, head/share/man/man4/man4.arm/aw_gpio.4
  head/share/man/man4/aw_mmc.4
 - copied unchanged from r327215, head/share/man/man4/man4.arm/aw_mmc.4
  head/share/man/man4/aw_rtc.4
 - copied unchanged from r327215, head/share/man/man4/man4.arm/aw_rtc.4
Deleted:
  head/share/man/man4/man4.arm/aw_gpio.4
  head/share/man/man4/man4.arm/aw_mmc.4
  head/share/man/man4/man4.arm/aw_rtc.4
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/man4.arm/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 26 16:38:04 2017
(r327215)
+++ head/share/man/man4/MakefileTue Dec 26 16:50:49 2017
(r327216)
@@ -70,6 +70,9 @@ MAN=  aac.4 \
audit.4 \
auditpipe.4 \
aue.4 \
+   ${_aw_gpio.4} \
+   ${_aw_mmc.4} \
+   ${_aw_rtc.4} \
axe.4 \
axge.4 \
bce.4 \
@@ -754,6 +757,12 @@ MLINKS+=xl.4 if_xl.4
 
 .if ${MACHINE_CPUARCH} == "aarch64"
 _armv8crypto.4=armv8crypto.4
+.endif
+
+.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"
+_aw_gpio.4=aw_gpio.4
+_aw_mmc.4= aw_mmc.4
+_aw_rtc.4= aw_rtc.4
 .endif
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"

Copied: head/share/man/man4/aw_gpio.4 (from r327215, 
head/share/man/man4/man4.arm/aw_gpio.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/aw_gpio.4   Tue Dec 26 16:50:49 2017
(r327216, copy of r327215, head/share/man/man4/man4.arm/aw_gpio.4)
@@ -0,0 +1,102 @@
+.\"-
+.\" Copyright (c) 2017 Emmanuel Vadot 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Dec 25, 2017
+.Dt AW_GPIO 4
+.Os
+.Sh NAME
+.Nm aw_gpio
+.Nd driver for the GPIO and pin muxing functionalities on Allwinner SoC
+.Sh SYNOPSIS
+.Cd "device gpio"
+.Cd "options SOC_ALLWINNER_A10"
+.Cd "options SOC_ALLWINNER_A13"
+.Cd "options SOC_ALLWINNER_A20"
+.Cd "options SOC_ALLWINNER_A31"
+.Cd "options SOC_ALLWINNER_A31S"
+.Cd "options SOC_ALLWINNER_A33"
+.Cd "options SOC_ALLWINNER_A83T"
+.Cd "options SOC_ALLWINNER_H2PLUS"
+.Cd "options SOC_ALLWINNER_H3"
+.Cd "options SOC_ALLWINNER_A64"
+.Cd "options SOC_ALLWINNER_H5"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Allwinner pin muxing and GPIO on
+Allwinner SoCs.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the GPIO/pinmuxing controller with one of the following
+compatible strings :
+.Pp
+.Bl -bullet -compact
+.It
+allwinner,sun4i-a10-pinctrl
+.It
+allwinner,sun5i-a13-pinctrl
+.It
+allwinner,sun7i-a20-pinctrl
+.It
+allwinner,sun6i-a31-pinctrl
+.It
+allwinner,sun6i-a31s-pinctrl
+.It
+allwinner,sun6i-a31-r-pinctrl
+.It
+allwinner,sun6i-a33-pinctrl
+.It
+allwinner,sun8i-a83t-pinctrl
+.It
+allwinner,sun8i-a83t-r-pinctrl
+.It
+allwinner,sun8i-h3-pinctrl
+.It
+allwinner,sun50i-h5-pinctrl
+.It
+allwinner,sun8i-h3-r-pinctrl
+.It
+allwinner,sun50i-a64-pinctrl
+.It
+allwinner,sun50i-a64-r-pinctrl
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr gpio 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver was originally written by
+.An Ganbold Tsagaankhuu Aq 

svn commit: r327215 - head/sys/dev/extres/syscon

2017-12-26 Thread Kyle Evans
Author: kevans
Date: Tue Dec 26 16:38:04 2017
New Revision: 327215
URL: https://svnweb.freebsd.org/changeset/base/327215

Log:
  extres/syscon: Commit missing bits from r327106
  
  r327106 introduced kobj to syscon so it can be subclassed and fit in with
  the rest of the syscon framework. The diff for syscon.c was misapplied in a
  clean tree prior to commit, so bring it back to what was included in the
  review and tested. The entire file has basically been rewritten from what
  was present prior to the kobj work.
  
  Pointy hat to:me

Modified:
  head/sys/dev/extres/syscon/syscon.c

Modified: head/sys/dev/extres/syscon/syscon.c
==
--- head/sys/dev/extres/syscon/syscon.c Tue Dec 26 16:33:55 2017
(r327214)
+++ head/sys/dev/extres/syscon/syscon.c Tue Dec 26 16:38:04 2017
(r327215)
@@ -33,153 +33,223 @@
 
 #include 
 __FBSDID("$FreeBSD$");
+#include "opt_platform.h"
+
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
+#ifdef FDT
 #include 
 #include 
+#endif
 
 #include "syscon_if.h"
+#include "syscon.h"
 
-#define SYSCON_LOCK(_sc)   mtx_lock(&(_sc)->mtx)
-#defineSYSCON_UNLOCK(_sc)  mtx_unlock(&(_sc)->mtx)
-#define SYSCON_LOCK_INIT(_sc)  mtx_init(&(_sc)->mtx,   \
-   device_get_nameunit((_sc)->dev), "syscon", MTX_DEF)
-#define SYSCON_LOCK_DESTROY(_sc)   mtx_destroy(&(_sc)->mtx);
-#define SYSCON_ASSERT_LOCKED(_sc)  mtx_assert(&(_sc)->mtx, MA_OWNED);
-#define SYSCON_ASSERT_UNLOCKED(_sc)mtx_assert(&(_sc)->mtx, MA_NOTOWNED);
+/*
+ * Syscon interface details
+ */
+typedef TAILQ_HEAD(syscon_list, syscon) syscon_list_t;
 
-struct syscon_softc {
-   device_tdev;
-   struct resource *mem_res;
-   struct mtx  mtx;
+/*
+ * Declarations
+ */
+static int syscon_method_init(struct syscon *syscon);
+static int syscon_method_uninit(struct syscon *syscon);
+
+MALLOC_DEFINE(M_SYSCON, "syscon", "Syscon driver");
+
+static syscon_list_t syscon_list = TAILQ_HEAD_INITIALIZER(syscon_list);
+static struct sx   syscon_topo_lock;
+SX_SYSINIT(syscon_topology, _topo_lock, "Syscon topology lock");
+
+/*
+ * Syscon methods.
+ */
+static syscon_method_t syscon_methods[] = {
+   SYSCONMETHOD(syscon_init,   syscon_method_init),
+   SYSCONMETHOD(syscon_uninit, syscon_method_uninit),
+
+   SYSCONMETHOD_END
 };
+DEFINE_CLASS_0(syscon, syscon_class, syscon_methods, 0);
 
-static struct ofw_compat_data compat_data[] = {
-   {"syscon",  1},
-   {NULL,  0}
+#define SYSCON_TOPO_SLOCK()sx_slock(_topo_lock)
+#define SYSCON_TOPO_XLOCK()sx_xlock(_topo_lock)
+#define SYSCON_TOPO_UNLOCK()   sx_unlock(_topo_lock)
+#define SYSCON_TOPO_ASSERT()   sx_assert(_topo_lock, SA_LOCKED)
+#define SYSCON_TOPO_XASSERT()  sx_assert(_topo_lock, SA_XLOCKED)
+
+/*
+ * Default syscon methods for base class.
+ */
+static int
+syscon_method_init(struct syscon *syscon)
+{
+
+   return (0);
 };
 
-static uint32_t
-syscon_read_4(device_t dev, device_t consumer, bus_size_t offset)
+static int
+syscon_method_uninit(struct syscon *syscon)
 {
-   struct syscon_softc *sc;
-   uint32_t val;
 
-   sc = device_get_softc(dev);
+   return (0);
+};
 
-   SYSCON_LOCK(sc);
-   val = bus_read_4(sc->mem_res, offset);
-   SYSCON_UNLOCK(sc);
-   return (val);
-}
+void *
+syscon_get_softc(struct syscon *syscon)
+{
 
-static void
-syscon_write_4(device_t dev, device_t consumer, bus_size_t offset, uint32_t 
val)
+   return (syscon->softc);
+};
+
+/*
+ * Create and initialize syscon object, but do not register it.
+ */
+struct syscon *
+syscon_create(device_t pdev, syscon_class_t syscon_class)
 {
-   struct syscon_softc *sc;
+   struct syscon *syscon;
 
-   sc = device_get_softc(dev);
+   /* Create object and initialize it. */
+   syscon = malloc(sizeof(struct syscon), M_SYSCON,
+   M_WAITOK | M_ZERO);
+   kobj_init((kobj_t)syscon, (kobj_class_t)syscon_class);
 
-   SYSCON_LOCK(sc);
-   bus_write_4(sc->mem_res, offset, val);
-   SYSCON_UNLOCK(sc);
+   /* Allocate softc if required. */
+   if (syscon_class->size > 0)
+   syscon->softc = malloc(syscon_class->size, M_SYSCON,
+   M_WAITOK | M_ZERO);
+
+   /* Rest of init. */
+   syscon->pdev = pdev;
+   return (syscon);
 }
 
-static void
-syscon_modify_4(device_t dev,  device_t consumer, bus_size_t offset,
-uint32_t clear_bits, uint32_t set_bits)
+/* Register syscon object. */
+struct syscon *
+syscon_register(struct syscon *syscon)
 {
-   struct syscon_softc *sc;
-   uint32_t val;
+   int rv;
 
-   sc = device_get_softc(dev);
+#ifdef FDT
+   if (syscon->ofw_node <= 0)
+   syscon->ofw_node = ofw_bus_get_node(syscon->pdev);
+   if 

Re: svn commit: r327209 - head/sys/netinet/libalias

2017-12-26 Thread Rodney W. Grimes
> Author: tuexen
> Date: Tue Dec 26 16:12:04 2017
> New Revision: 327209
> URL: https://svnweb.freebsd.org/changeset/base/327209
> 
> Log:
>   Clearify CID 1008197.
>   
>   MFC after:  3 days

This and the prior few commits log entries leave a great
deal to be desired from the perspective of someone reading
this.

> Modified:
>   head/sys/netinet/libalias/alias_sctp.c
> 
> Modified: head/sys/netinet/libalias/alias_sctp.c
> ==
> --- head/sys/netinet/libalias/alias_sctp.cTue Dec 26 16:06:11 2017
> (r327208)
> +++ head/sys/netinet/libalias/alias_sctp.cTue Dec 26 16:12:04 2017
> (r327209)
> @@ -1737,27 +1737,28 @@ ProcessSctpMsg(struct libalias *la, int direction, str
>  static int
>  ID_process(struct libalias *la, int direction, struct sctp_nat_assoc *assoc, 
> struct sctp_nat_msg *sm)
>  {
> - switch(sm->msg) {
> + switch (sm->msg) {
>   case SN_SCTP_ASCONF:   /* a packet containing an ASCONF chunk 
> with ADDIP */
>   if (!sysctl_accept_global_ootb_addip && (direction == 
> SN_TO_LOCAL))
> - return(SN_DROP_PKT);
> + return (SN_DROP_PKT);
>   /* if this Asconf packet does not contain the Vtag parameters 
> it is of no use in Idle state */
>   if (!GetAsconfVtags(la, sm, &(assoc->l_vtag), &(assoc->g_vtag), 
> direction))
> - return(SN_DROP_PKT);
> + return (SN_DROP_PKT);
> + /* FALLTHROUGH */
>   case SN_SCTP_INIT:/* a packet containing an INIT chunk or 
> an ASCONF AddIP */
>   if (sysctl_track_global_addresses)
>   AddGlobalIPAddresses(sm, assoc, direction);
> - switch(direction){
> + switch (direction) {
>   case SN_TO_GLOBAL:
>   assoc->l_addr = sm->ip_hdr->ip_src;
>   assoc->a_addr = FindAliasAddress(la, assoc->l_addr);
>   assoc->l_port = sm->sctp_hdr->src_port;
>   assoc->g_port = sm->sctp_hdr->dest_port;
> - if(sm->msg == SN_SCTP_INIT)
> + if (sm->msg == SN_SCTP_INIT)
>   assoc->g_vtag = sm->sctpchnk.Init->initiate_tag;
>   if (AddSctpAssocGlobal(la, assoc)) /* DB clash */// 
> need to add dst address
>   return((sm->msg == SN_SCTP_INIT) ? 
> SN_REPLY_ABORT : SN_REPLY_ERROR);
> - if(sm->msg == SN_SCTP_ASCONF) {
> + if (sm->msg == SN_SCTP_ASCONF) {
>   if (AddSctpAssocLocal(la, assoc, 
> sm->ip_hdr->ip_dst)) /* DB clash */
>   return(SN_REPLY_ERROR);
>   assoc->TableRegister |= SN_WAIT_TOLOCAL; /* 
> wait for tolocal ack */
> @@ -1768,25 +1769,25 @@ ID_process(struct libalias *la, int direction, struct 
>   assoc->a_addr = sm->ip_hdr->ip_dst; 
>   assoc->l_port = sm->sctp_hdr->dest_port;
>   assoc->g_port = sm->sctp_hdr->src_port;
> - if(sm->msg == SN_SCTP_INIT)
> + if (sm->msg == SN_SCTP_INIT)
>   assoc->l_vtag = sm->sctpchnk.Init->initiate_tag;
>   if (AddSctpAssocLocal(la, assoc, sm->ip_hdr->ip_src)) 
> /* DB clash */
>   return((sm->msg == SN_SCTP_INIT) ? 
> SN_REPLY_ABORT : SN_REPLY_ERROR);
> - if(sm->msg == SN_SCTP_ASCONF) {
> + if (sm->msg == SN_SCTP_ASCONF) {
>   if (AddSctpAssocGlobal(la, assoc)) /* DB clash 
> */ // need to add src address
>   return(SN_REPLY_ERROR);
>   assoc->TableRegister |= SN_WAIT_TOGLOBAL; /* 
> wait for toglobal ack */
>   }
>   break;
>   }
> - assoc->state = (sm->msg == SN_SCTP_INIT) ? SN_INi : SN_INa;
> - assoc->exp = SN_I_T(la);
> - sctp_AddTimeOut(la,assoc);
> - return(SN_NAT_PKT);
> + assoc->state = (sm->msg == SN_SCTP_INIT) ? SN_INi : SN_INa;
> + assoc->exp = SN_I_T(la);
> + sctp_AddTimeOut(la,assoc);
> + return (SN_NAT_PKT);
>   default: /* Any other type of SCTP message is not valid in Idle */
> - return(SN_DROP_PKT);
> + return (SN_DROP_PKT);
>   }
> -return(SN_DROP_PKT);/* shouldn't get here very bad: log, drop and hope for 
> the best */
> + return (SN_DROP_PKT);/* shouldn't get here very bad: log, drop and hope 
> for the best */
>  }
>  
>  /** @ingroup state_machine
> 
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org 

svn commit: r327212 - head/bin/sh

2017-12-26 Thread Jilles Tjoelker
Author: jilles
Date: Tue Dec 26 16:23:18 2017
New Revision: 327212
URL: https://svnweb.freebsd.org/changeset/base/327212

Log:
  sh: Don't leak wait* implementation details from jobs.c

Modified:
  head/bin/sh/eval.c
  head/bin/sh/jobs.c

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Tue Dec 26 16:20:38 2017(r327211)
+++ head/bin/sh/eval.c  Tue Dec 26 16:23:18 2017(r327212)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include  /* For WIFSIGNALED(status) */
 #include 
 
 /*
@@ -840,7 +839,7 @@ evalcommand(union node *cmd, int flags, struct backcmd
struct parsefile *savetopfile;
volatile int e;
char *lastarg;
-   int realstatus;
+   int signaled;
int do_clearcmdentry;
const char *path = pathval();
int i;
@@ -1163,9 +1162,9 @@ cmddone:
 parent:/* parent process gets here (if we forked) */
if (mode == FORK_FG) {  /* argument to fork */
INTOFF;
-   exitstatus = waitforjob(jp, );
+   exitstatus = waitforjob(jp, );
INTON;
-   if (iflag && loopnest > 0 && WIFSIGNALED(realstatus)) {
+   if (iflag && loopnest > 0 && signaled) {
evalskip = SKIPBREAK;
skipcount = loopnest;
}

Modified: head/bin/sh/jobs.c
==
--- head/bin/sh/jobs.c  Tue Dec 26 16:20:38 2017(r327211)
+++ head/bin/sh/jobs.c  Tue Dec 26 16:23:18 2017(r327212)
@@ -1016,7 +1016,7 @@ vforkexecshell(struct job *jp, char **argv, char **env
  */
 
 int
-waitforjob(struct job *jp, int *origstatus)
+waitforjob(struct job *jp, int *signaled)
 {
 #if JOBS
int propagate_int = jp->jobctl && jp->foreground;
@@ -1039,8 +1039,8 @@ waitforjob(struct job *jp, int *origstatus)
setcurjob(jp);
 #endif
status = jp->ps[jp->nprocs - 1].status;
-   if (origstatus != NULL)
-   *origstatus = status;
+   if (signaled != NULL)
+   *signaled = WIFSIGNALED(status);
/* convert to 8 bits */
if (WIFEXITED(status))
st = WEXITSTATUS(status);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327211 - head/usr.sbin/nandtool

2017-12-26 Thread Jilles Tjoelker
Author: jilles
Date: Tue Dec 26 16:20:38 2017
New Revision: 327211
URL: https://svnweb.freebsd.org/changeset/base/327211

Log:
  nandtool: Add missing mode for open() with O_CREAT
  
  If O_CREAT is given, open() needs a mode argument. Follow the umask by
  passing 0666.
  
  Reviewed by:  imp
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D13607

Modified:
  head/usr.sbin/nandtool/nand_read.c
  head/usr.sbin/nandtool/nand_readoob.c

Modified: head/usr.sbin/nandtool/nand_read.c
==
--- head/usr.sbin/nandtool/nand_read.c  Tue Dec 26 16:13:20 2017
(r327210)
+++ head/usr.sbin/nandtool/nand_read.c  Tue Dec 26 16:20:38 2017
(r327211)
@@ -52,7 +52,7 @@ int nand_read(struct cmd_param *params)
}
 
if ((out = param_get_string(params, "out"))) {
-   out_fd = open(out, O_WRONLY|O_CREAT);
+   out_fd = open(out, O_WRONLY|O_CREAT, 0666);
if (out_fd == -1) {
perrorf("Cannot open %s for writing", out);
return (1);

Modified: head/usr.sbin/nandtool/nand_readoob.c
==
--- head/usr.sbin/nandtool/nand_readoob.c   Tue Dec 26 16:13:20 2017
(r327210)
+++ head/usr.sbin/nandtool/nand_readoob.c   Tue Dec 26 16:20:38 2017
(r327211)
@@ -59,7 +59,7 @@ int nand_read_oob(struct cmd_param *params)
}
 
if ((out = param_get_string(params, "out"))) {
-   if ((fd_out = open(out, O_WRONLY | O_CREAT)) == -1) {
+   if ((fd_out = open(out, O_WRONLY | O_CREAT, 0666)) == -1) {
perrorf("Cannot open %s", out);
ret = 1;
goto out;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r327209 - head/sys/netinet/libalias

2017-12-26 Thread Alexey Dokuchaev
On Tue, Dec 26, 2017 at 04:12:04PM +, Michael Tuexen wrote:
> New Revision: 327209
> URL: https://svnweb.freebsd.org/changeset/base/327209
> 
> Log:
>   Clearify CID 1008197.

Again, this "clarifies" nothing.  I see a bunch of style(9) bugs fixed,
and fail to see how/why those had upset Coverity.

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327210 - in head/share/man/man4: . man4.arm

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 16:13:20 2017
New Revision: 327210
URL: https://svnweb.freebsd.org/changeset/base/327210

Log:
  Move arm specific man page to man4.arm subfolder
  
  Reported by:  ian

Added:
  head/share/man/man4/man4.arm/aw_gpio.4
 - copied unchanged from r327209, head/share/man/man4/aw_gpio.4
  head/share/man/man4/man4.arm/aw_mmc.4
 - copied unchanged from r327209, head/share/man/man4/aw_mmc.4
  head/share/man/man4/man4.arm/aw_rtc.4
 - copied unchanged from r327209, head/share/man/man4/aw_rtc.4
Deleted:
  head/share/man/man4/aw_gpio.4
  head/share/man/man4/aw_mmc.4
  head/share/man/man4/aw_rtc.4
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/man4.arm/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 26 16:12:04 2017
(r327209)
+++ head/share/man/man4/MakefileTue Dec 26 16:13:20 2017
(r327210)
@@ -70,9 +70,6 @@ MAN=  aac.4 \
audit.4 \
auditpipe.4 \
aue.4 \
-   aw_gpio.4 \
-   aw_mmc.4 \
-   aw_rtc.4 \
axe.4 \
axge.4 \
bce.4 \

Modified: head/share/man/man4/man4.arm/Makefile
==
--- head/share/man/man4/man4.arm/Makefile   Tue Dec 26 16:12:04 2017
(r327209)
+++ head/share/man/man4/man4.arm/Makefile   Tue Dec 26 16:13:20 2017
(r327210)
@@ -2,7 +2,10 @@
 
 PACKAGE=runtime-manuals
 
-MAN=   cgem.4 \
+MAN=   aw_gpio.4 \
+   aw_mmc.4 \
+   aw_rtc.4 \
+   cgem.4 \
devcfg.4 \
mge.4 \
npe.4 \

Copied: head/share/man/man4/man4.arm/aw_gpio.4 (from r327209, 
head/share/man/man4/aw_gpio.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/man4.arm/aw_gpio.4  Tue Dec 26 16:13:20 2017
(r327210, copy of r327209, head/share/man/man4/aw_gpio.4)
@@ -0,0 +1,102 @@
+.\"-
+.\" Copyright (c) 2017 Emmanuel Vadot 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Dec 25, 2017
+.Dt AW_GPIO 4
+.Os
+.Sh NAME
+.Nm aw_gpio
+.Nd driver for the GPIO and pin muxing functionalities on Allwinner SoC
+.Sh SYNOPSIS
+.Cd "device gpio"
+.Cd "options SOC_ALLWINNER_A10"
+.Cd "options SOC_ALLWINNER_A13"
+.Cd "options SOC_ALLWINNER_A20"
+.Cd "options SOC_ALLWINNER_A31"
+.Cd "options SOC_ALLWINNER_A31S"
+.Cd "options SOC_ALLWINNER_A33"
+.Cd "options SOC_ALLWINNER_A83T"
+.Cd "options SOC_ALLWINNER_H2PLUS"
+.Cd "options SOC_ALLWINNER_H3"
+.Cd "options SOC_ALLWINNER_A64"
+.Cd "options SOC_ALLWINNER_H5"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Allwinner pin muxing and GPIO on
+Allwinner SoCs.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the GPIO/pinmuxing controller with one of the following
+compatible strings :
+.Pp
+.Bl -bullet -compact
+.It
+allwinner,sun4i-a10-pinctrl
+.It
+allwinner,sun5i-a13-pinctrl
+.It
+allwinner,sun7i-a20-pinctrl
+.It
+allwinner,sun6i-a31-pinctrl
+.It
+allwinner,sun6i-a31s-pinctrl
+.It
+allwinner,sun6i-a31-r-pinctrl
+.It
+allwinner,sun6i-a33-pinctrl
+.It
+allwinner,sun8i-a83t-pinctrl
+.It
+allwinner,sun8i-a83t-r-pinctrl
+.It
+allwinner,sun8i-h3-pinctrl
+.It
+allwinner,sun50i-h5-pinctrl
+.It
+allwinner,sun8i-h3-r-pinctrl
+.It
+allwinner,sun50i-a64-pinctrl
+.It
+allwinner,sun50i-a64-r-pinctrl
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr gpio 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver was 

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

2017-12-26 Thread Michael Tuexen
Author: tuexen
Date: Tue Dec 26 16:06:11 2017
New Revision: 327208
URL: https://svnweb.freebsd.org/changeset/base/327208

Log:
  Clearify issue reported in CID 1008198.
  
  MFC after:3 days

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

Modified: head/sys/netinet/libalias/alias_sctp.c
==
--- head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 15:35:19 2017
(r327207)
+++ head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 16:06:11 2017
(r327208)
@@ -1376,6 +1376,7 @@ AddGlobalIPAddresses(struct sctp_nat_msg *sm, struct s
case SCTP_ADD_IP_ADDRESS:
/* skip to address parameter - leave param_size so 
bytes left will be calculated properly*/
param = (struct sctp_paramhdr *) &((struct 
sctp_asconf_addrv4_param *) param)->addrp;
+   /* FALLTHROUGH */
case SCTP_IPV4_ADDRESS:
ipv4_param = (struct sctp_ipv4addr_param *) param;
/* add addresses to association */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327207 - head/sys/conf

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 15:35:19 2017
New Revision: 327207
URL: https://svnweb.freebsd.org/changeset/base/327207

Log:
  arm64: a10_gpio.c and a10_mmc.c were renamed aw_gpio.c and aw_mmc.c

Modified:
  head/sys/conf/files.arm64

Modified: head/sys/conf/files.arm64
==
--- head/sys/conf/files.arm64   Tue Dec 26 15:29:11 2017(r327206)
+++ head/sys/conf/files.arm64   Tue Dec 26 15:35:19 2017(r327207)
@@ -24,8 +24,8 @@ cloudabi64_vdso_blob.ooptional
compat_cloudabi64   \
clean   "cloudabi64_vdso_blob.o"
 #
 arm/allwinner/a10_ehci.c   optionalehci aw_ehci fdt
-arm/allwinner/a10_gpio.c   optionalgpio aw_gpio fdt
-arm/allwinner/a10_mmc.coptionalmmc aw_mmc fdt
+arm/allwinner/aw_gpio.coptionalgpio aw_gpio fdt
+arm/allwinner/aw_mmc.c optionalmmc aw_mmc fdt
 arm/allwinner/a64/a64_padconf.coptionalsoc_allwinner_a64 fdt
 arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt
 arm/allwinner/h3/h3_padconf.c  optionalsoc_allwinner_h5 fdt
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Michael Tuexen
Author: tuexen
Date: Tue Dec 26 15:29:11 2017
New Revision: 327206
URL: https://svnweb.freebsd.org/changeset/base/327206

Log:
  Fix CID 1008428.
  
  MFC after:1 week

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

Modified: head/sys/netinet/libalias/alias_sctp.c
==
--- head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 15:24:42 2017
(r327205)
+++ head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 15:29:11 2017
(r327206)
@@ -422,9 +422,9 @@ int sysctl_chg_loglevel(SYSCTL_HANDLER_ARGS)
error = sysctl_handle_int(oidp, , 0, req);
if (error) return (error);
 
-   sysctl_log_level = (level > 
SN_LOG_DEBUG_MAX)?(SN_LOG_DEBUG_MAX):(level);
-   sysctl_log_level = (level < SN_LOG_LOW)?(SN_LOG_LOW):(level);
-
+   level = (level > SN_LOG_DEBUG_MAX)?(SN_LOG_DEBUG_MAX):(level);
+   level = (level < SN_LOG_LOW)?(SN_LOG_LOW):(level);
+   sysctl_log_level = level;
return (0);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Michael Tuexen
Author: tuexen
Date: Tue Dec 26 15:24:42 2017
New Revision: 327205
URL: https://svnweb.freebsd.org/changeset/base/327205

Log:
  Fix CID 1008936.

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

Modified: head/sys/netinet/libalias/alias_sctp.c
==
--- head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 14:44:02 2017
(r327204)
+++ head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 15:24:42 2017
(r327205)
@@ -2118,31 +2118,31 @@ FindSctpGlobal(struct libalias *la, struct in_addr g_a
  * @return pointer to association or NULL
  */
 static struct sctp_nat_assoc*
-FindSctpLocalT(struct libalias *la,  struct in_addr g_addr, uint32_t l_vtag, 
uint16_t g_port, uint16_t l_port)
+FindSctpLocalT(struct libalias *la, struct in_addr g_addr, uint32_t l_vtag, 
uint16_t g_port, uint16_t l_port)
 {
u_int i;
struct sctp_nat_assoc *assoc = NULL, *lastmatch = NULL;
struct sctp_GlobalAddress *G_Addr = NULL;
int cnt = 0;
-  
+
if (l_vtag != 0) { /* an init packet, vtag==0 */
i = SN_TABLE_HASH(l_vtag, g_port, la->sctpNatTableSize);
LIST_FOREACH(assoc, >sctpTableGlobal[i], list_G) {
if ((assoc->g_vtag == l_vtag) && (assoc->g_port == 
g_port) && (assoc->l_port == l_port)) {
if (assoc->num_Gaddr) {
LIST_FOREACH(G_Addr, &(assoc->Gaddr), 
list_Gaddr) {
-   if(G_Addr->g_addr.s_addr == 
G_Addr->g_addr.s_addr)
-   return(assoc); /* full 
match */
+   if (G_Addr->g_addr.s_addr == 
g_addr.s_addr)
+   return (assoc); /* full 
match */
}
} else {
-   if (++cnt > 1) return(NULL);
+   if (++cnt > 1) return (NULL);
lastmatch = assoc;
}
}
}
}
/* If there is more than one match we do not know which local address 
to send to */
-   return( cnt ? lastmatch : NULL );
+   return (cnt ? lastmatch : NULL);
 }
 
 /** @ingroup Hash
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-12-26 Thread Michael Tuexen
Author: tuexen
Date: Tue Dec 26 14:37:47 2017
New Revision: 327203
URL: https://svnweb.freebsd.org/changeset/base/327203

Log:
  Allow the first (and second) argument of sn_calloc() be a sum.
  This fixes a bug reported in
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224103
  PR:   224103

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

Modified: head/sys/netinet/libalias/alias_sctp.c
==
--- head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 14:34:38 2017
(r327202)
+++ head/sys/netinet/libalias/alias_sctp.c  Tue Dec 26 14:37:47 2017
(r327203)
@@ -187,7 +187,7 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat d
 /* Use kernel allocator. */
 #ifdef _SYS_MALLOC_H_
 #definesn_malloc(x)malloc(x, M_SCTPNAT, M_NOWAIT|M_ZERO)
-#definesn_calloc(n,x)  sn_malloc(x * n)
+#definesn_calloc(n,x)  sn_malloc((x) * (n))
 #definesn_free(x)  free(x, M_SCTPNAT)
 #endif// #ifdef _SYS_MALLOC_H_
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r327202 - head/sys/arm/allwinner

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 14:34:38 2017
New Revision: 327202
URL: https://svnweb.freebsd.org/changeset/base/327202

Log:
  arm: a10_gpio.c was renamed aw_gpio.c
  
  While here order files in files.allwinner

Modified:
  head/sys/arm/allwinner/files.allwinner

Modified: head/sys/arm/allwinner/files.allwinner
==
--- head/sys/arm/allwinner/files.allwinner  Tue Dec 26 14:26:15 2017
(r327201)
+++ head/sys/arm/allwinner/files.allwinner  Tue Dec 26 14:34:38 2017
(r327202)
@@ -6,18 +6,18 @@ arm/allwinner/a10_codec.c optionalsound
 arm/allwinner/a10_dmac.c   standard
 arm/allwinner/a31_dmac.c   standard
 arm/allwinner/a10_ehci.c   optionalehci
-arm/allwinner/aw_usbphy.c  optionalehci | ohci
-arm/allwinner/a10_gpio.c   optionalgpio
 arm/allwinner/a10_sramc.c  standard
+arm/allwinner/aw_gpio.coptionalgpio
+arm/allwinner/aw_if_dwc.c  optionaldwc
+arm/allwinner/aw_machdep.c standard
 arm/allwinner/aw_mmc.c optionalmmc
+arm/allwinner/aw_mp.c  optionalsmp
 arm/allwinner/aw_nmi.c optionalintrng
-arm/allwinner/aw_if_dwc.c  optionaldwc
 arm/allwinner/aw_rsb.c optionalrsb | p2wi
 arm/allwinner/aw_rtc.c standard
 arm/allwinner/aw_ts.c  standard
+arm/allwinner/aw_usbphy.c  optionalehci | ohci
 arm/allwinner/aw_wdog.cstandard
-arm/allwinner/aw_machdep.c standard
-arm/allwinner/aw_mp.c  optionalsmp
 arm/allwinner/axp209.c optionalaxp209
 arm/allwinner/axp81x.c optionalaxp81x
 arm/allwinner/if_awg.c optionalawg
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r327200 - in head/sys: conf netinet

2017-12-26 Thread Michael Tuexen
> On 26. Dec 2017, at 13:35, Michael Tuexen  wrote:
> 
> Author: tuexen
> Date: Tue Dec 26 12:35:02 2017
> New Revision: 327200
> URL: https://svnweb.freebsd.org/changeset/base/327200
> 
> Log:
>  When adding support for sending SCTP packets containing an ABORT chunk
>  to ipfw in https://svnweb.freebsd.org/changeset/base/326233,
>  a dependency on the SCTP stack was added to ipfw by accident.
> 
>  This was noted by Kevel Bowling in https://reviews.freebsd.org/D13594
>  where also a solution was suggested. This patch is based on Kevin's
>  suggestion, but implements the required SCTP checksum computation
>  without any dependency on other SCTP sources.
> 
>  While there, do some cleanups and improve comments.
> 
>  Thanks to Kevin Kevin Browling for reporting the issue and suggesting
>  a fix.
Thanks to Kevin Bowling. Sorry for the typo.

Best regards
Michael
> 
> Modified:
>  head/sys/conf/files
>  head/sys/netinet/sctp_crc32.c
>  head/sys/netinet/sctp_crc32.h
> 
> Modified: head/sys/conf/files
> ==
> --- head/sys/conf/files   Tue Dec 26 12:11:04 2017(r327199)
> +++ head/sys/conf/files   Tue Dec 26 12:35:02 2017(r327200)
> @@ -4255,7 +4255,7 @@ netinet/sctp_asconf.c   optional inet sctp | 
> inet6 sctp
> netinet/sctp_auth.c   optional inet sctp | inet6 sctp
> netinet/sctp_bsd_addr.c   optional inet sctp | inet6 sctp
> netinet/sctp_cc_functions.c   optional inet sctp | inet6 sctp
> -netinet/sctp_crc32.c optional inet sctp | inet6 sctp
> +netinet/sctp_crc32.c optional inet | inet6
> netinet/sctp_indata.c optional inet sctp | inet6 sctp
> netinet/sctp_input.c  optional inet sctp | inet6 sctp
> netinet/sctp_output.c optional inet sctp | inet6 sctp
> 
> Modified: head/sys/netinet/sctp_crc32.c
> ==
> --- head/sys/netinet/sctp_crc32.c Tue Dec 26 12:11:04 2017
> (r327199)
> +++ head/sys/netinet/sctp_crc32.c Tue Dec 26 12:35:02 2017
> (r327200)
> @@ -35,29 +35,36 @@
> #include 
> __FBSDID("$FreeBSD$");
> 
> +#include "opt_sctp.h"
> +
> +#ifdef SCTP
> #include 
> #include 
> #include 
> #include 
> +#else
> +#include 
> +#include 
> +#include 
> 
> +#include 
> +#endif
> 
> -
> static uint32_t
> sctp_finalize_crc32c(uint32_t crc32c)
> {
>   uint32_t result;
> -
> #if BYTE_ORDER == BIG_ENDIAN
>   uint8_t byte0, byte1, byte2, byte3;
> -
> #endif
> +
>   /* Complement the result */
>   result = ~crc32c;
> #if BYTE_ORDER == BIG_ENDIAN
>   /*
> -  * For BIG-ENDIAN.. aka Motorola byte order the result is in
> -  * little-endian form. So we must manually swap the bytes. Then we
> -  * can call htonl() which does nothing...
> +  * For BIG-ENDIAN platforms the result is in little-endian form. So
> +  * we must swap the bytes to return the result in network byte
> +  * order.
>*/
>   byte0 = result & 0x00ff;
>   byte1 = (result >> 8) & 0x00ff;
> @@ -66,56 +73,54 @@ sctp_finalize_crc32c(uint32_t crc32c)
>   crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3);
> #else
>   /*
> -  * For INTEL platforms the result comes out in network order. No
> -  * htonl is required or the swap above. So we optimize out both the
> -  * htonl and the manual swap above.
> +  * For LITTLE ENDIAN platforms the result is in already in network
> +  * byte order.
>*/
>   crc32c = result;
> #endif
>   return (crc32c);
> }
> 
> +/*
> + * Compute the SCTP checksum in network byte order for a given mbuf chain m
> + * which contains an SCTP packet starting at offset.
> + * Since this function is also called by ipfw, don't assume that
> + * it is compiled on a kernel with SCTP support.
> + */
> uint32_t
> sctp_calculate_cksum(struct mbuf *m, uint32_t offset)
> {
> - /*
> -  * given a mbuf chain with a packetheader offset by 'offset'
> -  * pointing at a sctphdr (with csum set to 0) go through the chain
> -  * of SCTP_BUF_NEXT()'s and calculate the SCTP checksum. This also
> -  * has a side bonus as it will calculate the total length of the
> -  * mbuf chain. Note: if offset is greater than the total mbuf
> -  * length, checksum=1, pktlen=0 is returned (ie. no real error code)
> -  */
>   uint32_t base = 0x;
> - struct mbuf *at;
> 
> - at = m;
> - /* find the correct mbuf and offset into mbuf */
> - while ((at != NULL) && (offset > (uint32_t)SCTP_BUF_LEN(at))) {
> - offset -= SCTP_BUF_LEN(at); /* update remaining offset
> -  * left */
> - at = SCTP_BUF_NEXT(at);
> - }
> - while (at != NULL) {
> - if ((SCTP_BUF_LEN(at) - offset) > 0) {
> - base = calculate_crc32c(base,
> -   

svn commit: r327200 - in head/sys: conf netinet

2017-12-26 Thread Michael Tuexen
Author: tuexen
Date: Tue Dec 26 12:35:02 2017
New Revision: 327200
URL: https://svnweb.freebsd.org/changeset/base/327200

Log:
  When adding support for sending SCTP packets containing an ABORT chunk
  to ipfw in https://svnweb.freebsd.org/changeset/base/326233,
  a dependency on the SCTP stack was added to ipfw by accident.
  
  This was noted by Kevel Bowling in https://reviews.freebsd.org/D13594
  where also a solution was suggested. This patch is based on Kevin's
  suggestion, but implements the required SCTP checksum computation
  without any dependency on other SCTP sources.
  
  While there, do some cleanups and improve comments.
  
  Thanks to Kevin Kevin Browling for reporting the issue and suggesting
  a fix.

Modified:
  head/sys/conf/files
  head/sys/netinet/sctp_crc32.c
  head/sys/netinet/sctp_crc32.h

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Dec 26 12:11:04 2017(r327199)
+++ head/sys/conf/files Tue Dec 26 12:35:02 2017(r327200)
@@ -4255,7 +4255,7 @@ netinet/sctp_asconf.c optional inet sctp | 
inet6 sctp
 netinet/sctp_auth.coptional inet sctp | inet6 sctp
 netinet/sctp_bsd_addr.coptional inet sctp | inet6 sctp
 netinet/sctp_cc_functions.coptional inet sctp | inet6 sctp
-netinet/sctp_crc32.c   optional inet sctp | inet6 sctp
+netinet/sctp_crc32.c   optional inet | inet6
 netinet/sctp_indata.c  optional inet sctp | inet6 sctp
 netinet/sctp_input.c   optional inet sctp | inet6 sctp
 netinet/sctp_output.c  optional inet sctp | inet6 sctp

Modified: head/sys/netinet/sctp_crc32.c
==
--- head/sys/netinet/sctp_crc32.c   Tue Dec 26 12:11:04 2017
(r327199)
+++ head/sys/netinet/sctp_crc32.c   Tue Dec 26 12:35:02 2017
(r327200)
@@ -35,29 +35,36 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_sctp.h"
+
+#ifdef SCTP
 #include 
 #include 
 #include 
 #include 
+#else
+#include 
+#include 
+#include 
 
+#include 
+#endif
 
-
 static uint32_t
 sctp_finalize_crc32c(uint32_t crc32c)
 {
uint32_t result;
-
 #if BYTE_ORDER == BIG_ENDIAN
uint8_t byte0, byte1, byte2, byte3;
-
 #endif
+
/* Complement the result */
result = ~crc32c;
 #if BYTE_ORDER == BIG_ENDIAN
/*
-* For BIG-ENDIAN.. aka Motorola byte order the result is in
-* little-endian form. So we must manually swap the bytes. Then we
-* can call htonl() which does nothing...
+* For BIG-ENDIAN platforms the result is in little-endian form. So
+* we must swap the bytes to return the result in network byte
+* order.
 */
byte0 = result & 0x00ff;
byte1 = (result >> 8) & 0x00ff;
@@ -66,56 +73,54 @@ sctp_finalize_crc32c(uint32_t crc32c)
crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3);
 #else
/*
-* For INTEL platforms the result comes out in network order. No
-* htonl is required or the swap above. So we optimize out both the
-* htonl and the manual swap above.
+* For LITTLE ENDIAN platforms the result is in already in network
+* byte order.
 */
crc32c = result;
 #endif
return (crc32c);
 }
 
+/*
+ * Compute the SCTP checksum in network byte order for a given mbuf chain m
+ * which contains an SCTP packet starting at offset.
+ * Since this function is also called by ipfw, don't assume that
+ * it is compiled on a kernel with SCTP support.
+ */
 uint32_t
 sctp_calculate_cksum(struct mbuf *m, uint32_t offset)
 {
-   /*
-* given a mbuf chain with a packetheader offset by 'offset'
-* pointing at a sctphdr (with csum set to 0) go through the chain
-* of SCTP_BUF_NEXT()'s and calculate the SCTP checksum. This also
-* has a side bonus as it will calculate the total length of the
-* mbuf chain. Note: if offset is greater than the total mbuf
-* length, checksum=1, pktlen=0 is returned (ie. no real error code)
-*/
uint32_t base = 0x;
-   struct mbuf *at;
 
-   at = m;
-   /* find the correct mbuf and offset into mbuf */
-   while ((at != NULL) && (offset > (uint32_t)SCTP_BUF_LEN(at))) {
-   offset -= SCTP_BUF_LEN(at); /* update remaining offset
-* left */
-   at = SCTP_BUF_NEXT(at);
-   }
-   while (at != NULL) {
-   if ((SCTP_BUF_LEN(at) - offset) > 0) {
-   base = calculate_crc32c(base,
-   (unsigned char *)(SCTP_BUF_AT(at, offset)),
-   (unsigned int)(SCTP_BUF_LEN(at) - offset));
+   while (offset > 0) {
+   KASSERT(m != NULL, ("sctp_calculate_cksum, offset > length of 
mbuf chain"));
+   

svn commit: r327199 - in head: share/man/man4 sys/arm/allwinner

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 12:11:04 2017
New Revision: 327199
URL: https://svnweb.freebsd.org/changeset/base/327199

Log:
  Allwinner: gpio: Rename driver to aw_gpio and add man page for it
  
  Reviewed by:  bcr (manpages)
  Differential Revision:https://reviews.freebsd.org/D13617

Added:
  head/share/man/man4/aw_gpio.4   (contents, props changed)
  head/sys/arm/allwinner/aw_gpio.c
 - copied, changed from r327196, head/sys/arm/allwinner/a10_gpio.c
Deleted:
  head/sys/arm/allwinner/a10_gpio.c
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 26 12:06:56 2017
(r327198)
+++ head/share/man/man4/MakefileTue Dec 26 12:11:04 2017
(r327199)
@@ -70,6 +70,7 @@ MAN=  aac.4 \
audit.4 \
auditpipe.4 \
aue.4 \
+   aw_gpio.4 \
aw_mmc.4 \
aw_rtc.4 \
axe.4 \

Added: head/share/man/man4/aw_gpio.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/aw_gpio.4   Tue Dec 26 12:11:04 2017
(r327199)
@@ -0,0 +1,102 @@
+.\"-
+.\" Copyright (c) 2017 Emmanuel Vadot 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Dec 25, 2017
+.Dt AW_GPIO 4
+.Os
+.Sh NAME
+.Nm aw_gpio
+.Nd driver for the GPIO and pin muxing functionalities on Allwinner SoC
+.Sh SYNOPSIS
+.Cd "device gpio"
+.Cd "options SOC_ALLWINNER_A10"
+.Cd "options SOC_ALLWINNER_A13"
+.Cd "options SOC_ALLWINNER_A20"
+.Cd "options SOC_ALLWINNER_A31"
+.Cd "options SOC_ALLWINNER_A31S"
+.Cd "options SOC_ALLWINNER_A33"
+.Cd "options SOC_ALLWINNER_A83T"
+.Cd "options SOC_ALLWINNER_H2PLUS"
+.Cd "options SOC_ALLWINNER_H3"
+.Cd "options SOC_ALLWINNER_A64"
+.Cd "options SOC_ALLWINNER_H5"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Allwinner pin muxing and GPIO on
+Allwinner SoCs.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the GPIO/pinmuxing controller with one of the following
+compatible strings :
+.Pp
+.Bl -bullet -compact
+.It
+allwinner,sun4i-a10-pinctrl
+.It
+allwinner,sun5i-a13-pinctrl
+.It
+allwinner,sun7i-a20-pinctrl
+.It
+allwinner,sun6i-a31-pinctrl
+.It
+allwinner,sun6i-a31s-pinctrl
+.It
+allwinner,sun6i-a31-r-pinctrl
+.It
+allwinner,sun6i-a33-pinctrl
+.It
+allwinner,sun8i-a83t-pinctrl
+.It
+allwinner,sun8i-a83t-r-pinctrl
+.It
+allwinner,sun8i-h3-pinctrl
+.It
+allwinner,sun50i-h5-pinctrl
+.It
+allwinner,sun8i-h3-r-pinctrl
+.It
+allwinner,sun50i-a64-pinctrl
+.It
+allwinner,sun50i-a64-r-pinctrl
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr gpio 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver was originally written by
+.An Ganbold Tsagaankhuu Aq Mt ganb...@freebsd.org .
+This manual page was written by
+.An Emmanuel Vadot Aq Mt m...@freebsd.org .

Copied and modified: head/sys/arm/allwinner/aw_gpio.c (from r327196, 
head/sys/arm/allwinner/a10_gpio.c)
==
--- head/sys/arm/allwinner/a10_gpio.c   Tue Dec 26 10:09:18 2017
(r327196, copy source)
+++ head/sys/arm/allwinner/aw_gpio.cTue Dec 26 12:11:04 2017
(r327199)
@@ -62,15 +62,15 @@ __FBSDID("$FreeBSD$");
 
 #include "gpio_if.h"
 
-#defineA10_GPIO_DEFAULT_CAPS   (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | 
\
+#defineAW_GPIO_DEFAULT_CAPS(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | 
\
 GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)
 
-#define   

svn commit: r327198 - in head: share/man/man4 sys/arm/allwinner

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 12:06:56 2017
New Revision: 327198
URL: https://svnweb.freebsd.org/changeset/base/327198

Log:
  Allwinner: mmc: Rename driver to aw_mmc and add a man page for it
  
  Reviewed by:  bcr (manpages)
  Differential Revision:https://reviews.freebsd.org/D13616

Added:
  head/share/man/man4/aw_mmc.4   (contents, props changed)
  head/sys/arm/allwinner/aw_mmc.c   (contents, props changed)
  head/sys/arm/allwinner/aw_mmc.h   (contents, props changed)
Deleted:
  head/sys/arm/allwinner/a10_mmc.c
  head/sys/arm/allwinner/a10_mmc.h
Modified:
  head/share/man/man4/Makefile
  head/sys/arm/allwinner/files.allwinner

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 26 10:59:54 2017
(r327197)
+++ head/share/man/man4/MakefileTue Dec 26 12:06:56 2017
(r327198)
@@ -70,6 +70,7 @@ MAN=  aac.4 \
audit.4 \
auditpipe.4 \
aue.4 \
+   aw_mmc.4 \
aw_rtc.4 \
axe.4 \
axge.4 \

Added: head/share/man/man4/aw_mmc.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/aw_mmc.4Tue Dec 26 12:06:56 2017
(r327198)
@@ -0,0 +1,76 @@
+.\"-
+.\" Copyright (c) 2017 Emmanuel Vadot 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Dec 25, 2017
+.Dt AW_MMC 4
+.Os
+.Sh NAME
+.Nm aw_mmc
+.Nd driver for the SD/MMC controller in Allwinner SoC
+.Sh SYNOPSIS
+.Cd "device mmc"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Allwinner SD/MMC host controller.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the SD/MMC controller with one of the following compatible 
strings :
+.Pp
+.Bl -bullet -compact
+.It
+allwinner,sun4i-a10-mmc
+.It
+allwinner,sun5i-a13-mmc
+.It
+allwinner,sun7i-a20-mmc
+.It
+allwinner,sun50i-a64-mmc
+.El
+.Sh SYSCTL VARIABLES
+The following read-only variables are available via
+.Xr sysctl 8 :
+.Bl -tag -width indent
+.It Va dev.aw_mmc.req_timeout
+Request timeout in seconds (default: 10) .
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr mmc 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver was originally written by
+.An Alexander Fedorov Aq Mt alexander.fedo...@rtlservice.com .
+Later work and this manual page was done by
+.An Emmanuel Vadot Aq Mt m...@freebsd.org .

Added: head/sys/arm/allwinner/aw_mmc.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/allwinner/aw_mmc.c Tue Dec 26 12:06:56 2017
(r327198)
@@ -0,0 +1,922 @@
+/*-
+ * Copyright (c) 2013 Alexander Fedorov
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE 

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

2017-12-26 Thread Emmanuel Vadot
Author: manu
Date: Tue Dec 26 10:59:54 2017
New Revision: 327197
URL: https://svnweb.freebsd.org/changeset/base/327197

Log:
  aw_rtc.4: Correct some error/style found by mandoc -Tlint

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

Modified: head/share/man/man4/aw_rtc.4
==
--- head/share/man/man4/aw_rtc.4Tue Dec 26 10:09:18 2017
(r327196)
+++ head/share/man/man4/aw_rtc.4Tue Dec 26 10:59:54 2017
(r327197)
@@ -30,7 +30,7 @@
 .Os
 .Sh NAME
 .Nm aw_rtc
-.Nd driver for the RTC controller in Allwinner SoC.
+.Nd driver for the RTC controller in Allwinner SoC
 .Sh DESCRIPTION
 The
 .Nm
@@ -48,6 +48,7 @@ allwinner,sun4i-a10-rtc
 allwinner,sun7i-a20-rtc
 .It
 allwinner,sun6i-a31-rtc
+.El
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"