CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Jun 9 06:43:30 UTC 2017 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Maintain the split of physical memory into the defined freelists, but only force pool pages to VM_FREELIST_FIRST512M for non _LP64 To generate a diff of this commit: cvs rdiff -u -r1.277 -r1.278 src/sys/arch/mips/mips/mips_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.277 src/sys/arch/mips/mips/mips_machdep.c:1.278 --- src/sys/arch/mips/mips/mips_machdep.c:1.277 Sun May 7 05:45:07 2017 +++ src/sys/arch/mips/mips/mips_machdep.c Fri Jun 9 06:43:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.277 2017/05/07 05:45:07 skrll Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.278 2017/06/09 06:43:30 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.277 2017/05/07 05:45:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.278 2017/06/09 06:43:30 skrll Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -2104,13 +2104,14 @@ mips_page_physload(vaddr_t vkernstart, v #ifdef VM_FREELIST_FIRST4G if (round_page(segs[i].start + segs[i].size) > FOURGIG) { need4g = true; - mips_poolpage_vmfreelist = VM_FREELIST_FIRST4G; } #endif #ifdef VM_FREELIST_FIRST512M if (round_page(segs[i].start + segs[i].size) > HALFGIG) { need512m = true; +#if !defined(_LP64) mips_poolpage_vmfreelist = VM_FREELIST_FIRST512M; +#endif } #endif }
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Jun 9 06:39:24 UTC 2017 Modified Files: src/sys/arch/mips/mips: pmap_machdep.c Log Message: Always use XKPHYS for pool pages on _LP64; otherwise use KSEG0 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/mips/pmap_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/pmap_machdep.c diff -u src/sys/arch/mips/mips/pmap_machdep.c:1.20 src/sys/arch/mips/mips/pmap_machdep.c:1.21 --- src/sys/arch/mips/mips/pmap_machdep.c:1.20 Mon Jun 5 10:45:36 2017 +++ src/sys/arch/mips/mips/pmap_machdep.c Fri Jun 9 06:39:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_machdep.c,v 1.20 2017/06/05 10:45:36 skrll Exp $ */ +/* $NetBSD: pmap_machdep.c,v 1.21 2017/06/09 06:39:24 skrll Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.20 2017/06/05 10:45:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.21 2017/06/09 06:39:24 skrll Exp $"); /* * Manages physical address maps. @@ -1065,12 +1065,10 @@ vaddr_t pmap_md_pool_phystov(paddr_t pa) { #ifdef _LP64 - if ((pa & ~MIPS_PHYS_MASK) != 0) { - KASSERT(mips_options.mips3_xkphys_cached); - return MIPS_PHYS_TO_XKPHYS_CACHED(pa); - } + KASSERT(mips_options.mips3_xkphys_cached); + return MIPS_PHYS_TO_XKPHYS_CACHED(pa); #else KASSERT((pa & ~MIPS_PHYS_MASK) == 0); -#endif return MIPS_PHYS_TO_KSEG0(pa); +#endif }
CVS commit: src
Module Name:src Committed By: knakahara Date: Fri Jun 9 06:09:02 UTC 2017 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/crypto/opencrypto: Makefile t_opencrypto.sh Added Files: src/tests/crypto/opencrypto: h_ioctl.c Log Message: add tests of ioctl for /dev/crypto To generate a diff of this commit: cvs rdiff -u -r1.217 -r1.218 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.752 -r1.753 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.3 -r1.4 src/tests/crypto/opencrypto/Makefile cvs rdiff -u -r0 -r1.1 src/tests/crypto/opencrypto/h_ioctl.c cvs rdiff -u -r1.7 -r1.8 src/tests/crypto/opencrypto/t_opencrypto.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.217 src/distrib/sets/lists/debug/mi:1.218 --- src/distrib/sets/lists/debug/mi:1.217 Mon Jun 5 23:44:08 2017 +++ src/distrib/sets/lists/debug/mi Fri Jun 9 06:09:01 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.217 2017/06/05 23:44:08 christos Exp $ +# $NetBSD: mi,v 1.218 2017/06/09 06:09:01 knakahara Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -1599,6 +1599,7 @@ ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_comp_zlib.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_comp_zlib_rnd.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_gcm.debug tests-crypto-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/crypto/opencrypto/h_ioctl.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_md5.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_md5hmac.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_null.debug tests-crypto-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.752 src/distrib/sets/lists/tests/mi:1.753 --- src/distrib/sets/lists/tests/mi:1.752 Thu Jun 1 15:45:02 2017 +++ src/distrib/sets/lists/tests/mi Fri Jun 9 06:09:01 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.752 2017/06/01 15:45:02 perseant Exp $ +# $NetBSD: mi,v 1.753 2017/06/09 06:09:01 knakahara Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1354,6 +1354,7 @@ ./usr/tests/crypto/opencrypto/h_comp_zlib tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/h_comp_zlib_rnd tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/h_gcm tests-crypto-tests compattestfile,atf +./usr/tests/crypto/opencrypto/h_ioctl tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/h_md5 tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/h_md5hmac tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/h_null tests-crypto-tests compattestfile,atf Index: src/tests/crypto/opencrypto/Makefile diff -u src/tests/crypto/opencrypto/Makefile:1.3 src/tests/crypto/opencrypto/Makefile:1.4 --- src/tests/crypto/opencrypto/Makefile:1.3 Mon Apr 17 03:59:37 2017 +++ src/tests/crypto/opencrypto/Makefile Fri Jun 9 06:09:02 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2017/04/17 03:59:37 knakahara Exp $ +# $NetBSD: Makefile,v 1.4 2017/06/09 06:09:02 knakahara Exp $ .include @@ -25,9 +25,9 @@ PROGS+= h_md5hmac PROGS+= h_null PROGS+= h_sha1hmac PROGS+= h_xcbcmac +PROGS+= h_ioctl LDADD.h_comp_zlib+= -lz LDADD.h_comp_zlib_rnd+= -lz .include - Index: src/tests/crypto/opencrypto/t_opencrypto.sh diff -u src/tests/crypto/opencrypto/t_opencrypto.sh:1.7 src/tests/crypto/opencrypto/t_opencrypto.sh:1.8 --- src/tests/crypto/opencrypto/t_opencrypto.sh:1.7 Mon Apr 17 03:59:37 2017 +++ src/tests/crypto/opencrypto/t_opencrypto.sh Fri Jun 9 06:09:02 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_opencrypto.sh,v 1.7 2017/04/17 03:59:37 knakahara Exp $ +# $NetBSD: t_opencrypto.sh,v 1.8 2017/06/09 06:09:02 knakahara Exp $ # # Copyright (c) 2014 The NetBSD Foundation, Inc. # All rights reserved. @@ -282,6 +282,19 @@ xcbcmac_cleanup() { common_cleanup } +atf_test_case ioctl cleanup +ioctl_head() { + common_head "Test ioctl for /dev/crypto" +} + +ioctl_body() { + common_body h_ioctl +} + +ioctl_cleanup() { + common_cleanup +} + atf_init_test_cases() { RUMP_SERVER="unix://t_opencrypto_socket" ; export RUMP_SERVER @@ -301,4 +314,5 @@ atf_init_test_cases() { atf_add_test_case null atf_add_test_case sha1_hmac atf_add_test_case xcbcmac + atf_add_test_case ioctl } Added files: Index: src/tests/crypto/opencrypto/h_ioctl.c diff -u /dev/null src/tests/crypto/opencrypto/h_ioctl.c:1.1 --- /dev/null Fri
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nonaka Date: Fri Jun 9 04:48:58 UTC 2017 Modified Files: src/sys/dev/pci: if_iwm.c Log Message: fix typo. reported by ryo@. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_iwm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwm.c diff -u src/sys/dev/pci/if_iwm.c:1.73 src/sys/dev/pci/if_iwm.c:1.74 --- src/sys/dev/pci/if_iwm.c:1.73 Thu Jun 1 02:45:11 2017 +++ src/sys/dev/pci/if_iwm.c Fri Jun 9 04:48:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwm.c,v 1.73 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: if_iwm.c,v 1.74 2017/06/09 04:48:58 nonaka Exp $ */ /* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */ #define IEEE80211_NO_HT /* @@ -106,7 +106,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.73 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.74 2017/06/09 04:48:58 nonaka Exp $"); #include #include @@ -3044,7 +3044,7 @@ iwm_send_paging_cmd(struct iwm_softc *sc fw_paging_cmd.device_phy_addr.addr32[blk_idx] = htole32(dev_phy_addr); } - dmap = sc->fw_paging_db[blk_idx].fw_paging_block.map, + dmap = sc->fw_paging_db[blk_idx].fw_paging_block.map; bus_dmamap_sync(sc->sc_dmat, dmap, 0, dmap->dm_mapsize, BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); }
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Fri Jun 9 04:43:33 UTC 2017 Modified Files: src/sys/dev/mii: mdio.h Log Message: - Update IEEE 802.3 Clause 45 definitions from IEEE 802.3 2009 to IEEE 802.3 2015. - Modify register names. - Modify comments. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/mii/mdio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/mii/mdio.h diff -u src/sys/dev/mii/mdio.h:1.5 src/sys/dev/mii/mdio.h:1.6 --- src/sys/dev/mii/mdio.h:1.5 Wed Jun 7 03:32:39 2017 +++ src/sys/dev/mii/mdio.h Fri Jun 9 04:43:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mdio.h,v 1.5 2017/06/07 03:32:39 msaitoh Exp $ */ +/* $NetBSD: mdio.h,v 1.6 2017/06/09 04:43:33 msaitoh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,14 +35,13 @@ /* * IEEE 802.3 Clause 45 definitions. * From: - * IEEE 802.3 2009 + * IEEE 802.3 2015 * IEEE 802.3at * IEEE 802.3av - * IEEE 802.3az */ /* - * MDIO Manageable Device addresses. + * MDIO Manageable Device (MMD) addresses. * Table 45-1 */ #define MDIO_MMD_PMAPMD 1 @@ -52,12 +51,16 @@ #define MDIO_MMD_DTEXS 5 #define MDIO_MMD_TC 6 #define MDIO_MMD_AN 7 +#define MDIO_MMD_SEPPMA1 8 +#define MDIO_MMD_SEPPMA2 9 +#define MDIO_MMD_SEPPMA3 10 +#define MDIO_MMD_SEPPMA4 11 #define MDIO_MMD_CL22EXT 29 #define MDIO_MMD_VNDSP1 30 #define MDIO_MMD_VNDSP2 31 /* - * MDIO PMA/PMD registers. + * PMA/PMD registers. * Table 45-3 */ #define MDIO_PMAPMD_CTRL1 0 /* PMA/PMD control 1 */ @@ -73,10 +76,11 @@ #define MDIO_PMAPMD_RXSIGDTCT 10 /* 10G PMD receive signal detect */ #define MDIO_PMAPMD_EXTABLTY 11 /* 10G PMA/PMD ext. ability reg */ #define MDIO_PMAPMD_P2MPABLTY 12 /* P2MP ability register(802.3av)*/ - /* Value 13 is reserved */ +#define MDIO_PMAPMD_40G100GEXTABLTY 13 /* 40G/100G extended ability */ #define MDIO_PMAPMD_PKGID1 14 /* PMA/PMD package identifier 1 */ #define MDIO_PMAPMD_PKGID2 15 /* PMA/PMD package identifier 2 */ - /* Values 16 to 29 are reserved */ +#define MDIO_PMAPMD_EEECAP 16 /* PMA/PMD EEE capability */ + /* Values 17 to 29 are reserved */ #define MDIO_PMAPMD_10P2BCTRL 30 /* 10P/2B PMA/PMD control */ #define MDIO_PMAPMD_10P2BSTAT 31 /* 10P/2B PMA/PMD status */ #define MDIO_PMAPMD_10P2BLPCTRL 32 /* 10P/2B link partner PMA/D ctrl*/ @@ -170,28 +174,114 @@ #define MDIO_PMAPMD_10GTSKEWDLY2 146 /* 10G-T skew delay 2 */ #define MDIO_PMAPMD_10GTFSTRETSTATCTRL 147 /* 10G-T fast retrain stat&ctrl */ /* Values 148 to 149 are reserved */ -#define MDIO_PMAPMD_10GKRPMDCTRL 150 /* 10G-KR PMD control */ -#define MDIO_PMAPMD_10GKRPMDSTAT 151 /* 10G-KR PMD status */ -#define MDIO_PMAPMD_10GKRLPCOEFUPD 152 /* 10G-KR LP coefficient update */ -#define MDIO_PMAPMD_10GKRLPSTATRPT 153 /* 10G-KR LP status report */ -#define MDIO_PMAPMD_10GKRLDCOEFFUPD 154 /* 10G-KR LD coefficient update */ -#define MDIO_PMAPMD_10GKRLDSTATRPT 155 /* 10G-KR LD status report */ - /* Values 156 to 159 are reserved */ -#define MDIO_PMAPMD_10GKXCTRL 160 /* 10G-KX control */ -#define MDIO_PMAPMD_10GKXSTAT 161 /* 10G-KX status */ - /* Values 162 to 169 are reserved */ -#define MDIO_PMAPMD_10GRFECABLTY 170 /* 10G-R FEC ability */ -#define MDIO_PMAPMD_10GRFECCTRL 171 /* 10G-R FEC control */ -#define MDIO_PMAPMD_10GRFECCOBLCNT1 172 /* 10G-R FEC corrected blks cnt1 */ -#define MDIO_PMAPMD_10GRFECCOBLCNT2 173 /* 10G-R FEC corrected blks cnt2 */ -#define MDIO_PMAPMD_10GRFECUNCOBLCNT1 174 /* 10G-R FEC uncorrect blks cnt1 */ -#define MDIO_PMAPMD_10GRFECUNCOBLCNT2 175 /* 10G-R FEC uncorrect blks cnt2 */ - /* Values 176 to 32767 are reserved */ +#define MDIO_PMAPMD_BASERPMDCTRL 150 /* BASE-R PMD control */ +#define MDIO_PMAPMD_BASERPMDSTAT 151 /* BASE-R PMD status */ +#define MDIO_PMAPMD_BASERLPCOEFUPDL0 152 /* BASE-R LP coeffici. update ln0*/ +#define MDIO_PMAPMD_BASERLPSTATRPTL0 153 /* BASE-R LP status report lane0 */ +#define MDIO_PMAPMD_BASERLDCOEFFUPDL0 154 /* BASE-R LD coeffici. update ln0*/ +#define MDIO_PMAPMD_BASERLDSTATRPTL0 155 /* BASE-R LD status report lane0 */ +#define MDIO_PMAPMD_BASERSTAT2 156 /* BASE-R PMD status 2 */ +#define MDIO_PMAPMD_BASERSTAT3 157 /* BASE-R PMD status 3 */ + /* Values 158 to 159 are reserved */ +#define MDIO_PMAPMD_1000KXCTRL 160 /* 1000BASE-KX control */ +#define MDIO_PMAPMD_1000KXSTAT 161 /* 1000BASE-KX status */ +#define MDIO_PMAPMD_PMAOVHDCTRL1 162 /* PMA Overhead Control 1 */ +#define MDIO_PMAPMD_PMAOVHDCTRL2 163 /* PMA Overhead Control 2 */ +#define MDIO_PMAPMD_PMAOVHDCTRL3 164 /* PMA Overhead Control 3 */ +#define MDIO_PMAPMD_PMAOVHDSTAT1 165 /* PMA Overhead Status 1 */ +#define MDIO_PMAPMD_PMAOVHDSTAT2 166 /* PMA Overhead Status 2 */ + /* Values 167 to 169 are reserved */ +#define MDIO_PMAPMD_BASERFECABLTY 170 /* BASE-R FEC ability */ +#define MDIO_PMAPMD_BASERFECCTRL 171 /* BASE-R FEC control */ +#define MDIO_PMAPMD_10GRFECCOBLCNTL 172 /*
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Fri Jun 9 03:19:55 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Increase total number of RX buffers on multiqueue. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24 src/sys/dev/pci/ixgbe/ix_txrx.c:1.25 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24 Thu May 18 08:25:37 2017 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Fri Jun 9 03:19:55 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/ -/*$NetBSD: ix_txrx.c,v 1.24 2017/05/18 08:25:37 msaitoh Exp $*/ +/*$NetBSD: ix_txrx.c,v 1.25 2017/06/09 03:19:55 msaitoh Exp $*/ #include "opt_inet.h" #include "opt_inet6.h" @@ -1510,7 +1510,8 @@ ixgbe_setup_receive_ring(struct rx_ring * or size of jumbo mbufs may have changed. */ ixgbe_jcl_reinit(&adapter->jcl_head, rxr->ptag->dt_dmat, - 2 * adapter->num_rx_desc, adapter->rx_mbuf_sz); + (2 * adapter->num_rx_desc) * adapter->num_queues, + adapter->rx_mbuf_sz); IXGBE_RX_LOCK(rxr);
CVS commit: src/external/bsd/libproc/dist
Module Name:src Committed By: chs Date: Fri Jun 9 01:17:25 UTC 2017 Modified Files: src/external/bsd/libproc/dist: _libproc.h libproc.h proc_create.c proc_util.c Log Message: add a proc_getmodel() interface to return whether a process is a 32-bit or 64-bit process. the interface is from freebsd but the implementation is different. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libproc/dist/_libproc.h cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libproc/dist/libproc.h \ src/external/bsd/libproc/dist/proc_create.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libproc/dist/proc_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libproc/dist/_libproc.h diff -u src/external/bsd/libproc/dist/_libproc.h:1.1.1.1 src/external/bsd/libproc/dist/_libproc.h:1.2 --- src/external/bsd/libproc/dist/_libproc.h:1.1.1.1 Thu Sep 24 14:05:35 2015 +++ src/external/bsd/libproc/dist/_libproc.h Fri Jun 9 01:17:25 2017 @@ -41,6 +41,7 @@ struct proc_handle { int flags; /* Process flags. */ int status; /* Process status (PS_*). */ int wstat; /* Process wait status. */ + int model; /* Process data model. */ rd_agent_t *rdap; /* librtld_db agent */ rd_loadobj_t *rdobjs; size_t rdobjsz; Index: src/external/bsd/libproc/dist/libproc.h diff -u src/external/bsd/libproc/dist/libproc.h:1.2 src/external/bsd/libproc/dist/libproc.h:1.3 --- src/external/bsd/libproc/dist/libproc.h:1.2 Fri Sep 25 16:07:32 2015 +++ src/external/bsd/libproc/dist/libproc.h Fri Jun 9 01:17:25 2017 @@ -114,6 +114,9 @@ typedef struct lwpstatus { #define FLTBPT -1 } lwpstatus_t; +#define PR_MODEL_ILP32 1 +#define PR_MODEL_LP64 2 + typedef struct { uint8_t data[PTRACE_BREAKPOINT_SIZE]; } proc_breakpoint_t; @@ -143,6 +146,7 @@ int proc_name2sym(struct proc_handle *, struct ctf_file *proc_name2ctf(struct proc_handle *, const char *); int proc_setflags(struct proc_handle *, int); int proc_state(struct proc_handle *); +int proc_getmodel(struct proc_handle *); pid_t proc_getpid(struct proc_handle *); int proc_wstatus(struct proc_handle *); int proc_getwstat(struct proc_handle *); Index: src/external/bsd/libproc/dist/proc_create.c diff -u src/external/bsd/libproc/dist/proc_create.c:1.2 src/external/bsd/libproc/dist/proc_create.c:1.3 --- src/external/bsd/libproc/dist/proc_create.c:1.2 Thu Sep 24 14:12:48 2015 +++ src/external/bsd/libproc/dist/proc_create.c Fri Jun 9 01:17:25 2017 @@ -26,7 +26,7 @@ * $FreeBSD: head/lib/libproc/proc_create.c 265255 2014-05-03 04:44:03Z markj $ */ #include -__RCSID("$NetBSD: proc_create.c,v 1.2 2015/09/24 14:12:48 christos Exp $"); +__RCSID("$NetBSD: proc_create.c,v 1.3 2017/06/09 01:17:25 chs Exp $"); #include #include @@ -47,7 +47,8 @@ static int proc_init(pid_t, int, int, st static int proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) { - int mib[4], error; + struct kinfo_proc2 kp; + int mib[6], error; size_t len; memset(phdl, 0, sizeof(*phdl)); @@ -68,6 +69,24 @@ proc_init(pid_t pid, int flags, int stat if (len == 0) phdl->execname[0] = '\0'; +#ifdef _LP64 + len = sizeof(kp); + mib[0] = CTL_KERN; + mib[1] = KERN_PROC2; + mib[2] = KERN_PROC_PID; + mib[3] = pid; + mib[4] = len; + mib[5] = 1; + if (sysctl(mib, 6, &kp, &len, NULL, 0) != 0) { + error = errno; + DPRINTF("ERROR: cannot get kinfo_proc2 for pid %d", pid); + return (error); + } + phdl->model = (kp.p_flag & P_32) ? PR_MODEL_ILP32 : PR_MODEL_LP64; +#else + phdl->model = PR_MODEL_ILP32; +#endif + return (0); } Index: src/external/bsd/libproc/dist/proc_util.c diff -u src/external/bsd/libproc/dist/proc_util.c:1.5 src/external/bsd/libproc/dist/proc_util.c:1.6 --- src/external/bsd/libproc/dist/proc_util.c:1.5 Wed Feb 1 20:01:39 2017 +++ src/external/bsd/libproc/dist/proc_util.c Fri Jun 9 01:17:25 2017 @@ -144,6 +144,16 @@ proc_state(struct proc_handle *phdl) return (phdl->status); } +int +proc_getmodel(struct proc_handle *phdl) +{ + + if (phdl == NULL) + return (-1); + + return (phdl->model); +} + pid_t proc_getpid(struct proc_handle *phdl) {
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Fri Jun 9 01:16:54 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: param.h src/sys/arch/x86/include: cpu.h Log Message: if __HIDE_DELAY is defined, do not define delay() or DELAY(). needed by dtrace and ZFS. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/arm32/param.h cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.24 src/sys/arch/arm/include/arm32/param.h:1.25 --- src/sys/arch/arm/include/arm32/param.h:1.24 Thu Apr 2 03:11:01 2015 +++ src/sys/arch/arm/include/arm32/param.h Fri Jun 9 01:16:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.24 2015/04/02 03:11:01 matt Exp $ */ +/* $NetBSD: param.h,v 1.25 2017/06/09 01:16:54 chs Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -101,10 +101,12 @@ #ifdef _KERNEL #ifndef _LOCORE +#ifndef __HIDE_DELAY void delay(unsigned); #define DELAY(x) delay(x) #endif #endif +#endif #include Index: src/sys/arch/x86/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.71 src/sys/arch/x86/include/cpu.h:1.72 --- src/sys/arch/x86/include/cpu.h:1.71 Tue May 23 08:48:34 2017 +++ src/sys/arch/x86/include/cpu.h Fri Jun 9 01:16:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.71 2017/05/23 08:48:34 nonaka Exp $ */ +/* $NetBSD: cpu.h,v 1.72 2017/06/09 01:16:54 chs Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -368,8 +368,10 @@ extern void cpu_signotify(struct lwp *); extern void (*delay_func)(unsigned int); struct timeval; +#ifndef __HIDE_DELAY #define DELAY(x) (*delay_func)(x) #define delay(x) (*delay_func)(x) +#endif extern int biosbasemem; extern int biosextmem;
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Fri Jun 9 01:16:33 UTC 2017 Modified Files: src/sys/kern: kern_tc.c Log Message: define a copy of getnanotime() named dtrace_getnanotime() so that dtrace can know from the name that it should not allow setting fbt probes on it. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/kern/kern_tc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_tc.c diff -u src/sys/kern/kern_tc.c:1.46 src/sys/kern/kern_tc.c:1.47 --- src/sys/kern/kern_tc.c:1.46 Sat Sep 14 20:52:43 2013 +++ src/sys/kern/kern_tc.c Fri Jun 9 01:16:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $ */ +/* $NetBSD: kern_tc.c,v 1.47 2017/06/09 01:16:33 chs Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include /* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */ -__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.47 2017/06/09 01:16:33 chs Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -470,8 +470,8 @@ getbintime(struct bintime *bt) bintime_add(bt, &timebasebin); } -void -getnanotime(struct timespec *tsp) +static inline void +dogetnanotime(struct timespec *tsp) { struct timehands *th; u_int gen; @@ -485,6 +485,22 @@ getnanotime(struct timespec *tsp) } void +getnanotime(struct timespec *tsp) +{ + + dogetnanotime(tsp); +} + +void dtrace_getnanotime(struct timespec *tsp); + +void +dtrace_getnanotime(struct timespec *tsp) +{ + + dogetnanotime(tsp); +} + +void getmicrotime(struct timeval *tvp) { struct timehands *th;
CVS commit: src
Module Name:src Committed By: chs Date: Fri Jun 9 00:13:29 UTC 2017 Modified Files: src/sys/sys: mount.h src/usr.bin/fstat: ptyfs.c tmpfs.c src/usr.bin/pmap: pmap.h src/usr.bin/systat: bufcache.c Log Message: rearrange sys/mount.h so that all of the kernel-only parts are together and not exposed to userland, except do expose struct mount if __EXPOSE_MOUNT is defined. define __EXPOSE_MOUNT in the kmem grovellers that want the definition. needed for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/sys/sys/mount.h cvs rdiff -u -r1.6 -r1.7 src/usr.bin/fstat/ptyfs.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fstat/tmpfs.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/pmap/pmap.h cvs rdiff -u -r1.27 -r1.28 src/usr.bin/systat/bufcache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/mount.h diff -u src/sys/sys/mount.h:1.228 src/sys/sys/mount.h:1.229 --- src/sys/sys/mount.h:1.228 Wed May 24 09:53:55 2017 +++ src/sys/sys/mount.h Fri Jun 9 00:13:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.228 2017/05/24 09:53:55 hannken Exp $ */ +/* $NetBSD: mount.h,v 1.229 2017/06/09 00:13:29 chs Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -44,14 +44,16 @@ #ifndef _STANDALONE #include /* precautionary upon removal from ucred.h */ #include -#include #include #include +#include +#if defined(_KERNEL) || defined(__EXPOSE_MOUNT) +#include #include #include -#include #include #include +#endif /* defined(_KERNEL) || defined(__EXPOSE_MOUNT) */ #endif /* !_STANDALONE */ /* @@ -97,8 +99,27 @@ #define MOUNT_RUMPFS "rumpfs" /* rump virtual file system */ #define MOUNT_V7FS "v7fs" /* 7th Edition of Unix Filesystem */ +/* + * Sysctl CTL_VFS definitions. + * + * Second level identifier specifies which filesystem. Second level + * identifier VFS_GENERIC returns information about all filesystems. + * + * Note the slightly non-flat nature of these sysctl numbers. Oh for + * a better sysctl interface. + */ +#define VFS_GENERIC 0 /* generic filesystem information */ +#define VFS_MAXTYPENUM 1 /* int: highest defined fs type */ +#define VFS_CONF 2 /* struct: vfsconf for filesystem given + as next argument */ +#define VFS_USERMOUNT 3 /* enable/disable fs mnt by non-root */ +#define VFS_MAGICLINKS 4 /* expand 'magic' symlinks */ +#define VFSGEN_MAXID 5 /* number of valid vfs.generic ids */ + #ifndef _STANDALONE +#if defined(_KERNEL) || defined(__EXPOSE_MOUNT) + struct vnode; struct vnode_impl; struct vattr; @@ -133,22 +154,9 @@ struct mount { uint64_t mnt_gen; }; -/* - * Sysctl CTL_VFS definitions. - * - * Second level identifier specifies which filesystem. Second level - * identifier VFS_GENERIC returns information about all filesystems. - * - * Note the slightly non-flat nature of these sysctl numbers. Oh for - * a better sysctl interface. - */ -#define VFS_GENERIC 0 /* generic filesystem information */ -#define VFS_MAXTYPENUM 1 /* int: highest defined fs type */ -#define VFS_CONF 2 /* struct: vfsconf for filesystem given - as next argument */ -#define VFS_USERMOUNT 3 /* enable/disable fs mnt by non-root */ -#define VFS_MAGICLINKS 4 /* expand 'magic' symlinks */ -#define VFSGEN_MAXID 5 /* number of valid vfs.generic ids */ +#endif /* defined(_KERNEL) || defined(__EXPOSE_MOUNT) */ + +#ifdef _KERNEL /* * USE THE SAME NAMES AS MOUNT_*! @@ -189,8 +197,6 @@ struct mount { { "magiclinks", CTLTYPE_INT }, \ } -#if defined(_KERNEL) - struct quotactl_args; /* in sys/quotactl.h */ struct quotastat; /* in sys/quotactl.h */ struct quotaidtypestat; /* in sys/quotactl.h */ @@ -199,10 +205,6 @@ struct quotakcursor; /* in sys/quotactl struct quotakey; /* in sys/quota.h */ struct quotaval; /* in sys/quota.h */ -#if __STDC__ -struct nameidata; -#endif - /* * Operations supported on mounted file system. */ @@ -268,14 +270,8 @@ int VFS_SNAPSHOT(struct mount *, struct int VFS_EXTATTRCTL(struct mount *, int, struct vnode *, int, const char *); int VFS_SUSPENDCTL(struct mount *, int); -#endif /* _KERNEL */ - -#ifdef _KERNEL -#if __STDC__ -struct mbuf; struct vnodeopv_desc; struct kauth_cred; -#endif #define VFS_MAX_MOUNT_DATA 8192 Index: src/usr.bin/fstat/ptyfs.c diff -u src/usr.bin/fstat/ptyfs.c:1.6 src/usr.bin/fstat/ptyfs.c:1.7 --- src/usr.bin/fstat/ptyfs.c:1.6 Sun Apr 12 06:36:12 2009 +++ src/usr.bin/fstat/ptyfs.c Fri Jun 9 00:13:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $ */ +/* $NetBSD: ptyfs.c,v 1.7 2017/06/09 00:13:29 chs Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $"); +__RCSID("$NetBSD: ptyfs.c,v 1.7 2017/06/09 00:13:29 chs Exp $"); #include #include @@ -38,6 +38,7 @@ __RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/ #in
CVS commit: src/sbin/fsck_lfs
Module Name:src Committed By: chs Date: Fri Jun 9 00:13:09 UTC 2017 Modified Files: src/sbin/fsck_lfs: vnode.h Log Message: this file uses the macros so it should include that header itself, rather than relying on getting it indirectly by including some other header. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/fsck_lfs/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_lfs/vnode.h diff -u src/sbin/fsck_lfs/vnode.h:1.4 src/sbin/fsck_lfs/vnode.h:1.5 --- src/sbin/fsck_lfs/vnode.h:1.4 Mon Apr 28 20:23:08 2008 +++ src/sbin/fsck_lfs/vnode.h Fri Jun 9 00:13:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.4 2008/04/28 20:23:08 martin Exp $ */ +/* $NetBSD: vnode.h,v 1.5 2017/06/09 00:13:08 chs Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,6 +28,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include + #define VNODE_HASH_MAX 1024 /* Must be a PO2 */ #define VNODE_CACHE_SIZE 1024 /* Need not be a PO2 */
CVS commit: src/sys/coda
Module Name:src Committed By: chs Date: Thu Jun 8 22:29:59 UTC 2017 Modified Files: src/sys/coda: coda_vfsops.h Log Message: add a forward declaration of struct mbuf. needed due to some other change I made for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/coda/coda_vfsops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/coda/coda_vfsops.h diff -u src/sys/coda/coda_vfsops.h:1.19 src/sys/coda/coda_vfsops.h:1.20 --- src/sys/coda/coda_vfsops.h:1.19 Sat Dec 13 15:59:30 2014 +++ src/sys/coda/coda_vfsops.h Thu Jun 8 22:29:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: coda_vfsops.h,v 1.19 2014/12/13 15:59:30 hannken Exp $ */ +/* $NetBSD: coda_vfsops.h,v 1.20 2017/06/08 22:29:59 chs Exp $ */ /* * @@ -44,6 +44,7 @@ struct cfid { }; struct mount; +struct mbuf; int coda_vfsopstats_init(void); int coda_mount(struct mount *, const char *, void *, size_t *);
CVS commit: src/sys/sys
Module Name:src Committed By: chs Date: Thu Jun 8 22:24:59 UTC 2017 Modified Files: src/sys/sys: disk.h Log Message: do not expose kernel-internal structure definitions to userland. needed for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/sys/disk.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/disk.h diff -u src/sys/sys/disk.h:1.70 src/sys/sys/disk.h:1.71 --- src/sys/sys/disk.h:1.70 Sun Mar 5 23:07:12 2017 +++ src/sys/sys/disk.h Thu Jun 8 22:24:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disk.h,v 1.70 2017/03/05 23:07:12 mlelstv Exp $ */ +/* $NetBSD: disk.h,v 1.71 2017/06/08 22:24:59 chs Exp $ */ /*- * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc. @@ -79,23 +79,9 @@ * Disk device structures. */ -#ifdef _KERNEL -#include -#endif #include #include #include -#include -#include - -#include - -struct buf; -struct disk; -struct disklabel; -struct cpu_disklabel; -struct lwp; -struct vnode; /* * Disk information dictionary. @@ -188,31 +174,6 @@ struct dkwedge_list { u_int dkwl_ncopied; /* number actually copied */ }; -#ifdef _KERNEL -/* - * dkwedge_discovery_method: - * - * Structure used to describe partition map parsing schemes - * used for wedge autodiscovery. - */ -struct dkwedge_discovery_method { - /* link in wedge driver's list */ - LIST_ENTRY(dkwedge_discovery_method) ddm_list; - const char *ddm_name; /* name of this method */ - int ddm_priority; /* search priority */ - int (*ddm_discover)(struct disk *, struct vnode *); -}; - -#define DKWEDGE_DISCOVERY_METHOD_DECL(name, prio, discover) \ -static struct dkwedge_discovery_method name ## _ddm = { \ - { NULL, NULL }, \ - #name,\ - prio,\ - discover \ -}; \ -__link_set_add_data(dkwedge_methods, name ## _ddm) -#endif /* _KERNEL */ - /* Some common partition types */ #define DKW_PTYPE_UNKNOWN "" #define DKW_PTYPE_UNUSED "unused" @@ -311,6 +272,68 @@ struct disk_geom { }; /* + * Bad sector lists per fixed disk + */ +struct disk_badsectors { + SLIST_ENTRY(disk_badsectors) dbs_next; + daddr_t dbs_min; /* min. sector number */ + daddr_t dbs_max; /* max. sector number */ + struct timeval dbs_failedat; /* first failure at */ +}; + +struct disk_badsecinfo { + uint32_t dbsi_bufsize; /* size of region pointed to */ + uint32_t dbsi_skip; /* how many to skip past */ + uint32_t dbsi_copied; /* how many got copied back */ + uint32_t dbsi_left; /* remaining to copy */ + void * dbsi_buffer; /* region to copy disk_badsectors to */ +}; + +#define DK_STRATEGYNAMELEN 32 +struct disk_strategy { + char dks_name[DK_STRATEGYNAMELEN]; /* name of strategy */ + char *dks_param; /* notyet; should be NULL */ + size_t dks_paramlen; /* notyet; should be 0 */ +}; + +#ifdef _KERNEL +#include +#include +#include + +#include + +struct buf; +struct disk; +struct disklabel; +struct cpu_disklabel; +struct lwp; +struct vnode; + +/* + * dkwedge_discovery_method: + * + * Structure used to describe partition map parsing schemes + * used for wedge autodiscovery. + */ +struct dkwedge_discovery_method { + /* link in wedge driver's list */ + LIST_ENTRY(dkwedge_discovery_method) ddm_list; + const char *ddm_name; /* name of this method */ + int ddm_priority; /* search priority */ + int (*ddm_discover)(struct disk *, struct vnode *); +}; + +#define DKWEDGE_DISCOVERY_METHOD_DECL(name, prio, discover) \ +static struct dkwedge_discovery_method name ## _ddm = { \ + { NULL, NULL }, \ + #name,\ + prio,\ + discover \ +}; \ +__link_set_add_data(dkwedge_methods, name ## _ddm) + +/* * Disk partition dictionary. * * A partition is represented as a dictionary containing generic partition @@ -470,7 +493,6 @@ struct disk { struct cpu_disklabel *dk_cpulabel; }; -#ifdef _KERNEL struct dkdriver { void (*d_strategy)(struct buf *); void (*d_minphys)(struct buf *); @@ -484,7 +506,6 @@ struct dkdriver { int (*d_firstopen)(device_t, dev_t, int, int); void (*d_label)(device_t, struct disklabel *lp); }; -#endif /* states */ #define DK_CLOSED 0 /* drive is closed */ @@ -494,37 +515,11 @@ struct dkdriver { #define DK_OPEN 4 /* label read, drive open */ #define DK_OPENRAW 5 /* open without label */ -/* - * Bad sector lists per fixed disk - */ -struct disk_badsectors { - SLIST_ENTRY(disk_badsectors) dbs_next; - daddr_t dbs_min; /* min. sector number */ - daddr_t dbs_max; /* max. sector number */ - struct timeval dbs_failedat; /* first failure at */ -}; - -struct disk_badsecinfo { - uint32_t dbsi_bufsize; /* size of region pointed to */ - uint32_t dbsi_skip; /* how many to skip past */ - uint32_t dbsi_copied; /* how many got copied back */ - uint32_t dbsi_left; /* remaining to copy */ - void * dbsi_buffer; /* region to copy disk_badsectors to */ -}; - -#define DK_STRATEGYNAMELEN 32 -struct disk_strat
CVS commit: src/sbin/dkscan_bsdlabel
Module Name:src Committed By: chs Date: Thu Jun 8 22:24:29 UTC 2017 Modified Files: src/sbin/dkscan_bsdlabel: dkscan_bsdlabel.c dkscan_util.h Log Message: use a minimal "struct disk" in userland rather than the full kernel structure. needed due to upcoming sys/disk.h changes needed for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c cvs rdiff -u -r1.4 -r1.5 src/sbin/dkscan_bsdlabel/dkscan_util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c diff -u src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.3 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.4 --- src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.3 Sat Aug 27 16:43:07 2011 +++ src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c Thu Jun 8 22:24:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dkscan_bsdlabel.c,v 1.3 2011/08/27 16:43:07 joerg Exp $ */ +/* $NetBSD: dkscan_bsdlabel.c,v 1.4 2017/06/08 22:24:29 chs Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -41,6 +41,11 @@ #include "dkscan_util.h" +struct disk { + const char *dk_name; /* disk name */ + int dk_blkshift; /* shift to convert DEV_BSIZE to blks */ +}; + #include "dkwedge_bsdlabel.c" __dead static void usage(void); @@ -80,7 +85,7 @@ main(int argc, char **argv) devpart = argv[optind]; memset(&d, 0, sizeof(d)); - d.dk_name = __UNCONST(devpart); + d.dk_name = devpart; dkwedge_discover_bsdlabel(&d, NULL); close(disk_fd); Index: src/sbin/dkscan_bsdlabel/dkscan_util.h diff -u src/sbin/dkscan_bsdlabel/dkscan_util.h:1.4 src/sbin/dkscan_bsdlabel/dkscan_util.h:1.5 --- src/sbin/dkscan_bsdlabel/dkscan_util.h:1.4 Thu Mar 15 02:02:21 2012 +++ src/sbin/dkscan_bsdlabel/dkscan_util.h Thu Jun 8 22:24:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dkscan_util.h,v 1.4 2012/03/15 02:02:21 joerg Exp $ */ +/* $NetBSD: dkscan_util.h,v 1.5 2017/06/08 22:24:29 chs Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -34,6 +34,8 @@ u_int dkcksum(struct disklabel *); u_int dkcksum_sized(struct disklabel *, size_t); +struct disk; +struct vnode; int dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno, void *tbuf, size_t len); int dkwedge_add(struct dkwedge_info *dkw);
CVS commit: src/sys/dev
Module Name:src Committed By: chs Date: Thu Jun 8 22:23:56 UTC 2017 Modified Files: src/sys/dev: ccdvar.h Log Message: do not expose kernel-internal structure definitions to userland. needed due to upcoming sys/disk.h changes needed for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ccdvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ccdvar.h diff -u src/sys/dev/ccdvar.h:1.35 src/sys/dev/ccdvar.h:1.36 --- src/sys/dev/ccdvar.h:1.35 Sun Sep 6 06:00:59 2015 +++ src/sys/dev/ccdvar.h Thu Jun 8 22:23:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ccdvar.h,v 1.35 2015/09/06 06:00:59 dholland Exp $ */ +/* $NetBSD: ccdvar.h,v 1.36 2017/06/08 22:23:56 chs Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -70,11 +70,13 @@ #ifndef _DEV_CCDVAR_H_ #define _DEV_CCDVAR_H_ -#include #include +#ifdef _KERNEL +#include #include #include #include +#endif /* * Dynamic configuration and disklabel support by: @@ -97,6 +99,7 @@ struct ccd_ioctl { uint64_t ccio_size; /* (returned) size of ccd */ }; +#ifdef _KERNEL /* * Component info table. @@ -181,6 +184,8 @@ struct ccd_softc { LIST_ENTRY(ccd_softc) sc_link; }; +#endif /* _KERNEL */ + /* sc_flags */ #define CCDF_UNIFORM 0x002 /* use LCCD of sizes for uniform interleave */ #define CCDF_NOLABEL 0x004 /* ignore on-disk (raw) disklabel */ @@ -221,6 +226,7 @@ struct ccd_ioctl_60 { #define CCDIOCSET_60 _IOWR('F', 16, struct ccd_ioctl_60) /* enable ccd */ #define CCDIOCCLR_60 _IOW('F', 17, struct ccd_ioctl_60) /* disable ccd */ #endif /* COMPAT_60 && !LP64*/ + /* * Sysctl information */
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu Jun 8 22:10:39 UTC 2017 Modified Files: src/bin/sh: parser.c Log Message: (Perhaps) temporary fix to pkgtools (cwrappers) build (configure). Expanding `` containing \ \n sequences looks to have been giving problems. I don't think this is the correct fix, but it will do no worse harm than (perhaps) incorrectly calculating LINENO in this kind of (rare) circumstance. I'll look and see if there should be a better fix later. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/parser.c diff -u src/bin/sh/parser.c:1.136 src/bin/sh/parser.c:1.137 --- src/bin/sh/parser.c:1.136 Thu Jun 8 13:12:17 2017 +++ src/bin/sh/parser.c Thu Jun 8 22:10:39 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.136 2017/06/08 13:12:17 kre Exp $ */ +/* $NetBSD: parser.c,v 1.137 2017/06/08 22:10:39 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.136 2017/06/08 13:12:17 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.137 2017/06/08 22:10:39 kre Exp $"); #endif #endif /* not lint */ @@ -1405,7 +1405,9 @@ parsebackq(VSS *const stack, char * cons case '\n': plinno++; +/* out = insert_elided_nl(out); +*/ needprompt = doprompt; break;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu Jun 8 21:01:31 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: VEXPRESS_A15 Log Message: Add plrtc driver To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/VEXPRESS_A15 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VEXPRESS_A15 diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.15 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.16 --- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.15 Thu Jun 8 10:40:38 2017 +++ src/sys/arch/evbarm/conf/VEXPRESS_A15 Thu Jun 8 21:01:31 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: VEXPRESS_A15,v 1.15 2017/06/08 10:40:38 jmcneill Exp $ +# $NetBSD: VEXPRESS_A15,v 1.16 2017/06/08 21:01:31 jmcneill Exp $ # # ARM Versatile Express A15 # @@ -54,6 +54,9 @@ ukphy* at mii? phy ? # UART plcom* at fdt? # ARM PL011 UART +# RTC +plrtc* at fdt? # ARM PrimeCell RTC + # SDMMC plmmc* at fdt? # ARM PrimeCell MCI sdmmc* at sdmmcbus?
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Thu Jun 8 21:01:06 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt Added Files: src/sys/arch/arm/fdt: plrtc_fdt.c Log Message: Add fdt glue for plrtc To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/fdt/plrtc_fdt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.10 src/sys/arch/arm/fdt/files.fdt:1.11 --- src/sys/arch/arm/fdt/files.fdt:1.10 Thu Jun 8 10:03:59 2017 +++ src/sys/arch/arm/fdt/files.fdt Thu Jun 8 21:01:06 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.10 2017/06/08 10:03:59 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.11 2017/06/08 21:01:06 jmcneill Exp $ include "dev/pckbport/files.pckbport" @@ -35,5 +35,8 @@ file arch/arm/fdt/smsh_fdt.c smsh_fdt attach aaci at fdt with aaci_fdt file arch/arm/fdt/aaci_fdt.c aaci_fdt +attach plrtc at fdt with plrtc_fdt +file arch/arm/fdt/plrtc_fdt.c plrtc_fdt + # Console parameters defparam opt_fdt_arm.hCONSADDR Added files: Index: src/sys/arch/arm/fdt/plrtc_fdt.c diff -u /dev/null src/sys/arch/arm/fdt/plrtc_fdt.c:1.1 --- /dev/null Thu Jun 8 21:01:06 2017 +++ src/sys/arch/arm/fdt/plrtc_fdt.c Thu Jun 8 21:01:06 2017 @@ -0,0 +1,85 @@ +/* $NetBSD: plrtc_fdt.c,v 1.1 2017/06/08 21:01:06 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * 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 +__KERNEL_RCSID(0, "$NetBSD: plrtc_fdt.c,v 1.1 2017/06/08 21:01:06 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +static int plrtc_fdt_match(device_t, cfdata_t, void *); +static void plrtc_fdt_attach(device_t, device_t, void *); + +static const char * const compatible[] = { + "arm,pl031", + NULL +}; + +CFATTACH_DECL_NEW(plrtc_fdt, sizeof(struct plrtc_softc), + plrtc_fdt_match, plrtc_fdt_attach, NULL, NULL); + +static int +plrtc_fdt_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_compatible(faa->faa_phandle, compatible) >= 0; +} + +static void +plrtc_fdt_attach(device_t parent, device_t self, void *aux) +{ + struct plrtc_softc * const sc = device_private(self); + struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; + bus_addr_t addr; + bus_size_t size; + + if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0) { + aprint_error(": missing 'reg' property\n"); + return; + } + + sc->sc_dev = self; + sc->sc_bst = faa->faa_bst; + if (bus_space_map(faa->faa_bst, addr, size, 0, &sc->sc_bsh)) { + aprint_error(": couldn't map device\n"); + return; + } + + plrtc_attach(sc); + + fdtbus_todr_attach(self, phandle, &sc->sc_todr); +}
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Thu Jun 8 21:00:43 UTC 2017 Modified Files: src/sys/conf: files Added Files: src/sys/dev/ic: pl031.c pl031var.h Log Message: Add driver for ARM PrimeCell PL031 (RTC) Real Time Clock. To generate a diff of this commit: cvs rdiff -u -r1.1174 -r1.1175 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/pl031.c src/sys/dev/ic/pl031var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1174 src/sys/conf/files:1.1175 --- src/sys/conf/files:1.1174 Thu Jun 8 10:02:39 2017 +++ src/sys/conf/files Thu Jun 8 21:00:43 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1174 2017/06/08 10:02:39 jmcneill Exp $ +# $NetBSD: files,v 1.1175 2017/06/08 21:00:43 jmcneill Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150846 @@ -1315,6 +1315,10 @@ defflag opt_dwc_mmc.h DWC_MMC_DEBUG device dwcmmc: sdmmcbus file dev/ic/dwc_mmc.c dwcmmc +# ARM PrimeCell PL031 (RTC) real time clock +device plrtc +file dev/ic/pl031.c plrtc + # ARM PrimeCell PL041 (AACI) Advanced Audio CODEC interface device aaci: audiobus, auconv, aurateconv, mulaw, ac97 file dev/ic/pl041.c aaci Added files: Index: src/sys/dev/ic/pl031.c diff -u /dev/null src/sys/dev/ic/pl031.c:1.1 --- /dev/null Thu Jun 8 21:00:43 2017 +++ src/sys/dev/ic/pl031.c Thu Jun 8 21:00:43 2017 @@ -0,0 +1,84 @@ +/* $NetBSD: pl031.c,v 1.1 2017/06/08 21:00:43 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * 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 +__KERNEL_RCSID(0, "$NetBSD: pl031.c,v 1.1 2017/06/08 21:00:43 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +#define RTCDR 0x000 +#define RTCLR 0x008 +#define RTCCR 0x00c +#define RTCCR_START __BIT(0) + +#define RTC_READ(sc, reg) \ + bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define RTC_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) + +static int +plrtc_gettime(todr_chip_handle_t tch, struct timeval *tv) +{ + struct plrtc_softc * const sc = tch->cookie; + + tv->tv_sec = RTC_READ(sc, RTCDR); + tv->tv_usec = 0; + + return 0; +} + +static int +plrtc_settime(todr_chip_handle_t tch, struct timeval *tv) +{ + struct plrtc_softc * const sc = tch->cookie; + + RTC_WRITE(sc, RTCLR, tv->tv_sec); + + return 0; +} + +void +plrtc_attach(struct plrtc_softc *sc) +{ + aprint_naive("\n"); + aprint_normal(": RTC\n"); + + sc->sc_todr.todr_gettime = plrtc_gettime; + sc->sc_todr.todr_settime = plrtc_settime; + sc->sc_todr.cookie = sc; + + RTC_WRITE(sc, RTCCR, RTCCR_START); +} Index: src/sys/dev/ic/pl031var.h diff -u /dev/null src/sys/dev/ic/pl031var.h:1.1 --- /dev/null Thu Jun 8 21:00:43 2017 +++ src/sys/dev/ic/pl031var.h Thu Jun 8 21:00:43 2017 @@ -0,0 +1,42 @@ +/* $NetBSD: pl031var.h,v 1.1 2017/06/08 21:00:43 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * 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 WA
CVS commit: src/share/dict
Module Name:src Committed By: abhinav Date: Thu Jun 8 20:12:57 UTC 2017 Modified Files: src/share/dict: web2 Log Message: Add "firewall" To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/dict/web2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/dict/web2 diff -u src/share/dict/web2:1.30 src/share/dict/web2:1.31 --- src/share/dict/web2:1.30 Thu Jun 8 19:17:38 2017 +++ src/share/dict/web2 Thu Jun 8 20:12:57 2017 @@ -70044,6 +70044,7 @@ firestopping firetail firetop firetrap +firewall firewarden firewater fireweed
CVS commit: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el
Module Name:src Committed By: mrg Date: Thu Jun 8 19:21:55 UTC 2017 Modified Files: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el: auto-host.h configargs.h Log Message: regen after new binutils To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h cvs rdiff -u -r1.20 -r1.21 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.10 src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.11 --- src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.10 Tue Jun 7 18:53:03 2016 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h Thu Jun 8 19:21:54 2017 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.87 2016/03/17 23:41:21 mrg Exp */ +/* Generated from: NetBSD: mknative-gcc,v 1.89 2016/10/05 19:25:49 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* auto-host.h. Generated from config.in by configure. */ @@ -297,7 +297,7 @@ /* Define if your assembler supports .module. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_AS_DOT_MODULE */ +#define HAVE_AS_DOT_MODULE 1 #endif @@ -509,7 +509,7 @@ /* Define if the assembler understands -mnan=. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_AS_NAN */ +#define HAVE_AS_NAN 1 #endif Index: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.20 src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.21 --- src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.20 Tue Oct 18 01:33:01 2016 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h Thu Jun 8 19:21:54 2017 @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* Generated automatically. */ -static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=mips64el--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20160606' --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/mips64el --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd7.0 --host=mips64el--netbsd --with-sysroot=/var/ obj/mknative/evbmips-mips64el/usr/src/destdir.evbmips"; +static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=mips64el--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20160606' --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/mips64el --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd7.1 --host=mips64el--netbsd --with-sysroot=/var/ obj/mknative/evbmips-mips64el/usr/src/destdir.evbmips"; static const char thread_model[] = "posix"; static const struct {
CVS commit: src/share/dict
Module Name:src Committed By: abhinav Date: Thu Jun 8 19:17:38 UTC 2017 Modified Files: src/share/dict: web2 Log Message: Add ``trademark'' To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/dict/web2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/dict/web2 diff -u src/share/dict/web2:1.29 src/share/dict/web2:1.30 --- src/share/dict/web2:1.29 Sun Jun 4 09:08:06 2017 +++ src/share/dict/web2 Thu Jun 8 19:17:38 2017 @@ -204671,6 +204671,7 @@ trade tradecraft tradeful tradeless +trademark trademaster trader tradership
CVS commit: src/external/gpl2/dtc
Module Name:src Committed By: skrll Date: Thu Jun 8 18:57:21 UTC 2017 Modified Files: src/external/gpl2/dtc: Makefile.inc src/external/gpl2/dtc/lib/libfdt: Makefile src/external/gpl2/dtc/usr.bin/dtc: Makefile Log Message: Adjust build for new source location for real. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/dtc/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/dtc/lib/libfdt/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/dtc/usr.bin/dtc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/dtc/Makefile.inc diff -u src/external/gpl2/dtc/Makefile.inc:1.1 src/external/gpl2/dtc/Makefile.inc:1.2 --- src/external/gpl2/dtc/Makefile.inc:1.1 Mon Jun 5 18:59:43 2017 +++ src/external/gpl2/dtc/Makefile.inc Thu Jun 8 18:57:21 2017 @@ -1,4 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.1 2017/06/05 18:59:43 christos Exp $ +# $NetBSD: Makefile.inc,v 1.2 2017/06/08 18:57:21 skrll Exp $ BINDIR= /usr/bin -DIST= ${NETBSDSRCDIR}/external/gpl2/dtc/dist +DTCDIST= ${NETBSDSRCDIR}/external/gpl2/dtc/dist +LIBFDTDIST= ${NETBSDSRCDIR}/sys/external/bsd/libfdt/dist Index: src/external/gpl2/dtc/lib/libfdt/Makefile diff -u src/external/gpl2/dtc/lib/libfdt/Makefile:1.2 src/external/gpl2/dtc/lib/libfdt/Makefile:1.3 --- src/external/gpl2/dtc/lib/libfdt/Makefile:1.2 Thu Jun 8 17:24:31 2017 +++ src/external/gpl2/dtc/lib/libfdt/Makefile Thu Jun 8 18:57:21 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2017/06/08 17:24:31 skrll Exp $ +# $NetBSD: Makefile,v 1.3 2017/06/08 18:57:21 skrll Exp $ LIBISPRIVATE= yes @@ -7,13 +7,13 @@ LIBISPRIVATE= yes LIB= fdt .include "${.CURDIR}/../../Makefile.inc" -.include "${.CURDIR}/../../../../../sys/external/bsd/libfdt/dist/Makefile.libfdt" +.include "${LIBFDTDIST}/Makefile.libfdt" SRCS= ${LIBFDT_SRCS} -CPPFLAGS+= -I ${DIST}/libfdt +CPPFLAGS+= -I ${LIBFDTDIST} -.PATH: ${DIST}/libfdt +.PATH: ${LIBFDTDIST} .include Index: src/external/gpl2/dtc/usr.bin/dtc/Makefile diff -u src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.1 src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.2 --- src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.1 Mon Jun 5 18:59:43 2017 +++ src/external/gpl2/dtc/usr.bin/dtc/Makefile Thu Jun 8 18:57:21 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2017/06/05 18:59:43 christos Exp $ +# $NetBSD: Makefile,v 1.2 2017/06/08 18:57:21 skrll Exp $ NOMAN= # defined @@ -7,15 +7,15 @@ NOMAN= # defined PROG= dtc .include "${.CURDIR}/../../Makefile.inc" -.include "${DIST}/Makefile.dtc" +.include "${DTCDIST}/Makefile.dtc" CPPFLAGS+= -I${.CURDIR} -CPPFLAGS+= -I${DIST} -CPPFLAGS+= -I${DIST}/libfdt +CPPFLAGS+= -I${DTCDIST} +CPPFLAGS+= -I${LIBFDTDIST} SRCS+= ${DTC_SRCS} dtc-lexer.l dtc-parser.y YFLAGS+= -d -L -.PATH: ${DIST} +.PATH: ${DTCDIST} .include
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Thu Jun 8 18:27:05 UTC 2017 Modified Files: src/lib/libc: shlib_version Log Message: Add two entries for interaction between lib/csu and libc. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.274 src/lib/libc/shlib_version:1.275 --- src/lib/libc/shlib_version:1.274 Thu Jun 8 13:32:20 2017 +++ src/lib/libc/shlib_version Thu Jun 8 18:27:05 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.274 2017/06/08 13:32:20 joerg Exp $ +# $NetBSD: shlib_version,v 1.275 2017/06/08 18:27:05 joerg Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -48,5 +48,7 @@ # - boot obsolete signal functions to libcompat # - remove exect(3) API - tracing functionality has been moved to the kernel # - punt gethostid/sethostid(3) to libcompat or remove entirely +# - clean-up initialisation order between crt0.o, rtld and libc. +# - move environ and __ps_strings from crt0.o into libc. major=12 minor=207
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Thu Jun 8 18:25:14 UTC 2017 Modified Files: src/sys/arch/i386/include: profile.h Log Message: use compiler builtins to compute addresses instead %ebp assembly arithmetic. (from joerg) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/i386/include/profile.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/profile.h diff -u src/sys/arch/i386/include/profile.h:1.36 src/sys/arch/i386/include/profile.h:1.37 --- src/sys/arch/i386/include/profile.h:1.36 Sun Jun 4 12:35:59 2017 +++ src/sys/arch/i386/include/profile.h Thu Jun 8 14:25:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.36 2017/06/04 16:35:59 christos Exp $ */ +/* $NetBSD: profile.h,v 1.37 2017/06/08 18:25:14 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -54,8 +54,7 @@ #define MCOUNT \ MCOUNT_COMPAT\ extern void mcount(void) __asm(MCOUNT_ENTRY)\ - __attribute__((__no_instrument_function__)) \ - __attribute__((__optimize__("-fno-omit-frame-pointer"))); \ + __attribute__((__no_instrument_function__)); \ void \ mcount(void)\ { \ @@ -72,12 +71,11 @@ mcount(void)\ *\ * selfpc = pc pushed by mcount call\ */\ - __asm volatile("movl 4(%%ebp),%0" : "=r" (selfpc)); \ + selfpc = (int)__builtin_return_address(0); \ /*\ - * frompcindex = pc pushed by call into self. \ + * frompcindex = stack frame of caller, assuming frame pointer \ */\ - __asm volatile("movl (%%ebp),%0" : "=r" (frompcindex)); \ - frompcindex = ((int *)frompcindex)[1];\ + frompcindex = ((int *)__builtin_frame_address(1))[1]; \ _mcount((u_long)frompcindex, (u_long)selfpc); \ \ __asm volatile("movl %0,%%edx" : : "g" (edx)); \
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Thu Jun 8 18:24:39 UTC 2017 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Call _rtld_debug_state before running the global initialisers, so give gdb a chance to set break points etc. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.183 src/libexec/ld.elf_so/rtld.c:1.184 --- src/libexec/ld.elf_so/rtld.c:1.183 Mon Feb 27 20:25:26 2017 +++ src/libexec/ld.elf_so/rtld.c Thu Jun 8 18:24:39 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.183 2017/02/27 20:25:26 chs Exp $ */ +/* $NetBSD: rtld.c,v 1.184 2017/06/08 18:24:39 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.183 2017/02/27 20:25:26 chs Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.184 2017/06/08 18:24:39 joerg Exp $"); #endif /* not lint */ #include @@ -733,6 +733,8 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase) if (real___mainprog_obj) *real___mainprog_obj = _rtld_objmain; + _rtld_debug_state(); /* say hello to gdb! */ + _rtld_exclusive_enter(&mask); dbg(("calling _init functions")); @@ -748,8 +750,6 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase) * of stack. */ - _rtld_debug_state(); /* say hello to gdb! */ - ((void **) osp)[0] = _rtld_exit; ((void **) osp)[1] = _rtld_objmain; return (Elf_Addr) _rtld_objmain->entry;
CVS commit: src/external/gpl2/dtc/lib/libfdt
Module Name:src Committed By: skrll Date: Thu Jun 8 17:24:31 UTC 2017 Modified Files: src/external/gpl2/dtc/lib/libfdt: Makefile Log Message: Update for new libfdt location To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/dtc/lib/libfdt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/dtc/lib/libfdt/Makefile diff -u src/external/gpl2/dtc/lib/libfdt/Makefile:1.1 src/external/gpl2/dtc/lib/libfdt/Makefile:1.2 --- src/external/gpl2/dtc/lib/libfdt/Makefile:1.1 Mon Jun 5 18:59:43 2017 +++ src/external/gpl2/dtc/lib/libfdt/Makefile Thu Jun 8 17:24:31 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2017/06/05 18:59:43 christos Exp $ +# $NetBSD: Makefile,v 1.2 2017/06/08 17:24:31 skrll Exp $ LIBISPRIVATE= yes @@ -7,7 +7,7 @@ LIBISPRIVATE= yes LIB= fdt .include "${.CURDIR}/../../Makefile.inc" -.include "${.CURDIR}/../../dist/libfdt/Makefile.libfdt" +.include "${.CURDIR}/../../../../../sys/external/bsd/libfdt/dist/Makefile.libfdt" SRCS= ${LIBFDT_SRCS}
CVS commit: src/external/gpl2/dtc/dist
Module Name:src Committed By: skrll Date: Thu Jun 8 17:24:10 UTC 2017 Modified Files: src/external/gpl2/dtc/dist: flattree.c Log Message: s/ALIGN/FDTALIGN2/ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/dtc/dist/flattree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/dtc/dist/flattree.c diff -u src/external/gpl2/dtc/dist/flattree.c:1.3 src/external/gpl2/dtc/dist/flattree.c:1.4 --- src/external/gpl2/dtc/dist/flattree.c:1.3 Thu Jun 8 16:00:40 2017 +++ src/external/gpl2/dtc/dist/flattree.c Thu Jun 8 17:24:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: flattree.c,v 1.3 2017/06/08 16:00:40 skrll Exp $ */ +/* $NetBSD: flattree.c,v 1.4 2017/06/08 17:24:10 skrll Exp $ */ /* * (C) Copyright David Gibson , IBM Corporation. 2005. @@ -404,7 +404,7 @@ void dt_to_blob(FILE *f, struct dt_info padlen = padsize; if (alignsize > 0) - padlen = ALIGN(fdt32_to_cpu(fdt.totalsize) + padlen, alignsize) + padlen = FDTALIGN2(fdt32_to_cpu(fdt.totalsize) + padlen, alignsize) - fdt32_to_cpu(fdt.totalsize); if (padlen > 0) {
CVS commit: src/tools/dtc
Module Name:src Committed By: skrll Date: Thu Jun 8 17:16:44 UTC 2017 Modified Files: src/tools/dtc: Makefile Log Message: Update for new libfdt location To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/dtc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/dtc/Makefile diff -u src/tools/dtc/Makefile:1.1 src/tools/dtc/Makefile:1.2 --- src/tools/dtc/Makefile:1.1 Mon Jun 5 22:44:40 2017 +++ src/tools/dtc/Makefile Thu Jun 8 17:16:44 2017 @@ -1,9 +1,12 @@ -# $NetBSD: Makefile,v 1.1 2017/06/05 22:44:40 christos Exp $ +# $NetBSD: Makefile,v 1.2 2017/06/08 17:16:44 skrll Exp $ NOMAN= # defined .include +LIBFDT_DIR= ${.CURDIR}/../../sys/external/bsd/libfdt/dist +HOST_CPPFLAGS+= -I${LIBFDT_DIR} + HOSTPROGNAME= ${_TOOL_PREFIX}dtc HOST_SRCDIR= external/gpl2/dtc/usr.bin/dtc
CVS commit: src/tools/libfdt
Module Name:src Committed By: skrll Date: Thu Jun 8 17:09:29 UTC 2017 Modified Files: src/tools/libfdt: Makefile Log Message: New libfdt location To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/libfdt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/libfdt/Makefile diff -u src/tools/libfdt/Makefile:1.1 src/tools/libfdt/Makefile:1.2 --- src/tools/libfdt/Makefile:1.1 Tue Jun 6 07:45:39 2017 +++ src/tools/libfdt/Makefile Thu Jun 8 17:09:29 2017 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2017/06/06 07:45:39 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2017/06/08 17:09:29 skrll Exp $ HOSTLIB= fdt .include -LIBFDT_DIR= ${.CURDIR}/../../external/gpl2/dtc/dist/libfdt +LIBFDT_DIR= ${.CURDIR}/../../sys/external/bsd/libfdt/dist .include "${LIBFDT_DIR}/Makefile.libfdt"
CVS commit: src/doc
Module Name:src Committed By: abhinav Date: Thu Jun 8 16:44:03 UTC 2017 Modified Files: src/doc: 3RDPARTY Log Message: SQLite 3.19.3 is out To generate a diff of this commit: cvs rdiff -u -r1.1447 -r1.1448 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1447 src/doc/3RDPARTY:1.1448 --- src/doc/3RDPARTY:1.1447 Thu Jun 8 16:02:27 2017 +++ src/doc/3RDPARTY Thu Jun 8 16:44:03 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1447 2017/06/08 16:02:27 skrll Exp $ +# $NetBSD: 3RDPARTY,v 1.1448 2017/06/08 16:44:03 abhinav Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1285,7 +1285,7 @@ original. Package: sqlite Version: 3.17.0 -Current Vers: 3.18.0 +Current Vers: 3.19.3 Maintainer: Richard Hipp Home Page: http://www.sqlite.org Responsible: joerg
CVS commit: src/doc
Module Name:src Committed By: skrll Date: Thu Jun 8 16:02:27 UTC 2017 Modified Files: src/doc: 3RDPARTY Log Message: Update DTC entry To generate a diff of this commit: cvs rdiff -u -r1.1446 -r1.1447 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1446 src/doc/3RDPARTY:1.1447 --- src/doc/3RDPARTY:1.1446 Tue Jun 6 12:56:42 2017 +++ src/doc/3RDPARTY Thu Jun 8 16:02:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1446 2017/06/06 12:56:42 skrll Exp $ +# $NetBSD: 3RDPARTY,v 1.1447 2017/06/08 16:02:27 skrll Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1704,7 +1704,7 @@ Notes: Uses OpenSSL's bignum Package: dtc,libfdt -Version: 1.4.1 +Version: 1.4.4 Current Vers: 1.4.4 Maintainer: David Gibson , Jon Loeliger Archive Site: https://git.kernel.org/pub/scm/utils/dtc/dtc.git @@ -1713,3 +1713,5 @@ Mailing List: mailto:devicetree-compiler Responsible: skrll License: GPLv2 (dtc), BSD (libfdt) Location: external/gpl2/dtc, sys/external/bsd/libfdt +Notes: +external/gpl2/dtc/dtc2netbsd should be used to create directories to import
CVS commit: src/external/gpl2/dtc/dist
Module Name:src Committed By: skrll Date: Thu Jun 8 16:00:40 UTC 2017 Modified Files: src/external/gpl2/dtc/dist: data.c dtc-lexer.l dtc-parser.y dtc.h fdtdump.c fdtput.c flattree.c srcpos.c util.h src/external/gpl2/dtc/dist/tests: mangle-layout.c move_and_save.c tests.h Removed Files: src/external/gpl2/dtc/dist: .gitignore .travis.yml src/external/gpl2/dtc/dist/libfdt: Makefile.libfdt TODO fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h version.lds src/external/gpl2/dtc/dist/tests: test_tree1_body.dtsi Log Message: Merge conflicts To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl2/dtc/dist/.gitignore \ src/external/gpl2/dtc/dist/.travis.yml cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/dtc/dist/data.c \ src/external/gpl2/dtc/dist/dtc-lexer.l \ src/external/gpl2/dtc/dist/dtc-parser.y src/external/gpl2/dtc/dist/dtc.h \ src/external/gpl2/dtc/dist/fdtdump.c src/external/gpl2/dtc/dist/fdtput.c \ src/external/gpl2/dtc/dist/flattree.c src/external/gpl2/dtc/dist/srcpos.c \ src/external/gpl2/dtc/dist/util.h cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl2/dtc/dist/libfdt/Makefile.libfdt \ src/external/gpl2/dtc/dist/libfdt/TODO \ src/external/gpl2/dtc/dist/libfdt/fdt.c \ src/external/gpl2/dtc/dist/libfdt/fdt.h \ src/external/gpl2/dtc/dist/libfdt/fdt_addresses.c \ src/external/gpl2/dtc/dist/libfdt/fdt_empty_tree.c \ src/external/gpl2/dtc/dist/libfdt/fdt_ro.c \ src/external/gpl2/dtc/dist/libfdt/fdt_rw.c \ src/external/gpl2/dtc/dist/libfdt/fdt_strerror.c \ src/external/gpl2/dtc/dist/libfdt/fdt_sw.c \ src/external/gpl2/dtc/dist/libfdt/fdt_wip.c \ src/external/gpl2/dtc/dist/libfdt/libfdt.h \ src/external/gpl2/dtc/dist/libfdt/libfdt_env.h \ src/external/gpl2/dtc/dist/libfdt/libfdt_internal.h \ src/external/gpl2/dtc/dist/libfdt/version.lds cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/dtc/dist/tests/mangle-layout.c \ src/external/gpl2/dtc/dist/tests/move_and_save.c \ src/external/gpl2/dtc/dist/tests/tests.h cvs rdiff -u -r1.1.1.1 -r0 \ src/external/gpl2/dtc/dist/tests/test_tree1_body.dtsi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/dtc/dist/data.c diff -u src/external/gpl2/dtc/dist/data.c:1.2 src/external/gpl2/dtc/dist/data.c:1.3 --- src/external/gpl2/dtc/dist/data.c:1.2 Tue Jun 6 20:19:04 2017 +++ src/external/gpl2/dtc/dist/data.c Thu Jun 8 16:00:40 2017 @@ -1,3 +1,5 @@ +/* $NetBSD: data.c,v 1.3 2017/06/08 16:00:40 skrll Exp $ */ + /* * (C) Copyright David Gibson , IBM Corporation. 2005. * @@ -171,9 +173,9 @@ struct data data_merge(struct data d1, s struct data data_append_integer(struct data d, uint64_t value, int bits) { uint8_t value_8; - uint16_t value_16; - uint32_t value_32; - uint64_t value_64; + fdt16_t value_16; + fdt32_t value_32; + fdt64_t value_64; switch (bits) { case 8: @@ -197,14 +199,14 @@ struct data data_append_integer(struct d } } -struct data data_append_re(struct data d, const struct fdt_reserve_entry *re) +struct data data_append_re(struct data d, uint64_t address, uint64_t size) { - struct fdt_reserve_entry bere; + struct fdt_reserve_entry re; - bere.address = cpu_to_fdt64(re->address); - bere.size = cpu_to_fdt64(re->size); + re.address = cpu_to_fdt64(address); + re.size = cpu_to_fdt64(size); - return data_append_data(d, &bere, sizeof(bere)); + return data_append_data(d, &re, sizeof(re)); } struct data data_append_cell(struct data d, cell_t word) Index: src/external/gpl2/dtc/dist/dtc-lexer.l diff -u src/external/gpl2/dtc/dist/dtc-lexer.l:1.2 src/external/gpl2/dtc/dist/dtc-lexer.l:1.3 --- src/external/gpl2/dtc/dist/dtc-lexer.l:1.2 Mon Jun 5 18:59:10 2017 +++ src/external/gpl2/dtc/dist/dtc-lexer.l Thu Jun 8 16:00:40 2017 @@ -1,3 +1,5 @@ +/* $NetBSD: dtc-lexer.l,v 1.3 2017/06/08 16:00:40 skrll Exp $ */ + /* * (C) Copyright David Gibson , IBM Corporation. 2005. * @@ -62,7 +64,8 @@ static int dts_version = 1; static void push_input_file(const char *filename); static bool pop_input_file(void); -static void lexical_error(const char *fmt, ...); +static void PRINTF(1, 2) lexical_error(const char *fmt, ...); + %} %% @@ -73,24 +76,32 @@ static void lexical_error(const char *fm } <*>^"#"(line)?[ \t]+[0-9]+[ \t]+{STRING}([ \t]+[0-9]+)? { - char *line, *tmp, *fn; + char *line, *fnstart, *fnend; + struct data fn; /* skip text before line # */ line = yytext; while (!isdigit((unsigned char)*line)) line++; - /* skip digits in line # */ - tmp = line; - while (!isspace((unsigned char)*tmp)) -tmp++; - /* "NULL"-terminate line # */ - *tmp = '\0'; - /* start of filename */ - fn = strchr(tmp + 1, '"') + 1
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: uwe Date: Thu Jun 8 15:59:45 UTC 2017 Modified Files: src/lib/libc/stdio: fgetln.c fgetstr.c getdelim.c Log Message: Don't use "NULL" to talk about null-terminated strings. The C standard seems to be inconsistent about dash vs. space. Old text uses dash, Annex K uses space. I'll let wizd(8) to sort that out. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/fgetln.c cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/fgetstr.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/getdelim.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fgetln.c diff -u src/lib/libc/stdio/fgetln.c:1.16 src/lib/libc/stdio/fgetln.c:1.17 --- src/lib/libc/stdio/fgetln.c:1.16 Wed Dec 2 09:03:13 2009 +++ src/lib/libc/stdio/fgetln.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $ */ +/* $NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $"); +__RCSID("$NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -49,7 +49,7 @@ __weak_alias(fgetln,_fgetln) /* * Get an input line. * This now uses getdelim(3) for a code reduction. - * The upside is that strings are now always NULL terminated, but relying + * The upside is that strings are now always null-terminated, but relying * on this is non portable - better to use the POSIX getdelim(3) function. */ char * Index: src/lib/libc/stdio/fgetstr.c diff -u src/lib/libc/stdio/fgetstr.c:1.11 src/lib/libc/stdio/fgetstr.c:1.12 --- src/lib/libc/stdio/fgetstr.c:1.11 Mon Jan 11 20:39:29 2010 +++ src/lib/libc/stdio/fgetstr.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $ */ +/* $NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $"); +__RCSID("$NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -43,7 +43,7 @@ __RCSID("$NetBSD: fgetstr.c,v 1.11 2010/ /* * Get an input line. * This now uses getdelim(3) for a code reduction. - * The upside is that strings are now always NULL terminated, but relying + * The upside is that strings are now always null-terminated, but relying * on this is non portable - better to use the POSIX getdelim(3) function. */ char * Index: src/lib/libc/stdio/getdelim.c diff -u src/lib/libc/stdio/getdelim.c:1.13 src/lib/libc/stdio/getdelim.c:1.14 --- src/lib/libc/stdio/getdelim.c:1.13 Fri Jul 22 23:12:30 2011 +++ src/lib/libc/stdio/getdelim.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */ +/* $NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $"); +__RCSID("$NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -96,7 +96,7 @@ __getdelim(char **__restrict buf, size_t errno = EOVERFLOW; goto error; } - newlen++; /* reserve space for the NULL terminator */ + newlen++; /* reserve space for the null terminator */ if (newlen > *buflen) { if (newlen < MINBUF) newlen = MINBUF;
CVS import: src/external/gpl2/dtc/dist
Module Name:src Committed By: skrll Date: Thu Jun 8 15:59:28 UTC 2017 Update of /cvsroot/src/external/gpl2/dtc/dist In directory ivanova.netbsd.org:/tmp/cvs-serv24274 Log Message: Import of DTC from DTC version 1.4.4 Status: Vendor Tag: DTC Release Tags: dtc-1-4-4 U src/external/gpl2/dtc/dist/GPL U src/external/gpl2/dtc/dist/Makefile U src/external/gpl2/dtc/dist/Makefile.convert-dtsv0 U src/external/gpl2/dtc/dist/Makefile.dtc U src/external/gpl2/dtc/dist/Makefile.utils U src/external/gpl2/dtc/dist/README U src/external/gpl2/dtc/dist/README.license U src/external/gpl2/dtc/dist/TODO U src/external/gpl2/dtc/dist/dtdiff U src/external/gpl2/dtc/dist/checks.c U src/external/gpl2/dtc/dist/convert-dtsv0-lexer.l C src/external/gpl2/dtc/dist/data.c C src/external/gpl2/dtc/dist/dtc-lexer.l C src/external/gpl2/dtc/dist/dtc-parser.y U src/external/gpl2/dtc/dist/dtc.c C src/external/gpl2/dtc/dist/dtc.h C src/external/gpl2/dtc/dist/fdtdump.c U src/external/gpl2/dtc/dist/fdtget.c C src/external/gpl2/dtc/dist/fdtput.c C src/external/gpl2/dtc/dist/flattree.c U src/external/gpl2/dtc/dist/fstree.c U src/external/gpl2/dtc/dist/livetree.c C src/external/gpl2/dtc/dist/srcpos.c U src/external/gpl2/dtc/dist/srcpos.h U src/external/gpl2/dtc/dist/treesource.c U src/external/gpl2/dtc/dist/util.c C src/external/gpl2/dtc/dist/util.h N src/external/gpl2/dtc/dist/Documentation/dt-object-internal.txt U src/external/gpl2/dtc/dist/Documentation/dtc-paper.bib U src/external/gpl2/dtc/dist/Documentation/dtc-paper.tex U src/external/gpl2/dtc/dist/Documentation/dts-format.txt U src/external/gpl2/dtc/dist/Documentation/manual.txt U src/external/gpl2/dtc/dist/scripts/kup-dtc U src/external/gpl2/dtc/dist/scripts/setlocalversion U src/external/gpl2/dtc/dist/tests/.gitignore U src/external/gpl2/dtc/dist/tests/Makefile.tests U src/external/gpl2/dtc/dist/tests/addresses.dts U src/external/gpl2/dtc/dist/tests/aliases.dts U src/external/gpl2/dtc/dist/tests/appendprop.dts U src/external/gpl2/dtc/dist/tests/bad-empty-ranges.dts U src/external/gpl2/dtc/dist/tests/bad-name-property.dts U src/external/gpl2/dtc/dist/tests/bad-ncells.dts N src/external/gpl2/dtc/dist/tests/bad-octal-literal.dts U src/external/gpl2/dtc/dist/tests/bad-reg-ranges.dts U src/external/gpl2/dtc/dist/tests/bad-size-cells.dts U src/external/gpl2/dtc/dist/tests/bad-string-props.dts U src/external/gpl2/dtc/dist/tests/base01.asm U src/external/gpl2/dtc/dist/tests/base01.cmd U src/external/gpl2/dtc/dist/tests/base01.dts U src/external/gpl2/dtc/dist/tests/base01.stderr U src/external/gpl2/dtc/dist/tests/boot-cpuid.dts U src/external/gpl2/dtc/dist/tests/char_literal.dts U src/external/gpl2/dtc/dist/tests/comments-cmp.dts U src/external/gpl2/dtc/dist/tests/comments.dts U src/external/gpl2/dtc/dist/tests/data.S U src/external/gpl2/dtc/dist/tests/default-addr-size.dts U src/external/gpl2/dtc/dist/tests/delete_reinstate_multilabel.dts U src/external/gpl2/dtc/dist/tests/delete_reinstate_multilabel_ref.dts U src/external/gpl2/dtc/dist/tests/dependencies.cmp U src/external/gpl2/dtc/dist/tests/dependencies.dts U src/external/gpl2/dtc/dist/tests/deps_inc1.dtsi U src/external/gpl2/dtc/dist/tests/deps_inc2.dtsi N src/external/gpl2/dtc/dist/tests/division-by-zero.dts U src/external/gpl2/dtc/dist/tests/dtc-checkfails.sh U src/external/gpl2/dtc/dist/tests/dtc-fails.sh U src/external/gpl2/dtc/dist/tests/dtc-fatal.sh U src/external/gpl2/dtc/dist/tests/dup-nodename.dts U src/external/gpl2/dtc/dist/tests/dup-phandle.dts U src/external/gpl2/dtc/dist/tests/dup-propname.dts U src/external/gpl2/dtc/dist/tests/embedded_nul.dts U src/external/gpl2/dtc/dist/tests/embedded_nul_equiv.dts U src/external/gpl2/dtc/dist/tests/empty.dts U src/external/gpl2/dtc/dist/tests/escapes.dts U src/external/gpl2/dtc/dist/tests/extra-terminating-null.dts U src/external/gpl2/dtc/dist/tests/fdtdump-runtest.sh U src/external/gpl2/dtc/dist/tests/fdtdump.dts U src/external/gpl2/dtc/dist/tests/fdtget-runtest.sh U src/external/gpl2/dtc/dist/tests/fdtput-runtest.sh U src/external/gpl2/dtc/dist/tests/incbin.bin U src/external/gpl2/dtc/dist/tests/incbin.dts U src/external/gpl2/dtc/dist/tests/include0.dts U src/external/gpl2/dtc/dist/tests/include1.dts U src/external/gpl2/dtc/dist/tests/include2.dts U src/external/gpl2/dtc/dist/tests/include3.dts U src/external/gpl2/dtc/dist/tests/include4.dts U src/external/gpl2/dtc/dist/tests/include5.dts U src/external/gpl2/dtc/dist/tests/include5a.dts U src/external/gpl2/dtc/dist/tests/include6.dts U src/external/gpl2/dtc/dist/tests/include7.dts U src/external/gpl2/dtc/dist/tests/include8.dts U src/external/gpl2/dtc/dist/tests/label01.dts U src/external/gpl2/dtc/dist/tests/label_repeated.dts U src/external/gpl2/dtc/dist/tests/line_directives.dts U src/external/gpl2/dtc/dist/tests/lorem.txt U src/external/gpl2/dtc/dist/tests/mangle-layout.supp U src/external/gpl2/dtc/dist/tests/minusone-phandle.dts U src/external/gpl2/dtc/dist/tests/multilabel.dts U src/external/gpl2
CVS commit: src/sys/external/bsd/libfdt/dist
Module Name:src Committed By: skrll Date: Thu Jun 8 15:54:32 UTC 2017 Modified Files: src/sys/external/bsd/libfdt/dist: libfdt_env.h Log Message: Merge conflicts To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libfdt/dist/libfdt_env.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/libfdt/dist/libfdt_env.h diff -u src/sys/external/bsd/libfdt/dist/libfdt_env.h:1.2 src/sys/external/bsd/libfdt/dist/libfdt_env.h:1.3 --- src/sys/external/bsd/libfdt/dist/libfdt_env.h:1.2 Sun Dec 13 17:06:14 2015 +++ src/sys/external/bsd/libfdt/dist/libfdt_env.h Thu Jun 8 15:54:32 2017 @@ -1,3 +1,5 @@ +/* $NetBSD: libfdt_env.h,v 1.3 2017/06/08 15:54:32 skrll Exp $ */ + #ifndef _LIBFDT_ENV_H #define _LIBFDT_ENV_H /* @@ -58,20 +60,21 @@ #else #include #include +#include #include #endif #ifdef __CHECKER__ -#define __force __attribute__((force)) -#define __bitwise __attribute__((bitwise)) +#define FDT_FORCE __attribute__((force)) +#define FDT_BITWISE __attribute__((bitwise)) #else -#define __force -#define __bitwise +#define FDT_FORCE +#define FDT_BITWISE #endif -typedef uint16_t __bitwise fdt16_t; -typedef uint32_t __bitwise fdt32_t; -typedef uint64_t __bitwise fdt64_t; +typedef uint16_t FDT_BITWISE fdt16_t; +typedef uint32_t FDT_BITWISE fdt32_t; +typedef uint64_t FDT_BITWISE fdt64_t; #define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n]) #define CPU_TO_FDT16(x) ((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1)) @@ -84,29 +87,29 @@ typedef uint64_t __bitwise fdt64_t; static inline uint16_t fdt16_to_cpu(fdt16_t x) { - return (__force uint16_t)CPU_TO_FDT16(x); + return (FDT_FORCE uint16_t)CPU_TO_FDT16(x); } static inline fdt16_t cpu_to_fdt16(uint16_t x) { - return (__force fdt16_t)CPU_TO_FDT16(x); + return (FDT_FORCE fdt16_t)CPU_TO_FDT16(x); } static inline uint32_t fdt32_to_cpu(fdt32_t x) { - return (__force uint32_t)CPU_TO_FDT32(x); + return (FDT_FORCE uint32_t)CPU_TO_FDT32(x); } static inline fdt32_t cpu_to_fdt32(uint32_t x) { - return (__force fdt32_t)CPU_TO_FDT32(x); + return (FDT_FORCE fdt32_t)CPU_TO_FDT32(x); } static inline uint64_t fdt64_to_cpu(fdt64_t x) { - return (__force uint64_t)CPU_TO_FDT64(x); + return (FDT_FORCE uint64_t)CPU_TO_FDT64(x); } static inline fdt64_t cpu_to_fdt64(uint64_t x) { - return (__force fdt64_t)CPU_TO_FDT64(x); + return (FDT_FORCE fdt64_t)CPU_TO_FDT64(x); } #undef CPU_TO_FDT64 #undef CPU_TO_FDT32
CVS import: src/sys/external/bsd/libfdt/dist
Module Name:src Committed By: skrll Date: Thu Jun 8 15:53:15 UTC 2017 Update of /cvsroot/src/sys/external/bsd/libfdt/dist In directory ivanova.netbsd.org:/tmp/cvs-serv14227 Log Message: Import of libfdt from DTC version 1.4.4 Status: Vendor Tag: DTC Release Tags: dtc-1-4-4 U src/sys/external/bsd/libfdt/dist/Makefile.libfdt U src/sys/external/bsd/libfdt/dist/TODO U src/sys/external/bsd/libfdt/dist/version.lds U src/sys/external/bsd/libfdt/dist/fdt.c U src/sys/external/bsd/libfdt/dist/fdt.h U src/sys/external/bsd/libfdt/dist/fdt_addresses.c U src/sys/external/bsd/libfdt/dist/fdt_empty_tree.c N src/sys/external/bsd/libfdt/dist/fdt_overlay.c U src/sys/external/bsd/libfdt/dist/fdt_ro.c U src/sys/external/bsd/libfdt/dist/fdt_rw.c U src/sys/external/bsd/libfdt/dist/fdt_strerror.c U src/sys/external/bsd/libfdt/dist/fdt_sw.c U src/sys/external/bsd/libfdt/dist/fdt_wip.c U src/sys/external/bsd/libfdt/dist/libfdt.h C src/sys/external/bsd/libfdt/dist/libfdt_env.h U src/sys/external/bsd/libfdt/dist/libfdt_internal.h 1 conflicts created by this import. Use the following command to help the merge: cvs checkout -jDTC:yesterday -jDTC src/sys/external/bsd/libfdt/dist
CVS commit: src/external/gpl2/dtc
Module Name:src Committed By: skrll Date: Thu Jun 8 15:51:12 UTC 2017 Added Files: src/external/gpl2/dtc: dtc2netbsd Log Message: Add a dtc2netbsd script To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/dtc/dtc2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl2/dtc/dtc2netbsd diff -u /dev/null src/external/gpl2/dtc/dtc2netbsd:1.1 --- /dev/null Thu Jun 8 15:51:12 2017 +++ src/external/gpl2/dtc/dtc2netbsd Thu Jun 8 15:51:12 2017 @@ -0,0 +1,124 @@ +#! /bin/sh +# +# $NetBSD: dtc2netbsd,v 1.1 2017/06/08 15:51:12 skrll Exp $ +# +# +# Copyright (c) 2017 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Nick Hudson +# +# 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +# +# dtc2netbsd: convert a dtc source tree into netbsd dtc/libfdt source trees +# +# Rough instructions for importing new dtc release: +# +# $ cd /some/where/temporary +# $ tar xpfz /dtc/release/tar/file +# $ DTCSRCS=$(pwd) +# $ WRKDIR=/an/other/temporary +# $ sh /usr/src/external/gpl2/dtc/dtc2netbsd $DTCSRCS $WRKDIR +# +# Import libfdt using +# $ cd $WRKDIR/libfdt +# $ cvs import -m "Import libfdt " src/sys/external/bsd/libfdt/dist DTC dtc- +# +# merge libfdt sources using, e.g. +# $ cvs -d cvs.netbsd.org:/cvsroot checkout -jdtc-1-4-1 -jdtc-1-4-4 src/sys/external/bsd/libfdt/dist +# +# Import dtc using +# $ cd $WRKDIR/dtc +# $ cvs import -m "Import dtc -MM-DD" src/external/gpl2/dtc/dist DTC dtc- +# merge dtc sources using, e.g. +# $ cvs -d cvs.netbsd.org:/cvsroot checkout -jdtc-1-4-1 -jdtc-1-4-4 src/external/gpl2/dtc/dist + +if [ $# -ne 2 ]; then echo "dtc2netbsd dtcsrc tmpdir"; exit 1; fi + +r=$1 +d=$2 + +case "$d" in + /*) + ;; + *) + d=`/bin/pwd`/$d + ;; +esac + +case "$r" in + /*) + ;; + *) + r=`/bin/pwd`/$r + ;; +esac + +echo preparing directory $d +rm -rf $d +mkdir -p $d/dtc + +### Copy the files and directories +echo copying $r to $d +cd $r +pax -rw * $d/dtc +mv $d/dtc/libfdt $d/libfdt + +# cd to import directory +cd $d + +# + +### Remove the $'s around RCS tags +cleantags $d + +### Add our NetBSD RCS Id +find $d -type f -name '*.[chly]' -print | while read c; do + sed 1q < $c | grep -q '\$NetBSD' || ( +echo "/* \$NetBSD\$ */" >/tmp/dtc$$ +echo "" >>/tmp/dtc$$ +cat $c >> /tmp/dtc$$ +mv /tmp/dtc$$ $c && echo added NetBSD RCS tag to $c + ) +done + +echo done + +### Clean up any CVS directories that might be around. +echo "cleaning up CVS residue." +( + cd $d + find . -type d -name "CVS" -print | xargs rm -r +) +echo done + +### Fixing file and directory permissions. +echo "Fixing file/directory permissions." +( + cd $d + find . -type f -print | xargs chmod u+rw,go+r + find . -type d -print | xargs chmod u+rwx,go+rx +) +echo done + +exit 0
CVS commit: src/external/gpl3/gcc/dist/gcc/config/vax
Module Name:src Committed By: flxd Date: Thu Jun 8 15:28:27 UTC 2017 Modified Files: src/external/gpl3/gcc/dist/gcc/config/vax: builtins.md Log Message: Fix PR port-vax/51761 as suggested by Paul Koning on port-vax list. Installation (install.ram, -Os) on my VS4000 is possible without SCSI timeouts again. Other variable-length bit field instructions should be checked for correct constraints, too! To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md diff -u src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5 src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.6 --- src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5 Sun Jan 24 09:43:34 2016 +++ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Thu Jun 8 15:28:27 2017 @@ -47,7 +47,7 @@ (define_insn "ctzsi2" [(set (match_operand:SI 0 "nonimmediate_operand" "=rQ") - (ctz:SI (match_operand:SI 1 "general_operand" "nrmT"))) + (ctz:SI (match_operand:SI 1 "general_operand" "nrQT"))) (set (cc0) (match_dup 0))] "" "ffs $0,$32,%1,%0")
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Thu Jun 8 13:32:20 UTC 2017 Modified Files: src/lib/libc: shlib_version Log Message: One more hack to kill in setproctitle To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.273 src/lib/libc/shlib_version:1.274 --- src/lib/libc/shlib_version:1.273 Tue May 9 11:14:16 2017 +++ src/lib/libc/shlib_version Thu Jun 8 13:32:20 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.273 2017/05/09 11:14:16 kre Exp $ +# $NetBSD: shlib_version,v 1.274 2017/06/08 13:32:20 joerg Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -8,6 +8,7 @@ # - libc/net: resolver update to BIND8/9? # - md2, md4, md5, rmd160 & sha1 functions should take the same arguments AFAP # - Crypto hashes have name overlap with libcrypto, rename them +# - libc/gen/setproctitle.c: remove __ps_strings hack # - libc/gen/assert.c: __{diag,}assert13() -> __{diag,}assert() # - lib/libc/net/iso_addr.c: remove # - libc/gen/times.c: remove; __times13() -> times()
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu Jun 8 13:17:00 UTC 2017 Modified Files: src/bin/sh: show.c Log Message: Correct spelling in comments of DEBUG only code... To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/bin/sh/show.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/show.c diff -u src/bin/sh/show.c:1.43 src/bin/sh/show.c:1.44 --- src/bin/sh/show.c:1.43 Wed Jun 7 05:08:32 2017 +++ src/bin/sh/show.c Thu Jun 8 13:17:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: show.c,v 1.43 2017/06/07 05:08:32 kre Exp $ */ +/* $NetBSD: show.c,v 1.44 2017/06/08 13:17:00 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: show.c,v 1.43 2017/06/07 05:08:32 kre Exp $"); +__RCSID("$NetBSD: show.c,v 1.44 2017/06/08 13:17:00 kre Exp $"); #endif #endif /* not lint */ @@ -93,7 +93,7 @@ typedef struct traceinfo { int tfd; /* file descriptor for open trace file */ int nxtiov; /* the buffer we should be writing to */ char lastc; /* the last non-white character output */ - uint8_t supr; /* char classes to supress after \n */ + uint8_t supr; /* char classes to suppress after \n */ pid_t pid; /* process id of process that opened that file */ size_t llen; /* number of chars in current output line */ size_t blen; /* chars used in current buffer being filled */ @@ -103,8 +103,8 @@ typedef struct traceinfo { /* These are auto turned off when non white space is printed */ #define SUP_NL 0x01 /* don't print \n */ -#define SUP_SP 0x03 /* supress spaces */ -#define SUP_WSP 0x04 /* supress all white space */ +#define SUP_SP 0x03 /* suppress spaces */ +#define SUP_WSP 0x04 /* suppress all white space */ #ifdef DEBUG /* from here to end of file ... */
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu Jun 8 13:12:17 UTC 2017 Modified Files: src/bin/sh: eval.c nodetypes parser.c Log Message: Remove some left over baggage from the LINENO v1 implementation that didn't get removed with v2, and should have. This would have had (I think, without having tested it) one very minor effect on the way LINENO worked in the v2 implementation, but my guess is it would have taken a long time before anyone noticed... To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/bin/sh/eval.c cvs rdiff -u -r1.17 -r1.18 src/bin/sh/nodetypes cvs rdiff -u -r1.135 -r1.136 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/eval.c diff -u src/bin/sh/eval.c:1.145 src/bin/sh/eval.c:1.146 --- src/bin/sh/eval.c:1.145 Thu Jun 8 02:25:43 2017 +++ src/bin/sh/eval.c Thu Jun 8 13:12:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.145 2017/06/08 02:25:43 kre Exp $ */ +/* $NetBSD: eval.c,v 1.146 2017/06/08 13:12:17 kre Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.145 2017/06/08 02:25:43 kre Exp $"); +__RCSID("$NetBSD: eval.c,v 1.146 2017/06/08 13:12:17 kre Exp $"); #endif #endif /* not lint */ @@ -117,7 +117,6 @@ STATIC void expredir(union node *); STATIC void evalpipe(union node *); STATIC void evalcommand(union node *, int, struct backcmd *); STATIC void prehash(union node *); -STATIC void set_lineno(int); STATIC char *find_dot_file(char *); @@ -309,11 +308,9 @@ evaltree(union node *n, int flags) evalloop(n, sflags); break; case NFOR: - set_lineno(n->nfor.lineno); evalfor(n, sflags); break; case NCASE: - set_lineno(n->ncase.lineno); evalcase(n, sflags); break; case NDEFUN: @@ -1492,12 +1489,3 @@ timescmd(int argc, char **argv) return 0; } - -STATIC void -set_lineno(int lno) -{ - char lineno[24]; - - (void)snprintf(lineno, sizeof lineno, "%u", lno); - (void)setvarsafe("LINENO", lineno, 0); -} Index: src/bin/sh/nodetypes diff -u src/bin/sh/nodetypes:1.17 src/bin/sh/nodetypes:1.18 --- src/bin/sh/nodetypes:1.17 Wed Jun 7 05:08:32 2017 +++ src/bin/sh/nodetypes Thu Jun 8 13:12:17 2017 @@ -1,4 +1,4 @@ -# $NetBSD: nodetypes,v 1.17 2017/06/07 05:08:32 kre Exp $ +# $NetBSD: nodetypes,v 1.18 2017/06/08 13:12:17 kre Exp $ # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. # @@ -90,7 +90,6 @@ NFOR nfor # the for statement args nodeptr # for var in args body nodeptr # do body; done var string # the for variable - lineno int NCASE ncase # a case statement type int Index: src/bin/sh/parser.c diff -u src/bin/sh/parser.c:1.135 src/bin/sh/parser.c:1.136 --- src/bin/sh/parser.c:1.135 Wed Jun 7 08:10:31 2017 +++ src/bin/sh/parser.c Thu Jun 8 13:12:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.135 2017/06/07 08:10:31 kre Exp $ */ +/* $NetBSD: parser.c,v 1.136 2017/06/08 13:12:17 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.135 2017/06/07 08:10:31 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.136 2017/06/08 13:12:17 kre Exp $"); #endif #endif /* not lint */ @@ -406,7 +406,6 @@ command(void) n1 = stalloc(sizeof(struct nfor)); n1->type = NFOR; n1->nfor.var = wordtext; - n1->nfor.lineno = startlinno; if (readtoken()==TWORD && !quoteflag && equal(wordtext,"in")) { app = ≈ while (readtoken() == TWORD) {
CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Thu Jun 8 13:05:03 UTC 2017 Modified Files: src/sys/dev: audio.c Log Message: Retrn error to userland from startp/startr depending on the error from trigger/start output/input. Found by jmcneill@. To generate a diff of this commit: cvs rdiff -u -r1.357 -r1.358 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.357 src/sys/dev/audio.c:1.358 --- src/sys/dev/audio.c:1.357 Thu Jun 1 09:44:30 2017 +++ src/sys/dev/audio.c Thu Jun 8 13:05:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.357 2017/06/01 09:44:30 pgoyette Exp $ */ +/* $NetBSD: audio.c,v 1.358 2017/06/08 13:05:03 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.357 2017/06/01 09:44:30 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.358 2017/06/08 13:05:03 nat Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -267,8 +267,8 @@ void recswvol_func(struct audio_softc *, size_t, struct virtual_channel *); void mix_func(struct audio_softc *, struct audio_ringbuffer *, struct virtual_channel *); -void mix_write(void *); -void mix_read(void *); +int mix_write(void *); +int mix_read(void *); int audio_check_params(struct audio_params *); void audio_calc_blksize(struct audio_softc *, int, struct virtual_channel *); @@ -3485,6 +3485,8 @@ int audiostartr(struct audio_softc *sc, struct virtual_channel *vc) { + int error; + KASSERT(mutex_owned(sc->sc_lock)); DPRINTF(("audiostartr: start=%p used=%d(hi=%d) mmapped=%d\n", @@ -3494,15 +3496,16 @@ audiostartr(struct audio_softc *sc, stru if (!audio_can_capture(sc)) return EINVAL; + error = 0; if (sc->sc_rec_started == false) { mutex_enter(sc->sc_intr_lock); - mix_read(sc); + error = mix_read(sc); cv_broadcast(&sc->sc_rcondvar); mutex_exit(sc->sc_intr_lock); } vc->sc_rbus = true; - return 0; + return error; } int @@ -3534,13 +3537,16 @@ audiostartp(struct audio_softc *sc, stru audio_mix(sc); audio_mix(sc); mutex_enter(sc->sc_intr_lock); - mix_write(sc); + error = mix_write(sc); + if (error) + goto done; vc = chan->vc; vc->sc_mpr.s.outp = audio_stream_add_outp(&vc->sc_mpr.s, vc->sc_mpr.s.outp, vc->sc_mpr.blksize); - mix_write(sc); + error = mix_write(sc); cv_broadcast(&sc->sc_condvar); +done: mutex_exit(sc->sc_intr_lock); } @@ -5450,7 +5456,7 @@ audio_can_capture(struct audio_softc *sc return audio_get_props(sc) & AUDIO_PROP_CAPTURE ? true : false; } -void +int mix_read(void *arg) { struct audio_softc *sc = arg; @@ -5486,6 +5492,7 @@ mix_read(void *arg) DPRINTF(("audio_upmix restart failed: %d\n", error)); audio_clear(sc, SIMPLEQ_FIRST(&sc->sc_audiochan)->vc); sc->sc_rec_started = false; + return error; } inp = vc->sc_mrr.s.inp; @@ -5513,9 +5520,11 @@ mix_read(void *arg) blksize); vc->sc_rustream->outp = audio_stream_add_outp(vc->sc_rustream, vc->sc_rustream->outp, blksize); + + return error; } -void +int mix_write(void *arg) { struct audio_softc *sc = arg; @@ -5595,6 +5604,8 @@ done: audio_clear(sc, SIMPLEQ_FIRST(&sc->sc_audiochan)->vc); sc->sc_trigger_started = false; } + + return error; } #define DEF_MIX_FUNC(name, type, MINVAL, MAXVAL) \
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Thu Jun 8 11:05:16 UTC 2017 Modified Files: src/sys/dev/ic: pl041.c Log Message: bus_space_write_multi_4 takes a count, not number of bytes. With this, audio works in qemu. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/pl041.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/pl041.c diff -u src/sys/dev/ic/pl041.c:1.2 src/sys/dev/ic/pl041.c:1.3 --- src/sys/dev/ic/pl041.c:1.2 Thu Jun 8 10:40:13 2017 +++ src/sys/dev/ic/pl041.c Thu Jun 8 11:05:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $ */ +/* $NetBSD: pl041.c,v 1.3 2017/06/08 11:05:16 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.3 2017/06/08 11:05:16 jmcneill Exp $"); #include #include @@ -109,7 +109,7 @@ aaci_write_data(struct aaci_softc *sc) const int len = min(AACI_FIFO_DEPTH / 2, min(sc->sc_pblkresid, (uintptr_t)sc->sc_pend - (uintptr_t)sc->sc_pcur)); KASSERT((len & 3) == 0); - AACI_WRITE_MULTI(sc, AACIDR, sc->sc_pcur, len); + AACI_WRITE_MULTI(sc, AACIDR, sc->sc_pcur, len >> 2); sc->sc_pcur += (len >> 2); if (sc->sc_pcur == sc->sc_pend) sc->sc_pcur = sc->sc_pstart;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu Jun 8 10:40:38 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: VEXPRESS_A15 Log Message: Enable aaci To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/VEXPRESS_A15 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VEXPRESS_A15 diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.14 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.15 --- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.14 Thu Jun 8 10:05:32 2017 +++ src/sys/arch/evbarm/conf/VEXPRESS_A15 Thu Jun 8 10:40:38 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: VEXPRESS_A15,v 1.14 2017/06/08 10:05:32 jmcneill Exp $ +# $NetBSD: VEXPRESS_A15,v 1.15 2017/06/08 10:40:38 jmcneill Exp $ # # ARM Versatile Express A15 # @@ -64,9 +64,9 @@ ld3 at sdmmc3 ld* at sdmmc? # Audio -#aaci* at fdt? # ARM PrimeCell AACI -#audio* at audiobus? -#spkr* at audio? # PC speaker (synthesized) +aaci* at fdt? # ARM PrimeCell AACI +audio* at audiobus? +spkr* at audio? # PC speaker (synthesized) # Framebuffer genfb* at fdt?
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Thu Jun 8 10:40:13 UTC 2017 Modified Files: src/sys/dev/ic: pl041.c Log Message: Fix two bugs: - Inverted test for fifo status in aaci_write_data - Return success from trigger_output (thanks nat) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/pl041.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/pl041.c diff -u src/sys/dev/ic/pl041.c:1.1 src/sys/dev/ic/pl041.c:1.2 --- src/sys/dev/ic/pl041.c:1.1 Thu Jun 8 10:02:39 2017 +++ src/sys/dev/ic/pl041.c Thu Jun 8 10:40:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $ */ +/* $NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $"); #include #include @@ -105,7 +105,7 @@ aaci_write_data(struct aaci_softc *sc) if (sc->sc_pint == NULL) return; - while ((AACI_READ(sc, AACISR) & AACISR_TXHE) == 0) { + while ((AACI_READ(sc, AACISR) & AACISR_TXHE) != 0) { const int len = min(AACI_FIFO_DEPTH / 2, min(sc->sc_pblkresid, (uintptr_t)sc->sc_pend - (uintptr_t)sc->sc_pcur)); KASSERT((len & 3) == 0); @@ -205,7 +205,7 @@ aaci_trigger_output(void *priv, void *st AACITXCR_TXCM | AACITXCR_TSIZE_16 | AACITXCR_TX(3) | AACITXCR_TX(4)); - return ENXIO; + return 0; } static int
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu Jun 8 10:05:32 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: VEXPRESS_A15 Log Message: Add aaci at fdt, commented out for now. Driver should work (tm) but QEMU and my old Thinkpad can't seem to keep up. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/VEXPRESS_A15 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VEXPRESS_A15 diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.13 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.14 --- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.13 Tue Jun 6 00:25:48 2017 +++ src/sys/arch/evbarm/conf/VEXPRESS_A15 Thu Jun 8 10:05:32 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: VEXPRESS_A15,v 1.13 2017/06/06 00:25:48 jmcneill Exp $ +# $NetBSD: VEXPRESS_A15,v 1.14 2017/06/08 10:05:32 jmcneill Exp $ # # ARM Versatile Express A15 # @@ -63,6 +63,11 @@ ld2 at sdmmc2 ld3 at sdmmc3 ld* at sdmmc? +# Audio +#aaci* at fdt? # ARM PrimeCell AACI +#audio* at audiobus? +#spkr* at audio? # PC speaker (synthesized) + # Framebuffer genfb* at fdt? wsdisplay* at genfb?
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Thu Jun 8 10:03:59 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt Added Files: src/sys/arch/arm/fdt: aaci_fdt.c Log Message: Add fdt glue for ARM PrimeCell Advanced Audio CODEC interface (PL041). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/fdt/aaci_fdt.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/fdt/files.fdt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.9 src/sys/arch/arm/fdt/files.fdt:1.10 --- src/sys/arch/arm/fdt/files.fdt:1.9 Sat Jun 3 17:05:23 2017 +++ src/sys/arch/arm/fdt/files.fdt Thu Jun 8 10:03:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.9 2017/06/03 17:05:23 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.10 2017/06/08 10:03:59 jmcneill Exp $ include "dev/pckbport/files.pckbport" @@ -32,5 +32,8 @@ file arch/arm/fdt/plmmc_fdt.c plmmc_fdt attach smsh at fdt with smsh_fdt file arch/arm/fdt/smsh_fdt.c smsh_fdt +attach aaci at fdt with aaci_fdt +file arch/arm/fdt/aaci_fdt.c aaci_fdt + # Console parameters defparam opt_fdt_arm.hCONSADDR Added files: Index: src/sys/arch/arm/fdt/aaci_fdt.c diff -u /dev/null src/sys/arch/arm/fdt/aaci_fdt.c:1.1 --- /dev/null Thu Jun 8 10:03:59 2017 +++ src/sys/arch/arm/fdt/aaci_fdt.c Thu Jun 8 10:03:59 2017 @@ -0,0 +1,106 @@ +/* $NetBSD: aaci_fdt.c,v 1.1 2017/06/08 10:03:59 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * 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 +__KERNEL_RCSID(0, "$NetBSD: aaci_fdt.c,v 1.1 2017/06/08 10:03:59 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +static int aaci_fdt_match(device_t, cfdata_t, void *); +static void aaci_fdt_attach(device_t, device_t, void *); + +static const char * const compatible[] = { + "arm,pl041", + NULL +}; + +CFATTACH_DECL_NEW(aaci_fdt, sizeof(struct aaci_softc), + aaci_fdt_match, aaci_fdt_attach, NULL, NULL); + +static int +aaci_fdt_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_compatible(faa->faa_phandle, compatible) >= 0; +} + +static void +aaci_fdt_attach(device_t parent, device_t self, void *aux) +{ + struct aaci_softc * const sc = device_private(self); + struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; + char intrstr[128]; + struct clk *clk; + bus_addr_t addr; + bus_size_t size; + void *ih; + + if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0) { + aprint_error(": missing 'reg' property\n"); + return; + } + + if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) { + aprint_error_dev(self, "failed to decode interrupt\n"); + return; + } + + for (int i = 0; (clk = fdtbus_clock_get_index(phandle, i)); i++) + if (clk_enable(clk) != 0) { + aprint_error(": couldn't enable clock #%d\n", i); + return; + } + + sc->sc_dev = self; + sc->sc_bst = faa->faa_bst; + if (bus_space_map(faa->faa_bst, addr, size, 0, &sc->sc_bsh)) { + aprint_error(": couldn't map device\n"); + return; + } + + ih = fdtbus_intr_establish(phandle, 0, IPL_AUDIO, FDT_INTR_MPSAFE, + aaci_intr, sc); + if (ih == NULL) { + aprint_error_dev(self, "couldn't install interrupt handler\n"); + return; + } + + aaci_attach(sc); + + aprint_normal_dev(self, "interrupting on %s\n", intrstr); +}
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Thu Jun 8 10:02:39 UTC 2017 Modified Files: src/sys/conf: files Added Files: src/sys/dev/ic: pl041.c pl041var.h Log Message: Add driver for ARM PrimeCell Advanced Audio CODEC interface (PL041). Don't expect this driver to work on real hardware, but QEMU emulates it. To generate a diff of this commit: cvs rdiff -u -r1.1173 -r1.1174 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/pl041.c src/sys/dev/ic/pl041var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1173 src/sys/conf/files:1.1174 --- src/sys/conf/files:1.1173 Sat Jun 3 17:03:36 2017 +++ src/sys/conf/files Thu Jun 8 10:02:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1173 2017/06/03 17:03:36 jmcneill Exp $ +# $NetBSD: files,v 1.1174 2017/06/08 10:02:39 jmcneill Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150846 @@ -1315,6 +1315,10 @@ defflag opt_dwc_mmc.h DWC_MMC_DEBUG device dwcmmc: sdmmcbus file dev/ic/dwc_mmc.c dwcmmc +# ARM PrimeCell PL041 (AACI) Advanced Audio CODEC interface +device aaci: audiobus, auconv, aurateconv, mulaw, ac97 +file dev/ic/pl041.c aaci + # ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse interface device plkmi: pckbport file dev/ic/pl050.c plkmi Added files: Index: src/sys/dev/ic/pl041.c diff -u /dev/null src/sys/dev/ic/pl041.c:1.1 --- /dev/null Thu Jun 8 10:02:39 2017 +++ src/sys/dev/ic/pl041.c Thu Jun 8 10:02:39 2017 @@ -0,0 +1,358 @@ +/* $NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * 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 +__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#define AACIRXCR 0x00 +#define AACITXCR 0x04 +#define AACITXCR_TXFEN __BIT(16) +#define AACITXCR_TXCM __BIT(15) +#define AACITXCR_TSIZE __BITS(14,13) +#define AACITXCR_TSIZE_16 __SHIFTIN(0, AACITXCR_TSIZE) +#define AACITXCR_TX(n) __BIT(n) +#define AACITXCR_TXEN __BIT(0) +#define AACISR 0x08 +#define AACISR_TXFF __BIT(5) +#define AACISR_TXHE __BIT(3) +#define AACIISR 0x0c +#define AACIISR_URINTR __BIT(5) +#define AACIISR_TXINTR __BIT(2) +#define AACIIE 0x10 +#define AACIIE_TXUIE __BIT(5) +#define AACIIE_TXIE __BIT(2) +#define AACISL1RX 0x50 +#define AACISL1TX 0x54 +#define AACISL2RX 0x58 +#define AACISL2TX 0x5c +#define AACISLFR 0x68 +#define AACISLISTAT 0x6c +#define AACISLIEN 0x70 +#define AACIINTCLR 0x74 +#define AACIMAINCR 0x78 +#define AACIRESET 0x7c +#define AACISYNC 0x80 +#define AACIALLINTS 0x84 +#define AACIMAINFR 0x88 +#define AACIDR 0x90 + +#define AACI_FIFO_DEPTH 512 +#define AACI_BLOCK_ALIGN 4 + +#define AACI_READ(sc, reg) \ + bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define AACI_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) +#define AACI_WRITE_MULTI(sc, reg, val, cnt) \ + bus_space_write_multi_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val), (cnt)) + +static const struct audio_format aaci_format = { + .mode = AUMODE_PLAY, + .encoding = AUDIO_ENCODING_SLINEAR_LE, + .validbits = 16, + .precision = 16, + .channels = 2, + .channel_mask = AUFMT_STEREO, + .frequency_type = 0, + .frequency = { 48000, 48000 } +}; + +static void +aaci_write_data(struct aaci_softc *sc) +{ + KASSERT(mutex_owned(&sc->sc_intr_lock)); + + if (sc->sc_pint == NULL) + return; + + while ((AACI_READ(sc, AACISR) & AACISR_TXHE) == 0) { + const int len =
CVS commit: src/sys/opencrypto
Module Name:src Committed By: knakahara Date: Thu Jun 8 09:49:46 UTC 2017 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: sanitize in CIOCNCRYPTM and initialize comp_alg in CIOCNGSESSION To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/opencrypto/cryptodev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/opencrypto/cryptodev.c diff -u src/sys/opencrypto/cryptodev.c:1.93 src/sys/opencrypto/cryptodev.c:1.94 --- src/sys/opencrypto/cryptodev.c:1.93 Thu Jun 8 03:02:26 2017 +++ src/sys/opencrypto/cryptodev.c Thu Jun 8 09:49:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.c,v 1.93 2017/06/08 03:02:26 knakahara Exp $ */ +/* $NetBSD: cryptodev.c,v 1.94 2017/06/08 09:49:46 knakahara Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.93 2017/06/08 03:02:26 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.94 2017/06/08 09:49:46 knakahara Exp $"); #include #include @@ -1181,6 +1181,12 @@ cryptodev_mop(struct fcrypt *fcr, } } + /* sanitize */ + if (cnop[req].len <= 0) { + cnop[req].status = ENOMEM; + goto bail; + } + crp = crypto_getreq((cse->txform != NULL) + (cse->thash != NULL) + (cse->tcomp != NULL)); @@ -1770,12 +1776,14 @@ cryptodev_msession(struct fcrypt *fcr, s struct session_op s_op; s_op.cipher = sn_ops->cipher; s_op.mac = sn_ops->mac; + s_op.comp_alg = sn_ops->comp_alg; s_op.keylen = sn_ops->keylen; s_op.key = sn_ops->key; s_op.mackeylen = sn_ops->mackeylen; s_op.mackey = sn_ops->mackey; sn_ops->status = cryptodev_session(fcr, &s_op); + sn_ops->ses = s_op.ses; }