svn commit: r263679 - head/sys/arm/include
Author: andrew Date: Mon Mar 24 08:24:32 2014 New Revision: 263679 URL: http://svnweb.freebsd.org/changeset/base/263679 Log: Move an else case that was missed in r263676 Modified: head/sys/arm/include/pmap.h Modified: head/sys/arm/include/pmap.h == --- head/sys/arm/include/pmap.h Mon Mar 24 01:21:37 2014(r263678) +++ head/sys/arm/include/pmap.h Mon Mar 24 08:24:32 2014(r263679) @@ -421,6 +421,31 @@ extern int pmap_needs_pte_sync; #define ARM_L2S_NRML_IWT_OWT (L2_C) #define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B) #define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B) +#else +#define ARM_L1S_STRONG_ORD (0) +#define ARM_L1S_DEVICE_NOSHARE (L1_S_TEX(2)) +#define ARM_L1S_DEVICE_SHARE (L1_S_B) +#define ARM_L1S_NRML_NOCACHE (L1_S_TEX(1)|L1_SHARED) +#define ARM_L1S_NRML_IWT_OWT (L1_S_C|L1_SHARED) +#define ARM_L1S_NRML_IWB_OWB (L1_S_C|L1_S_B|L1_SHARED) +#define ARM_L1S_NRML_IWBA_OWBA (L1_S_TEX(1)|L1_S_C|L1_S_B|L1_SHARED) + +#define ARM_L2L_STRONG_ORD (0) +#define ARM_L2L_DEVICE_NOSHARE (L2_L_TEX(2)) +#define ARM_L2L_DEVICE_SHARE (L2_B) +#define ARM_L2L_NRML_NOCACHE (L2_L_TEX(1)|L2_SHARED) +#define ARM_L2L_NRML_IWT_OWT (L2_C|L2_SHARED) +#define ARM_L2L_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) +#define ARM_L2L_NRML_IWBA_OWBA (L2_L_TEX(1)|L2_C|L2_B|L2_SHARED) + +#define ARM_L2S_STRONG_ORD (0) +#define ARM_L2S_DEVICE_NOSHARE (L2_S_TEX(2)) +#define ARM_L2S_DEVICE_SHARE (L2_B) +#define ARM_L2S_NRML_NOCACHE (L2_S_TEX(1)|L2_SHARED) +#define ARM_L2S_NRML_IWT_OWT (L2_C|L2_SHARED) +#define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) +#define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B|L2_SHARED) +#endif /* SMP */ #elif ARM_NMMUS > 1 /* More than one MMU class configured; use variables. */ @@ -462,31 +487,6 @@ extern int pmap_needs_pte_sync; #defineL1_C_PROTO L1_C_PROTO_xscale #defineL2_S_PROTO L2_S_PROTO_xscale -#else -#define ARM_L1S_STRONG_ORD (0) -#define ARM_L1S_DEVICE_NOSHARE (L1_S_TEX(2)) -#define ARM_L1S_DEVICE_SHARE (L1_S_B) -#define ARM_L1S_NRML_NOCACHE (L1_S_TEX(1)|L1_SHARED) -#define ARM_L1S_NRML_IWT_OWT (L1_S_C|L1_SHARED) -#define ARM_L1S_NRML_IWB_OWB (L1_S_C|L1_S_B|L1_SHARED) -#define ARM_L1S_NRML_IWBA_OWBA (L1_S_TEX(1)|L1_S_C|L1_S_B|L1_SHARED) - -#define ARM_L2L_STRONG_ORD (0) -#define ARM_L2L_DEVICE_NOSHARE (L2_L_TEX(2)) -#define ARM_L2L_DEVICE_SHARE (L2_B) -#define ARM_L2L_NRML_NOCACHE (L2_L_TEX(1)|L2_SHARED) -#define ARM_L2L_NRML_IWT_OWT (L2_C|L2_SHARED) -#define ARM_L2L_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) -#define ARM_L2L_NRML_IWBA_OWBA (L2_L_TEX(1)|L2_C|L2_B|L2_SHARED) - -#define ARM_L2S_STRONG_ORD (0) -#define ARM_L2S_DEVICE_NOSHARE (L2_S_TEX(2)) -#define ARM_L2S_DEVICE_SHARE (L2_B) -#define ARM_L2S_NRML_NOCACHE (L2_S_TEX(1)|L2_SHARED) -#define ARM_L2S_NRML_IWT_OWT (L2_C|L2_SHARED) -#define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) -#define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B|L2_SHARED) -#endif /* SMP */ #endif /* ARM_NMMUS > 1 */ #if defined(CPU_XSCALE_81342) || ARM_ARCH_6 || ARM_ARCH_7A ___ 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: r263686 - head/usr.sbin/pkg
Author: bdrewery Date: Mon Mar 24 13:13:52 2014 New Revision: 263686 URL: http://svnweb.freebsd.org/changeset/base/263686 Log: Add missing LIBM to DPADD from r263650 Reported by: jilles Modified: head/usr.sbin/pkg/Makefile Modified: head/usr.sbin/pkg/Makefile == --- head/usr.sbin/pkg/Makefile Mon Mar 24 12:41:00 2014(r263685) +++ head/usr.sbin/pkg/Makefile Mon Mar 24 13:13:52 2014(r263686) @@ -7,7 +7,7 @@ MAN=pkg.7 CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include .PATH: ${.CURDIR}/../../contrib/libucl/include DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \ - ${LIBCRYPTO} + ${LIBCRYPTO} ${LIBM} LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto -lm USEPRIVATELIB= ucl ___ 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: r263252 - head/sys/sys
On 17 Mar 2014, at 01:48, Eitan Adler wrote: >> Fix a comment in capability.h: it got renamed to capsicum.h, not >> capability.h. > > Perhaps it makes to sense to add a #warning statement to the file as well? > > Additionally, is it intended that this file live forever or will be > removed as some point in the future? Sorry about not following up more quickly. I don't want to add a #warning until after all in-tree consumers are converted, and I'm not yet ready to merge a new OpenBSM. I also want to wait until after the new header is available in 10-STABLE ... and possibly has appeared in a release. But it is something I plan to do in due course. Robert ___ 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: r263690 - head/sys/kern
Author: emax Date: Mon Mar 24 18:13:41 2014 New Revision: 263690 URL: http://svnweb.freebsd.org/changeset/base/263690 Log: change defaule permissions on /dev/devstat. while i'm here remove D_NEEDGIANT flag Submitted by: jhb Reviewed by: jhb, scottl, rwatson, delphij, phk MFC after:1 week Modified: head/sys/kern/subr_devstat.c Modified: head/sys/kern/subr_devstat.c == --- head/sys/kern/subr_devstat.cMon Mar 24 15:22:22 2014 (r263689) +++ head/sys/kern/subr_devstat.cMon Mar 24 18:13:41 2014 (r263690) @@ -460,7 +460,6 @@ static d_mmap_t devstat_mmap; static struct cdevsw devstat_cdevsw = { .d_version =D_VERSION, - .d_flags = D_NEEDGIANT, .d_mmap = devstat_mmap, .d_name = "devstat", }; @@ -482,13 +481,16 @@ devstat_mmap(struct cdev *dev, vm_ooffse if (nprot != VM_PROT_READ) return (-1); + mtx_lock(&devstat_mutex); TAILQ_FOREACH(spp, &pagelist, list) { if (offset == 0) { *paddr = vtophys(spp->stat); + mtx_unlock(&devstat_mutex); return (0); } offset -= PAGE_SIZE; } + mtx_unlock(&devstat_mutex); return (-1); } @@ -503,7 +505,7 @@ devstat_alloc(void) mtx_assert(&devstat_mutex, MA_NOTOWNED); if (!once) { make_dev_credf(MAKEDEV_ETERNAL | MAKEDEV_CHECKNAME, - &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0400, + &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0444, DEVSTAT_DEVICE_NAME); once = 1; } ___ 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: r263690 - head/sys/kern
Maksim Yevmenkin wrote this message on Mon, Mar 24, 2014 at 18:13 +: > Author: emax > Date: Mon Mar 24 18:13:41 2014 > New Revision: 263690 > URL: http://svnweb.freebsd.org/changeset/base/263690 > > Log: > change defaule permissions on /dev/devstat. while i'm here remove > D_NEEDGIANT flag I know that the following change is part of the remove D_NEEDGIANT, but I'm puzzled how this code either worked before, or continues to work.. It looks like pagelist was suppose to be protected by devstat_mutex, but previously wasn't and that this is fixing that bug, is this correct? > @@ -482,13 +481,16 @@ devstat_mmap(struct cdev *dev, vm_ooffse > > if (nprot != VM_PROT_READ) > return (-1); > + mtx_lock(&devstat_mutex); > TAILQ_FOREACH(spp, &pagelist, list) { > if (offset == 0) { > *paddr = vtophys(spp->stat); > + mtx_unlock(&devstat_mutex); > return (0); > } > offset -= PAGE_SIZE; > } > + mtx_unlock(&devstat_mutex); > return (-1); > } > -- 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"
svn commit: r263691 - in head/crypto/openssh: . contrib openbsd-compat
Author: des Date: Mon Mar 24 19:15:13 2014 New Revision: 263691 URL: http://svnweb.freebsd.org/changeset/base/263691 Log: Add a pre-merge script which reverts mechanical changes such as added $FreeBSD$ tags and man page dates. Add a post-merge script which reapplies these changes. Run both scripts to normalize the existing code base. As a result, many files which should have had $FreeBSD$ tags but didn't now have them. Partly rewrite the upgrade instructions and remove the now outdated list of tricks. Added: head/crypto/openssh/freebsd-post-merge.sh (contents, props changed) head/crypto/openssh/freebsd-pre-merge.sh (contents, props changed) Deleted: head/crypto/openssh/FREEBSD-tricks Modified: head/crypto/openssh/FREEBSD-upgrade head/crypto/openssh/auth.c head/crypto/openssh/auth2.c head/crypto/openssh/buffer.c head/crypto/openssh/channels.c head/crypto/openssh/cipher.c head/crypto/openssh/clientloop.c head/crypto/openssh/compat.c head/crypto/openssh/contrib/ssh-copy-id.1 (contents, props changed) head/crypto/openssh/kex.c head/crypto/openssh/misc.c head/crypto/openssh/moduli.5 (contents, props changed) head/crypto/openssh/mux.c (contents, props changed) head/crypto/openssh/openbsd-compat/blowfish.c (contents, props changed) head/crypto/openssh/openbsd-compat/bsd-misc.h (contents, props changed) head/crypto/openssh/packet.c head/crypto/openssh/pathnames.h (contents, props changed) head/crypto/openssh/sandbox-capsicum.c (contents, props changed) head/crypto/openssh/schnorr.c head/crypto/openssh/scp.1 (contents, props changed) head/crypto/openssh/serverloop.c head/crypto/openssh/sftp-common.c (contents, props changed) head/crypto/openssh/sftp.c head/crypto/openssh/ssh-add.1 (contents, props changed) head/crypto/openssh/ssh-agent.c head/crypto/openssh/ssh-gss.h (contents, props changed) head/crypto/openssh/ssh-keysign.8 (contents, props changed) head/crypto/openssh/ssh-pkcs11-helper.8 (contents, props changed) head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect2.c Modified: head/crypto/openssh/FREEBSD-upgrade == --- head/crypto/openssh/FREEBSD-upgrade Mon Mar 24 18:13:41 2014 (r263690) +++ head/crypto/openssh/FREEBSD-upgrade Mon Mar 24 19:15:13 2014 (r263691) @@ -3,81 +3,97 @@ FreeBSD maintainer's guide to OpenSSH-portable == -XXX -XXX this needs a complete rewrite -XXX svn merge from vendor branch, resolve conflicts manually -XXX (see FREEBSD-tricks for tips on how to reduce conflicts) -XXX run freebsd-configure.sh to generate config.h and krb5_config.h -XXX svn diff Makefile.in to see if the Makefiles need adjusting -XXX +00) Make sure your mail spool has plenty of free space. It'll fill up +pretty fast once you're done with this checklist. -0) Make sure your mail spool has plenty of free space. It'll fill up - pretty fast once you're done with this checklist. +01) Download the latest OpenSSH-portable tarball and signature from +OpenBSD (ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/). -1) Grab the latest OpenSSH-portable tarball from the OpenBSD FTP - site (ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/) +02) Verify the signature: -2) Unpack the tarball in a suitable directory. +$ gpg --verify openssh-X.YpZ.tar.gz.asc - $ tar xf openssh-X.YpZ.tar.gz \ - -X /usr/src/crypto/openssh/FREEBSD-Xlist +03) Unpack the tarball in a suitable directory: -3) Remove trash: +$ tar xf openssh-X.YpZ.tar.gz - Make sure -X took care of everything, and if it didn't, make sure - to update FREEBSD-Xlist so you won't miss it the next time. A good - way to do this is to run a test import and see if any new files - show up: +04) Copy to the vendor directory: - $ cvs -n import src/crypto/openssh OPENSSH x | grep \^N +$ svn co svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist +$ rsync --archive --delete openssh-X.YpZ/ dist/ -4) Import the sources: +05) Take care of added / deleted files: - $ cvs import src/crypto/openssh OPENSSH OpenSSH_X_YpZ +$ svn rm $(svn stat dist | awk '$1 == "!" { print $2 }') +$ svn add --no-auto-props $(svn stat dist | awk '$1 == "?" { print $2 }') -5) Resolve conflicts. Remember to bump the version number and - addendum in version.h, and update the default value in - ssh{,d}_config and ssh{,d}_config.5. +06) Commit: -6) Generate configure and config.h.in: +$ svn commit -m "Vendor import of OpenSSH X.YpZ." dist - $ autoconf - $ autoheader +07) Tag: - Note: this requires a recent version of autoconf, not autoconf213. +$ svn copy -m "Tag OpenSSH X.YpZ." \ +svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist \ +svn+ssh://svn.freebsd.org/base/vendor-
svn commit: r263692 - head
Author: dim Date: Mon Mar 24 19:21:14 2014 New Revision: 263692 URL: http://svnweb.freebsd.org/changeset/base/263692 Log: Add a note to UPDATING about customized kernel configuration files now requiring -gdwarf-2 for debug info, when using clang 3.4. Suggested by: adrian MFC after:3 days Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Mon Mar 24 19:15:13 2014(r263691) +++ head/UPDATING Mon Mar 24 19:21:14 2014(r263692) @@ -44,7 +44,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 to do so. Set WITHOUT_GPL_DTC if you require the BSDL compiler. 20140216: - Clang and llvm have been upgraded to 3.4 release. + Clang and llvm have been upgraded to 3.4 release. Please note that + clang 3.4 now defaults to DWARF4 debug information format when you + specify -g. Since kgdb(1) only supports DWARF2, you should update any + customized kernel configurations which include debug information to + explicitly use -gdwarf-2, e.g: + + makeoptions DEBUG=-gdwarf-2 + + This has already been applied to the appropriate GENERIC configuration + files, so if you inherit from those, no changes are required. 20140216: The nve(4) driver has been removed. Please use the nfe(4) driver ___ 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: r263692 - head
Makes we wonder why we didn’t put this in kmod.mk… Is there any reason not do? Warner On Mar 24, 2014, at 1:21 PM, Dimitry Andric wrote: > Author: dim > Date: Mon Mar 24 19:21:14 2014 > New Revision: 263692 > URL: http://svnweb.freebsd.org/changeset/base/263692 > > Log: > Add a note to UPDATING about customized kernel configuration files now > requiring -gdwarf-2 for debug info, when using clang 3.4. > > Suggested by:adrian > MFC after: 3 days > > Modified: > head/UPDATING > > Modified: head/UPDATING > == > --- head/UPDATING Mon Mar 24 19:15:13 2014(r263691) > +++ head/UPDATING Mon Mar 24 19:21:14 2014(r263692) > @@ -44,7 +44,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 > to do so. Set WITHOUT_GPL_DTC if you require the BSDL compiler. > > 20140216: > - Clang and llvm have been upgraded to 3.4 release. > + Clang and llvm have been upgraded to 3.4 release. Please note that > + clang 3.4 now defaults to DWARF4 debug information format when you > + specify -g. Since kgdb(1) only supports DWARF2, you should update any > + customized kernel configurations which include debug information to > + explicitly use -gdwarf-2, e.g: > + > + makeoptions DEBUG=-gdwarf-2 > + > + This has already been applied to the appropriate GENERIC configuration > + files, so if you inherit from those, no changes are required. > > 20140216: > The nve(4) driver has been removed. Please use the nfe(4) driver > ___ 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: r263692 - head
On 24 Mar 2014, at 20:36, Warner Losh wrote: > On Mar 24, 2014, at 1:21 PM, Dimitry Andric wrote: >> Author: dim >> Date: Mon Mar 24 19:21:14 2014 >> New Revision: 263692 >> URL: http://svnweb.freebsd.org/changeset/base/263692 >> >> Log: >> Add a note to UPDATING about customized kernel configuration files now >> requiring -gdwarf-2 for debug info, when using clang 3.4. > > Makes we wonder why we didn’t put this in kmod.mk… Is there any reason not > do? For modules, you can just DEBUG_FLAGS, like for world. But there is no default value of DEBUG_FLAGS in kmod.mk, at least I don't see any. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r263692 - head
On Mon, 2014-03-24 at 20:47 +0100, Dimitry Andric wrote: > On 24 Mar 2014, at 20:36, Warner Losh wrote: > > On Mar 24, 2014, at 1:21 PM, Dimitry Andric wrote: > >> Author: dim > >> Date: Mon Mar 24 19:21:14 2014 > >> New Revision: 263692 > >> URL: http://svnweb.freebsd.org/changeset/base/263692 > >> > >> Log: > >> Add a note to UPDATING about customized kernel configuration files now > >> requiring -gdwarf-2 for debug info, when using clang 3.4. > > > > Makes we wonder why we didn’t put this in kmod.mk… Is there any reason not > > do? > > For modules, you can just DEBUG_FLAGS, like for world. But there is no > default value of DEBUG_FLAGS in kmod.mk, at least I don't see any. > > -Dimitry > I guessing he meant kern.mk so that it would be in effect for both kernel and modules build. Something like this (which I've tested only for building an arm kernel without modules so far)... -- Ian Index: sys/conf/kern.mk === --- sys/conf/kern.mk (revision 263112) +++ sys/conf/kern.mk (working copy) @@ -162,3 +162,7 @@ CFLAGS+= -ffreestanding ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif + +.if ${COMPILER_TYPE} == "clang" && !empty(CFLAGS:M-g*) && empty(CFLAGS:M-gdwarf*) +CFLAGS+= -gdwarf-2 +.endif ___ 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: r263693 - in head: share/man/man4/man4.arm sys/arm/conf sys/arm/ti sys/arm/ti/am335x sys/boot/fdt/dts/arm
Author: loos Date: Mon Mar 24 20:06:27 2014 New Revision: 263693 URL: http://svnweb.freebsd.org/changeset/base/263693 Log: Adds the ADC driver for TI AM3xxx SoC family. The ADC has a 12bit resolution and its raw output can be read via sysctl(8) interface. The driver allows the setup of ADC clock, samples average and open delay (the number of clock cycles to wait before start the conversion). The TSC_ADC module is set in the general purpose mode (no touchscreen support). Tested on Beaglebone-black. Written based on AM335x TRM. Reviewed by: rpaulo Approved by: adrian (mentor) Tested by:me, Brian J. McGovern, Sulev-Madis Silber (ketas) Added: head/share/man/man4/man4.arm/ti_adc.4 (contents, props changed) head/sys/arm/ti/ti_adc.c (contents, props changed) head/sys/arm/ti/ti_adcreg.h (contents, props changed) head/sys/arm/ti/ti_adcvar.h (contents, props changed) Modified: head/share/man/man4/man4.arm/Makefile head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/files.ti head/sys/arm/ti/ti_prcm.h head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/share/man/man4/man4.arm/Makefile == --- head/share/man/man4/man4.arm/Makefile Mon Mar 24 19:21:14 2014 (r263692) +++ head/share/man/man4/man4.arm/Makefile Mon Mar 24 20:06:27 2014 (r263693) @@ -1,6 +1,9 @@ # $FreeBSD$ -MAN= mge.4 npe.4 devcfg.4 +MAN= devcfg.4 \ + mge.4 \ + npe.4 \ + ti_adc.4 MLINKS= mge.4 if_mge.4 MLINKS+=npe.4 if_npe.4 Added: head/share/man/man4/man4.arm/ti_adc.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/man4.arm/ti_adc.4 Mon Mar 24 20:06:27 2014 (r263693) @@ -0,0 +1,119 @@ +.\" +.\" Copyright (c) 2014 Luiz Otavio O Souza +.\" 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 ``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 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 March 21, 2014 +.Dt TI_ADC 4 +.Os +.Sh NAME +.Nm ti_adc +.Nd TI AM3XXX analog to digital converter driver +.Sh SYNOPSIS +.Cd "device ti_adc" +.Sh DESCRIPTION +The +.Nm +driver provides access to the AIN (analog inputs) on am3xxx SoCs. +.Pp +It provides raw readings of the converted values for each analog inputs. +.Pp +The access to +.Nm +data is made via the +.Xr sysctl 8 +interface: +.Bd -literal +dev.ti_adc.0.%desc: TI ADC controller +dev.ti_adc.0.%driver: ti_adc +dev.ti_adc.0.%pnpinfo: name=adc@44E0D000 compat=ti,adc +dev.ti_adc.0.%parent: simplebus0 +dev.ti_adc.0.clockdiv: 2400 +dev.ti_adc.0.ain.0.enable: 0 +dev.ti_adc.0.ain.0.open_delay: 0 +dev.ti_adc.0.ain.0.samples_avg: 0 +dev.ti_adc.0.ain.0.input: 0 +dev.ti_adc.0.ain.1.enable: 0 +dev.ti_adc.0.ain.1.open_delay: 0 +dev.ti_adc.0.ain.1.samples_avg: 0 +dev.ti_adc.0.ain.1.input: 0 +dev.ti_adc.0.ain.2.enable: 0 +dev.ti_adc.0.ain.2.open_delay: 0 +dev.ti_adc.0.ain.2.samples_avg: 0 +dev.ti_adc.0.ain.2.input: 0 +dev.ti_adc.0.ain.3.enable: 0 +dev.ti_adc.0.ain.3.open_delay: 0 +dev.ti_adc.0.ain.3.samples_avg: 0 +dev.ti_adc.0.ain.3.input: 0 +dev.ti_adc.0.ain.4.enable: 0 +dev.ti_adc.0.ain.4.open_delay: 0 +dev.ti_adc.0.ain.4.samples_avg: 0 +dev.ti_adc.0.ain.4.input: 0 +dev.ti_adc.0.ain.5.enable: 0 +dev.ti_adc.0.ain.5.open_delay: 0 +dev.ti_adc.0.ain.5.samples_avg: 0 +dev.ti_adc.0.ain.5.input: 0 +dev.ti_adc.0.ain.6.enable: 1 +dev.ti_adc.0.ain.6.open_delay: 0 +dev.ti_adc.0.ain.6.samples_avg: 4 +dev.ti_adc.0.ain.6.input: 2308 +.Ed +.Pp +Global settings: +.Bl -tag -width ".Va dev.ti_adc.0.clockdiv" +.It Va dev.ti_adc.0.clockdiv +Sets the ADC clock prescaler. +The minimum value is 10 and the maxim
Re: svn commit: r263692 - head
On Mar 24, 2014, at 2:01 PM, Ian Lepore wrote: > On Mon, 2014-03-24 at 20:47 +0100, Dimitry Andric wrote: >> On 24 Mar 2014, at 20:36, Warner Losh wrote: >>> On Mar 24, 2014, at 1:21 PM, Dimitry Andric wrote: Author: dim Date: Mon Mar 24 19:21:14 2014 New Revision: 263692 URL: http://svnweb.freebsd.org/changeset/base/263692 Log: Add a note to UPDATING about customized kernel configuration files now requiring -gdwarf-2 for debug info, when using clang 3.4. >>> >>> Makes we wonder why we didn’t put this in kmod.mk… Is there any reason not >>> do? >> >> For modules, you can just DEBUG_FLAGS, like for world. But there is no >> default value of DEBUG_FLAGS in kmod.mk, at least I don't see any. >> >> -Dimitry >> > > I guessing he meant kern.mk so that it would be in effect for both > kernel and modules build. Something like this (which I've tested only > for building an arm kernel without modules so far)... > > -- Ian > > Index: sys/conf/kern.mk > === > --- sys/conf/kern.mk (revision 263112) > +++ sys/conf/kern.mk (working copy) > @@ -162,3 +162,7 @@ CFLAGS+= -ffreestanding > ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" > CFLAGS+= -fstack-protector > .endif > + > +.if ${COMPILER_TYPE} == "clang" && !empty(CFLAGS:M-g*) && > empty(CFLAGS:M-gdwarf*) > +CFLAGS+= -gdwarf-2 > +.endif Exactly. We don’t need more kludge-o-ramas for this in the config files, we need fewer. Since clang doesn’t play well with the kernel on this detail, and since the kernel makefiles can cope, we should make them rather than having it hard-coded in lots of config files (or std.* files) that we’ll just need to remove later when we have a dwarf 4 solution. Warner ___ 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: r263694 - head/sbin/devd
Author: dim Date: Mon Mar 24 20:30:39 2014 New Revision: 263694 URL: http://svnweb.freebsd.org/changeset/base/263694 Log: Apply a temporary band-aid for building devd with clang 3.4, libstdc++ and -Wsystem-headers enabled (which is the default for any non-zero WARNS level, crazily enough!). This is primarily meant to be MFC'd as soon as possible. MFC after:3 days Modified: head/sbin/devd/Makefile Modified: head/sbin/devd/Makefile == --- head/sbin/devd/Makefile Mon Mar 24 20:06:27 2014(r263693) +++ head/sbin/devd/Makefile Mon Mar 24 20:30:39 2014(r263694) @@ -13,6 +13,7 @@ LDADD=-ll -lutil YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} +CFLAGS.clang+=-Wno-keyword-compat CLEANFILES= y.output ___ 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: r263698 - in head/sys/arm: allwinner/a20 conf
Author: ganbold Date: Tue Mar 25 01:34:39 2014 New Revision: 263698 URL: http://svnweb.freebsd.org/changeset/base/263698 Log: Add code for enabling second CPU core for A20 SoC. Enable SMP on Cubieboard2. Approved by: stas (mentor) Added: head/sys/arm/allwinner/a20/a20_mp.c (contents, props changed) Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/conf/CUBIEBOARD2 Added: head/sys/arm/allwinner/a20/a20_mp.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a20/a20_mp.c Tue Mar 25 01:34:39 2014 (r263698) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * 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 ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#defineCPUCFG_BASE 0x01c25c00 +#defineCPUCFG_SIZE 0x400 + +#defineCPU0_RST_CTL0x40 +#defineCPU0_CTL0x44 +#defineCPU0_STATUS 0x48 +#defineCPU1_RST_CTL0x80 +#defineCPU1_CTL0x84 +#defineCPU1_STATUS 0x88 +#defineCPUCFG_GENCTL 0x184 +#defineCPUCFG_P_REG0 0x1a4 +#defineCPU1_PWR_CLAMP 0x1b0 +#defineCPU1_PWROFF_REG 0x1b4 +#defineCPUCFG_DBGCTL0 0x1e0 +#defineCPUCFG_DBGCTL1 0x1e4 + +void +platform_mp_init_secondary(void) +{ + + gic_init_secondary(); +} + +void +platform_mp_setmaxid(void) +{ + int ncpu; + + if (mp_ncpus != 0) + return; + + /* Read current CP15 Cache Size ID Register */ + __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); + ncpu = ((ncpu >> 24) & 0x3) + 1; + + mp_ncpus = ncpu; + mp_maxid = ncpu - 1; +} + +int +platform_mp_probe(void) +{ + + if (mp_ncpus == 0) + platform_mp_setmaxid(); + + return (mp_ncpus > 1); +} + +void +platform_mp_start_ap(void) +{ + bus_space_handle_t cpucfg; + + uint32_t val; + + if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, 0, + &cpucfg) != 0) + panic("Couldn't map the CPUCFG\n"); + + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, + pmap_kextract((vm_offset_t)mpentry)); + + /* +* Assert nCOREPORESET low and set L1RSTDISABLE low. +* Ensure DBGPWRDUP is set to LOW to prevent any external +* debug access to the processor. +*/ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 0); + + /* Set L1RSTDISABLE low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL, val); + + /* Set DBGPWRDUP low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); + + /* Release power clamp */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0xff); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x7f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x3f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x1f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x0f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x07); + bus_space_write_4(fdtbus_bs_tag,
Re: svn commit: r263690 - head/sys/kern
On Mon, Mar 24, 2014 at 11:59 AM, John-Mark Gurney wrote: > Maksim Yevmenkin wrote this message on Mon, Mar 24, 2014 at 18:13 +: >> Author: emax >> Date: Mon Mar 24 18:13:41 2014 >> New Revision: 263690 >> URL: http://svnweb.freebsd.org/changeset/base/263690 >> >> Log: >> change defaule permissions on /dev/devstat. while i'm here remove >> D_NEEDGIANT flag > > I know that the following change is part of the remove D_NEEDGIANT, but > I'm puzzled how this code either worked before, or continues to work.. hmm... beats me too... pagelist is only growing and never shrinking, and new pages are added to the of the list, so may be that the reason, i.e. window for race is very small > It looks like pagelist was suppose to be protected by devstat_mutex, > but previously wasn't and that this is fixing that bug, is this > correct? it should fix it, yes. thanks max ___ 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: r263704 - head/sys/kern
Author: mjg Date: Tue Mar 25 03:28:58 2014 New Revision: 263704 URL: http://svnweb.freebsd.org/changeset/base/263704 Log: Make /dev/devctl mpsafe. MFC after:1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cTue Mar 25 03:25:30 2014(r263703) +++ head/sys/kern/subr_bus.cTue Mar 25 03:28:58 2014(r263704) @@ -358,15 +358,16 @@ device_sysctl_fini(device_t dev) /* Deprecated way to adjust queue length */ static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); /* XXX Need to support old-style tunable hw.bus.devctl_disable" */ -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, NULL, -0, sysctl_devctl_disable, "I", "devctl disable -- deprecated"); +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW | +CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_disable, "I", +"devctl disable -- deprecated"); #define DEVCTL_DEFAULT_QUEUE_LEN 1000 static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS); static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN; TUNABLE_INT("hw.bus.devctl_queue", &devctl_queue_length); -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RW, NULL, -0, sysctl_devctl_queue, "I", "devctl queue length"); +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RW | +CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_queue, "I", "devctl queue length"); static d_open_tdevopen; static d_close_t devclose; @@ -376,7 +377,6 @@ static d_poll_t devpoll; static struct cdevsw dev_cdevsw = { .d_version =D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = devopen, .d_close = devclose, .d_read = devread, @@ -420,23 +420,31 @@ devinit(void) static int devopen(struct cdev *dev, int oflags, int devtype, struct thread *td) { + if (devsoftc.inuse) return (EBUSY); + mtx_lock(&devsoftc.mtx); + if (devsoftc.inuse) { + mtx_unlock(&devsoftc.mtx); + return (EBUSY); + } /* move to init */ devsoftc.inuse = 1; devsoftc.nonblock = 0; devsoftc.async_proc = NULL; + mtx_unlock(&devsoftc.mtx); return (0); } static int devclose(struct cdev *dev, int fflag, int devtype, struct thread *td) { - devsoftc.inuse = 0; + mtx_lock(&devsoftc.mtx); + devsoftc.inuse = 0; + devsoftc.async_proc = NULL; cv_broadcast(&devsoftc.cv); mtx_unlock(&devsoftc.mtx); - devsoftc.async_proc = NULL; return (0); } ___ 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: r263710 - in head/sys: net netpfil/pf
Author: mm Date: Tue Mar 25 06:55:53 2014 New Revision: 263710 URL: http://svnweb.freebsd.org/changeset/base/263710 Log: Merge from projects/pf r251993 (glebius@): De-vnet hash sizes and hash masks. Submitted by: Nikos Vassiliadis Reviewed by: trociny MFC after:1 month Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Directory Properties: head/sys/ (props changed) Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hTue Mar 25 04:45:55 2014(r263709) +++ head/sys/net/pfvar.hTue Mar 25 06:55:53 2014(r263710) @@ -1488,19 +1488,17 @@ struct pf_idhash { struct mtx lock; }; +extern u_long pf_hashmask; +extern u_long pf_srchashmask; #definePF_HASHSIZ (32768) VNET_DECLARE(struct pf_keyhash *, pf_keyhash); VNET_DECLARE(struct pf_idhash *, pf_idhash); -VNET_DECLARE(u_long, pf_hashmask); #define V_pf_keyhash VNET(pf_keyhash) #defineV_pf_idhash VNET(pf_idhash) -#defineV_pf_hashmask VNET(pf_hashmask) VNET_DECLARE(struct pf_srchash *, pf_srchash); -VNET_DECLARE(u_long, pf_srchashmask); #defineV_pf_srchashVNET(pf_srchash) -#define V_pf_srchashmask VNET(pf_srchashmask) -#define PF_IDHASH(s) (be64toh((s)->id) % (V_pf_hashmask + 1)) +#define PF_IDHASH(s) (be64toh((s)->id) % (pf_hashmask + 1)) VNET_DECLARE(void *, pf_swi_cookie); #define V_pf_swi_cookieVNET(pf_swi_cookie) Modified: head/sys/netpfil/pf/if_pfsync.c == --- head/sys/netpfil/pf/if_pfsync.c Tue Mar 25 04:45:55 2014 (r263709) +++ head/sys/netpfil/pf/if_pfsync.c Tue Mar 25 06:55:53 2014 (r263710) @@ -683,7 +683,7 @@ pfsync_in_clr(struct pfsync_pkt *pkt, st pfi_kif_find(clr[i].ifname) == NULL) continue; - for (int i = 0; i <= V_pf_hashmask; i++) { + for (int i = 0; i <= pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_state *s; relock: @@ -2048,7 +2048,7 @@ pfsync_bulk_update(void *arg) else i = sc->sc_bulk_hashid; - for (; i <= V_pf_hashmask; i++) { + for (; i <= pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; if (s != NULL) Modified: head/sys/netpfil/pf/pf.c == --- head/sys/netpfil/pf/pf.cTue Mar 25 04:45:55 2014(r263709) +++ head/sys/netpfil/pf/pf.cTue Mar 25 06:55:53 2014(r263710) @@ -361,21 +361,19 @@ enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI static MALLOC_DEFINE(M_PFHASH, "pf_hash", "pf(4) hash header structures"); VNET_DEFINE(struct pf_keyhash *, pf_keyhash); VNET_DEFINE(struct pf_idhash *, pf_idhash); -VNET_DEFINE(u_long, pf_hashmask); VNET_DEFINE(struct pf_srchash *, pf_srchash); -VNET_DEFINE(u_long, pf_srchashmask); SYSCTL_NODE(_net, OID_AUTO, pf, CTLFLAG_RW, 0, "pf(4)"); -VNET_DEFINE(u_long, pf_hashsize); -#defineV_pf_hashsize VNET(pf_hashsize) -SYSCTL_VNET_UINT(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_RDTUN, -&VNET_NAME(pf_hashsize), 0, "Size of pf(4) states hashtable"); - -VNET_DEFINE(u_long, pf_srchashsize); -#defineV_pf_srchashsizeVNET(pf_srchashsize) -SYSCTL_VNET_UINT(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, -&VNET_NAME(pf_srchashsize), 0, "Size of pf(4) source nodes hashtable"); +u_long pf_hashmask; +u_long pf_srchashmask; +static u_long pf_hashsize; +static u_long pf_srchashsize; + +SYSCTL_UINT(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_RDTUN, +&pf_hashsize, 0, "Size of pf(4) states hashtable"); +SYSCTL_UINT(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, +&pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); VNET_DEFINE(void *, pf_swi_cookie); @@ -391,7 +389,7 @@ pf_hashkey(struct pf_state_key *sk) sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), V_pf_hashseed); - return (h & V_pf_hashmask); + return (h & pf_hashmask); } static __inline uint32_t @@ -412,7 +410,7 @@ pf_hashsrc(struct pf_addr *addr, sa_fami panic("%s: unknown address family %u", __func__, af); } - return (h & V_pf_srchashmask); + return (h & pf_srchashmask); } #ifdef INET6 @@ -574,7 +572,7 @@ pf_overload_task(void *c, int pending) if (SLIST_EMPTY(&queue)) return; - for (int i = 0; i <= V_pf_hashmask; i++) { + for (int i = 0; i <= pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_state_key *sk; struct pf_state *s; @@ -739,12 +737,12 @@ pf_initi