CVS commit: src
Module Name:src Committed By: mrg Date: Sun Aug 15 07:27:34 UTC 2010 Modified Files: src/distrib/sets: Makefile maketars src/share/mk: bsd.README bsd.own.mk src/tools: Makefile Log Message: add new option to build/use tools/pigz for compressing sets. for now USE_PIGZGZIP defaults to no. (it depends upon local pthread.h and -lz.) you can set it to yes on most modern platforms just fine. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/distrib/sets/Makefile cvs rdiff -u -r1.73 -r1.74 src/distrib/sets/maketars cvs rdiff -u -r1.273 -r1.274 src/share/mk/bsd.README cvs rdiff -u -r1.638 -r1.639 src/share/mk/bsd.own.mk cvs rdiff -u -r1.139 -r1.140 src/tools/Makefile 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/Makefile diff -u src/distrib/sets/Makefile:1.79 src/distrib/sets/Makefile:1.80 --- src/distrib/sets/Makefile:1.79 Tue Jun 29 05:51:53 2010 +++ src/distrib/sets/Makefile Sun Aug 15 07:27:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.79 2010/06/29 05:51:53 mrg Exp $ +# $NetBSD: Makefile,v 1.80 2010/08/15 07:27:33 mrg Exp $ # The `all' target must appear before bsd.own.mk is pulled in. all: @@ -8,6 +8,12 @@ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib +.if ${USE_PIGZGZIP} != no +COMPRESS_PROGRAM=${TOOL_PIGZ:Q} +.else +COMPRESS_PROGRAM=gzip +.endif + SETSENV= DESTDIR=${DESTDIR:Q} \ MACHINE=${MACHINE:Q} \ MACHINE_ARCH=${MACHINE_ARCH:Q} \ @@ -19,7 +25,7 @@ MKTEMP=${TOOL_MKTEMP:Q} \ MTREE=${TOOL_MTREE:Q} \ PAX=${TOOL_PAX:Q} \ - PIGZ=${TOOL_PIGZ:Q} \ + COMPRESS_PROGRAM=${COMPRESS_PROGRAM:Q} \ PKG_CREATE=${TOOL_PKG_CREATE:Q} \ SED=${TOOL_SED:Q} \ TSORT=${TSORT:Q} Index: src/distrib/sets/maketars diff -u src/distrib/sets/maketars:1.73 src/distrib/sets/maketars:1.74 --- src/distrib/sets/maketars:1.73 Thu Dec 10 02:22:57 2009 +++ src/distrib/sets/maketars Sun Aug 15 07:27:33 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.73 2009/12/10 02:22:57 uebayasi Exp $ +# $NetBSD: maketars,v 1.74 2010/08/15 07:27:33 mrg Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] @@ -217,6 +217,7 @@ TMPFILES=${TMPFILES} ${tars}/${out}.tmp ( cd ${dest}; \ ${PAX} -O -w -d -z -N${etcdir} ${metalog:+-M} \ + --use-compress-program ${COMPRESS_PROGRAM} \ ${setlistdir}/set.${setname} ) \ ${tars}/${out}.tmp mv ${tars}/${out}.tmp ${tars}/${out} Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.273 src/share/mk/bsd.README:1.274 --- src/share/mk/bsd.README:1.273 Sun Jun 20 06:54:24 2010 +++ src/share/mk/bsd.README Sun Aug 15 07:27:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.273 2010/06/20 06:54:24 mrg Exp $ +# $NetBSD: bsd.README,v 1.274 2010/08/15 07:27:33 mrg Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make include files for the NetBSD @@ -416,6 +416,11 @@ various system utilities/libraries that support it. If ${MKYP} is no, USE_YP will also be forced to no. +USE_PIGZGZIP If no, use the host gzip program to compress sets. + Otherwise, build tools/pigz and use nbpigz to compress + the sets. + Default: no. + X11FLAVOUR Set to Xorg or XFree86, depending on whether to build XFree86 or modular Xorg. Only matters if MKX11!=no. Default: Xorg on amd64, i386, macppc, shark and sparc64, Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.638 src/share/mk/bsd.own.mk:1.639 --- src/share/mk/bsd.own.mk:1.638 Mon Aug 2 07:08:26 2010 +++ src/share/mk/bsd.own.mk Sun Aug 15 07:27:34 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.638 2010/08/02 07:08:26 jmmv Exp $ +# $NetBSD: bsd.own.mk,v 1.639 2010/08/15 07:27:34 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -869,9 +869,10 @@ # # USE_* options which default to no. # -#.for var in -#${var}?= no -#.endfor +# For now, disable pigz as compressor by default +.for var in USE_PIGZGZIP +${var}?= no +.endfor # # Where X11 sources are and where it is installed to. Index: src/tools/Makefile diff -u src/tools/Makefile:1.139 src/tools/Makefile:1.140 --- src/tools/Makefile:1.139 Fri Jun 18 18:57:27 2010 +++ src/tools/Makefile Sun Aug 15 07:27:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.139 2010/06/18 18:57:27 jmcneill Exp $ +# $NetBSD: Makefile,v 1.140 2010/08/15 07:27:33 mrg Exp $ .include bsd.own.mk @@ -74,6 +74,10 @@ SUBDIR+= autoconf .WAIT gettext .endif +.if ${USE_PIGZGZIP} != no +SUBDIR+= pigz +.endif + .if ${MACHINE} == hp700 SUBDIR+= hp700-mkboot .endif
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mrg Date: Sun Aug 15 08:45:20 UTC 2010 Modified Files: src/sys/arch/x86/x86: coretemp.c Log Message: only attach on SMT ID 0 cpus. on my i7, cpus 0/4, 1/5, 2/6 and 3/7 have identical information and the processor manual says that there are only 4 actual sensors. this still doesn't attach (yet) on that system, due to a core solo/duo errata being wrongly applied, but i haven't figured out the right way to do that. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/x86/coretemp.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/x86/x86/coretemp.c diff -u src/sys/arch/x86/x86/coretemp.c:1.14 src/sys/arch/x86/x86/coretemp.c:1.15 --- src/sys/arch/x86/x86/coretemp.c:1.14 Sun Mar 14 18:04:29 2010 +++ src/sys/arch/x86/x86/coretemp.c Sun Aug 15 08:45:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: coretemp.c,v 1.14 2010/03/14 18:04:29 pgoyette Exp $ */ +/* $NetBSD: coretemp.c,v 1.15 2010/08/15 08:45:20 mrg Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: coretemp.c,v 1.14 2010/03/14 18:04:29 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: coretemp.c,v 1.15 2010/08/15 08:45:20 mrg Exp $); #include sys/param.h #include sys/device.h @@ -70,6 +70,12 @@ int cpumodel, cpuextmodel, cpumask; /* + * Don't attach on anything but the first SMT ID. + */ + if (ci-ci_smt_id != 0) + return; + + /* * CPUID 0x06 returns 1 if the processor has on-die thermal * sensors. EBX[0:3] contains the number of sensors. */
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Aug 15 08:53:19 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c acpi_cpu_tstate.c Log Message: Add comments and raise the minimum allowed T-state duty width to 10 %. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/acpi/acpi_cpu_cstate.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_cpu_tstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.27 src/sys/dev/acpi/acpi_cpu_cstate.c:1.28 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.27 Sat Aug 14 17:27:34 2010 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Sun Aug 15 08:53:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.27 2010/08/14 17:27:34 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.28 2010/08/15 08:53:19 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.27 2010/08/14 17:27:34 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.28 2010/08/15 08:53:19 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -568,7 +568,6 @@ /* * The P_BLK length should always be 6. If it * is not, reduce functionality accordingly. - * Sanity check also FADT's latency levels. */ if (sc-sc_object.ao_pblklen 5) cs[ACPI_STATE_C2].cs_method = 0; @@ -576,6 +575,11 @@ if (sc-sc_object.ao_pblklen 6) cs[ACPI_STATE_C3].cs_method = 0; + /* + * Sanity check the latency levels in FADT. + * Values above the thresholds are used to + * inform that C-states are not supported. + */ CTASSERT(ACPICPU_C_C2_LATENCY_MAX == 100); CTASSERT(ACPICPU_C_C3_LATENCY_MAX == 1000); Index: src/sys/dev/acpi/acpi_cpu_tstate.c diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.8 src/sys/dev/acpi/acpi_cpu_tstate.c:1.9 --- src/sys/dev/acpi/acpi_cpu_tstate.c:1.8 Sun Aug 15 04:35:16 2010 +++ src/sys/dev/acpi/acpi_cpu_tstate.c Sun Aug 15 08:53:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_tstate.c,v 1.8 2010/08/15 04:35:16 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.8 2010/08/15 04:35:16 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -399,7 +399,10 @@ for (i = 0; i 5; i++, p++) *p = val[i]; -if (ts-ts_percent 1 || ts-ts_percent 100) + /* + * The minimum should be around 100 / 8 = 12.5 %. + */ +if (ts-ts_percent 10 || ts-ts_percent 100) return AE_BAD_DECIMAL_CONSTANT; if (ts-ts_latency 1) @@ -519,6 +522,10 @@ if (sc-sc_object.ao_pblkaddr == 0) return AE_AML_ILLEGAL_ADDRESS; + /* + * A zero DUTY_WIDTH is used announce that + * T-states are not available via FADT. + */ if (width == 0 || width + offset 4) return AE_AML_BAD_RESOURCE_VALUE;
CVS commit: src/doc
Module Name:src Committed By: jruoho Date: Sun Aug 15 09:26:57 UTC 2010 Modified Files: src/doc: CHANGES Log Message: Note acpicpu(4) now that all basic components have been merged. To generate a diff of this commit: cvs rdiff -u -r1.1427 -r1.1428 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1427 src/doc/CHANGES:1.1428 --- src/doc/CHANGES:1.1427 Fri Aug 6 10:59:52 2010 +++ src/doc/CHANGES Sun Aug 15 09:26:57 2010 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1427 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1428 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -702,3 +702,5 @@ tests: Convert the sort tests to ATF. [jmmv 20100801] wpa: New wpa_supplicant and hostapd 0.7.2 [christos 20100804] bind: Update to 9.7.2b1. [christos 20100806] + acpicpu(4): add a driver for ACPI-based processor functionality. + [jruoho 20100815]
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Sun Aug 15 16:10:56 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: bufgap.c compress.c keyring.c netpgp.c packet-parse.c signature.c validate.c writer.c Log Message: fix some more amd64 lint To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c cvs rdiff -u -r1.16 -r1.17 \ src/crypto/external/bsd/netpgp/dist/src/lib/compress.c cvs rdiff -u -r1.42 -r1.43 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.68 -r1.69 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.39 -r1.40 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c cvs rdiff -u -r1.30 -r1.31 \ src/crypto/external/bsd/netpgp/dist/src/lib/signature.c cvs rdiff -u -r1.37 -r1.38 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.26 -r1.27 \ src/crypto/external/bsd/netpgp/dist/src/lib/writer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c:1.3 src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c:1.4 --- src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c:1.3 Mon Dec 14 23:29:56 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/bufgap.c Sun Aug 15 16:10:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bufgap.c,v 1.3 2009/12/14 23:29:56 agc Exp $ */ +/* $NetBSD: bufgap.c,v 1.4 2010/08/15 16:10:56 agc Exp $ */ /*- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. @@ -117,7 +117,7 @@ char *cp; if (n 0) { - n = strlen(s); + n = (int)strlen(s); } NEWARRAY(char, cp, n + 1, strnsave, return NULL); (void) memcpy(cp, s, (size_t)n); @@ -413,7 +413,7 @@ int i; if (n 0) { - n = strlen(s); + n = (int)strlen(s); } for (i = 0 ; i n ; i += rlen) { if (bp-bbc + bp-abc == bp-size) { Index: src/crypto/external/bsd/netpgp/dist/src/lib/compress.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/compress.c:1.16 src/crypto/external/bsd/netpgp/dist/src/lib/compress.c:1.17 --- src/crypto/external/bsd/netpgp/dist/src/lib/compress.c:1.16 Sun Aug 15 07:52:26 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/compress.c Sun Aug 15 16:10:56 2010 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: compress.c,v 1.16 2010/08/15 07:52:26 agc Exp $); +__RCSID($NetBSD: compress.c,v 1.17 2010/08/15 16:10:56 agc Exp $); #endif #ifdef HAVE_ZLIB_H @@ -346,10 +346,12 @@ switch (type) { case OPS_C_ZIP: + /* LINTED */ /* this is a lint problem in zlib.h header */ ret = (int)inflateInit2(z.zstream, -15); break; case OPS_C_ZLIB: + /* LINTED */ /* this is a lint problem in zlib.h header */ ret = (int)inflateInit(z.zstream); break; @@ -434,6 +436,7 @@ /* all other fields set to zero by use of calloc */ + /* LINTED */ /* this is a lint problem in zlib.h header */ if ((int)deflateInit(zip-stream, level) != Z_OK) { (void) fprintf(stderr, __ops_writez: can't initialise\n); return 0; Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.42 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.43 --- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.42 Sun Aug 15 07:52:26 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Sun Aug 15 16:10:56 2010 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: keyring.c,v 1.42 2010/08/15 07:52:26 agc Exp $); +__RCSID($NetBSD: keyring.c,v 1.43 2010/08/15 16:10:56 agc Exp $); #endif #ifdef HAVE_FCNTL_H @@ -858,22 +858,22 @@ size_t j; int i; - for (i = j = 0 ; j len userid[i] userid[i + 1] ; i += 2, j++) { + for (i = 0, j = 0 ; j len userid[i] userid[i + 1] ; i += 2, j++) { if ((hi = strchr(uppers, userid[i])) == NULL) { if ((hi = strchr(lowers, userid[i])) == NULL) { break; } - hichar = (hi - lowers); + hichar = (uint8_t)(hi - lowers); } else { - hichar = (hi - uppers); + hichar = (uint8_t)(hi - uppers); } if ((lo = strchr(uppers, userid[i + 1])) == NULL) { if ((lo = strchr(lowers, userid[i + 1])) == NULL) { break; } - lochar = (lo - lowers); + lochar = (uint8_t)(lo - lowers); } else { - lochar = (lo - uppers); + lochar = (uint8_t)(lo - uppers); } keyid[j] = (hichar 4) | (lochar); } Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.68 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.69 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.68 Sun Aug 15 07:52:27 2010 +++
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Sun Aug 15 16:21:46 UTC 2010 Modified Files: src/sys/dev/pci/hdaudio: hdaudio_afg.c Log Message: properly round block and buffer sizes -- nvidia HDA controllers work now To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/hdaudio/hdaudio_afg.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/hdaudio/hdaudio_afg.c diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.22 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.23 --- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.22 Tue Aug 10 13:47:38 2010 +++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Sun Aug 15 16:21:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_afg.c,v 1.22 2010/08/10 13:47:38 joerg Exp $ */ +/* $NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.22 2010/08/10 13:47:38 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -3350,7 +3350,7 @@ } /* Multiple of 128 */ - blksize = ~128; + blksize = ~127; if (blksize = 0) blksize = 128; @@ -3358,7 +3358,7 @@ if (bufsize HDAUDIO_BDL_MAX * blksize) { blksize = bufsize / HDAUDIO_BDL_MAX; if (blksize 128) - blksize = (blksize + 128) ~128; + blksize = (blksize + 128) ~127; } return blksize; @@ -3572,7 +3572,7 @@ hdaudio_afg_round_buffersize(void *opaque, int direction, size_t bufsize) { /* Multiple of 128 */ - bufsize = ~128; + bufsize = ~127; if (bufsize = 0) bufsize = 128; return bufsize;
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Sun Aug 15 16:36:24 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: misc.c packet-parse.c packet-show.c reader.c signature.c validate.c writer.c Log Message: get rid of more 64-bit lint To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c cvs rdiff -u -r1.40 -r1.41 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c cvs rdiff -u -r1.16 -r1.17 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c cvs rdiff -u -r1.41 -r1.42 \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c cvs rdiff -u -r1.31 -r1.32 \ src/crypto/external/bsd/netpgp/dist/src/lib/signature.c cvs rdiff -u -r1.38 -r1.39 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/writer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/misc.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.35 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.36 --- src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.35 Sun Aug 15 07:52:27 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/misc.c Sun Aug 15 16:36:24 2010 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: misc.c,v 1.35 2010/08/15 07:52:27 agc Exp $); +__RCSID($NetBSD: misc.c,v 1.36 2010/08/15 16:36:24 agc Exp $); #endif #include sys/types.h @@ -1026,7 +1026,7 @@ } /* read into contents of mem */ for (mem-length = 0 ; - (cc = read(fileno(fp), mem-buf[mem-length], + (cc = (int)read(fileno(fp), mem-buf[mem-length], (size_t)(mem-allocated - mem-length))) 0 ; mem-length += (size_t)cc) { } Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.40 src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.41 --- src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.40 Sun Aug 15 16:10:56 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c Sun Aug 15 16:36:24 2010 @@ -58,7 +58,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: packet-parse.c,v 1.40 2010/08/15 16:10:56 agc Exp $); +__RCSID($NetBSD: packet-parse.c,v 1.41 2010/08/15 16:36:24 agc Exp $); #endif #ifdef HAVE_OPENSSL_CAST_H @@ -2436,7 +2436,7 @@ (const uint8_t *) , 1); } } - passlen = strlen(passphrase); + passlen = (unsigned)strlen(passphrase); for (n = 0; n * hashsize keysize; ++n) { unsignedi; @@ -2799,7 +2799,7 @@ decrypt = __ops_get_decrypt(stream); if (decrypt) { __ops_region_t encregion; - unsigned b = decrypt-blocksize; + unsigned b = (unsigned)decrypt-blocksize; uint8_t buf[OPS_MAX_BLOCK_SIZE + 2] = ; __ops_reader_push_decrypt(stream, decrypt, region); Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.16 src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.17 --- src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.16 Tue May 25 01:05:11 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c Sun Aug 15 16:36:24 2010 @@ -60,7 +60,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: packet-show.c,v 1.16 2010/05/25 01:05:11 agc Exp $); +__RCSID($NetBSD: packet-show.c,v 1.17 2010/08/15 16:36:24 agc Exp $); #endif #include stdlib.h @@ -465,7 +465,7 @@ * be replaced in the output by 2 chars of hex, so the length * will be correct */ - unsigned len = strlen(fmt_unknown) + 1; + unsigned len = (unsigned)(strlen(fmt_unknown) + 1); char *newstr; if ((newstr = calloc(1, len)) == NULL) { Index: src/crypto/external/bsd/netpgp/dist/src/lib/reader.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.41 src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.42 --- src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.41 Sun Aug 15 07:52:27 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c Sun Aug 15 16:36:24 2010 @@ -54,7 +54,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: reader.c,v 1.41 2010/08/15 07:52:27 agc Exp $); +__RCSID($NetBSD: reader.c,v 1.42 2010/08/15 16:36:24 agc Exp $); #endif #include sys/types.h @@ -1806,7 +1806,7 @@ __OPS_USED(errors); if (reader-offset + length reader-length) - n = reader-length - reader-offset; + n = (unsigned)(reader-length - reader-offset); else n
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 18:40:42 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Don't do timestamping with buslock held. it's the little things ... To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.20 src/sys/rump/net/lib/libshmif/if_shmem.c:1.21 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.20 Fri Aug 13 10:13:44 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 18:40:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.20 2010/08/13 10:13:44 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.21 2010/08/15 18:40:41 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.20 2010/08/13 10:13:44 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.21 2010/08/15 18:40:41 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -203,16 +203,16 @@ pktsize += m-m_len; } - shmif_lockbus(sc-sc_busmem); - lastoff = sc-sc_busmem-shm_last; - npktlenoff = shmif_nextpktoff(sc-sc_busmem, lastoff); - getmicrouptime(tv); sp.sp_len = pktsize; sp.sp_sec = tv.tv_sec; sp.sp_usec = tv.tv_usec; + shmif_lockbus(sc-sc_busmem); + lastoff = sc-sc_busmem-shm_last; + npktlenoff = shmif_nextpktoff(sc-sc_busmem, lastoff); + dataoff = shmif_buswrite(sc-sc_busmem, npktlenoff, sp, sizeof(sp), wrap); for (m = m0; m != NULL; m = m-m_next) {
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 18:47:39 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: shmif_busops.c Log Message: introduce a sleep to trying to grab the bus To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libshmif/shmif_busops.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/rump/net/lib/libshmif/shmif_busops.c diff -u src/sys/rump/net/lib/libshmif/shmif_busops.c:1.2 src/sys/rump/net/lib/libshmif/shmif_busops.c:1.3 --- src/sys/rump/net/lib/libshmif/shmif_busops.c:1.2 Fri Aug 13 10:13:44 2010 +++ src/sys/rump/net/lib/libshmif/shmif_busops.c Sun Aug 15 18:47:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: shmif_busops.c,v 1.2 2010/08/13 10:13:44 pooka Exp $ */ +/* $NetBSD: shmif_busops.c,v 1.3 2010/08/15 18:47:38 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: shmif_busops.c,v 1.2 2010/08/13 10:13:44 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: shmif_busops.c,v 1.3 2010/08/15 18:47:38 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -44,6 +44,7 @@ #define LOCK_UNLOCKED 0 #define LOCK_LOCKED 1 +#define LOCK_COOLDOWN 1001 /* * This locking needs work and will misbehave severely if: @@ -53,10 +54,21 @@ void shmif_lockbus(struct shmif_mem *busmem) { + int i = 0; - while (atomic_cas_32(busmem-shm_lock, - LOCK_UNLOCKED, LOCK_LOCKED) == LOCK_LOCKED) + while (__predict_false(atomic_cas_32(busmem-shm_lock, + LOCK_UNLOCKED, LOCK_LOCKED) == LOCK_LOCKED)) { + if (__predict_false(++i LOCK_COOLDOWN)) { + uint64_t sec, nsec; + int error; + + sec = 0; + nsec = 1000*1000; /* 1ms */ + rumpuser_nanosleep(sec, nsec, error); + i = 0; + } continue; + } membar_enter(); }
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 18:48:39 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Take kernel lock before passing data to if_input. This is in line with IPL_NET interrupts generally not being MPSAFE. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.21 src/sys/rump/net/lib/libshmif/if_shmem.c:1.22 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.21 Sun Aug 15 18:40:41 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 18:48:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.21 2010/08/15 18:40:41 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.22 2010/08/15 18:48:38 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.21 2010/08/15 18:40:41 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.22 2010/08/15 18:48:38 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -310,7 +310,9 @@ /* if it's from us, don't pass up and reuse storage space */ eth = mtod(m, struct ether_header *); if (memcmp(eth-ether_shost, sc-sc_myaddr, 6) != 0) { + KERNEL_LOCK(1, NULL); ifp-if_input(ifp, m); + KERNEL_UNLOCK_ONE(NULL); m = NULL; } }
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 18:55:03 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c shmif_busops.c shmifvar.h Log Message: Move the lockops together with the interface -- they are needed only at runtime. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/rump/net/lib/libshmif/if_shmem.c cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libshmif/shmif_busops.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/net/lib/libshmif/shmifvar.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.22 src/sys/rump/net/lib/libshmif/if_shmem.c:1.23 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.22 Sun Aug 15 18:48:38 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 18:55:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.22 2010/08/15 18:48:38 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.23 2010/08/15 18:55:03 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.22 2010/08/15 18:48:38 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.23 2010/08/15 18:55:03 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -79,6 +79,46 @@ static uint32_t numif; +#define LOCK_UNLOCKED 0 +#define LOCK_LOCKED 1 +#define LOCK_COOLDOWN 1001 + +/* + * This locking needs work and will misbehave severely if: + * 1) the backing memory has to be paged in + * 2) some lockholder exits while holding the lock + */ +static void +shmif_lockbus(struct shmif_mem *busmem) +{ + int i = 0; + + while (__predict_false(atomic_cas_32(busmem-shm_lock, + LOCK_UNLOCKED, LOCK_LOCKED) == LOCK_LOCKED)) { + if (__predict_false(++i LOCK_COOLDOWN)) { + uint64_t sec, nsec; + int error; + + sec = 0; + nsec = 1000*1000; /* 1ms */ + rumpuser_nanosleep(sec, nsec, error); + i = 0; + } + continue; + } + membar_enter(); +} + +static void +shmif_unlockbus(struct shmif_mem *busmem) +{ + unsigned int old; + + membar_exit(); + old = atomic_swap_32(busmem-shm_lock, LOCK_UNLOCKED); + KASSERT(old == LOCK_LOCKED); +} + int rump_shmif_create(const char *path, int *ifnum) { Index: src/sys/rump/net/lib/libshmif/shmif_busops.c diff -u src/sys/rump/net/lib/libshmif/shmif_busops.c:1.3 src/sys/rump/net/lib/libshmif/shmif_busops.c:1.4 --- src/sys/rump/net/lib/libshmif/shmif_busops.c:1.3 Sun Aug 15 18:47:38 2010 +++ src/sys/rump/net/lib/libshmif/shmif_busops.c Sun Aug 15 18:55:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: shmif_busops.c,v 1.3 2010/08/15 18:47:38 pooka Exp $ */ +/* $NetBSD: shmif_busops.c,v 1.4 2010/08/15 18:55:03 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: shmif_busops.c,v 1.3 2010/08/15 18:47:38 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: shmif_busops.c,v 1.4 2010/08/15 18:55:03 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -42,46 +42,6 @@ #include rump/rumpuser.h #endif -#define LOCK_UNLOCKED 0 -#define LOCK_LOCKED 1 -#define LOCK_COOLDOWN 1001 - -/* - * This locking needs work and will misbehave severely if: - * 1) the backing memory has to be paged in - * 2) some lockholder exits while holding the lock - */ -void -shmif_lockbus(struct shmif_mem *busmem) -{ - int i = 0; - - while (__predict_false(atomic_cas_32(busmem-shm_lock, - LOCK_UNLOCKED, LOCK_LOCKED) == LOCK_LOCKED)) { - if (__predict_false(++i LOCK_COOLDOWN)) { - uint64_t sec, nsec; - int error; - - sec = 0; - nsec = 1000*1000; /* 1ms */ - rumpuser_nanosleep(sec, nsec, error); - i = 0; - } - continue; - } - membar_enter(); -} - -void -shmif_unlockbus(struct shmif_mem *busmem) -{ - unsigned int old; - - membar_exit(); - old = atomic_swap_32(busmem-shm_lock, LOCK_UNLOCKED); - KASSERT(old == LOCK_LOCKED); -} - uint32_t shmif_advance(uint32_t oldoff, uint32_t delta) { Index: src/sys/rump/net/lib/libshmif/shmifvar.h diff -u src/sys/rump/net/lib/libshmif/shmifvar.h:1.4 src/sys/rump/net/lib/libshmif/shmifvar.h:1.5 --- src/sys/rump/net/lib/libshmif/shmifvar.h:1.4 Fri Aug 13 10:13:44 2010 +++ src/sys/rump/net/lib/libshmif/shmifvar.h Sun Aug 15 18:55:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: shmifvar.h,v 1.4 2010/08/13 10:13:44 pooka Exp $ */ +/* $NetBSD: shmifvar.h,v 1.5 2010/08/15 18:55:03 pooka Exp $ */ /*- * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -71,8 +71,6 @@ #define DPRINTF(x) #endif -void shmif_lockbus(struct shmif_mem *); -void shmif_unlockbus(struct shmif_mem *); uint32_t shmif_advance(uint32_t, uint32_t); uint32_t shmif_busread(struct shmif_mem *, void *, uint32_t, size_t, bool *);
CVS commit: src/share/misc
Module Name:src Committed By: jruoho Date: Sun Aug 15 19:30:33 UTC 2010 Modified Files: src/share/misc: acronyms.comp Log Message: BGA, DSDT, DVFS, FSB, GPE, GSI, HFM, HPET, LAPIC, LFM, MADT, MMIO, MPS, OBO, OBOE, ODCM, PMI, SAPIC, TCC, TDP. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.104 src/share/misc/acronyms.comp:1.105 --- src/share/misc/acronyms.comp:1.104 Fri Aug 6 10:46:48 2010 +++ src/share/misc/acronyms.comp Sun Aug 15 19:30:33 2010 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.104 2010/08/06 10:46:48 jruoho Exp $ +$NetBSD: acronyms.comp,v 1.105 2010/08/15 19:30:33 jruoho Exp $ 3WHS three-way handshake ABI application binary interface @@ -44,6 +44,7 @@ BER bit error rate BFD binary formats descriptor BFKL big fscking kernel lock +BGA ball grid array BGP border gateway protocol BIND Berkeley Internet Name Daemon BIOS basic input/output system @@ -133,6 +134,7 @@ DRAM dynamic random access memory DRI direct rendering infrastructure DS debug store +DSDT differentiated system descriptor table DSL digital subscriber line DSLAM digital subscriber line access multiplexer DSSS direct sequence spread spectrum @@ -141,6 +143,7 @@ DTE dumb terminal emulator DVB digital video broadcasting DVD digital versatile disc +DVFS dynamic voltage and frequency scaling DVR digital video recorder DVI digital visual interface E-XER extended XML encoding rules @@ -185,6 +188,7 @@ FPU floating point unit FQDN fully qualified domain name FRU field replaceable unit +FSB front side bus FTP file transfer protocol FTPS file transfer protocol, secure FWH firmware hub @@ -196,9 +200,11 @@ GIF graphics interchange format GMCH graphics and memory controller hub GNU GNU's not Unix +GPE general purpose event GPL GNU/general public license GPU graphics processing unit GRE generic routing encapsulation +GSI global system interrupt GUI graphics user interface GUID globally unique identifier HA high availability @@ -208,8 +214,10 @@ HCI human-computer interaction HDD hard disk drive HDCP high-bandwidth digital content protection +HFM highest frequency mode HID human interface device HPC high performance computing +HPET high precision event timer HT hyper-threading HTML hyper-text markup language HTTP hyper-text transfer protocol @@ -276,12 +284,14 @@ KVM keyboard, video, mouse switch LAMP Linux Apache MySQL {Perl,PHP,Python} LAN local area network +LAPIC local advanced programmable interrupt controller LBA logical block addressing LCD liquid crystal display LCP link control protocol LDAP lightweight directory access protocol LDT local descriptor table LED light emitting diode +LFM lowest frequency mode LFS log-structured file system LFU least frequently used LIFO last in first out @@ -306,6 +316,7 @@ LZW Lempel Ziv Welch MAC medium access control MAC mandatory access control +MADT multiple APIC descriptor table MBR master boot record MCA machine check architecture MCE machine check exception @@ -322,12 +333,15 @@ MIMO multiple input multiple output MIPS million instructions per second MIT Massachusetts Institute of Technology +MMIO memory mapped input/output MMU memory management unit MMX multimedia extension MMX multiple math extension MMX matrix math extension MPEG moving picture experts group MPLS multiprotocol label switching +MPS multiprocessor specification +MPS memory pool system MRU most recently used MSB most significant bit [or: byte] MSF minutes seconds frames @@ -356,8 +370,11 @@ NUMA non-uniform memory access NVRAM non-volatile random access memory NX no execute +OBO off by one +OBOE off by one error OCL object constraint language OCR optical character recognition +ODCM on-demand clock modulation OEM original equipment manufacturer OFDM orthogonal frequency division multiplexing OO object oriented @@ -410,6 +427,7 @@ PIO programmed input/output PKI public key infrastructure PLL phase locked loop +PMI platform management interrupt PMT photo-multiplier tube PNG portable network graphics POE power over ethernet @@ -468,6 +486,7 @@ SAD security association database SAM serial access memory SAN storage area network +SAPIC streamlined advanced programmable interrupt controller SASI shugart associates system interface (predecessor to SCSI) SATA serial advanced technology attachment SB sound blaster @@ -522,10 +541,12 @@ SVM support vector machine SWF Shockwave Flash TCB trusted computing base +TCC thermal control circuit TCL tool command language TCP transmission control protocol TCQ tagged command queueing TDD test driven development +TDP thermal design power TFT thin film transistor TFTP trivial file transfer protocol TIAS try it and see
CVS commit: src/share/man/man4
Module Name:src Committed By: jruoho Date: Sun Aug 15 19:34:50 UTC 2010 Modified Files: src/share/man/man4: acpicpu.4 Log Message: After a second thought, remove the references, clarify wording, fix acronym. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/acpicpu.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/acpicpu.4 diff -u src/share/man/man4/acpicpu.4:1.11 src/share/man/man4/acpicpu.4:1.12 --- src/share/man/man4/acpicpu.4:1.11 Sun Aug 15 05:38:35 2010 +++ src/share/man/man4/acpicpu.4 Sun Aug 15 19:34:50 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: acpicpu.4,v 1.11 2010/08/15 05:38:35 jruoho Exp $ +.\ $NetBSD: acpicpu.4,v 1.12 2010/08/15 19:34:50 jruoho Exp $ .\ .\ Coyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi .\ All rights reserved. @@ -171,7 +171,7 @@ .Tn CPU frequency management, .Tn ACPI -provides support for Dynamic Frequency and Voltage Scaling +provides support for Dynamic Voltage and Frequency Scaling .Pq Tn DVFS . This means that the firmware may request the implementation to dynamically scale the presently supported maximum clock frequency. @@ -190,10 +190,9 @@ time a processor is allowed to execute. Outside the .Tn ACPI -nomenclature, throttling may refer to +nomenclature, throttling may be known as .Dq on-demand clock modulation -.Pq Tn ODCM , -among others. +.Pq Tn ODCM . .Pp The concept of .Dq duty cycle @@ -277,28 +276,6 @@ .Xr acpi 4 , .Xr acpitz 4 , .Xr cpu_idle 9 -.Rs -.%A Advanced Micro Devices -.%B BIOS and Kernel Developer's Guide for -.%B AMD Athlon 64 and AMD Opteron Processors -.%N Revision 3.30 -.%D February, 2006 -.%U http://support.amd.com/us/Processor_TechDocs/26094.PDF -.Re -.Rs -.%A Intel Corporation -.%T Intel Processor Vendor-Specific ACPI, Interface Specification -.%N Revision 005 -.%D September, 2006 -.%U http://download.intel.com/technology/IAPC/acpi/downloads/30222305.pdf -.Re -.Rs -.%A Intel Corporation -.%B Intel 64 and IA-32 Architectures, Software Developer's Manual -.%V Volume 3A: System Programming Guide, Part 1 -.%D June, 2010 -.%U http://www.intel.com/Assets/PDF/manual/253668.pdf -.Re .Sh HISTORY The .Nm
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Sun Aug 15 19:39:56 UTC 2010 Modified Files: src/sys/dev/pci/hdaudio: hdaudio_afg.c hdaudiovar.h Log Message: be less spammy when dumping assocs. extra details can be had with boot -x To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/hdaudio/hdaudio_afg.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/hdaudio/hdaudiovar.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/pci/hdaudio/hdaudio_afg.c diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.23 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.24 --- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.23 Sun Aug 15 16:21:46 2010 +++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Sun Aug 15 19:39:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $ */ +/* $NetBSD: hdaudio_afg.c,v 1.24 2010/08/15 19:39:56 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.24 2010/08/15 19:39:56 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -94,6 +94,8 @@ #define hda_debug(sc, ...) \ if (hdaudio_afg_debug) hda_print(sc, __VA_ARGS__) +#define hda_debug1(sc, ...) \ + if (hdaudio_afg_debug) hda_print1(sc, __VA_ARGS__) #define HDAUDIO_MIXER_CLASS_OUTPUTS 0 #define HDAUDIO_MIXER_CLASS_INPUTS 1 @@ -700,49 +702,123 @@ } } +static int +hdaudio_afg_assoc_count_channels(struct hdaudio_afg_softc *sc, +struct hdaudio_assoc *as, enum hdaudio_pindir dir) +{ + struct hdaudio_widget *w; + int *dacmap; + int i, dacmapsz = sizeof(*dacmap) * sc-sc_endnode; + int nchans = 0; + + if (as-as_enable == false || as-as_dir != dir) + return 0; + + dacmap = kmem_zalloc(dacmapsz, KM_SLEEP); + if (dacmap == NULL) + return 0; + + for (i = 0; i HDAUDIO_MAXPINS; i++) + if (as-as_dacs[i]) + dacmap[as-as_dacs[i]] = 1; + + for (i = 1; i sc-sc_endnode; i++) { + if (!dacmap[i]) + continue; + w = hdaudio_afg_widget_lookup(sc, i); + if (w == NULL || w-w_enable == false) + continue; + nchans += (w-w_p.aw_cap COP_AWCAP_STEREO) ? 2 : 1; + } + + kmem_free(dacmap, dacmapsz); + + return nchans; +} + static void hdaudio_afg_assoc_dump(struct hdaudio_afg_softc *sc) { struct hdaudio_assoc *as = sc-sc_assocs; struct hdaudio_widget *w; - uint32_t conn, color, defdev; + uint32_t conn, color, defdev, curdev, curport; int maxassocs = sc-sc_nassocs; int i, j; for (i = 0; i maxassocs; i++) { - int ndacs = 0; + uint32_t devmask = 0, portmask = 0; + bool firstdev = true; + int nchan; if (as[i].as_enable == false) continue; + hda_print(sc, %s%02X, + as[i].as_dir == HDAUDIO_PINDIR_IN ? ADC : DAC, i); + hda_trace1(sc, %s, + as[i].as_digital ? [DIGITAL] : [ANALOG]); + + nchan = hdaudio_afg_assoc_count_channels(sc, as[i], + as[i].as_dir); + hda_print1(sc, %dch:, nchan); + for (j = 0; j HDAUDIO_MAXPINS; j++) { if (as[i].as_dacs[j] == 0) continue; - ++ndacs; - hda_print(sc, %s%d:%02X, %s , - as[i].as_dir == HDAUDIO_PINDIR_IN ? ADC : DAC, - i, as[i].as_dacs[j], - as[i].as_digital ? Digital : Analog); - w = hdaudio_afg_widget_lookup(sc, as[i].as_pins[j]); - if (w == NULL) { -hda_print1(sc, none\n); + if (w == NULL) continue; - } conn = COP_CFG_PORT_CONNECTIVITY(w-w_pin.config); - color = COP_CFG_COLOR(w-w_pin.config); defdev = COP_CFG_DEFAULT_DEVICE(w-w_pin.config); - if (conn != 1) { -hda_print1(sc, %s: %s (%s, %02X)\n, -hdaudio_afg_default_device[defdev], -hdaudio_afg_port_connectivity[conn], -hdaudio_afg_color[color], w-w_nid); - } else { -hda_print1(sc, unknown\n); + if (conn != COP_PORT_NONE) { +devmask |= (1 defdev); +portmask |= (1 conn); + } + } + for (curdev = 0; curdev 16; curdev++) { + bool firstport = true; + if ((devmask (1 curdev)) == 0) +continue; + + if (firstdev == false) +hda_print1(sc, ,); + firstdev = false; + hda_print1(sc, %s, + hdaudio_afg_default_device[curdev]); + + for (curport = 0; curport 4; curport++) { +if ((portmask (1 curport)) == 0) + continue; + +hda_print1(sc, [%s, +hdaudio_afg_port_connectivity[curport]); +for (j = 0; j HDAUDIO_MAXPINS; j++) { + if (as[i].as_dacs[j] == 0) + continue; + + w = hdaudio_afg_widget_lookup(sc, + as[i].as_pins[j]); + if (w == NULL) + continue; + conn = COP_CFG_PORT_CONNECTIVITY(w-w_pin.config); + color = COP_CFG_COLOR(w-w_pin.config); + defdev = COP_CFG_DEFAULT_DEVICE(w-w_pin.config); + if (conn != curport || defdev != curdev) + continue; + + if (firstport == false) + hda_trace1(sc, ,); + else +
CVS commit: src/share/misc
Module Name:src Committed By: cegger Date: Sun Aug 15 19:43:03 UTC 2010 Modified Files: src/share/misc: acronyms.comp Log Message: + OSVW, PAT To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.105 src/share/misc/acronyms.comp:1.106 --- src/share/misc/acronyms.comp:1.105 Sun Aug 15 19:30:33 2010 +++ src/share/misc/acronyms.comp Sun Aug 15 19:43:03 2010 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.105 2010/08/15 19:30:33 jruoho Exp $ +$NetBSD: acronyms.comp,v 1.106 2010/08/15 19:43:03 cegger Exp $ 3WHS three-way handshake ABI application binary interface @@ -391,6 +391,7 @@ OSPF open shortest path first OSS open source software OSS open sound system +OSVW operating system visible workarounds OTP one time password OUI organizationally unique identifier OWL Web ontology language @@ -400,6 +401,7 @@ PAE physical address extension PAM pluggable authentication modules PAM pulse amplitude modulation +PAT page attribute table PAT port address translation PATA parallel ATA PAX portable archive exchange
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Sun Aug 15 20:23:04 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: scheduler.c Log Message: Increment lwp's context switch counter when it is scheduled onto a CPU. This fixes some heavy-load problems with the pool code when rump kernels essentially lied and caused the pool code not to do a proper backdown from the fastpath when a context switch happened when taking a lock. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/rump/librump/rumpkern/scheduler.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/rump/librump/rumpkern/scheduler.c diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.17 src/sys/rump/librump/rumpkern/scheduler.c:1.18 --- src/sys/rump/librump/rumpkern/scheduler.c:1.17 Sun Jul 11 16:20:39 2010 +++ src/sys/rump/librump/rumpkern/scheduler.c Sun Aug 15 20:23:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: scheduler.c,v 1.17 2010/07/11 16:20:39 pooka Exp $ */ +/* $NetBSD: scheduler.c,v 1.18 2010/08/15 20:23:04 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.17 2010/07/11 16:20:39 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.18 2010/08/15 20:23:04 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -317,6 +317,7 @@ fastlane: l-l_cpu = l-l_target_cpu = rcpu-rcpu_ci; l-l_mutex = rcpu-rcpu_ci-ci_schedstate.spc_mutex; + l-l_ncsw++; } void
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Sun Aug 15 21:28:33 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: intr.c Log Message: Implement softints properly: they need to have a schedulable entity per cpu. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/rump/librump/rumpkern/intr.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/rump/librump/rumpkern/intr.c diff -u src/sys/rump/librump/rumpkern/intr.c:1.31 src/sys/rump/librump/rumpkern/intr.c:1.32 --- src/sys/rump/librump/rumpkern/intr.c:1.31 Tue Aug 10 21:32:38 2010 +++ src/sys/rump/librump/rumpkern/intr.c Sun Aug 15 21:28:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.31 2010/08/10 21:32:38 pooka Exp $ */ +/* $NetBSD: intr.c,v 1.32 2010/08/15 21:28:33 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.31 2010/08/10 21:32:38 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.32 2010/08/15 21:28:33 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -47,21 +47,28 @@ */ #define SI_MPSAFE 0x01 -#define SI_ONLIST 0x02 -#define SI_KILLME 0x04 +#define SI_KILLME 0x02 +struct softint_percpu; struct softint { void (*si_func)(void *); void *si_arg; int si_flags; int si_level; - LIST_ENTRY(softint) si_entries; + struct softint_percpu *si_entry; /* [0,ncpu-1] */ +}; + +struct softint_percpu { + struct softint *sip_parent; + bool sip_onlist; + + LIST_ENTRY(softint_percpu) sip_entries; }; struct softint_lev { struct rumpuser_cv *si_cv; - LIST_HEAD(, softint) si_pending; + LIST_HEAD(, softint_percpu) si_pending; }; kcondvar_t lbolt; /* Oh Kath Ra */ @@ -148,6 +155,7 @@ static void sithread(void *arg) { + struct softint_percpu *sip; struct softint *si; void (*func)(void *) = NULL; void *funarg; @@ -161,13 +169,15 @@ for (;;) { if (!LIST_EMPTY(si_lvl-si_pending)) { - si = LIST_FIRST(si_lvl-si_pending); + sip = LIST_FIRST(si_lvl-si_pending); + si = sip-sip_parent; + func = si-si_func; funarg = si-si_arg; mpsafe = si-si_flags SI_MPSAFE; - si-si_flags = ~SI_ONLIST; - LIST_REMOVE(si, si_entries); + sip-sip_onlist = false; + LIST_REMOVE(sip, sip_entries); if (si-si_flags SI_KILLME) { softint_disestablish(si); continue; @@ -247,6 +257,8 @@ softint_establish(u_int flags, void (*func)(void *), void *arg) { struct softint *si; + struct softint_percpu *sip; + int i; si = malloc(sizeof(*si), M_TEMP, M_WAITOK); si-si_func = func; @@ -254,6 +266,12 @@ si-si_flags = flags SOFTINT_MPSAFE ? SI_MPSAFE : 0; si-si_level = flags SOFTINT_LVLMASK; KASSERT(si-si_level SOFTINT_COUNT); + si-si_entry = malloc(sizeof(*si-si_entry) * ncpu, + M_TEMP, M_WAITOK | M_ZERO); + for (i = 0; i ncpu; i++) { + sip = si-si_entry[i]; + sip-sip_parent = si; + } return si; } @@ -262,30 +280,40 @@ softint_schedule(void *arg) { struct softint *si = arg; + struct softint_percpu *sip = si-si_entry[curcpu()-ci_index]; struct cpu_data *cd = curcpu()-ci_data; struct softint_lev *si_lvl = cd-cpu_softcpu; if (!rump_threads) { si-si_func(si-si_arg); } else { - if (!(si-si_flags SI_ONLIST)) { + if (!sip-sip_onlist) { LIST_INSERT_HEAD(si_lvl[si-si_level].si_pending, - si, si_entries); - si-si_flags |= SI_ONLIST; + sip, sip_entries); + sip-sip_onlist = true; } } } -/* flimsy disestablish: should wait for softints to finish */ +/* + * flimsy disestablish: should wait for softints to finish. + */ void softint_disestablish(void *cook) { struct softint *si = cook; + int i; - if (si-si_flags SI_ONLIST) { - si-si_flags |= SI_KILLME; - return; + for (i = 0; i ncpu; i++) { + struct softint_percpu *sip; + + sip = si-si_entry[i]; + if (sip-sip_onlist) { + si-si_flags |= SI_KILLME; + return; + } } + free(si-si_entry, M_TEMP); free(si, M_TEMP); }
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 21:41:39 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: reset wrap where necessary To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.23 src/sys/rump/net/lib/libshmif/if_shmem.c:1.24 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.23 Sun Aug 15 18:55:03 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 21:41:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.23 2010/08/15 18:55:03 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.23 2010/08/15 18:55:03 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -227,7 +227,7 @@ uint32_t lastoff, dataoff, npktlenoff; uint32_t pktsize = 0; bool wrote = false; - bool wrap = false; + bool wrap; int error; for (;;) { @@ -253,6 +253,7 @@ lastoff = sc-sc_busmem-shm_last; npktlenoff = shmif_nextpktoff(sc-sc_busmem, lastoff); + wrap = false; dataoff = shmif_buswrite(sc-sc_busmem, npktlenoff, sp, sizeof(sp), wrap); for (m = m0; m != NULL; m = m-m_next) { @@ -292,7 +293,7 @@ struct mbuf *m = NULL; struct ether_header *eth; uint32_t nextpkt, lastpkt, busgen, lastnext; - bool wrap = false; + bool wrap; int error; for (;;) { @@ -330,8 +331,10 @@ continue; } + wrap = false; shmif_busread(sc-sc_busmem, sp, nextpkt, sizeof(sp), wrap); + KASSERT(sp.sp_len = MCLBYTES); shmif_busread(sc-sc_busmem, mtod(m, void *), shmif_advance(nextpkt, sizeof(sp)), sp.sp_len, wrap); if (wrap)
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: cegger Date: Sun Aug 15 21:52:30 UTC 2010 Modified Files: src/usr.sbin/fwctl: fwctl.8 Log Message: Feed improvements from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/fwctl/fwctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/fwctl/fwctl.8 diff -u src/usr.sbin/fwctl/fwctl.8:1.10 src/usr.sbin/fwctl/fwctl.8:1.11 --- src/usr.sbin/fwctl/fwctl.8:1.10 Sat Aug 14 16:32:26 2010 +++ src/usr.sbin/fwctl/fwctl.8 Sun Aug 15 21:52:30 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: fwctl.8,v 1.10 2010/08/14 16:32:26 pgoyette Exp $ +.\ $NetBSD: fwctl.8,v 1.11 2010/08/15 21:52:30 cegger Exp $ .\ .\ Copyright (c) 2005 KIYOHARA Takashi .\ All rights reserved. @@ -72,9 +72,11 @@ .It Fl d Ar node Hex dump of the configuration ROM. .It Fl g Ar gap_count -Broadcast +Broadcast new .Ar gap_count by phy_config packet. +By default this value is 63 on all nodes. +Valid values are 0 - 63. .It Fl l Ar file Load hex dump file of the configuration ROM and parse it. .It Fl M Ar mode @@ -87,9 +89,9 @@ .Fl R option. If not specified, the program will try to guess. -If you get an error complaining about -.Dq format 0x20 , -try to force the +In case of +.Dq format 0x20 +error, try to force the .Ar mpeg mode. .It Fl m Ar EUI64 | hostname @@ -100,8 +102,8 @@ .It Fl p Dump PHY registers. .It Fl R Ar filename -Receive DV or MPEG TS stream and dump it to a file. -Use Ctrl-C to stop receiving. +Recieve DV or MPEG TS stream and dump it to a file. +Use Ctrl-C to stop recieving. Some DV cameras seem not to send the stream if a bus manager exits. If you cannot get the stream, try the following commands: .Bd -literal -offset indent @@ -133,6 +135,7 @@ Show the topology map. .It Fl u Ar bus_num Specify the IEEE1394 bus number to be operated on. +The default is bus 0. .El .Sh FILES .Bl -tag
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Sun Aug 15 21:57:58 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: reset pktsize each loop To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.24 src/sys/rump/net/lib/libshmif/if_shmem.c:1.25 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.24 Sun Aug 15 21:41:39 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 21:57:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.25 2010/08/15 21:57:58 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.25 2010/08/15 21:57:58 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -225,7 +225,7 @@ struct shmif_sc *sc = ifp-if_softc; struct mbuf *m, *m0; uint32_t lastoff, dataoff, npktlenoff; - uint32_t pktsize = 0; + uint32_t pktsize; bool wrote = false; bool wrap; int error; @@ -239,6 +239,7 @@ break; } + pktsize = 0; for (m = m0; m != NULL; m = m-m_next) { pktsize += m-m_len; }
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: cegger Date: Sun Aug 15 22:01:58 UTC 2010 Modified Files: src/usr.sbin/fwctl: fwctl.8 Log Message: spelling fix To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/fwctl/fwctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/fwctl/fwctl.8 diff -u src/usr.sbin/fwctl/fwctl.8:1.11 src/usr.sbin/fwctl/fwctl.8:1.12 --- src/usr.sbin/fwctl/fwctl.8:1.11 Sun Aug 15 21:52:30 2010 +++ src/usr.sbin/fwctl/fwctl.8 Sun Aug 15 22:01:57 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: fwctl.8,v 1.11 2010/08/15 21:52:30 cegger Exp $ +.\ $NetBSD: fwctl.8,v 1.12 2010/08/15 22:01:57 cegger Exp $ .\ .\ Copyright (c) 2005 KIYOHARA Takashi .\ All rights reserved. @@ -71,12 +71,21 @@ Show the configuration ROM on the node. .It Fl d Ar node Hex dump of the configuration ROM. +.It Fl f Ar node +Force specified +.Ar node +to be the root node on the next bus reset by sending a PHY config packet. +Valid values are 0 - 63. .It Fl g Ar gap_count Broadcast new .Ar gap_count by phy_config packet. By default this value is 63 on all nodes. Valid values are 0 - 63. +.It Fl i Ar pri_req +Set the +.Dv PRIORITY_BUDGET +register on all supported nodes. .It Fl l Ar file Load hex dump file of the configuration ROM and parse it. .It Fl M Ar mode @@ -172,7 +181,7 @@ MPEG-2 stream at 25 Mbps bandwidth. .Pp To send the stream from the camera over the network using TCP (which -supprisingly works better with vlc), you can use +surprisingly works better with vlc), you can use .Dl fwctl -R - | nc 192.168.10.11 9000 with .Pa pkgsrc/net/netcat
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: cegger Date: Sun Aug 15 22:05:14 UTC 2010 Modified Files: src/usr.sbin/fwctl: fwctl.8 Log Message: backout accidentally committed changes To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/fwctl/fwctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/fwctl/fwctl.8 diff -u src/usr.sbin/fwctl/fwctl.8:1.12 src/usr.sbin/fwctl/fwctl.8:1.13 --- src/usr.sbin/fwctl/fwctl.8:1.12 Sun Aug 15 22:01:57 2010 +++ src/usr.sbin/fwctl/fwctl.8 Sun Aug 15 22:05:14 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: fwctl.8,v 1.12 2010/08/15 22:01:57 cegger Exp $ +.\ $NetBSD: fwctl.8,v 1.13 2010/08/15 22:05:14 cegger Exp $ .\ .\ Copyright (c) 2005 KIYOHARA Takashi .\ All rights reserved. @@ -71,21 +71,12 @@ Show the configuration ROM on the node. .It Fl d Ar node Hex dump of the configuration ROM. -.It Fl f Ar node -Force specified -.Ar node -to be the root node on the next bus reset by sending a PHY config packet. -Valid values are 0 - 63. .It Fl g Ar gap_count Broadcast new .Ar gap_count by phy_config packet. By default this value is 63 on all nodes. Valid values are 0 - 63. -.It Fl i Ar pri_req -Set the -.Dv PRIORITY_BUDGET -register on all supported nodes. .It Fl l Ar file Load hex dump file of the configuration ROM and parse it. .It Fl M Ar mode
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Sun Aug 15 22:32:02 UTC 2010 Modified Files: src/sys/dev/pci/hdaudio: hdaudio_afg.c Log Message: kern/43542: 32kHz playback sounds like hissing analog TV snow Instead of specifying a range of supported sample rates based on the lowest and highest available frequencies, only advertise rates that the codec reports as working. Let aurateconv take care of the rest. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/hdaudio/hdaudio_afg.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/hdaudio/hdaudio_afg.c diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.24 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.25 --- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.24 Sun Aug 15 19:39:56 2010 +++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Sun Aug 15 22:32:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_afg.c,v 1.24 2010/08/15 19:39:56 jmcneill Exp $ */ +/* $NetBSD: hdaudio_afg.c,v 1.25 2010/08/15 22:32:02 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.24 2010/08/15 19:39:56 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.25 2010/08/15 22:32:02 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -110,6 +110,11 @@ #define HDAUDIO_HP_SENSE_PERIOD hz +const u_int hdaudio_afg_possible_rates[] = { + 8000, 11025, 16000, 22050, 32000, 44100, + 48000, 88200, 96000, 176500, 192000, /* 384000, */ +}; + static const char *hdaudio_afg_mixer_names[] = HDAUDIO_DEVICE_NAMES; static const char *hdaudio_afg_port_connectivity[] = { @@ -2903,9 +2908,10 @@ static bool hdaudio_afg_probe_encoding(struct hdaudio_afg_softc *sc, -u_int minrate, u_int maxrate, u_int validbits, u_int precision, bool force) +u_int validbits, u_int precision, bool force) { struct audio_format f; + int i; if (!force hdaudio_afg_bits_supported(sc, validbits) == false) return false; @@ -2919,8 +2925,11 @@ f.channels = 0; f.channel_mask = 0; f.frequency_type = 0; - f.frequency[0] = minrate; - f.frequency[1] = maxrate; + for (i = 0; i __arraycount(hdaudio_afg_possible_rates); i++) { + u_int rate = hdaudio_afg_possible_rates[i]; + if (hdaudio_afg_rate_supported(sc, rate)) + f.frequency[f.frequency_type++] = rate; + } #define HDAUDIO_INITFMT(ch, chmask) \ do { \ @@ -2953,17 +2962,11 @@ static void hdaudio_afg_configure_encodings(struct hdaudio_afg_softc *sc) { - const u_int possible_rates[] = { - 8000, 11025, 16000, 22050, 32000, 44100, - 48000, 88200, 96000, 176500, 192000, /* 384000, */ - }; struct hdaudio_assoc *as = sc-sc_assocs; struct audio_format f; - u_int minrate, maxrate; int nchan, i; sc-sc_pchan = sc-sc_rchan = 0; - minrate = maxrate = 0; for (nchan = 0, i = 0; i sc-sc_nassocs; i++) { nchan = hdaudio_afg_assoc_count_channels(sc, as[i], @@ -2979,34 +2982,24 @@ } hda_print(sc, %dch/%dch, sc-sc_pchan, sc-sc_rchan); - for (i = 0; __arraycount(possible_rates); i++) - if (hdaudio_afg_rate_supported(sc, possible_rates[i])) { - minrate = possible_rates[i]; - break; - } - for (i = __arraycount(possible_rates) - 1; i = 0; i--) - if (hdaudio_afg_rate_supported(sc, possible_rates[i])) { - maxrate = possible_rates[i]; - break; - } - KASSERT(minrate 0 maxrate 0); /* impossible */ - hda_print1(sc, %uHz, minrate); - if (minrate != maxrate) - hda_print1(sc, -%uHz, maxrate); + for (i = 0; i __arraycount(hdaudio_afg_possible_rates); i++) + if (hdaudio_afg_rate_supported(sc, + hdaudio_afg_possible_rates[i])) + hda_print1(sc, %uHz, hdaudio_afg_possible_rates[i]); - if (hdaudio_afg_probe_encoding(sc, minrate, maxrate, 8, 16, false)) + if (hdaudio_afg_probe_encoding(sc, 8, 16, false)) hda_print1(sc, 8/16); - if (hdaudio_afg_probe_encoding(sc, minrate, maxrate, 16, 16, false)) + if (hdaudio_afg_probe_encoding(sc, 16, 16, false)) hda_print1(sc, 16/16); - if (hdaudio_afg_probe_encoding(sc, minrate, maxrate, 20, 32, false)) + if (hdaudio_afg_probe_encoding(sc, 20, 32, false)) hda_print1(sc, 20/32); - if (hdaudio_afg_probe_encoding(sc, minrate, maxrate, 24, 32, false)) + if (hdaudio_afg_probe_encoding(sc, 24, 32, false)) hda_print1(sc, 24/32); - if (hdaudio_afg_probe_encoding(sc, minrate, maxrate, 32, 32, false)) + if (hdaudio_afg_probe_encoding(sc, 32, 32, false)) hda_print1(sc, 32/32); if (sc-sc_audiodev.ad_nformats == 0) { - hdaudio_afg_probe_encoding(sc, minrate, maxrate, 16, 16, true); + hdaudio_afg_probe_encoding(sc, 16, 16, true); hda_print1(sc, 16/16*); }
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Mon Aug 16 01:21:10 UTC 2010 Modified Files: src/sys/uvm: uvm_mremap.c Log Message: sys_mremap: unwrap a short line To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/uvm/uvm_mremap.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/uvm/uvm_mremap.c diff -u src/sys/uvm/uvm_mremap.c:1.15 src/sys/uvm/uvm_mremap.c:1.16 --- src/sys/uvm/uvm_mremap.c:1.15 Sun Aug 2 16:07:34 2009 +++ src/sys/uvm/uvm_mremap.c Mon Aug 16 01:21:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_mremap.c,v 1.15 2009/08/02 16:07:34 yamt Exp $ */ +/* $NetBSD: uvm_mremap.c,v 1.16 2010/08/16 01:21:10 yamt Exp $ */ /*- * Copyright (c)2006,2007,2009 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_mremap.c,v 1.15 2009/08/02 16:07:34 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_mremap.c,v 1.16 2010/08/16 01:21:10 yamt Exp $); #include sys/param.h #include sys/mman.h @@ -287,8 +287,7 @@ p = l-l_proc; map = p-p_vmspace-vm_map; - error = uvm_mremap(map, oldva, oldsize, map, newva, newsize, p, - flags); + error = uvm_mremap(map, oldva, oldsize, map, newva, newsize, p, flags); done: *retval = (error != 0) ? 0 : (register_t)newva;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Aug 16 04:31:21 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_cpu_pstate.c acpi_cpu_tstate.c Log Message: Do not error out neither in P-states nor in T-states if the method for the dynamic maximum is nonexistent. Unsurprisingly, there is vagueness in the standards; in ACPI 3.0 and 4.0 it is clearly indicated that also these methods must be present, but the earlier standards are less stringent. Without too much effort, at least one old P4-system was located that lacks _PPC. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_cpu_pstate.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/acpi_cpu_tstate.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/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.19 src/sys/dev/acpi/acpi_cpu_pstate.c:1.20 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.19 Sat Aug 14 17:27:34 2010 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Mon Aug 16 04:31:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.19 2010/08/14 17:27:34 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.20 2010/08/16 04:31:21 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.19 2010/08/14 17:27:34 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.20 2010/08/16 04:31:21 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -60,8 +60,11 @@ ACPI_STATUS rv; /* - * Three control methods are mandatory - * for P-states; _PSS, _PCT, and _PPC. + * The ACPI 3.0 and 4.0 specifications mandate three + * objects for P-states: _PSS, _PCT, and _PPC. A less + * strict wording is however used in the earlier 2.0 + * standard, and some systems conforming to ACPI 2.0 + * do not have _PPC, the method for dynamic maximum. */ rv = acpicpu_pstate_pss(sc); @@ -77,12 +80,7 @@ goto fail; } - rv = acpicpu_pstate_max(sc); - - if (rv != 0) { - str = _PPC; - goto fail; - } + (void)acpicpu_pstate_max(sc); sc-sc_flags |= ACPICPU_FLAG_P; sc-sc_pstate_current = sc-sc_pstate[0].ps_freq; Index: src/sys/dev/acpi/acpi_cpu_tstate.c diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.9 src/sys/dev/acpi/acpi_cpu_tstate.c:1.10 --- src/sys/dev/acpi/acpi_cpu_tstate.c:1.9 Sun Aug 15 08:53:19 2010 +++ src/sys/dev/acpi/acpi_cpu_tstate.c Mon Aug 16 04:31:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_tstate.c,v 1.10 2010/08/16 04:31:21 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.10 2010/08/16 04:31:21 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -63,10 +63,6 @@ if ((sc-sc_flags ACPICPU_FLAG_PIIX4) != 0) return; - /* - * If either _TSS, _PTC, or _TPC is not - * available, we have to resort to FADT. - */ rv = acpicpu_tstate_tss(sc); if (ACPI_FAILURE(rv)) { @@ -81,12 +77,12 @@ goto out; } - rv = acpicpu_tstate_change(sc); - - if (ACPI_FAILURE(rv)) { - str = _TPC; - goto out; - } + /* + * Comparable to P-states, the _TPC object may + * be absent in some systems, even though it is + * required by ACPI 3.0 along with _TSS and _PTC. + */ + (void)acpicpu_tstate_change(sc); out: if (ACPI_FAILURE(rv)) {