CVS commit: src/lib/libc/citrus
Module Name:src Committed By: dholland Date: Sat Sep 5 06:44:27 UTC 2009 Modified Files: src/lib/libc/citrus: citrus_iconv.c Log Message: Add parentheses around a misleading string constant concatenation, from (my own, very old) PR 36064. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/citrus/citrus_iconv.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/citrus/citrus_iconv.c diff -u src/lib/libc/citrus/citrus_iconv.c:1.7 src/lib/libc/citrus/citrus_iconv.c:1.8 --- src/lib/libc/citrus/citrus_iconv.c:1.7 Fri Jul 25 14:05:25 2008 +++ src/lib/libc/citrus/citrus_iconv.c Sat Sep 5 06:44:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_iconv.c,v 1.7 2008/07/25 14:05:25 christos Exp $ */ +/* $NetBSD: citrus_iconv.c,v 1.8 2009/09/05 06:44:27 dholland Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -28,7 +28,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: citrus_iconv.c,v 1.7 2008/07/25 14:05:25 christos Exp $"); +__RCSID("$NetBSD: citrus_iconv.c,v 1.8 2009/09/05 06:44:27 dholland Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -107,7 +107,7 @@ char *p, path[PATH_MAX]; /* iconv.dir path */ - snprintf(path, (size_t)PATH_MAX, "%s/" _CITRUS_ICONV_DIR, curdir); + snprintf(path, (size_t)PATH_MAX, ("%s/" _CITRUS_ICONV_DIR), curdir); /* lookup db */ cp = p = _lookup_simple(path, key, linebuf, linebufsize,
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: dholland Date: Sat Sep 5 06:18:55 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: filesubr.c Log Message: Check group membership correctly; ingroup() returns a truth value, not a gid. PR bin/41995. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/filesubr.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/xcvs/dist/src/filesubr.c diff -u src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 src/external/gpl2/xcvs/dist/src/filesubr.c:1.3 --- src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 Wed Apr 8 16:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/filesubr.c Sat Sep 5 06:18:55 2009 @@ -282,8 +282,7 @@ omask |= S_IXOTH; } -mask = sb.st_uid == uid ? umask : sb.st_gid == ingroup(sb.st_gid) ? - gmask : omask; +mask = sb.st_uid == uid ? umask : ingroup(sb.st_gid) ? gmask : omask; if ((sb.st_mode & mask) == mask) return true; errno = EACCES;
CVS commit: src/usr.bin/skeyinfo
Module Name:src Committed By: dholland Date: Sat Sep 5 06:15:24 UTC 2009 Modified Files: src/usr.bin/skeyinfo: skeyinfo.c Log Message: ANSIfy and sort includes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/skeyinfo/skeyinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/skeyinfo/skeyinfo.c diff -u src/usr.bin/skeyinfo/skeyinfo.c:1.6 src/usr.bin/skeyinfo/skeyinfo.c:1.7 --- src/usr.bin/skeyinfo/skeyinfo.c:1.6 Sat Sep 5 06:13:34 2009 +++ src/usr.bin/skeyinfo/skeyinfo.c Sat Sep 5 06:15:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: skeyinfo.c,v 1.6 2009/09/05 06:13:34 dholland Exp $ */ +/* $NetBSD: skeyinfo.c,v 1.7 2009/09/05 06:15:24 dholland Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,23 +31,20 @@ #include #ifndef lint -__RCSID("$NetBSD: skeyinfo.c,v 1.6 2009/09/05 06:13:34 dholland Exp $"); +__RCSID("$NetBSD: skeyinfo.c,v 1.7 2009/09/05 06:15:24 dholland Exp $"); #endif -#include -#include #include #include -#include +#include +#include #include #include -int main __P((int, char *[])); +#include /* requires stdio.h */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct skey skey; charname[100], prompt[1024];
CVS commit: src/usr.bin/skeyinfo
Module Name:src Committed By: dholland Date: Sat Sep 5 06:13:34 UTC 2009 Modified Files: src/usr.bin/skeyinfo: skeyinfo.c Log Message: Tidy up error messages. Prompted by PR 41993 from Bug Hunting, but more comprehensive. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/skeyinfo/skeyinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/skeyinfo/skeyinfo.c diff -u src/usr.bin/skeyinfo/skeyinfo.c:1.5 src/usr.bin/skeyinfo/skeyinfo.c:1.6 --- src/usr.bin/skeyinfo/skeyinfo.c:1.5 Mon Apr 28 20:24:15 2008 +++ src/usr.bin/skeyinfo/skeyinfo.c Sat Sep 5 06:13:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: skeyinfo.c,v 1.5 2008/04/28 20:24:15 martin Exp $ */ +/* $NetBSD: skeyinfo.c,v 1.6 2009/09/05 06:13:34 dholland Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,12 +31,13 @@ #include #ifndef lint -__RCSID("$NetBSD: skeyinfo.c,v 1.5 2008/04/28 20:24:15 martin Exp $"); +__RCSID("$NetBSD: skeyinfo.c,v 1.6 2009/09/05 06:13:34 dholland Exp $"); #endif #include #include #include +#include #include #include #include @@ -57,7 +58,7 @@ argv++; if (geteuid()) - errx(1, "must be root to read /etc/skeykeys"); + errx(1, "Must be root to read /etc/skeykeys"); uid = getuid(); @@ -65,14 +66,16 @@ pw = getpwuid(uid); else if (!uid) pw = getpwnam(argv[0]); - else - errx(1, "permission denied to look other users skeys"); + else { + errno = EPERM; + err(1, "%s", argv[0]); + } if (!pw) { if (argc) errx(1, "%s: no such user", argv[0]); else - errx(1, "who are you?"); + errx(1, "Who are you?"); } (void) strlcpy(name, pw->pw_name, sizeof(name));
CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/mips/atomic
Module Name:src Committed By: matt Date: Sat Sep 5 04:03:43 UTC 2009 Modified Files: src/common/lib/libc/arch/mips/atomic [matt-nb5-mips64]: Makefile.inc Log Message: Enable the new atomic op routines on mips64e[bl]. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.8.1 \ src/common/lib/libc/arch/mips/atomic/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/mips/atomic/Makefile.inc diff -u src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.8 src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.8.8.1 --- src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.8 Mon Sep 29 08:43:00 2008 +++ src/common/lib/libc/arch/mips/atomic/Makefile.inc Sat Sep 5 04:03:42 2009 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.8 2008/09/29 08:43:00 ad Exp $ +# $NetBSD: Makefile.inc,v 1.8.8.1 2009/09/05 04:03:42 matt Exp $ .if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread") +.if ${MACHINE_ARCH:Mmips64*} == "" SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \ atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \ atomic_inc_32_cas.c atomic_inc_32_nv_cas.c atomic_or_32_cas.c \ @@ -9,14 +10,23 @@ atomic_add_64_nv_cas.c atomic_and_64_cas.c atomic_and_64_nv_cas.c \ atomic_dec_64_cas.c atomic_dec_64_nv_cas.c atomic_inc_64_cas.c \ atomic_inc_64_nv_cas.c atomic_or_64_cas.c atomic_or_64_nv_cas.c \ - atomic_swap_64_cas.c membar_ops.o + atomic_swap_64_cas.c -.endif +CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP +.else +SRCS+= atomic_add.S atomic_dec.S atomic_inc.S +SRCS+= atomic_and.S atomic_or.S +SRCS+= atomic_cas.S atomic_swap.S +.endif +.endif .if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread") +.if ${MACHINE_ARCH:Mmips64*} == "" SRCS+= membar_ops_nop.c atomic_init_testset.c atomic_cas_up.S -CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP +.else +SRCS+= membar_ops.S atomic_init_cas.c +.endif .endif
CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/mips/atomic
Module Name:src Committed By: matt Date: Sat Sep 5 04:03:01 UTC 2009 Modified Files: src/common/lib/libc/arch/mips/atomic [matt-nb5-mips64]: membar_ops.S Log Message: Only allow to null on o32 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.10.1 \ src/common/lib/libc/arch/mips/atomic/membar_ops.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/mips/atomic/membar_ops.S diff -u src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.3 src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.3.10.1 --- src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.3 Sun May 25 15:56:12 2008 +++ src/common/lib/libc/arch/mips/atomic/membar_ops.S Sat Sep 5 04:03:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: membar_ops.S,v 1.3 2008/05/25 15:56:12 chs Exp $ */ +/* $NetBSD: membar_ops.S,v 1.3.10.1 2009/09/05 04:03:01 matt Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -31,22 +31,25 @@ #include "atomic_op_asm.h" +#if defined(_KERNEL) + #ifdef _KERNEL_OPT #include "opt_cputype.h" #include "opt_lockdebug.h" #include "opt_multiprocessor.h" #endif -#if defined(_KERNEL) #include -#if MIPS_HAS_LLSC != 0 && defined(MULTIPROCESSOR) +#if (MIPS_HAS_LLSC != 0 && defined(MULTIPROCESSOR)) || !defined(__mips_o32) +#define SYNC sync +#endif +#elif !defined(__mips_o32) #define SYNC sync -#else -#define SYNC /* nothing */ #endif +#ifdef SYNC .text LEAF(_membar_sync) @@ -64,7 +67,4 @@ STRONG_ALIAS(_membar_producer,_membar_sync) ATOMIC_OP_ALIAS(membar_consumer,_membar_sync) STRONG_ALIAS(_membar_consumer,_membar_sync) - -#else /* _KERNEL */ - -#endif /* _KERNEL */ +#endif /* SYNC */
CVS commit: [matt-nb5-mips64] src/lib/libpam/libpam
Module Name:src Committed By: matt Date: Sat Sep 5 03:54:48 UTC 2009 Modified Files: src/lib/libpam/libpam [matt-nb5-mips64]: Makefile Log Message: Change ${LD} -r ... to ${CC} ${LDFLAGS} -nostdlib -Wl,-r ... so that ${CC} can emit additional ld options. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.8.1 src/lib/libpam/libpam/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/libpam/Makefile diff -u src/lib/libpam/libpam/Makefile:1.8 src/lib/libpam/libpam/Makefile:1.8.8.1 --- src/lib/libpam/libpam/Makefile:1.8 Sun Oct 26 07:44:12 2008 +++ src/lib/libpam/libpam/Makefile Sat Sep 5 03:54:48 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2008/10/26 07:44:12 mrg Exp $ +# $NetBSD: Makefile,v 1.8.8.1 2009/09/05 03:54:48 matt Exp $ #- # Copyright (c) 1998 Juniper Networks, Inc. # All rights reserved. @@ -184,8 +184,8 @@ # XXX Using ${.ALLSRC} in the ld command causes openpam_static.c to be # XXX used. Why??!! --thorpej openpam_static_modules.o: openpam_static.o ${STATIC_MODULE_LIBS} - ${LD} -o ${.TARGET} -r --whole-archive openpam_static.o \ - ${STATIC_MODULE_LIBS} + ${CC} ${LDFLAGS} -nostdlib -o ${.TARGET} -Wl,-r,--whole-archive \ + openpam_static.o ${STATIC_MODULE_LIBS} .include .PATH.h: ${DIST}/include
CVS commit: [matt-nb5-mips64] src/gnu/lib/libgcc4/libgcc
Module Name:src Committed By: matt Date: Sat Sep 5 03:52:33 UTC 2009 Modified Files: src/gnu/lib/libgcc4/libgcc [matt-nb5-mips64]: Makefile Log Message: Change ${LD} -r -[Xx] to ${OBJCOPY} Change ${LD} -r ... to ${CC} ${LDFLAGS} -nostdlib -Wl,-r so what ${CC} can add addition ld options. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.8.1 src/gnu/lib/libgcc4/libgcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/lib/libgcc4/libgcc/Makefile diff -u src/gnu/lib/libgcc4/libgcc/Makefile:1.7 src/gnu/lib/libgcc4/libgcc/Makefile:1.7.8.1 --- src/gnu/lib/libgcc4/libgcc/Makefile:1.7 Sun Oct 26 07:04:04 2008 +++ src/gnu/lib/libgcc4/libgcc/Makefile Sat Sep 5 03:52:33 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2008/10/26 07:04:04 mrg Exp $ +# $NetBSD: Makefile,v 1.7.8.1 2009/09/05 03:52:33 matt Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -30,7 +30,7 @@ .if defined(COPTS) && !empty(COPTS:M*-g*) mv ${.TARGET}.tmp2 ${.TARGET} .else - ${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET} + ${OBJCOPY} -x ${.TARGET}.tmp2 ${.TARGET} rm -f ${.TARGET}.tmp2 .endif rm -f ${.TARGET}.tmp1 @@ -40,11 +40,11 @@ ${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1 ${NM} -pg ${.TARGET}.tmp1 | \ ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ - ${CC} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler - + ${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler - .if defined(COPTS) && !empty(COPTS:M*-g*) mv ${.TARGET}.tmp2 ${.TARGET} .else - ${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET} + ${OBJCOPY} -x ${.TARGET}.tmp2 ${.TARGET} rm -f ${.TARGET}.tmp2 .endif rm -f ${.TARGET}.tmp1
CVS commit: [matt-nb5-mips64] src/gnu/lib/libgcc4
Module Name:src Committed By: matt Date: Sat Sep 5 03:51:16 UTC 2009 Modified Files: src/gnu/lib/libgcc4 [matt-nb5-mips64]: Makefile.inc Log Message: If MKSOFTFLOAT == yes, don't include the libgcc float to unsigned functions since they are already in libc. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.10.1 src/gnu/lib/libgcc4/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/lib/libgcc4/Makefile.inc diff -u src/gnu/lib/libgcc4/Makefile.inc:1.13 src/gnu/lib/libgcc4/Makefile.inc:1.13.10.1 --- src/gnu/lib/libgcc4/Makefile.inc:1.13 Thu Sep 18 12:20:19 2008 +++ src/gnu/lib/libgcc4/Makefile.inc Sat Sep 5 03:51:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.13 2008/09/18 12:20:19 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.13.10.1 2009/09/05 03:51:16 matt Exp $ .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk) && ${MKGCC} != "no" .include "${.CURDIR}/../arch/${MACHINE_ARCH}.mk" @@ -18,7 +18,7 @@ # This is copied from gcc/mklibgcc.in:$lib2funcs LIB2FUNCS_ALL= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \ -_cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \ +_cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi \ _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf _clear_cache \ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \ @@ -27,6 +27,10 @@ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \ _powixf2 _powitf2 \ +.if ${MKSOFTFLOAT} == "no" +LIB2FUNCS_ALL+= _fixunssfsi _fixunsdfsi +.endif + .if ${MACHINE_ARCH} != "vax" LIB2FUNCS_ALL+= \ _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 _divxc3 _divtc3
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Sat Sep 5 03:50:50 UTC 2009 Modified Files: src/sys/dev/ic: rtl8169.c rtl81x9reg.h rtl81x9var.h Log Message: Remove unnecessary whitespace. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/rtl81x9reg.h cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/rtl81x9var.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/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.125 src/sys/dev/ic/rtl8169.c:1.126 --- src/sys/dev/ic/rtl8169.c:1.125 Wed Sep 2 15:11:13 2009 +++ src/sys/dev/ic/rtl8169.c Sat Sep 5 03:50:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.125 2009/09/02 15:11:13 tsutsui Exp $ */ +/* $NetBSD: rtl8169.c,v 1.126 2009/09/05 03:50:49 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.125 2009/09/02 15:11:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.126 2009/09/05 03:50:49 tsutsui Exp $"); /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ /* @@ -82,7 +82,7 @@ * * o Jumbo frames * - * o GMII and TBI ports/registers for interfacing with copper + * o GMII and TBI ports/registers for interfacing with copper * or fiber PHYs * * o RX and TX DMA rings can have up to 1024 descriptors @@ -590,7 +590,7 @@ RTKQ_MACSTAT | RTKQ_CMDSTOP; /* * From FreeBSD driver: - * + * * These (8168/8111) controllers support jumbo frame * but it seems that enabling it requires touching * additional magic registers. Depending on MAC @@ -690,7 +690,7 @@ BUS_DMA_COHERENT | BUS_DMA_NOWAIT)) != 0) { aprint_error_dev(sc->sc_dev, "can't map tx list, error = %d\n", error); - goto fail_1; + goto fail_1; } memset(sc->re_ldata.re_tx_list, 0, RE_TX_LIST_SZ(sc)); Index: src/sys/dev/ic/rtl81x9reg.h diff -u src/sys/dev/ic/rtl81x9reg.h:1.39 src/sys/dev/ic/rtl81x9reg.h:1.40 --- src/sys/dev/ic/rtl81x9reg.h:1.39 Mon May 11 15:42:33 2009 +++ src/sys/dev/ic/rtl81x9reg.h Sat Sep 5 03:50:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9reg.h,v 1.39 2009/05/11 15:42:33 tsutsui Exp $ */ +/* $NetBSD: rtl81x9reg.h,v 1.40 2009/09/05 03:50:49 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998 @@ -126,8 +126,8 @@ #define RTK_GTXSTART 0x0038 /* 8 bits */ #define RTK_TIMERINT_8169 0x0058 /* different offset than 8139 */ #define RTK_PHYAR 0x0060 -#define RTK_CSIDR 0x0064 -#define RTK_CSIAR 0x0068 +#define RTK_CSIDR 0x0064 +#define RTK_CSIAR 0x0068 #define RTK_TBI_LPAR 0x006A #define RTK_GMEDIASTAT 0x006C /* 8 bits */ #define RTK_EPHYAR 0x0080 @@ -205,7 +205,7 @@ #define RTK_TXSTAT_TXABRT 0x4000 #define RTK_TXSTAT_CARRLOSS 0x8000 -#define RTK_TXSTAT_THRESH(x) (((x) << 16) & RTK_TXSTAT_EARLY_THRESH) +#define RTK_TXSTAT_THRESH(x) (((x) << 16) & RTK_TXSTAT_EARLY_THRESH) #define RTK_TXTH_256 8 /* (x) * 32 bytes */ #define RTK_TXTH_1536 48 @@ -451,7 +451,7 @@ #define RTK_RX_MAXDMA RTK_RXDMA_256BYTES #define RTK_TX_MAXDMA RTK_TXDMA_256BYTES -#define RTK_RXCFG_CONFIG (RTK_RX_FIFOTHRESH|RTK_RX_MAXDMA|RTK_RX_BUF_SZ) +#define RTK_RXCFG_CONFIG (RTK_RX_FIFOTHRESH|RTK_RX_MAXDMA|RTK_RX_BUF_SZ) #define RTK_TXCFG_CONFIG (RTK_TXCFG_IFG|RTK_TX_MAXDMA) #define RE_RX_FIFOTHRESH RTK_RXFIFO_NOTHRESH Index: src/sys/dev/ic/rtl81x9var.h diff -u src/sys/dev/ic/rtl81x9var.h:1.48 src/sys/dev/ic/rtl81x9var.h:1.49 --- src/sys/dev/ic/rtl81x9var.h:1.48 Tue May 12 14:25:18 2009 +++ src/sys/dev/ic/rtl81x9var.h Sat Sep 5 03:50:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9var.h,v 1.48 2009/05/12 14:25:18 cegger Exp $ */ +/* $NetBSD: rtl81x9var.h,v 1.49 2009/09/05 03:50:49 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998 @@ -90,12 +90,12 @@ * Instead, there are only four register sets, each or which represents * one 'descriptor.' Basically, each TX descriptor is just a contiguous * packet buffer (32-bit aligned!) and we place the buffer addresses in - * the registers so the chip knows where they are. - * + * the registers so the chip knows where they are. + * * We can sort of kludge together the same kind of buffer management * used in previous drivers, but we have to do buffer copies almost all * the time, so it doesn't really buy us much. - * + * * For reception, there's just one large buffer where the chip stores * all received packets. */ @@ -157,14 +157,14 @@ int re_tx_free; /* # of free descriptors */ int re_tx_nextfree; /* next descriptor to use */ int re_tx_desc_cnt; /* # of descriptors */ - bus_dma_segment_t re_tx_listseg; + bus_dma_segment_t re_tx_listseg; int re_tx_listnseg; struct re_rxsoft re_rxsoft[RE_RX_DESC_CNT]; bus_dmamap_t re_rx_list_map; struct re_desc *re_rx_list; int re_rx_prodidx; - bus_dma
CVS commit: [matt-nb5-mips64] src/sys/conf
Module Name:src Committed By: matt Date: Sat Sep 5 03:49:50 UTC 2009 Modified Files: src/sys/conf [matt-nb5-mips64]: Makefile.kern.inc Log Message: Don't abort if DBSYM fails. To generate a diff of this commit: cvs rdiff -u -r1.118.4.2 -r1.118.4.2.4.1 src/sys/conf/Makefile.kern.inc 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/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.118.4.2 src/sys/conf/Makefile.kern.inc:1.118.4.2.4.1 --- src/sys/conf/Makefile.kern.inc:1.118.4.2 Fri Mar 27 14:50:36 2009 +++ src/sys/conf/Makefile.kern.inc Sat Sep 5 03:49:50 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.118.4.2 2009/03/27 14:50:36 msaitoh Exp $ +# $NetBSD: Makefile.kern.inc,v 1.118.4.2.4.1 2009/09/05 03:49:50 matt Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -235,7 +235,7 @@ SYSTEM_LD_TAIL+=; \ if grep '^\#define.*SYMTAB_SPACE' opt_ddbparam.h > /dev/null; then \ echo "${DBSYM} $@"; \ - ${DBSYM} $@; \ + ${DBSYM} $@ || true; \ fi SYSTEM_LD_HEAD+=${SYSTEM_LD_HEAD_EXTRA}
CVS commit: [matt-nb5-mips64] src/libexec/ld.elf_so/arch/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:49:02 UTC 2009 Modified Files: src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: Makefile.inc Log Message: Enable ELFSIZE=64 is -mabi=64 is set. To generate a diff of this commit: cvs rdiff -u -r1.15.32.1 -r1.15.32.2 \ src/libexec/ld.elf_so/arch/mips/Makefile.inc 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/arch/mips/Makefile.inc diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.1 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.2 --- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.1 Wed Aug 26 03:32:53 2009 +++ src/libexec/ld.elf_so/arch/mips/Makefile.inc Sat Sep 5 03:49:02 2009 @@ -1,11 +1,15 @@ -# $NetBSD: Makefile.inc,v 1.15.32.1 2009/08/26 03:32:53 matt Exp $ +# $NetBSD: Makefile.inc,v 1.15.32.2 2009/09/05 03:49:02 matt Exp $ SRCS+= rtld_start.S mips_reloc.c # XXX Should not be in CPPFLAGS! CPUFLAGS+= -G0 +.if (${CPUFLAGS:M-mabi=64} != "") +CPPFLAGS+= -DELFSIZE=64 +.else CPPFLAGS+= -DELFSIZE=32 +.endif CPPFLAGS+= -DRTLD_INHIBIT_COPY_RELOCS AFLAGS+= -Wa,--fatal-warnings
CVS commit: [matt-nb5-mips64] src/usr.bin/elf2ecoff
Module Name:src Committed By: matt Date: Sat Sep 5 03:48:22 UTC 2009 Modified Files: src/usr.bin/elf2ecoff [matt-nb5-mips64]: Makefile Log Message: Don't build if N64. To generate a diff of this commit: cvs rdiff -u -r1.10.46.1 -r1.10.46.2 src/usr.bin/elf2ecoff/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/elf2ecoff/Makefile diff -u src/usr.bin/elf2ecoff/Makefile:1.10.46.1 src/usr.bin/elf2ecoff/Makefile:1.10.46.2 --- src/usr.bin/elf2ecoff/Makefile:1.10.46.1 Wed Aug 26 03:35:41 2009 +++ src/usr.bin/elf2ecoff/Makefile Sat Sep 5 03:48:22 2009 @@ -1,11 +1,12 @@ -# $NetBSD: Makefile,v 1.10.46.1 2009/08/26 03:35:41 matt Exp $ +# $NetBSD: Makefile,v 1.10.46.2 2009/09/05 03:48:22 matt Exp $ # from: @(#)Makefile 5.4 (Berkeley) 5/11/90 .include # Build ELF to {ecoff, aout} tools on mips, for old bootblocks/PROMs. .if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ - ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") + ((${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \ + ${CPUFLAGS:M-mabi=64} == "")) PROG= elf2ecoff
CVS commit: [matt-nb5-mips64] src/rescue
Module Name:src Committed By: matt Date: Sat Sep 5 03:40:41 UTC 2009 Modified Files: src/rescue [matt-nb5-mips64]: Makefile Log Message: Switch from ${LD} -r to ${CC} ${LDFLAGS} -nostdlib -Wl,-r so that ${CC} can pass additional options to ld To generate a diff of this commit: cvs rdiff -u -r1.21.10.1 -r1.21.10.1.4.1 src/rescue/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/rescue/Makefile diff -u src/rescue/Makefile:1.21.10.1 src/rescue/Makefile:1.21.10.1.4.1 --- src/rescue/Makefile:1.21.10.1 Fri Jan 16 22:21:30 2009 +++ src/rescue/Makefile Sat Sep 5 03:40:41 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21.10.1 2009/01/16 22:21:30 bouyer Exp $ +# $NetBSD: Makefile,v 1.21.10.1.4.1 2009/09/05 03:40:41 matt Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -52,7 +52,7 @@ LIBOVERRIDE= liboverride.o ${LIBOVERRIDE}: ${OVERRIDEOBJS} ${_MKTARGET_LINK} - ${LD} -r -o $@ ${OVERRIDEOBJS} + ${CC} ${LDFLAGS} -nostdlib -Wl,-r -o $@ ${OVERRIDEOBJS} CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE}
CVS commit: [matt-nb5-mips64] src/usr.bin/ldd
Module Name:src Committed By: matt Date: Sat Sep 5 03:39:26 UTC 2009 Modified Files: src/usr.bin/ldd [matt-nb5-mips64]: Makefile src/usr.bin/ldd/elf64 [matt-nb5-mips64]: Makefile Log Message: If build a N64 userland, enable elf64 support in ldd. To generate a diff of this commit: cvs rdiff -u -r1.7.52.1 -r1.7.52.1.4.1 src/usr.bin/ldd/Makefile cvs rdiff -u -r1.4.2.2 -r1.4.2.2.4.1 src/usr.bin/ldd/elf64/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ldd/Makefile diff -u src/usr.bin/ldd/Makefile:1.7.52.1 src/usr.bin/ldd/Makefile:1.7.52.1.4.1 --- src/usr.bin/ldd/Makefile:1.7.52.1 Fri Jan 16 22:21:30 2009 +++ src/usr.bin/ldd/Makefile Sat Sep 5 03:39:26 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7.52.1 2009/01/16 22:21:30 bouyer Exp $ +# $NetBSD: Makefile,v 1.7.52.1.4.1 2009/09/05 03:39:26 matt Exp $ .include # for MKDYNAMICROOT definition @@ -16,7 +16,9 @@ .endif .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \ -(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") +(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \ +((${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") \ + && ${CPUFLAGS:-mabi=64} != "") LIB_ELF64DIR!= cd ${.CURDIR}/elf64 && ${PRINTOBJDIR} EXTRA_LIBS+= ${LIB_ELF64DIR}/libldd_elf64.a CPPFLAGS.ldd.c= -DELFSIZE=64 Index: src/usr.bin/ldd/elf64/Makefile diff -u src/usr.bin/ldd/elf64/Makefile:1.4.2.2 src/usr.bin/ldd/elf64/Makefile:1.4.2.2.4.1 --- src/usr.bin/ldd/elf64/Makefile:1.4.2.2 Fri Jan 16 22:21:30 2009 +++ src/usr.bin/ldd/elf64/Makefile Sat Sep 5 03:39:26 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4.2.2 2009/01/16 22:21:30 bouyer Exp $ +# $NetBSD: Makefile,v 1.4.2.2.4.1 2009/09/05 03:39:26 matt Exp $ CPPFLAGS+= -DELFSIZE=64 LIB= ldd_elf64 @@ -10,7 +10,9 @@ .PATH: ${.CURDIR}/.. .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \ -(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") +(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \ +((${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") \ + && ${CPUFLAGS:M-mabi=64} != "") # XXX we need to make sure that we don't accidentally get the elf32 # XXX versions of these.
CVS commit: [matt-nb5-mips64] src/share/mk
Module Name:src Committed By: matt Date: Sat Sep 5 03:38:23 UTC 2009 Modified Files: src/share/mk [matt-nb5-mips64]: bsd.kmod.mk bsd.kmodule.mk bsd.prog.mk Log Message: Change ${LD} -r to ${CC} ${LDFLAGS} -nostdlib -Wl,-r This is so ${CC} will invoke ld with appropriate options generated from ${LDFLAGS} To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.89.6.1 src/share/mk/bsd.kmod.mk cvs rdiff -u -r1.13.2.1.2.1 -r1.13.2.1.2.1.2.1 src/share/mk/bsd.kmodule.mk cvs rdiff -u -r1.239.2.1.2.1 -r1.239.2.1.2.1.2.1 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.kmod.mk diff -u src/share/mk/bsd.kmod.mk:1.89 src/share/mk/bsd.kmod.mk:1.89.6.1 --- src/share/mk/bsd.kmod.mk:1.89 Sun Oct 19 22:05:21 2008 +++ src/share/mk/bsd.kmod.mk Sat Sep 5 03:38:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmod.mk,v 1.89 2008/10/19 22:05:21 apb Exp $ +# $NetBSD: bsd.kmod.mk,v 1.89.6.1 2009/09/05 03:38:23 matt Exp $ .include .include @@ -46,7 +46,7 @@ ${MACHINE_CPU} == "powerpc" ${KMOD}_tmp.o: ${OBJS} ${DPADD} ${_MKTARGET_COMPILE} - ${LD} -r -o tmp.o ${OBJS} + ${CC} ${LDFLAGS} -nostdlib -Wl,-r -o tmp.o ${OBJS} mv tmp.o ${.TARGET} ${KMOD}_tramp.S: ${KMOD}_tmp.o $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk @@ -58,7 +58,7 @@ ${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o ${_MKTARGET_LINK} - ${LD} -r \ + ${CC} ${LDFLAGS} -nostdlib -Wl,-r \ `${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmwrap.awk` \ -o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o @@ -73,7 +73,7 @@ .else ${PROG}: ${OBJS} ${DPADD} ${_MKTARGET_LINK} - ${LD} -r -o tmp.o ${OBJS} + ${CC} ${LDFLAGS} -nostdlib -Wl,-r -o tmp.o ${OBJS} mv tmp.o ${.TARGET} .endif Index: src/share/mk/bsd.kmodule.mk diff -u src/share/mk/bsd.kmodule.mk:1.13.2.1.2.1 src/share/mk/bsd.kmodule.mk:1.13.2.1.2.1.2.1 --- src/share/mk/bsd.kmodule.mk:1.13.2.1.2.1 Sat Jun 6 22:10:49 2009 +++ src/share/mk/bsd.kmodule.mk Sat Sep 5 03:38:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmodule.mk,v 1.13.2.1.2.1 2009/06/06 22:10:49 bouyer Exp $ +# $NetBSD: bsd.kmodule.mk,v 1.13.2.1.2.1.2.1 2009/09/05 03:38:23 matt Exp $ .include .include @@ -40,7 +40,8 @@ ${PROG}: ${OBJS} ${DPADD} ${_MKTARGET_LINK} - ${LD} -T ${KMODSCRIPT} -r -d -o ${.TARGET} ${OBJS} + ${CC} ${LDFLAGS} -nostdlib -Wl,-T,${KMODSCRIPT},-r,-d \ + -o ${.TARGET} ${OBJS} # Install rules .if !target(kmodinstall) Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.239.2.1.2.1 src/share/mk/bsd.prog.mk:1.239.2.1.2.1.2.1 --- src/share/mk/bsd.prog.mk:1.239.2.1.2.1 Sat Jun 6 22:10:49 2009 +++ src/share/mk/bsd.prog.mk Sat Sep 5 03:38:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.239.2.1.2.1 2009/06/06 22:10:49 bouyer Exp $ +# $NetBSD: bsd.prog.mk,v 1.239.2.1.2.1.2.1 2009/09/05 03:38:23 matt Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -316,7 +316,7 @@ ${_P}.ro: ${OBJS.${_P}} ${DPADD} ${_MKTARGET_LINK} - ${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}} + ${CC} ${LDFLAGS} -nostdlib -Wl,-r,-dc -o ${.TARGET} ${OBJS.${_P}} .if defined(_PROGDEBUG.${_P}) ${_PROGDEBUG.${_P}}: ${_P}
CVS commit: [matt-nb5-mips64] src/libexec/ld.elf_so/arch/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:34:25 UTC 2009 Modified Files: src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: mips_reloc.c Log Message: Make ld.elf_so understand the "unique" way MIPS encodes 64 relocation entries. With this change, dynamic N64 images with shared libraries work. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.10.1 src/libexec/ld.elf_so/arch/mips/mips_reloc.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/arch/mips/mips_reloc.c diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.10.1 --- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53 Thu Jul 24 04:39:25 2008 +++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c Sat Sep 5 03:34:25 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_reloc.c,v 1.53 2008/07/24 04:39:25 matt Exp $ */ +/* $NetBSD: mips_reloc.c,v 1.53.10.1 2009/09/05 03:34:25 matt Exp $ */ /* * Copyright 1997 Michael L. Hitch @@ -30,11 +30,12 @@ #include #ifndef lint -__RCSID("$NetBSD: mips_reloc.c,v 1.53 2008/07/24 04:39:25 matt Exp $"); +__RCSID("$NetBSD: mips_reloc.c,v 1.53.10.1 2009/09/05 03:34:25 matt Exp $"); #endif /* not lint */ #include #include +#include #include #include @@ -42,7 +43,9 @@ #include "debug.h" #include "rtld.h" +#ifdef __mips_o32 #define SUPPORT_OLD_BROKEN_LD +#endif void _rtld_bind_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); @@ -52,29 +55,69 @@ * It is possible for the compiler to emit relocations for unaligned data. * We handle this situation with these inlines. */ -#define RELOC_ALIGNED_P(x) \ - (((uintptr_t)(x) & (sizeof(void *) - 1)) == 0) -static inline Elf_Addr -load_ptr(void *where) +#if ELFSIZE == 64 +/* + * ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain + * the symbol index. The top 32-bits contain three relocation types encoded + * in big-endian integer with first relocation in LSB. This means for little + * endian we have to byte swap that interger (r_type). + */ +#define Elf_Sxword Elf64_Sxword +#define ELF_R_NXTTYPE_64_P(r_type) r_type) >> 8) & 0xff) == R_TYPE(64)) +#if BYTE_ORDER == LITTLE_ENDIAN +#undef ELF_R_SYM +#undef ELF_R_TYPE +#define ELF_R_SYM(r_info) ((r_info) & 0x) +#define ELF_R_TYPE(r_info) bswap32((r_info) >> 32) +#endif +#else +#define ELF_R_NXTTYPE_64_P(r_type) (0) +#define Elf_Sxword Elf32_Sword +#endif + +static inline Elf_Sxword +load_ptr(void *where, size_t len) { - if (__predict_true(RELOC_ALIGNED_P(where))) - return *(Elf_Addr *)where; - else { - Elf_Addr res; + Elf_Sxword val; - (void)memcpy(&res, where, sizeof(res)); - return res; + if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { +#if ELFSIZE == 64 + if (len == sizeof(Elf_Sxword)) + return *(Elf_Sxword *)where; +#endif + return *(Elf_Sword *)where; } + + val = 0; +#if BYTE_ORDER == LITTLE_ENDIAN + (void)memcpy(&val, where, len); +#endif +#if BYTE_ORDER == BIG_ENDIAN + (void)memcpy(&(const uint8_t *)(val+1) - len, where, len); +#endif + return (len == sizeof(Elf_Sxword)) ? val : (Elf_Sword)val; } static inline void -store_ptr(void *where, Elf_Addr val) +store_ptr(void *where, Elf_Sxword val, size_t len) { - if (__predict_true(RELOC_ALIGNED_P(where))) - *(Elf_Addr *)where = val; - else - (void)memcpy(where, &val, sizeof(val)); + if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { +#if ELFSIZE == 64 + if (len == sizeof(Elf_Sxword)) { + *(Elf_Sxword *)where = val; + return; + } +#endif + *(Elf_Sword *)where = val; + return; + } +#if BYTE_ORDER == LITTLE_ENDIAN + (void)memcpy(where, &val, len); +#endif +#if BYTE_ORDER == BIG_ENDIAN + (void)memcpy(where, &(const uint8_t *)(val+1) - len, len); +#endif } @@ -95,7 +138,7 @@ const Elf_Sym *symtab = NULL, *sym; Elf_Addr *got = NULL; Elf_Word local_gotno = 0, symtabno = 0, gotsym = 0; - int i; + size_t i; for (; dynp->d_tag != DT_NULL; dynp++) { switch (dynp->d_tag) { @@ -136,20 +179,42 @@ ++got; } - rellim = (const Elf_Rel *)((caddr_t)rel + relsz); + rellim = (const Elf_Rel *)((uintptr_t)rel + relsz); for (; rel < rellim; rel++) { + Elf_Word r_symndx, r_type; + where = (void *)(relocbase + rel->r_offset); - switch (ELF_R_TYPE(rel->r_info)) { - case R_TYPE(NONE): - break; + r_symndx = ELF_R_SYM(rel->r_info); + r_type = ELF_R_TYPE(rel->r_info); - case R_TYPE(REL32): - assert(ELF_R_SYM(rel->r_info) < gotsym); - sym = symtab + ELF_R_SYM(rel->r_info); + switch (r_type & 0xff) { + case R_TYPE(REL32): { + const size_t rlen = + ELF_R_NXTTYPE_64_P(r_type) +? sizeof(Elf_Sxword) +: sizeof(Elf_Sword); + Elf_Sxword old = load_ptr(where, rlen); + Elf_Sxword val = old; +#if ELFSIZE == 64 + assert(r_type == R_TYPE(REL32) + || r_type == (R_TYPE(REL32)|(R_TYPE(64) << 8))); +#endif + assert(r_symn
CVS commit: [matt-nb5-mips64] src/gnu/dist/gcc4/gcc/config/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:26:20 UTC 2009 Modified Files: src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: netbsd.h netbsd64.h Log Message: Simply the netbsd64 LINK_SPEC. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.32.3 -r1.1.1.1.32.4 \ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd.h diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.3 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.4 --- src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.3 Sun Aug 30 23:26:25 2009 +++ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h Sat Sep 5 03:26:20 2009 @@ -204,7 +204,8 @@ "%{EL:-m elf32ltsmip} \ %{EB:-m elf32btsmip} \ %(endian_spec) \ - %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \ + %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ %(netbsd_link_spec)" Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.2 src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.3 --- src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.2 Sun Aug 23 20:28:58 2009 +++ src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h Sat Sep 5 03:26:20 2009 @@ -19,6 +19,12 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Force the default endianness and ABI flags onto the command line + in order to make the other specs easier to write. */ + +#define DRIVER_SELF_SPECS \ +"%{!EB:%{!EL:%(endian_spec)}}", \ +"%{!mabi=*: -mabi=n32}" /* Define default target values. */ @@ -35,20 +41,13 @@ #undef LINK_SPEC #define LINK_SPEC \ - "%{EL:\ - %{!mabi=*:-m elf32ltsmipn32} \ - %{mabi=64:-m elf64ltsmip} \ - %{mabi=32:-m elf32ltsmip} \ - %{mabi=o64:-m elf64ltsmip} \ - %{mabi=n32:-m elf32ltsmipn32}} \ - %{EB:\ - %{!mabi=*:-m elf32btsmipn32} \ - %{mabi=64:-m elf64btsmip} \ - %{mabi=32:-m elf32btsmip} \ - %{mabi=o64:-m elf64btsmip} \ - %{mabi=n32:-m elf32btsmipn32}} \ + "%{mabi=64:-m elf64%{EB:b}%{EL:l}tsmip} \ + %{mabi=32:-m elf32%{EB:b}%{EL:l}tsmip} \ + %{mabi=o64:-m elf64%{EB:b}%{EL:l}tsmip} \ + %{mabi=n32:-m elf32%{EB:b}%{EL:l}tsmipn32} \ %(endian_spec) \ - %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \ + %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ %(netbsd_link_spec)"
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:19:31 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: types.h Log Message: ATOMIC64_OPS are available for all kernels except O32 ones. To generate a diff of this commit: cvs rdiff -u -r1.43.36.5 -r1.43.36.6 src/sys/arch/mips/include/types.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/mips/include/types.h diff -u src/sys/arch/mips/include/types.h:1.43.36.5 src/sys/arch/mips/include/types.h:1.43.36.6 --- src/sys/arch/mips/include/types.h:1.43.36.5 Sun Aug 23 07:49:56 2009 +++ src/sys/arch/mips/include/types.h Sat Sep 5 03:19:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.43.36.5 2009/08/23 07:49:56 matt Exp $ */ +/* $NetBSD: types.h,v 1.43.36.6 2009/09/05 03:19:31 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -126,7 +126,7 @@ #define __HAVE_CPU_COUNTER #endif -#ifdef _LP64 +#if !defined(__mips_o32) #define __HAVE_ATOMIC64_OPS #endif
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:18:49 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: locore.h Log Message: Change padding in kern_frame so it has quad-word (16 bytes) alignment. Then when allocated on a stack, the stack keeps 16 byte alignment. To generate a diff of this commit: cvs rdiff -u -r1.78.36.1.2.3 -r1.78.36.1.2.4 \ src/sys/arch/mips/include/locore.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/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.3 src/sys/arch/mips/include/locore.h:1.78.36.1.2.4 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.3 Sun Aug 30 10:01:03 2009 +++ src/sys/arch/mips/include/locore.h Sat Sep 5 03:18:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.78.36.1.2.3 2009/08/30 10:01:03 matt Exp $ */ +/* $NetBSD: locore.h,v 1.78.36.1.2.4 2009/09/05 03:18:49 matt Exp $ */ /* * Copyright 1996 The Board of Trustees of The Leland Stanford @@ -483,7 +483,7 @@ #endif #endif #if defined(__mips_n32) || defined(__mips_n64) - register_t cf_pad; + register_t cf_pad[2]; /* for 16 byte alignment */ #endif register_t cf_sp; register_t cf_ra;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:25:07 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S Log Message: More LP64 cleanup. To generate a diff of this commit: cvs rdiff -u -r1.26.36.1.2.5 -r1.26.36.1.2.6 \ src/sys/arch/mips/mips/mipsX_subr.S 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/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.5 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.6 --- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.5 Wed Sep 2 15:56:52 2009 +++ src/sys/arch/mips/mips/mipsX_subr.S Sat Sep 5 03:25:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.5 2009/09/02 15:56:52 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.6 2009/09/05 03:25:07 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -306,34 +306,34 @@ */ VECTOR(MIPSX(TLBMiss), unknown) .set noat - mfc0 k0, MIPS_COP_0_BAD_VADDR #00: k0=bad address + _MFC0 k0, MIPS_COP_0_BAD_VADDR #00: k0=bad address lui k1, %hi(segbase) #01: k1=hi of segbase bltz k0, 4f#02: k0<0 -> 4f (kernel fault) - srl k0, (2*PGSHIFT-2-PTR_SCALESHIFT)#03: k0=seg offset (almost) + PTR_SRL k0, (2*PGSHIFT-2-PTR_SCALESHIFT)#03: k0=seg offset (almost) PTR_L k1, %lo(segbase)(k1) #04: k1=segment tab base andi k0, k0, (NBPG-(1<>10) + PTR_SRL k0, (PGSHIFT-2) #0a: k0=VPN (aka va>>10) andi k0, k0, (NBPG-8) #0b: k0=page tab offset PTR_ADDU k1, k1, k0 #0c: k1=pte address INT_L k0, 0(k1) #0d: k0=lo0 pte INT_L k1, 4(k1) #0e: k1=lo1 pte - sll k0, 2#0f: chop top 2 bits (part 1a) - srl k0, 2#10: chop top 2 bits (part 1b) + PTR_SLL k0, 2#0f: chop top 2 bits (part 1a) + PTR_SRL k0, 2#10: chop top 2 bits (part 1b) #ifdef MIPS3_5900 mtc0 k0, MIPS_COP_0_TLB_LO0 #11: lo0 is loaded sync.p #12: R5900 cop0 hazard - sll k1, 2#13: chop top 2 bits (part 2a) - srl k1, 2#14: chop top 2 bits (part 2b) + PTR_SLL k1, 2#13: chop top 2 bits (part 2a) + PTR_SRL k1, 2#14: chop top 2 bits (part 2b) mtc0 k1, MIPS_COP_0_TLB_LO1 #15: lo1 is loaded sync.p #16: R5900 cop0 hazard #else /* MIPS3_5900 */ mtc0 k0, MIPS_COP_0_TLB_LO0 #11: lo0 is loaded - sll k1, 2#12: chop top 2 bits (part 2a) - srl k1, 2#13: chop top 2 bits (part 2b) + PTR_SLL k1, 2#12: chop top 2 bits (part 2a) + PTR_SRL k1, 2#13: chop top 2 bits (part 2b) mtc0 k1, MIPS_COP_0_TLB_LO1 #14: lo1 is loaded nop #15: standard nop nop #16: extra nop for QED5230 @@ -371,23 +371,23 @@ dmfc0 k0, MIPS_COP_0_BAD_VADDR #00: k0=bad address lui k1, %hi(segbase) #01: k1=hi of segbase bltz k0, 4f#02: k0<0 -> 4f (kernel fault) - srl k0, 2*PGSHIFT-2-PTR_SCALESHIFT #03: k0=seg offset (almost) + PTR_SRL k0, 2*PGSHIFT-2-PTR_SCALESHIFT #03: k0=seg offset (almost) PTR_L k1, %lo(segbase)(k1) #04: k1=segment tab base andi k0, NBPG-(1<>10) + PTR_SRL k0, (PGSHIFT-2) #0a: k0=VPN (aka va>>10) andi k0, k0, (NBPG-8) #0b: k0=page tab offset PTR_ADDU k1, k1, k0 #0c: k1=pte address INT_L k0, 0(k1) #0d: k0=lo0 pte INT_L k1, 4(k1) #0e: k1=lo1 pte - sll k0, 2#0f: chop top 2 bits (part 1a) - srl k0, 2#10: chop top 2 bits (part 1b) + PTR_SLL k0, 2#0f: chop top 2 bits (part 1a) + PTR_SRL k0, 2#10: chop top 2 bits (part 1b) mtc0 k0, MIPS_COP_0_TLB_LO0 #11: lo0 is loaded - sll k1, 2#12: chop top 2 bits (part 2a) - srl k1, 2#13: chop top 2 bits (part 2b) + PTR_SLL k1, 2#12: chop top 2 bits (part 2a) + PTR_SRL k1, 2#13: chop top 2 bits (part 2b) mtc0 k1, MIPS_COP_0_TLB_LO1 #14: lo1 is loaded nop #15: standard nop nop #16: extra nop for QED5230 @@ -452,18 +452,21 @@ sll k0, k0, 3 #03: shift user bit for cause index and k1, k1, MIPS3_CR_EXC_CODE #04: mask out the cause bits. or k1, k1, k0 #05: change index to user table +#ifdef _LP64 + PTR_SLL k1, k1, 1 +#endif 1: PTR_LA k0, MIPSX(excpt_sw) #06: get base of the jump table - addu k0, k0, k1 #07: get the address of the + PTR_ADDU k0, k0, k1 #08: get the address of the # function entry. Note that # the cause is already # shifted left by 2 bits so # we dont have to shift. - PTR_L k0, 0(k0) #08: get the function address + PTR_L k0, 0(k0) #09: get the function address #nop #-slip- - j k0#09: jump to the function - nop #0a: branch delay slot + j k0#0a: jump to the function + nop #0b: branch delay slot .set at _VECTOR_END(MIPSX(exception)) @@ -1443,16 +1446,16 @@ _MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address li k1, VM_MIN_KERNEL_ADDRESS # compute index bgez k0, _C_LABEL(MIPSX(KernGenException)) # full trap processing - subu k0, k0, k1 + PTR_SUBU k0, k0, k1 INT_L k1, _C_LABEL(Sysmapsize) # index within range? - srl k0, k0, PGSHIFT + PTR_SRL k0, k0, PGSHIFT sltu k1, k0, k1 - beq k1, zero,
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:24:21 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: fp.S Log Message: Use INT_[LS] for dealing with the FRAME_FSR. To generate a diff of this commit: cvs rdiff -u -r1.33.38.5 -r1.33.38.6 src/sys/arch/mips/mips/fp.S 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/fp.S diff -u src/sys/arch/mips/mips/fp.S:1.33.38.5 src/sys/arch/mips/mips/fp.S:1.33.38.6 --- src/sys/arch/mips/mips/fp.S:1.33.38.5 Wed Sep 2 13:00:39 2009 +++ src/sys/arch/mips/mips/fp.S Sat Sep 5 03:24:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fp.S,v 1.33.38.5 2009/09/02 13:00:39 uebayasi Exp $ */ +/* $NetBSD: fp.S,v 1.33.38.6 2009/09/05 03:24:21 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -139,7 +139,7 @@ #ifdef SOFTFLOAT PTR_L t0, L_ADDR(MIPS_CURLWP) # get pcb of current process PTR_L a3, fmt_tbl(v0) # switch on FUNC & FMT - FPX_L a2, U_PCB_FPREGS+FRAME_FSR(t0) + INT_L a2, U_PCB_FPREGS+FRAME_FSR(t0) #else cfc1 a2, MIPS_FPU_CSR # get exception register PTR_L a3, fmt_tbl(v0) # switch on FUNC & FMT @@ -727,7 +727,7 @@ move v0, zero bne t1, t2, cfinvalid - FPX_L v0, U_PCB_FPREGS+FRAME_FSR(t0) + INT_L v0, U_PCB_FPREGS+FRAME_FSR(t0) cfinvalid: @@ -759,7 +759,7 @@ REG_EPILOGUE PTR_L t0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S v0, U_PCB_FPREGS+FRAME_FSR(t0) + INT_S v0, U_PCB_FPREGS+FRAME_FSR(t0) b done @@ -1316,7 +1316,7 @@ #ifdef SOFTFLOAT PTR_L t1, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(t1) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(t1) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -1396,7 +1396,7 @@ #ifdef SOFTFLOAT PTR_L t1, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(t1) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(t1) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2014,7 +2014,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2126,7 +2126,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save condition bit #endif @@ -2149,7 +2149,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save condition bit #endif @@ -2266,7 +2266,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2387,7 +2387,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2528,7 +2528,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2671,7 +2671,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2688,7 +2688,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2709,7 +2709,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2731,7 +2731,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else ctc1 a2, MIPS_FPU_CSR # save exceptions #endif @@ -2749,7 +2749,7 @@ #ifdef SOFTFLOAT PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #else /* * ctc1 with fpe bits set causes FPE in kernel mode panic on 5231. @@ -2762,7 +2762,7 @@ PTR_L v0, L_ADDR(MIPS_CURLWP) # get pcb of current process #nop - FPX_S a2, U_PCB_FPREGS+FRAME_FSR(v0) + INT_S a2, U_PCB_FPREGS+FRAME_FSR(v0) #endif REG_L a1, CALLFRAME_SIZ + 1*SZREG(sp) # frame
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:23:31 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cache_mipsNN.c Log Message: assign vaddr_t to unsigned int makes LP64 code very unhappy. To generate a diff of this commit: cvs rdiff -u -r1.11.78.1 -r1.11.78.2 src/sys/arch/mips/mips/cache_mipsNN.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/cache_mipsNN.c diff -u src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.1 src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.2 --- src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.1 Thu Aug 20 07:59:09 2009 +++ src/sys/arch/mips/mips/cache_mipsNN.c Sat Sep 5 03:23:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_mipsNN.c,v 1.11.78.1 2009/08/20 07:59:09 matt Exp $ */ +/* $NetBSD: cache_mipsNN.c,v 1.11.78.2 2009/09/05 03:23:31 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.11.78.1 2009/08/20 07:59:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.11.78.2 2009/09/05 03:23:31 matt Exp $"); #include @@ -47,11 +47,11 @@ #include -#define round_line16(x) (((x) + 15) & ~15) -#define trunc_line16(x) ((x) & ~15) +#define round_line16(x) (((x) + 15L) & -16L) +#define trunc_line16(x) ((x) & -16L) -#define round_line32(x) (((x) + 31) & ~31) -#define trunc_line32(x) ((x) & ~31) +#define round_line32(x) (((x) + 31L) & -32L) +#define trunc_line32(x) ((x) & -32L) #ifdef SB1250_PASS1 @@ -209,7 +209,7 @@ void mipsNN_icache_sync_range_index_16(vaddr_t va, vsize_t size) { - unsigned int eva, tmpva; + vaddr_t eva, tmpva; int i, stride, loopcount; /* @@ -252,7 +252,7 @@ void mipsNN_icache_sync_range_index_32(vaddr_t va, vsize_t size) { - unsigned int eva, tmpva; + vaddr_t eva, tmpva; int i, stride, loopcount; /* @@ -383,7 +383,7 @@ void mipsNN_pdcache_wbinv_range_index_16(vaddr_t va, vsize_t size) { - unsigned int eva, tmpva; + vaddr_t eva, tmpva; int i, stride, loopcount; /* @@ -424,7 +424,7 @@ void mipsNN_pdcache_wbinv_range_index_32(vaddr_t va, vsize_t size) { - unsigned int eva, tmpva; + vaddr_t eva, tmpva; int i, stride, loopcount; /*
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:22:45 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: genassym.cf Log Message: Instead of pulling MIPS_KSEG0_START and friends from cpuregs, put them here. (asm doesn't constants with appended L) To generate a diff of this commit: cvs rdiff -u -r1.44.12.3 -r1.44.12.4 src/sys/arch/mips/mips/genassym.cf 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/genassym.cf diff -u src/sys/arch/mips/mips/genassym.cf:1.44.12.3 src/sys/arch/mips/mips/genassym.cf:1.44.12.4 --- src/sys/arch/mips/mips/genassym.cf:1.44.12.3 Wed Sep 2 15:55:17 2009 +++ src/sys/arch/mips/mips/genassym.cf Sat Sep 5 03:22:44 2009 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.44.12.3 2009/09/02 15:55:17 matt Exp $ +# $NetBSD: genassym.cf,v 1.44.12.4 2009/09/05 03:22:44 matt Exp $ # # Copyright (c) 1992, 1993 # The Regents of the University of California. All rights reserved. @@ -90,6 +90,9 @@ include define PAGE_SIZE PAGE_SIZE +define MIPS_KSEG0_START MIPS_KSEG0_START +define MIPS_KSEG1_START MIPS_KSEG1_START +define MIPS_KSEG2_START MIPS_KSEG2_START # Important offsets into the lwp and proc structs & associated constants define L_ADDR offsetof(struct lwp, l_addr)
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:20:21 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpuregs.h Log Message: Define MIPS_KSEGn_START as friends as being long. To generate a diff of this commit: cvs rdiff -u -r1.74.28.4 -r1.74.28.5 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.74.28.4 src/sys/arch/mips/include/cpuregs.h:1.74.28.5 --- src/sys/arch/mips/include/cpuregs.h:1.74.28.4 Sun Aug 30 13:03:02 2009 +++ src/sys/arch/mips/include/cpuregs.h Sat Sep 5 03:20:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuregs.h,v 1.74.28.4 2009/08/30 13:03:02 simonb Exp $ */ +/* $NetBSD: cpuregs.h,v 1.74.28.5 2009/09/05 03:20:21 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -82,11 +82,13 @@ * MIPS addresses are signed and we defining as negative so that * in LP64 kern they get sign-extended correctly. */ -#define MIPS_KSEG0_START (-0x7fff-1) /* 0x8000 */ -#define MIPS_KSEG1_START -0x6000 /* 0xa000 */ -#define MIPS_KSEG2_START -0x4000 /* 0xc000 */ -#define MIPS_MAX_MEM_ADDR -0x4200 /* 0xbe00 */ -#define MIPS_RESERVED_ADDR -0x4038 /* 0xbfc8 */ +#ifndef _LOCORE +#define MIPS_KSEG0_START (-0x7fffL-1) /* 0x8000 */ +#define MIPS_KSEG1_START -0x6000L /* 0xa000 */ +#define MIPS_KSEG2_START -0x4000L /* 0xc000 */ +#define MIPS_MAX_MEM_ADDR -0x4200L /* 0xbe00 */ +#define MIPS_RESERVED_ADDR -0x4038L /* 0xbfc8 */ +#endif #define MIPS_PHYS_MASK 0x1fff
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:16:23 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: proc.h Log Message: Make sure this is quad-word (16 byte) aligned. Thus when one is allocated on the stack, the stack stays 16 byte aligned. To generate a diff of this commit: cvs rdiff -u -r1.21.36.2 -r1.21.36.3 src/sys/arch/mips/include/proc.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/mips/include/proc.h diff -u src/sys/arch/mips/include/proc.h:1.21.36.2 src/sys/arch/mips/include/proc.h:1.21.36.3 --- src/sys/arch/mips/include/proc.h:1.21.36.2 Fri Aug 21 17:20:46 2009 +++ src/sys/arch/mips/include/proc.h Sat Sep 5 03:16:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.21.36.2 2009/08/21 17:20:46 matt Exp $ */ +/* $NetBSD: proc.h,v 1.21.36.3 2009/09/05 03:16:23 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -70,7 +70,7 @@ struct frame { mips_reg_t f_regs[38]; u_int32_t f_ppl; /* previous priority level */ - int32_t f_pad; /* for 8 byte aligned */ + mips_reg_t f_pad; /* for quadword alignment */ }; #ifdef _KERNEL
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:15:09 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: elf_machdep.h Log Message: Fix EF_ARCH_*. (should be in high nibble) To generate a diff of this commit: cvs rdiff -u -r1.10.96.5 -r1.10.96.6 src/sys/arch/mips/include/elf_machdep.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/mips/include/elf_machdep.h diff -u src/sys/arch/mips/include/elf_machdep.h:1.10.96.5 src/sys/arch/mips/include/elf_machdep.h:1.10.96.6 --- src/sys/arch/mips/include/elf_machdep.h:1.10.96.5 Sun Aug 23 03:40:14 2009 +++ src/sys/arch/mips/include/elf_machdep.h Sat Sep 5 03:15:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.10.96.5 2009/08/23 03:40:14 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.10.96.6 2009/09/05 03:15:08 matt Exp $ */ #ifndef _MIPS_ELF_MACHDEP_H_ #define _MIPS_ELF_MACHDEP_H_ @@ -142,16 +142,16 @@ #define EF_MIPS_ARCH_MDMX 0x0800 /* MDMX multimedia extension */ #define EF_MIPS_ARCH_M16 0x0400 /* MIPS-16 ISA extensions */ -#define EF_MIPS_ARCH 0x0f00 /* Architecture field */ +#define EF_MIPS_ARCH 0xf000 /* Architecture field */ #define EF_MIPS_ARCH_1 0x /* -mips1 code */ -#define EF_MIPS_ARCH_2 0x0100 /* -mips2 code */ -#define EF_MIPS_ARCH_3 0x0200 /* -mips3 code */ -#define EF_MIPS_ARCH_4 0x0300 /* -mips4 code */ -#define EF_MIPS_ARCH_5 0x0400 /* -mips5 code */ -#define EF_MIPS_ARCH_32 0x0500 /* -mips32 code */ -#define EF_MIPS_ARCH_64 0x0600 /* -mips64 code */ -#define EF_MIPS_ARCH_32R2 0x0700 /* -mips32r2 code */ -#define EF_MIPS_ARCH_64R4 0x0800 /* -mips64r2 code */ +#define EF_MIPS_ARCH_2 0x1000 /* -mips2 code */ +#define EF_MIPS_ARCH_3 0x2000 /* -mips3 code */ +#define EF_MIPS_ARCH_4 0x3000 /* -mips4 code */ +#define EF_MIPS_ARCH_5 0x4000 /* -mips5 code */ +#define EF_MIPS_ARCH_32 0x5000 /* -mips32 code */ +#define EF_MIPS_ARCH_64 0x6000 /* -mips64 code */ +#define EF_MIPS_ARCH_32R2 0x7000 /* -mips32r2 code */ +#define EF_MIPS_ARCH_64R4 0x8000 /* -mips64r2 code */ #define EF_MIPS_ABI 0xf000 #define EF_MIPS_ABI_O32 0x1000
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Sep 5 03:13:51 UTC 2009 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: asm.h Log Message: Add REG_LL/REG_SC/REG_ADDU To generate a diff of this commit: cvs rdiff -u -r1.40.38.7 -r1.40.38.8 src/sys/arch/mips/include/asm.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/mips/include/asm.h diff -u src/sys/arch/mips/include/asm.h:1.40.38.7 src/sys/arch/mips/include/asm.h:1.40.38.8 --- src/sys/arch/mips/include/asm.h:1.40.38.7 Thu Sep 3 00:02:53 2009 +++ src/sys/arch/mips/include/asm.h Sat Sep 5 03:13:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.40.38.7 2009/09/03 00:02:53 matt Exp $ */ +/* $NetBSD: asm.h,v 1.40.38.8 2009/09/05 03:13:51 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -500,23 +500,29 @@ #define REG_L lw #define REG_S sw #define REG_LI li +#define REG_ADDU addu #define REG_SLL sll #define REG_SLLV sllv #define REG_SRL srl #define REG_SRLV srlv #define REG_SRA sra #define REG_SRAV srav +#define REG_LL ll +#define REG_SC sc #define REG_SCALESHIFT 2 #else #define REG_L ld #define REG_S sd #define REG_LI dli +#define REG_ADDU daddu #define REG_SLL dsll #define REG_SLLV dsllv #define REG_SRL dsrl #define REG_SRLV dsrlv #define REG_SRA dsra #define REG_SRAV dsrav +#define REG_LL lld +#define REG_SC scd #define REG_SCALESHIFT 3 #endif
CVS commit: [matt-nb5-mips64] src/lib/libc/compat/arch/mips/gen
Module Name:src Committed By: matt Date: Sat Sep 5 03:12:29 UTC 2009 Modified Files: src/lib/libc/compat/arch/mips/gen [matt-nb5-mips64]: compat_sigsetjmp.S Log Message: More LP64 cleanup --> s/la/PTR_LA To generate a diff of this commit: cvs rdiff -u -r1.1.34.1 -r1.1.34.2 \ src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S 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/compat/arch/mips/gen/compat_sigsetjmp.S diff -u src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1.34.1 src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1.34.2 --- src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1.34.1 Tue Aug 18 06:58:54 2009 +++ src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S Sat Sep 5 03:12:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_sigsetjmp.S,v 1.1.34.1 2009/08/18 06:58:54 matt Exp $ */ +/* $NetBSD: compat_sigsetjmp.S,v 1.1.34.2 2009/09/05 03:12:29 matt Exp $ */ /*- * Copyright (c) 1991, 1993, 1995, @@ -42,7 +42,7 @@ #if 0 ASMSTR("from: @(#)setjmp.s 8.1 (Berkeley) 6/4/93") #else - ASMSTR("$NetBSD: compat_sigsetjmp.S,v 1.1.34.1 2009/08/18 06:58:54 matt Exp $") + ASMSTR("$NetBSD: compat_sigsetjmp.S,v 1.1.34.2 2009/09/05 03:12:29 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -63,10 +63,10 @@ SETUP_GP64(t0, sigsetjmp) INT_S a1, _OFFSETOF_SC_MASK13(a0) # save "savemask" bne a1, 0x0, 1f # do saving of signal mask? - la t9, _C_LABEL(_setjmp) + PTR_LA t9, _C_LABEL(_setjmp) jr t9 -1: la t9, _C_LABEL(setjmp) +1: PTR_LA t9, _C_LABEL(setjmp) jr t9 END(sigsetjmp) @@ -75,9 +75,9 @@ SETUP_GP64(t0, siglongjmp) INT_L t1, _OFFSETOF_SC_MASK13(a0) # get "savemask" bne t1, 0x0, 1f # restore signal mask? - la t9, _C_LABEL(_longjmp) + PTR_LA t9, _C_LABEL(_longjmp) jr t9 -1: la t9, _C_LABEL(longjmp) +1: PTR_LA t9, _C_LABEL(longjmp) jr t9 END(siglongjmp)
CVS commit: [matt-nb5-mips64] src/lib/libc/gen
Module Name:src Committed By: matt Date: Sat Sep 5 03:11:43 UTC 2009 Modified Files: src/lib/libc/gen [matt-nb5-mips64]: getpagesize.c Log Message: Add a DIAGASSERT for the returned pagesize being non-zero. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.46.1 src/lib/libc/gen/getpagesize.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/gen/getpagesize.c diff -u src/lib/libc/gen/getpagesize.c:1.9 src/lib/libc/gen/getpagesize.c:1.9.46.1 --- src/lib/libc/gen/getpagesize.c:1.9 Thu Aug 7 16:42:50 2003 +++ src/lib/libc/gen/getpagesize.c Sat Sep 5 03:11:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getpagesize.c,v 1.9 2003/08/07 16:42:50 agc Exp $ */ +/* $NetBSD: getpagesize.c,v 1.9.46.1 2009/09/05 03:11:43 matt Exp $ */ /* * Copyright (c) 1989, 1993 @@ -34,13 +34,14 @@ #if 0 static char sccsid[] = "@(#)getpagesize.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: getpagesize.c,v 1.9 2003/08/07 16:42:50 agc Exp $"); +__RCSID("$NetBSD: getpagesize.c,v 1.9.46.1 2009/09/05 03:11:43 matt Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include #include +#include #include #ifdef __weak_alias @@ -61,6 +62,7 @@ size = sizeof pagsz; if (sysctl(mib, 2, &pagsz, &size, NULL, 0) == -1) return (-1); + _DIAGASSERT(pagsz); } return (pagsz); }
CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/bfd
Module Name:src Committed By: matt Date: Sat Sep 5 03:10:39 UTC 2009 Modified Files: src/gnu/dist/binutils/bfd [matt-nb5-mips64]: elfxx-mips.c Log Message: Fix BFD to understand that R_MIPS_GPREL32 with R_MIPS_64 will not require text section modifications and thus you don't have to set the shared image as being DT_TEXTREL. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.1.1.3.32.1 src/gnu/dist/binutils/bfd/elfxx-mips.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/binutils/bfd/elfxx-mips.c diff -u src/gnu/dist/binutils/bfd/elfxx-mips.c:1.1.1.3 src/gnu/dist/binutils/bfd/elfxx-mips.c:1.1.1.3.32.1 --- src/gnu/dist/binutils/bfd/elfxx-mips.c:1.1.1.3 Thu Feb 2 20:47:51 2006 +++ src/gnu/dist/binutils/bfd/elfxx-mips.c Sat Sep 5 03:10:39 2009 @@ -6135,11 +6135,25 @@ relocs. We make room for this reloc in the .rel.dyn reloc section. */ mips_elf_allocate_dynamic_relocations (dynobj, 1); - if ((sec->flags & MIPS_READONLY_SECTION) - == MIPS_READONLY_SECTION) - /* We tell the dynamic linker that there are - relocations against the text segment. */ - info->flags |= DF_TEXTREL; + /* In the N32 and 64-bit ABIs there may be multiple + consecutive relocations for the same offset. If we have + a R_MIPS_GPREL32 followed by a R_MIPS_64 then that + relocation is complete and needs no futher adjustment. */ + if ((rel == relocs + || rel[-1].r_offset != rel->r_offset + || r_type != R_MIPS_64 + || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32) + && (sec->flags & MIPS_READONLY_SECTION) + == MIPS_READONLY_SECTION) + { + /* We tell the dynamic linker that there are + relocations against the text segment. */ + info->flags |= DF_TEXTREL; + info->callbacks->warning + (info, + _("relocation emitted against readonly section"), + NULL, abfd, sec, rel->r_offset); + } } else {
CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/mips/atomic
Module Name:src Committed By: matt Date: Sat Sep 5 03:07:07 UTC 2009 Added Files: src/common/lib/libc/arch/mips/atomic [matt-nb5-mips64]: atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S atomic_inc.S atomic_or.S atomic_swap.S Log Message: Add native ll/sc or lld/scd versions of the atomic ops. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/common/lib/libc/arch/mips/atomic/atomic_add.S \ src/common/lib/libc/arch/mips/atomic/atomic_and.S \ src/common/lib/libc/arch/mips/atomic/atomic_cas.S \ src/common/lib/libc/arch/mips/atomic/atomic_dec.S \ src/common/lib/libc/arch/mips/atomic/atomic_inc.S \ src/common/lib/libc/arch/mips/atomic/atomic_or.S \ src/common/lib/libc/arch/mips/atomic/atomic_swap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/common/lib/libc/arch/mips/atomic/atomic_add.S diff -u /dev/null src/common/lib/libc/arch/mips/atomic/atomic_add.S:1.1.2.1 --- /dev/null Sat Sep 5 03:07:07 2009 +++ src/common/lib/libc/arch/mips/atomic/atomic_add.S Sat Sep 5 03:07:07 2009 @@ -0,0 +1,111 @@ +/* $NetBSD: atomic_add.S,v 1.1.2.1 2009/09/05 03:07:07 matt Exp $ */ + +/*- + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * 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 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. + */ + +#include +#include +#include "atomic_op_asm.h" + +RCSID("$NetBSD: atomic_add.S,v 1.1.2.1 2009/09/05 03:07:07 matt Exp $") + + .text + .set noat + .set noreorder + .set nomacro + +LEAF(_atomic_add_32) +1: INT_LL t0, 0(a0) + nop + INT_ADDU t0, a1 + INT_SC t0, 0(a0) + beq t0, zero, 1b + nop + j ra + nop +END(_atomic_add_32) +ATOMIC_OP_ALIAS(atomic_add_32, _atomic_add_32) + +LEAF(_atomic_add_32_nv) +1: INT_LL v0, 0(a0) + nop + INT_ADDU v0, a1 + move t0, v0 + INT_SC t0, 0(a0) + beq t0, zero, 1b + nop + j ra + nop +END(_atomic_add_32_nv) +ATOMIC_OP_ALIAS(atomic_add_32_nv, _atomic_add_32_nv) + +#if !defined(__mips_o32) +LEAF(_atomic_add_64) +1: REG_LL t0, 0(a0) + nop + REG_ADDU t0, a1 + REG_SC t0, 0(a0) + beq t0, zero, 1b + nop + j ra + nop +END(_atomic_add_64) +ATOMIC_OP_ALIAS(atomic_add_64, _atomic_add_64) + +LEAF(_atomic_add_64_nv) +1: REG_LL v0, 0(a0) + nop + REG_ADDU v0, a1 + move t0, v0 + REG_SC t0, 0(a0) + beq t0, zero, 1b + nop + j ra + nop +END(_atomic_add_64_nv) +ATOMIC_OP_ALIAS(atomic_add_64_nv, _atomic_add_64_nv) +#endif + +#ifdef _LP64 +STRONG_ALIAS(_atomic_add_long, _atomic_add_64) +STRONG_ALIAS(_atomic_add_long_nv, _atomic_add_64_nv) +STRONG_ALIAS(_atomic_add_ptr, _atomic_add_64) +STRONG_ALIAS(_atomic_add_ptr_nv, _atomic_add_64_nv) +#else +STRONG_ALIAS(_atomic_add_long, _atomic_add_32) +STRONG_ALIAS(_atomic_add_long_nv, _atomic_add_32_nv) +STRONG_ALIAS(_atomic_add_ptr, _atomic_add_32) +STRONG_ALIAS(_atomic_add_ptr_nv, _atomic_add_32_nv) +#endif +STRONG_ALIAS(_atomic_add_int, _atomic_add_32) +STRONG_ALIAS(_atomic_add_int_nv, _atomic_add_32_nv) + +ATOMIC_OP_ALIAS(atomic_add_int, _atomic_add_int) +ATOMIC_OP_ALIAS(atomic_add_int_nv, _atomic_add_int_nv) +ATOMIC_OP_ALIAS(atomic_add_ptr, _atomic_add_ptr) +ATOMIC_OP_ALIAS(atomic_add_ptr_nv, _atomic_add_ptr_nv) +ATOMIC_OP_ALIAS(atomic_add_long, _atomic_add_long) +ATOMIC_OP_ALIAS(atomic_add_long_nv, _atomic_add_long_nv) Index: src/common/lib/libc/arch/mips/atomic/atomic_and.S diff -u /dev/null src/common/lib/libc/arch/mips/atomic/atomic_and.S:1.1.2.1 --- /dev/null Sat Sep 5 03:07:07 2009 +++ src/common/lib/libc/arch/mips/atomic/atomic_and.S Sat Sep 5 03:07:07 2009 @@ -0,0 +1,105 @@ +/* $NetBSD: atomic_and.S,v 1.1.2.1 2009/09/05 03:07:07 matt Exp $ */ + +/*- + * Copyright (c)
CVS commit: [matt-nb5-mips64] src/common/lib/libc/atomic
Module Name:src Committed By: matt Date: Sat Sep 5 03:06:11 UTC 2009 Modified Files: src/common/lib/libc/atomic [matt-nb5-mips64]: atomic_init_testset.c Log Message: Don't cast a ptr to uint32_t, use uintptr_t instead. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.10.1 \ src/common/lib/libc/atomic/atomic_init_testset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/atomic/atomic_init_testset.c diff -u src/common/lib/libc/atomic/atomic_init_testset.c:1.5 src/common/lib/libc/atomic/atomic_init_testset.c:1.5.10.1 --- src/common/lib/libc/atomic/atomic_init_testset.c:1.5 Tue Apr 29 20:57:50 2008 +++ src/common/lib/libc/atomic/atomic_init_testset.c Sat Sep 5 03:06:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_init_testset.c,v 1.5 2008/04/29 20:57:50 scw Exp $ */ +/* $NetBSD: atomic_init_testset.c,v 1.5.10.1 2009/09/05 03:06:11 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: atomic_init_testset.c,v 1.5 2008/04/29 20:57:50 scw Exp $"); +__RCSID("$NetBSD: atomic_init_testset.c,v 1.5.10.1 2009/09/05 03:06:11 matt Exp $"); #include "atomic_op_namespace.h" @@ -85,7 +85,7 @@ __cpu_simple_lock_t *lock; uint32_t ret; - lock = &atomic_locks[((uint32_t)ptr >> 3) & 127]; + lock = &atomic_locks[((uintptr_t)ptr >> 3) & 127]; __cpu_simple_lock(lock); ret = *ptr; if (__predict_true(ret == old)) {
CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:04:58 UTC 2009 Modified Files: src/lib/libc/arch/mips [matt-nb5-mips64]: SYS.h src/lib/libc/arch/mips/sys [matt-nb5-mips64]: brk.S cerror.S sbrk.S Log Message: LP64 cleanup --> s/la/PTR_LA/ To generate a diff of this commit: cvs rdiff -u -r1.18.46.2 -r1.18.46.3 src/lib/libc/arch/mips/SYS.h cvs rdiff -u -r1.16.46.2 -r1.16.46.3 src/lib/libc/arch/mips/sys/brk.S cvs rdiff -u -r1.13.46.3 -r1.13.46.4 src/lib/libc/arch/mips/sys/cerror.S cvs rdiff -u -r1.16.34.2 -r1.16.34.3 src/lib/libc/arch/mips/sys/sbrk.S 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/arch/mips/SYS.h diff -u src/lib/libc/arch/mips/SYS.h:1.18.46.2 src/lib/libc/arch/mips/SYS.h:1.18.46.3 --- src/lib/libc/arch/mips/SYS.h:1.18.46.2 Tue Aug 18 06:44:26 2009 +++ src/lib/libc/arch/mips/SYS.h Sat Sep 5 03:04:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.18.46.2 2009/08/18 06:44:26 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.18.46.3 2009/09/05 03:04:58 matt Exp $ */ /*- * Copyright (c) 1996 Jonathan Stone @@ -80,11 +80,11 @@ .abicalls # if defined(__mips_o32) || defined(__mips_o64) # define PIC_PROLOGUE(x) SETUP_GP -# define PIC_TAILCALL(l) la t9, _C_LABEL(l); jr t9 +# define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); jr t9 # define PIC_RETURN() j ra # else # define PIC_PROLOGUE(x) SETUP_GP64(t3, x) -# define PIC_TAILCALL(l) la t9, _C_LABEL(l); RESTORE_GP64; jr t9 +# define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); RESTORE_GP64; jr t9 # define PIC_RETURN() RESTORE_GP64; j ra # endif #else Index: src/lib/libc/arch/mips/sys/brk.S diff -u src/lib/libc/arch/mips/sys/brk.S:1.16.46.2 src/lib/libc/arch/mips/sys/brk.S:1.16.46.3 --- src/lib/libc/arch/mips/sys/brk.S:1.16.46.2 Tue Aug 18 06:56:52 2009 +++ src/lib/libc/arch/mips/sys/brk.S Sat Sep 5 03:04:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.16.46.2 2009/08/18 06:56:52 matt Exp $ */ +/* $NetBSD: brk.S,v 1.16.46.3 2009/09/05 03:04:58 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)brk.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: brk.S,v 1.16.46.2 2009/08/18 06:56:52 matt Exp $") + RCSID("$NetBSD: brk.S,v 1.16.46.3 2009/09/05 03:04:58 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -57,7 +57,7 @@ LEAF(_brk) PIC_PROLOGUE(_brk) - la t0, _C_LABEL(__minbrk) + PTR_LA t0, _C_LABEL(__minbrk) PTR_L v0, 0(t0) bgeu a0, v0, 1f move a0, v0 # dont allow break < minbrk Index: src/lib/libc/arch/mips/sys/cerror.S diff -u src/lib/libc/arch/mips/sys/cerror.S:1.13.46.3 src/lib/libc/arch/mips/sys/cerror.S:1.13.46.4 --- src/lib/libc/arch/mips/sys/cerror.S:1.13.46.3 Mon Aug 24 05:25:25 2009 +++ src/lib/libc/arch/mips/sys/cerror.S Sat Sep 5 03:04:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $ */ +/* $NetBSD: cerror.S,v 1.13.46.4 2009/09/05 03:04:58 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)cerror.s 8.1 (Berkeley) 6/16/93") #else - RCSID("$NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $") + RCSID("$NetBSD: cerror.S,v 1.13.46.4 2009/09/05 03:04:58 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -53,7 +53,7 @@ SAVE_GP(CALLFRAME_GP) - la t9, _C_LABEL(__errno) # locate address of errno + PTR_LA t9, _C_LABEL(__errno) # locate address of errno jalr t9 INT_L t0, CALLFRAME_S0(sp) Index: src/lib/libc/arch/mips/sys/sbrk.S diff -u src/lib/libc/arch/mips/sys/sbrk.S:1.16.34.2 src/lib/libc/arch/mips/sys/sbrk.S:1.16.34.3 --- src/lib/libc/arch/mips/sys/sbrk.S:1.16.34.2 Tue Aug 18 06:56:52 2009 +++ src/lib/libc/arch/mips/sys/sbrk.S Sat Sep 5 03:04:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.16.34.2 2009/08/18 06:56:52 matt Exp $ */ +/* $NetBSD: sbrk.S,v 1.16.34.3 2009/09/05 03:04:58 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)sbrk.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: sbrk.S,v 1.16.34.2 2009/08/18 06:56:52 matt Exp $") + RCSID("$NetBSD: sbrk.S,v 1.16.34.3 2009/09/05 03:04:58 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -56,7 +56,7 @@ LEAF(_sbrk) PIC_PROLOGUE(_sbrk) - la t0, _C_LABEL(__curbrk) + PTR_LA t0, _C_LABEL(__curbrk) PTR_L v1, 0(t0) PTR_ADDU a0, a0, v1 # compute current break SYSTRAP(break)
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Sep 5 03:03:44 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_exec.c Log Message: Fix a few C&P bugs To generate a diff of this commit: cvs rdiff -u -r1.50.54.1.4.7 -r1.50.54.1.4.8 \ src/sys/arch/mips/mips/cpu_exec.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/cpu_exec.c diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.7 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.8 --- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.7 Thu Sep 3 00:08:19 2009 +++ src/sys/arch/mips/mips/cpu_exec.c Sat Sep 5 03:03:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_exec.c,v 1.50.54.1.4.7 2009/09/03 00:08:19 matt Exp $ */ +/* $NetBSD: cpu_exec.c,v 1.50.54.1.4.8 2009/09/05 03:03:44 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.7 2009/09/03 00:08:19 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.8 2009/09/05 03:03:44 matt Exp $"); #include "opt_compat_netbsd.h" #include "opt_compat_ultrix.h" @@ -329,11 +329,11 @@ return ENOEXEC; break; case EF_MIPS_ARCH_3: - if (cpu_arch < CPU_ARCH_MIPS4) + if (cpu_arch < CPU_ARCH_MIPS3) return ENOEXEC; break; case EF_MIPS_ARCH_4: - if (cpu_arch < CPU_ARCH_MIPS3) + if (cpu_arch < CPU_ARCH_MIPS4) return ENOEXEC; break; case EF_MIPS_ARCH_5: @@ -421,11 +421,11 @@ return ENOEXEC; break; case EF_MIPS_ARCH_3: - if (cpu_arch < CPU_ARCH_MIPS4) + if (cpu_arch < CPU_ARCH_MIPS3) return ENOEXEC; break; case EF_MIPS_ARCH_4: - if (cpu_arch < CPU_ARCH_MIPS3) + if (cpu_arch < CPU_ARCH_MIPS4) return ENOEXEC; break; case EF_MIPS_ARCH_5: @@ -440,7 +440,7 @@ break; } - switch (eh->e_flags & EF_MIPS_ARCH) { + switch (eh->e_flags & (EF_MIPS_ABI|EF_MIPS_ABI2)) { case 0: p->p_md.md_abi = _MIPS_BSD_API_N64; if (old_abi != p->p_md.md_abi)
CVS commit: [matt-nb5-mips64] src/regress/lib/csu/initfini/arch/mips
Module Name:src Committed By: matt Date: Sat Sep 5 02:59:59 UTC 2009 Modified Files: src/regress/lib/csu/initfini/arch/mips [matt-nb5-mips64]: initfini_asm.S Log Message: Teach this about N32/N64 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.48.1 \ src/regress/lib/csu/initfini/arch/mips/initfini_asm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/lib/csu/initfini/arch/mips/initfini_asm.S diff -u src/regress/lib/csu/initfini/arch/mips/initfini_asm.S:1.3 src/regress/lib/csu/initfini/arch/mips/initfini_asm.S:1.3.48.1 --- src/regress/lib/csu/initfini/arch/mips/initfini_asm.S:1.3 Thu Aug 16 04:06:35 2001 +++ src/regress/lib/csu/initfini/arch/mips/initfini_asm.S Sat Sep 5 02:59:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: initfini_asm.S,v 1.3 2001/08/16 04:06:35 mhitch Exp $ */ +/* $NetBSD: initfini_asm.S,v 1.3.48.1 2009/09/05 02:59:59 matt Exp $ */ /* * This file placed in the public domain. @@ -7,24 +7,42 @@ #include - .abicalls - +#if defined(__mips_o32) || defined(__mips_o64) .section .init, "ax", @progbits .set noreorder - la t9, 1f + PTR_LA t9, 1f 1: .cpload t9 .set reorder .cprestore - la t9, i_am_init + PTR_LA t9, i_am_init jal t9 .previous .section .fini, "ax", @progbits .set noreorder - la t9, 2f + PTR_LA t9, 2f 2: .cpload t9 .set reorder .cprestore - la t9, i_am_fini + PTR_LA t9, i_am_fini + jal t9 + .previous +#else + /* + * In N32/N64, gp is preserved across function calls. + */ + .section .init, "ax", @progbits + .set noreorder + PTR_LA t9, i_am_init jal t9 + nop .previous + + .section .fini, "ax", @progbits + .set noreorder + PTR_LA t9, i_am_fini + jal t9 + nop + .previous +#endif +
CVS commit: [matt-nb5-mips64] src/tools/host-mkdep
Module Name:src Committed By: matt Date: Sat Sep 5 02:02:51 UTC 2009 Modified Files: src/tools/host-mkdep [matt-nb5-mips64]: Makefile Log Message: Make sure CFLAGS and LDFLAGS come HOST_CFLAGS and HOST_LDFLAGS. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.8.1 src/tools/host-mkdep/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/host-mkdep/Makefile diff -u src/tools/host-mkdep/Makefile:1.10 src/tools/host-mkdep/Makefile:1.10.8.1 --- src/tools/host-mkdep/Makefile:1.10 Sun Oct 19 22:05:23 2008 +++ src/tools/host-mkdep/Makefile Sat Sep 5 02:02:51 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2008/10/19 22:05:23 apb Exp $ +# $NetBSD: Makefile,v 1.10.8.1 2009/09/05 02:02:51 matt Exp $ TIMESTAMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep @@ -13,7 +13,7 @@ realall: host-mkdep host-mkdep: configure host-mkdep.in -rm -f $@ - CC=${HOST_CC:Q} ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache + CC=${HOST_CC:Q} LDFLAGS=${HOST_LDFLAGS:Q} CFLAGS=${HOST_CFLAGS:Q} ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache chmod +x $@ # This is the only program that comes before binstall.
CVS commit: src
Module Name:src Committed By: apb Date: Fri Sep 4 23:29:03 UTC 2009 Modified Files: src/lib/libc/sys: reboot.2 src/share/man/man8: boot.8 src/share/man/man8/man8.acorn26: boot26.8 src/share/man/man8/man8.acorn32: boot32.8 src/share/man/man8/man8.i386: boot.8 src/share/man/man9: cpu_reboot.9 ipkdb.9 kprintf.9 Log Message: Add cross references to new reboot(9) man page. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/reboot.2 cvs rdiff -u -r1.11 -r1.12 src/share/man/man8/boot.8 cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/man8.acorn26/boot26.8 cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/man8.acorn32/boot32.8 cvs rdiff -u -r1.51 -r1.52 src/share/man/man8/man8.i386/boot.8 cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/cpu_reboot.9 cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/ipkdb.9 cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/kprintf.9 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/sys/reboot.2 diff -u src/lib/libc/sys/reboot.2:1.26 src/lib/libc/sys/reboot.2:1.27 --- src/lib/libc/sys/reboot.2:1.26 Thu Nov 6 16:23:56 2008 +++ src/lib/libc/sys/reboot.2 Fri Sep 4 23:29:02 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: reboot.2,v 1.26 2008/11/06 16:23:56 tsutsui Exp $ +.\" $NetBSD: reboot.2,v 1.27 2009/09/04 23:29:02 apb Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93 .\" -.Dd September 11, 2008 +.Dd September 4, 2009 .Dt REBOOT 2 .Os .Sh NAME @@ -55,6 +55,11 @@ .Aq Pa sys/reboot.h , to be passed to the new kernel or the new bootstrap and init programs. +In addition to the options described below, other options +described in +.Xr boothowto 9 +may be set, but such options may be ignored by the system. +.Pp Options can be combined together by OR'ing them, eg. .Dv RB_DUMP | .Dv RB_NOSYNC @@ -166,7 +171,8 @@ .Xr halt 8 , .Xr init 8 , .Xr reboot 8 , -.Xr savecore 8 +.Xr savecore 8 , +.Xr boothowto 9 .Sh HISTORY The .Fn reboot Index: src/share/man/man8/boot.8 diff -u src/share/man/man8/boot.8:1.11 src/share/man/man8/boot.8:1.12 --- src/share/man/man8/boot.8:1.11 Wed Mar 11 19:01:29 2009 +++ src/share/man/man8/boot.8 Fri Sep 4 23:29:02 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot.8,v 1.11 2009/03/11 19:01:29 joerg Exp $ +.\" $NetBSD: boot.8,v 1.12 2009/09/04 23:29:02 apb Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94 .\" -.Dd October 30, 2008 +.Dd September 4, 2009 .Dt BOOT 8 .Os .Sh NAME @@ -53,12 +53,8 @@ boot protocol, options are passed from the boot loader to the kernel via flag bits in the .Va boothowto -variable, which is interpreted by the kernel in much the same way -as the -.Va howto -argument passed to the -.Xr reboot 2 -system call. +variable (see +.Xr boothowto 9 ) . .Ss Interactive mode In interactive mode, the boot loader will present a prompt, allowing input of these commands: @@ -278,7 +274,8 @@ .Xr installboot 8 , .Xr reboot 8 , .Xr rescue 8 , -.Xr shutdown 8 +.Xr shutdown 8 , +.Xr boothowto 9 .Sh BUGS The kernel file name must be specified before, not after, the boot options. Any Index: src/share/man/man8/man8.acorn26/boot26.8 diff -u src/share/man/man8/man8.acorn26/boot26.8:1.4 src/share/man/man8/man8.acorn26/boot26.8:1.5 --- src/share/man/man8/man8.acorn26/boot26.8:1.4 Sat Jul 26 20:17:38 2003 +++ src/share/man/man8/man8.acorn26/boot26.8 Fri Sep 4 23:29:03 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot26.8,v 1.4 2003/07/26 20:17:38 salo Exp $ +.\" $NetBSD: boot26.8,v 1.5 2009/09/04 23:29:03 apb Exp $ .\" .\" Copyright (c) 2000, 2001 Ben Harris .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 4, 2001 +.Dd September 4, 2009 .Dt BOOT26 8 acorn26 .Os .Sh NAME @@ -50,7 +50,8 @@ .Pp It takes the following options, which set flags in the .Va boothowto -variable in the booted kernel: +variable in the booted kernel (see +.Xr boothowto 9 ) : .Bl -tag -width Fl .It Fl a .Pq Dv RB_ASKNAME @@ -163,7 +164,8 @@ .Xr reboot 2 , .Xr ddb 4 , .Xr userconf 4 , -.Xr init 8 +.Xr init 8 , +.Xr boothowto 9 .Sh HISTORY .Nm was introduced in Index: src/share/man/man8/man8.acorn32/boot32.8 diff -u src/share/man/man8/man8.acorn32/boot32.8:1.2 src/share/man/man8/man8.acorn32/boot32.8:1.3 --- src/share/man/man8/man8.acorn32/boot32.8:1.2 Mon Feb 23 19:39:48 2004 +++ src/share/man/man8/man8.acorn32/boot32.8 Fri Sep 4 23:29:03 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot32.8,v 1.2 2004/02/23 19:39:48 wiz Exp $ +.\" $NetBSD: boot32.8,v 1.3 2009/09/04 23:29:03 apb Exp $ .\" .\" Co
CVS commit: src
Module Name:src Committed By: apb Date: Fri Sep 4 23:23:05 UTC 2009 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile Added Files: src/share/man/man9: boothowto.9 Log Message: Add a boothowto(9) man page, and link it to BOOT_FLAGS(9). To generate a diff of this commit: cvs rdiff -u -r1.1300 -r1.1301 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.288 -r1.289 src/share/man/man9/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man9/boothowto.9 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1300 src/distrib/sets/lists/comp/mi:1.1301 --- src/distrib/sets/lists/comp/mi:1.1300 Fri Sep 4 17:21:34 2009 +++ src/distrib/sets/lists/comp/mi Fri Sep 4 23:23:05 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1300 2009/09/04 17:21:34 pooka Exp $ +# $NetBSD: mi,v 1.1301 2009/09/04 23:23:05 apb Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -19055,6 +19055,7 @@ ./usr/share/man/man8/cvsbug.8 comp-cvs-man cvs,.man ./usr/share/man/man8/genassym.8 comp-obsolete obsolete ./usr/share/man/man8/kgmon.8 comp-sysutil-man .man +./usr/share/man/man9/BOOT_FLAGS.9 comp-sys-man .man ./usr/share/man/man9/CALLOUT_INITIALIZER.9 comp-obsolete obsolete ./usr/share/man/man9/CALLOUT_INITIALIZER_SETFUNC.9 comp-obsolete obsolete ./usr/share/man/man9/CARDBUS_PRODUCT.9 comp-sys-man .man @@ -19233,6 +19234,7 @@ ./usr/share/man/man9/biowait.9 comp-sys-man .man ./usr/share/man/man9/bitmask_snprintf.9 comp-obsolete obsolete ./usr/share/man/man9/bluetooth.9 comp-sys-man .man +./usr/share/man/man9/boothowto.9 comp-sys-man .man ./usr/share/man/man9/boottime.9 comp-sys-man .man ./usr/share/man/man9/bounds_check_with_label.9 comp-sys-man .man ./usr/share/man/man9/bread.9 comp-sys-man .man Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.288 src/share/man/man9/Makefile:1.289 --- src/share/man/man9/Makefile:1.288 Mon Aug 3 23:15:29 2009 +++ src/share/man/man9/Makefile Fri Sep 4 23:23:04 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.288 2009/08/03 23:15:29 rmind Exp $ +# $NetBSD: Makefile,v 1.289 2009/09/04 23:23:04 apb Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -57,6 +57,9 @@ wdc.9 workqueue.9 \ wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9 +MAN+= boothowto.9 +MLINKS+=boothowto.9 BOOT_FLAGS.9 + MAN+= dmover.9 MLINKS+=dmover.9 dmover_backend_register.9 \ dmover.9 dmover_backend_unregister.9 \ Added files: Index: src/share/man/man9/boothowto.9 diff -u /dev/null src/share/man/man9/boothowto.9:1.1 --- /dev/null Fri Sep 4 23:23:05 2009 +++ src/share/man/man9/boothowto.9 Fri Sep 4 23:23:05 2009 @@ -0,0 +1,276 @@ +.\" $NetBSD: boothowto.9,v 1.1 2009/09/04 23:23:05 apb Exp $ +.\" +.\" Copyright (c) 2009 The NetBSD Foundation, Inc. +.\" 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 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. +.\" +.Dd September 4, 2009 +.Dt BOOTHOWTO 9 +.Os +.Sh NAME +.Nm boothowto , +.Nm BOOT_FLAG +.Nd flags passed to kernel during boot or shutdown +.Sh SYNOPSIS +.In sys/reboot.h +.In sys/systm.h +.Vt extern int boothowto +.In sys/boot_flag.h +.Vt #define BOOT_FLAG(arg, retval) ... +.Sh DESCRIPTION +The +.Va boothowto +variable contains flags passed to the kernel by the boot loader (see +.Xr boot 8 ) , +or the +.Xr reboot 2 +system call. +The value is interpreted as a bit mask, with bits defined by the +.Dq Sy RB_ Ns No * +and +.Dq Sy AB_ Ns No * +symbols in +.In sys/reboot.h . +.Pp +The +.Sy BOO
CVS commit: src/share/mk
Module Name:src Committed By: macallan Date: Fri Sep 4 20:19:04 UTC 2009 Modified Files: src/share/mk: bsd.own.mk Log Message: add sunleo To generate a diff of this commit: cvs rdiff -u -r1.570 -r1.571 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.570 src/share/mk/bsd.own.mk:1.571 --- src/share/mk/bsd.own.mk:1.570 Sun Aug 30 01:49:42 2009 +++ src/share/mk/bsd.own.mk Fri Sep 4 20:19:04 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.570 2009/08/30 01:49:42 dyoung Exp $ +# $NetBSD: bsd.own.mk,v 1.571 2009/09/04 20:19:04 macallan Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -890,8 +890,8 @@ .for _v in \ ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \ intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \ - rendition s3 s3virge savage siliconmotion sis sunffb suncg6 suntcx \ - tdfx tga trident tseng vesa vga via vmware wsfb + rendition s3 s3virge savage siliconmotion sis sunffb suncg6 sunleo \ + suntcx tdfx tga trident tseng vesa vga via vmware wsfb X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist .endfor
CVS commit: xsrc/external/mit/xf86-video-sunleo
Module Name:xsrc Committed By: macallan Date: Fri Sep 4 20:12:48 UTC 2009 Update of /cvsroot/xsrc/external/mit/xf86-video-sunleo In directory ivanova.netbsd.org:/tmp/cvs-serv24061 Log Message: the sunleo driver from Xorg Status: Vendor Tag: xorg Release Tags: xf86-video-sunleo-1-2-0 N xsrc/external/mit/xf86-video-sunleo/dist/missing N xsrc/external/mit/xf86-video-sunleo/dist/Makefile.in N xsrc/external/mit/xf86-video-sunleo/dist/COPYING N xsrc/external/mit/xf86-video-sunleo/dist/ChangeLog N xsrc/external/mit/xf86-video-sunleo/dist/configure.ac N xsrc/external/mit/xf86-video-sunleo/dist/Makefile.am N xsrc/external/mit/xf86-video-sunleo/dist/config.guess N xsrc/external/mit/xf86-video-sunleo/dist/config.h.in N xsrc/external/mit/xf86-video-sunleo/dist/install-sh N xsrc/external/mit/xf86-video-sunleo/dist/aclocal.m4 N xsrc/external/mit/xf86-video-sunleo/dist/ltmain.sh N xsrc/external/mit/xf86-video-sunleo/dist/configure N xsrc/external/mit/xf86-video-sunleo/dist/depcomp N xsrc/external/mit/xf86-video-sunleo/dist/config.sub N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c N xsrc/external/mit/xf86-video-sunleo/dist/src/Makefile.in N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_frectsp.c N xsrc/external/mit/xf86-video-sunleo/dist/src/Makefile.am N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_cursor.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_checks.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_driver.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_regs.h N xsrc/external/mit/xf86-video-sunleo/dist/src/leo.h N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_glyph.c N xsrc/external/mit/xf86-video-sunleo/dist/src/leo_frect.c N xsrc/external/mit/xf86-video-sunleo/dist/man/Makefile.in N xsrc/external/mit/xf86-video-sunleo/dist/man/Makefile.am N xsrc/external/mit/xf86-video-sunleo/dist/man/sunleo.man No conflicts created by this import
CVS commit: src/doc
Module Name:src Committed By: jmcneill Date: Fri Sep 4 19:37:17 UTC 2009 Modified Files: src/doc: 3RDPARTY Log Message: ACPI CA 20090903 is out. To generate a diff of this commit: cvs rdiff -u -r1.716 -r1.717 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.716 src/doc/3RDPARTY:1.717 --- src/doc/3RDPARTY:1.716 Mon Aug 31 19:06:25 2009 +++ src/doc/3RDPARTY Fri Sep 4 19:37:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.716 2009/08/31 19:06:25 tron Exp $ +# $NetBSD: 3RDPARTY,v 1.717 2009/09/04 19:37:16 jmcneill Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -26,7 +26,7 @@ Package: acpica Version: 20090730 -Current Vers: 20090730 +Current Vers: 20090903 Maintainer: INTEL Archive Site: http://www.acpica.org/downloads/unix_source_code.php Home Page: http://www.acpica.org/
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Fri Sep 4 18:40:19 UTC 2009 Modified Files: src/sys/dev/ic: esiopvar.h siopreg.h siopvar.h siopvar_common.h Log Message: u_intNN_t -> uintNN_t To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/esiopvar.h cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/siopreg.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/siopvar.h cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/siopvar_common.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/ic/esiopvar.h diff -u src/sys/dev/ic/esiopvar.h:1.18 src/sys/dev/ic/esiopvar.h:1.19 --- src/sys/dev/ic/esiopvar.h:1.18 Fri Sep 4 18:29:52 2009 +++ src/sys/dev/ic/esiopvar.h Fri Sep 4 18:40:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: esiopvar.h,v 1.18 2009/09/04 18:29:52 tsutsui Exp $ */ +/* $NetBSD: esiopvar.h,v 1.19 2009/09/04 18:40:19 tsutsui Exp $ */ /* * Copyright (c) 2002 Manuel Bouyer. @@ -40,10 +40,10 @@ * A_ncmd_slots of this. */ struct esiop_slot { - u_int32_t dsa; /* DSA of the xfer. The first 2 bits holds flags */ + uint32_t dsa; /* DSA of the xfer. The first 2 bits holds flags */ } __packed; -#define CMD_SLOTSIZE (sizeof(struct esiop_slot) / sizeof(u_int32_t)) +#define CMD_SLOTSIZE (sizeof(struct esiop_slot) / sizeof(uint32_t)) /* * xfer description of the script: tables and reselect script @@ -52,8 +52,8 @@ */ struct esiop_xfer { struct siop_common_xfer siop_tables; - u_int32_t tlq; /* target/lun/tag loaded in scratchC by script */ - u_int32_t saved_offset;/* contains scratchA if script saved an offset */ + uint32_t tlq; /* target/lun/tag loaded in scratchC by script */ + uint32_t saved_offset;/* contains scratchA if script saved an offset */ } __packed; #define ESIOP_XFER(cmd, m) (((struct esiop_xfer *)((cmd)->cmd_tables))->m) @@ -85,8 +85,8 @@ /* DSA table descriptor for tags. Free tables are in a list */ struct esiop_dsatbl { TAILQ_ENTRY (esiop_dsatbl) next; - u_int32_t *tbl; /* the table itself */ - u_int32_t tbl_dsa; /* DSA of base of this table */ + uint32_t *tbl; /* the table itself */ + uint32_t tbl_dsa; /* DSA of base of this table */ bus_addr_t tbl_offset; /* offset of this table in the map */ struct esiop_dsatblblk *tblblk; /* pointer back to our block */ }; @@ -101,7 +101,7 @@ TAILQ_HEAD(tblblk_list, esiop_dsatblblk); /* Number of table per block */ -#define ESIOP_NTPB ((PAGE_SIZE) / (sizeof(u_int32_t) * ESIOP_NTAG)) +#define ESIOP_NTPB ((PAGE_SIZE) / (sizeof(uint32_t) * ESIOP_NTAG)) /* per lun struct */ struct esiop_lun { @@ -118,7 +118,7 @@ struct esiop_target { struct siop_common_target target_c; struct esiop_lun *esiop_lun[8]; /* per-lun state */ - u_int32_t lun_table_offset; /* pointer to our DSA table */ + uint32_t lun_table_offset; /* pointer to our DSA table */ }; static __inline void esiop_table_sync(struct esiop_cmd *, int); @@ -139,20 +139,20 @@ /* Driver internal state */ struct esiop_softc { struct siop_common_softc sc_c; - u_int32_t sc_semoffset; /* semaphore */ - u_int32_t sc_shedoffset; /* base of scheduler ring */ + uint32_t sc_semoffset; /* semaphore */ + uint32_t sc_shedoffset; /* base of scheduler ring */ int sc_currschedslot; /* current scheduler slot */ struct cbd_list cmds; /* list of command block descriptors */ struct cmd_list free_list; /* cmd descr free list */ struct tbl_list free_tagtbl; /* list of free tag DSA tables */ struct tblblk_list tag_tblblk; /* tag DSA table blocks */ - u_int32_t sc_flags; - u_int32_t sc_free_offset; /* pointer to free RAM */ - u_int32_t sc_target_table_offset;/* pointer to target DSA table */ + uint32_t sc_flags; + uint32_t sc_free_offset; /* pointer to free RAM */ + uint32_t sc_target_table_offset;/* pointer to target DSA table */ int sc_currdoneslot; /* current done slot */ bus_dmamap_t sc_done_map; /* dma map for done ring (shared) */ bus_addr_t sc_done_offset; /* offset of ring in sc_done_map */ - u_int32_t *sc_done_slot; /* The done ring itself */ + uint32_t *sc_done_slot; /* The done ring itself */ }; /* defs for sc_flags */ Index: src/sys/dev/ic/siopreg.h diff -u src/sys/dev/ic/siopreg.h:1.20 src/sys/dev/ic/siopreg.h:1.21 --- src/sys/dev/ic/siopreg.h:1.20 Wed Jun 11 02:09:16 2008 +++ src/sys/dev/ic/siopreg.h Fri Sep 4 18:40:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siopreg.h,v 1.20 2008/06/11 02:09:16 kiyohara Exp $ */ +/* $NetBSD: siopreg.h,v 1.21 2009/09/04 18:40:19 tsutsui Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -419,89 +419,89 @@ struct nvram_symbios { /* Header (6 bytes) */ - u_int16_t type; /* 0x */ - u_int16_t byte_count; /* excluding header/trailer */ - u_int16_t checksum; + uint16_t type; /* 0x */ + uint16_t byte_count; /* excluding header/trailer */ + uint16_t checksum; /* Adapter configuration (20 bytes) */ - u_int8_t v_major; - u_int8_t v_minor; - u_int32_t boot_crc; - u_int16_t flags; + uint8_
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Fri Sep 4 18:29:53 UTC 2009 Modified Files: src/sys/dev/ic: esiop.c esiopvar.h siop.c siop_common.c siopvar_common.h Log Message: Remove unnecessary whitespace. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/esiop.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/esiopvar.h cvs rdiff -u -r1.92 -r1.93 src/sys/dev/ic/siop.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/siop_common.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/siopvar_common.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/ic/esiop.c diff -u src/sys/dev/ic/esiop.c:1.47 src/sys/dev/ic/esiop.c:1.48 --- src/sys/dev/ic/esiop.c:1.47 Sat May 16 03:57:57 2009 +++ src/sys/dev/ic/esiop.c Fri Sep 4 18:29:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: esiop.c,v 1.47 2009/05/16 03:57:57 tsutsui Exp $ */ +/* $NetBSD: esiop.c,v 1.48 2009/09/04 18:29:52 tsutsui Exp $ */ /* * Copyright (c) 2002 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include -__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.47 2009/05/16 03:57:57 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.48 2009/09/04 18:29:52 tsutsui Exp $"); #include #include @@ -88,7 +88,7 @@ void esiop_unqueue(struct esiop_softc *, int, int); int esiop_handle_qtag_reject(struct esiop_cmd *); static void esiop_start(struct esiop_softc *, struct esiop_cmd *); -void esiop_timeout(void *); +void esiop_timeout(void *); void esiop_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); void esiop_dump_script(struct esiop_softc *); @@ -482,7 +482,7 @@ xs = esiop_cmd->cmd_c.xs; #ifdef DIAGNOSTIC if (esiop_cmd->cmd_c.status != CMDST_ACTIVE) { - printf("esiop_cmd (target %d lun %d) " + printf("esiop_cmd (target %d lun %d) " "not active (%d)\n", target, lun, esiop_cmd->cmd_c.status); goto none; @@ -1132,7 +1132,7 @@ /* * if we got a disconnect between the last data phase * and the status phase, offset will be 0. In this - * case, cmd_tables->saved_offset will have the proper value + * case, cmd_tables->saved_offset will have the proper value * if it got updated by the controller */ if (offset == 0 && @@ -1322,7 +1322,7 @@ void esiop_unqueue(struct esiop_softc *sc, int target, int lun) { - int slot, tag; + int slot, tag; uint32_t slotdsa; struct esiop_cmd *esiop_cmd; struct esiop_lun *esiop_lun = @@ -1455,7 +1455,7 @@ printf("command with tag id %d reset\n", tag); esiop_cmd->cmd_c.xs->error = (esiop_cmd->cmd_c.flags & CMDFL_TIMEOUT) ? - XS_TIMEOUT : XS_RESET; +XS_TIMEOUT : XS_RESET; esiop_cmd->cmd_c.xs->status = SCSI_SIOP_NOCHECK; if (tag >= 0) esiop_lun->tactive[tag] = NULL; Index: src/sys/dev/ic/esiopvar.h diff -u src/sys/dev/ic/esiopvar.h:1.17 src/sys/dev/ic/esiopvar.h:1.18 --- src/sys/dev/ic/esiopvar.h:1.17 Sun Mar 15 15:52:12 2009 +++ src/sys/dev/ic/esiopvar.h Fri Sep 4 18:29:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: esiopvar.h,v 1.17 2009/03/15 15:52:12 cegger Exp $ */ +/* $NetBSD: esiopvar.h,v 1.18 2009/09/04 18:29:52 tsutsui Exp $ */ /* * Copyright (c) 2002 Manuel Bouyer. @@ -151,7 +151,7 @@ u_int32_t sc_target_table_offset;/* pointer to target DSA table */ int sc_currdoneslot; /* current done slot */ bus_dmamap_t sc_done_map; /* dma map for done ring (shared) */ - bus_addr_t sc_done_offset; /* offset of ring in sc_done_map */ + bus_addr_t sc_done_offset; /* offset of ring in sc_done_map */ u_int32_t *sc_done_slot; /* The done ring itself */ }; Index: src/sys/dev/ic/siop.c diff -u src/sys/dev/ic/siop.c:1.92 src/sys/dev/ic/siop.c:1.93 --- src/sys/dev/ic/siop.c:1.92 Sat May 16 03:57:57 2009 +++ src/sys/dev/ic/siop.c Fri Sep 4 18:29:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.92 2009/05/16 03:57:57 tsutsui Exp $ */ +/* $NetBSD: siop.c,v 1.93 2009/09/04 18:29:52 tsutsui Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include -__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.92 2009/05/16 03:57:57 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.93 2009/09/04 18:29:52 tsutsui Exp $"); #include #include @@ -90,7 +90,7 @@ void siop_scsicmd_end(struct siop_cmd *); void siop_unqueue(struct siop_softc *, int, int); static void siop_start(struct siop_softc *, struct siop_cmd *); -void siop_timeout(void *); +void siop_timeout(void *); int siop_scsicmd(struct scsipi_xfer *); void siop_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); @@ -219,7 +219,7 @@ } } else { for (j = 0; j < __arraycount(siop_script); j++) { - sc->sc_c.sc_script[j] = + sc->sc_c.sc_script[j] = siop_htoc32(&sc->sc_c, siop_script[j]); } for (j = 0; j < __arraycount(E_abs_msgin_Used); j++) { @@ -337,7 +337,7 @@ dsa
CVS commit: src/sbin/mount_smbfs
Module Name:src Committed By: pooka Date: Fri Sep 4 18:25:56 UTC 2009 Modified Files: src/sbin/mount_smbfs: Makefile Added Files: src/sbin/mount_smbfs: Makefile.inc Log Message: Provide Makefile.inc which contains source module names and paths. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sbin/mount_smbfs/Makefile cvs rdiff -u -r0 -r1.1 src/sbin/mount_smbfs/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount_smbfs/Makefile diff -u src/sbin/mount_smbfs/Makefile:1.7 src/sbin/mount_smbfs/Makefile:1.8 --- src/sbin/mount_smbfs/Makefile:1.7 Thu Sep 3 12:04:50 2009 +++ src/sbin/mount_smbfs/Makefile Fri Sep 4 18:25:56 2009 @@ -1,23 +1,12 @@ -# $NetBSD: Makefile,v 1.7 2009/09/03 12:04:50 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2009/09/04 18:25:56 pooka Exp $ WARNS?= 3 # XXX: sign-compare issues .include PROG= mount_smbfs -SRCS= mount_smbfs.c -SRCS+= rcfile.c ctx.c cfopt.c subr.c nls.c rap.c mbuf.c rq.c file.c \ - print.c kiconv.c nb.c nb_name.c nb_net.c nbns_rq.c MAN= mount_smbfs.8 - -SMBDIST=${NETBSDSRCDIR}/dist/smbfs - -CPPFLAGS+= -I${SMBDIST}/include - -.PATH: ${SMBDIST}/mount_smbfs ${SMBDIST}/lib/smb - -DPADD+=${LIBUTIL} -LDADD+=-lutil +SRCS= mount_smbfs.c .if ${MKSHARE} != "no" .PATH: ${SMBDIST}/examples @@ -25,10 +14,6 @@ FILES= dot.nsmbrc .endif -.include +.include "Makefile.inc" -.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC) -.for f in ctx mbuf nb_name nbns_rq -COPTS.${f}.c+= -Wno-pointer-sign -.endfor -.endif +.include Added files: Index: src/sbin/mount_smbfs/Makefile.inc diff -u /dev/null src/sbin/mount_smbfs/Makefile.inc:1.1 --- /dev/null Fri Sep 4 18:25:56 2009 +++ src/sbin/mount_smbfs/Makefile.inc Fri Sep 4 18:25:56 2009 @@ -0,0 +1,20 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/09/04 18:25:56 pooka Exp $ +# + +SRCS+= rcfile.c ctx.c cfopt.c subr.c nls.c rap.c mbuf.c rq.c file.c \ + print.c kiconv.c nb.c nb_name.c nb_net.c nbns_rq.c + +SMBDIST=${NETBSDSRCDIR}/dist/smbfs + +CPPFLAGS+= -I${SMBDIST}/include -I${SMBDIST}/mount_smbfs + +.PATH: ${SMBDIST}/mount_smbfs ${SMBDIST}/lib/smb + +DPADD+=${LIBUTIL} +LDADD+=-lutil + +.if ${HAVE_GCC} == 4 +.for f in ctx mbuf nb_name nbns_rq +COPTS.${f}.c+= -Wno-pointer-sign +.endfor +.endif
CVS commit: src/dist/smbfs/mount_smbfs
Module Name:src Committed By: pooka Date: Fri Sep 4 18:22:38 UTC 2009 Modified Files: src/dist/smbfs/mount_smbfs: mount_smbfs.c Added Files: src/dist/smbfs/mount_smbfs: mount_smbfs.h Log Message: Make mount_smbfs follow the standard MOUNT_NOMAIN and parseargs() structure. (yes, this is dist, but considering the last and only import from upstream was 7 years ago, I'm not exactly worried this will make importing future versions harder) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/dist/smbfs/mount_smbfs/mount_smbfs.c cvs rdiff -u -r0 -r1.1 src/dist/smbfs/mount_smbfs/mount_smbfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/smbfs/mount_smbfs/mount_smbfs.c diff -u src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.9 src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.10 --- src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.9 Sat Jul 14 16:03:05 2007 +++ src/dist/smbfs/mount_smbfs/mount_smbfs.c Fri Sep 4 18:22:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mount_smbfs.c,v 1.9 2007/07/14 16:03:05 dsl Exp $ */ +/* $NetBSD: mount_smbfs.c,v 1.10 2009/09/04 18:22:37 pooka Exp $ */ /* * Copyright (c) 2000-2002, Boris Popov @@ -35,7 +35,7 @@ */ #include -__RCSID("$NetBSD: mount_smbfs.c,v 1.9 2007/07/14 16:03:05 dsl Exp $"); +__RCSID("$NetBSD: mount_smbfs.c,v 1.10 2009/09/04 18:22:37 pooka Exp $"); #include #include @@ -61,6 +61,8 @@ #include +#include "mount_smbfs.h" + #include "mntopts.h" static void usage(void); @@ -70,16 +72,25 @@ { NULL, 0, 0, 0 } }; - +#ifndef MOUNT_NOMAIN int main(int argc, char *argv[]) { - struct smb_ctx sctx, *ctx = &sctx; - struct smbfs_args mdata; + + setprogname(argv[0]); + return mount_smbfs(argc, argv); +} +#endif + +struct smb_ctx sctx; +void +mount_smbfs_parseargs(int argc, char *argv[], struct smbfs_args *mdatap, + int *mntflagsp, char *canon_dev, char *mount_point) +{ + struct smb_ctx *ctx = &sctx; struct stat st; char *next; - int opt, error, mntflags, caseopt; - char mount_point[MAXPATHLEN + 1]; + int opt, error, caseopt; if (argc == 2) { if (strcmp(argv[1], "-h") == 0) { @@ -96,9 +107,9 @@ if (smb_lib_init() != 0) exit(1); - mntflags = error = 0; - bzero(&mdata, sizeof(mdata)); - mdata.uid = mdata.gid = -1; + *mntflagsp = error = 0; + memset(mdatap, 0, sizeof(*mdatap)); + mdatap->uid = mdatap->gid = -1; caseopt = SMB_CS_NONE; if (smb_ctx_init(ctx, argc, argv, SMBL_SHARE, SMBL_SHARE, SMB_ST_DISK) != 0) @@ -122,7 +133,7 @@ getpwuid(atoi(optarg)) : getpwnam(optarg); if (pwd == NULL) errx(EX_NOUSER, "unknown user '%s'", optarg); - mdata.uid = pwd->pw_uid; + mdatap->uid = pwd->pw_uid; break; } case 'g': { @@ -132,18 +143,18 @@ getgrgid(atoi(optarg)) : getgrnam(optarg); if (grp == NULL) errx(EX_NOUSER, "unknown group '%s'", optarg); - mdata.gid = grp->gr_gid; + mdatap->gid = grp->gr_gid; break; } case 'd': errno = 0; - mdata.dir_mode = strtol(optarg, &next, 8); + mdatap->dir_mode = strtol(optarg, &next, 8); if (errno || *next != 0) errx(EX_DATAERR, "invalid value for directory mode"); break; case 'f': errno = 0; - mdata.file_mode = strtol(optarg, &next, 8); + mdatap->file_mode = strtol(optarg, &next, 8); if (errno || *next != 0) errx(EX_DATAERR, "invalid value for file mode"); break; @@ -156,14 +167,14 @@ nsp = inp = optarg; while ((nsp = strsep(&inp, ",;:")) != NULL) { if (strcasecmp(nsp, "LONG") == 0) - mdata.flags |= SMBFS_MOUNT_NO_LONG; + mdatap->flags |= SMBFS_MOUNT_NO_LONG; else errx(EX_DATAERR, "unknown suboption '%s'", nsp); } break; }; case 'o': - getmntopts(optarg, mopts, &mntflags, 0); + getmntopts(optarg, mopts, mntflagsp, 0); break; case 'c': switch (optarg[0]) { @@ -185,7 +196,7 @@ if (optind == argc - 2) optind++; - + if (optind != argc - 1) usage(); realpath(argv[optind], mount_point); @@ -200,20 +211,20 @@ if (smb_getextattr(mount_point, &einfo) == 0) errx(EX_OSERR, "can't mount on %s twice", mount_point); */ - if (mdata.uid == (uid_t)-1) - mdata.uid = st.st_uid; - if (mdata.gid == (gid_t)-1) - mdata.gid = st.st_gid; - if (mdata.file_mode == 0 ) - mdata.file_mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); - if (mdata.dir_mode == 0) { - mdata.dir_mode = mdata.file_mode; - if (mdata.dir_mode & S_IRUSR) - mdata.dir_mode |= S_IXUSR; - if (mdata.dir_mode & S_IRGRP) - mdata.dir_mode |= S_IXGRP; - if (mdata.dir_mode & S_IROTH) - mdata.dir_mode |= S_IXOTH; + if (mdatap->uid == (uid_t)-1) + mdatap->uid = st.st_uid; + if (mdatap->gid == (gid_t)-1) + mdatap->gid = st.st_gid; + if (mdatap->file_mode == 0 ) + mdatap->file_mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); + if (mdatap->dir_mode == 0) { + mdatap->dir_mode = mdatap->file_mode; + if (mdatap->dir_mode
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 18:14:41 UTC 2009 Modified Files: src/sys/dev/usb: uhub.c Log Message: Expand some definitions from . To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/dev/usb/uhub.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/usb/uhub.c diff -u src/sys/dev/usb/uhub.c:1.106 src/sys/dev/usb/uhub.c:1.107 --- src/sys/dev/usb/uhub.c:1.106 Fri Sep 4 16:42:38 2009 +++ src/sys/dev/usb/uhub.c Fri Sep 4 18:14:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $ */ +/* $NetBSD: uhub.c,v 1.107 2009/09/04 18:14:41 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.107 2009/09/04 18:14:41 dyoung Exp $"); #include #include @@ -109,7 +109,7 @@ int uhub_match(device_t parent, cfdata_t match, void *aux) { - USB_MATCH_START(uhub, uaa); + struct usb_attach_arg *uaa = aux; DPRINTFN(5,("uhub_match, uaa=%p\n", uaa)); /* @@ -124,7 +124,8 @@ void uhub_attach(device_t parent, device_t self, void *aux) { - USB_ATTACH_START(uhub, sc, uaa); + struct uhub_softc *sc = device_private(self); + struct usb_attach_arg *uaa = aux; usbd_device_handle dev = uaa->device; char *devinfop; usbd_status err; @@ -158,14 +159,14 @@ if (err) { DPRINTF(("%s: configuration failed, error=%s\n", device_xname(sc->sc_dev), usbd_errstr(err))); - USB_ATTACH_ERROR_RETURN; + return; } if (dev->depth > USB_HUB_MAX_DEPTH) { aprint_error_dev(self, "hub depth (%d) exceeded, hub ignored\n", USB_HUB_MAX_DEPTH); - USB_ATTACH_ERROR_RETURN; + return; } /* Get hub descriptor. */ @@ -184,7 +185,7 @@ if (err) { DPRINTF(("%s: getting hub descriptor failed, error=%s\n", device_xname(sc->sc_dev), usbd_errstr(err))); - USB_ATTACH_ERROR_RETURN; + return; } for (nremov = 0, port = 1; port <= nports; port++) @@ -202,7 +203,7 @@ hub = malloc(sizeof(*hub) + (nports-1) * sizeof(struct usbd_port), M_USBDEV, M_NOWAIT); if (hub == NULL) - USB_ATTACH_ERROR_RETURN; + return; dev->hub = hub; dev->hub->hubsoftc = sc; hub->explore = uhub_explore; @@ -338,7 +339,7 @@ if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - USB_ATTACH_SUCCESS_RETURN; + return; bad: if (sc->sc_status) @@ -348,7 +349,7 @@ if (hub) free(hub, M_USBDEV); dev->hub = NULL; - USB_ATTACH_ERROR_RETURN; + return; } usbd_status @@ -589,7 +590,7 @@ int uhub_detach(device_t self, int flags) { - USB_DETACH_START(uhub, sc); + struct uhub_softc *sc = device_private(self); struct usbd_hub *hub = sc->sc_hub->hub; struct usbd_port *rup; int port, nports;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 18:10:09 UTC 2009 Modified Files: src/sys/dev/usb: if_atu.c if_atureg.h if_aue.c if_auereg.h if_axe.c if_axereg.h if_cdce.c if_cdcereg.h if_cuereg.h if_kue.c if_udavreg.h if_urlreg.h Log Message: Change spaces to tabs and remove some unnecessary parentheses. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_atureg.h cvs rdiff -u -r1.113 -r1.114 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_auereg.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_axereg.h cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_cdcereg.h \ src/sys/dev/usb/if_udavreg.h src/sys/dev/usb/if_urlreg.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/if_cuereg.h cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_kue.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/usb/if_atu.c diff -u src/sys/dev/usb/if_atu.c:1.31 src/sys/dev/usb/if_atu.c:1.32 --- src/sys/dev/usb/if_atu.c:1.31 Fri Sep 4 17:53:58 2009 +++ src/sys/dev/usb/if_atu.c Fri Sep 4 18:10:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $ */ +/* $NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $"); #include "bpfilter.h" @@ -1171,7 +1171,7 @@ void atu_attach(device_t parent, device_t self, void *aux) { -struct atu_softc *sc = device_private(self); + struct atu_softc *sc = device_private(self); struct usb_attach_arg *uaa = aux; char*devinfop; usbd_status err; @@ -1191,13 +1191,13 @@ err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1); if (err) { aprint_error_dev(self, "setting config no failed\n"); -return; + return; } err = usbd_device2interface_handle(dev, ATU_IFACE_IDX, &sc->atu_iface); if (err) { aprint_error_dev(self, "getting interface handle failed\n"); -return; + return; } sc->atu_unit = device_unit(self); @@ -1239,7 +1239,7 @@ * so we don't want to do any more configuration after this * point. */ -return; + return; } if (mode != MODE_NETCARD) { @@ -1264,7 +1264,7 @@ " been downloaded\n", USBDEVNAME(sc->atu_dev))); atu_complete_attach(sc); -return; +return; } } @@ -1279,7 +1279,7 @@ atu_complete_attach(sc); } -return; + return; } void @@ -1320,7 +1320,7 @@ err = atu_get_card_config(sc); if (err) { aprint_error("\n%s: could not get card cfg!\n", -device_xname(sc->atu_dev)); + device_xname(sc->atu_dev)); return; } @@ -1406,7 +1406,7 @@ int atu_detach(device_t self, int flags) { -struct atu_softc *sc = device_private(self); + struct atu_softc *sc = device_private(self); struct ifnet *ifp = &sc->sc_if; DPRINTFN(10, ("%s: atu_detach state=%d\n", USBDEVNAME(sc->atu_dev), @@ -1929,11 +1929,11 @@ /* Init TX ring */ if (atu_tx_list_init(sc)) -printf("%s: tx list init failed\n", device_xname(sc->atu_dev)); + printf("%s: tx list init failed\n", device_xname(sc->atu_dev)); /* Init RX ring */ if (atu_rx_list_init(sc)) -printf("%s: rx list init failed\n", device_xname(sc->atu_dev)); + printf("%s: rx list init failed\n", device_xname(sc->atu_dev)); /* Load the multicast filter. */ /*atu_setmulti(sc); */ Index: src/sys/dev/usb/if_atureg.h diff -u src/sys/dev/usb/if_atureg.h:1.7 src/sys/dev/usb/if_atureg.h:1.8 --- src/sys/dev/usb/if_atureg.h:1.7 Fri Sep 4 17:53:58 2009 +++ src/sys/dev/usb/if_atureg.h Fri Sep 4 18:10:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atureg.h,v 1.7 2009/09/04 17:53:58 dyoung Exp $ */ +/* $NetBSD: if_atureg.h,v 1.8 2009/09/04 18:10:08 dyoung Exp $ */ /* $OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */ /* * Copyright (c) 2003 @@ -129,7 +129,7 @@ #define ATU_AVG_TIME 20 struct atu_softc { -device_t atu_dev; + device_t atu_dev; struct ethercom sc_ec; struct ieee80211com sc_ic; int (*sc_newstate)(struct ieee80211com *, Index: src/sys/dev/usb/if_aue.c diff -u src/sys/dev/usb/if_aue.c:1.113 src/sys/dev/usb/if_aue.c:1.114 --- src/sys/dev/usb/if_aue.c:1.113 Fri Sep 4 17:53:58 2009 +++ src/sys/dev/usb/if_aue.c Fri Sep 4 18:10:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_aue.c,v 1.113 2009/09/04 17:53:58 dyoung Exp $ */ +/* $NetBSD: if_aue.c,v 1.114 2009/09/04 18:10:08 dyoung Ex
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 17:55:48 UTC 2009 Modified Files: src/sys/dev/usb: usb.h usb_port.h Log Message: Extract some definitions from usb_port.h and put them into usb.h. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/dev/usb/usb.h cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/usb_port.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/usb/usb.h diff -u src/sys/dev/usb/usb.h:1.82 src/sys/dev/usb/usb.h:1.83 --- src/sys/dev/usb/usb.h:1.82 Sat Aug 2 23:14:34 2008 +++ src/sys/dev/usb/usb.h Fri Sep 4 17:55:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.82 2008/08/02 23:14:34 jmcneill Exp $ */ +/* $NetBSD: usb.h,v 1.83 2009/09/04 17:55:48 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ /* @@ -41,6 +41,59 @@ #include #if defined(_KERNEL) +#include + +MALLOC_DECLARE(M_USB); +MALLOC_DECLARE(M_USBDEV); +MALLOC_DECLARE(M_USBHC); + +#include + +#endif + +#define USB_USE_SOFTINTR + +#ifdef USB_DEBUG +#define UKBD_DEBUG 1 +#define UHIDEV_DEBUG 1 +#define UHID_DEBUG 1 +#define OHCI_DEBUG 1 +#define UGEN_DEBUG 1 +#define UHCI_DEBUG 1 +#define UHUB_DEBUG 1 +#define ULPT_DEBUG 1 +#define UCOM_DEBUG 1 +#define UPLCOM_DEBUG 1 +#define UMCT_DEBUG 1 +#define UMODEM_DEBUG 1 +#define UAUDIO_DEBUG 1 +#define AUE_DEBUG 1 +#define CUE_DEBUG 1 +#define KUE_DEBUG 1 +#define URL_DEBUG 1 +#define UMASS_DEBUG 1 +#define UVISOR_DEBUG 1 +#define UPL_DEBUG 1 +#define UZCOM_DEBUG 1 +#define URIO_DEBUG 1 +#define UFTDI_DEBUG 1 +#define USCANNER_DEBUG 1 +#define USSCANNER_DEBUG 1 +#define EHCI_DEBUG 1 +#define UIRDA_DEBUG 1 +#define USTIR_DEBUG 1 +#define UISDATA_DEBUG 1 +#define UDSBR_DEBUG 1 +#define UBT_DEBUG 1 +#define AXE_DEBUG 1 +#define UIPAQ_DEBUG 1 +#define UCYCOM_DEBUG 1 +#define Static +#else +#define Static static +#endif + +#if defined(_KERNEL) #include #endif /* _KERNEL */ Index: src/sys/dev/usb/usb_port.h diff -u src/sys/dev/usb/usb_port.h:1.85 src/sys/dev/usb/usb_port.h:1.86 --- src/sys/dev/usb/usb_port.h:1.85 Sat Jun 28 09:06:20 2008 +++ src/sys/dev/usb/usb_port.h Fri Sep 4 17:55:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_port.h,v 1.85 2008/06/28 09:06:20 kent Exp $ */ +/* $NetBSD: usb_port.h,v 1.86 2009/09/04 17:55:48 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,59 +37,6 @@ * Macro's to cope with the differences between operating systems. */ -#if defined(_KERNEL) -#include - -MALLOC_DECLARE(M_USB); -MALLOC_DECLARE(M_USBDEV); -MALLOC_DECLARE(M_USBHC); - -#include - -#endif - -#define USB_USE_SOFTINTR - -#ifdef USB_DEBUG -#define UKBD_DEBUG 1 -#define UHIDEV_DEBUG 1 -#define UHID_DEBUG 1 -#define OHCI_DEBUG 1 -#define UGEN_DEBUG 1 -#define UHCI_DEBUG 1 -#define UHUB_DEBUG 1 -#define ULPT_DEBUG 1 -#define UCOM_DEBUG 1 -#define UPLCOM_DEBUG 1 -#define UMCT_DEBUG 1 -#define UMODEM_DEBUG 1 -#define UAUDIO_DEBUG 1 -#define AUE_DEBUG 1 -#define CUE_DEBUG 1 -#define KUE_DEBUG 1 -#define URL_DEBUG 1 -#define UMASS_DEBUG 1 -#define UVISOR_DEBUG 1 -#define UPL_DEBUG 1 -#define UZCOM_DEBUG 1 -#define URIO_DEBUG 1 -#define UFTDI_DEBUG 1 -#define USCANNER_DEBUG 1 -#define USSCANNER_DEBUG 1 -#define EHCI_DEBUG 1 -#define UIRDA_DEBUG 1 -#define USTIR_DEBUG 1 -#define UISDATA_DEBUG 1 -#define UDSBR_DEBUG 1 -#define UBT_DEBUG 1 -#define AXE_DEBUG 1 -#define UIPAQ_DEBUG 1 -#define UCYCOM_DEBUG 1 -#define Static -#else -#define Static static -#endif - typedef struct proc *usb_proc_ptr; typedef device_t device_ptr_t;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 17:55:03 UTC 2009 Modified Files: src/sys/dev/usb: ehci.c ehcivar.h Log Message: Expand definitions, and lightly unifdef(1). To generate a diff of this commit: cvs rdiff -u -r1.158 -r1.159 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/ehcivar.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.158 src/sys/dev/usb/ehci.c:1.159 --- src/sys/dev/usb/ehci.c:1.158 Mon Jul 27 14:41:19 2009 +++ src/sys/dev/usb/ehci.c Fri Sep 4 17:55:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.158 2009/07/27 14:41:19 sketch Exp $ */ +/* $NetBSD: ehci.c,v 1.159 2009/09/04 17:55:03 dyoung Exp $ */ /* * Copyright (c) 2004-2008 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.158 2009/07/27 14:41:19 sketch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.159 2009/09/04 17:55:03 dyoung Exp $"); #include "ohci.h" #include "uhci.h" @@ -84,9 +84,6 @@ #define DPRINTF(x) do { if (ehcidebug) printf x; } while(0) #define DPRINTFN(n,x) do { if (ehcidebug>(n)) printf x; } while (0) int ehcidebug = 0; -#ifndef __NetBSD__ -#define snprintb((q), (f), "%b", q,f,b,l) snprintf((b), (l)) -#endif #else #define DPRINTF(x) #define DPRINTFN(n,x) @@ -510,7 +507,7 @@ sc->sc_async_head = sqh; EOWRITE4(sc, EHCI_ASYNCLISTADDR, sqh->physaddr | EHCI_LINK_QH); - usb_callout_init(sc->sc_tmo_intrlist); +callout_init(&(sc->sc_tmo_intrlist), 0); mutex_init(&sc->sc_doorbell_lock, MUTEX_DEFAULT, IPL_NONE); @@ -694,8 +691,8 @@ /* Schedule a callout to catch any dropped transactions. */ if ((sc->sc_flags & EHCIF_DROPPED_INTR_WORKAROUND) && !TAILQ_EMPTY(&sc->sc_intrhead)) - usb_callout(sc->sc_tmo_intrlist, hz, - ehci_intrlist_timeout, sc); +callout_reset(&(sc->sc_tmo_intrlist), + (hz), (ehci_intrlist_timeout), (sc)); #ifdef USB_USE_SOFTINTR if (sc->sc_softwake) { @@ -781,7 +778,7 @@ } done: DPRINTFN(12, ("ehci_check_intr: ex=%p done\n", ex)); - usb_uncallout(ex->xfer.timeout_handle, ehci_timeout, ex); +callout_stop(&(ex->xfer.timeout_handle)); ehci_idone(ex); } @@ -828,7 +825,7 @@ return; done: DPRINTFN(12, ("ehci_check_itd_intr: ex=%p done\n", ex)); - usb_uncallout(ex->xfer.timeout_handle, ehci_timeout, ex); +callout_stop(&(ex->xfer.timeout_handle)); ehci_idone(ex); } @@ -1087,7 +1084,7 @@ if (rv != 0) return (rv); - usb_uncallout(sc->sc_tmo_intrlist, ehci_intrlist_timeout, sc); +callout_stop(&(sc->sc_tmo_intrlist)); usb_delay_ms(&sc->sc_bus, 300); /* XXX let stray task complete */ @@ -2866,7 +2863,7 @@ /* If we're dying, just do the software part. */ s = splusb(); xfer->status = status; /* make software ignore it */ - usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); +callout_stop(&(xfer->timeout_handle)); usb_transfer_complete(xfer); splx(s); return; @@ -2900,7 +2897,7 @@ */ s = splusb(); xfer->status = status; /* make software ignore it */ - usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); +callout_stop(&(xfer->timeout_handle)); usb_syncmem(&sqh->dma, sqh->offs + offsetof(ehci_qh_t, qh_qtd.qtd_status), @@ -3016,7 +3013,7 @@ if (sc->sc_dying) { s = splusb(); xfer->status = status; - usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); +callout_stop(&(xfer->timeout_handle)); usb_transfer_complete(xfer); splx(s); return; @@ -3040,7 +3037,7 @@ xfer->hcflags |= UXFER_ABORTING; xfer->status = status; - usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); +callout_stop(&(xfer->timeout_handle)); s = splusb(); for (itd = exfer->itdstart; itd != NULL; itd = itd->xfer_next) { @@ -3342,8 +3339,8 @@ s = splusb(); ehci_set_qh_qtd(sqh, setup); /* also does usb_syncmem(sqh) */ if (xfer->timeout && !sc->sc_bus.use_polling) { -usb_callout(xfer->timeout_handle, mstohz(xfer->timeout), - ehci_timeout, xfer); + callout_reset(&(xfer->timeout_handle), (mstohz(xfer->timeout)), + (ehci_timeout), (xfer)); } mutex_enter(&sc->sc_intrhead_lock); ehci_add_intr_list(sc, exfer); @@ -3477,8 +3474,8 @@ s = splusb(); ehci_set_qh_qtd(sqh, data); /* also does usb_syncmem(sqh) */ if (xfer->timeout && !sc->sc_bus.use_polling) { - usb_callout(xfer->timeout_handle, mstohz(xfer->timeout), - ehci_timeout, xfer); + callout_reset(&(xfer->timeout_handle), (mstohz(xfer->timeout)), + (ehci_timeout), (xfer)); } mutex_enter(&sc->sc_intrhead_lock); ehci_add_intr_list(sc, exfer); @@ -3655,8 +3652,8 @@ s = splusb(); ehci_set_qh_qtd(sqh, data); /* also does usb_syncmem(sqh) */ if (xfer->timeout && !sc->sc_bus.use_polling) { - usb_callout(xfer->timeout_handle, mstohz(xfer->timeout), -
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 17:53:58 UTC 2009 Modified Files: src/sys/dev/usb: if_atu.c if_atureg.h if_aue.c if_auereg.h if_axe.c if_axereg.h if_cdce.c if_cdcereg.h if_cuereg.h Log Message: Expand definitions, and lightly unifdef(1). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_atureg.h cvs rdiff -u -r1.112 -r1.113 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_auereg.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_axereg.h cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_cdcereg.h cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_cuereg.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/usb/if_atu.c diff -u src/sys/dev/usb/if_atu.c:1.30 src/sys/dev/usb/if_atu.c:1.31 --- src/sys/dev/usb/if_atu.c:1.30 Wed Mar 18 16:00:20 2009 +++ src/sys/dev/usb/if_atu.c Fri Sep 4 17:53:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.30 2009/03/18 16:00:20 cegger Exp $ */ +/* $NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.30 2009/03/18 16:00:20 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $"); #include "bpfilter.h" @@ -221,7 +221,13 @@ void atu_complete_attach(struct atu_softc *); u_int8_t atu_calculate_padding(int); -USB_DECLARE_DRIVER(atu); +int atu_match(device_t, cfdata_t, void *); +void atu_attach(device_t, device_t, void *); +int atu_detach(device_t, int); +int atu_activate(device_t, enum devact); +extern struct cfdriver atu_cd; +CFATTACH_DECL_NEW(atu, sizeof(struct atu_softc), atu_match, atu_attach, +atu_detach, atu_activate); usbd_status atu_usb_request(struct atu_softc *sc, u_int8_t type, @@ -1018,9 +1024,10 @@ /* * Probe for an AT76c503 chip. */ -USB_MATCH(atu) +int +atu_match(device_t parent, cfdata_t match, void *aux) { - USB_MATCH_START(atu, uaa); + struct usb_attach_arg *uaa = aux; int i; for (i = 0; i < __arraycount(atu_devs); i++) { @@ -1161,9 +1168,11 @@ * Attach the interface. Allocate softc structures, do * setup and ethernet/BPF attach. */ -USB_ATTACH(atu) +void +atu_attach(device_t parent, device_t self, void *aux) { - USB_ATTACH_START(atu, sc, uaa); +struct atu_softc *sc = device_private(self); + struct usb_attach_arg *uaa = aux; char*devinfop; usbd_status err; usbd_device_handle dev = uaa->device; @@ -1174,20 +1183,21 @@ sc->sc_state = ATU_S_UNCONFIG; devinfop = usbd_devinfo_alloc(dev, 0); - USB_ATTACH_SETUP; + aprint_naive("\n"); + aprint_normal("\n"); aprint_normal_dev(self, "%s\n", devinfop); usbd_devinfo_free(devinfop); err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1); if (err) { aprint_error_dev(self, "setting config no failed\n"); - USB_ATTACH_ERROR_RETURN; +return; } err = usbd_device2interface_handle(dev, ATU_IFACE_IDX, &sc->atu_iface); if (err) { aprint_error_dev(self, "getting interface handle failed\n"); - USB_ATTACH_ERROR_RETURN; +return; } sc->atu_unit = device_unit(self); @@ -1229,7 +1239,7 @@ * so we don't want to do any more configuration after this * point. */ - USB_ATTACH_SUCCESS_RETURN; +return; } if (mode != MODE_NETCARD) { @@ -1254,7 +1264,7 @@ " been downloaded\n", USBDEVNAME(sc->atu_dev))); atu_complete_attach(sc); -USB_ATTACH_SUCCESS_RETURN; +return; } } @@ -1269,7 +1279,7 @@ atu_complete_attach(sc); } - USB_ATTACH_SUCCESS_RETURN; +return; } void @@ -1310,7 +1320,7 @@ err = atu_get_card_config(sc); if (err) { aprint_error("\n%s: could not get card cfg!\n", - USBDEVNAME(sc->atu_dev)); +device_xname(sc->atu_dev)); return; } @@ -1368,7 +1378,7 @@ ic->ic_ibss_chan = &ic->ic_channels[0]; ifp->if_softc = sc; - memcpy(ifp->if_xname, USBDEVNAME(sc->atu_dev), IFNAMSIZ); + memcpy(ifp->if_xname, device_xname(sc->atu_dev), IFNAMSIZ); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = atu_init; ifp->if_stop = atu_stop; @@ -1393,9 +1403,10 @@ sc->sc_state = ATU_S_OK; } -USB_DETACH(atu) +int +atu_detach(device_t self, int flags) { - USB_DETACH_START(atu, sc); +struct atu_softc *sc = device_private(self); struct ifnet *ifp = &sc->sc_if; DPRINTFN(10, ("%s: atu_detach state=%d\n", USBDEVNAME(sc->atu_dev), @@ -1412,7 +1423,7 @@ } int -atu_activate(device_ptr_t self, enum devact act) +atu_activate(device_t self, enum devact act) { struct atu_softc *sc =
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 17:53:13 UTC 2009 Modified Files: src/sys/dev/usb: usbdi.h usbdi_util.h usbdivar.h Log Message: Expand definitions, and lightly unifdef(1). To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/usb/usbdi.h cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/usbdi_util.h cvs rdiff -u -r1.88 -r1.89 src/sys/dev/usb/usbdivar.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/usb/usbdi.h diff -u src/sys/dev/usb/usbdi.h:1.78 src/sys/dev/usb/usbdi.h:1.79 --- src/sys/dev/usb/usbdi.h:1.78 Sun Aug 16 13:20:40 2009 +++ src/sys/dev/usb/usbdi.h Fri Sep 4 17:53:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.h,v 1.78 2009/08/16 13:20:40 martin Exp $ */ +/* $NetBSD: usbdi.h,v 1.79 2009/09/04 17:53:12 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ /* @@ -165,7 +165,7 @@ const char *usbd_errstr(usbd_status); void usbd_add_dev_event(int, usbd_device_handle); -void usbd_add_drv_event(int, usbd_device_handle, device_ptr_t); +void usbd_add_drv_event(int, usbd_device_handle, device_t); char *usbd_devinfo_alloc(usbd_device_handle, int); void usbd_devinfo_free(char *); Index: src/sys/dev/usb/usbdi_util.h diff -u src/sys/dev/usb/usbdi_util.h:1.39 src/sys/dev/usb/usbdi_util.h:1.40 --- src/sys/dev/usb/usbdi_util.h:1.39 Mon Feb 2 18:15:36 2009 +++ src/sys/dev/usb/usbdi_util.h Fri Sep 4 17:53:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.h,v 1.39 2009/02/02 18:15:36 joerg Exp $ */ +/* $NetBSD: usbdi_util.h,v 1.40 2009/09/04 17:53:12 dyoung Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -63,8 +63,8 @@ usbd_status usbd_get_report(usbd_interface_handle iface, int type, int id, void *data, int len); usbd_status usbd_set_idle(usbd_interface_handle iface, int duration,int id); -usbd_status usbd_read_report_desc(usbd_interface_handle ifc, void **descp, - int *sizep, usb_malloc_type mem); +usbd_status usbd_read_report_desc(usbd_interface_handle, void **, + int *, struct malloc_type *); usbd_status usbd_get_config(usbd_device_handle dev, u_int8_t *conf); usbd_status usbd_get_string_desc(usbd_device_handle dev, int sindex, int langid,usb_string_descriptor_t *sdesc, @@ -83,8 +83,8 @@ u_int16_t, u_int32_t, void *, u_int32_t *, const char *); -void usb_detach_wait(device_ptr_t); -void usb_detach_wakeup(device_ptr_t); +void usb_detach_wait(device_t); +void usb_detach_wakeup(device_t); typedef struct { Index: src/sys/dev/usb/usbdivar.h diff -u src/sys/dev/usb/usbdivar.h:1.88 src/sys/dev/usb/usbdivar.h:1.89 --- src/sys/dev/usb/usbdivar.h:1.88 Mon Aug 18 18:03:21 2008 +++ src/sys/dev/usb/usbdivar.h Fri Sep 4 17:53:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdivar.h,v 1.88 2008/08/18 18:03:21 kent Exp $ */ +/* $NetBSD: usbdivar.h,v 1.89 2009/09/04 17:53:12 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */ /* @@ -34,7 +34,11 @@ #include /* From usb_mem.h */ -DECLARE_USB_DMA_T; +struct usb_dma_block; +typedef struct { + struct usb_dma_block *block; + u_int offs; +} usb_dma_t; struct usbd_xfer; struct usbd_pipe; @@ -213,7 +217,7 @@ #define UXFER_ABORTING 0x01 /* xfer is aborting. */ #define UXFER_ABORTWAIT 0x02 /* abort completion is being awaited. */ - usb_callout_t timeout_handle; +struct callout timeout_handle; }; void usbd_init(void); @@ -235,10 +239,10 @@ usbd_interface_handle iface, struct usbd_endpoint *, int, usbd_pipe_handle *pipe); -usbd_status usbd_new_device(device_ptr_t, usbd_bus_handle, int, int, int, -struct usbd_port *); -usbd_status usbd_reattach_device(device_ptr_t, usbd_device_handle, - int, const int *); +usbd_status usbd_new_device(device_t, usbd_bus_handle, int, int, int, +struct usbd_port *); +usbd_status usbd_reattach_device(device_t, usbd_device_handle, + int, const int *); void usbd_remove_device(usbd_device_handle, struct usbd_port *); int usbd_printBCD(char *, size_t, int); @@ -247,7 +251,7 @@ usbd_status usb_insert_transfer(usbd_xfer_handle); void usb_transfer_complete(usbd_xfer_handle); -void usb_disconnect_port(struct usbd_port *, device_ptr_t); +void usb_disconnect_port(struct usbd_port *, device_t); /* Routines from usb.c */ void usb_needs_explore(usbd_device_handle);
CVS commit: src/distrib/sets/lists/xcomp
Module Name:src Committed By: christos Date: Fri Sep 4 17:46:06 UTC 2009 Modified Files: src/distrib/sets/lists/xcomp: md.amd64 md.i386 Log Message: PR/41991: Joachim Kuebart: add debug libs for libdrm_intel and unmark the regular lib as profile. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/lists/xcomp/md.amd64 cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/xcomp/md.i386 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/xcomp/md.amd64 diff -u src/distrib/sets/lists/xcomp/md.amd64:1.18 src/distrib/sets/lists/xcomp/md.amd64:1.19 --- src/distrib/sets/lists/xcomp/md.amd64:1.18 Fri Jun 12 08:36:50 2009 +++ src/distrib/sets/lists/xcomp/md.amd64 Fri Sep 4 13:46:06 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.18 2009/06/12 12:36:50 njoly Exp $ +# $NetBSD: md.amd64,v 1.19 2009/09/04 17:46:06 christos Exp $ ./usr/X11R6/include/xf86Optrec.h -unknown- x11 ./usr/X11R6/include/xf86Parser.h -unknown- x11 ./usr/X11R6/man/cat3/XF86VidMode.0 -unknown- .cat,x11 @@ -71,7 +71,8 @@ ./usr/X11R6/man/man3/XF86VidModeValidateModeLine.3 -unknown- .man,x11 ./usr/X11R6/man/man4/fpit.4-unknown- .man,x11 ./usr/X11R7/include/intel_bufmgr.h -unknown- xorg -./usr/X11R7/lib/libdrm_intel.a-unknown- profile,xorg +./usr/X11R7/lib/libdrm_intel.a-unknown- xorg +./usr/X11R7/lib/libdrm_intel_g.a -unknown- debuglib,xorg ./usr/X11R7/lib/libdrm_intel_p.a -unknown- profile,xorg ./usr/X11R7/lib/libdrm_intel_pic.a -unknown- xorg ./usr/libdata/debug/usr/X11R6/bin/XFree86.debug -unknown- debug,x11 Index: src/distrib/sets/lists/xcomp/md.i386 diff -u src/distrib/sets/lists/xcomp/md.i386:1.24 src/distrib/sets/lists/xcomp/md.i386:1.25 --- src/distrib/sets/lists/xcomp/md.i386:1.24 Fri Jun 12 08:36:50 2009 +++ src/distrib/sets/lists/xcomp/md.i386 Fri Sep 4 13:46:06 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.24 2009/06/12 12:36:50 njoly Exp $ +# $NetBSD: md.i386,v 1.25 2009/09/04 17:46:06 christos Exp $ ./usr/X11R6/include/xf86Optrec.h -unknown- x11 ./usr/X11R6/include/xf86Parser.h -unknown- x11 ./usr/X11R6/man/cat3/XF86VidMode.0 -unknown- .cat,x11 @@ -71,7 +71,8 @@ ./usr/X11R6/man/man3/XF86VidModeValidateModeLine.3 -unknown- .man,x11 ./usr/X11R6/man/man4/fpit.4-unknown- .man,x11 ./usr/X11R7/include/intel_bufmgr.h -unknown- xorg -./usr/X11R7/lib/libdrm_intel.a-unknown- profile,xorg +./usr/X11R7/lib/libdrm_intel.a-unknown- xorg +./usr/X11R7/lib/libdrm_intel_g.a -unknown- debuglib,xorg ./usr/X11R7/lib/libdrm_intel_p.a -unknown- profile,xorg ./usr/X11R7/lib/libdrm_intel_pic.a -unknown- xorg ./usr/libdata/debug/usr/X11R6/bin/XFree86.debug -unknown- debug,x11
CVS commit: src
Module Name:src Committed By: pooka Date: Fri Sep 4 17:21:34 UTC 2009 Modified Files: src: Makefile src/distrib/sets/lists/base: shl.elf shl.mi src/distrib/sets/lists/comp: mi shl.mi src/sys/rump: Makefile src/sys/rump/dev: Makefile.rumpdev src/sys/rump/dev/lib: Makefile.inc src/sys/rump/fs: Makefile.rumpfs Log Message: build & install librumpdev_netsmb and librumpfs_smbfs components To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/Makefile cvs rdiff -u -r1.182 -r1.183 src/distrib/sets/lists/base/shl.elf cvs rdiff -u -r1.488 -r1.489 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.1299 -r1.1300 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.85 -r1.86 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.4 -r1.5 src/sys/rump/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/Makefile.rumpdev cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/Makefile.inc cvs rdiff -u -r1.15 -r1.16 src/sys/rump/fs/Makefile.rumpfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/Makefile diff -u src/Makefile:1.273 src/Makefile:1.274 --- src/Makefile:1.273 Sun Aug 30 01:49:42 2009 +++ src/Makefile Fri Sep 4 17:21:33 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.273 2009/08/30 01:49:42 dyoung Exp $ +# $NetBSD: Makefile,v 1.274 2009/09/04 17:21:33 pooka Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -92,6 +92,7 @@ # do-lib: builds and installs prerequisites from lib. # do-gnu-lib: builds and installs prerequisites from gnu/lib. # do-external-lib: builds and installs prerequisites from external/lib. +# do-sys-rump-dev-lib: builds and installs prerequisites from sys/rump/dev/lib # do-sys-rump-fs-lib: builds and installs prerequisites from sys/rump/fs/lib # do-sys-rump-net-lib: builds and installs prerequisites from sys/rump/net/lib # do-sys-modules: builds and installs kernel modules (used by rump binaries) @@ -240,7 +241,7 @@ .if (${MACHINE} != "evbppc") && ${MKKMOD} != "no" BUILDTARGETS+= do-sys-modules .endif -BUILDTARGETS+= do-sys-rump-fs-lib do-sys-rump-net-lib +BUILDTARGETS+= do-sys-rump-dev-lib do-sys-rump-fs-lib do-sys-rump-net-lib .if ${MKCOMPAT} != "no" BUILDTARGETS+= do-compat-lib-csu BUILDTARGETS+= do-compat-libgcc @@ -415,7 +416,7 @@ BUILD_COMPAT_LIBS= .endif -.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/fs/lib sys/rump/net/lib sys/modules ${BUILD_COMPAT_LIBS} +.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/net/lib sys/modules ${BUILD_COMPAT_LIBS} do-${dir:S/\//-/g}: .PHONY .MAKE .for targ in dependall install ${MAKEDIRTARGET} ${dir} ${targ} Index: src/distrib/sets/lists/base/shl.elf diff -u src/distrib/sets/lists/base/shl.elf:1.182 src/distrib/sets/lists/base/shl.elf:1.183 --- src/distrib/sets/lists/base/shl.elf:1.182 Thu Sep 3 15:35:59 2009 +++ src/distrib/sets/lists/base/shl.elf Fri Sep 4 17:21:33 2009 @@ -1,4 +1,4 @@ -# $NetBSD: shl.elf,v 1.182 2009/09/03 15:35:59 pooka Exp $ +# $NetBSD: shl.elf,v 1.183 2009/09/04 17:21:33 pooka Exp $ # # Note: Do not mark "old" major and major.minor shared libraries as # "obsolete"; just remove the entry, as third-party applications @@ -226,6 +226,8 @@ ./usr/lib/librumpcrypto.so.0 base-rump-shlib ./usr/lib/librumpdev.sobase-rump-shlib ./usr/lib/librumpdev.so.0 base-rump-shlib +./usr/lib/librumpdev_netsmb.so base-rump-shlib +./usr/lib/librumpdev_netsmb.so.0 base-rump-shlib ./usr/lib/librumpfs_cd9660.so base-rump-shlib ./usr/lib/librumpfs_cd9660.so.0 base-rump-shlib ./usr/lib/librumpfs_efs.so base-rump-shlib @@ -248,6 +250,8 @@ ./usr/lib/librumpfs_nilfs.so.0 base-rump-shlib ./usr/lib/librumpfs_ntfs.so base-rump-shlib ./usr/lib/librumpfs_ntfs.so.0 base-rump-shlib +./usr/lib/librumpfs_smbfs.so base-rump-shlib +./usr/lib/librumpfs_smbfs.so.0 base-rump-shlib ./usr/lib/librumpfs_syspuffs.so base-rump-shlib ./usr/lib/librumpfs_syspuffs.so.0 base-rump-shlib ./usr/lib/librumpfs_sysvbfs.so base-rump-shlib Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.488 src/distrib/sets/lists/base/shl.mi:1.489 --- src/distrib/sets/lists/base/shl.mi:1.488 Thu Sep 3 15:35:59 2009 +++ src/distrib/sets/lists/base/shl.mi Fri Sep 4 17:21:33 2009 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.488 2009/09/03 15:35:59 pooka Exp $ +# $NetBSD: shl.mi,v 1.489 2009/09/04 17:21:33 pooka Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -120,6 +120,7 @@ ./usr/lib/librump.so.0.0 base-rump-shlib ./usr/lib/librumpcrypto.so.0.0 base-rump-shlib ./usr/lib/librumpdev.so.0.0 base-rump-shlib +./usr/li
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Sep 4 17:15:21 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: emul.c Log Message: add a few global symbols required by kernel code To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/rump/librump/rumpkern/emul.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/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.91 src/sys/rump/librump/rumpkern/emul.c:1.92 --- src/sys/rump/librump/rumpkern/emul.c:1.91 Mon Jul 20 17:12:43 2009 +++ src/sys/rump/librump/rumpkern/emul.c Fri Sep 4 17:15:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.91 2009/07/20 17:12:43 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.92 2009/09/04 17:15:21 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.91 2009/07/20 17:12:43 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.92 2009/09/04 17:15:21 pooka Exp $"); #include #include @@ -113,6 +113,10 @@ int max_devsw_convs = 0; int mem_no = 2; +struct device *booted_device; +struct device *booted_wedge; +int booted_partition; + kmutex_t tty_lock; int
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 17:01:30 UTC 2009 Modified Files: src/sys/dev/usb: stuirda.c Log Message: There's no need to #include after #including . To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/stuirda.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/usb/stuirda.c diff -u src/sys/dev/usb/stuirda.c:1.9 src/sys/dev/usb/stuirda.c:1.10 --- src/sys/dev/usb/stuirda.c:1.9 Mon Oct 13 10:01:24 2008 +++ src/sys/dev/usb/stuirda.c Fri Sep 4 17:01:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: stuirda.c,v 1.9 2008/10/13 10:01:24 is Exp $ */ +/* $NetBSD: stuirda.c,v 1.10 2009/09/04 17:01:29 dyoung Exp $ */ /* * Copyright (c) 2001,2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: stuirda.c,v 1.9 2008/10/13 10:01:24 is Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stuirda.c,v 1.10 2009/09/04 17:01:29 dyoung Exp $"); #include @@ -51,7 +51,6 @@ #include #include #include -#include #include #include
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 16:54:32 UTC 2009 Modified Files: src/sys/dev/usb: ukbdmap.c Log Message: Stop #including , this time more gracefully: #include , instead. We're certain to get all of the #definitions we need that way. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/ukbdmap.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/usb/ukbdmap.c diff -u src/sys/dev/usb/ukbdmap.c:1.23 src/sys/dev/usb/ukbdmap.c:1.24 --- src/sys/dev/usb/ukbdmap.c:1.23 Fri Sep 4 16:52:24 2009 +++ src/sys/dev/usb/ukbdmap.c Fri Sep 4 16:54:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbdmap.c,v 1.23 2009/09/04 16:52:24 dyoung Exp $ */ +/* $NetBSD: ukbdmap.c,v 1.24 2009/09/04 16:54:32 dyoung Exp $ */ /* * Copyright (c) 1999,2001 The NetBSD Foundation, Inc. @@ -31,17 +31,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbdmap.c,v 1.23 2009/09/04 16:52:24 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbdmap.c,v 1.24 2009/09/04 16:54:32 dyoung Exp $"); #include #include #include -#ifdef USB_DEBUG -#define Static -#else -#define Static static -#endif +#include #define KC(n) KS_KEYCODE(n)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 16:52:25 UTC 2009 Modified Files: src/sys/dev/usb: ukbdmap.c Log Message: Stop #including . To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/ukbdmap.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/usb/ukbdmap.c diff -u src/sys/dev/usb/ukbdmap.c:1.22 src/sys/dev/usb/ukbdmap.c:1.23 --- src/sys/dev/usb/ukbdmap.c:1.22 Tue Feb 3 17:50:28 2009 +++ src/sys/dev/usb/ukbdmap.c Fri Sep 4 16:52:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbdmap.c,v 1.22 2009/02/03 17:50:28 ghen Exp $ */ +/* $NetBSD: ukbdmap.c,v 1.23 2009/09/04 16:52:24 dyoung Exp $ */ /* * Copyright (c) 1999,2001 The NetBSD Foundation, Inc. @@ -31,13 +31,17 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbdmap.c,v 1.22 2009/02/03 17:50:28 ghen Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbdmap.c,v 1.23 2009/09/04 16:52:24 dyoung Exp $"); #include #include #include -#include +#ifdef USB_DEBUG +#define Static +#else +#define Static static +#endif #define KC(n) KS_KEYCODE(n)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Fri Sep 4 16:42:39 UTC 2009 Modified Files: src/sys/dev/usb: uhub.c Log Message: KNF: compare a pointer with NULL instead of evaluating its "truth." To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/dev/usb/uhub.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/usb/uhub.c diff -u src/sys/dev/usb/uhub.c:1.105 src/sys/dev/usb/uhub.c:1.106 --- src/sys/dev/usb/uhub.c:1.105 Thu Sep 3 20:54:03 2009 +++ src/sys/dev/usb/uhub.c Fri Sep 4 16:42:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.105 2009/09/03 20:54:03 dyoung Exp $ */ +/* $NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.105 2009/09/03 20:54:03 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $"); #include #include @@ -606,7 +606,7 @@ nports = hub->hubdesc.bNbrPorts; for(port = 0; port < nports; port++) { rup = &hub->ports[port]; - if (rup->device) + if (rup->device != NULL) usb_disconnect_port(rup, self); }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Sep 4 16:42:19 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: ltsleep.c Log Message: brace policy. no functional change. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpkern/ltsleep.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/ltsleep.c diff -u src/sys/rump/librump/rumpkern/ltsleep.c:1.16 src/sys/rump/librump/rumpkern/ltsleep.c:1.17 --- src/sys/rump/librump/rumpkern/ltsleep.c:1.16 Fri Sep 4 16:41:39 2009 +++ src/sys/rump/librump/rumpkern/ltsleep.c Fri Sep 4 16:42:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ltsleep.c,v 1.16 2009/09/04 16:41:39 pooka Exp $ */ +/* $NetBSD: ltsleep.c,v 1.17 2009/09/04 16:42:19 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.16 2009/09/04 16:41:39 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.17 2009/09/04 16:42:19 pooka Exp $"); #include #include @@ -122,9 +122,11 @@ struct ltsleeper *ltsp; mutex_enter(&sleepermtx); - LIST_FOREACH(ltsp, &sleepers, entries) - if (ltsp->id == ident) + LIST_FOREACH(ltsp, &sleepers, entries) { + if (ltsp->id == ident) { cv_broadcast(cv); + } + } mutex_exit(&sleepermtx); }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Sep 4 16:41:39 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: ltsleep.c Log Message: Actually, we cannot release the megalock before we take sleepermtx, since that opens a race window for non-mpsafe code, so do it after. Additionally, we cannot call mutex_enter() for sleepermtx, since ltsleep/mtsleep should not block (i.e. release kernel lock) before actually blocking, so busyloop in mutex_tryenter(). Finally, when waking up, take kernel lock back only *after* releasing sleepermtx to avoid deadlock against another thread holding the kernel lock and wanting sleepermtx. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/rump/librump/rumpkern/ltsleep.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/ltsleep.c diff -u src/sys/rump/librump/rumpkern/ltsleep.c:1.15 src/sys/rump/librump/rumpkern/ltsleep.c:1.16 --- src/sys/rump/librump/rumpkern/ltsleep.c:1.15 Fri Sep 4 13:58:57 2009 +++ src/sys/rump/librump/rumpkern/ltsleep.c Fri Sep 4 16:41:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ltsleep.c,v 1.15 2009/09/04 13:58:57 pooka Exp $ */ +/* $NetBSD: ltsleep.c,v 1.16 2009/09/04 16:41:39 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.15 2009/09/04 13:58:57 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.16 2009/09/04 16:41:39 pooka Exp $"); #include #include @@ -58,12 +58,12 @@ struct ltsleeper lts; int nlocks; - KERNEL_UNLOCK_ALL(curlwp, &nlocks); - lts.id = ident; cv_init(
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Fri Sep 4 16:21:24 UTC 2009 Modified Files: src/sys/dev/ic: lance.c lancevar.h Log Message: Replace shutdownhook_establish(9) with pmf_device_register1(9). Tested on sun3x. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ic/lance.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/lancevar.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/ic/lance.c diff -u src/sys/dev/ic/lance.c:1.42 src/sys/dev/ic/lance.c:1.43 --- src/sys/dev/ic/lance.c:1.42 Fri Nov 7 00:20:02 2008 +++ src/sys/dev/ic/lance.c Fri Sep 4 16:21:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lance.c,v 1.42 2008/11/07 00:20:02 dyoung Exp $ */ +/* $NetBSD: lance.c,v 1.43 2009/09/04 16:21:24 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.42 2008/11/07 00:20:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.43 2009/09/04 16:21:24 tsutsui Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -111,7 +111,7 @@ integrate struct mbuf *lance_get(struct lance_softc *, int, int); -hide void lance_shutdown(void *); +hide bool lance_shutdown(device_t, int); int lance_mediachange(struct ifnet *); void lance_mediastatus(struct ifnet *, struct ifmediareq *); @@ -250,9 +250,12 @@ if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); - sc->sc_sh = shutdownhook_establish(lance_shutdown, ifp); - if (sc->sc_sh == NULL) - panic("lance_config: can't establish shutdownhook"); + if (pmf_device_register1(sc->sc_dev, NULL, NULL, lance_shutdown)) + pmf_class_network_register(sc->sc_dev, ifp); + else + aprint_error_dev(sc->sc_dev, + "couldn't establish power handler\n"); + sc->sc_rbufaddr = malloc(sc->sc_nrbuf * sizeof(int), M_DEVBUF, M_WAITOK); sc->sc_tbufaddr = malloc(sc->sc_ntbuf * sizeof(int), M_DEVBUF, @@ -568,11 +571,15 @@ return (error); } -hide void -lance_shutdown(void *arg) +hide bool +lance_shutdown(device_t self, int howto) { + struct lance_softc *sc = device_private(self); + struct ifnet *ifp = &sc->sc_ethercom.ec_if; + + lance_stop(ifp, 0); - lance_stop((struct ifnet *)arg, 0); + return true; } /* Index: src/sys/dev/ic/lancevar.h diff -u src/sys/dev/ic/lancevar.h:1.12 src/sys/dev/ic/lancevar.h:1.13 --- src/sys/dev/ic/lancevar.h:1.12 Mon Apr 28 20:23:50 2008 +++ src/sys/dev/ic/lancevar.h Fri Sep 4 16:21:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lancevar.h,v 1.12 2008/04/28 20:23:50 martin Exp $ */ +/* $NetBSD: lancevar.h,v 1.13 2009/09/04 16:21:24 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -91,8 +91,6 @@ int sc_havecarrier; /* carrier status */ - void *sc_sh; /* shutdownhook cookie */ - uint16_t sc_conf3; /* CSR3 value */ uint16_t sc_saved_csr0;/* Value of csr0 at time of interrupt */
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Sep 4 16:18:34 UTC 2009 Modified Files: src/sys/netsmb: smb_iod.c Log Message: add comment to previous stating periodic wakeups can be nuked once smb is mpsafe. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_iod.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/netsmb/smb_iod.c diff -u src/sys/netsmb/smb_iod.c:1.34 src/sys/netsmb/smb_iod.c:1.35 --- src/sys/netsmb/smb_iod.c:1.34 Fri Sep 4 16:16:52 2009 +++ src/sys/netsmb/smb_iod.c Fri Sep 4 16:18:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_iod.c,v 1.34 2009/09/04 16:16:52 pooka Exp $ */ +/* $NetBSD: smb_iod.c,v 1.35 2009/09/04 16:18:34 pooka Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.34 2009/09/04 16:16:52 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.35 2009/09/04 16:18:34 pooka Exp $"); #include #include @@ -684,6 +684,10 @@ if (iod->iod_flags & SMBIOD_SHUTDOWN) break; SMBIODEBUG(("going to sleep\n")); + /* + * technically wakeup every hz is unnecessary, but keep + * this here until smb has been made mpsafe. + */ tsleep(&iod->iod_flags, PSOCK, "smbidle", hz); } splx(s);
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Sep 4 16:16:52 UTC 2009 Modified Files: src/sys/netsmb: smb_iod.c Log Message: defensive programming: wake up iod thread once a second "just in case" To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/netsmb/smb_iod.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/netsmb/smb_iod.c diff -u src/sys/netsmb/smb_iod.c:1.33 src/sys/netsmb/smb_iod.c:1.34 --- src/sys/netsmb/smb_iod.c:1.33 Fri Sep 4 16:12:45 2009 +++ src/sys/netsmb/smb_iod.c Fri Sep 4 16:16:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_iod.c,v 1.33 2009/09/04 16:12:45 pooka Exp $ */ +/* $NetBSD: smb_iod.c,v 1.34 2009/09/04 16:16:52 pooka Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.33 2009/09/04 16:12:45 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.34 2009/09/04 16:16:52 pooka Exp $"); #include #include @@ -684,7 +684,7 @@ if (iod->iod_flags & SMBIOD_SHUTDOWN) break; SMBIODEBUG(("going to sleep\n")); - tsleep(&iod->iod_flags, PSOCK, "smbidle", 0); + tsleep(&iod->iod_flags, PSOCK, "smbidle", hz); } splx(s); kthread_exit(0);
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Sep 4 16:12:45 UTC 2009 Modified Files: src/sys/netsmb: smb_iod.c Log Message: Send data for as long as there is new data available. Otherwise there was a danger of smb_iod_recvall() blocking, hence releasing the kernel lock, new data creeping into the queue, and a wakeup being missed (well, there's still a race, but since it's theoretical enough for me to never have encountered it, I'll rather solve it by periodic wakeups). To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/netsmb/smb_iod.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/netsmb/smb_iod.c diff -u src/sys/netsmb/smb_iod.c:1.32 src/sys/netsmb/smb_iod.c:1.33 --- src/sys/netsmb/smb_iod.c:1.32 Mon Jul 6 11:46:49 2009 +++ src/sys/netsmb/smb_iod.c Fri Sep 4 16:12:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_iod.c,v 1.32 2009/07/06 11:46:49 njoly Exp $ */ +/* $NetBSD: smb_iod.c,v 1.33 2009/09/04 16:12:45 pooka Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.32 2009/07/06 11:46:49 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.33 2009/09/04 16:12:45 pooka Exp $"); #include #include @@ -66,7 +66,7 @@ static int smb_iod_next; -static void smb_iod_sendall(struct smbiod *iod); +static bool smb_iod_sendall(struct smbiod *iod); static int smb_iod_disconnect(struct smbiod *iod); static void smb_iod_thread(void *); @@ -555,11 +555,12 @@ } -static void +static bool smb_iod_sendall(struct smbiod *iod) { struct smb_rq *rqp; int herror; + bool sentany = false; herror = 0; /* @@ -580,11 +581,14 @@ if (__predict_false(herror != 0)) break; + sentany = true; } } SMB_IOD_RQUNLOCK(iod); if (herror == ENOTCONN) smb_iod_dead(iod); + + return sentany; } /* @@ -647,8 +651,19 @@ } } #endif + + /* + * Do a send/receive cycle once and then as many times + * afterwards as we can send out new data. This is to make + * sure we got all data sent which might have ended up in the + * queue during the receive phase (which might block releasing + * the kernel lock). + */ smb_iod_sendall(iod); smb_iod_recvall(iod); + while (smb_iod_sendall(iod)) { + smb_iod_recvall(iod); + } } void
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: wiz Date: Fri Sep 4 14:23:24 UTC 2009 Modified Files: src/usr.bin/unzip: unzip.c Log Message: Make output for -v/-l match Infozip unzip more closely. Mention archive name, like Infozip unzip. Add missing options to usage. Ok joerg@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.5 src/usr.bin/unzip/unzip.c:1.6 --- src/usr.bin/unzip/unzip.c:1.5 Fri Sep 4 13:02:52 2009 +++ src/usr.bin/unzip/unzip.c Fri Sep 4 14:23:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.5 2009/09/04 13:02:52 joerg Exp $ */ +/* $NetBSD: unzip.c,v 1.6 2009/09/04 14:23:24 wiz Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: unzip.c,v 1.5 2009/09/04 13:02:52 joerg Exp $"); +__RCSID("$NetBSD: unzip.c,v 1.6 2009/09/04 14:23:24 wiz Exp $"); #include #include @@ -463,7 +463,7 @@ error("open('%s')", path); /* loop over file contents and write to disk */ - info("x %s", path); + info(" extracting: %s", path); text = a_opt; warn = 0; cr = 0; @@ -762,7 +762,7 @@ (uintmax_t)archive_entry_size(e), buf, archive_entry_pathname(e)); } else if (v_opt == 2) { - printf("%8ju Stored %7ju 0%% %s %08x %s\n", + printf("%8ju Stored %7ju 0%% %s %08x %s\n", (uintmax_t)archive_entry_size(e), (uintmax_t)archive_entry_size(e), buf, @@ -817,12 +817,13 @@ ac(archive_read_support_format_zip(a)); ac(archive_read_open_fd(a, fd, 8192)); + printf("Archive: %s\n", fn); if (v_opt == 1) { - printf(" Length Date Time Name\n"); - printf(" \n"); + printf(" Length Date TimeName\n"); + printf(" \n"); } else if (v_opt == 2) { - printf(" Length MethodSize Ratio Date Time CRC-32Name\n"); - printf(" -- --- - --\n"); + printf(" Length MethodSize Ratio Date Time CRC-32Name\n"); + printf(" -- --- - --\n"); } total_size = 0; @@ -850,8 +851,8 @@ printf(" %8ju %ju file%s\n", total_size, file_count, file_count != 1 ? "s" : ""); } else if (v_opt == 2) { - printf(" --- ------\n"); - printf("%8ju %7ju 0%%%ju file%s\n", + printf(" --- ------\n"); + printf("%8ju %7ju 0%%%ju file%s\n", total_size, total_size, file_count, file_count != 1 ? "s" : ""); } @@ -869,7 +870,7 @@ usage(void) { - fprintf(stderr, "usage: unzip [-ajLlnoqtu] [-d dir] zipfile\n"); + fprintf(stderr, "usage: unzip [-acfjLlnopqtuv] [-d dir] [-x pattern] zipfile\n"); exit(1); }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Sep 4 13:58:57 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: ltsleep.c Log Message: * wrap tsleep functions to drop die grosslock since we're going to sleep anyway in a few flicks from the clock * broadcast instead of signal in wakeup() To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/rump/librump/rumpkern/ltsleep.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/ltsleep.c diff -u src/sys/rump/librump/rumpkern/ltsleep.c:1.14 src/sys/rump/librump/rumpkern/ltsleep.c:1.15 --- src/sys/rump/librump/rumpkern/ltsleep.c:1.14 Tue Jun 9 23:26:19 2009 +++ src/sys/rump/librump/rumpkern/ltsleep.c Fri Sep 4 13:58:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ltsleep.c,v 1.14 2009/06/09 23:26:19 pooka Exp $ */ +/* $NetBSD: ltsleep.c,v 1.15 2009/09/04 13:58:57 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.14 2009/06/09 23:26:19 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.15 2009/09/04 13:58:57 pooka Exp $"); #include #include @@ -56,6 +56,9 @@ volatile struct simplelock *slock) { struct ltsleeper lts; + int nlocks; + + KERNEL_UNLOCK_ALL(curlwp, &nlocks); lts.id = ident; cv_init(id == ident) - cv_signal( cv); + cv_broadcast( cv); mutex_exit(&sleepermtx); }
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: joerg Date: Fri Sep 4 13:02:52 UTC 2009 Modified Files: src/usr.bin/unzip: unzip.c Log Message: Fix output spacing for summary in -v. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.4 src/usr.bin/unzip/unzip.c:1.5 --- src/usr.bin/unzip/unzip.c:1.4 Sun Aug 23 15:50:35 2009 +++ src/usr.bin/unzip/unzip.c Fri Sep 4 13:02:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.4 2009/08/23 15:50:35 wiz Exp $ */ +/* $NetBSD: unzip.c,v 1.5 2009/09/04 13:02:52 joerg Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: unzip.c,v 1.4 2009/08/23 15:50:35 wiz Exp $"); +__RCSID("$NetBSD: unzip.c,v 1.5 2009/09/04 13:02:52 joerg Exp $"); #include #include @@ -851,7 +851,7 @@ total_size, file_count, file_count != 1 ? "s" : ""); } else if (v_opt == 2) { printf(" --- ------\n"); - printf("%8ju %7ju 0%%%8ju file%s\n", + printf("%8ju %7ju 0%%%ju file%s\n", total_size, total_size, file_count, file_count != 1 ? "s" : ""); }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Sep 4 12:27:09 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: allocate p_lock for virtual processes To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/rump/librump/rumpkern/rump.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/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.110 src/sys/rump/librump/rumpkern/rump.c:1.111 --- src/sys/rump/librump/rumpkern/rump.c:1.110 Tue Jul 21 00:33:28 2009 +++ src/sys/rump/librump/rumpkern/rump.c Fri Sep 4 12:27:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.110 2009/07/21 00:33:28 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.111 2009/09/04 12:27:09 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.110 2009/07/21 00:33:28 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.111 2009/09/04 12:27:09 pooka Exp $"); #include #include @@ -367,6 +367,7 @@ p->p_pid = pid; p->p_vmspace = &rump_vmspace; p->p_fd = fd_init(NULL); + p->p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE); } else { p = &proc0; } @@ -402,6 +403,7 @@ l = rumpuser_get_curlwp(); p = l->l_proc; if (p->p_pid != 0) { + mutex_obj_free(p->p_lock); fd_free(); rump_proc_vfs_release(p); rump_cred_put(l->l_cred);
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Fri Sep 4 12:20:42 UTC 2009 Modified Files: src/sys/rump/librump/rumpdev: rump_dev.c rump_dev_private.h Added Files: src/sys/rump/dev/lib/libnetsmb: Makefile component.c shlib_version Log Message: add netsmb rump component (yes, it's functionally a device instead of a networking domain, since it provides and is accessed through /dev/nsmb instead of being accessed through sockets) To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libnetsmb/Makefile \ src/sys/rump/dev/lib/libnetsmb/component.c \ src/sys/rump/dev/lib/libnetsmb/shlib_version cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpdev/rump_dev.c \ src/sys/rump/librump/rumpdev/rump_dev_private.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/librump/rumpdev/rump_dev.c diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.1 src/sys/rump/librump/rumpdev/rump_dev.c:1.2 --- src/sys/rump/librump/rumpdev/rump_dev.c:1.1 Mon Jul 20 18:04:14 2009 +++ src/sys/rump/librump/rumpdev/rump_dev.c Fri Sep 4 12:20:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev.c,v 1.1 2009/07/20 18:04:14 pooka Exp $ */ +/* $NetBSD: rump_dev.c,v 1.2 2009/09/04 12:20:42 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.1 2009/07/20 18:04:14 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.2 2009/09/04 12:20:42 pooka Exp $"); #include #include @@ -37,6 +37,7 @@ void nocomponent() {} __weak_alias(rump_dev_cgd_init,nocomponent); __weak_alias(rump_dev_raidframe_init,nocomponent); +__weak_alias(rump_dev_netsmb_init,nocomponent); void rump_dev_init(void) @@ -46,6 +47,7 @@ rump_dev_cgd_init(); rump_dev_raidframe_init(); + rump_dev_netsmb_init(); rump_pdev_finalize(); Index: src/sys/rump/librump/rumpdev/rump_dev_private.h diff -u src/sys/rump/librump/rumpdev/rump_dev_private.h:1.1 src/sys/rump/librump/rumpdev/rump_dev_private.h:1.2 --- src/sys/rump/librump/rumpdev/rump_dev_private.h:1.1 Mon Jul 20 18:04:14 2009 +++ src/sys/rump/librump/rumpdev/rump_dev_private.h Fri Sep 4 12:20:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev_private.h,v 1.1 2009/07/20 18:04:14 pooka Exp $ */ +/* $NetBSD: rump_dev_private.h,v 1.2 2009/09/04 12:20:42 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -39,5 +39,6 @@ void rump_dev_cgd_init(void); void rump_dev_raidframe_init(void); +void rump_dev_netsmb_init(void); #endif /* _SYS_RUMP_DEV_PRIVATE_H_ */ Added files: Index: src/sys/rump/dev/lib/libnetsmb/Makefile diff -u /dev/null src/sys/rump/dev/lib/libnetsmb/Makefile:1.1 --- /dev/null Fri Sep 4 12:20:42 2009 +++ src/sys/rump/dev/lib/libnetsmb/Makefile Fri Sep 4 12:20:42 2009 @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2009/09/04 12:20:42 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../netsmb + +LIB= rumpdev_netsmb + +SRCS= iconv.c smb_conn.c smb_crypt.c smb_dev.c smb_iod.c smb_rq.c \ + smb_smb.c smb_subr.c smb_trantcp.c smb_usr.c subr_mchain.c + +SRCS+= component.c + +#CPPFLAGS+= -DSMB_SOCKET_DEBUG -DSMB_IOD_DEBUG + +CFLAGS+= -Wno-pointer-sign + +.include +.include Index: src/sys/rump/dev/lib/libnetsmb/component.c diff -u /dev/null src/sys/rump/dev/lib/libnetsmb/component.c:1.1 --- /dev/null Fri Sep 4 12:20:42 2009 +++ src/sys/rump/dev/lib/libnetsmb/component.c Fri Sep 4 12:20:42 2009 @@ -0,0 +1,56 @@ +/* $NetBSD: component.c,v 1.1 2009/09/04 12:20:42 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 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 SOFTW
CVS commit: src/sys/rump/fs/lib/libsmbfs
Module Name:src Committed By: pooka Date: Fri Sep 4 12:16:54 UTC 2009 Added Files: src/sys/rump/fs/lib/libsmbfs: Makefile shlib_version Log Message: rump smbfs component To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/fs/lib/libsmbfs/Makefile \ src/sys/rump/fs/lib/libsmbfs/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/fs/lib/libsmbfs/Makefile diff -u /dev/null src/sys/rump/fs/lib/libsmbfs/Makefile:1.1 --- /dev/null Fri Sep 4 12:16:54 2009 +++ src/sys/rump/fs/lib/libsmbfs/Makefile Fri Sep 4 12:16:54 2009 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2009/09/04 12:16:54 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../fs/smbfs + +LIB= rumpfs_smbfs + +SRCS= smbfs_io.c smbfs_kq.c smbfs_node.c smbfs_smb.c smbfs_subr.c \ + smbfs_vfsops.c smbfs_vnops.c + +CFLAGS+=-Wno-pointer-sign + +.include +.include Index: src/sys/rump/fs/lib/libsmbfs/shlib_version diff -u /dev/null src/sys/rump/fs/lib/libsmbfs/shlib_version:1.1 --- /dev/null Fri Sep 4 12:16:54 2009 +++ src/sys/rump/fs/lib/libsmbfs/shlib_version Fri Sep 4 12:16:54 2009 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2009/09/04 12:16:54 pooka Exp $ +# +major=0 +minor=0
CVS commit: src/share/man/man9
Module Name:src Committed By: plunky Date: Fri Sep 4 11:34:38 UTC 2009 Modified Files: src/share/man/man9: sockopt.9 Log Message: confusing pooka. manpage improvements, sunshine returns. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/sockopt.9 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/man9/sockopt.9 diff -u src/share/man/man9/sockopt.9:1.6 src/share/man/man9/sockopt.9:1.7 --- src/share/man/man9/sockopt.9:1.6 Mon Aug 3 19:57:40 2009 +++ src/share/man/man9/sockopt.9 Fri Sep 4 11:34:38 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sockopt.9,v 1.6 2009/08/03 19:57:40 rmind Exp $ +.\" $NetBSD: sockopt.9,v 1.7 2009/09/04 11:34:38 plunky Exp $ .\" .\" Copyright (c) 2008 Iain Hibbert .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 28, 2008 +.Dd September 4, 2009 .Dt SOCKOPT 9 .Os .Sh NAME @@ -49,8 +49,9 @@ .Ft int .Fn sockopt_setint "struct sockopt *sopt" "int value" .Sh DESCRIPTION -The sockopt structure is used to pass a socket option and associated -value: +The +.Ft sockopt +structure is used to pass a socket option and associated value: .Bd -literal -offset indent struct sockopt { int sopt_level; /* option level */ @@ -65,6 +66,13 @@ size so that memory allocation is not required and sopt_data will point to this in that case. .Pp +Rather than provide accessor functions, the +.Ft sockopt +structure is public and the contents are expected to be internally +consistent, but the normal practice would be to use the appropriate methods +for storage and retrieval of values where a known datatype is expected, +as the size will be verified. +.Pp Note: a sockopt structure may only be used for a single level/name/size combination. If the structure is to be re-used, it must be destroyed and re-initialized
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jmcneill Date: Fri Sep 4 11:26:54 UTC 2009 Modified Files: src/sys/dev/usb: pseye.c Log Message: Enable UVC-style headers and use them to help detect stream errors. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/pseye.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/usb/pseye.c diff -u src/sys/dev/usb/pseye.c:1.12 src/sys/dev/usb/pseye.c:1.13 --- src/sys/dev/usb/pseye.c:1.12 Wed Aug 19 13:38:51 2009 +++ src/sys/dev/usb/pseye.c Fri Sep 4 11:26:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pseye.c,v 1.12 2009/08/19 13:38:51 jmcneill Exp $ */ +/* $NetBSD: pseye.c,v 1.13 2009/09/04 11:26:54 jmcneill Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.12 2009/08/19 13:38:51 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.13 2009/09/04 11:26:54 jmcneill Exp $"); #include #include @@ -58,13 +58,15 @@ #include #include #include +#include #include #define PRI_PSEYE PRI_BIO -/* Bulk-in buffer length */ -#define PSEYE_BULKIN_BUFLEN (640 * 480 * 2) +/* Bulk-in buffer length -- make room for payload + UVC headers */ +#define PSEYE_BULKIN_BUFLEN ((640 * 480 * 2) + 4096) +#define PSEYE_BULKIN_BLKLEN 2048 /* SCCB/sensor interface */ #define PSEYE_SCCB_ADDRESS 0xf1 @@ -119,7 +121,8 @@ static int pseye_init_pipes(struct pseye_softc *); static int pseye_close_pipes(struct pseye_softc *); -static usbd_status pseye_get_frame(struct pseye_softc *); +static usbd_status pseye_get_frame(struct pseye_softc *, uint32_t *); +static void pseye_submit_payload(struct pseye_softc *, uint32_t); /* video(9) API */ static int pseye_open(void *, int); @@ -351,9 +354,6 @@ pseye_setregv(sc, 0xe2, 0x00); pseye_setregv(sc, 0xe7, 0x3e); - pseye_setreg(sc, 0x1c, 0x0a); - pseye_setreg(sc, 0x1d, 0x22); - pseye_setreg(sc, 0x1d, 0x06); pseye_setregv(sc, 0x96, 0x00); pseye_setreg(sc, 0x97, 0x20); @@ -380,11 +380,15 @@ pseye_setreg(sc, 0x1c, 0x00); pseye_setreg(sc, 0x1d, 0x40); - pseye_setreg(sc, 0x1d, 0x02); + pseye_setreg(sc, 0x1d, 0x02); /* payload size 0x0200 * 4 == 2048 */ + pseye_setreg(sc, 0x1d, 0x00); + pseye_setreg(sc, 0x1d, 0x02); /* frame size 0x025800 * 4 == 614400 */ + pseye_setreg(sc, 0x1d, 0x58); pseye_setreg(sc, 0x1d, 0x00); - pseye_setreg(sc, 0x1d, 0x02); - pseye_setreg(sc, 0x1d, 0x57); - pseye_setreg(sc, 0x1d, 0xff); + + pseye_setreg(sc, 0x1c, 0x0a); + pseye_setreg(sc, 0x1d, 0x08); /* enable UVC header */ + pseye_setreg(sc, 0x1d, 0x0e); pseye_setregv(sc, 0x8d, 0x1c); pseye_setregv(sc, 0x8e, 0x80); @@ -610,16 +614,14 @@ } static usbd_status -pseye_get_frame(struct pseye_softc *sc) +pseye_get_frame(struct pseye_softc *sc, uint32_t *plen) { - uint32_t len = sc->sc_bulkin_bufferlen; - if (sc->sc_dying) return USBD_IOERROR; return usbd_bulk_transfer(sc->sc_bulkin_xfer, sc->sc_bulkin_pipe, - USBD_SHORT_XFER_OK|USBD_NO_COPY, 50, - sc->sc_bulkin_buffer, &len, "pseyerb"); + USBD_SHORT_XFER_OK|USBD_NO_COPY, 1000, + sc->sc_bulkin_buffer, plen, "pseyerb"); } static int @@ -658,23 +660,57 @@ } static void +pseye_submit_payload(struct pseye_softc *sc, uint32_t tlen) +{ + struct video_payload payload; + uvideo_payload_header_t *uvchdr; + uint8_t *buf = sc->sc_bulkin_buffer; + uint32_t len; + uint32_t brem = (640*480*2); + + while (brem > 0 && tlen > 0) { + len = min(tlen, PSEYE_BULKIN_BLKLEN); + if (len < UVIDEO_PAYLOAD_HEADER_SIZE) { + printf("pseye_submit_payload: len=%u\n", len); + return; + } + + uvchdr = (uvideo_payload_header_t *)buf; + if (uvchdr->bHeaderLength != UVIDEO_PAYLOAD_HEADER_SIZE) + goto next; + if (uvchdr->bHeaderLength == len && + !(uvchdr->bmHeaderInfo & UV_END_OF_FRAME)) + goto next; + if (uvchdr->bmHeaderInfo & UV_ERROR) + return; + if ((uvchdr->bmHeaderInfo & UV_PRES_TIME) == 0) + goto next; + + payload.data = buf + uvchdr->bHeaderLength; + payload.size = min(brem, len - uvchdr->bHeaderLength); + payload.frameno = UGETDW(&buf[2]); + payload.end_of_frame = uvchdr->bmHeaderInfo & UV_END_OF_FRAME; + video_submit_payload(sc->sc_videodev, &payload); + +next: + tlen -= len; + buf += len; + brem -= payload.size; + } +} + +static void pseye_transfer_thread(void *opaque) { struct pseye_softc *sc = opaque; + uint32_t len; int error; - struct video_payload payload; - - payload.frameno = 0; while (sc->sc_running) { - error = pseye_get_frame(sc); - if (error == USBD_NORMAL_COMPLETION) { - payload.data = sc->sc_bulkin_buffer; - payload.size = sc->sc_bulkin_bufferlen; - payload.frameno = (payload.frameno + 1) & 1; - payload.end_of_frame = 1; - video_submit_payload(sc->sc_videodev, &payload); - } + len = sc->sc_bulkin_bufferlen; + error = pseye_get_frame(sc, &len); + if (error == USBD_NORMAL_COMPLETION) + pseye_su
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Fri Sep 4 10:54:44 UTC 2009 Modified Files: src/sys/rump: README.dirs Log Message: update list of directories To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/README.dirs 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/README.dirs diff -u src/sys/rump/README.dirs:1.8 src/sys/rump/README.dirs:1.9 --- src/sys/rump/README.dirs:1.8 Wed Dec 31 13:18:06 2008 +++ src/sys/rump/README.dirs Fri Sep 4 10:54:44 2009 @@ -1,15 +1,18 @@ - $NetBSD: README.dirs,v 1.8 2008/12/31 13:18:06 pooka Exp $ + $NetBSD: README.dirs,v 1.9 2009/09/04 10:54:44 pooka Exp $ Runnable Userspace Meta Programs Quick rundown of the current directory structure: sys/rump/librump - kernel runtime emulation - /rumpkern - kernel core, e.g. syscall, interrupt and lock support - /rumpnet - networking support and sockets layer - /rumpuser - userspace namespace support for previous, *NO* -D_KERNEL - provides e.g. malloc() and some syscalls - /rumpvfs - file system support + /rumpkern - kernel core, e.g. syscall, interrupt and lock support + /rumpuser - userspace namespace support for rump, *NO* -D_KERNEL + provides e.g. malloc() and some syscalls + + /rumpcrypto - kernel cryptographic routines + /rumpdev - device support, e.g. autoconf subsystem + /rumpnet - networking support and sockets layer + /rumpvfs - file system support sys/rump/include /machine - used for architectures where the rump ABI is not yet the @@ -17,10 +20,12 @@ completely /rump- rump headers installed to userspace -sys/rump/fs - file system rumps +sys/rump/dev - device components + +sys/rump/fs - file system components /lib/lib${fs} - kernel file system code compiled out of /sys with -D_KERNEL -sys/rump/net - networking rumps +sys/rump/net - networking components /lib/libnet - subroutines from sys/net, e.g. route and if_ethersubr /lib/libnetinet - TCP/IP /lib/libvirtif - a virtual interface which uses host tap(4) to shovel
CVS commit: src/share/man/man5
Module Name:src Committed By: wiz Date: Fri Sep 4 10:34:16 UTC 2009 Modified Files: src/share/man/man5: boot.cfg.5 Log Message: Fix incorrect wording. From Bug Hunting in PR 41989. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man5/boot.cfg.5 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/man5/boot.cfg.5 diff -u src/share/man/man5/boot.cfg.5:1.15 src/share/man/man5/boot.cfg.5:1.16 --- src/share/man/man5/boot.cfg.5:1.15 Sat Dec 13 23:36:21 2008 +++ src/share/man/man5/boot.cfg.5 Fri Sep 4 10:34:16 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot.cfg.5,v 1.15 2008/12/13 23:36:21 christos Exp $ +.\" $NetBSD: boot.cfg.5,v 1.16 2009/09/04 10:34:16 wiz Exp $ .\" .\" Copyright (c) 2007 Stephen Borrill .\" All rights reserved. @@ -25,7 +25,7 @@ .\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 13, 2008 +.Dd September 4, 2009 .Dt BOOT.CFG 5 .Os .Sh NAME @@ -197,7 +197,7 @@ .Sh HISTORY The .Nm -utility appeared in +file appeared in .Nx 5.0 . .Sh AUTHORS The
CVS commit: src/sys/opencrypto
Module Name:src Committed By: he Date: Fri Sep 4 08:58:44 UTC 2009 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: It is best to explicitly include if we're going to use kcondvar_t. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/opencrypto/cryptodev.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/opencrypto/cryptodev.h diff -u src/sys/opencrypto/cryptodev.h:1.16 src/sys/opencrypto/cryptodev.h:1.17 --- src/sys/opencrypto/cryptodev.h:1.16 Wed Mar 25 01:26:13 2009 +++ src/sys/opencrypto/cryptodev.h Fri Sep 4 08:58:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.h,v 1.16 2009/03/25 01:26:13 darran Exp $ */ +/* $NetBSD: cryptodev.h,v 1.17 2009/09/04 08:58:44 he Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $ */ /* $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $ */ @@ -86,6 +86,7 @@ #define _CRYPTO_CRYPTO_H_ #include +#include /* Some initial values */ #define CRYPTO_DRIVERS_INITIAL 4
CVS commit: src/sys/rump/librump/rumpdev
Module Name:src Committed By: he Date: Fri Sep 4 08:57:00 UTC 2009 Modified Files: src/sys/rump/librump/rumpdev: devnodes.c Log Message: Both amiga and atari needs explicitly included in order for curlwp to be properly declared. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpdev/devnodes.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/rumpdev/devnodes.c diff -u src/sys/rump/librump/rumpdev/devnodes.c:1.2 src/sys/rump/librump/rumpdev/devnodes.c:1.3 --- src/sys/rump/librump/rumpdev/devnodes.c:1.2 Wed Sep 2 16:55:07 2009 +++ src/sys/rump/librump/rumpdev/devnodes.c Fri Sep 4 08:57:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: devnodes.c,v 1.2 2009/09/02 16:55:07 pooka Exp $ */ +/* $NetBSD: devnodes.c,v 1.3 2009/09/04 08:57:00 he Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,12 +26,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.2 2009/09/02 16:55:07 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.3 2009/09/04 08:57:00 he Exp $"); #include #include #include #include +#include #include #include